@adhdev/daemon-standalone 0.9.82-rc.286 → 0.9.82-rc.287
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 +24 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29983,10 +29983,10 @@ var require_dist3 = __commonJS({
|
|
|
29983
29983
|
}
|
|
29984
29984
|
function getDaemonBuildInfo() {
|
|
29985
29985
|
if (cached2) return cached2;
|
|
29986
|
-
const commit = readInjected(true ? "
|
|
29987
|
-
const commitShort = readInjected(true ? "
|
|
29988
|
-
const version2 = readInjected(true ? "0.9.82-rc.
|
|
29989
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
29986
|
+
const commit = readInjected(true ? "542b47e003c32fc24f6325d1fd48a6b3ed745edd" : void 0) ?? "unknown";
|
|
29987
|
+
const commitShort = readInjected(true ? "542b47e0" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
29988
|
+
const version2 = readInjected(true ? "0.9.82-rc.287" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
29989
|
+
const builtAt = readInjected(true ? "2026-06-16T02:16:58.716Z" : void 0);
|
|
29990
29990
|
cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
|
|
29991
29991
|
return cached2;
|
|
29992
29992
|
}
|
|
@@ -38426,6 +38426,20 @@ Next step: ${nextStep}`;
|
|
|
38426
38426
|
if (!hostDaemonId) return true;
|
|
38427
38427
|
return daemonIds.includes(hostDaemonId);
|
|
38428
38428
|
}
|
|
38429
|
+
function resolveCoordinatorSelfIds(mesh, drainDaemonIds) {
|
|
38430
|
+
const ids = new Set(drainDaemonIds);
|
|
38431
|
+
for (const node of mesh.nodes) {
|
|
38432
|
+
const nodeDaemonId = readNonEmptyString2(node.daemonId);
|
|
38433
|
+
const nodeMachineId = readNonEmptyString2(node.machineId);
|
|
38434
|
+
const isSelf = nodeDaemonId && drainDaemonIds.includes(nodeDaemonId) || nodeMachineId && drainDaemonIds.includes(nodeMachineId);
|
|
38435
|
+
if (!isSelf) continue;
|
|
38436
|
+
if (nodeDaemonId) ids.add(nodeDaemonId);
|
|
38437
|
+
if (nodeMachineId) ids.add(nodeMachineId);
|
|
38438
|
+
}
|
|
38439
|
+
const hostDaemonId = readNonEmptyString2(mesh.meshHost?.hostDaemonId);
|
|
38440
|
+
if (hostDaemonId && ids.has(hostDaemonId)) ids.add(hostDaemonId);
|
|
38441
|
+
return [...ids];
|
|
38442
|
+
}
|
|
38429
38443
|
function findLiveCoordinators(components) {
|
|
38430
38444
|
const out = [];
|
|
38431
38445
|
for (const inst of components.instanceManager.getByCategory("cli")) {
|
|
@@ -38459,9 +38473,10 @@ Next step: ${nextStep}`;
|
|
|
38459
38473
|
})();
|
|
38460
38474
|
if (dispatchMeshCommand) {
|
|
38461
38475
|
for (const mesh of listMeshes()) {
|
|
38462
|
-
|
|
38476
|
+
const selfIds = resolveCoordinatorSelfIds(mesh, drainDaemonIds);
|
|
38477
|
+
if (!daemonHostsMesh(mesh, selfIds)) continue;
|
|
38463
38478
|
try {
|
|
38464
|
-
await pullRemoteNodeQueues(components, mesh, localDaemonId,
|
|
38479
|
+
await pullRemoteNodeQueues(components, mesh, localDaemonId, selfIds);
|
|
38465
38480
|
} catch (e) {
|
|
38466
38481
|
LOG2.warn("MeshReconcile", `Remote node pull failed for mesh ${mesh.id}: ${e?.message || e}`);
|
|
38467
38482
|
}
|
|
@@ -38509,15 +38524,16 @@ Next step: ${nextStep}`;
|
|
|
38509
38524
|
}
|
|
38510
38525
|
}
|
|
38511
38526
|
}
|
|
38512
|
-
async function pullRemoteNodeQueues(components, mesh, localDaemonId,
|
|
38527
|
+
async function pullRemoteNodeQueues(components, mesh, localDaemonId, candidateDaemonIds) {
|
|
38513
38528
|
const dispatchMeshCommand = components.dispatchMeshCommand;
|
|
38514
38529
|
if (!dispatchMeshCommand) return;
|
|
38515
38530
|
const meshId = mesh.id;
|
|
38516
|
-
const pulls =
|
|
38531
|
+
const pulls = candidateDaemonIds.length > 0 ? candidateDaemonIds.map((id) => ({ meshId, coordinatorDaemonId: id })) : [{ meshId }];
|
|
38517
38532
|
for (const node of mesh.nodes) {
|
|
38518
38533
|
const nodeDaemonId = readNonEmptyString2(node.daemonId);
|
|
38519
38534
|
if (!nodeDaemonId) continue;
|
|
38520
38535
|
if (localDaemonId && nodeDaemonId === localDaemonId) continue;
|
|
38536
|
+
if (candidateDaemonIds.includes(nodeDaemonId)) continue;
|
|
38521
38537
|
for (const pendingEventArgs of pulls) {
|
|
38522
38538
|
let events;
|
|
38523
38539
|
try {
|