import type { Readable, Writable } from "node:stream"; import { type V2HumanStartInput } from "../human-start.js"; import { type WorkerMcpBinding } from "./worker-mcp.js"; import type { Clock, KernelPaths } from "../../kernel/types.js"; export declare const MAX_V2_MCP_FRAME_BYTES: number; export interface JsonRpcResponse { readonly jsonrpc: "2.0"; readonly id: string | number | null; readonly result?: unknown; readonly error?: { readonly code: number; readonly message: string; }; } export interface V2McpJsonRpc { handleMessage(message: unknown): JsonRpcResponse | undefined; handleLine(line: string | Buffer): string | undefined; } export type V2ConductorMcpJsonRpc = V2McpJsonRpc; /** * The only v2 conductor JSON-RPC composition. Construction requires the same * dispatch-bound human-start input used in production, so advance_campaign can * never be registered without its CampaignLoop. */ export declare function createV2ConductorMcpJsonRpc(input: V2HumanStartInput): V2ConductorMcpJsonRpc; export declare function createV2WorkerMcpJsonRpc(input: { readonly paths: KernelPaths; readonly clock: Clock; readonly binding: WorkerMcpBinding; }): V2McpJsonRpc; export declare function runV2ConductorMcpStdio(input: V2HumanStartInput & { readonly input: Readable; readonly output: Writable; }): Promise; export declare function runV2WorkerMcpStdio(input: { readonly paths: KernelPaths; readonly clock: Clock; readonly binding: WorkerMcpBinding; readonly input: Readable; readonly output: Writable; }): Promise; export declare function runV2McpJsonRpcStdio(bridge: V2McpJsonRpc, input: Readable, output: Writable): Promise;