import { AcpPermissionOutcome, AcpPermissionRequest, AcpSessionUpdate, AcpStopReason, AcpUsage } from '../types/acp-types.js'; import { AcpSessionTransport } from '../transport/types.js'; export interface AcpSessionHandle { sessionId: string; resumed: boolean; prompt: (text: string) => Promise<{ stopReason: AcpStopReason; usage?: AcpUsage; }>; cancel: () => Promise; dispose: () => Promise; } export interface StartAcpSessionOptions { transport: AcpSessionTransport; cwd: string; authMethodId?: string; mcpServers?: Array<{ name: string; url: string; headers?: Array<{ name: string; value: string; }>; }>; resumeSessionId?: string; onUpdate: (update: AcpSessionUpdate) => void; onPermissionRequest: (request: AcpPermissionRequest) => Promise | AcpPermissionOutcome; /** * Harness-specific JSON-RPC notifications (e.g. Grok `_x.ai/session_notification`). * Return without throwing — unknown vendor extensions must not tear down the session. */ onExtNotification?: (method: string, params: Record) => void; } /** * Drive an ACP harness over stdio or a pre-connected JSON-RPC stream. */ export declare function startAcpSession(options: StartAcpSessionOptions): Promise;