@adhdev/daemon-core 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/cli-adapters/cli-state-engine.d.ts +1 -0
- package/dist/cli-adapters/provider-cli-adapter.d.ts +1 -0
- package/dist/index.js +24 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/cli-adapters/cli-state-engine.ts +10 -0
- package/src/cli-adapters/provider-cli-adapter.ts +5 -0
- package/src/providers/cli-provider-instance.ts +29 -3
package/dist/index.mjs
CHANGED
|
@@ -394,10 +394,10 @@ function readInjected(value) {
|
|
|
394
394
|
}
|
|
395
395
|
function getDaemonBuildInfo() {
|
|
396
396
|
if (cached) return cached;
|
|
397
|
-
const commit = readInjected(true ? "
|
|
398
|
-
const commitShort = readInjected(true ? "
|
|
399
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
400
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
397
|
+
const commit = readInjected(true ? "1a663e37a08bce5e83cc14be4663d33ad60e81c9" : void 0) ?? "unknown";
|
|
398
|
+
const commitShort = readInjected(true ? "1a663e37" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
399
|
+
const version = readInjected(true ? "0.9.82-rc.406" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
400
|
+
const builtAt = readInjected(true ? "2026-06-28T04:52:22.784Z" : void 0);
|
|
401
401
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
402
402
|
return cached;
|
|
403
403
|
}
|
|
@@ -19658,6 +19658,13 @@ var init_cli_state_engine = __esm({
|
|
|
19658
19658
|
// queued in pendingOutbound and only flushed asynchronously after idle), so the
|
|
19659
19659
|
// completion event carries the correct id instead of the racy session scalar.
|
|
19660
19660
|
currentTurnTaskId = null;
|
|
19661
|
+
// GENERATING-BOUNDARY (R4d): wall-clock when the most recently STARTED turn began
|
|
19662
|
+
// (set by onTurnStarted, persists past completion until the next turn starts).
|
|
19663
|
+
// The startup-grace idle-stayed synthesis anchors its window on when the FIRST turn
|
|
19664
|
+
// STARTED — not on when it finished — so a turn dispatched a few seconds after the
|
|
19665
|
+
// grace collapse and then running for a non-trivial duration is still attributed to
|
|
19666
|
+
// the startup collapse even though its COMPLETION lands past a now-anchored window.
|
|
19667
|
+
currentTurnStartedAt = 0;
|
|
19661
19668
|
activeModal = null;
|
|
19662
19669
|
// ── Approval ─────────────────────────────────────
|
|
19663
19670
|
lastApprovalResolvedAt = 0;
|
|
@@ -19768,6 +19775,7 @@ var init_cli_state_engine = __esm({
|
|
|
19768
19775
|
this.clearIdleFinishCandidate("send_message");
|
|
19769
19776
|
this.currentTurnScope = turnScope;
|
|
19770
19777
|
this.currentTurnTaskId = typeof turnScope.taskId === "string" && turnScope.taskId.trim() ? turnScope.taskId : null;
|
|
19778
|
+
this.currentTurnStartedAt = Date.now();
|
|
19771
19779
|
this.responseEpoch += 1;
|
|
19772
19780
|
}
|
|
19773
19781
|
/** Called when PTY exits */
|
|
@@ -22245,6 +22253,13 @@ ${lastSnapshot}`;
|
|
|
22245
22253
|
get currentTurnTaskId() {
|
|
22246
22254
|
return this.engine.currentTurnTaskId;
|
|
22247
22255
|
}
|
|
22256
|
+
// R4d: wall-clock when the most recently started turn began (persists past settle).
|
|
22257
|
+
// The provider instance's startup-grace idle-stayed synthesis anchors its window on
|
|
22258
|
+
// this so a delayed-dispatch first turn whose duration overruns the now-anchored
|
|
22259
|
+
// window is still attributed to the startup collapse.
|
|
22260
|
+
get currentTurnStartedAt() {
|
|
22261
|
+
return this.engine.currentTurnStartedAt;
|
|
22262
|
+
}
|
|
22248
22263
|
get responseEpoch() {
|
|
22249
22264
|
return this.engine.responseEpoch;
|
|
22250
22265
|
}
|
|
@@ -40984,7 +40999,11 @@ var CliProviderInstance = class _CliProviderInstance {
|
|
|
40984
40999
|
}
|
|
40985
41000
|
this.lastStatus = newStatus;
|
|
40986
41001
|
}
|
|
40987
|
-
|
|
41002
|
+
const firstTurnStartedAt = typeof this.adapter?.currentTurnStartedAt === "number" ? this.adapter.currentTurnStartedAt : 0;
|
|
41003
|
+
const collapsedAt = this.startupGraceCollapseAt;
|
|
41004
|
+
const turnStartedWithinCollapseWindow = collapsedAt !== null && firstTurnStartedAt > 0 && firstTurnStartedAt >= collapsedAt && firstTurnStartedAt - collapsedAt < STARTUP_GRACE_IDLE_COLLAPSE_WINDOW_MS;
|
|
41005
|
+
const nowWithinCollapseWindow = collapsedAt !== null && now - collapsedAt < STARTUP_GRACE_IDLE_COLLAPSE_WINDOW_MS;
|
|
41006
|
+
if (newStatus === "idle" && previousStatus === "idle" && (turnStartedWithinCollapseWindow || nowWithinCollapseWindow)) {
|
|
40988
41007
|
this.maybeSynthesizeStartupGraceCollapse(chatTitle, now, "startup_grace_idle_turn_collapse");
|
|
40989
41008
|
}
|
|
40990
41009
|
if (newStatus === "idle" && adapterStatus.fsmReadySeen === true && !this.agentReadyEmitted) {
|