import type { McpRuntime } from "../mcp/runtime.js"; import type { ChatMessage, ChatImage, Mode, ProviderId, SuccessfulRequestSnapshot, ToolCall, ToolResult } from "../types.js"; import { type ToolCallingMode } from "../llm/tool-protocol.js"; import { type BackgroundJob, type ResponderNotification } from "../tools/jobs.js"; import { type SessionPlan } from "../store/plan.js"; import type { AgentEvent } from "./events.js"; import { type SessionPolicy } from "./session-policy.js"; import { type PreviousTurnSignal } from "./continue-orient.js"; import { type ConfirmPort } from "./confirm-port.js"; export * from "./tool-call-parser.js"; export { createSessionPolicy, isPreApprovalAllowedTool, isPlanApprovedByStatus, planHasOpenWork, shouldEnableImageOcr, type SessionPolicy, } from "./session-policy.js"; export { type ConfirmPort } from "./confirm-port.js"; export declare function shouldYieldForDeclaredResponderDependency(plan: SessionPlan | undefined, runningJobs: readonly BackgroundJob[], notifications: readonly ResponderNotification[], currentNotificationId?: string | undefined): boolean; export interface AgentRunOptions { mcp?: McpRuntime | undefined; provider?: ProviderId | undefined; model?: string | undefined; history?: ChatMessage[] | undefined; autoConfirm?: boolean | undefined; maxSteps?: number | undefined; toolCalling?: ToolCallingMode | undefined; signal?: AbortSignal | undefined; images?: ChatImage[] | undefined; visionProven?: boolean | undefined; onToolStart?: ((call: ToolCall) => void) | undefined; onToolResult?: ((call: ToolCall, result: ToolResult) => void) | undefined; onEvent?: ((event: AgentEvent) => void) | undefined; onMessages?: ((messages: ChatMessage[]) => void) | undefined; onSuccessfulRequest?: ((snapshot: SuccessfulRequestSnapshot) => void) | undefined; previousSuccessfulRequest?: SuccessfulRequestSnapshot | undefined; onOutcome?: ((outcome: import("./turn-outcome.js").TurnOutcome) => void) | undefined; confirm?: ConfirmPort | undefined; requestSecret?: ((request: { title: string; prompt: string; }) => Promise) | undefined; session?: SessionPolicy | undefined; mode?: Mode | undefined; displayPrompt?: string | null | undefined; previousTurn?: PreviousTurnSignal | undefined; contextLimitTokens?: number | undefined; getContextLimitTokens?: (provider: ProviderId | undefined, model: string | undefined) => number | undefined; } export declare function runAgentTurn(prompt: string, options?: AgentRunOptions): Promise; export declare function runAgentLoop(prompt: string, options?: AgentRunOptions): Promise;