antechamber 1.0.1 → 1.0.2
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
|
@@ -7,6 +7,13 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.0.2] - 2026-10-20
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Restore main-session costs before listing sessions after a restart, and keep live usage totals cumulative
|
|
15
|
+
across assistant steps.
|
|
16
|
+
|
|
10
17
|
## [1.0.1] - 2026-10-20
|
|
11
18
|
|
|
12
19
|
### Added
|
package/dist/sessions.d.ts
CHANGED
|
@@ -119,6 +119,7 @@ export declare class SessionManager {
|
|
|
119
119
|
* global/recent view; `list(directory)` stays the per-project source of truth.
|
|
120
120
|
*/
|
|
121
121
|
listAll(): OCSession[];
|
|
122
|
+
private sessionInfo;
|
|
122
123
|
get(sessionId: string): ManagedSession | undefined;
|
|
123
124
|
remove(sessionId: string): Promise<boolean>;
|
|
124
125
|
private removeLive;
|
package/dist/sessions.js
CHANGED
|
@@ -312,10 +312,10 @@ export class SessionManager {
|
|
|
312
312
|
this.subagents.restoreAll();
|
|
313
313
|
if (directory !== undefined) {
|
|
314
314
|
this.ensureScanned(directory);
|
|
315
|
-
return [...this.sessions.values()].
|
|
315
|
+
return [...this.sessions.values()].filter((s) => s.info.directory === directory).map((s) => this.sessionInfo(s));
|
|
316
316
|
}
|
|
317
317
|
// Unfiltered: keep the old semantics — live sessions only.
|
|
318
|
-
return [...this.sessions.values()].filter((s) => s.restored === undefined).map((s) => s
|
|
318
|
+
return [...this.sessions.values()].filter((s) => s.restored === undefined).map((s) => this.sessionInfo(s));
|
|
319
319
|
}
|
|
320
320
|
/**
|
|
321
321
|
* Every restorable session on disk (all directories) plus live ones. Backs the
|
|
@@ -326,7 +326,12 @@ export class SessionManager {
|
|
|
326
326
|
this.refreshNativeTitles();
|
|
327
327
|
this.ensureAllScanned();
|
|
328
328
|
this.subagents.restoreAll();
|
|
329
|
-
return [...this.sessions.values()].map((s) => s
|
|
329
|
+
return [...this.sessions.values()].map((s) => this.sessionInfo(s));
|
|
330
|
+
}
|
|
331
|
+
sessionInfo(s) {
|
|
332
|
+
if (s.restored !== undefined)
|
|
333
|
+
this.ensureMessages(s);
|
|
334
|
+
return s.info;
|
|
330
335
|
}
|
|
331
336
|
get(sessionId) {
|
|
332
337
|
if (this.disposed)
|
|
@@ -334,9 +339,13 @@ export class SessionManager {
|
|
|
334
339
|
const live = this.sessions.get(sessionId);
|
|
335
340
|
if (live !== undefined) {
|
|
336
341
|
this.refreshNativeTitles();
|
|
342
|
+
this.sessionInfo(live);
|
|
337
343
|
return live;
|
|
338
344
|
}
|
|
339
|
-
|
|
345
|
+
const restored = this.subagents.restore(sessionId) ?? this.resolveRestored(sessionId);
|
|
346
|
+
if (restored !== undefined)
|
|
347
|
+
this.sessionInfo(restored);
|
|
348
|
+
return restored;
|
|
340
349
|
}
|
|
341
350
|
async remove(sessionId) {
|
|
342
351
|
return this.lifecycle.run(() => this.removeLive(sessionId));
|
package/dist/v2.js
CHANGED
|
@@ -282,6 +282,15 @@ export class V2EventTranslator {
|
|
|
282
282
|
? [this.frame(directory, "session.metadata.updated", { sessionID: info.id, metadata: info.metadata })]
|
|
283
283
|
: []),
|
|
284
284
|
this.frame(directory, "session.agent.selected", { sessionID: info.id, agent: info.agent ?? getAgentName() }),
|
|
285
|
+
...(info.cost !== undefined
|
|
286
|
+
? [
|
|
287
|
+
this.frame(directory, "session.usage.updated", {
|
|
288
|
+
sessionID: info.id,
|
|
289
|
+
cost: info.cost,
|
|
290
|
+
tokens: info.tokens ?? zeroTokens(),
|
|
291
|
+
}),
|
|
292
|
+
]
|
|
293
|
+
: []),
|
|
285
294
|
];
|
|
286
295
|
}
|
|
287
296
|
case "session.diff":
|
|
@@ -462,7 +471,6 @@ export class V2EventTranslator {
|
|
|
462
471
|
return [];
|
|
463
472
|
st.ended = true;
|
|
464
473
|
return [
|
|
465
|
-
this.frame(directory, "session.usage.updated", { sessionID: st.sessionID, cost: st.cost, tokens: st.tokens }),
|
|
466
474
|
st.finish === "error"
|
|
467
475
|
? this.frame(directory, "session.step.failed", {
|
|
468
476
|
sessionID: st.sessionID,
|