/** * Mock Claude Code adapter for testing. * * Simulates the Claude Code ACP agent at the Tisyn protocol level. * The transport factory returns a resource-scoped transport — the * message processing loop is a spawned child, so its lifetime is * owned by the enclosing resource scope (no manual createScope). * * Supports all five operations: newSession, closeSession, plan, fork, openFork. * Each operation can be configured independently with result, error, progress, delay. */ import type { Val } from "@tisyn/ir"; import type { AgentTransportFactory } from "@tisyn/transport"; export interface MockOperationConfig { result?: Val; error?: { message: string; name?: string; }; progress?: Val[]; delay?: number; neverComplete?: boolean; } export interface MockClaudeCodeConfig { newSession?: MockOperationConfig; closeSession?: MockOperationConfig; plan?: MockOperationConfig; prompt?: MockOperationConfig; fork?: MockOperationConfig; openFork?: MockOperationConfig; } /** * Create a mock AgentTransportFactory that simulates Claude Code ACP behavior. * * Routes execute requests by operation name to per-operation configs. * Supports progress, delay, error injection, and neverComplete (for cancel tests). * * Returns a `calls` array that records every execute request received, * so tests can assert on what was dispatched. */ export declare function createMockClaudeCodeTransport(config: MockClaudeCodeConfig): { factory: AgentTransportFactory; calls: Array<{ operation: string; args: Val; }>; }; //# sourceMappingURL=mock.d.ts.map