@adhdev/daemon-core 0.9.82-rc.321 → 0.9.82-rc.323
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/commands/router.d.ts +13 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +46 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -6
- package/dist/index.mjs.map +1 -1
- package/dist/shared-types.d.ts +9 -0
- package/package.json +2 -2
- package/src/commands/router.ts +22 -2
- package/src/config/mesh-config.ts +60 -1
- package/src/index.ts +1 -1
- package/src/shared-types.d.ts +8 -0
- package/src/shared-types.ts +9 -0
package/dist/index.mjs
CHANGED
|
@@ -308,10 +308,10 @@ function readInjected(value) {
|
|
|
308
308
|
}
|
|
309
309
|
function getDaemonBuildInfo() {
|
|
310
310
|
if (cached) return cached;
|
|
311
|
-
const commit = readInjected(true ? "
|
|
312
|
-
const commitShort = readInjected(true ? "
|
|
313
|
-
const version = readInjected(true ? "0.9.82-rc.
|
|
314
|
-
const builtAt = readInjected(true ? "2026-06-
|
|
311
|
+
const commit = readInjected(true ? "c19690a16292dbcb1ed5ff5458b94596fce46e38" : void 0) ?? "unknown";
|
|
312
|
+
const commitShort = readInjected(true ? "c19690a1" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
|
|
313
|
+
const version = readInjected(true ? "0.9.82-rc.323" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
|
|
314
|
+
const builtAt = readInjected(true ? "2026-06-19T06:24:49.522Z" : void 0);
|
|
315
315
|
cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
|
|
316
316
|
return cached;
|
|
317
317
|
}
|
|
@@ -1547,11 +1547,42 @@ function loadMeshConfig() {
|
|
|
1547
1547
|
try {
|
|
1548
1548
|
const raw = JSON.parse(readFileSync2(path42, "utf-8"));
|
|
1549
1549
|
if (!raw || !Array.isArray(raw.meshes)) return { meshes: [] };
|
|
1550
|
-
|
|
1550
|
+
const config = raw;
|
|
1551
|
+
const migrated = migrateLoadedMeshConfig(config);
|
|
1552
|
+
if (migrated) {
|
|
1553
|
+
try {
|
|
1554
|
+
saveMeshConfig(config);
|
|
1555
|
+
} catch {
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
return config;
|
|
1551
1559
|
} catch {
|
|
1552
1560
|
return { meshes: [] };
|
|
1553
1561
|
}
|
|
1554
1562
|
}
|
|
1563
|
+
function migrateLoadedMeshConfig(config) {
|
|
1564
|
+
let changed = false;
|
|
1565
|
+
for (const mesh of config.meshes) {
|
|
1566
|
+
if (!mesh || !Array.isArray(mesh.nodes)) continue;
|
|
1567
|
+
for (const node of mesh.nodes) {
|
|
1568
|
+
if (stripDeadRoleFromProviderRoles(node?.policy)) changed = true;
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
return changed;
|
|
1572
|
+
}
|
|
1573
|
+
function stripDeadRoleFromProviderRoles(policy) {
|
|
1574
|
+
if (!policy || typeof policy !== "object") return false;
|
|
1575
|
+
const roles = policy.providerRoles;
|
|
1576
|
+
if (!Array.isArray(roles)) return false;
|
|
1577
|
+
let changed = false;
|
|
1578
|
+
for (const entry of roles) {
|
|
1579
|
+
if (entry && typeof entry === "object" && !Array.isArray(entry) && Object.prototype.hasOwnProperty.call(entry, "role")) {
|
|
1580
|
+
delete entry.role;
|
|
1581
|
+
changed = true;
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
return changed;
|
|
1585
|
+
}
|
|
1555
1586
|
function normalizeCapabilityTags(value) {
|
|
1556
1587
|
if (!Array.isArray(value)) return void 0;
|
|
1557
1588
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -42396,7 +42427,7 @@ function buildMeshNodeDisplayLabel(node, nodeId, providerPriority) {
|
|
|
42396
42427
|
const explicit = readStringValue(node.machineLabel, node.machine_label, node.machineNickname, node.machine_nickname, node.alias);
|
|
42397
42428
|
if (explicit) return explicit;
|
|
42398
42429
|
const workspace = readStringValue(node.workspace, node.repoRoot, node.repo_root);
|
|
42399
|
-
const workspaceName = workspace ?
|
|
42430
|
+
const workspaceName = workspace ? workingDirBasename(workspace) : void 0;
|
|
42400
42431
|
const host = readStringValue(node.machineName, node.machine_name, node.hostname, node.host, node.daemonId, node.daemon_id, node.machineId, node.machine_id);
|
|
42401
42432
|
const provider = providerPriority[0] || (Array.isArray(node.providers) ? readStringValue(...node.providers) : void 0);
|
|
42402
42433
|
const parts = [workspaceName, host, provider].filter(Boolean);
|
|
@@ -42893,6 +42924,13 @@ function readCachedInlineMeshActiveSessions(node) {
|
|
|
42893
42924
|
const sessionId = readStringValue(fallbackSession.id, fallbackSession.sessionId, fallbackSession.session_id, node?.activeSessionId, node?.active_session_id, node?.sessionId, node?.session_id);
|
|
42894
42925
|
return sessionId ? [sessionId] : [];
|
|
42895
42926
|
}
|
|
42927
|
+
function resolveMeshNodeAttribution(node) {
|
|
42928
|
+
const record = readObjectRecord(node);
|
|
42929
|
+
return {
|
|
42930
|
+
daemonId: readMeshNodeDaemonId(record),
|
|
42931
|
+
machineName: readMeshNodeDisplayMachineName(record)
|
|
42932
|
+
};
|
|
42933
|
+
}
|
|
42896
42934
|
function readCachedInlineMeshActiveSessionDetails(node) {
|
|
42897
42935
|
const cachedStatus = readObjectRecord(node?.cachedStatus);
|
|
42898
42936
|
const activeSession = readObjectRecord(cachedStatus.activeSession);
|
|
@@ -58388,6 +58426,7 @@ export {
|
|
|
58388
58426
|
resolveDeliveryDecision,
|
|
58389
58427
|
resolveGitRepository,
|
|
58390
58428
|
resolveMeshHostStatus,
|
|
58429
|
+
resolveMeshNodeAttribution,
|
|
58391
58430
|
resolveMeshRefineValidationPlan,
|
|
58392
58431
|
resolveNodeSchedulingPriority,
|
|
58393
58432
|
resolveSessionHostAppName,
|