@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
|
@@ -231,6 +231,7 @@ export declare class ProviderCliAdapter implements CliAdapter {
|
|
|
231
231
|
get currentTurnScope(): TurnParseScope | null;
|
|
232
232
|
set currentTurnScope(v: TurnParseScope | null);
|
|
233
233
|
get currentTurnTaskId(): string | null;
|
|
234
|
+
get currentTurnStartedAt(): number;
|
|
234
235
|
get responseEpoch(): number;
|
|
235
236
|
set responseEpoch(v: number);
|
|
236
237
|
get submitRetryUsed(): boolean;
|
package/dist/index.js
CHANGED
|
@@ -399,10 +399,10 @@ function readInjected(value) {
|
|
|
399
399
|
}
|
|
400
400
|
function getDaemonBuildInfo() {
|
|
401
401
|
if (cached) return cached;
|
|
402
|
-
const commit = readInjected(true ? "
|
|
403
|
-
const commitShort = readInjected(true ? "
|
|
404
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
405
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
402
|
+
const commit = readInjected(true ? "1a663e37a08bce5e83cc14be4663d33ad60e81c9" : void 0) ?? "unknown";
|
|
403
|
+
const commitShort = readInjected(true ? "1a663e37" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
404
|
+
const version = readInjected(true ? "0.9.82-rc.406" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
405
|
+
const builtAt = readInjected(true ? "2026-06-28T04:52:22.784Z" : void 0);
|
|
406
406
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
407
407
|
return cached;
|
|
408
408
|
}
|
|
@@ -19664,6 +19664,13 @@ var init_cli_state_engine = __esm({
|
|
|
19664
19664
|
// queued in pendingOutbound and only flushed asynchronously after idle), so the
|
|
19665
19665
|
// completion event carries the correct id instead of the racy session scalar.
|
|
19666
19666
|
currentTurnTaskId = null;
|
|
19667
|
+
// GENERATING-BOUNDARY (R4d): wall-clock when the most recently STARTED turn began
|
|
19668
|
+
// (set by onTurnStarted, persists past completion until the next turn starts).
|
|
19669
|
+
// The startup-grace idle-stayed synthesis anchors its window on when the FIRST turn
|
|
19670
|
+
// STARTED — not on when it finished — so a turn dispatched a few seconds after the
|
|
19671
|
+
// grace collapse and then running for a non-trivial duration is still attributed to
|
|
19672
|
+
// the startup collapse even though its COMPLETION lands past a now-anchored window.
|
|
19673
|
+
currentTurnStartedAt = 0;
|
|
19667
19674
|
activeModal = null;
|
|
19668
19675
|
// ── Approval ─────────────────────────────────────
|
|
19669
19676
|
lastApprovalResolvedAt = 0;
|
|
@@ -19774,6 +19781,7 @@ var init_cli_state_engine = __esm({
|
|
|
19774
19781
|
this.clearIdleFinishCandidate("send_message");
|
|
19775
19782
|
this.currentTurnScope = turnScope;
|
|
19776
19783
|
this.currentTurnTaskId = typeof turnScope.taskId === "string" && turnScope.taskId.trim() ? turnScope.taskId : null;
|
|
19784
|
+
this.currentTurnStartedAt = Date.now();
|
|
19777
19785
|
this.responseEpoch += 1;
|
|
19778
19786
|
}
|
|
19779
19787
|
/** Called when PTY exits */
|
|
@@ -22252,6 +22260,13 @@ ${lastSnapshot}`;
|
|
|
22252
22260
|
get currentTurnTaskId() {
|
|
22253
22261
|
return this.engine.currentTurnTaskId;
|
|
22254
22262
|
}
|
|
22263
|
+
// R4d: wall-clock when the most recently started turn began (persists past settle).
|
|
22264
|
+
// The provider instance's startup-grace idle-stayed synthesis anchors its window on
|
|
22265
|
+
// this so a delayed-dispatch first turn whose duration overruns the now-anchored
|
|
22266
|
+
// window is still attributed to the startup collapse.
|
|
22267
|
+
get currentTurnStartedAt() {
|
|
22268
|
+
return this.engine.currentTurnStartedAt;
|
|
22269
|
+
}
|
|
22255
22270
|
get responseEpoch() {
|
|
22256
22271
|
return this.engine.responseEpoch;
|
|
22257
22272
|
}
|
|
@@ -41365,7 +41380,11 @@ var CliProviderInstance = class _CliProviderInstance {
|
|
|
41365
41380
|
}
|
|
41366
41381
|
this.lastStatus = newStatus;
|
|
41367
41382
|
}
|
|
41368
|
-
|
|
41383
|
+
const firstTurnStartedAt = typeof this.adapter?.currentTurnStartedAt === "number" ? this.adapter.currentTurnStartedAt : 0;
|
|
41384
|
+
const collapsedAt = this.startupGraceCollapseAt;
|
|
41385
|
+
const turnStartedWithinCollapseWindow = collapsedAt !== null && firstTurnStartedAt > 0 && firstTurnStartedAt >= collapsedAt && firstTurnStartedAt - collapsedAt < STARTUP_GRACE_IDLE_COLLAPSE_WINDOW_MS;
|
|
41386
|
+
const nowWithinCollapseWindow = collapsedAt !== null && now - collapsedAt < STARTUP_GRACE_IDLE_COLLAPSE_WINDOW_MS;
|
|
41387
|
+
if (newStatus === "idle" && previousStatus === "idle" && (turnStartedWithinCollapseWindow || nowWithinCollapseWindow)) {
|
|
41369
41388
|
this.maybeSynthesizeStartupGraceCollapse(chatTitle, now, "startup_grace_idle_turn_collapse");
|
|
41370
41389
|
}
|
|
41371
41390
|
if (newStatus === "idle" && adapterStatus.fsmReadySeen === true && !this.agentReadyEmitted) {
|