@adhdev/daemon-standalone 0.9.82-rc.405 → 0.9.82-rc.406

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/index.js CHANGED
@@ -30127,10 +30127,10 @@ var require_dist3 = __commonJS({
30127
30127
  }
30128
30128
  function getDaemonBuildInfo() {
30129
30129
  if (cached2) return cached2;
30130
- const commit = readInjected(true ? "4e4b5f468d194f630073a66359898bce97fadf4b" : void 0) ?? "unknown";
30131
- const commitShort = readInjected(true ? "4e4b5f46" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30132
- const version2 = readInjected(true ? "0.9.82-rc.405" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30133
- const builtAt = readInjected(true ? "2026-06-28T03:55:26.092Z" : void 0);
30130
+ const commit = readInjected(true ? "1a663e37a08bce5e83cc14be4663d33ad60e81c9" : void 0) ?? "unknown";
30131
+ const commitShort = readInjected(true ? "1a663e37" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30132
+ const version2 = readInjected(true ? "0.9.82-rc.406" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30133
+ const builtAt = readInjected(true ? "2026-06-28T04:52:54.674Z" : void 0);
30134
30134
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30135
30135
  return cached2;
30136
30136
  }
@@ -49493,6 +49493,13 @@ ${cont}` : cont;
49493
49493
  // queued in pendingOutbound and only flushed asynchronously after idle), so the
49494
49494
  // completion event carries the correct id instead of the racy session scalar.
49495
49495
  currentTurnTaskId = null;
49496
+ // GENERATING-BOUNDARY (R4d): wall-clock when the most recently STARTED turn began
49497
+ // (set by onTurnStarted, persists past completion until the next turn starts).
49498
+ // The startup-grace idle-stayed synthesis anchors its window on when the FIRST turn
49499
+ // STARTED — not on when it finished — so a turn dispatched a few seconds after the
49500
+ // grace collapse and then running for a non-trivial duration is still attributed to
49501
+ // the startup collapse even though its COMPLETION lands past a now-anchored window.
49502
+ currentTurnStartedAt = 0;
49496
49503
  activeModal = null;
49497
49504
  // ── Approval ─────────────────────────────────────
49498
49505
  lastApprovalResolvedAt = 0;
@@ -49603,6 +49610,7 @@ ${cont}` : cont;
49603
49610
  this.clearIdleFinishCandidate("send_message");
49604
49611
  this.currentTurnScope = turnScope;
49605
49612
  this.currentTurnTaskId = typeof turnScope.taskId === "string" && turnScope.taskId.trim() ? turnScope.taskId : null;
49613
+ this.currentTurnStartedAt = Date.now();
49606
49614
  this.responseEpoch += 1;
49607
49615
  }
49608
49616
  /** Called when PTY exits */
@@ -52080,6 +52088,13 @@ ${lastSnapshot}`;
52080
52088
  get currentTurnTaskId() {
52081
52089
  return this.engine.currentTurnTaskId;
52082
52090
  }
52091
+ // R4d: wall-clock when the most recently started turn began (persists past settle).
52092
+ // The provider instance's startup-grace idle-stayed synthesis anchors its window on
52093
+ // this so a delayed-dispatch first turn whose duration overruns the now-anchored
52094
+ // window is still attributed to the startup collapse.
52095
+ get currentTurnStartedAt() {
52096
+ return this.engine.currentTurnStartedAt;
52097
+ }
52083
52098
  get responseEpoch() {
52084
52099
  return this.engine.responseEpoch;
52085
52100
  }
@@ -71010,7 +71025,11 @@ ${body}
71010
71025
  }
71011
71026
  this.lastStatus = newStatus;
71012
71027
  }
71013
- if (newStatus === "idle" && previousStatus === "idle" && this.startupGraceCollapseAt !== null && now - this.startupGraceCollapseAt < STARTUP_GRACE_IDLE_COLLAPSE_WINDOW_MS) {
71028
+ const firstTurnStartedAt = typeof this.adapter?.currentTurnStartedAt === "number" ? this.adapter.currentTurnStartedAt : 0;
71029
+ const collapsedAt = this.startupGraceCollapseAt;
71030
+ const turnStartedWithinCollapseWindow = collapsedAt !== null && firstTurnStartedAt > 0 && firstTurnStartedAt >= collapsedAt && firstTurnStartedAt - collapsedAt < STARTUP_GRACE_IDLE_COLLAPSE_WINDOW_MS;
71031
+ const nowWithinCollapseWindow = collapsedAt !== null && now - collapsedAt < STARTUP_GRACE_IDLE_COLLAPSE_WINDOW_MS;
71032
+ if (newStatus === "idle" && previousStatus === "idle" && (turnStartedWithinCollapseWindow || nowWithinCollapseWindow)) {
71014
71033
  this.maybeSynthesizeStartupGraceCollapse(chatTitle, now, "startup_grace_idle_turn_collapse");
71015
71034
  }
71016
71035
  if (newStatus === "idle" && adapterStatus.fsmReadySeen === true && !this.agentReadyEmitted) {