@adhdev/daemon-standalone 0.9.82-rc.321 → 0.9.82-rc.322

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
@@ -30033,10 +30033,10 @@ var require_dist3 = __commonJS({
30033
30033
  }
30034
30034
  function getDaemonBuildInfo() {
30035
30035
  if (cached2) return cached2;
30036
- const commit = readInjected(true ? "d41c5687bc8d6f8a7c7f7ffeb3faac5801f146f1" : void 0) ?? "unknown";
30037
- const commitShort = readInjected(true ? "d41c5687" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30038
- const version2 = readInjected(true ? "0.9.82-rc.321" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30039
- const builtAt = readInjected(true ? "2026-06-19T03:21:15.525Z" : void 0);
30036
+ const commit = readInjected(true ? "c19690a16292dbcb1ed5ff5458b94596fce46e38" : void 0) ?? "unknown";
30037
+ const commitShort = readInjected(true ? "c19690a1" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
30038
+ const version2 = readInjected(true ? "0.9.82-rc.322" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
30039
+ const builtAt = readInjected(true ? "2026-06-19T05:42:31.997Z" : void 0);
30040
30040
  cached2 = builtAt ? { commit, commitShort, version: version2, builtAt } : { commit, commitShort, version: version2 };
30041
30041
  return cached2;
30042
30042
  }
@@ -31276,11 +31276,42 @@ ${error48.message || ""}`;
31276
31276
  try {
31277
31277
  const raw = JSON.parse((0, import_fs2.readFileSync)(path422, "utf-8"));
31278
31278
  if (!raw || !Array.isArray(raw.meshes)) return { meshes: [] };
31279
- return raw;
31279
+ const config2 = raw;
31280
+ const migrated = migrateLoadedMeshConfig(config2);
31281
+ if (migrated) {
31282
+ try {
31283
+ saveMeshConfig(config2);
31284
+ } catch {
31285
+ }
31286
+ }
31287
+ return config2;
31280
31288
  } catch {
31281
31289
  return { meshes: [] };
31282
31290
  }
31283
31291
  }
31292
+ function migrateLoadedMeshConfig(config2) {
31293
+ let changed = false;
31294
+ for (const mesh of config2.meshes) {
31295
+ if (!mesh || !Array.isArray(mesh.nodes)) continue;
31296
+ for (const node of mesh.nodes) {
31297
+ if (stripDeadRoleFromProviderRoles(node?.policy)) changed = true;
31298
+ }
31299
+ }
31300
+ return changed;
31301
+ }
31302
+ function stripDeadRoleFromProviderRoles(policy) {
31303
+ if (!policy || typeof policy !== "object") return false;
31304
+ const roles = policy.providerRoles;
31305
+ if (!Array.isArray(roles)) return false;
31306
+ let changed = false;
31307
+ for (const entry of roles) {
31308
+ if (entry && typeof entry === "object" && !Array.isArray(entry) && Object.prototype.hasOwnProperty.call(entry, "role")) {
31309
+ delete entry.role;
31310
+ changed = true;
31311
+ }
31312
+ }
31313
+ return changed;
31314
+ }
31284
31315
  function normalizeCapabilityTags(value) {
31285
31316
  if (!Array.isArray(value)) return void 0;
31286
31317
  const seen = /* @__PURE__ */ new Set();
@@ -45966,6 +45997,7 @@ ${lastSnapshot}`;
45966
45997
  resolveDeliveryDecision: () => resolveDeliveryDecision,
45967
45998
  resolveGitRepository: () => resolveGitRepository,
45968
45999
  resolveMeshHostStatus: () => resolveMeshHostStatus,
46000
+ resolveMeshNodeAttribution: () => resolveMeshNodeAttribution,
45969
46001
  resolveMeshRefineValidationPlan: () => resolveMeshRefineValidationPlan,
45970
46002
  resolveNodeSchedulingPriority: () => resolveNodeSchedulingPriority,
45971
46003
  resolveSessionHostAppName: () => resolveSessionHostAppName,
@@ -72286,7 +72318,7 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
72286
72318
  const explicit = readStringValue(node.machineLabel, node.machine_label, node.machineNickname, node.machine_nickname, node.alias);
72287
72319
  if (explicit) return explicit;
72288
72320
  const workspace = readStringValue(node.workspace, node.repoRoot, node.repo_root);
72289
- const workspaceName = workspace ? (0, import_path11.basename)(workspace) : void 0;
72321
+ const workspaceName = workspace ? workingDirBasename(workspace) : void 0;
72290
72322
  const host = readStringValue(node.machineName, node.machine_name, node.hostname, node.host, node.daemonId, node.daemon_id, node.machineId, node.machine_id);
72291
72323
  const provider = providerPriority[0] || (Array.isArray(node.providers) ? readStringValue(...node.providers) : void 0);
72292
72324
  const parts = [workspaceName, host, provider].filter(Boolean);
@@ -72783,6 +72815,13 @@ ${formatManifestValidationIssues2(validation2.issues)}`);
72783
72815
  const sessionId = readStringValue(fallbackSession.id, fallbackSession.sessionId, fallbackSession.session_id, node?.activeSessionId, node?.active_session_id, node?.sessionId, node?.session_id);
72784
72816
  return sessionId ? [sessionId] : [];
72785
72817
  }
72818
+ function resolveMeshNodeAttribution(node) {
72819
+ const record2 = readObjectRecord(node);
72820
+ return {
72821
+ daemonId: readMeshNodeDaemonId(record2),
72822
+ machineName: readMeshNodeDisplayMachineName(record2)
72823
+ };
72824
+ }
72786
72825
  function readCachedInlineMeshActiveSessionDetails2(node) {
72787
72826
  const cachedStatus = readObjectRecord(node?.cachedStatus);
72788
72827
  const activeSession = readObjectRecord(cachedStatus.activeSession);