import type { Readable, Writable } from "node:stream"; import { type ProcessRunner } from "../providers/process.js"; export declare const WORKER_BRIDGE_TOOLS: readonly ["read_dispatch", "acknowledge_dispatch", "record_dispatch_result"]; export declare const MAX_WORKER_BRIDGE_FRAME_BYTES: number; interface JsonRpcResponse { readonly jsonrpc: "2.0"; readonly id: string | number | null; readonly result?: unknown; readonly error?: { readonly code: number; readonly message: string; }; } export interface WorkerBridge { handleMessage(message: unknown): JsonRpcResponse | undefined; handleLine(line: string | Buffer): string | undefined; } export interface WorkerBridgeOptions { readonly packageRoot: string; readonly configRoot?: string; readonly workspaceRoot: string; readonly stateRoot: string; readonly dispatchId: string; readonly sessionId: string; readonly cwd?: string; readonly env?: NodeJS.ProcessEnv; readonly clock?: () => string; readonly runner?: ProcessRunner; } export declare function createWorkerBridge(options: WorkerBridgeOptions): WorkerBridge; export declare function runWorkerBridge(options: WorkerBridgeOptions & { readonly input: Readable; readonly output: Writable; }): Promise; export {};