import type { Socket } from 'node:net'; import type { RunContext, Decision } from './types.js'; /** Minimal surface the RPC handlers need from the bus. */ export interface ApprovalRpcHost { /** Look up a registered RunContext by runId. Returns undefined if unknown. */ getRunContext(runId: string): RunContext | undefined; /** Register a synthetic pending approval (used by native_tool only). */ registerSyntheticPending(input: { runId: string; reqId: string; toolName: string; input: Record; toolUseId?: string; ctx: RunContext; dispatch: (decision: Decision) => void; }): Promise; } /** * Dispatch an already-parsed wire message to the appropriate RPC handler. * Returns true if the type was handled here, false if the caller should * deal with it (e.g. 'approval' stays in ApprovalBus, unknown type → warn). */ export declare function dispatchRpc(m: Record, socket: Socket, host: ApprovalRpcHost): Promise; //# sourceMappingURL=socket-rpc.d.ts.map