kcode-k1-chat-thread-session-actor 0.2.2

Concrete asynchronous session actor for one durable K1 chat thread
Documentation
1
2
3
4
5
6
7
# K1 chat-thread session actor 0.2.2

`kcode-k1-chat-thread-session-actor` owns the concrete asynchronous actor loop for one durable K1 chat thread. It composes `kcode-k1-chat-thread-actor-channel` with the Cargo-compatible 0.4.1 lower bound, `kcode-k1-chat-thread-durable-state` with the Cargo-compatible 0.4.0 lower bound, and the approved fail-closed `kcode-k1-chat-thread-web-search` compatibility boundary with the Cargo-compatible 0.2.0 lower bound, spawns exactly one actor, and returns the established channel `Handle`.

The actor owns FIFO commands, Codex Turn effects, exact model-input observations, stage acknowledgements, waiters, restart generations, disabled WebSearch task completion and cancellation epochs, and teardown. A provider stage is durably accepted before dispatch; its initial active-turn mailbox flush commits before the stage acknowledgement. The actor continues the same provider generation through the exact `Adapter::steer` API, and committing the mailbox flush does not independently schedule redundant inference. Independently running tool tasks may outlive the provider turn, and terminal tool results request an active-turn mailbox flush in the active turn or defer it to a later turn. Synthetic provider input is exactly `[Box N | Agent Response]\n`. Provider failure fences and aborts tasks, while successful completion retains live tasks.

Durable state exclusively owns canonical Agent Response, Agent Message, Tool Call, Tool Message and Tool Result transitions; persistence; fresh-thread replay; same-thread delta input; authorization; synchronous action dispatch; restart; and success-only prepared frontiers. This package owns no persistence format, authorization policy, native tool implementation, HTTP, migration, daemon composition, deployment, or public facade.