/** * Coder mode on every runtime (rev 19, contract §4): codex's own tool items * → matched `tool_use`/`tool_result` start/end pairs with canonical inputs, * so ToolActivityTracker (tool-activity.ts) emits `full`-fidelity * `tool_activity` for codex the same way it does for claude. * * Wire shapes — live-captured 2026-09-29 from codex-cli 0.156.1 * (`codex exec --json`, a shell command plus two apply_patch edits): * * {"type":"item.started","item":{"id":"item_1","type":"command_execution", * "command":"/usr/bin/bash -lc 'echo probe'","aggregated_output":"", * "exit_code":null,"status":"in_progress"}} * {"type":"item.completed","item":{... same id ...,"aggregated_output":"probe\n", * "exit_code":0,"status":"completed"}} * {"type":"item.started","item":{"id":"item_2","type":"file_change", * "changes":[{"path":"/abs/note.txt","kind":"add"}],"status":"in_progress"}} * {"type":"item.completed","item":{... same id ...,"status":"completed"}} * * `mcp_tool_call` ({server, tool, arguments, result?, error?, status}), * `web_search` ({query}) and `todo_list` ({items:[{text, completed}]}) follow * codex's documented `codex exec --json` item schema (docs/exec.md, * exec/src/exec_events.rs) — not observed live here. `reasoning`, * `agent_message` and `error` items are not tool calls and are skipped; any * other item type is passed through as kind `other` with its raw fields. * * codex numbers items per `exec` process (`item_0`, `item_1`, … restart on * every spawn, resumed turns included), so ids are prefixed per spawn to * stay unique across tool rounds and mailbox prompts. */ import type { CodexItem, CodexStreamEvent } from './codex-runner-types.js'; /** * Per-spawn tracker: turns `item.started`/`item.completed` tool items into * `tool_start`/`tool_end` stream events. A completed item that never * started (codex reports some items only on completion) gets its start * synthesized first, so every end has a start. `flush()` closes whatever is * still open when the process exits. */ export declare class CodexToolItems { private idPrefix; private open; constructor(idPrefix: string); private start; onItem(phase: 'started' | 'completed', item: CodexItem | undefined, threadId: string | undefined): CodexStreamEvent[]; /** Ends for every call still open when the codex process exited. */ flush(threadId: string | undefined): CodexStreamEvent[]; } /** ADR-O001 D8 level → codex's `model_reasoning_effort`. codex accepts * none|minimal|low|medium|high|xhigh|max (the API's own 400 lists them, * verified with codex-cli 0.156.1); monomind's `off` is codex's `none`. */ export declare function codexEffortArgs(effort: string | undefined): string[]; //# sourceMappingURL=codex-runner-tools.d.ts.map