@camstack/system 1.2.472 → 1.2.474

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.
Files changed (86) hide show
  1. package/dist/{agent-https-JhvY1axF.mjs → agent-https-CbczsyM0.mjs} +3 -6
  2. package/dist/{agent-https-bnyFRK7Y.js → agent-https-DRwEbLL7.js} +2 -5
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/autotrack/index.js +1 -1
  10. package/dist/builtins/autotrack/index.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  13. package/dist/builtins/calendars/calendars.addon.js +1 -1
  14. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  15. package/dist/builtins/camera-grid/index.js +1 -1
  16. package/dist/builtins/camera-grid/index.mjs +1 -1
  17. package/dist/builtins/composer/composer.addon.js +2 -2
  18. package/dist/builtins/composer/composer.addon.mjs +2 -2
  19. package/dist/builtins/console-logging/index.js +1 -1
  20. package/dist/builtins/console-logging/index.mjs +1 -1
  21. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  22. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  23. package/dist/builtins/device-history/device-history.addon.js +1 -1
  24. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  25. package/dist/builtins/device-manager/device-manager.addon.js +72 -2
  26. package/dist/builtins/device-manager/device-manager.addon.mjs +72 -2
  27. package/dist/builtins/device-manager/device-state-mirror.d.ts +4 -0
  28. package/dist/builtins/device-manager/running-flip.d.ts +11 -0
  29. package/dist/builtins/hub-forwarder/index.js +1 -1
  30. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  31. package/dist/builtins/keychain/index.js +3 -3
  32. package/dist/builtins/keychain/index.mjs +3 -3
  33. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  34. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  35. package/dist/builtins/local-auth/local-auth.addon.js +16 -2
  36. package/dist/builtins/local-auth/local-auth.addon.mjs +16 -2
  37. package/dist/builtins/local-auth/person-scopes.d.ts +7 -0
  38. package/dist/builtins/local-network/local-network.addon.js +2 -2
  39. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  40. package/dist/builtins/loki-logging/index.js +1 -1
  41. package/dist/builtins/loki-logging/index.mjs +1 -1
  42. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  43. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  44. package/dist/builtins/platform-probe/accelerator-facts-probe.d.ts +24 -0
  45. package/dist/builtins/platform-probe/index.js +110 -10
  46. package/dist/builtins/platform-probe/index.mjs +109 -10
  47. package/dist/builtins/platform-probe/platform-scorer.d.ts +10 -2
  48. package/dist/builtins/record-entries/index.js +1 -1
  49. package/dist/builtins/record-entries/index.mjs +1 -1
  50. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  51. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  52. package/dist/builtins/snapshot/index.js +1 -1
  53. package/dist/builtins/snapshot/index.mjs +1 -1
  54. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  55. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  56. package/dist/builtins/sqlite-storage/index.js +1 -1
  57. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  58. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  59. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  60. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  61. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  62. package/dist/builtins/system-config/system-config.addon.js +3 -3
  63. package/dist/builtins/system-config/system-config.addon.mjs +3 -3
  64. package/dist/builtins/winston-logging/index.js +1 -1
  65. package/dist/builtins/winston-logging/index.mjs +1 -1
  66. package/dist/{composition-sources-D3h-tNoJ.js → composition-sources-CJv3W669.js} +1 -1
  67. package/dist/{composition-sources-BY6rFuAE.mjs → composition-sources-CsBIIit3.mjs} +1 -1
  68. package/dist/{constants-CqbO6e9i.js → constants-C0hrXcEr.js} +1 -1
  69. package/dist/{constants-zBiEodEM.mjs → constants-Dy8CaDeT.mjs} +1 -1
  70. package/dist/{device-ca-BWTWWBcc.mjs → device-ca-CHdsePe5.mjs} +1 -1
  71. package/dist/{device-ca-CfiIg3a9.js → device-ca-Dg3rSU48.js} +1 -1
  72. package/dist/{dist-CdFkkmXW.mjs → dist-BugavoVR.mjs} +302 -110
  73. package/dist/{dist-DX5Fu3mV.js → dist-Sn-HiZ4e.js} +307 -109
  74. package/dist/file-host-worker.js +1 -1
  75. package/dist/file-host-worker.mjs +1 -1
  76. package/dist/{hub-mdns-ciao-CYp1Gipm.mjs → hub-mdns-ciao-BDvqGIw4.mjs} +2 -2
  77. package/dist/{hub-mdns-ciao-C174UDzO.js → hub-mdns-ciao-DkncLbg9.js} +2 -2
  78. package/dist/index.js +15 -7
  79. package/dist/index.mjs +15 -7
  80. package/dist/{restore-archive-BX0gaKtG.mjs → restore-archive-CFBm30Gk.mjs} +1 -1
  81. package/dist/{restore-archive-B2jIFfu_.js → restore-archive-gYKzaJ4Y.js} +1 -1
  82. package/dist/{retired-settings-keys-C_Kjp-Bj.mjs → retired-settings-keys-CWp7ZSeA.mjs} +8 -0
  83. package/dist/{retired-settings-keys-CGUqX-Oz.js → retired-settings-keys-DorakcxV.js} +8 -0
  84. package/dist/{wal-maintenance-KHzJXlF2.mjs → wal-maintenance-BnhkcEkI.mjs} +0 -0
  85. package/dist/{wal-maintenance-Dxqd5igw.js → wal-maintenance-DyMUz_Hy.js} +0 -0
  86. package/package.json +6 -6
