@adhdev/daemon-core 0.9.82-rc.326 → 0.9.82-rc.327

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.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 ? "9ee42155ad394578ced8959105e9a2c35d0af11b" : void 0) ?? "unknown";
312
- const commitShort = readInjected(true ? "9ee42155" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
313
- const version = readInjected(true ? "0.9.82-rc.326" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
314
- const builtAt = readInjected(true ? "2026-06-19T10:16:19.073Z" : void 0);
311
+ const commit = readInjected(true ? "993e3922de8abe554822450e2b4c26c2c9f5f64a" : void 0) ?? "unknown";
312
+ const commitShort = readInjected(true ? "993e3922" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
313
+ const version = readInjected(true ? "0.9.82-rc.327" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
314
+ const builtAt = readInjected(true ? "2026-06-19T12:31:25.870Z" : void 0);
315
315
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
316
316
  return cached;
317
317
  }
@@ -1940,6 +1940,8 @@ function updateNode(meshId, nodeId, opts) {
1940
1940
  const node = mesh.nodes.find((n) => n.id === nodeId);
1941
1941
  if (!node) return void 0;
1942
1942
  if (opts.userOverrides) node.userOverrides = { ...node.userOverrides, ...opts.userOverrides };
1943
+ if (opts.reportedPlatform && opts.reportedPlatform.trim()) node.reportedPlatform = opts.reportedPlatform.trim();
1944
+ if (opts.reportedArch && opts.reportedArch.trim()) node.reportedArch = opts.reportedArch.trim();
1943
1945
  if (opts.policy) node.policy = { ...node.policy, ...opts.policy };
1944
1946
  if (opts.worktreeBootstrap) node.worktreeBootstrap = opts.worktreeBootstrap;
1945
1947
  if (Object.prototype.hasOwnProperty.call(opts, "systemPrompt")) {
@@ -3104,11 +3106,15 @@ function readNodeOverride(node, key) {
3104
3106
  const value = overrides[key];
3105
3107
  return typeof value === "string" && value.trim() ? value.trim() : null;
3106
3108
  }
3109
+ function readNodeReporter(node, key) {
3110
+ const value = key === "platform" ? node?.reportedPlatform : node?.reportedArch;
3111
+ return typeof value === "string" && value.trim() ? value.trim() : null;
3112
+ }
3107
3113
  function buildMeshNodeCapabilityTags(node, providerType) {
3108
3114
  const provider = typeof providerType === "string" && providerType.trim() ? providerType.trim() : firstProviderPriority(node?.policy);
3109
3115
  const worktreeBranch = typeof node?.worktreeBranch === "string" && node.worktreeBranch.trim() ? node.worktreeBranch.trim() : null;
3110
- const os30 = readNodeOverride(node, "platform") ?? process.platform;
3111
- const arch2 = readNodeOverride(node, "arch") ?? process.arch;
3116
+ const os30 = readNodeOverride(node, "platform") ?? readNodeReporter(node, "platform") ?? process.platform;
3117
+ const arch2 = readNodeOverride(node, "arch") ?? readNodeReporter(node, "arch") ?? process.arch;
3112
3118
  return normalizeMeshCapabilityTags([
3113
3119
  ...Array.isArray(node?.capabilities) ? node.capabilities : [],
3114
3120
  `os=${os30}`,
@@ -42856,7 +42862,9 @@ function buildLivePeerGitConnection(connection, timestamp = (/* @__PURE__ */ new
42856
42862
  };
42857
42863
  }
42858
42864
  function recordInlineMeshDirectGitTruth(node, git, source) {
42859
- if (!node || typeof node !== "object" || Array.isArray(node)) return;
42865
+ if (!node || typeof node !== "object" || Array.isArray(node)) {
42866
+ return { reporterPlatform: null, reporterArch: null };
42867
+ }
42860
42868
  const checkedAt = readNumberValue(git.lastCheckedAt) ?? Date.now();
42861
42869
  const updatedAt = new Date(checkedAt).toISOString();
42862
42870
  const nextGit = {
@@ -42878,6 +42886,9 @@ function recordInlineMeshDirectGitTruth(node, git, source) {
42878
42886
  const reporterPlatform = readStringValue(git.reporterPlatform) ?? (isLocalSource ? process.platform : null);
42879
42887
  const reporterArch = readStringValue(git.reporterArch) ?? (isLocalSource ? process.arch : null);
42880
42888
  stampNodeReporterPlatform(node, reporterPlatform, reporterArch);
42889
+ if (reporterPlatform) node.reportedPlatform = reporterPlatform;
42890
+ if (reporterArch) node.reportedArch = reporterArch;
42891
+ return { reporterPlatform, reporterArch };
42881
42892
  }
42882
42893
  function stampNodeReporterPlatform(node, platform10, arch2) {
42883
42894
  if (!node || typeof node !== "object" || Array.isArray(node)) return;
@@ -42894,6 +42905,16 @@ function stampNodeReporterPlatform(node, platform10, arch2) {
42894
42905
  }
42895
42906
  if (changed) node.userOverrides = overrides;
42896
42907
  }
42908
+ function persistNodeReporterPlatform(meshSource, mesh, nodeId, reporter) {
42909
+ if (meshSource !== "local_config") return;
42910
+ const meshId = readStringValue(mesh?.id);
42911
+ if (!meshId || !nodeId) return;
42912
+ const reportedPlatform = reporter.reporterPlatform ?? void 0;
42913
+ const reportedArch = reporter.reporterArch ?? void 0;
42914
+ if (!reportedPlatform && !reportedArch) return;
42915
+ void Promise.resolve().then(() => (init_mesh_config(), mesh_config_exports)).then(({ updateNode: updateNode2 }) => updateNode2(meshId, nodeId, { reportedPlatform, reportedArch })).catch(() => {
42916
+ });
42917
+ }
42897
42918
  function buildCachedInlineMeshGitStatus(node) {
42898
42919
  const liveGit = buildInlineMeshTransitGitStatus(node);
42899
42920
  if (liveGit) return liveGit;
@@ -43475,7 +43496,8 @@ async function hydrateInlineMeshDirectTruth(args) {
43475
43496
  try {
43476
43497
  const localGit = await getGitRepoStatus(workspace, { timeoutMs: 1e4, refreshUpstream: true });
43477
43498
  if (localGit?.isGitRepo) {
43478
- recordInlineMeshDirectGitTruth(node, localGit, "selected_coordinator_local_git");
43499
+ const reporter = recordInlineMeshDirectGitTruth(node, localGit, "selected_coordinator_local_git");
43500
+ persistNodeReporterPlatform(args.meshSource, args.mesh, nodeId, reporter);
43479
43501
  localConfirmedCount += 1;
43480
43502
  continue;
43481
43503
  }
@@ -43505,7 +43527,8 @@ async function hydrateInlineMeshDirectTruth(args) {
43505
43527
  });
43506
43528
  const remoteGit = args.probeCache ? await args.probeCache.probe(daemonId, workspace, runProbe) : await runProbe();
43507
43529
  if (remoteGit) {
43508
- recordInlineMeshDirectGitTruth(node, remoteGit, "selected_coordinator_mesh_p2p_git");
43530
+ const reporter = recordInlineMeshDirectGitTruth(node, remoteGit, "selected_coordinator_mesh_p2p_git");
43531
+ persistNodeReporterPlatform(args.meshSource, args.mesh, nodeId, reporter);
43509
43532
  peerConfirmedCount += 1;
43510
43533
  continue;
43511
43534
  }
@@ -49722,7 +49745,8 @@ ${ptyResult.output.slice(-2e3)}`);
49722
49745
  if (!connectionReported || connectionState === "unknown") {
49723
49746
  status.connection = buildLivePeerGitConnection(connection, refreshedAt);
49724
49747
  }
49725
- recordInlineMeshDirectGitTruth(node, remoteGit, "selected_coordinator_mesh_p2p_git");
49748
+ const reporter = recordInlineMeshDirectGitTruth(node, remoteGit, "selected_coordinator_mesh_p2p_git");
49749
+ persistNodeReporterPlatform(meshRecord.source, mesh, nodeId, reporter);
49726
49750
  remoteProbeApplied = true;
49727
49751
  }
49728
49752
  }
@@ -49754,7 +49778,8 @@ ${ptyResult.output.slice(-2e3)}`);
49754
49778
  try {
49755
49779
  const gitStatus = await getGitRepoStatus(workspace, { timeoutMs: 1e4, refreshUpstream: true });
49756
49780
  status.git = gitStatus;
49757
- recordInlineMeshDirectGitTruth(node, gitStatus, "selected_coordinator_local_git");
49781
+ const reporter = recordInlineMeshDirectGitTruth(node, gitStatus, "selected_coordinator_local_git");
49782
+ persistNodeReporterPlatform(meshRecord.source, mesh, nodeId, reporter);
49758
49783
  if (gitStatus.isGitRepo) {
49759
49784
  status.health = deriveMeshNodeHealthFromGit(gitStatus);
49760
49785
  } else {