@adhdev/daemon-core 0.9.82-rc.512 → 0.9.82-rc.514

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.
@@ -38,6 +38,13 @@ export declare function detectCLI(cliId: string, providerLoader?: ProviderLoader
38
38
  * what the git_status envelope carries and the mesh_status skew check compares.
39
39
  */
40
40
  export declare function buildProviderVersions(detected: CLIInfo[]): Record<string, string>;
41
+ /**
42
+ * Register this daemon's ProviderLoader as the fallback used by loader-less
43
+ * provider-version reads (getCachedProviderVersions() with no argument). Called
44
+ * once at boot. Without it the coordinator's self node never resolves a CLI list,
45
+ * so its provider-version chips stay empty even though remote nodes populate.
46
+ */
47
+ export declare function setDefaultProviderLoader(providerLoader: ProviderLoader): void;
41
48
  /**
42
49
  * Return the current cached provider-versions map for this daemon, triggering a
43
50
  * lazy background refresh when the snapshot is stale/cold. Never blocks: returns
package/dist/index.js CHANGED
@@ -417,10 +417,10 @@ function readInjected(value) {
417
417
  }
418
418
  function getDaemonBuildInfo() {
419
419
  if (cached) return cached;
420
- const commit = readInjected(true ? "4b2e3f139a80dafe856815ed12e8c671418d53ba" : void 0) ?? "unknown";
421
- const commitShort = readInjected(true ? "4b2e3f13" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
422
- const version = readInjected(true ? "0.9.82-rc.512" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
423
- const builtAt = readInjected(true ? "2026-07-13T05:22:49.552Z" : void 0);
420
+ const commit = readInjected(true ? "380556d36ec79e6fb92d2323b43226d45f8239a6" : void 0) ?? "unknown";
421
+ const commitShort = readInjected(true ? "380556d3" : void 0) ?? (commit !== "unknown" ? commit.slice(0, 7) : "unknown");
422
+ const version = readInjected(true ? "0.9.82-rc.514" : void 0) ?? readInjected(typeof process !== "undefined" ? process.env?.ADHDEV_PKG_VERSION : void 0) ?? "unknown";
423
+ const builtAt = readInjected(true ? "2026-07-13T06:16:17.656Z" : void 0);
424
424
  cached = builtAt ? { commit, commitShort, version, builtAt } : { commit, commitShort, version };
425
425
  return cached;
426
426
  }
@@ -14179,11 +14179,15 @@ function buildProviderVersions(detected) {
14179
14179
  }
14180
14180
  return out;
14181
14181
  }
14182
+ function setDefaultProviderLoader(providerLoader) {
14183
+ defaultProviderLoader = providerLoader;
14184
+ }
14182
14185
  function refreshProviderVersionsSnapshot(providerLoader) {
14183
14186
  if (providerVersionsRefreshInFlight) return providerVersionsRefreshInFlight;
14187
+ const loader = providerLoader ?? defaultProviderLoader;
14184
14188
  providerVersionsRefreshInFlight = (async () => {
14185
14189
  try {
14186
- const detected = await detectCLIs(providerLoader, { includeVersion: true });
14190
+ const detected = await detectCLIs(loader, { includeVersion: true });
14187
14191
  cachedProviderVersions = buildProviderVersions(detected);
14188
14192
  cachedProviderVersionsAt = Date.now();
14189
14193
  } catch {
@@ -14200,7 +14204,7 @@ function getCachedProviderVersions(providerLoader) {
14200
14204
  }
14201
14205
  return { ...cachedProviderVersions };
14202
14206
  }
14203
- var import_child_process2, os6, path12, import_fs12, PROVIDER_VERSIONS_TTL_MS, cachedProviderVersions, cachedProviderVersionsAt, providerVersionsRefreshInFlight;
14207
+ var import_child_process2, os6, path12, import_fs12, PROVIDER_VERSIONS_TTL_MS, cachedProviderVersions, cachedProviderVersionsAt, providerVersionsRefreshInFlight, defaultProviderLoader;
14204
14208
  var init_cli_detector = __esm({
14205
14209
  "src/detection/cli-detector.ts"() {
14206
14210
  "use strict";
@@ -14613,9 +14617,9 @@ function recordInlineMeshDirectGitTruth(node, git, source) {
14613
14617
  if (reporterArch) node.reportedArch = reporterArch;
14614
14618
  const reporterMachineNickname = readStringValue(git.reporterMachineNickname) ?? null;
14615
14619
  if (reporterMachineNickname) node.machineNickname = reporterMachineNickname;
14616
- const reporterProviderVersions = readProviderVersionsRecord(git.reporterProviderVersions);
14620
+ const reporterProviderVersions = readProviderVersionsRecord(git.reporterProviderVersions) ?? (isLocalSource ? readLocalReporterProviderVersions() : null);
14617
14621
  if (reporterProviderVersions) node.reportedProviderVersions = reporterProviderVersions;
14618
- const reporterDaemonBuildVersion = readStringValue(git.reporterDaemonBuildVersion) ?? null;
14622
+ const reporterDaemonBuildVersion = readStringValue(git.reporterDaemonBuildVersion) ?? (isLocalSource ? readLocalReporterDaemonBuildVersion() : null) ?? null;
14619
14623
  if (reporterDaemonBuildVersion) node.reportedDaemonBuildVersion = reporterDaemonBuildVersion;
14620
14624
  return {
14621
14625
  reporterPlatform,
@@ -14636,6 +14640,21 @@ function readProviderVersionsRecord(value) {
14636
14640
  }
14637
14641
  return Object.keys(out).length > 0 ? out : null;
14638
14642
  }
14643
+ function readLocalReporterProviderVersions() {
14644
+ try {
14645
+ return readProviderVersionsRecord(getCachedProviderVersions());
14646
+ } catch {
14647
+ return null;
14648
+ }
14649
+ }
14650
+ function readLocalReporterDaemonBuildVersion() {
14651
+ try {
14652
+ const version = getDaemonBuildInfo().version;
14653
+ return typeof version === "string" && version.trim() && version !== "unknown" ? version.trim() : null;
14654
+ } catch {
14655
+ return null;
14656
+ }
14657
+ }
14639
14658
  function stampNodeReporterPlatform(node, platform10, arch2) {
14640
14659
  if (!node || typeof node !== "object" || Array.isArray(node)) return;
14641
14660
  if (!platform10 && !arch2) return;
@@ -15617,6 +15636,7 @@ var init_mesh_node_identity = __esm({
15617
15636
  "src/mesh/mesh-node-identity.ts"() {
15618
15637
  "use strict";
15619
15638
  init_cli_detector();
15639
+ init_build_info();
15620
15640
  init_git_status();
15621
15641
  init_dist();
15622
15642
  init_logger();
@@ -58663,6 +58683,12 @@ var meshStatusHandlers = {
58663
58683
  }
58664
58684
  applyInlineMeshBranchConvergence(mesh, node, status);
58665
58685
  finalizeMeshNodeStatus({ status, node, daemonId, isSelfNode, directTruthUnavailable: directTruthUnavailableNodeIds.has(nodeId) });
58686
+ if (node.reportedProviderVersions && typeof node.reportedProviderVersions === "object") {
58687
+ status.providerVersions = node.reportedProviderVersions;
58688
+ }
58689
+ if (typeof node.reportedDaemonBuildVersion === "string" && node.reportedDaemonBuildVersion) {
58690
+ status.daemonBuildVersion = node.reportedDaemonBuildVersion;
58691
+ }
58666
58692
  return status;
58667
58693
  };
58668
58694
  const meshNodeEntries = [...(mesh.nodes || []).entries()];
@@ -70875,6 +70901,7 @@ async function initDaemonComponents(config) {
70875
70901
  });
70876
70902
  providerLoader.loadAll();
70877
70903
  providerLoader.registerToDetector();
70904
+ setDefaultProviderLoader(providerLoader);
70878
70905
  const versionArchive = new VersionArchive();
70879
70906
  providerLoader.setVersionArchive(versionArchive);
70880
70907
  setTimeout(() => {