Skip to main content

Module ids

Module ids 

Source
Expand description

Typed ThreadId / SessionId for the crates/core boundary (issue #5261).

codewhale’s Session is really a thread. The new boundary introduces two ids so every consumer — TUI, CLI, app-server, tests — can name the right scope:

  • ThreadId — long-lived conversation (persisted in state.json / threads/)
  • SessionId — one turn/session within a thread (ephemeral engine handle)

Both are thin wrappers around the existing "thread-…" string id so the persisted JSON shape stays unchanged. They serialize as plain strings, deserialize from plain strings or { "id": "…" }, and parse from either.

Structs§

SessionId
One engine session within a thread (a single Op turn or a supervised engine lifetime). Distinct from ThreadId so the thread manager can start a session with no TUI attached and so tests can assert headless == TUI byte-identical requests for the same ThreadId + SessionId pair.
ThreadId
Long-lived conversation id. Backwards compatible with the existing thread-{uuid} string form used in crates/state and runtime_threads.