antechamber 2.0.14 → 2.0.16

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,20 @@ and this project uses [Semantic Versioning](https://semver.org/).
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [2.0.16] - 2026-11-23
11
+
12
+ ### Changed
13
+
14
+ - OmO 5.1.81 (engine senpi 2026.11.19-5), up from 5.1.69.
15
+
16
+ ## [2.0.15] - 2026-11-23
17
+
18
+ ### Fixed
19
+
20
+ - Subagent sessions whose parent session was deleted or never saved no longer show up in OpenChamber as top-level
21
+ sessions that only say "Full transcript is unavailable". The registry kept their rows, and every session list
22
+ rebuilt them without checking that the parent still existed.
23
+
10
24
  ## [2.0.14] - 2026-11-23
11
25
 
12
26
  - refactor: consolidate shared guards, extract instruction delivery, gate dead code with knip (#107)
package/dist/sessions.js CHANGED
@@ -83,7 +83,7 @@ export class SessionManager {
83
83
  this.defaultDirectory = defaultDirectory;
84
84
  this.store = store ?? new SessionStore();
85
85
  this.lifecycle = new SessionLifecycle(() => this.sessions.values(), lifecycleOptions);
86
- this.subagents = new SubagentBridge(this.store, this.sessions, this.emit, (session, raw) => parsePiSessionText(session, getAgentName(), raw));
86
+ this.subagents = new SubagentBridge(this.store, this.sessions, this.emit, (session, raw) => parsePiSessionText(session, getAgentName(), raw), (directory) => this.ensureScanned(directory));
87
87
  this.monitors = new MonitorSessions(this.sessions, this.emit);
88
88
  this.workStatus = new WorkStatusBridge(this.monitors);
89
89
  this.shells = new OmoShells(this.sessions, this.monitors, this.workStatus, this.emit);
@@ -1706,7 +1706,8 @@ export class SessionManager {
1706
1706
  /** Resolve a bare session id (e.g. deep link after restart) via known directories. */
1707
1707
  resolveRestored(sessionId) {
1708
1708
  const reg = this.store.get(sessionId);
1709
- if (reg?.deleted)
1709
+ // A child row's piPath is the adapter's own archive; only the subagent bridge may restore it.
1710
+ if (reg?.deleted || reg?.task)
1710
1711
  return undefined;
1711
1712
  if (reg && existsSync(reg.piPath)) {
1712
1713
  return this.adopt({
@@ -48,10 +48,14 @@ export declare class SubagentBridge {
48
48
  private readonly sessions;
49
49
  private readonly emit;
50
50
  private readonly parse;
51
+ /** Adopts the pi sessions on disk for a directory, so an unscanned root parent is found before a child is hidden. */
52
+ private readonly scanDirectory;
51
53
  private readonly children;
52
54
  private readonly calls;
53
55
  private readonly removed;
54
- constructor(store: SessionStore, sessions: Map<string, ManagedSession>, emit: (directory: string, event: OCEvent) => void, parse: ParseHistory);
56
+ constructor(store: SessionStore, sessions: Map<string, ManagedSession>, emit: (directory: string, event: OCEvent) => void, parse: ParseHistory,
57
+ /** Adopts the pi sessions on disk for a directory, so an unscanned root parent is found before a child is hidden. */
58
+ scanDirectory?: (directory: string) => void);
55
59
  private archive;
56
60
  private sessionId;
57
61
  wire(parent: ManagedSession): void;
@@ -75,6 +79,12 @@ export declare class SubagentBridge {
75
79
  private discoverParts;
76
80
  private create;
77
81
  restore(id: string): ManagedSession | undefined;
82
+ /**
83
+ * A registry child outlives a parent that was deleted or never saved, and OpenChamber would then list it as a
84
+ * root holding only the "Full transcript is unavailable" fallback. A parent exists when it is loaded, registered
85
+ * and not deleted (a nested child's own parent chain counts the same way), or a pi session on disk.
86
+ */
87
+ private parentExists;
78
88
  /**
79
89
  * Tasks spawned outside a `task` tool call (e.g. `agent()` inside an `eval`
80
90
  * cell) never produce a card, so their session is built from the task record.
package/dist/subagents.js CHANGED
@@ -470,14 +470,18 @@ export class SubagentBridge {
470
470
  sessions;
471
471
  emit;
472
472
  parse;
473
+ scanDirectory;
473
474
  children = new Map();
474
475
  calls = new Map();
475
476
  removed = new Set();
476
- constructor(store, sessions, emit, parse) {
477
+ constructor(store, sessions, emit, parse,
478
+ /** Adopts the pi sessions on disk for a directory, so an unscanned root parent is found before a child is hidden. */
479
+ scanDirectory = () => { }) {
477
480
  this.store = store;
478
481
  this.sessions = sessions;
479
482
  this.emit = emit;
480
483
  this.parse = parse;
484
+ this.scanDirectory = scanDirectory;
481
485
  }
482
486
  archive(child) {
483
487
  const previous = this.store.get(child.session.info.id)?.piPath;
@@ -662,12 +666,34 @@ export class SubagentBridge {
662
666
  return this.removed.has(id) ? undefined : this.adopt(id);
663
667
  if (entry.deleted || !entry.task || !entry.parentID)
664
668
  return undefined;
669
+ if (!this.parentExists(entry.parentID, entry.directory))
670
+ return undefined;
665
671
  const child = this.create(this.detachedParent(entry.parentID, entry.directory, entry), entry.task, id);
666
672
  child.session.info.title = entry.title ?? child.session.info.title;
667
673
  this.refresh(child, false, true, false);
668
674
  return child.session;
669
675
  });
670
676
  }
677
+ /**
678
+ * A registry child outlives a parent that was deleted or never saved, and OpenChamber would then list it as a
679
+ * root holding only the "Full transcript is unavailable" fallback. A parent exists when it is loaded, registered
680
+ * and not deleted (a nested child's own parent chain counts the same way), or a pi session on disk.
681
+ */
682
+ parentExists(id, directory, seen = new Set()) {
683
+ if (this.sessions.has(id))
684
+ return true;
685
+ const entry = this.store.get(id);
686
+ if (entry === undefined) {
687
+ this.scanDirectory(directory);
688
+ return this.sessions.has(id);
689
+ }
690
+ if (entry.deleted || seen.has(id))
691
+ return false;
692
+ if (!entry.task || !entry.parentID)
693
+ return true;
694
+ seen.add(id);
695
+ return this.parentExists(entry.parentID, entry.directory, seen);
696
+ }
671
697
  /**
672
698
  * Tasks spawned outside a `task` tool call (e.g. `agent()` inside an `eval`
673
699
  * cell) never produce a card, so their session is built from the task record.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber-openchamber",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "OpenChamber extension for antechamber: installs and pins the antechamber server and OmO, draws the OmO Graph and the OmO Work section, and titles OmO tool cards",
5
5
  "private": true,
6
6
  "type": "module",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "antechamber",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "OpenCode-compatible HTTP/SSE server that lets OpenChamber drive the pi coding agent (and OmO) over RPC",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -88,7 +88,7 @@
88
88
  "typescript": "^7.0.2"
89
89
  },
90
90
  "dependencies": {
91
- "omo-ai": "5.1.69"
91
+ "omo-ai": "5.1.81"
92
92
  },
93
93
  "openchamber": {
94
94
  "apiVersion": 1,