export declare const ACP_PROTOCOL_VERSION = 1; export type JsonRpcId = string | number; export interface JsonRpcRequest { jsonrpc: '2.0'; id: JsonRpcId; method: string; params?: unknown; } export interface JsonRpcNotification { jsonrpc: '2.0'; method: string; params?: unknown; } export interface JsonRpcSuccess { jsonrpc: '2.0'; id: JsonRpcId; result: unknown; } export interface JsonRpcFailure { jsonrpc: '2.0'; id: JsonRpcId; error: { code: number; message: string; data?: unknown; }; } export type JsonRpcMessage = JsonRpcRequest | JsonRpcNotification | JsonRpcSuccess | JsonRpcFailure; export interface AcpImplementation { name: string; version: string; } export interface AcpInitializeRequest { protocolVersion?: number; clientCapabilities?: Record; clientInfo: AcpImplementation; } export interface AcpInitializeResponse { protocolVersion: number; agentCapabilities: Record; agentInfo: AcpImplementation; authMethods?: unknown[]; } export interface AcpNameValue { name: string; value: string; } export interface AcpHttpMcpServer { type: 'http'; name: string; url: string; headers: AcpNameValue[]; } export interface AcpSseMcpServer { type: 'sse'; name: string; url: string; headers: AcpNameValue[]; } export interface AcpStdioMcpServer { name: string; command: string; args: string[]; env: AcpNameValue[]; } export type AcpMcpServer = AcpHttpMcpServer | AcpSseMcpServer | AcpStdioMcpServer; export interface AcpNewSessionRequest { cwd: string; mcpServers?: AcpMcpServer[]; } export interface AcpNewSessionResponse { sessionId: string; models?: unknown; modes?: unknown; configOptions?: unknown; } export interface AcpSessionConfigOption { configId: string; name: string; description?: string | null; category?: string | null; type: 'select' | 'boolean' | string; currentValue?: unknown; options?: unknown; [key: string]: unknown; } export type AcpSetConfigOptionRequest = { sessionId: string; configId: string; type: 'id'; value: string; } | { sessionId: string; configId: string; type: 'boolean'; value: boolean; }; export declare const ACP_AUTH_STATUS_METHOD = "_auth/status_update"; export interface AcpAuthStatus { kind: string; label: string; detail?: string; account?: { email?: string; organization?: string; plan?: string; }; [key: string]: unknown; } export interface AcpAvailableCommand { name: string; description?: string; input?: { type?: string; hint?: string; [key: string]: unknown; } | null; [key: string]: unknown; } export interface AcpElicitationRequest { message: string; mode: 'form' | 'url' | string; requestedSchema?: Record; elicitationId?: string; url?: string; sessionId?: string; toolCallId?: string | null; requestId?: string | number; _meta?: Record | null; [key: string]: unknown; } export type AcpElicitationOutcome = { action: 'accept'; content?: Record | null; } | { action: 'decline'; } | { action: 'cancel'; }; export interface AcpLoadSessionRequest extends AcpNewSessionRequest { sessionId: string; } export interface AcpContentBlock { type: string; text?: string; [key: string]: unknown; } export interface AcpPromptRequest { sessionId: string; prompt: AcpContentBlock[]; } export interface AcpUsage { inputTokens?: number; outputTokens?: number; totalTokens?: number; cachedReadTokens?: number; thoughtTokens?: number; } export interface AcpPromptResponse { stopReason: string; usage?: AcpUsage; } export interface AcpPermissionOption { optionId: string; name: string; kind: string; } export interface AcpPermissionRequest { sessionId: string; toolCall?: { toolCallId: string; title?: string; kind?: string; [key: string]: unknown; }; title?: string; description?: string | null; subject?: { toolCallId?: string; [key: string]: unknown; } | null; options: AcpPermissionOption[]; _meta?: Record | null; } export type AcpPermissionOutcome = { outcome: 'selected'; optionId: string; } | { outcome: 'cancelled'; }; export interface AcpSessionUpdateParams { sessionId: string; update: { sessionUpdate?: string; session_update?: string; [key: string]: unknown; }; }