import type { SessionStore } from "./session.js";
import { type AgentEvent, type AgentTodoItem, type AgentWorkState, type ApprovalRequest, type ChatMessage, type ModelProvider, type PermissionDecision, type ProviderReasoningEffort, type ToolCategory } from "./types.js";
import { WorkspaceTools } from "./workspace.js";
export type AgentRunnerOptions = {
    provider: ModelProvider;
    model: string;
    ollamaUrl: string;
    workspace: string;
    mode?: "plan" | "build" | "bypass";
    allowWrite: boolean;
    allowShell: boolean;
    maxSteps: number;
    thinkingMode: "fixed" | "adaptive";
    reasoningEffort: ProviderReasoningEffort | "adaptive";
    subagents: boolean;
    resumeContext?: string;
    allowExternalFileAnalysis?: boolean;
    allowShellMetacharacters?: boolean;
    memoryEnabled?: boolean;
    ultramaxx?: boolean;
    signal?: AbortSignal;
    shouldStopAfterStep?: () => boolean;
    sessionStore?: SessionStore;
    approvalHandler?: (request: ApprovalRequest) => Promise<PermissionDecision>;
};
export declare class AgentRunner {
    private readonly client;
    private readonly tools;
    private readonly options;
    constructor(options: AgentRunnerOptions);
    run(task: string): AsyncGenerator<AgentEvent>;
    private chatWithRetry;
}
export declare function recoverMalformedToolResponse(rawContent: string): {
    action: "tools";
    message: string;
    tool_calls: Array<{
        name: "write_file";
        arguments: {
            path: string;
            content: string;
        };
    }>;
} | null;
export declare function shouldExpectTodos(task: string, ultramaxx?: boolean): boolean;
export declare function isTodoOnlyFinalResponse(message: string): boolean;
export declare function shouldStopAfterEmptyToolBatches(emptyToolBatches: number): boolean;
export declare function findRepeatedToolCall(toolCalls: Parameters<WorkspaceTools["execute"]>[0][], recentSignatures: string[]): Parameters<WorkspaceTools["execute"]>[0] | null;
export declare function normalizeTodoItems(argumentsValue: Record<string, unknown>, existingItems?: AgentTodoItem[]): AgentTodoItem[];
type WorkspaceToolCallRecord = {
    id: string;
    call: Parameters<WorkspaceTools["execute"]>[0];
    workState: AgentWorkState;
};
export declare function executeToolCallsWithReadParallelism(tools: WorkspaceTools, toolCalls: WorkspaceToolCallRecord[]): Promise<{
    tool: "update_todo" | "list_files" | "find_files" | "read_file" | "read_range" | "file_info" | "search_text" | "inspect_document" | "memory_remember" | "memory_search" | "git_status" | "git_diff" | "git_log" | "git_show" | "list_changed_files" | "list_scripts" | "repo_overview" | "test_list" | "dependency_tree" | "write_file" | "edit_file" | "create_pdf" | "create_docx" | "apply_patch" | "run_script" | "run_tests" | "run_shell";
    ok: boolean;
    summary: string;
    content: string;
    toolCallId: string;
    category: ToolCategory;
    preview: string | undefined;
    approval: {
        request: ApprovalRequest;
        decision: PermissionDecision;
    } | undefined;
    metadata: Record<string, unknown> | undefined;
    workState: AgentWorkState;
}[]>;
export declare function compactTranscript(messages: ChatMessage[], tokenBudget?: number): void;
export {};
