kcode-k1-chat-thread-durable-state 0.4.2

Authorized durable state transitions for one K1 chat thread
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# K1 chat-thread durable state 0.4.2

`kcode-k1-chat-thread-durable-state` is the concrete one-consumer synchronous owner for one session actor. It combines durable conversation transitions and persistence with one bound authorization lifecycle and synchronous action dispatch, without duplicating persistence or provider state.

Its internal dependency requirements are Cargo-compatible lower bounds, not exact pins:

- `kcode-k1-access-kmap` requires `0.5.0`, allowing compatible releases `>=0.5.0, <0.6.0`.
- `kcode-k1-chat-persistence` requires `0.6.0`, allowing compatible releases `>=0.6.0, <0.7.0`.
- `kcode-k1-chat-state` requires `0.9.0`, allowing compatible releases `>=0.9.0, <0.10.0`.
- `kcode-k1-chat-thread-actions` requires `0.5.0`, allowing compatible releases `>=0.5.0, <0.6.0`.
- `kcode-k1-chat-thread-durable-turn` requires `0.1.3`, allowing compatible releases `>=0.1.3, <0.2.0`.

Provider stages durably record Agent Responses, explicit Agent Messages, and Tool Calls before dispatch. Prepared provider input contains the external prefix and ends at the exact synthetic unpersisted `[Box N | Agent Response]\n` boundary. Recovery and restart preserve Durable Turn's complete-history fresh-thread replay and same-thread delta behavior.

An active-turn mailbox flush uses the public `prepare_mailbox_flush`, `prepared_input`, and `commit_mailbox_flush` APIs. The session actor commits the prepared frontier only after adapter success. Committing an active-turn mailbox flush does not independently schedule redundant inference.

The package reexports the canonical `BoxId` from chat state without changing durable-state behavior. The session actor owns asynchronous channels, provider effects, WebSearch tasks, and search-aware final authorization release. This package changes no persistence format, provider protocol, HTTP API, migration, daemon composition, authorization policy, or public Main Actor contract.