import type { McpSpawnConfig } from "../../agent-spawn/dist/index.js"; import { type AcpModel } from "./runtime/acp-core.js"; import { type AgentHostOptions } from "./runtime/agent-host.js"; import type { FileAwarenessTracker } from "./runtime/file-awareness.js"; import type { AgentPlugin, McpServerConfig } from "./runtime/plugin-types.js"; import type { AcpEvent, RunResult, Tool, ToolAckResult } from "./runtime/types.js"; export type AgentRunOptions = { signal?: AbortSignal; resume?: Pick; skills?: string[]; activeSkills?: string[]; maxIterations?: number; acpModel?: AcpModel; apiKey?: string; baseUrl?: string; fetch?: typeof fetch; cwd?: string; baseSystemPrompt?: string; createSpawnSession?: AgentHostOptions["createSpawnSession"]; onStdout?: (chunk: string) => void; logPath?: string; env?: Record; fileAwareness?: FileAwarenessTracker; onPromptSubmitted?: (prompt: string) => void | Promise; }; export type AcpSession = { events: AsyncIterable; acknowledge(intentId: string, result: ToolAckResult): void; dispose(): Promise; }; export type AgentBuilder = { model(model: string): AgentBuilder; use(plugin: AgentPlugin): AgentBuilder; tools(...tools: Tool[]): AgentBuilder; mcp(configs: McpSpawnConfig): AgentBuilder; mcp(...configs: McpServerConfig[]): AgentBuilder; acp(prompt: string, options?: AgentRunOptions): Promise; run(prompt: string, options?: AgentRunOptions): Promise; stream(prompt: string, options?: AgentRunOptions): AsyncIterable; }; export declare function agent(): AgentBuilder; export declare function normalizeNonEmptyString(value: string | null | undefined): string | undefined; export declare function assertPositiveIntegerOption(value: unknown, key: string): void;