/** * Shared primitives for the Codex app-server JSON-RPC protocol. * * The app-server protocol is upstream-defined; Supen consumes it from two * sites (the bridge transport in `http/codex-app-server-bridge.ts` and the * driver in `agent-sdk/drivers/codex-app-server-driver.ts`). Keep the method * sets and param extractors here so both sites agree on what a terminal turn * event looks like, which field carries the thread id, etc. Drift between the * two sites has previously caused the bridge to release a turn mutex while * the driver still considered the turn live (and vice versa). */ /** Notification methods that mark a turn as no longer running. */ export declare const TERMINAL_TURN_METHODS: Set; export declare function isTerminalTurnMethod(method: string | undefined | null): boolean; /** Coerce an unknown JSON-RPC param value into a record, never throwing. */ export declare function jsonRecord(value: unknown): Record; /** * Extract a thread id from JSON-RPC params. Accepts both the flat `threadId` * shape (used by some app-server methods) and the nested `turn.thread.id` / * `thread.id` envelope. */ export declare function threadIdOf(params: Record): string | null; /** * Extract a turn id from JSON-RPC params. Accepts both the flat `turnId` * shape and the nested `turn.id` envelope. */ export declare function turnIdOf(params: Record): string | null; /** Extract the workspace cwd from JSON-RPC params, if present. */ export declare function workspaceOf(params: Record): string | null; //# sourceMappingURL=codex-app-server-protocol.d.ts.map