@adhdev/daemon-standalone 0.9.82-rc.342 → 0.9.82-rc.343
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 +59 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/vendor/mcp-server/index.js +18 -2
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/index.js
CHANGED
|
@@ -30036,10 +30036,10 @@ var require_dist3 = __commonJS({
|
|
|
30036
30036
|
}
|
|
30037
30037
|
function getDaemonBuildInfo() {
|
|
30038
30038
|
if (cached2) return cached2;
|
|
30039
|
-
const commit = readInjected(true ? "
|
|
30040
|
-
const commitShort = readInjected(true ? "
|
|
30041
|
-
const version2 = readInjected(true ? "0.9.82-rc.
|
|
30042
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
30039
|
+
const commit = readInjected(true ? "9a4c1af9349a342fc63d8d42746747a6feda8f08" : void 0) ?? "unknown";
|
|
30040
|
+
const commitShort = readInjected(true ? "9a4c1af9" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
30041
|
+
const version2 = readInjected(true ? "0.9.82-rc.343" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
30042
|
+
const builtAt = readInjected(true ? "2026-06-21T11:25:43.064Z" : void 0);
|
|
30043
30043
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
30044
30044
|
return cached2;
|
|
30045
30045
|
}
|
|
@@ -39569,7 +39569,16 @@ Next step: ${nextStep}`;
|
|
|
39569
39569
|
}).catch((e) => {
|
|
39570
39570
|
LOG2.error("MeshQueue", `Failed to dispatch task locally to node ${nodeId}: ${e?.message}`);
|
|
39571
39571
|
updateSessionDeliveryStatus(delivery.id, "failed", { lastError: e?.message, incrementAttempt: true });
|
|
39572
|
-
updateTaskStatus(meshId, task.id, "
|
|
39572
|
+
updateTaskStatus(meshId, task.id, "pending");
|
|
39573
|
+
try {
|
|
39574
|
+
appendLedgerEntry(meshId, {
|
|
39575
|
+
kind: "dispatch_failed",
|
|
39576
|
+
nodeId,
|
|
39577
|
+
sessionId,
|
|
39578
|
+
payload: { taskId: task.id, deliveryId: delivery.id, error: e?.message, retryable: true }
|
|
39579
|
+
});
|
|
39580
|
+
} catch {
|
|
39581
|
+
}
|
|
39573
39582
|
});
|
|
39574
39583
|
return true;
|
|
39575
39584
|
}
|
|
@@ -61621,7 +61630,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61621
61630
|
return n;
|
|
61622
61631
|
}
|
|
61623
61632
|
var SUBMIT_DELAY_FLOOR_MS = 200;
|
|
61624
|
-
var
|
|
61633
|
+
var WIN32_SUBMIT_RESEND_GAP_MS = 350;
|
|
61634
|
+
var WIN32_SUBMIT_MAX_RESENDS = 14;
|
|
61625
61635
|
function resolveSubmitDelayMs(specBeforeSubmit, text) {
|
|
61626
61636
|
const lines = countNewlines(text);
|
|
61627
61637
|
const linesBonus = Math.min(800, lines * 80);
|
|
@@ -61673,6 +61683,10 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61673
61683
|
* after a re-prime we don't re-inject until the screen changes (which
|
|
61674
61684
|
* resets the stall reference) or another full stall window lapses. */
|
|
61675
61685
|
lastRefocusAt = 0;
|
|
61686
|
+
/** Timer driving the win32 verification-based submit resend loop (see
|
|
61687
|
+
* WIN32_SUBMIT_* and scheduleWin32Submit). Re-arms itself until the FSM
|
|
61688
|
+
* leaves idle (submitted) or the resend budget is spent. */
|
|
61689
|
+
win32SubmitTimer = null;
|
|
61676
61690
|
currentEval = null;
|
|
61677
61691
|
stateHistory = [];
|
|
61678
61692
|
prevStateAt = 0;
|
|
@@ -61789,6 +61803,10 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61789
61803
|
clearTimeout(this.stallTimer);
|
|
61790
61804
|
this.stallTimer = null;
|
|
61791
61805
|
}
|
|
61806
|
+
if (this.win32SubmitTimer) {
|
|
61807
|
+
clearTimeout(this.win32SubmitTimer);
|
|
61808
|
+
this.win32SubmitTimer = null;
|
|
61809
|
+
}
|
|
61792
61810
|
this.specWatcher?.close();
|
|
61793
61811
|
this.adapter.kill();
|
|
61794
61812
|
}
|
|
@@ -62201,13 +62219,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
62201
62219
|
const perChar = sm.delay_ms_per_char ?? 0;
|
|
62202
62220
|
const beforeSubmit = resolveSubmitDelayMs(sm.delay_ms_before_submit, text);
|
|
62203
62221
|
if (process.platform === "win32") {
|
|
62204
|
-
const submitTwice = () => {
|
|
62205
|
-
this.adapter.send_keys(sm.submit_key);
|
|
62206
|
-
setTimeout(() => this.adapter.send_keys(sm.submit_key), WIN32_SUBMIT_REPEAT_GAP_MS);
|
|
62207
|
-
};
|
|
62208
62222
|
this.adapter.send_keys(text);
|
|
62209
|
-
|
|
62210
|
-
else submitTwice();
|
|
62223
|
+
this.scheduleWin32Submit(sm.submit_key, beforeSubmit);
|
|
62211
62224
|
return;
|
|
62212
62225
|
}
|
|
62213
62226
|
if (perChar === 0) {
|
|
@@ -62227,6 +62240,40 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
62227
62240
|
i += 1;
|
|
62228
62241
|
}, perChar);
|
|
62229
62242
|
}
|
|
62243
|
+
/** The agent's current coarse status, derived from the FSM node we're in. */
|
|
62244
|
+
currentStatus() {
|
|
62245
|
+
const st = stateById(this.spec, this.currentStateId);
|
|
62246
|
+
return st ? statusForState(st) : "idle";
|
|
62247
|
+
}
|
|
62248
|
+
/**
|
|
62249
|
+
* win32 verification-based submit. Sends the submit key, waits a gap, and if
|
|
62250
|
+
* the FSM is still 'idle' (the prompt did not submit — the CR was absorbed as
|
|
62251
|
+
* a multiline-paste newline) resends, up to WIN32_SUBMIT_MAX_RESENDS. The
|
|
62252
|
+
* first CR always fires (so a stale/edge status never suppresses the submit);
|
|
62253
|
+
* subsequent resends are gated on still being idle, and stop the instant the
|
|
62254
|
+
* agent leaves idle (submitted → generating / approval). This converges the
|
|
62255
|
+
* nondeterministic multiline window without spamming Enter into the next turn.
|
|
62256
|
+
*/
|
|
62257
|
+
scheduleWin32Submit(submitKey, initialDelayMs) {
|
|
62258
|
+
if (this.win32SubmitTimer) {
|
|
62259
|
+
clearTimeout(this.win32SubmitTimer);
|
|
62260
|
+
this.win32SubmitTimer = null;
|
|
62261
|
+
}
|
|
62262
|
+
const fire = (attempt) => {
|
|
62263
|
+
this.win32SubmitTimer = null;
|
|
62264
|
+
this.adapter.send_keys(submitKey);
|
|
62265
|
+
if (attempt + 1 >= WIN32_SUBMIT_MAX_RESENDS) return;
|
|
62266
|
+
this.win32SubmitTimer = setTimeout(() => {
|
|
62267
|
+
if (this.currentStatus() !== "idle") {
|
|
62268
|
+
this.win32SubmitTimer = null;
|
|
62269
|
+
return;
|
|
62270
|
+
}
|
|
62271
|
+
fire(attempt + 1);
|
|
62272
|
+
}, WIN32_SUBMIT_RESEND_GAP_MS);
|
|
62273
|
+
};
|
|
62274
|
+
if (initialDelayMs > 0) this.win32SubmitTimer = setTimeout(() => fire(0), initialDelayMs);
|
|
62275
|
+
else fire(0);
|
|
62276
|
+
}
|
|
62230
62277
|
handleClickControl(controlId, payload) {
|
|
62231
62278
|
const ctl = (this.spec.control_bar ?? []).find((c) => c.id === controlId);
|
|
62232
62279
|
if (!ctl) return;
|