@adhdev/daemon-standalone 0.9.82-rc.341 → 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 +60 -10
- 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,6 +61630,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61621
61630
|
return n;
|
|
61622
61631
|
}
|
|
61623
61632
|
var SUBMIT_DELAY_FLOOR_MS = 200;
|
|
61633
|
+
var WIN32_SUBMIT_RESEND_GAP_MS = 350;
|
|
61634
|
+
var WIN32_SUBMIT_MAX_RESENDS = 14;
|
|
61624
61635
|
function resolveSubmitDelayMs(specBeforeSubmit, text) {
|
|
61625
61636
|
const lines = countNewlines(text);
|
|
61626
61637
|
const linesBonus = Math.min(800, lines * 80);
|
|
@@ -61672,6 +61683,10 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61672
61683
|
* after a re-prime we don't re-inject until the screen changes (which
|
|
61673
61684
|
* resets the stall reference) or another full stall window lapses. */
|
|
61674
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;
|
|
61675
61690
|
currentEval = null;
|
|
61676
61691
|
stateHistory = [];
|
|
61677
61692
|
prevStateAt = 0;
|
|
@@ -61788,6 +61803,10 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
61788
61803
|
clearTimeout(this.stallTimer);
|
|
61789
61804
|
this.stallTimer = null;
|
|
61790
61805
|
}
|
|
61806
|
+
if (this.win32SubmitTimer) {
|
|
61807
|
+
clearTimeout(this.win32SubmitTimer);
|
|
61808
|
+
this.win32SubmitTimer = null;
|
|
61809
|
+
}
|
|
61791
61810
|
this.specWatcher?.close();
|
|
61792
61811
|
this.adapter.kill();
|
|
61793
61812
|
}
|
|
@@ -62200,11 +62219,8 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
62200
62219
|
const perChar = sm.delay_ms_per_char ?? 0;
|
|
62201
62220
|
const beforeSubmit = resolveSubmitDelayMs(sm.delay_ms_before_submit, text);
|
|
62202
62221
|
if (process.platform === "win32") {
|
|
62203
|
-
|
|
62204
|
-
|
|
62205
|
-
} else {
|
|
62206
|
-
this.adapter.send_keys(text + sm.submit_key);
|
|
62207
|
-
}
|
|
62222
|
+
this.adapter.send_keys(text);
|
|
62223
|
+
this.scheduleWin32Submit(sm.submit_key, beforeSubmit);
|
|
62208
62224
|
return;
|
|
62209
62225
|
}
|
|
62210
62226
|
if (perChar === 0) {
|
|
@@ -62224,6 +62240,40 @@ ${formatManifestValidationIssues2(validation.issues)}`,
|
|
|
62224
62240
|
i += 1;
|
|
62225
62241
|
}, perChar);
|
|
62226
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
|
+
}
|
|
62227
62277
|
handleClickControl(controlId, payload) {
|
|
62228
62278
|
const ctl = (this.spec.control_bar ?? []).find((c) => c.id === controlId);
|
|
62229
62279
|
if (!ctl) return;
|