antechamber 0.2.29 → 0.2.31
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 +12 -0
- package/dist/sessions.d.ts +1 -0
- package/dist/sessions.js +26 -2
- package/extensions/omo-compat/package.json +1 -1
- package/extensions/omo-dag/package.json +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project uses [Semantic Versioning](https://semver.org/).
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.31] - 2026-10-19
|
|
11
|
+
|
|
12
|
+
- fix(session): refresh dormant history after external appends (#39)
|
|
13
|
+
|
|
14
|
+
## [0.2.30] - 2026-10-19
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- Preserve archived and nested task children in replay sandboxes, with transcript and task session paths
|
|
19
|
+
remapped locally, so child history and costs are not lost when replaying selected roots.
|
|
20
|
+
- Refresh dormant conversation history when another client appends messages or tool results after it was opened.
|
|
21
|
+
|
|
10
22
|
## [0.2.29] - 2026-10-19
|
|
11
23
|
|
|
12
24
|
### Fixed
|
package/dist/sessions.d.ts
CHANGED
|
@@ -39,6 +39,7 @@ export interface ManagedSession extends ThinkingState {
|
|
|
39
39
|
unwirePi?: () => void;
|
|
40
40
|
/** undefined for dormant sessions until history is parsed from the JSONL. */
|
|
41
41
|
messages: OCMessageWithParts[] | undefined;
|
|
42
|
+
historyFileSize?: number;
|
|
42
43
|
/** Adapter-authored notices/errors remain local; persisted shell cards can be bound. */
|
|
43
44
|
localMessageIds?: Set<string>;
|
|
44
45
|
status: OCSessionStatus;
|
package/dist/sessions.js
CHANGED
|
@@ -1187,12 +1187,21 @@ export class SessionManager {
|
|
|
1187
1187
|
return this.subagents.messages(s.info.id);
|
|
1188
1188
|
if (this.monitors.owns(s.info.id))
|
|
1189
1189
|
return this.monitors.messages(s.info.id);
|
|
1190
|
+
if (s.pi !== undefined)
|
|
1191
|
+
delete s.historyFileSize;
|
|
1192
|
+
const dormantPath = s.pi === undefined ? s.restored?.piPath : undefined;
|
|
1193
|
+
const fileSize = dormantPath === undefined ? undefined : statSync(dormantPath, { throwIfNoEntry: false })?.size;
|
|
1194
|
+
const cachedFileSize = s.historyFileSize ?? s.tree.fileSize;
|
|
1195
|
+
if (s.messages !== undefined && fileSize !== undefined && fileSize !== cachedFileSize)
|
|
1196
|
+
return this.refreshMessageCache(s, true);
|
|
1190
1197
|
if (s.messages === undefined) {
|
|
1191
1198
|
// A dormant session may have been continued by another OmO client since the last save.
|
|
1192
1199
|
if (s.pi === undefined && s.restored !== undefined)
|
|
1193
1200
|
followExternalAppends(s, s.restored.piPath);
|
|
1194
1201
|
const admissions = s.tree.localShellTurns?.length;
|
|
1195
1202
|
s.messages = parsePiSessionFile(s, getAgentName());
|
|
1203
|
+
if (fileSize !== undefined)
|
|
1204
|
+
s.historyFileSize = fileSize;
|
|
1196
1205
|
this.subagents.discover(s, s.messages);
|
|
1197
1206
|
if (admissions)
|
|
1198
1207
|
this.persistMeta(s);
|
|
@@ -1201,10 +1210,25 @@ export class SessionManager {
|
|
|
1201
1210
|
}
|
|
1202
1211
|
return s.messages;
|
|
1203
1212
|
}
|
|
1204
|
-
refreshMessageCache(s) {
|
|
1213
|
+
refreshMessageCache(s, replaceNative = false) {
|
|
1205
1214
|
const previous = s.messages ?? [];
|
|
1206
1215
|
s.messages = undefined;
|
|
1207
|
-
const
|
|
1216
|
+
const native = this.ensureMessages(s);
|
|
1217
|
+
if (replaceNative) {
|
|
1218
|
+
// Legacy compaction IDs can collide; retain every parsed native row.
|
|
1219
|
+
let index = 0;
|
|
1220
|
+
for (const message of previous) {
|
|
1221
|
+
let next = index;
|
|
1222
|
+
while (next < native.length && native[next]?.info.id !== message.info.id)
|
|
1223
|
+
next++;
|
|
1224
|
+
if (next < native.length)
|
|
1225
|
+
index = next + 1;
|
|
1226
|
+
else if (s.tree.messageEntries[message.info.id] === undefined)
|
|
1227
|
+
native.splice(index++, 0, message);
|
|
1228
|
+
}
|
|
1229
|
+
return native;
|
|
1230
|
+
}
|
|
1231
|
+
const parsed = new Map(native.map((message) => [message.info.id, message]));
|
|
1208
1232
|
s.messages = previous.flatMap((message) => {
|
|
1209
1233
|
const restored = parsed.get(message.info.id);
|
|
1210
1234
|
parsed.delete(message.info.id);
|