kcode-k1-chat-codex-state 0.6.0

Deterministic open-format Codex K1 conversation state
Documentation
1
2
3
4
5
6
7
8
9
10
11
# Open-format Codex conversation state 0.6.0

`ConversationState` is the concrete Codex owner for open K1 chat state. It reexports the existing box, call, ID, and familiar type-string APIs and exactly selects adapter 0.5.0, codec 0.6.0, and state 0.8.0.

`accept` remains the generic triggering arrival, `accept_tool_return` remains Tool Result v1, and `accept_tool_return_v2` adds metadata-bearing Tool Result v2. `accept_tool_message` appends a correlated Tool Message without independently triggering inference or steer.

`flush_active_arrivals` publicly appends and returns one canonical FIFO snapshot without creating a steer token. Canonical boxes, the unsubmitted provider frontier, and trigger demand are tracked separately: a message-only flush leaves `prepare_steer` empty, while a later triggering arrival produces one exact token containing the complete unsubmitted FIFO prefix. Late triggering arrivals wait for the next token. Provider-generated stage boxes are never included in same-turn steer.

Projection remains generic `[Box <id> | <type>]\n<contents>` with hidden fields omitted. Opaque steer tokens remain process-local and exact-once. Restart, stall, text-only terminal output, open-value recovery, and monotonic session-local `ToolCallId` recovery are preserved.

This crate performs no I/O, persistence, scheduling runtime, tool execution, provider process management, or deployment.