@adhdev/daemon-core 0.9.82-rc.536 → 0.9.82-rc.537
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
|
@@ -419,10 +419,10 @@ function readInjected(value) {
|
|
|
419
419
|
}
|
|
420
420
|
function getDaemonBuildInfo() {
|
|
421
421
|
if (cached) return cached;
|
|
422
|
-
const commit = readInjected(true ? "
|
|
423
|
-
const commitShort = readInjected(true ? "
|
|
424
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
425
|
-
const builtAt = readInjected(true ? "2026-07-
|
|
422
|
+
const commit = readInjected(true ? "b47ad45cf2b2ad404d911162a9cadd7db2e274a6" : void 0) ?? "unknown";
|
|
423
|
+
const commitShort = readInjected(true ? "b47ad45c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
424
|
+
const version = readInjected(true ? "0.9.82-rc.537" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
425
|
+
const builtAt = readInjected(true ? "2026-07-15T13:12:55.213Z" : void 0);
|
|
426
426
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
427
427
|
return cached;
|
|
428
428
|
}
|
|
@@ -24551,6 +24551,70 @@ function modalMatches(spec, input) {
|
|
|
24551
24551
|
if (buttonBlockApprovalCue(spec, text)) return true;
|
|
24552
24552
|
return false;
|
|
24553
24553
|
}
|
|
24554
|
+
function lastModalCueLine(spec, screenText) {
|
|
24555
|
+
if (!screenText) return -1;
|
|
24556
|
+
const lines = screenText.split("\n");
|
|
24557
|
+
const question = compile2(spec.questionPattern, spec.questionFlags ?? "i");
|
|
24558
|
+
const variants = (spec.questionVariants ?? []).map((v) => compile2(v.regex, v.flags ?? "i"));
|
|
24559
|
+
const buttonFlags = spec.buttonFlags && spec.buttonFlags.includes("m") ? spec.buttonFlags : `${spec.buttonFlags ?? ""}m`;
|
|
24560
|
+
const buttonRe = compile2(spec.buttonPattern, buttonFlags);
|
|
24561
|
+
let last = -1;
|
|
24562
|
+
for (let i = 0; i < lines.length; i++) {
|
|
24563
|
+
const line = lines[i];
|
|
24564
|
+
question.lastIndex = 0;
|
|
24565
|
+
if (question.test(line)) {
|
|
24566
|
+
last = i;
|
|
24567
|
+
continue;
|
|
24568
|
+
}
|
|
24569
|
+
if (variants.some((re) => {
|
|
24570
|
+
re.lastIndex = 0;
|
|
24571
|
+
return re.test(line);
|
|
24572
|
+
})) {
|
|
24573
|
+
last = i;
|
|
24574
|
+
continue;
|
|
24575
|
+
}
|
|
24576
|
+
buttonRe.lastIndex = 0;
|
|
24577
|
+
if (buttonRe.test(line)) {
|
|
24578
|
+
last = i;
|
|
24579
|
+
continue;
|
|
24580
|
+
}
|
|
24581
|
+
}
|
|
24582
|
+
return last;
|
|
24583
|
+
}
|
|
24584
|
+
function modalSupersededBySettledPrompt(modalSpec, settledSpec, settled, input) {
|
|
24585
|
+
if (!settled || !settledSpec) return false;
|
|
24586
|
+
if (settledSpec.scope === "whole-screen") return false;
|
|
24587
|
+
const screenText = input.screenText ?? "";
|
|
24588
|
+
if (!screenText) return false;
|
|
24589
|
+
const modalLine = lastModalCueLine(modalSpec, screenText);
|
|
24590
|
+
if (modalLine < 0) return false;
|
|
24591
|
+
const lines = screenText.split("\n");
|
|
24592
|
+
const below = lines.slice(modalLine + 1);
|
|
24593
|
+
if (below.length === 0) return false;
|
|
24594
|
+
const belowText = below.join("\n");
|
|
24595
|
+
if (!settled.prompt.test(belowText)) return false;
|
|
24596
|
+
if (settled.footers.length > 0 && !settled.footers.every((f) => f.test(belowText))) return false;
|
|
24597
|
+
const question = compile2(modalSpec.questionPattern, modalSpec.questionFlags ?? "i");
|
|
24598
|
+
const variants = (modalSpec.questionVariants ?? []).map((v) => compile2(v.regex, v.flags ?? "i"));
|
|
24599
|
+
const buttonFlags = modalSpec.buttonFlags && modalSpec.buttonFlags.includes("m") ? modalSpec.buttonFlags : `${modalSpec.buttonFlags ?? ""}m`;
|
|
24600
|
+
const buttonRe = compile2(modalSpec.buttonPattern, buttonFlags);
|
|
24601
|
+
const isModalCueLine = (line) => {
|
|
24602
|
+
question.lastIndex = 0;
|
|
24603
|
+
if (question.test(line)) return true;
|
|
24604
|
+
if (variants.some((re) => {
|
|
24605
|
+
re.lastIndex = 0;
|
|
24606
|
+
return re.test(line);
|
|
24607
|
+
})) return true;
|
|
24608
|
+
buttonRe.lastIndex = 0;
|
|
24609
|
+
return buttonRe.test(line);
|
|
24610
|
+
};
|
|
24611
|
+
const settledPromptLineRe = compile2(settledSpec.regex, (settledSpec.flags ?? "m").includes("m") ? settledSpec.flags ?? "m" : `${settledSpec.flags ?? ""}m`);
|
|
24612
|
+
const isSettledLine = (line) => {
|
|
24613
|
+
settledPromptLineRe.lastIndex = 0;
|
|
24614
|
+
return settledPromptLineRe.test(line);
|
|
24615
|
+
};
|
|
24616
|
+
return below.some((line) => line.trim() !== "" && !isModalCueLine(line) && !isSettledLine(line));
|
|
24617
|
+
}
|
|
24554
24618
|
function evaluateGroup(group, spec, input, compiled) {
|
|
24555
24619
|
switch (group) {
|
|
24556
24620
|
case "spinner": {
|
|
@@ -24560,7 +24624,9 @@ function evaluateGroup(group, spec, input, compiled) {
|
|
|
24560
24624
|
}
|
|
24561
24625
|
case "modal": {
|
|
24562
24626
|
if (!spec.modal) return null;
|
|
24563
|
-
|
|
24627
|
+
if (!modalMatches(spec.modal, input)) return null;
|
|
24628
|
+
if (modalSupersededBySettledPrompt(spec.modal, spec.settledPrompt, compiled.settled, input)) return null;
|
|
24629
|
+
return "waiting_approval";
|
|
24564
24630
|
}
|
|
24565
24631
|
case "settled-prompt": {
|
|
24566
24632
|
if (!spec.settledPrompt || !compiled.settled) return null;
|
|
@@ -26731,6 +26797,7 @@ var init_provider_cli_adapter = __esm({
|
|
|
26731
26797
|
const staleSnapshotLooksActive = activeScreenPattern.test(lastSnapshot);
|
|
26732
26798
|
const currentScreenLooksIdle = /(?:^|\n|\r)\s*[❯›>]\s*(?:Try\s+["“][^\n\r"”]+["”])?\s*(?:\n|\r|$)/.test(screenText) && !activeScreenPattern.test(screenText);
|
|
26733
26799
|
if (staleSnapshotLooksActive && currentScreenLooksIdle) return screenText;
|
|
26800
|
+
if (this.runDetectStatus(screenText) === "idle") return screenText;
|
|
26734
26801
|
if (currentSnapshot.length >= lastSnapshot.length) return screenText;
|
|
26735
26802
|
return `${screenText}
|
|
26736
26803
|
${lastSnapshot}`;
|