@adhdev/daemon-standalone 0.9.82-rc.385 → 0.9.82-rc.386
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 +39 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30108,10 +30108,10 @@ var require_dist3 = __commonJS({
|
|
|
30108
30108
|
}
|
|
30109
30109
|
function getDaemonBuildInfo() {
|
|
30110
30110
|
if (cached2) return cached2;
|
|
30111
|
-
const commit = readInjected(true ? "
|
|
30112
|
-
const commitShort = readInjected(true ? "
|
|
30113
|
-
const version2 = readInjected(true ? "0.9.82-rc.
|
|
30114
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
30111
|
+
const commit = readInjected(true ? "fad1d175ca84a75f52bd0c1d88125fbb783ad241" : void 0) ?? "unknown";
|
|
30112
|
+
const commitShort = readInjected(true ? "fad1d175" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
30113
|
+
const version2 = readInjected(true ? "0.9.82-rc.386" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
30114
|
+
const builtAt = readInjected(true ? "2026-06-26T00:13:10.987Z" : void 0);
|
|
30115
30115
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
30116
30116
|
return cached2;
|
|
30117
30117
|
}
|
|
@@ -65849,6 +65849,17 @@ ${body}
|
|
|
65849
65849
|
hasIdleHoldPending() {
|
|
65850
65850
|
return (this.lastFsmEval?.transitions ?? []).some((t) => !t.holdSatisfied && t.condResult);
|
|
65851
65851
|
}
|
|
65852
|
+
/**
|
|
65853
|
+
* True once the machine has reached its first non-initial idle state (the
|
|
65854
|
+
* prompt is genuinely drawn — see maybeMarkReady). The cli-adapter surfaces
|
|
65855
|
+
* this on its idle status so CliProviderInstance can re-arm the queue-claim
|
|
65856
|
+
* agent:ready on the first genuine ready, independent of the boot-time
|
|
65857
|
+
* starting→idle one-shot (which is consumed too early for specs whose
|
|
65858
|
+
* initial state already reports idle).
|
|
65859
|
+
*/
|
|
65860
|
+
hasSeenReady() {
|
|
65861
|
+
return this.readySeenOnce;
|
|
65862
|
+
}
|
|
65852
65863
|
getCompletionIdleDebounceState() {
|
|
65853
65864
|
const out = outgoingTransitions(this.spec, this.currentStateId);
|
|
65854
65865
|
const toReady = this.lastFsmEval?.transitions.find((t, i) => {
|
|
@@ -67505,7 +67516,7 @@ ${body}
|
|
|
67505
67516
|
if (state.status === "generating") {
|
|
67506
67517
|
return { status: "generating", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt, ...sessionFields };
|
|
67507
67518
|
}
|
|
67508
|
-
return { status: "idle", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt, ...sessionFields };
|
|
67519
|
+
return { status: "idle", messages: [], activeModal: null, activeInteractivePrompt: this.activeInteractivePrompt, fsmReadySeen: this.driver.hasSeenReady?.() ?? false, ...sessionFields };
|
|
67509
67520
|
}
|
|
67510
67521
|
maybeRefreshNativeHistory() {
|
|
67511
67522
|
}
|
|
@@ -68538,6 +68549,14 @@ ${body}
|
|
|
68538
68549
|
context = null;
|
|
68539
68550
|
events = [];
|
|
68540
68551
|
lastStatus = "starting";
|
|
68552
|
+
// Idempotency guard for the queue-claim agent:ready event. agent:ready is the
|
|
68553
|
+
// sole signal the mesh coordinator's tryAssignQueueTask waits on to hand a
|
|
68554
|
+
// queued task to this worker. It is emitted in two places: the boot-time
|
|
68555
|
+
// starting→idle one-shot, and the readySeen re-arm below. This flag makes the
|
|
68556
|
+
// event fire AT MOST ONCE per session so a worker is never claimed twice and a
|
|
68557
|
+
// queued task is never double-dispatched/double-injected. Whichever path fires
|
|
68558
|
+
// first sets it; the other becomes a no-op.
|
|
68559
|
+
agentReadyEmitted = false;
|
|
68541
68560
|
generatingStartedAt = 0;
|
|
68542
68561
|
settings = {};
|
|
68543
68562
|
monitor;
|
|
@@ -69618,6 +69637,17 @@ ${body}
|
|
|
69618
69637
|
} catch {
|
|
69619
69638
|
}
|
|
69620
69639
|
}
|
|
69640
|
+
/**
|
|
69641
|
+
* Emit the queue-claim agent:ready event at most once per session. Both the
|
|
69642
|
+
* boot-time starting→idle one-shot and the fsmReadySeen re-arm call this; the
|
|
69643
|
+
* agentReadyEmitted guard ensures the second caller is a no-op so a worker is
|
|
69644
|
+
* never claimed twice and a queued task is never double-dispatched.
|
|
69645
|
+
*/
|
|
69646
|
+
emitAgentReadyOnce(chatTitle, now) {
|
|
69647
|
+
if (this.agentReadyEmitted) return;
|
|
69648
|
+
this.agentReadyEmitted = true;
|
|
69649
|
+
this.pushEvent({ event: "agent:ready", chatTitle, timestamp: now });
|
|
69650
|
+
}
|
|
69621
69651
|
detectStatusTransition() {
|
|
69622
69652
|
const now = Date.now();
|
|
69623
69653
|
const adapterStatus = this.adapter.getStatus({ allowParse: false });
|
|
@@ -69770,7 +69800,7 @@ ${body}
|
|
|
69770
69800
|
this.scheduleCompletedDebounceFlush(flushDelay);
|
|
69771
69801
|
}
|
|
69772
69802
|
} else if (newStatus === "idle" && this.lastStatus === "starting") {
|
|
69773
|
-
this.
|
|
69803
|
+
this.emitAgentReadyOnce(chatTitle, now);
|
|
69774
69804
|
} else if (newStatus === "error") {
|
|
69775
69805
|
if (this.generatingDebounceTimer) {
|
|
69776
69806
|
clearTimeout(this.generatingDebounceTimer);
|
|
@@ -69809,6 +69839,9 @@ ${body}
|
|
|
69809
69839
|
}
|
|
69810
69840
|
this.lastStatus = newStatus;
|
|
69811
69841
|
}
|
|
69842
|
+
if (newStatus === "idle" && adapterStatus.fsmReadySeen === true && !this.agentReadyEmitted) {
|
|
69843
|
+
this.emitAgentReadyOnce(chatTitle, now);
|
|
69844
|
+
}
|
|
69812
69845
|
this.applyProviderResponse(parsedStatus, {
|
|
69813
69846
|
phase: newStatus === "idle" && (previousStatus === "generating" || previousStatus === "waiting_approval") ? "turn_completed" : "immediate"
|
|
69814
69847
|
});
|