kcode-k1-chat-codex-state 0.7.7

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

`ConversationState` is the deterministic owner of one open-format Codex conversation. It preserves delta-only same-thread input, full recovery/restart replay, provider stages, malformed native-call preservation, active-turn mailbox flushes, terminal responses, and restartable pre-launch failures.

`prepare_preflight` is a fresh-session-only operation. It allocates stable ToolCallIds, atomically appends ordered System Message and Tool Call boxes through Chat State without scheduling inference, makes those boxes part of the eventual first provider input, and returns each call's canonical BoxID, exact name, arguments and blocking mode. A session can be prepared only once and no provider round is opened.

`PreflightMode` is `Blocking` or `NonBlocking`. `PreflightItem` is either `SystemMessage { contents }` or `KtoolCall { name, arguments, mode }`. `PreparedPreflightCall` exposes `tool_call_id`, `call_box_id`, `name`, `arguments`, and `mode`.

External input, correlated Tool Messages and Results, stages, mailbox flushes, completion, recovery, status and restart retain their existing behavior. This crate owns no persistence, Ktool validation or execution, blocking gate, HTTP, provider process, migration, deployment, or retry policy.