session-steward 0.3.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.0] - 2026-08-10
4
+
5
+ ### Added
6
+
7
+ - A session timeline. Opening a session now shows what actually happened inside it: what you asked, what the assistant concluded, which files it changed, and which commands it ran along with whether they succeeded. Deciding whether a large session is worth keeping no longer means guessing from a size and a date.
8
+ - The same timeline in the terminal through `--events`, shown when you inspect a session, or attached to every record under `--json` for other tools to read.
9
+ - Coverage on every timeline: how much of a transcript Session Steward recognized, and which kinds of records it did not. If a future Codex or Claude release changes its transcript format, an incomplete timeline will say so rather than quietly looking complete.
10
+
11
+ ### Changed
12
+
13
+ - Timelines are read on demand and never stored, cached, or indexed. Nothing is written to your Codex or Claude folders, so reading a session cannot alter it.
14
+ - Reading a transcript costs the same memory whether it is one megabyte or several hundred. Unusually large records are counted and passed over instead of loaded, and a session that is still being written is read up to a fixed point rather than chased as it grows.
15
+ - Sessions with nothing to show now explain which case applies — the transcript file is gone, no transcript was ever recorded, or nothing in it was recognized — instead of appearing empty for no stated reason.
16
+ - Sessions recorded twice by Codex under different internal envelopes are shown once, without dropping messages that appear in only one of them.
17
+
18
+ ## [0.4.0] - 2026-08-04
19
+
20
+ ### Added
21
+
22
+ - Support for versioned Codex state, log, memory, and goal databases, including old and new stores that coexist after a migration.
23
+ - Permanent Codex and Claude layout fixtures, cross-store cleanup coverage, and a two-store scale benchmark.
24
+ - Storage provenance in recovery manifests while retaining restore support for backups from 0.3.0.
25
+
26
+ ### Changed
27
+
28
+ - Codex sessions from every recognized state store now share one deduplicated, globally sorted, paginated list.
29
+ - Compatibility states now describe capability as ready, partial, or unsupported.
30
+ - Codex continues with reduced metadata when optional fields or relationship tables are unavailable.
31
+ - Claude thorough cleanup leaves unrecognized locations untouched, reports them clearly, and remains available when its required projects folder is readable.
32
+
3
33
  ## [0.3.0] - 2026-08-03
4
34
 
5
35
  ### Added
@@ -51,6 +81,7 @@
51
81
  - Support for custom Codex home folders and a saved folder preference.
52
82
  - Streaming and bounded-memory discovery for large session collections and transcripts.
53
83
 
84
+ [0.4.0]: https://github.com/mallikcheripally/session-steward/compare/v0.3.0...v0.4.0
54
85
  [0.3.0]: https://github.com/mallikcheripally/session-steward/compare/v0.2.0...v0.3.0
55
86
  [0.2.0]: https://github.com/mallikcheripally/session-steward/compare/v0.1.1...v0.2.0
56
87
  [0.1.1]: https://github.com/mallikcheripally/session-steward/compare/v0.1.0...v0.1.1
package/README.md CHANGED
@@ -20,21 +20,10 @@ Session Steward makes session cleanup safer by finding those records, showing wh
20
20
  - Find sessions inactive for 30, 60, or 90 days.
21
21
  - Filter active or archived sessions by workspace, name, or session ID.
22
22
  - Inspect session details and affected records before deletion.
23
+ - Read a session timeline of what you asked, what changed, and which commands ran.
23
24
  - Choose standard or thorough cleanup.
24
25
  - Use custom Codex or Claude home folders across browser and terminal sessions.
25
26
 
26
- ## Built for large session libraries
27
-
28
- Current synthetic benchmarks on an arm64 Mac with Node.js 24.15.0:
29
-
30
- | Scenario | Scale | Time | Measured memory growth |
31
- | --- | ---: | ---: | ---: |
32
- | Paginated session listing | 50,003 sessions | 26 ms | 0.16 MB heap |
33
- | Session size index | 20,003 sessions | 85 ms cold, 9.7 ms warm | 30 MB peak RSS |
34
- | Transcript-only discovery | 5,003 sessions | 662 ms | 4.02 MB heap |
35
-
36
- Results vary with hardware, disk speed, and session layout. The benchmark commands are included in the repository and use temporary synthetic data.
37
-
38
27
  ## Safe by default
39
28
 
40
29
  - Cleanup happens entirely on your computer.
@@ -162,6 +151,18 @@ session-steward-cli --workspace /path/to/project
162
151
 
163
152
  Use `--include-internals` to include subagents and `--include-supporting` to include supporting sessions. Session sizes are shown in the interactive list, and `--sort size` places the largest sessions first.
164
153
 
154
+ Start with `--events` to read what happened inside a session — what you asked, what the assistant concluded, which files changed, and which commands ran or failed. In the interactive list, `inspect <number>` then shows that session's timeline:
155
+
156
+ ```bash
157
+ session-steward-cli --events --events-limit 50
158
+ ```
159
+
160
+ With `--json`, each session carries its own `events`, plus a `coverage` summary of how much of the transcript was recognized:
161
+
162
+ ```bash
163
+ session-steward-cli --json --limit 5 --events
164
+ ```
165
+
165
166
  The interactive terminal accepts the same filters:
166
167
 
167
168
  ```text
@@ -244,7 +245,19 @@ npm test
244
245
  npm run build
245
246
  ```
246
247
 
247
- Scale benchmarks are also available:
248
+ ## Performance and scale
249
+
250
+ Session Steward uses paginated listings, incremental transcript reads, and bounded caches to remain responsive with large session libraries.
251
+
252
+ Current synthetic benchmarks on an arm64 Mac with Node.js 24.15.0:
253
+
254
+ | Scenario | Scale | Time | Measured memory growth |
255
+ | --- | ---: | ---: | ---: |
256
+ | Paginated session listing | 50,003 sessions | 26 ms | 0.16 MB heap |
257
+ | Session size index | 20,003 sessions | 85 ms cold, 9.7 ms warm | 30 MB peak RSS |
258
+ | Transcript-only discovery | 5,003 sessions | 662 ms | 4.02 MB heap |
259
+
260
+ Run the scale benchmarks with:
248
261
 
249
262
  ```bash
250
263
  npm run benchmark:scale
@@ -254,7 +267,7 @@ npm run benchmark:discovery
254
267
  npm run benchmark:transcripts
255
268
  ```
256
269
 
257
- Tests and benchmarks use temporary synthetic session data. They do not read or modify your local sessions.
270
+ Results vary with hardware, disk speed, and session layout. Tests and benchmarks use temporary synthetic data and do not read or modify your local sessions.
258
271
 
259
272
  ## Support
260
273
 
@@ -26,6 +26,12 @@ const { values } = parseArgs({
26
26
  cleanup: {
27
27
  type: "string",
28
28
  },
29
+ events: {
30
+ type: "boolean",
31
+ },
32
+ "events-limit": {
33
+ type: "string",
34
+ },
29
35
  help: {
30
36
  short: "h",
31
37
  type: "boolean",
@@ -67,6 +73,9 @@ const numericLimit =
67
73
  values.limit && Number.isFinite(Number.parseInt(values.limit, 10))
68
74
  ? Number.parseInt(values.limit, 10)
69
75
  : null;
76
+ const eventsLimit = values["events-limit"] === undefined
77
+ ? 100
78
+ : Number(values["events-limit"]);
70
79
 
71
80
  async function main() {
72
81
  const help = values.help ?? false;
@@ -86,11 +95,16 @@ async function main() {
86
95
  });
87
96
  }
88
97
  const providerHome = settings.getHome(providerId);
98
+ if (!Number.isSafeInteger(eventsLimit) || eventsLimit < 1 || eventsLimit > 1_000) {
99
+ throw new Error("Events limit must be between 1 and 1000.");
100
+ }
89
101
 
90
102
  await runCli({
91
103
  archiveStatus: values["archive-status"],
92
104
  backups: values.backups ?? false,
93
105
  cleanup: values.cleanup,
106
+ events: values.events ?? false,
107
+ eventsLimit,
94
108
  help,
95
109
  inactiveDays: values["inactive-days"],
96
110
  includeInternals: values["include-internals"] ?? false,