@@ -3,10 +3,10 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DX5Fu3mV.js");
6
+ const require_dist = require("../../dist-Sn-HiZ4e.js");
7
7
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
8
8
  const require_ms$1 = require("../../ms-LB3giGoU.js");
9
- const require_device_ca = require("../../device-ca-CfiIg3a9.js");
9
+ const require_device_ca = require("../../device-ca-Dg3rSU48.js");
10
10
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
11
11
  let zod = require("zod");
12
12
  let node_crypto = require("node:crypto");
@@ -8821,6 +8821,19 @@ var UserManager = class {
8821
8821
  return this.auth.comparePassword(password, user.passwordHash);
8822
8822
  }
8823
8823
  };
8824
+ //#endregion
8825
+ //#region src/builtins/local-auth/person-scopes.ts
8826
+ /**
8827
+ * What `userManagement.setUserScopes` may store for a person (D921, amended
8828
+ * 2026-10-24): nothing (an admin) or exactly one viewer row. Any other row
8829
+ * is refused. There is no conversion of an older grant set (D900).
8830
+ */
8831
+ function assertPersonScopes(scopes) {
8832
+ if (scopes.length === 0) return;
8833
+ const only = scopes[0];
8834
+ if (scopes.length === 1 && only !== void 0 && only.type === "viewer") return;
8835
+ throw require_dist.userError("auth.person-scopes-refused", void 0, "A person is an admin, with no scope rows, or holds exactly one viewer grant");
8836
+ }
8824
8837
  var JwtSigningKeyKeeper = class {
8825
8838
  deps;
8826
8839
  retryTimer = null;
@@ -12179,6 +12192,7 @@ var LocalAuthAddon = class extends require_dist.BaseAddon {
12179
12192
  },
12180
12193
  setUserScopes: async (input) => {
12181
12194
  if (!this.userManager) throw new Error("User management not available");
12195
+ assertPersonScopes(input.scopes);
12182
12196
  await this.userManager.update(input.userId, { scopes: input.scopes });
12183
12197
  return { success: true };
12184
12198
  },
@@ -1,8 +1,8 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { $ as PreferenceDeviceIdSchema, At as buildDeviceSignatureMessage, E as DEVICE_ENROLLMENT_TTL_MS, Ki as defineRecordKinds, O as DEVICE_NONCE_TTL_MS, Q as PREFERENCES_MAX_VALUE_BYTES, Qt as deviceCredentialsCapability, Ta as userError, ei as BaseAddon, et as PreferenceNamespaceSchema, gt as UserRecordSchema, h as CREDENTIAL_TOKEN_AUDIENCE, hn as formatDeviceRevoker, jr as userManagementCapability, kt as buildDeviceEnrollmentLink, lt as SsoBridgeClaimsSchema, mt as TokenScopeSchema, oa as makeSecretMarker, ra as isSecretMarker, st as ScopedTokenSchema, tt as PreferenceValueSchema, wn as isCredentialTokenPayload, wt as authProviderCapability, y as CredentialTokenClaimsSchema } from "../../dist-CdFkkmXW.mjs";
2
+ import { $ as PreferenceDeviceIdSchema, At as buildDeviceSignatureMessage, E as DEVICE_ENROLLMENT_TTL_MS, Ea as userError, Mr as userManagementCapability, O as DEVICE_NONCE_TTL_MS, Q as PREFERENCES_MAX_VALUE_BYTES, Qt as deviceCredentialsCapability, et as PreferenceNamespaceSchema, gt as UserRecordSchema, h as CREDENTIAL_TOKEN_AUDIENCE, hn as formatDeviceRevoker, ia as isSecretMarker, kt as buildDeviceEnrollmentLink, lt as SsoBridgeClaimsSchema, mt as TokenScopeSchema, qi as defineRecordKinds, sa as makeSecretMarker, st as ScopedTokenSchema, ti as BaseAddon, tt as PreferenceValueSchema, wn as isCredentialTokenPayload, wt as authProviderCapability, y as CredentialTokenClaimsSchema } from "../../dist-BugavoVR.mjs";
3
3
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
4
4
  import { t as require_ms } from "../../ms-CgH2OFlD.mjs";
5
- import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-BWTWWBcc.mjs";
5
+ import { _ as setProcessJwtSigningKey, a as importDevicePublicKey, c as rebuildDeviceCaCertificate, d as JWT_SIGNING_KEY_REF, g as processJwtSigningKey, h as loadJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, r as DEVICE_CA_SETTINGS_SECTION, s as loadDeviceCa, t as DEVICE_CA_FIELD, u as verifyDeviceSignature } from "../../device-ca-CHdsePe5.mjs";
6
6
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
7
7
  import { z } from "zod";
8
8
  import * as crypto$1 from "node:crypto";
@@ -8810,6 +8810,19 @@ var UserManager = class {
8810
8810
  return this.auth.comparePassword(password, user.passwordHash);
8811
8811
  }
8812
8812
  };
