import type { ToolSet, StopCondition as BaseStopCondition } from "ai";
import type { Clark } from "../state-machine/clark-fsm.js";
/**
 * A predicate that determines whether to stop the agent's execution based on the provided steps.
 */
export type StopCondition<TOOLS extends ToolSet> = BaseStopCondition<TOOLS>;
/** A stop condition that checks if the last step used a specific tool and got a successful result.
 * A tool result is considered successful if it exists and its output.success is not explicitly false.
 * Tools that don't return a success field are treated as successful (backwards compatibility).
 *
 * @param toolName - name of the tool to condition on
 * @param maxAttempts - stop the loop if the tool has been called this many times without success
 */
export declare function hasToolSuccess(toolName: string, maxAttempts?: number): StopCondition<any>;
export declare function isAwaitingUser(clark: Clark): StopCondition<any>;
export declare const needsPermissionToExecute: (clark: Clark) => StopCondition<any>;
//# sourceMappingURL=stop-condition.d.ts.map