import type { Agent, RunResult } from '../core/agent.js'; import type { Context } from '../core/context.js'; import type { Logger } from '../types/logger.js'; import type { DoneCondition } from '../types/multi-agent.js'; type AutonomousResult = RunResult & { toolCalls: number; reason?: string | undefined; }; export interface DoneCheckResult { done: boolean; reason?: string | undefined; iterations: number; toolCalls: number; } export declare class DoneConditionChecker { private readonly condition; private readonly compiledRegex; private readonly logger; constructor(condition: DoneCondition, opts?: { logger?: Logger | undefined; }); check(state: { iterations: number; toolCalls: number; lastOutput?: string | undefined; }): DoneCheckResult; } export interface AutonomousRunnerOptions { agent: Agent; context: Context; doneCondition: DoneCondition; iterationTimeoutMs?: number | undefined; onIteration?: (state: { iteration: number | undefined; toolCalls: number; }) => void; onDone?: (((result: AutonomousResult) => void)) | undefined; /** * When true and `doneCondition.type === 'directive'`, the runner * runs the agent with `autonomousContinue: true` so the agent loop * handles its own [continue]/[done] markers internally (no outer * re-invocation needed). The runner still provides iteration/timeouts. */ enableAutonomousContinue?: boolean | undefined; /** Logger for structured warnings. Falls back to console.warn when omitted. */ logger?: Logger | undefined; } export declare class AutonomousRunner { private readonly opts; private iterations; private toolCalls; private lastOutput?; private stopped; private readonly doneChecker; constructor(opts: AutonomousRunnerOptions); run(): Promise; private runLoop; stop(): void; } export {}; //# sourceMappingURL=autonomous-runner.d.ts.map