/** * Claude Code SDK adapter. * * Translates between Tisyn protocol messages and the * `@anthropic-ai/claude-agent-sdk` TypeScript API. Uses * `unstable_v2_createSession()` to keep a single subprocess alive * across multiple `plan` calls within a session. * * Unlike the ACP adapter this does not spawn a subprocess directly — * the SDK manages Claude Code subprocess lifecycle internally. */ import type { LocalAgentBinding } from "@tisyn/transport"; export interface SdkAdapterConfig { /** Model to use (e.g. "claude-sonnet-4-6"). Defaults to "claude-sonnet-4-6". */ model?: string; /** Permission mode (e.g. "default", "plan"). Defaults to SDK default. */ permissionMode?: string; } /** * Create a `LocalAgentBinding` backed by the Claude Agent SDK. * * The binding handles all five Tisyn operations: * - `newSession` — creates an SDKSession via `unstable_v2_createSession()`, * returns an adapter-internal handle (`cc-1`, `cc-2`, …) * - `plan` — looks up the session by handle, calls `send()` + `stream()` * - `closeSession` — calls `session.close()`, removes handle from map * - `fork` — calls `forkSession()` with the real SDK session ID * - `openFork` — calls `unstable_v2_resumeSession()`, returns new handle */ export declare function createSdkBinding(config?: SdkAdapterConfig): LocalAgentBinding; //# sourceMappingURL=sdk-adapter.d.ts.map