@adhdev/daemon-core 0.9.82-rc.357 → 0.9.82-rc.358
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 +28 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +28 -16
- package/dist/index.mjs.map +1 -1
- package/dist/providers/spec/evaluator.d.ts +21 -0
- package/package.json +2 -2
- package/src/mesh/mesh-events-coordinator.ts +19 -2
- package/src/providers/spec/cli-adapter.ts +13 -6
- package/src/providers/spec/evaluator.ts +41 -4
package/dist/index.mjs
CHANGED
|
@@ -311,10 +311,10 @@ function readInjected(value) {
|
|
|
311
311
|
}
|
|
312
312
|
function getDaemonBuildInfo() {
|
|
313
313
|
if (cached) return cached;
|
|
314
|
-
const commit = readInjected(true ? "
|
|
315
|
-
const commitShort = readInjected(true ? "
|
|
316
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
317
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
314
|
+
const commit = readInjected(true ? "7210e80591d8d9ab378ee786ffb233027437461a" : void 0) ?? "unknown";
|
|
315
|
+
const commitShort = readInjected(true ? "7210e805" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
316
|
+
const version = readInjected(true ? "0.9.82-rc.358" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
317
|
+
const builtAt = readInjected(true ? "2026-06-23T01:40:53.249Z" : void 0);
|
|
318
318
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
319
319
|
return cached;
|
|
320
320
|
}
|
|
@@ -13748,7 +13748,7 @@ function injectMeshSystemMessage(components, args) {
|
|
|
13748
13748
|
occurredAt: occurredAtMs != null ? new Date(occurredAtMs).toISOString() : void 0,
|
|
13749
13749
|
taskId: eventTaskId
|
|
13750
13750
|
});
|
|
13751
|
-
const leaveDirectDispatchActive = !task && opts?.tentativeIfDirect === true;
|
|
13751
|
+
const leaveDirectDispatchActive = !task && opts?.tentativeIfDirect === true || !eventTaskId && !sessionHasActiveAssignment(args.meshId, sessionId);
|
|
13752
13752
|
if (!leaveDirectDispatchActive) {
|
|
13753
13753
|
updateDirectDispatchStatus(args.meshId, sessionId, outcome, eventTaskId);
|
|
13754
13754
|
}
|
|
@@ -13847,7 +13847,9 @@ function injectMeshSystemMessage(components, args) {
|
|
|
13847
13847
|
}
|
|
13848
13848
|
if (sessionId) {
|
|
13849
13849
|
const startedTaskId = readNonEmptyString2(args.metadataEvent.taskId) || void 0;
|
|
13850
|
-
|
|
13850
|
+
if (startedTaskId || sessionHasActiveAssignment(args.meshId, sessionId)) {
|
|
13851
|
+
updateDirectDispatchStatus(args.meshId, sessionId, "acked", startedTaskId);
|
|
13852
|
+
}
|
|
13851
13853
|
const activeDeliveries = (() => {
|
|
13852
13854
|
try {
|
|
13853
13855
|
return MeshRuntimeStore.getInstance().getActiveSessionDeliveries(args.meshId, sessionId);
|
|
@@ -19535,6 +19537,7 @@ __export(evaluator_exports, {
|
|
|
19535
19537
|
evaluateCondition: () => evaluateCondition,
|
|
19536
19538
|
extractButtonsFromRule: () => extractButtonsFromRule,
|
|
19537
19539
|
extractTitle: () => extractTitle,
|
|
19540
|
+
lastContiguousNumberedBlock: () => lastContiguousNumberedBlock,
|
|
19538
19541
|
resolveSections: () => resolveSections,
|
|
19539
19542
|
sectionText: () => sectionText
|
|
19540
19543
|
});
|
|
@@ -19775,7 +19778,6 @@ function extractButtonsFromRule(rule, hay) {
|
|
|
19775
19778
|
label += " " + next.trim();
|
|
19776
19779
|
j += 1;
|
|
19777
19780
|
}
|
|
19778
|
-
if (buttons.some((b) => b.index === idx)) continue;
|
|
19779
19781
|
const key = keyTemplate.replace(/\{index\}/g, String(idx));
|
|
19780
19782
|
buttons.push({ index: idx, label, key, current });
|
|
19781
19783
|
i = j - 1;
|
|
@@ -19787,13 +19789,22 @@ function extractButtonsFromRule(rule, hay) {
|
|
|
19787
19789
|
const idx = Number(m[1]);
|
|
19788
19790
|
const label = String(m[2] ?? "").trim();
|
|
19789
19791
|
if (!Number.isFinite(idx) || idx <= 0 || !label) continue;
|
|
19790
|
-
if (buttons.some((b) => b.index === idx)) continue;
|
|
19791
19792
|
const key = keyTemplate.replace(/\{index\}/g, String(idx));
|
|
19792
19793
|
buttons.push({ index: idx, label, key, current: hasCursorMarker(m[0]) });
|
|
19793
19794
|
}
|
|
19794
19795
|
}
|
|
19795
|
-
|
|
19796
|
-
|
|
19796
|
+
const block2 = lastContiguousNumberedBlock(buttons);
|
|
19797
|
+
block2.sort((a, b) => a.index - b.index);
|
|
19798
|
+
return block2;
|
|
19799
|
+
}
|
|
19800
|
+
function lastContiguousNumberedBlock(entries) {
|
|
19801
|
+
if (entries.length <= 1) return entries.slice();
|
|
19802
|
+
let start = entries.length - 1;
|
|
19803
|
+
for (let i = entries.length - 1; i > 0; i -= 1) {
|
|
19804
|
+
if (entries[i - 1].index === entries[i].index - 1) start = i - 1;
|
|
19805
|
+
else break;
|
|
19806
|
+
}
|
|
19807
|
+
return entries.slice(start);
|
|
19797
19808
|
}
|
|
19798
19809
|
function hasCursorMarker(text) {
|
|
19799
19810
|
return /^\s*[❯›>]/.test(text);
|
|
@@ -33848,6 +33859,9 @@ function collectStableSizes(when, sizes) {
|
|
|
33848
33859
|
}
|
|
33849
33860
|
}
|
|
33850
33861
|
|
|
33862
|
+
// src/providers/spec/cli-adapter.ts
|
|
33863
|
+
init_evaluator();
|
|
33864
|
+
|
|
33851
33865
|
// src/providers/spec/native-history-executor.ts
|
|
33852
33866
|
init_logger();
|
|
33853
33867
|
init_load_better_sqlite3();
|
|
@@ -35062,21 +35076,19 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
35062
35076
|
const ec = action.extract_choices;
|
|
35063
35077
|
if (!ec?.pattern) return [];
|
|
35064
35078
|
const text = this.readScreenSectionText(ec.section);
|
|
35065
|
-
const
|
|
35066
|
-
const seen = /* @__PURE__ */ new Set();
|
|
35079
|
+
const all = [];
|
|
35067
35080
|
for (const rawLine of text.split("\n")) {
|
|
35068
35081
|
const line = rawLine.replace(/\r$/, "");
|
|
35069
35082
|
const m = new RegExp(ec.pattern, ec.flags ?? "").exec(line);
|
|
35070
35083
|
if (!m) continue;
|
|
35071
35084
|
const idx = Number(m[1]);
|
|
35072
|
-
if (!Number.isFinite(idx) ||
|
|
35085
|
+
if (!Number.isFinite(idx) || idx <= 0) continue;
|
|
35073
35086
|
const label = (m[2] ?? "").replace(/\s+/g, " ").trim();
|
|
35074
35087
|
if (!label) continue;
|
|
35075
35088
|
const current = /^\s*[❯›>]/.test(line) || /[✔✓●]\s*$/.test(label);
|
|
35076
|
-
|
|
35077
|
-
out.push({ index: idx, label, current });
|
|
35089
|
+
all.push({ index: idx, label, current });
|
|
35078
35090
|
}
|
|
35079
|
-
return
|
|
35091
|
+
return lastContiguousNumberedBlock(all);
|
|
35080
35092
|
}
|
|
35081
35093
|
/** Live text of a named screen section (or the whole screen when no
|
|
35082
35094
|
* section is named), resolved from the driver's current sections. */
|