@adhdev/daemon-standalone 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 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 ? "37b9d1d9e10336707dbc0861a96d5bcc55cc015e" : void 0) ?? "unknown";
30040
- const commitShort = readInjected(true ? "37b9d1d9" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30041
- const version2 = readInjected(true ? "0.9.82-rc.357" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30042
- const builtAt = readInjected(true ? "2026-06-23T00:25:47.104Z" : void 0);
30039
+ const commit = readInjected(true ? "7210e80591d8d9ab378ee786ffb233027437461a" : void 0) ?? "unknown";
30040
+ const commitShort = readInjected(true ? "7210e805" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30041
+ const version2 = readInjected(true ? "0.9.82-rc.358" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30042
+ const builtAt = readInjected(true ? "2026-06-23T01:41:19.647Z" : void 0);
30043
30043
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30044
30044
  return cached2;
30045
30045
  }
@@ -43540,7 +43540,7 @@ ${cleanBody}`;
43540
43540
  occurredAt: occurredAtMs != null ? new Date(occurredAtMs).toISOString() : void 0,
43541
43541
  taskId: eventTaskId
43542
43542
  });
43543
- const leaveDirectDispatchActive = !task && opts?.tentativeIfDirect === true;
43543
+ const leaveDirectDispatchActive = !task && opts?.tentativeIfDirect === true || !eventTaskId && !sessionHasActiveAssignment(args.meshId, sessionId);
43544
43544
  if (!leaveDirectDispatchActive) {
43545
43545
  updateDirectDispatchStatus(args.meshId, sessionId, outcome, eventTaskId);
43546
43546
  }
@@ -43639,7 +43639,9 @@ ${cleanBody}`;
43639
43639
  }
43640
43640
  if (sessionId) {
43641
43641
  const startedTaskId = readNonEmptyString2(args.metadataEvent.taskId) || void 0;
43642
- updateDirectDispatchStatus(args.meshId, sessionId, "acked", startedTaskId);
43642
+ if (startedTaskId || sessionHasActiveAssignment(args.meshId, sessionId)) {
43643
+ updateDirectDispatchStatus(args.meshId, sessionId, "acked", startedTaskId);
43644
+ }
43643
43645
  const activeDeliveries = (() => {
43644
43646
  try {
43645
43647
  return MeshRuntimeStore.getInstance().getActiveSessionDeliveries(args.meshId, sessionId);
@@ -49341,6 +49343,7 @@ ${lastSnapshot}`;
49341
49343
  evaluateCondition: () => evaluateCondition,
49342
49344
  extractButtonsFromRule: () => extractButtonsFromRule,
49343
49345
  extractTitle: () => extractTitle,
49346
+ lastContiguousNumberedBlock: () => lastContiguousNumberedBlock,
49344
49347
  resolveSections: () => resolveSections,
49345
49348
  sectionText: () => sectionText
49346
49349
  });
@@ -49581,7 +49584,6 @@ ${lastSnapshot}`;
49581
49584
  label += " " + next.trim();
49582
49585
  j += 1;
49583
49586
  }
49584
- if (buttons.some((b) => b.index === idx)) continue;
49585
49587
  const key = keyTemplate.replace(/\{index\}/g, String(idx));
49586
49588
  buttons.push({ index: idx, label, key, current });
49587
49589
  i = j - 1;
@@ -49593,13 +49595,22 @@ ${lastSnapshot}`;
49593
49595
  const idx = Number(m[1]);
49594
49596
  const label = String(m[2] ?? "").trim();
49595
49597
  if (!Number.isFinite(idx) || idx <= 0 || !label) continue;
49596
- if (buttons.some((b) => b.index === idx)) continue;
49597
49598
  const key = keyTemplate.replace(/\{index\}/g, String(idx));
49598
49599
  buttons.push({ index: idx, label, key, current: hasCursorMarker(m[0]) });
49599
49600
  }
49600
49601
  }
49601
- buttons.sort((a, b) => a.index - b.index);
49602
- return buttons;
49602
+ const block2 = lastContiguousNumberedBlock(buttons);
49603
+ block2.sort((a, b) => a.index - b.index);
49604
+ return block2;
49605
+ }
49606
+ function lastContiguousNumberedBlock(entries) {
49607
+ if (entries.length <= 1) return entries.slice();
49608
+ let start = entries.length - 1;
49609
+ for (let i = entries.length - 1; i > 0; i -= 1) {
49610
+ if (entries[i - 1].index === entries[i].index - 1) start = i - 1;
49611
+ else break;
49612
+ }
49613
+ return entries.slice(start);
49603
49614
  }
49604
49615
  function hasCursorMarker(text) {
49605
49616
  return /^\s*[❯›>]/.test(text);
@@ -63885,6 +63896,7 @@ ${formatManifestValidationIssues2(validation.issues)}`,
63885
63896
  return;
63886
63897
  }
63887
63898
  }
63899
+ init_evaluator();
63888
63900
  var fs13 = __toESM2(require("fs"));
63889
63901
  var os18 = __toESM2(require("os"));
63890
63902
  var path222 = __toESM2(require("path"));
@@ -65096,21 +65108,19 @@ ${formatManifestValidationIssues2(validation.issues)}`,
65096
65108
  const ec = action.extract_choices;
65097
65109
  if (!ec?.pattern) return [];
65098
65110
  const text = this.readScreenSectionText(ec.section);
65099
- const out = [];
65100
- const seen = /* @__PURE__ */ new Set();
65111
+ const all = [];
65101
65112
  for (const rawLine of text.split("\n")) {
65102
65113
  const line = rawLine.replace(/\r$/, "");
65103
65114
  const m = new RegExp(ec.pattern, ec.flags ?? "").exec(line);
65104
65115
  if (!m) continue;
65105
65116
  const idx = Number(m[1]);
65106
- if (!Number.isFinite(idx) || seen.has(idx)) continue;
65117
+ if (!Number.isFinite(idx) || idx <= 0) continue;
65107
65118
  const label = (m[2] ?? "").replace(/\s+/g, " ").trim();
65108
65119
  if (!label) continue;
65109
65120
  const current = /^\s*[❯›>]/.test(line) || /[✔✓●]\s*$/.test(label);
65110
- seen.add(idx);
65111
- out.push({ index: idx, label, current });
65121
+ all.push({ index: idx, label, current });
65112
65122
  }
65113
- return out;
65123
+ return lastContiguousNumberedBlock(all);
65114
65124
  }
65115
65125
  /** Live text of a named screen section (or the whole screen when no
65116
65126
  * section is named), resolved from the driver's current sections. */