Expand description
§K1 chat-thread session actor
§Public contract
open(adapter, key, session, kmap, web_search)retains its established behavior: it recovers one durable thread without Social or SetLaunchNode composition, spawns its serialized actor, and returns its command handle.open_with_social(adapter, key, session, kmap, social, web_search)retains its established behavior: it configureskcode-k1-ktool-social::SocialKtoolsthrough durable recovery without SetLaunchNode and otherwise uses the same actor spawn and lifecycle.open_with_social_and_set_launch_node(adapter, key, session, kmap, social, set_launch_node, web_search)additively configures Social andSetLaunchNodeKtoolthrough durable recovery.socialandset_launch_nodeare adjacent tokmap, before the configuredkcode-k1-codex-websearch::Runner.- Before WebSearch parsing or any other execution, every external Tool Call name is checked against the exact, case-sensitive KtoolDocs registry. An absent name durably receives its correlated Tool Result
Err("unknown Ktool"). Exact WebSearch alone uses the actor-owned asynchronous path; every other registered name delegates to Durable Thread, which gates it again. Configured SetLaunchNode executes synchronously through durable state; the two older composition modes preserve no SetLaunchNode execution. - The public inner Ktool is the strict object
WebSearch { query: string, model: string, reasoning_effort?: string }. Unknown fields, aliases, nulls, and nonstrings fail locally. The model must start with exact case-sensitivecodex/; the prefix is stripped once. Omitted effort becomesmedium; supplied strings pass unchanged. - Each accepted WebSearch Tool Call records its absolute 60-minute deadline before launch, runs once in the background, emits no progress messages, and later records exactly one correlated terminal Tool Result while this actor remains alive. Concurrent calls retain their original ToolCallId. Actor teardown or inference failure cancels all outstanding calls.
Handleretains the actor-channel contract.snapshot()retains its live snapshot, whilesnapshot_with_events()returns that snapshot with cloned durable events in recorded order.
The actor owns FIFO commands, Codex turn effects, managed runtime model-usage lifecycle, stage acknowledgements, restart generations, WebSearch task correlation, registry preflight, and teardown. Durable state owns canonical conversation transitions, persistence, and registered non-WebSearch Ktool dispatch. This package owns no persistence format, provider prompt, HTTP, migration, daemon composition, deployment, or progress-event surface.