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 instate.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§
- Session
Id - One engine session within a thread (a single
Opturn or a supervised engine lifetime). Distinct fromThreadIdso the thread manager can start a session with no TUI attached and so tests can assert headless == TUI byte-identical requests for the sameThreadId+SessionIdpair. - Thread
Id - Long-lived conversation id. Backwards compatible with the existing
thread-{uuid}string form used incrates/stateandruntime_threads.