/** * Main entry point for the coding agent CLI. * * This file handles CLI argument parsing and translates them into * createAgentSession() options. The SDK does the heavy lifting. */ import type { Args } from "./cli/args"; import { ModelRegistry } from "./config/model-registry"; import { Settings } from "./config/settings"; import { InteractiveMode, runAcpMode } from "./modes"; import type { SubmittedUserInput } from "./modes/types"; import { type CreateAgentSessionOptions, type CreateAgentSessionResult, createAgentSession, discoverAuthStorage } from "./sdk"; import type { AgentSession } from "./session/agent-session"; import type { AuthStorage } from "./session/auth-storage"; export interface InteractiveModeNotify { kind: "warn" | "error" | "info"; message: string; } export declare function submitInteractiveInput(mode: Pick, session: Pick, input: SubmittedUserInput): Promise; type AcpSessionFactory = (cwd: string) => Promise; export interface AcpSessionFactoryOptions { baseOptions: CreateAgentSessionOptions; settings: Settings; sessionDir?: string; authStorage: AuthStorage; modelRegistry: ModelRegistry; parsedArgs: Pick; rawArgs: string[]; createSession: (options: CreateAgentSessionOptions) => Promise; } /** * Build the per-`session/new` factory used by ACP mode. * * MCP servers in ACP sessions are owned exclusively by the ACP client, which * supplies them through `session/new.mcpServers` and re-applies them via * {@link AcpAgent#configureMcpServers}. We therefore force `enableMCP: false` * on every session created here so {@link createAgentSession} skips the on-disk * `.mcp.json` discovery path — otherwise host MCP tools land in the session's * tool registry and shadow the client-supplied servers (issue #1234). */ export declare function createAcpSessionFactory(args: AcpSessionFactoryOptions): AcpSessionFactory; interface RunRootCommandDependencies { createAgentSession?: typeof createAgentSession; discoverAuthStorage?: typeof discoverAuthStorage; runAcpMode?: typeof runAcpMode; settings?: Settings; } export declare function runRootCommand(parsed: Args, rawArgs: string[], deps?: RunRootCommandDependencies): Promise; export declare function main(args: string[]): Promise; export {};