@adhdev/daemon-standalone 1.0.49-rc.3 → 1.0.49-rc.4
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
|
@@ -37056,10 +37056,10 @@ var require_dist3 = __commonJS({
|
|
|
37056
37056
|
}
|
|
37057
37057
|
function getDaemonBuildInfo() {
|
|
37058
37058
|
if (cached2) return cached2;
|
|
37059
|
-
const commit = readInjected(true ? "
|
|
37060
|
-
const commitShort = readInjected(true ? "
|
|
37061
|
-
const version2 = readInjected(true ? "1.0.49-rc.
|
|
37062
|
-
const builtAt = readInjected(true ? "2026-08-
|
|
37059
|
+
const commit = readInjected(true ? "9884122c80eb621bb1e4da9f0269c9bb2e8421fe" : void 0) ?? "unknown";
|
|
37060
|
+
const commitShort = readInjected(true ? "9884122c" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
37061
|
+
const version2 = readInjected(true ? "1.0.49-rc.4" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
37062
|
+
const builtAt = readInjected(true ? "2026-08-14T10:06:01.458Z" : void 0);
|
|
37063
37063
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
37064
37064
|
return cached2;
|
|
37065
37065
|
}
|
|
@@ -42270,6 +42270,8 @@ ${error48.message || ""}`;
|
|
|
42270
42270
|
interpolateArgs: () => interpolateArgs,
|
|
42271
42271
|
interpolateString: () => interpolateString,
|
|
42272
42272
|
isMeshTaskDifficulty: () => isMeshTaskDifficulty,
|
|
42273
|
+
isPhantomDaemonEntry: () => isPhantomDaemonEntry,
|
|
42274
|
+
isRawDaemonDoId: () => isRawDaemonDoId,
|
|
42273
42275
|
joinRepoPath: () => joinRepoPath,
|
|
42274
42276
|
machineCoreFromDaemonId: () => machineCoreFromDaemonId,
|
|
42275
42277
|
meshNodeIdMatches: () => meshNodeIdMatches,
|
|
@@ -42565,6 +42567,18 @@ ${error48.message || ""}`;
|
|
|
42565
42567
|
if (!left || !right) return false;
|
|
42566
42568
|
return left === right;
|
|
42567
42569
|
}
|
|
42570
|
+
function isRawDaemonDoId(id) {
|
|
42571
|
+
const trimmed = readString2(id);
|
|
42572
|
+
return !!trimmed && /^[0-9a-f]{64}$/i.test(trimmed);
|
|
42573
|
+
}
|
|
42574
|
+
function isPhantomDaemonEntry(entry) {
|
|
42575
|
+
if (!entry) return false;
|
|
42576
|
+
if (!isRawDaemonDoId(entry.id)) return false;
|
|
42577
|
+
const hasMachineEvidence = Boolean(
|
|
42578
|
+
readString2(entry.machineNickname) || readString2(entry.nickname) || readString2(entry.hostname) || readString2(entry.platform) || readString2(entry.machine?.hostname) || readString2(entry.machine?.platform) || readString2(entry.machineId) || Array.isArray(entry.sessions) && entry.sessions.length > 0
|
|
42579
|
+
);
|
|
42580
|
+
return !hasMachineEvidence;
|
|
42581
|
+
}
|
|
42568
42582
|
function machineCoreFromDaemonId(id) {
|
|
42569
42583
|
const trimmed = readString2(id);
|
|
42570
42584
|
if (!trimmed) return void 0;
|
|
@@ -55444,6 +55458,8 @@ ${rendered}`, "utf-8");
|
|
|
55444
55458
|
});
|
|
55445
55459
|
function readProviderPriorityFromPolicy(policy) {
|
|
55446
55460
|
const record2 = policy && typeof policy === "object" && !Array.isArray(policy) ? policy : {};
|
|
55461
|
+
const derived = deriveProviderPriorityFromSlots(record2.slots);
|
|
55462
|
+
if (derived.length) return derived;
|
|
55447
55463
|
const raw = record2.providerPriority;
|
|
55448
55464
|
if (Array.isArray(raw)) {
|
|
55449
55465
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -55454,7 +55470,7 @@ ${rendered}`, "utf-8");
|
|
|
55454
55470
|
});
|
|
55455
55471
|
if (explicit.length) return explicit;
|
|
55456
55472
|
}
|
|
55457
|
-
return
|
|
55473
|
+
return [];
|
|
55458
55474
|
}
|
|
55459
55475
|
function normalizeProviderRoles(value) {
|
|
55460
55476
|
if (!Array.isArray(value)) return [];
|
|
@@ -55536,7 +55552,7 @@ ${rendered}`, "utf-8");
|
|
|
55536
55552
|
const workspace = readStringValue(node.workspace, node.repoRoot, node.repo_root);
|
|
55537
55553
|
const workspaceName = workspace ? workingDirBasename(workspace) : void 0;
|
|
55538
55554
|
const host = readStringValue(node.machineName, node.machine_name, node.hostname, node.host, node.daemonId, node.daemon_id, node.machineId, node.machine_id);
|
|
55539
|
-
const provider = providerPriority[0] || (Array.isArray(node.providers) ? readStringValue(...node.providers) : void 0);
|
|
55555
|
+
const provider = readProviderPriorityFromPolicy(node.policy)[0] || providerPriority[0] || (Array.isArray(node.providers) ? readStringValue(...node.providers) : void 0);
|
|
55540
55556
|
const parts = [workspaceName, host, provider].filter(Boolean);
|
|
55541
55557
|
if (parts.length > 0) return parts.join(" \xB7 ");
|
|
55542
55558
|
return nodeId || "unidentified mesh node";
|
|
@@ -110583,7 +110599,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
110583
110599
|
...slots.length ? { slots } : {}
|
|
110584
110600
|
};
|
|
110585
110601
|
if (providerRoles.length) migrateProviderRolesToSlots2(policy);
|
|
110586
|
-
|
|
110602
|
+
syncProviderPriorityFromSlots(policy);
|
|
110587
110603
|
const role = normalizeMeshDaemonRole(args?.role);
|
|
110588
110604
|
const daemonId = typeof args?.daemonId === "string" && args.daemonId.trim() ? args.daemonId.trim() : void 0;
|
|
110589
110605
|
const machineId = typeof args?.machineId === "string" && args.machineId.trim() ? args.machineId.trim() : void 0;
|
|
@@ -110635,10 +110651,8 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
110635
110651
|
else delete policy.providerRoles;
|
|
110636
110652
|
}
|
|
110637
110653
|
migrateProviderRolesToSlots2(policy);
|
|
110638
|
-
|
|
110639
|
-
|
|
110640
|
-
syncProviderPriorityFromSlots(policy, finalSlots);
|
|
110641
|
-
}
|
|
110654
|
+
const finalSlots = Object.prototype.hasOwnProperty.call(policy, "slots") ? policy.slots : getMesh2(meshId)?.nodes.find((n) => n.id === nodeId)?.policy?.slots;
|
|
110655
|
+
syncProviderPriorityFromSlots(policy, finalSlots);
|
|
110642
110656
|
const patch = { policy };
|
|
110643
110657
|
if (typeof args?.systemPrompt === "string") {
|
|
110644
110658
|
const trimmed = args.systemPrompt.trim();
|
|
@@ -110663,9 +110677,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
|
|
|
110663
110677
|
...inlineNode.policy && typeof inlineNode.policy === "object" && !Array.isArray(inlineNode.policy) ? inlineNode.policy : {},
|
|
110664
110678
|
...patch.policy
|
|
110665
110679
|
};
|
|
110666
|
-
|
|
110667
|
-
syncProviderPriorityFromSlots(inlineNode.policy);
|
|
110668
|
-
}
|
|
110680
|
+
syncProviderPriorityFromSlots(inlineNode.policy);
|
|
110669
110681
|
if (Object.prototype.hasOwnProperty.call(patch, "systemPrompt")) {
|
|
110670
110682
|
const sp = patch.systemPrompt;
|
|
110671
110683
|
if (typeof sp === "string" && sp.trim()) inlineNode.systemPrompt = sp;
|