import { Config } from "../config.ts"; import { AgentResult } from "../ir/llm-ir.ts"; import { WindowedIR } from "../ir/ir-windowing.ts"; import { Transport } from "../transports/transport-common.ts"; export type UserMessage = { role: "user"; content: string; }; export type AssistantMessage = { role: "assistant"; content: string; tool_calls?: Array<{ type: "function"; function: { arguments: string; name: string; }; id: string; }>; }; export type ToolMessage = { role: "tool"; content: string; tool_call_id: string; }; export type SystemPrompt = { role: "system"; content: string; }; export type LlmMessage = SystemPrompt | UserMessage | AssistantMessage | ToolMessage; export declare function runAgent({ config, modelOverride, windowedIR, onTokens, onAutofixJson, abortSignal, transport, skipSystemPrompt }: { config: Config; modelOverride: string | null; windowedIR: WindowedIR; onTokens: (t: string, type: "reasoning" | "content" | "tool") => any; onAutofixJson: (done: Promise) => any; abortSignal: AbortSignal; transport: Transport; skipSystemPrompt?: boolean; }): Promise;