@adhdev/daemon-core 0.9.82-rc.312 → 0.9.82-rc.313
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 +45 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/providers/provider-loader.ts +78 -0
- package/src/providers/spec/cli-adapter.ts +6 -0
package/dist/index.js
CHANGED
|
@@ -316,10 +316,10 @@ function readInjected(value) {
|
|
|
316
316
|
}
|
|
317
317
|
function getDaemonBuildInfo() {
|
|
318
318
|
if (cached) return cached;
|
|
319
|
-
const commit = readInjected(true ? "
|
|
320
|
-
const commitShort = readInjected(true ? "
|
|
321
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
322
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
319
|
+
const commit = readInjected(true ? "ed3b7279be8ea9fa191f854f7e9b6ce969159e67" : void 0) ?? "unknown";
|
|
320
|
+
const commitShort = readInjected(true ? "ed3b7279" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
321
|
+
const version = readInjected(true ? "0.9.82-rc.313" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
322
|
+
const builtAt = readInjected(true ? "2026-06-18T00:14:56.582Z" : void 0);
|
|
323
323
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
324
324
|
return cached;
|
|
325
325
|
}
|
|
@@ -32409,7 +32409,7 @@ var SpecCliAdapter = class _SpecCliAdapter {
|
|
|
32409
32409
|
}
|
|
32410
32410
|
if (action.type === "open_picker") {
|
|
32411
32411
|
const choiceIndex = typeof flat.choiceIndex === "number" ? flat.choiceIndex : typeof flat.choiceIndex === "string" && flat.choiceIndex.trim() ? Number(flat.choiceIndex) : void 0;
|
|
32412
|
-
const choiceLabel = typeof flat.choiceLabel === "string" ? flat.choiceLabel : typeof flat.choice === "string" ? flat.choice : void 0;
|
|
32412
|
+
const choiceLabel = typeof flat.choiceLabel === "string" ? flat.choiceLabel : typeof flat.choice === "string" ? flat.choice : typeof flat.value === "string" ? flat.value : void 0;
|
|
32413
32413
|
if (typeof choiceIndex === "number" && Number.isFinite(choiceIndex) || choiceLabel && choiceLabel.trim()) {
|
|
32414
32414
|
return this.selectPickerChoice(ctl, action, choiceIndex, choiceLabel);
|
|
32415
32415
|
}
|
|
@@ -38575,6 +38575,39 @@ function registerProviderScriptRootSafely(root) {
|
|
|
38575
38575
|
} catch {
|
|
38576
38576
|
}
|
|
38577
38577
|
}
|
|
38578
|
+
function synthesizeControlsFromControlBar(specControls) {
|
|
38579
|
+
const out = [];
|
|
38580
|
+
specControls.forEach((ctl, index) => {
|
|
38581
|
+
const id = typeof ctl?.id === "string" ? ctl.id.trim() : "";
|
|
38582
|
+
const actionType = ctl?.action?.type;
|
|
38583
|
+
if (!id || !actionType) return;
|
|
38584
|
+
const label = typeof ctl?.label === "string" && ctl.label.trim() ? ctl.label : id;
|
|
38585
|
+
if (actionType === "open_picker") {
|
|
38586
|
+
out.push({
|
|
38587
|
+
id,
|
|
38588
|
+
type: "select",
|
|
38589
|
+
label,
|
|
38590
|
+
placement: "bar",
|
|
38591
|
+
dynamic: true,
|
|
38592
|
+
listScript: id,
|
|
38593
|
+
setScript: id,
|
|
38594
|
+
readFrom: id,
|
|
38595
|
+
order: index
|
|
38596
|
+
});
|
|
38597
|
+
} else if (actionType === "send_keys") {
|
|
38598
|
+
out.push({
|
|
38599
|
+
id,
|
|
38600
|
+
type: "action",
|
|
38601
|
+
label,
|
|
38602
|
+
placement: "bar",
|
|
38603
|
+
invokeScript: id,
|
|
38604
|
+
resultDisplay: "none",
|
|
38605
|
+
order: index
|
|
38606
|
+
});
|
|
38607
|
+
}
|
|
38608
|
+
});
|
|
38609
|
+
return out;
|
|
38610
|
+
}
|
|
38578
38611
|
var ProviderLoader = class _ProviderLoader {
|
|
38579
38612
|
providers = /* @__PURE__ */ new Map();
|
|
38580
38613
|
providerAvailability = /* @__PURE__ */ new Map();
|
|
@@ -39513,6 +39546,13 @@ var ProviderLoader = class _ProviderLoader {
|
|
|
39513
39546
|
});
|
|
39514
39547
|
}
|
|
39515
39548
|
}
|
|
39549
|
+
const hasDeclaredControls = Array.isArray(resolved.controls) && resolved.controls.length > 0;
|
|
39550
|
+
if (!hasDeclaredControls) {
|
|
39551
|
+
const synthesized = synthesizeControlsFromControlBar(specControls);
|
|
39552
|
+
if (synthesized.length > 0) {
|
|
39553
|
+
resolved.controls = synthesized;
|
|
39554
|
+
}
|
|
39555
|
+
}
|
|
39516
39556
|
}
|
|
39517
39557
|
if (nh) {
|
|
39518
39558
|
let reader = null;
|