kcode-k1-chat-codex-codec 0.4.0

Native Codex wrapper validator and open-format K1 ChatBox projector
Documentation
1
2
3
4
5
6
7
8
9
10
11
# kcode-k1-chat-codex-codec 0.4.0

Concrete K1/Codex codec consumed by `kcode-k1-chat-thread-main-actor` and implementing K1-CHAT-BOX-FORMAT-001 revision 3.

## Public contract

`Codec` implements `kcode_k1_codex_adapter::BoxCodec` with `BoxValue` history or validated `call_ktool` calls. The native wrapper accepts exactly `{"name": <string>, "arguments": <JSON>}` and rejects every other shape without panicking. Inner arguments retain deterministic JSON serialization, and native calls remain `BoxValue::Call` values with no model text.

`project` generically renders any `kcode_k1_chat_chatend::ChatBox` as `[Box <one-based ID> | <box type>]\n<contents>`. Box type and contents are copied verbatim; there is no kind whitelist or enum in this crate. This includes all nine familiar Chatend string conventions and future types. Chatend 0.5.1 or newer supplies complete visible contents for owner-produced `Tool Call` and `Tool Result` boxes.

`hidden_type` and `hidden_contents` are never included in the default model projection. This omission is solely a token-efficiency rule and is not a security boundary.