|
|
@@ -79,9 +79,10 @@ export class Session {
|
|
|
/**
|
|
|
* Immutable creation metadata (format version, cwd, lineage). Supplied by
|
|
|
* the store via `ctx.sessions.create()`. When a `Session` is constructed
|
|
|
- * bare (tests, ad-hoc replay), a minimal v1 header is synthesized so
|
|
|
- * `session.header` is always present. Kept out of the event log — it is a
|
|
|
- * storage concern, not replayable conversation state.
|
|
|
+ * bare (tests, ad-hoc replay), a minimal header is synthesized (stamped with
|
|
|
+ * the current {@link SESSION_FORMAT_VERSION}) so `session.header` is always
|
|
|
+ * present. Kept out of the event log — it is a storage concern, not
|
|
|
+ * replayable conversation state.
|
|
|
*/
|
|
|
readonly header: SessionHeader
|
|
|
|
|
|
@@ -180,8 +181,7 @@ export class Session {
|
|
|
const messages: Message[] = []
|
|
|
for (const event of this.log) {
|
|
|
// Intentionally non-exhaustive: only message-producing events derive
|
|
|
- // history; turn/step boundaries, chunks, usage, and errors are
|
|
|
- // trace/replay data.
|
|
|
+ // history; turn/step boundaries and chunks are trace/replay data.
|
|
|
// eslint-disable-next-line @typescript-eslint/switch-exhaustiveness-check
|
|
|
switch (event.type) {
|
|
|
case 'user/message': {
|