8813
+ //#endregion
8814
+ //#region src/builtins/local-auth/person-scopes.ts
8815
+ /**
8816
+ * What `userManagement.setUserScopes` may store for a person (D921, amended
8817
+ * 2026-10-24): nothing (an admin) or exactly one viewer row. Any other row
8818
+ * is refused. There is no conversion of an older grant set (D900).
8819
+ */
8820
+ function assertPersonScopes(scopes) {
8821
+ if (scopes.length === 0) return;
8822
+ const only = scopes[0];
8823
+ if (scopes.length === 1 && only !== void 0 && only.type === "viewer") return;
8824
+ throw userError("auth.person-scopes-refused", void 0, "A person is an admin, with no scope rows, or holds exactly one viewer grant");
8825
+ }
8813
8826
  var JwtSigningKeyKeeper = class {
8814
8827
  deps;
8815
8828
  retryTimer = null;
@@ -12168,6 +12181,7 @@ var LocalAuthAddon = class extends BaseAddon {
12168
12181
  },
12169
12182
  setUserScopes: async (input) => {
12170
12183
  if (!this.userManager) throw new Error("User management not available");
12184
+ assertPersonScopes(input.scopes);
12171
12185
  await this.userManager.update(input.userId, { scopes: input.scopes });
12172
12186
  return { success: true };
12173
12187
  },
@@ -0,0 +1,7 @@
1
+ /**
2
+ * What `userManagement.setUserScopes` may store for a person (D921, amended
3
+ * 2026-10-24): nothing (an admin) or exactly one viewer row. Any other row
4
+ * is refused. There is no conversion of an older grant set (D900).
5
+ */
6
+ import { type UserScope } from "@camstack/types";
7
+ export declare function assertPersonScopes(scopes: readonly UserScope[]): void;
@@ -1,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-DX5Fu3mV.js");
4
- const require_hub_mdns_ciao = require("../../hub-mdns-ciao-C174UDzO.js");
3
+ const require_dist = require("../../dist-Sn-HiZ4e.js");
4
+ const require_hub_mdns_ciao = require("../../hub-mdns-ciao-DkncLbg9.js");
5
5
  let zod = require("zod");
6
6
  let node_net = require("node:net");
7
7
  let node_os = require("node:os");
@@ -1,5 +1,5 @@
1
- import { $r as errMsg, Da as EventCategory, Fn as localNetworkCapability, Ft as checkRoleAddress, H as HUB_MDNS_TXT_KEYS, Nr as validateCustomAddress, Tn as isDefaultAppConnectionEndpoint, V as HUB_MDNS_SERVICE_TYPE, Z as NetworkTunnelStartedDataSchema, Zn as pickAppLinkHub, c as CAMSTACK_APP_LINK_ORIGIN, ei as BaseAddon, or as resolveAppConnections, pr as resolveNotificationTapAddress, ur as resolveHubAddressRoles, xn as isAppLinkBase, yr as shortHostname } from "../../dist-CdFkkmXW.mjs";
2
- import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-CYp1Gipm.mjs";
1
+ import { Fn as localNetworkCapability, Ft as checkRoleAddress, H as HUB_MDNS_TXT_KEYS, Oa as EventCategory, Pr as validateCustomAddress, Qn as pickAppLinkHub, Tn as isDefaultAppConnectionEndpoint, V as HUB_MDNS_SERVICE_TYPE, Z as NetworkTunnelStartedDataSchema, br as shortHostname, c as CAMSTACK_APP_LINK_ORIGIN, dr as resolveHubAddressRoles, ei as errMsg, mr as resolveNotificationTapAddress, sr as resolveAppConnections, ti as BaseAddon, xn as isAppLinkBase } from "../../dist-BugavoVR.mjs";
2
+ import { P as readLanHttpState, a as storeUploadedCertificate, d as servedHttpsLeafFingerprint, g as readTlsMode, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, v as writeExtraSans, w as ensureTlsCert } from "../../hub-mdns-ciao-BDvqGIw4.mjs";
3
3
  import { z } from "zod";
4
4
  import { isIP } from "node:net";
5
5
  import * as os$1 from "node:os";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DX5Fu3mV.js");
6
+ const require_dist = require("../../dist-Sn-HiZ4e.js");
7
7
  const require_log_read_filter = require("../../log-read-filter-Bi066jwU.js");
8
8
  let zod = require("zod");
9
9
  //#region src/builtins/loki-logging/loki-payload.ts
@@ -1,4 +1,4 @@
1
- import { Ln as logDestinationCapability, ei as BaseAddon } from "../../dist-CdFkkmXW.mjs";
1
+ import { Ln as logDestinationCapability, ti as BaseAddon } from "../../dist-BugavoVR.mjs";
2
2
  import { n as compileLogFilter, o as lineMatches } from "../../log-read-filter-D7Ev3zm-.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/builtins/loki-logging/loki-payload.ts
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DX5Fu3mV.js");
6
+ const require_dist = require("../../dist-Sn-HiZ4e.js");
7
7
  let node_fs_promises = require("node:fs/promises");
8
8
  let node_util = require("node:util");
9
9
  let node_os = require("node:os");
@@ -1,4 +1,4 @@
1
- import { $r as errMsg, Da as EventCategory, Ui as createEvent, Un as metricsProviderCapability, ei as BaseAddon, ht as UNATTRIBUTED_BUCKET_KEY, ir as reducePoints, mn as foldSnapshotByFunction, rt as ROOT_BUCKET_KEY, sr as resolveBucketMs } from "../../dist-CdFkkmXW.mjs";
1
+ import { Oa as EventCategory, Un as metricsProviderCapability, Wi as createEvent, ar as reducePoints, cr as resolveBucketMs, ei as errMsg, ht as UNATTRIBUTED_BUCKET_KEY, mn as foldSnapshotByFunction, rt as ROOT_BUCKET_KEY, ti as BaseAddon } from "../../dist-BugavoVR.mjs";
2
2
  import { access, readFile, readdir } from "node:fs/promises";
3
3
  import { promisify } from "node:util";
4
4
  import * as os$1 from "node:os";
@@ -0,0 +1,24 @@
1
+ import { type AcceleratorCompute } from "@camstack/types";
2
+ /** Same name `accelerator_facts.FACTS_FILENAME` writes under the system temp dir. */
3
+ export declare const ACCELERATOR_FACTS_FILENAME = "camstack-accelerator-facts.json";
4
+ /** OpenVINO import is a few seconds; past this the estimate waits for the pool's file. */
5
+ export declare const ACCELERATOR_FACTS_TIMEOUT_MS = 8e3;
6
+ export declare function publishedAcceleratorFactsPath(): string;
7
+ /** `null` when the file is absent, unreadable, or not a facts payload. */
8
+ export declare function readPublishedAcceleratorFacts(filePath: string): readonly AcceleratorCompute[] | null;
9
+ /** Where `accelerator_facts.py` lives, or null when this process cannot see the addon. */
10
+ export declare function findAcceleratorFactsScript(dataDir: string | null | undefined, cwd?: string): string | null;
11
+ export interface AcceleratorFactsExec {
12
+ (command: string, args: readonly string[], timeoutMs: number): Promise<string>;
13
+ }
14
+ export interface AcceleratorFactsProbeInput {
15
+ readonly pythonPath: string | null;
16
+ readonly scriptPath: string | null;
17
+ readonly exec?: AcceleratorFactsExec;
18
+ readonly timeoutMs?: number;
19
+ }
20
+ /**
21
+ * Run the facts script. `null` when there is no interpreter, no script, or
22
+ * the script could not ask the device (it prints `{"accelerators": null}`).
23
+ */
24
+ export declare function runAcceleratorFactsProbe(input: AcceleratorFactsProbeInput): Promise<readonly AcceleratorCompute[] | null>;
@@ -3,8 +3,10 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DX5Fu3mV.js");
6
+ const require_dist = require("../../dist-Sn-HiZ4e.js");
7
7
  const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
8
+ let node_path = require("node:path");
9
+ node_path = require_chunk.__toESM(node_path);
8
10
  let node_util = require("node:util");
9
11
  let node_os = require("node:os");
10
12
  node_os = require_chunk.__toESM(node_os);
@@ -313,7 +315,7 @@ var WINDOWS_PROBE_TIMEOUT_MS = 15e3;
313
315
  * entire Node process (WS handshakes, tRPC subscriptions, metrics — all
314
316
  * stalled). Keeping it async turns the probe into a true background task.
315
317
  */
316
- var execFileAsync = (0, node_util.promisify)(node_child_process.execFile);
318
+ var execFileAsync$1 = (0, node_util.promisify)(node_child_process.execFile);
317
319
  /** Minimal no-op logger for default parameter */
318
320
  var noopLogger = {
319
321
  debug() {},
@@ -341,7 +343,7 @@ async function getAvailableRAM_MB() {
341
343
  const platform = node_os.platform();
342
344
  try {
343
345
  if (platform === "darwin") {
344
- const { stdout: output } = await execFileAsync("vm_stat", [], {
346
+ const { stdout: output } = await execFileAsync$1("vm_stat", [], {
345
347
  encoding: "utf8",
346
348
  timeout: 3e3
347
349
  });
@@ -375,10 +377,17 @@ var PlatformScorer = class {
375
377
  embeddedPythonPath;
376
378
  /** Where the Coral scan reads `/sys` and `/dev` (the host's, unless a spec fakes one). */
377
379
  coralFs;
378
- constructor(logger = noopLogger, embeddedPythonPath = null, coralFs = require_coral_accelerators.nodeCoralFs) {
380
+ /**
381
+ * Asks OpenVINO / WebGPU for compute (D930). Null in tests and when this
382
+ * process has no embedded interpreter — the pool's published file is the
383
+ * other way the same facts arrive.
384
+ */
385
+ readAcceleratorFacts;
386
+ constructor(logger = noopLogger, embeddedPythonPath = null, coralFs = require_coral_accelerators.nodeCoralFs, readAcceleratorFacts = null) {
379
387
  this.logger = logger;
380
388
  this.embeddedPythonPath = embeddedPythonPath;
381
389
  this.coralFs = coralFs;
390
+ this.readAcceleratorFacts = readAcceleratorFacts;
382
391
  }
383
392
  /**
384
393
  * Probe hardware + derive scores from pure rules and score all backend combos.
@@ -569,7 +578,7 @@ var PlatformScorer = class {
569
578
  } });
570
579
  }
571
580
  }
572
- return {
581
+ const hardware = {
573
582
  platform,
574
583
  arch,
575
584
  cpuModel,
@@ -580,6 +589,25 @@ var PlatformScorer = class {
580
589
  npu,
581
590
  coral
582
591
  };
592
+ const accelerators = await this.readAcceleratorCompute();
593
+ return accelerators === null ? hardware : {
594
+ ...hardware,
595
+ accelerators
596
+ };
597
+ }
598
+ /** Compute facts, or null when the probe did not run or could not ask. */
599
+ async readAcceleratorCompute() {
600
+ const read = this.readAcceleratorFacts;
601
+ if (read === null) return null;
602
+ try {
603
+ const facts = await read();
604
+ if (facts === null) return null;
605
+ this.logger.info("accelerator compute probed", { meta: { devices: facts.map((row) => row.deviceKey) } });
606
+ return facts;
607
+ } catch (err) {
608
+ this.logger.warn("accelerator compute probe failed", { meta: { error: require_dist.errMsg(err) } });
609
+ return null;
610
+ }
583
611
  }
584
612
  /**
585
613
  * The Coral part of the probe, with the evidence that decided it logged —
@@ -645,7 +673,7 @@ var PlatformScorer = class {
645
673
  /** NVIDIA's own tool: exact model and VRAM. Null when absent or failing. */
646
674
  async probeNvidiaSmi() {
647
675
  try {
648
- const { stdout } = await execFileAsync("nvidia-smi", ["--query-gpu=name,memory.total", "--format=csv,noheader"], {
676
+ const { stdout } = await execFileAsync$1("nvidia-smi", ["--query-gpu=name,memory.total", "--format=csv,noheader"], {
649
677
  encoding: "utf8",
650
678
  timeout: 5e3,
651
679
  windowsHide: true
@@ -666,7 +694,7 @@ var PlatformScorer = class {
666
694
  /** Windows WMI probe; bounded, and a failure is a log line, never a boot failure. */
667
695
  async probeWindowsHardwareSafely() {
668
696
  const run = async (file, args) => {
669
- const { stdout } = await execFileAsync(file, [...args], {
697
+ const { stdout } = await execFileAsync$1(file, [...args], {
670
698
  encoding: "utf8",
671
699
  timeout: WINDOWS_PROBE_TIMEOUT_MS,
672
700
  windowsHide: true,
@@ -703,7 +731,7 @@ var PlatformScorer = class {
703
731
  "python"
704
732
  ];
705
733
  for (const cmd of candidates) try {
706
- await execFileAsync(cmd, ["--version"], { timeout: 5e3 });
734
+ await execFileAsync$1(cmd, ["--version"], { timeout: 5e3 });
707
735
  return cmd;
708
736
  } catch (err) {
709
737
  this.logger.debug(`Python command "${cmd}" not found`, { meta: { error: require_dist.errMsg(err) } });
@@ -801,6 +829,68 @@ var InferenceConfigResolver = class {
801
829
  }
802
830
  };
803
831
  //#endregion
832
+ //#region src/builtins/platform-probe/accelerator-facts-probe.ts
833
+ /**
834
+ * Read the accelerator compute the inference worker published (D930), or ask
835
+ * the same script once when this process has the embedded interpreter.
836
+ *
837
+ * A missing file and a failed probe are `null` — not an empty list, and not
838
+ * zeros. `getHardware` overlays a published file onto the cached probe so a
839
+ * pool that starts later still reaches Auto tune.
840
+ */
841
+ /** Same name `accelerator_facts.FACTS_FILENAME` writes under the system temp dir. */
842
+ var ACCELERATOR_FACTS_FILENAME = "camstack-accelerator-facts.json";
843
+ var execFileAsync = (0, node_util.promisify)(node_child_process.execFile);
844
+ function publishedAcceleratorFactsPath() {
845
+ return node_path.join(node_os.tmpdir(), ACCELERATOR_FACTS_FILENAME);
846
+ }
847
+ function jsonValue(text) {
848
+ return JSON.parse(text);
849
+ }
850
+ /** `null` when the file is absent, unreadable, or not a facts payload. */
851
+ function readPublishedAcceleratorFacts(filePath) {
852
+ let text;
853
+ try {
854
+ text = node_fs.readFileSync(filePath, "utf8");
855
+ } catch {
856
+ return null;
857
+ }
858
+ try {
859
+ return require_dist.parseAcceleratorFactsJson(jsonValue(text));
860
+ } catch {
861
+ return null;
862
+ }
863
+ }
864
+ /** Where `accelerator_facts.py` lives, or null when this process cannot see the addon. */
865
+ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
866
+ const candidates = [];
867
+ if (typeof dataDir === "string" && dataDir !== "") candidates.push(node_path.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
868
+ candidates.push(node_path.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
869
+ for (const candidate of candidates) if (node_fs.existsSync(candidate)) return candidate;
870
+ return null;
871
+ }
872
+ async function defaultExec(command, args, timeoutMs) {
873
+ const { stdout } = await execFileAsync(command, [...args], {
874
+ encoding: "utf8",
875
+ timeout: timeoutMs,
876
+ windowsHide: true
877
+ });
878
+ return stdout;
879
+ }
880
+ /**
881
+ * Run the facts script. `null` when there is no interpreter, no script, or
882
+ * the script could not ask the device (it prints `{"accelerators": null}`).
883
+ */
884
+ async function runAcceleratorFactsProbe(input) {
885
+ if (input.pythonPath === null || input.scriptPath === null) return null;
886
+ const exec = input.exec ?? defaultExec;
887
+ try {
888
+ return require_dist.parseAcceleratorFactsJson(jsonValue(await exec(input.pythonPath, [input.scriptPath], input.timeoutMs ?? 8e3)));
889
+ } catch {
890
+ return null;
891
+ }
892
+ }
893
+ //#endregion
804
894
  //#region src/builtins/platform-probe/index.ts
805
895
  /**
806
896
  * The decode-hwaccel backends `ctx.kernel.hwaccel.resolve` accepts. The cap
@@ -889,7 +979,11 @@ var PlatformProbeNativeAddon = class extends require_dist.BaseAddon {
889
979
  this.ctx.logger.debug("ensurePython unavailable for platform probe", { meta: { error: require_dist.errMsg(err) } });
890
980
  return null;
891
981
  });
892
- this.scorer = new PlatformScorer(this.ctx.logger.withTags({ nodeId: this.bareLocalNodeId() }), embeddedPython);
982
+ const factsScript = findAcceleratorFactsScript(this.ctx.dataDir);
983
+ this.scorer = new PlatformScorer(this.ctx.logger.withTags({ nodeId: this.bareLocalNodeId() }), embeddedPython, require_coral_accelerators.nodeCoralFs, embeddedPython === null || factsScript === null ? null : () => runAcceleratorFactsProbe({
984
+ pythonPath: embeddedPython,
985
+ scriptPath: factsScript
986
+ }));
893
987
  const emitPhase = (phase, payload) => {
894
988
  this.ctx.eventBus?.emit({
895
989
  id: `platform-probe-${phase}-${Date.now()}`,
@@ -935,7 +1029,13 @@ var PlatformProbeNativeAddon = class extends require_dist.BaseAddon {
935
1029
  return getCaps();
936
1030
  },
937
1031
  getHardware: async () => {
938
- return (await getCaps()).hardware;
1032
+ const caps = await getCaps();
1033
+ const published = readPublishedAcceleratorFacts(publishedAcceleratorFactsPath());
1034
+ if (published === null) return caps.hardware;
1035
+ return {
1036
+ ...caps.hardware,
1037
+ accelerators: published
1038
+ };
939
1039
  },
940
1040
  resolveInferenceConfig: async (input) => {
941
1041
  const caps = await getCaps();
@@ -1,6 +1,7 @@
1
1
  import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
2
- import { $n as platformProbeCapability, $r as errMsg, Da as EventCategory, Ji as emitReadiness, _r as scoreRuntimes, an as enumerateInferenceDevices, ei as BaseAddon } from "../../dist-CdFkkmXW.mjs";
2
+ import { Oa as EventCategory, Xn as parseAcceleratorFactsJson, Yi as emitReadiness, an as enumerateInferenceDevices, ei as errMsg, er as platformProbeCapability, ti as BaseAddon, vr as scoreRuntimes } from "../../dist-BugavoVR.mjs";
3
3
  import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
4
+ import * as path$1 from "node:path";
4
5
  import { promisify } from "node:util";
5
6
  import * as os$1 from "node:os";
6
7
  import * as fs$1 from "node:fs";
@@ -307,7 +308,7 @@ var WINDOWS_PROBE_TIMEOUT_MS = 15e3;
307
308
  * entire Node process (WS handshakes, tRPC subscriptions, metrics — all
308
309
  * stalled). Keeping it async turns the probe into a true background task.
309
310
  */
310
- var execFileAsync = promisify(execFile);
311
+ var execFileAsync$1 = promisify(execFile);
311
312
  /** Minimal no-op logger for default parameter */
312
313
  var noopLogger = {
313
314
  debug() {},
@@ -335,7 +336,7 @@ async function getAvailableRAM_MB() {
335
336
  const platform = os$1.platform();
336
337
  try {
337
338
  if (platform === "darwin") {
338
- const { stdout: output } = await execFileAsync("vm_stat", [], {
339
+ const { stdout: output } = await execFileAsync$1("vm_stat", [], {
339
340
  encoding: "utf8",
340
341
  timeout: 3e3
341
342
  });
@@ -369,10 +370,17 @@ var PlatformScorer = class {
369
370
  embeddedPythonPath;
370
371
  /** Where the Coral scan reads `/sys` and `/dev` (the host's, unless a spec fakes one). */
371
372
  coralFs;
372
- constructor(logger = noopLogger, embeddedPythonPath = null, coralFs = nodeCoralFs) {
373
+ /**
374
+ * Asks OpenVINO / WebGPU for compute (D930). Null in tests and when this
375
+ * process has no embedded interpreter — the pool's published file is the
376
+ * other way the same facts arrive.
377
+ */
378
+ readAcceleratorFacts;
379
+ constructor(logger = noopLogger, embeddedPythonPath = null, coralFs = nodeCoralFs, readAcceleratorFacts = null) {
373
380
  this.logger = logger;
374
381
  this.embeddedPythonPath = embeddedPythonPath;
375
382
  this.coralFs = coralFs;
383
+ this.readAcceleratorFacts = readAcceleratorFacts;
376
384
  }
377
385
  /**
378
386
  * Probe hardware + derive scores from pure rules and score all backend combos.
@@ -563,7 +571,7 @@ var PlatformScorer = class {
563
571
  } });
564
572
  }
565
573
  }
566
- return {
574
+ const hardware = {
567
575
  platform,
568
576
  arch,
569
577
  cpuModel,
@@ -574,6 +582,25 @@ var PlatformScorer = class {
574
582
  npu,
575
583
  coral
576
584
  };
585
+ const accelerators = await this.readAcceleratorCompute();
586
+ return accelerators === null ? hardware : {
587
+ ...hardware,
588
+ accelerators
589
+ };
590
+ }
591
+ /** Compute facts, or null when the probe did not run or could not ask. */
592
+ async readAcceleratorCompute() {
593
+ const read = this.readAcceleratorFacts;
594
+ if (read === null) return null;
595
+ try {
596
+ const facts = await read();
597
+ if (facts === null) return null;
598
+ this.logger.info("accelerator compute probed", { meta: { devices: facts.map((row) => row.deviceKey) } });
599
+ return facts;
600
+ } catch (err) {
601
+ this.logger.warn("accelerator compute probe failed", { meta: { error: errMsg(err) } });
602
+ return null;
603
+ }
577
604
  }
578
605
  /**
579
606
  * The Coral part of the probe, with the evidence that decided it logged —
@@ -639,7 +666,7 @@ var PlatformScorer = class {
639
666
  /** NVIDIA's own tool: exact model and VRAM. Null when absent or failing. */
640
667
  async probeNvidiaSmi() {
641
668
  try {
642
- const { stdout } = await execFileAsync("nvidia-smi", ["--query-gpu=name,memory.total", "--format=csv,noheader"], {
669
+ const { stdout } = await execFileAsync$1("nvidia-smi", ["--query-gpu=name,memory.total", "--format=csv,noheader"], {
643
670
  encoding: "utf8",
644
671
  timeout: 5e3,
645
672
  windowsHide: true
@@ -660,7 +687,7 @@ var PlatformScorer = class {
660
687
  /** Windows WMI probe; bounded, and a failure is a log line, never a boot failure. */
661
688
  async probeWindowsHardwareSafely() {
662
689
  const run = async (file, args) => {
663
- const { stdout } = await execFileAsync(file, [...args], {
690
+ const { stdout } = await execFileAsync$1(file, [...args], {
664
691
  encoding: "utf8",
665
692
  timeout: WINDOWS_PROBE_TIMEOUT_MS,
666
693
  windowsHide: true,
@@ -697,7 +724,7 @@ var PlatformScorer = class {
697
724
  "python"
698
725
  ];
699
726
  for (const cmd of candidates) try {
700
- await execFileAsync(cmd, ["--version"], { timeout: 5e3 });
727
+ await execFileAsync$1(cmd, ["--version"], { timeout: 5e3 });
701
728
  return cmd;
702
729
  } catch (err) {
703
730
  this.logger.debug(`Python command "${cmd}" not found`, { meta: { error: errMsg(err) } });
@@ -795,6 +822,68 @@ var InferenceConfigResolver = class {
795
822
  }
796
823
  };
797
824
  //#endregion
825
+ //#region src/builtins/platform-probe/accelerator-facts-probe.ts
826
+ /**
827
+ * Read the accelerator compute the inference worker published (D930), or ask
828
+ * the same script once when this process has the embedded interpreter.
829
+ *
830
+ * A missing file and a failed probe are `null` — not an empty list, and not
831
+ * zeros. `getHardware` overlays a published file onto the cached probe so a
832
+ * pool that starts later still reaches Auto tune.
833
+ */
834
+ /** Same name `accelerator_facts.FACTS_FILENAME` writes under the system temp dir. */
835
+ var ACCELERATOR_FACTS_FILENAME = "camstack-accelerator-facts.json";
836
+ var execFileAsync = promisify(execFile);
837
+ function publishedAcceleratorFactsPath() {
838
+ return path$1.join(os$1.tmpdir(), ACCELERATOR_FACTS_FILENAME);
839
+ }
840
+ function jsonValue(text) {
841
+ return JSON.parse(text);
842
+ }
843
+ /** `null` when the file is absent, unreadable, or not a facts payload. */
844
+ function readPublishedAcceleratorFacts(filePath) {
845
+ let text;
846
+ try {
847
+ text = fs$1.readFileSync(filePath, "utf8");
848
+ } catch {
849
+ return null;
850
+ }
851
+ try {
852
+ return parseAcceleratorFactsJson(jsonValue(text));
853
+ } catch {
854
+ return null;
855
+ }
856
+ }
857
+ /** Where `accelerator_facts.py` lives, or null when this process cannot see the addon. */
858
+ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
859
+ const candidates = [];
860
+ if (typeof dataDir === "string" && dataDir !== "") candidates.push(path$1.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
861
+ candidates.push(path$1.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
862
+ for (const candidate of candidates) if (fs$1.existsSync(candidate)) return candidate;
863
+ return null;
864
+ }
865
+ async function defaultExec(command, args, timeoutMs) {
866
+ const { stdout } = await execFileAsync(command, [...args], {
867
+ encoding: "utf8",
868
+ timeout: timeoutMs,
869
+ windowsHide: true
870
+ });
871
+ return stdout;
872
+ }
873
+ /**
874
+ * Run the facts script. `null` when there is no interpreter, no script, or
875
+ * the script could not ask the device (it prints `{"accelerators": null}`).
876
+ */
877
+ async function runAcceleratorFactsProbe(input) {
878
+ if (input.pythonPath === null || input.scriptPath === null) return null;
879
+ const exec = input.exec ?? defaultExec;
880
+ try {
881
+ return parseAcceleratorFactsJson(jsonValue(await exec(input.pythonPath, [input.scriptPath], input.timeoutMs ?? 8e3)));
882
+ } catch {
883
+ return null;
884
+ }
885
+ }
886
+ //#endregion
798
887
  //#region src/builtins/platform-probe/index.ts
799
888
  /**
800
889
  * The decode-hwaccel backends `ctx.kernel.hwaccel.resolve` accepts. The cap
@@ -883,7 +972,11 @@ var PlatformProbeNativeAddon = class extends BaseAddon {
883
972
  this.ctx.logger.debug("ensurePython unavailable for platform probe", { meta: { error: errMsg(err) } });
884
973
  return null;
885
974
  });
886
- this.scorer = new PlatformScorer(this.ctx.logger.withTags({ nodeId: this.bareLocalNodeId() }), embeddedPython);
975
+ const factsScript = findAcceleratorFactsScript(this.ctx.dataDir);
976
+ this.scorer = new PlatformScorer(this.ctx.logger.withTags({ nodeId: this.bareLocalNodeId() }), embeddedPython, nodeCoralFs, embeddedPython === null || factsScript === null ? null : () => runAcceleratorFactsProbe({
977
+ pythonPath: embeddedPython,
978
+ scriptPath: factsScript
979
+ }));
887
980
  const emitPhase = (phase, payload) => {
888
981
  this.ctx.eventBus?.emit({
889
982
  id: `platform-probe-${phase}-${Date.now()}`,
@@ -929,7 +1022,13 @@ var PlatformProbeNativeAddon = class extends BaseAddon {
929
1022
  return getCaps();
930
1023
  },
931
1024
  getHardware: async () => {
932
- return (await getCaps()).hardware;
1025
+ const caps = await getCaps();
1026
+ const published = readPublishedAcceleratorFacts(publishedAcceleratorFactsPath());
1027
+ if (published === null) return caps.hardware;
1028
+ return {
1029
+ ...caps.hardware,
1030
+ accelerators: published
1031
+ };
933
1032
  },
934
1033
  resolveInferenceConfig: async (input) => {
935
1034
  const caps = await getCaps();
@@ -1,4 +1,4 @@
1
- import type { HardwareInfo, PlatformCapabilities, IScopedLogger } from "@camstack/types";
1
+ import type { HardwareInfo, PlatformCapabilities, IScopedLogger, AcceleratorCompute } from "@camstack/types";
2
2
  import { type CoralFs } from "./coral-accelerators.js";
3
3
  import { type AcceleratorReprobe } from "./accelerator-reprobe.js";
4
4
  export declare class PlatformScorer {
@@ -15,7 +15,13 @@ export declare class PlatformScorer {
15
15
  private readonly embeddedPythonPath;
16
16
  /** Where the Coral scan reads `/sys` and `/dev` (the host's, unless a spec fakes one). */
17
17
  private readonly coralFs;
18
- constructor(logger?: IScopedLogger, embeddedPythonPath?: string | null, coralFs?: CoralFs);
18
+ /**
19
+ * Asks OpenVINO / WebGPU for compute (D930). Null in tests and when this
20
+ * process has no embedded interpreter — the pool's published file is the
21
+ * other way the same facts arrive.
22
+ */
23
+ private readonly readAcceleratorFacts;
24
+ constructor(logger?: IScopedLogger, embeddedPythonPath?: string | null, coralFs?: CoralFs, readAcceleratorFacts?: (() => Promise<readonly AcceleratorCompute[] | null>) | null);
19
25
  /**
20
26
  * Probe hardware + derive scores from pure rules and score all backend combos.
21
27
  *
@@ -30,6 +36,8 @@ export declare class PlatformScorer {
30
36
  */
31
37
  probe(onPhase?: (phase: string, payload?: Record<string, unknown>) => void): Promise<PlatformCapabilities>;
32
38
  probeHardware(): Promise<HardwareInfo>;
39
+ /** Compute facts, or null when the probe did not run or could not ask. */
40
+ private readAcceleratorCompute;
33
41
  /**
34
42
  * The Coral part of the probe, with the evidence that decided it logged —
35
43
  * a node that reports a Coral, or stops reporting one, says WHY (D919).
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DX5Fu3mV.js");
6
+ const require_dist = require("../../dist-Sn-HiZ4e.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  //#region src/builtins/record-entries/entries-service.ts
@@ -1,4 +1,4 @@
1
- import { ei as BaseAddon, ha as recordSecretRef, ji as UnknownRecordKindError, nr as recordEntriesCapability, sa as mapSecretLeaves, ui as InvalidRecordError } from "../../dist-CdFkkmXW.mjs";
1
+ import { Mi as UnknownRecordKindError, ca as mapSecretLeaves, di as InvalidRecordError, ga as recordSecretRef, rr as recordEntriesCapability, ti as BaseAddon } from "../../dist-BugavoVR.mjs";
2
2
  import { z } from "zod";
3
3
  import { randomUUID } from "node:crypto";
4
4
  //#region src/builtins/record-entries/entries-service.ts
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DX5Fu3mV.js");
6
+ const require_dist = require("../../dist-Sn-HiZ4e.js");
7
7
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
8
8
  /**
9
9
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -1,4 +1,4 @@
1
- import { Da as EventCategory, ei as BaseAddon } from "../../dist-CdFkkmXW.mjs";
1
+ import { Oa as EventCategory, ti as BaseAddon } from "../../dist-BugavoVR.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative