session-steward 0.4.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 +15 -0
- package/README.md +13 -0
- package/bin/session-steward-cli.mjs +14 -0
- package/dist/assets/index-B6C5qvGV.js +9 -0
- package/dist/assets/index-B8U6eLCA.css +2 -0
- package/dist/index.html +2 -2
- package/lib/cli.mjs +134 -2
- package/lib/providers/claude-code/events.mjs +498 -0
- package/lib/providers/claude-code/index.mjs +2 -0
- package/lib/providers/codex/events.mjs +731 -0
- package/lib/providers/codex/index.mjs +2 -0
- package/lib/server.mjs +62 -1
- package/lib/session-event-reader.mjs +126 -0
- package/lib/session-events.mjs +307 -0
- package/lib/storage/jsonl.mjs +148 -0
- package/package.json +6 -2
- package/dist/assets/index-BQ6SUqXr.css +0 -2
- package/dist/assets/index-QhQbSn0H.js +0 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
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
|
+
|
|
3
18
|
## [0.4.0] - 2026-08-04
|
|
4
19
|
|
|
5
20
|
### Added
|
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ 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
|
|
|
@@ -150,6 +151,18 @@ session-steward-cli --workspace /path/to/project
|
|
|
150
151
|
|
|
151
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.
|
|
152
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
|
+
|
|
153
166
|
The interactive terminal accepts the same filters:
|
|
154
167
|
|
|
155
168
|
```text
|
|
@@ -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,
|