@songsid/agend 2.2.0-beta.13 → 2.2.0-beta.14

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/dist/daemon.d.ts CHANGED
@@ -1380,6 +1380,7 @@ export declare class Daemon extends EventEmitter {
1380
1380
  * every delivery parked behind it. It recovers when the backend sees its own live, EMPTY composer with no busy, queued
1381
1381
  * or dialog marker (isStableUnknownLayoutIdlePane) AND the transcript shows no open turn — or, with no transcript to
1382
1382
  * ask, that same composer held unchanged for UNKNOWN_LAYOUT_STABLE_MS (#978's rule). An open turn never recovers.
1383
+ * #1865: `hold` makes the closed-turn case wait out that window too (a `working` reading, recovered before the stuck deadline).
1383
1384
  */
1384
1385
  private recoverStuck;
1385
1386
  private replyCompletionGuardEnabled;
package/dist/daemon.js CHANGED
@@ -5336,8 +5336,9 @@ export class Daemon extends EventEmitter {
5336
5336
  * every delivery parked behind it. It recovers when the backend sees its own live, EMPTY composer with no busy, queued
5337
5337
  * or dialog marker (isStableUnknownLayoutIdlePane) AND the transcript shows no open turn — or, with no transcript to
5338
5338
  * ask, that same composer held unchanged for UNKNOWN_LAYOUT_STABLE_MS (#978's rule). An open turn never recovers.
5339
+ * #1865: `hold` makes the closed-turn case wait out that window too (a `working` reading, recovered before the stuck deadline).
5339
5340
  */
5340
- recoverStuck(pane, snapshot, changeAt, turn) {
5341
+ recoverStuck(pane, snapshot, changeAt, turn, hold = false) {
5341
5342
  const machine = this.instanceStateMachine;
5342
5343
  const idleComposer = this.backend?.isStableUnknownLayoutIdlePane?.(pane) === true;
5343
5344
  // The resume load (#1031: `Resuming session…` over the same composer) is input that is not open yet (#1641 R1).
@@ -5353,7 +5354,7 @@ export class Daemon extends EventEmitter {
5353
5354
  this.stuckRecoveryKey = key;
5354
5355
  this.stuckRecoverySince = mono;
5355
5356
  }
5356
- if (turn === "unknown" && mono - this.stuckRecoverySince < UNKNOWN_LAYOUT_STABLE_MS)
5357
+ if ((turn === "unknown" || hold) && mono - this.stuckRecoverySince < UNKNOWN_LAYOUT_STABLE_MS)
5357
5358
  return snapshot;
5358
5359
  // A footer this build cannot read stays unreadable: the same still pane reads stuck again at every sweep and is
5359
5360
  // recovered again. Only the edge into idle is news.
@@ -5922,6 +5923,13 @@ export class Daemon extends EventEmitter {
5922
5923
  }
5923
5924
  if (snapshot.state === "stuck")
5924
5925
  snapshot = this.recoverStuck(pane, snapshot, observedChangeAt, transcriptTurn);
5926
+ // #1865: a resumed codex can paint its footer without the Context item (sol after the beta.13 restart), so its
5927
+ // idle composer reads `working` for the whole stuck window. Its own rollout says no turn is open: the sweep needs
5928
+ // no deadline for that — the same composer held still for UNKNOWN_LAYOUT_STABLE_MS is enough.
5929
+ else if (snapshot.state === "working" && reason === "safety_sweep" && transcriptTurn === "closed"
5930
+ && this.backend?.binaryName === "codex") {
5931
+ snapshot = this.recoverStuck(pane, snapshot, observedChangeAt, transcriptTurn, true);
5932
+ }
5925
5933
  this.applyInstanceStateSnapshot(snapshot, pane);
5926
5934
  // Backends without a transcript feed can still say what they are doing, if
5927
5935
  // their TUI names it. Free-riding on a capture that already happened: no