@camstack/server 1.2.741 → 1.2.742

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 (97) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/api/core/cap-providers.js +167 -43
  3. package/dist/api/core/integration-role.js +20 -0
  4. package/dist/api/trpc/generated-cap-mounts.js +18 -1
  5. package/dist/api/trpc/generated-cap-routers.js +2427 -2381
  6. package/package.json +14 -12
  7. package/system/dist/addon-utils.mjs +1 -1
  8. package/system/dist/{agent-https-CNf7_i1z.js → agent-https-CsDhLoui.js} +1 -1
  9. package/system/dist/{agent-https-BtTMjLgk.mjs → agent-https-lgka7y2l.mjs} +1 -1
  10. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  11. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  12. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  13. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  14. package/system/dist/builtins/alerts/alerts.addon.js +4 -4
  15. package/system/dist/builtins/alerts/alerts.addon.mjs +4 -4
  16. package/system/dist/builtins/autotrack/index.js +1 -1
  17. package/system/dist/builtins/autotrack/index.mjs +1 -1
  18. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  19. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  20. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  21. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  22. package/system/dist/builtins/camera-grid/index.js +4 -4
  23. package/system/dist/builtins/camera-grid/index.mjs +4 -4
  24. package/system/dist/builtins/composer/composer.addon.js +3 -3
  25. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  26. package/system/dist/builtins/console-logging/index.js +1 -1
  27. package/system/dist/builtins/console-logging/index.mjs +1 -1
  28. package/system/dist/builtins/core-blocks/core-blocks.addon.js +193 -3
  29. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +193 -3
  30. package/system/dist/builtins/core-blocks/migrations/index.d.ts +5 -0
  31. package/system/dist/builtins/core-blocks/migrations/pump-cycle-split.d.ts +43 -0
  32. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  33. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  34. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  35. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  36. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  37. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  38. package/system/dist/builtins/keychain/index.js +3 -3
  39. package/system/dist/builtins/keychain/index.mjs +3 -3
  40. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  41. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  42. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  43. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  44. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  45. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  46. package/system/dist/builtins/loki-logging/index.js +30 -27
  47. package/system/dist/builtins/loki-logging/index.mjs +30 -27
  48. package/system/dist/builtins/loki-logging/loki-logging.addon.d.ts +7 -0
  49. package/system/dist/builtins/loki-logging/migrations/index.d.ts +7 -0
  50. package/system/dist/builtins/loki-logging/retire-enabled-flag.d.ts +8 -23
  51. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  52. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  53. package/system/dist/builtins/platform-probe/index.js +1 -1
  54. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  55. package/system/dist/builtins/record-entries/index.js +1 -1
  56. package/system/dist/builtins/record-entries/index.mjs +1 -1
  57. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  58. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  59. package/system/dist/builtins/snapshot/index.js +1 -1
  60. package/system/dist/builtins/snapshot/index.mjs +1 -1
  61. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  63. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  64. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  65. package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +2 -2
  66. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  67. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  68. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  69. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  70. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  71. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  72. package/system/dist/builtins/winston-logging/index.js +1 -1
  73. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  74. package/system/dist/{composition-sources-DUmnnLrw.mjs → composition-sources-BE6yrVCB.mjs} +1 -1
  75. package/system/dist/{composition-sources-D9GBwT5d.js → composition-sources-ny5MCbhd.js} +1 -1
  76. package/system/dist/{constants-Cy5svHxz.js → constants-BbgVaoOX.js} +1 -1
  77. package/system/dist/{constants-BkiDA8Cf.mjs → constants-DiDTdj26.mjs} +1 -1
  78. package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  79. package/system/dist/{custom-action-registry-BIJZBObd.mjs → custom-action-registry-oHl1xltx.mjs} +37 -37
  80. package/system/dist/{device-ca-CxlqxrvG.js → device-ca-BdgE_3J6.js} +1 -1
  81. package/system/dist/{device-ca-Cxu7j6aY.mjs → device-ca-CVcZIfhA.mjs} +1 -1
  82. package/system/dist/{dist-C5sQPOZX.mjs → dist-BqlGZK-1.mjs} +297 -132
  83. package/system/dist/{dist-Cyc4oyGh.js → dist-DdlfeOQx.js} +302 -131
  84. package/system/dist/file-host-worker.js +1 -1
  85. package/system/dist/file-host-worker.mjs +1 -1
  86. package/system/dist/{hub-mdns-ciao-CTPWSgwo.mjs → hub-mdns-ciao-BZsVTXQ7.mjs} +2 -2
  87. package/system/dist/{hub-mdns-ciao-YxQ97aHW.js → hub-mdns-ciao-D3ZQMWjg.js} +2 -2
  88. package/system/dist/index.js +14 -9
  89. package/system/dist/index.mjs +225 -220
  90. package/system/dist/migrations/hub/2026-11-02-integration-addon-id-bare.d.ts +3 -0
  91. package/system/dist/{restore-archive-08Uthry1.mjs → restore-archive-BFem7ZuS.mjs} +94 -94
  92. package/system/dist/{restore-archive-b5rBXY1e.js → restore-archive-Ch76C3VQ.js} +1 -1
  93. package/system/dist/{retention-i8aZ6vE5.mjs → retention-D5Vk8FXc.mjs} +1 -1
  94. package/system/dist/{retention-DWCHp91p.js → retention-DWsfcaKe.js} +1 -1
  95. package/system/dist/{wal-maintenance-CEi8PqMh.mjs → wal-maintenance-CS-Wtg9w.mjs} +0 -0
  96. package/system/dist/{wal-maintenance-DNE7RTcS.js → wal-maintenance-DcVdVWDD.js} +0 -0
  97. package/system/package.json +1 -1
@@ -1,15 +1,15 @@
1
1
  import { i as __require, o as __toESM, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { $n as deviceCredentialsCapability, A as CredentialTokenClaimsSchema, At as PreferenceValueSchema, Dt as PREFERENCES_MAX_VALUE_BYTES, Fr as isCredentialTokenPayload, Gt as SsoBridgeClaimsSchema, Os as makeSecretMarker, Ot as PreferenceDeviceIdSchema, Qt as TokenScopeSchema, R as DEVICE_ENROLLMENT_TTL_MS, Sr as formatDeviceRevoker, Ta as userManagementCapability, Ts as isSecretMarker, Ut as ScopedTokenSchema, V as DEVICE_NONCE_TTL_MS, Ys as userError, bn as buildDeviceEnrollmentLink, en as UserRecordSchema, kt as PreferenceNamespaceSchema, ls as defineRecordKinds, mo as BaseAddon, pn as authProviderCapability, w as CREDENTIAL_TOKEN_AUDIENCE, xn as buildDeviceSignatureMessage } from "../../dist-C5sQPOZX.mjs";
2
+ import { $n as deviceCredentialsCapability, A as CredentialTokenClaimsSchema, At as PreferenceValueSchema, Dt as PREFERENCES_MAX_VALUE_BYTES, Ea as userManagementCapability, Es as isSecretMarker, Fr as isCredentialTokenPayload, Gt as SsoBridgeClaimsSchema, Ot as PreferenceDeviceIdSchema, Qt as TokenScopeSchema, R as DEVICE_ENROLLMENT_TTL_MS, Sr as formatDeviceRevoker, Ut as ScopedTokenSchema, V as DEVICE_NONCE_TTL_MS, Xs as userError, bn as buildDeviceEnrollmentLink, en as UserRecordSchema, ho as BaseAddon, ks as makeSecretMarker, kt as PreferenceNamespaceSchema, pn as authProviderCapability, us as defineRecordKinds, w as CREDENTIAL_TOKEN_AUDIENCE, xn as buildDeviceSignatureMessage } from "../../dist-BqlGZK-1.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-Cxu7j6aY.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-CVcZIfhA.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";
9
9
  import { X509Certificate, createHash, randomUUID, timingSafeEqual } from "node:crypto";
10
10
  import nodeCrypto from "crypto";
11
11
  import * as path$1 from "node:path";
12
- import * as fs from "node:fs";
12
+ import * as fs$1 from "node:fs";
13
13
  //#region ../../node_modules/bcryptjs/index.js
14
14
  /**
15
15
  * The random implementation to use as a fallback.
@@ -11912,8 +11912,8 @@ var LocalAuthAddon = class extends BaseAddon {
11912
11912
  users: this.userManager,
11913
11913
  dataDir: this.ctx.nodeDataDir,
11914
11914
  fs: {
11915
- exists: (filePath) => fs.existsSync(filePath),
11916
- remove: (filePath) => fs.rmSync(filePath, { force: true })
11915
+ exists: (filePath) => fs$1.existsSync(filePath),
11916
+ remove: (filePath) => fs$1.rmSync(filePath, { force: true })
11917
11917
  },
11918
11918
  logger: this.ctx.logger
11919
11919
  });
@@ -1,8 +1,8 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("../../chunk-Cek0wNdY.js");
3
- const require_dist = require("../../dist-Cyc4oyGh.js");
3
+ const require_dist = require("../../dist-DdlfeOQx.js");
4
4
  const require_dns_wire = require("../../dns-wire-B1BvF9Ao.js");
5
- const require_hub_mdns_ciao = require("../../hub-mdns-ciao-YxQ97aHW.js");
5
+ const require_hub_mdns_ciao = require("../../hub-mdns-ciao-D3ZQMWjg.js");
6
6
  let zod = require("zod");
7
7
  let node_net = require("node:net");
8
8
  let node_os = require("node:os");
@@ -1,6 +1,6 @@
1
- import { Ci as pickAppLinkHub, Da as validateCustomAddress, Et as NetworkTunnelStartedDataSchema, Ir as isDefaultAppConnectionEndpoint, Jr as localNetworkCapability, Mr as isAppLinkBase, On as checkRoleAddress, Ui as resolveHubAddressRoles, _ as CAMSTACK_APP_LINK_ORIGIN, dt as HUB_MDNS_TXT_KEYS, ec as errMsg, mo as BaseAddon, qi as resolveNotificationTapAddress, sa as shortHostname, tc as EventCategory, ut as HUB_MDNS_SERVICE_TYPE, zi as resolveAppConnections } from "../../dist-C5sQPOZX.mjs";
1
+ import { Bi as resolveAppConnections, Et as NetworkTunnelStartedDataSchema, Ir as isDefaultAppConnectionEndpoint, Ji as resolveNotificationTapAddress, Mr as isAppLinkBase, Oa as validateCustomAddress, On as checkRoleAddress, Wi as resolveHubAddressRoles, Yr as localNetworkCapability, _ as CAMSTACK_APP_LINK_ORIGIN, ca as shortHostname, dt as HUB_MDNS_TXT_KEYS, ho as BaseAddon, nc as EventCategory, tc as errMsg, ut as HUB_MDNS_SERVICE_TYPE, wi as pickAppLinkHub } from "../../dist-BqlGZK-1.mjs";
2
2
  import { a as emptyMdnsRecords, c as parseMdnsMessage, i as buildRecordQuery, l as parseMdnsRecords, n as MDNS_PORT, o as mergeMdnsRecords, r as buildPtrQuery, s as normalizeServiceType, t as MDNS_GROUP } from "../../dns-wire-Dm3H_7ST.mjs";
3
- import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-CTPWSgwo.mjs";
3
+ import { E as ensureTlsCert, I as readLanHttpState, N as applyLanHttp, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, d as servedHttpsLeafFingerprint, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, r as regenerateCertificate, t as createCiaoPublisher, y as writeExtraSans } from "../../hub-mdns-ciao-BZsVTXQ7.mjs";
4
4
  import { z } from "zod";
5
5
  import { isIP } from "node:net";
6
6
  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-Cyc4oyGh.js");
6
+ const require_dist = require("../../dist-DdlfeOQx.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
@@ -828,6 +828,7 @@ async function moveRegistryToggleToRecord(ports) {
828
828
  //#endregion
829
829
  //#region src/builtins/loki-logging/migrations/index.ts
830
830
  var CONNECTION_TO_RECORDS_ID = "loki-logging/2026-11-02-connection-to-records";
831
+ var REGISTRY_TOGGLE_TO_RECORD_ID = "loki-logging/2026-11-02-registry-toggle-to-record";
831
832
  /** The `loki-logging` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
832
833
  var ADDON_MIGRATIONS = [
833
834
  {
@@ -864,7 +865,7 @@ var ADDON_MIGRATIONS = [
864
865
  },
865
866
  {
866
867
  meta: {
867
- id: "loki-logging/2026-11-02-registry-toggle-to-record",
868
+ id: REGISTRY_TOGGLE_TO_RECORD_ID,
868
869
  owner: "loki-logging",
869
870
  level: "addon-state",
870
871
  seq: 3,
@@ -879,6 +880,13 @@ var ADDON_MIGRATIONS = [
879
880
  procedure: moveRegistryToggleToRecord
880
881
  }
881
882
  ];
883
+ /**
884
+ * What can be decided while the addon initialises. The registry-toggle migration reads the hub's
885
+ * registry, which holds this provider only AFTER registration, so it is run from `postBrokerStart`
886
+ * (the full {@link ADDON_MIGRATIONS}) and never offered here: a pass that cannot decide is a
887
+ * guaranteed failure and a critical alert for nothing.
888
+ */
889
+ var INITIALIZE_MIGRATIONS = ADDON_MIGRATIONS.filter((m) => m.meta.id !== REGISTRY_TOGGLE_TO_RECORD_ID);
882
890
  //#endregion
883
891
  //#region src/builtins/loki-logging/retire-enabled-flag.ts
884
892
  /** The retired settings key. */
@@ -900,17 +908,12 @@ async function retireEnabledFlag(deps) {
900
908
  if (isMarked(marker)) return { kind: "already-retired" };
901
909
  const flag = await deps.readStoredKey(RETIRED_ENABLED_KEY);
902
910
  if (flag.kind === "unreadable") return deferred("settings store unreadable (enabled)");
903
- const wasOff = flag.kind === "present" && flag.value === false;
904
- if (wasOff) try {
905
- await deps.disableAtCapability();
906
- } catch (err) {
907
- return deferred(`capability toggle refused: ${err instanceof Error ? err.message : String(err)}`);
908
- }
911
+ const strippedValue = flag.kind === "present" && typeof flag.value === "boolean" ? flag.value : null;
909
912
  await deps.commit();
910
913
  if (!isMarked(await deps.readStoredKey("migratedEnabled"))) return deferred("retirement write did not land");
911
914
  return {
912
915
  kind: "retired",
913
- capDisabled: wasOff
916
+ strippedValue
914
917
  };
915
918
  }
916
919
  //#endregion
@@ -990,7 +993,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
990
993
  test: (input) => this.probe(input.id, input.values)
991
994
  });
992
995
  if (hub) {
993
- await this.runMigrations(require_dist.defineAddonMigrations(ADDON_MIGRATIONS, this.migrationPorts()));
996
+ await this.runMigrations(require_dist.defineAddonMigrations(await this.initializeCatalogue(), this.migrationPorts()));
994
997
  registrations.push({
995
998
  capability: require_dist.integrationInstancesCapability,
996
999
  provider: this.instances.toProvider()
@@ -1042,6 +1045,20 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
1042
1045
  this.current = first?.body ?? null;
1043
1046
  await this.destination?.reconfigure(this.destinationConfig());
1044
1047
  }
1048
+ /**
1049
+ * The catalogue to offer while initialising. Seq 3 cannot decide before registration, so it is
1050
+ * left out (`INITIALIZE_MIGRATIONS`) — unless the ledger already holds it APPLIED: then the full
1051
+ * catalogue is offered and the engine skips it, whereas a subset would make it log the id as a
1052
+ * database newer than this code on every boot. A ledger that cannot be read offers the subset.
1053
+ */
1054
+ async initializeCatalogue() {
1055
+ try {
1056
+ const { entries } = await this.ctx.api.migrations.listLedger.query({});
1057
+ return entries.some((e) => e.id === "loki-logging/2026-11-02-registry-toggle-to-record" && e.status === "applied") ? ADDON_MIGRATIONS : INITIALIZE_MIGRATIONS;
1058
+ } catch {
1059
+ return INITIALIZE_MIGRATIONS;
1060
+ }
1061
+ }
1045
1062
  /** The ports of the connection migrations: the old settings in, the record out. */
1046
1063
  migrationPorts() {
1047
1064
  const records = this.ctx.records;
@@ -1093,7 +1110,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
1093
1110
  return "created";
1094
1111
  },
1095
1112
  readRegistryState: async () => {
1096
- const own = (await this.ctx.api.addons.listCapabilityProviders.query({ capName: require_dist.logDestinationCapability.name })).find((p) => p.addonId === this.ctx.id);
1113
+ const own = (await this.ctx.api.addons.listCapabilityProviders.query({ capName: require_dist.logDestinationCapability.name })).find((p) => require_dist.isSameAddonId(p.addonId, this.ctx.id));
1097
1114
  if (own === void 0) return "unregistered";
1098
1115
  return own.isActive ? "active" : "inactive";
1099
1116
  },
@@ -1110,7 +1127,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
1110
1127
  enableRegistry: async () => {
1111
1128
  await this.ctx.api.addons.setCapabilityProviderEnabled.mutate({
1112
1129
  capName: require_dist.logDestinationCapability.name,
1113
- addonId: this.ctx.id,
1130
+ addonId: require_dist.bareAddonId(this.ctx.id),
1114
1131
  enabled: true
1115
1132
  });
1116
1133
  },
@@ -1169,20 +1186,6 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
1169
1186
  try {
1170
1187
  outcome = await retireEnabledFlag({
1171
1188
  readStoredKey: (key) => this.readStoredGlobalKey(key),
1172
- disableAtCapability: async () => {
1173
- const instances = this.instances;
1174
- const [first] = instances === null ? [] : await instances.listResolved();
1175
- if (first !== void 0 && this.ctx.records !== void 0) {
1176
- await this.ctx.records.kind(lokiDestinationsKind).patch(first.id, { enabled: false });
1177
- await this.refreshFromRecord();
1178
- return;
1179
- }
1180
- await this.ctx.api.addons.setCapabilityProviderEnabled.mutate({
1181
- capName: require_dist.logDestinationCapability.name,
1182
- addonId: this.ctx.id,
1183
- enabled: false
1184
- });
1185
- },
1186
1189
  commit: async () => {
1187
1190
  const patch = {
1188
1191
  [RETIRED_ENABLED_KEY]: void 0,
@@ -1197,7 +1200,7 @@ var LokiLoggingAddon = class extends require_dist.BaseAddon {
1197
1200
  reason: err instanceof Error ? err.message : String(err)
1198
1201
  };
1199
1202
  }
1200
- if (outcome.kind === "retired" && outcome.capDisabled) this.ctx.logger.info("Loki logging: the retired `enabled: false` setting was carried over to the per-destination toggle — re-enable it there if you want Loki shipping again.");
1203
+ if (outcome.kind === "retired" && outcome.strippedValue !== null) this.ctx.logger.info(`Loki logging: the retired \`enabled: ${String(outcome.strippedValue)}\` setting was removed; it has not gated shipping since D777, so nothing was switched. The per-destination toggle is the only enable.`);
1201
1204
  if (outcome.kind !== "deferred") return;
1202
1205
  const delay = RETIREMENT_RETRY_DELAYS_MS[attempt];
1203
1206
  if (delay === void 0) {
@@ -1,4 +1,4 @@
1
- import { Dr as integrationInstancesCapability, Oi as preconditionOf, Pt as RecordIntegrationInstances, Qr as logDestinationCapability, Ts as isSecretMarker, Vo as RevConflictError, cs as defineEntryKind, mo as BaseAddon, os as defineAddonMigrations, ws as isSecretFieldView } from "../../dist-C5sQPOZX.mjs";
1
+ import { $r as logDestinationCapability, Br as isSameAddonId, Dr as integrationInstancesCapability, Es as isSecretMarker, Ho as RevConflictError, Pt as RecordIntegrationInstances, Ts as isSecretFieldView, hn as bareAddonId, ho as BaseAddon, ki as preconditionOf, ls as defineEntryKind, ss as defineAddonMigrations } from "../../dist-BqlGZK-1.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
@@ -821,6 +821,7 @@ async function moveRegistryToggleToRecord(ports) {
821
821
  //#endregion
822
822
  //#region src/builtins/loki-logging/migrations/index.ts
823
823
  var CONNECTION_TO_RECORDS_ID = "loki-logging/2026-11-02-connection-to-records";
824
+ var REGISTRY_TOGGLE_TO_RECORD_ID = "loki-logging/2026-11-02-registry-toggle-to-record";
824
825
  /** The `loki-logging` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
825
826
  var ADDON_MIGRATIONS = [
826
827
  {
@@ -857,7 +858,7 @@ var ADDON_MIGRATIONS = [
857
858
  },
858
859
  {
859
860
  meta: {
860
- id: "loki-logging/2026-11-02-registry-toggle-to-record",
861
+ id: REGISTRY_TOGGLE_TO_RECORD_ID,
861
862
  owner: "loki-logging",
862
863
  level: "addon-state",
863
864
  seq: 3,
@@ -872,6 +873,13 @@ var ADDON_MIGRATIONS = [
872
873
  procedure: moveRegistryToggleToRecord
873
874
  }
874
875
  ];
876
+ /**
877
+ * What can be decided while the addon initialises. The registry-toggle migration reads the hub's
878
+ * registry, which holds this provider only AFTER registration, so it is run from `postBrokerStart`
879
+ * (the full {@link ADDON_MIGRATIONS}) and never offered here: a pass that cannot decide is a
880
+ * guaranteed failure and a critical alert for nothing.
881
+ */
882
+ var INITIALIZE_MIGRATIONS = ADDON_MIGRATIONS.filter((m) => m.meta.id !== REGISTRY_TOGGLE_TO_RECORD_ID);
875
883
  //#endregion
876
884
  //#region src/builtins/loki-logging/retire-enabled-flag.ts
877
885
  /** The retired settings key. */
@@ -893,17 +901,12 @@ async function retireEnabledFlag(deps) {
893
901
  if (isMarked(marker)) return { kind: "already-retired" };
894
902
  const flag = await deps.readStoredKey(RETIRED_ENABLED_KEY);
895
903
  if (flag.kind === "unreadable") return deferred("settings store unreadable (enabled)");
896
- const wasOff = flag.kind === "present" && flag.value === false;
897
- if (wasOff) try {
898
- await deps.disableAtCapability();
899
- } catch (err) {
900
- return deferred(`capability toggle refused: ${err instanceof Error ? err.message : String(err)}`);
901
- }
904
+ const strippedValue = flag.kind === "present" && typeof flag.value === "boolean" ? flag.value : null;
902
905
  await deps.commit();
903
906
  if (!isMarked(await deps.readStoredKey("migratedEnabled"))) return deferred("retirement write did not land");
904
907
  return {
905
908
  kind: "retired",
906
- capDisabled: wasOff
909
+ strippedValue
907
910
  };
908
911
  }
909
912
  //#endregion
@@ -983,7 +986,7 @@ var LokiLoggingAddon = class extends BaseAddon {
983
986
  test: (input) => this.probe(input.id, input.values)
984
987
  });
985
988
  if (hub) {
986
- await this.runMigrations(defineAddonMigrations(ADDON_MIGRATIONS, this.migrationPorts()));
989
+ await this.runMigrations(defineAddonMigrations(await this.initializeCatalogue(), this.migrationPorts()));
987
990
  registrations.push({
988
991
  capability: integrationInstancesCapability,
989
992
  provider: this.instances.toProvider()
@@ -1035,6 +1038,20 @@ var LokiLoggingAddon = class extends BaseAddon {
1035
1038
  this.current = first?.body ?? null;
1036
1039
  await this.destination?.reconfigure(this.destinationConfig());
1037
1040
  }
1041
+ /**
1042
+ * The catalogue to offer while initialising. Seq 3 cannot decide before registration, so it is
1043
+ * left out (`INITIALIZE_MIGRATIONS`) — unless the ledger already holds it APPLIED: then the full
1044
+ * catalogue is offered and the engine skips it, whereas a subset would make it log the id as a
1045
+ * database newer than this code on every boot. A ledger that cannot be read offers the subset.
1046
+ */
1047
+ async initializeCatalogue() {
1048
+ try {
1049
+ const { entries } = await this.ctx.api.migrations.listLedger.query({});
1050
+ return entries.some((e) => e.id === "loki-logging/2026-11-02-registry-toggle-to-record" && e.status === "applied") ? ADDON_MIGRATIONS : INITIALIZE_MIGRATIONS;
1051
+ } catch {
1052
+ return INITIALIZE_MIGRATIONS;
1053
+ }
1054
+ }
1038
1055
  /** The ports of the connection migrations: the old settings in, the record out. */
1039
1056
  migrationPorts() {
1040
1057
  const records = this.ctx.records;
@@ -1086,7 +1103,7 @@ var LokiLoggingAddon = class extends BaseAddon {
1086
1103
  return "created";
1087
1104
  },
1088
1105
  readRegistryState: async () => {
1089
- const own = (await this.ctx.api.addons.listCapabilityProviders.query({ capName: logDestinationCapability.name })).find((p) => p.addonId === this.ctx.id);
1106
+ const own = (await this.ctx.api.addons.listCapabilityProviders.query({ capName: logDestinationCapability.name })).find((p) => isSameAddonId(p.addonId, this.ctx.id));
1090
1107
  if (own === void 0) return "unregistered";
1091
1108
  return own.isActive ? "active" : "inactive";
1092
1109
  },
@@ -1103,7 +1120,7 @@ var LokiLoggingAddon = class extends BaseAddon {
1103
1120
  enableRegistry: async () => {
1104
1121
  await this.ctx.api.addons.setCapabilityProviderEnabled.mutate({
1105
1122
  capName: logDestinationCapability.name,
1106
- addonId: this.ctx.id,
1123
+ addonId: bareAddonId(this.ctx.id),
1107
1124
  enabled: true
1108
1125
  });
1109
1126
  },
@@ -1162,20 +1179,6 @@ var LokiLoggingAddon = class extends BaseAddon {
1162
1179
  try {
1163
1180
  outcome = await retireEnabledFlag({
1164
1181
  readStoredKey: (key) => this.readStoredGlobalKey(key),
1165
- disableAtCapability: async () => {
1166
- const instances = this.instances;
1167
- const [first] = instances === null ? [] : await instances.listResolved();
1168
- if (first !== void 0 && this.ctx.records !== void 0) {
1169
- await this.ctx.records.kind(lokiDestinationsKind).patch(first.id, { enabled: false });
1170
- await this.refreshFromRecord();
1171
- return;
1172
- }
1173
- await this.ctx.api.addons.setCapabilityProviderEnabled.mutate({
1174
- capName: logDestinationCapability.name,
1175
- addonId: this.ctx.id,
1176
- enabled: false
1177
- });
1178
- },
1179
1182
  commit: async () => {
1180
1183
  const patch = {
1181
1184
  [RETIRED_ENABLED_KEY]: void 0,
@@ -1190,7 +1193,7 @@ var LokiLoggingAddon = class extends BaseAddon {
1190
1193
  reason: err instanceof Error ? err.message : String(err)
1191
1194
  };
1192
1195
  }
1193
- if (outcome.kind === "retired" && outcome.capDisabled) this.ctx.logger.info("Loki logging: the retired `enabled: false` setting was carried over to the per-destination toggle — re-enable it there if you want Loki shipping again.");
1196
+ if (outcome.kind === "retired" && outcome.strippedValue !== null) this.ctx.logger.info(`Loki logging: the retired \`enabled: ${String(outcome.strippedValue)}\` setting was removed; it has not gated shipping since D777, so nothing was switched. The per-destination toggle is the only enable.`);
1194
1197
  if (outcome.kind !== "deferred") return;
1195
1198
  const delay = RETIREMENT_RETRY_DELAYS_MS[attempt];
1196
1199
  if (delay === void 0) {
@@ -42,6 +42,13 @@ export declare class LokiLoggingAddon extends BaseAddon<LokiAddonConfig> {
42
42
  private ensureDeclaredQuietly;
43
43
  /** Re-read the connection record and apply it to the live destination. */
44
44
  private refreshFromRecord;
45
+ /**
46
+ * The catalogue to offer while initialising. Seq 3 cannot decide before registration, so it is
47
+ * left out (`INITIALIZE_MIGRATIONS`) — unless the ledger already holds it APPLIED: then the full
48
+ * catalogue is offered and the engine skips it, whereas a subset would make it log the id as a
49
+ * database newer than this code on every boot. A ledger that cannot be read offers the subset.
50
+ */
51
+ private initializeCatalogue;
45
52
  /** The ports of the connection migrations: the old settings in, the record out. */
46
53
  private migrationPorts;
47
54
  /** Probe a Loki instance (`/ready`) with the form's values, falling back to the stored ones. */
@@ -9,3 +9,10 @@ export declare const CONNECTION_TO_RECORDS_ID = "loki-logging/2026-11-02-connect
9
9
  export declare const REGISTRY_TOGGLE_TO_RECORD_ID = "loki-logging/2026-11-02-registry-toggle-to-record";
10
10
  /** The `loki-logging` catalogue (D987): offered to the engine when the hub-resident addon initialises. */
11
11
  export declare const ADDON_MIGRATIONS: readonly AddonMigration<LokiCataloguePorts>[];
12
+ /**
13
+ * What can be decided while the addon initialises. The registry-toggle migration reads the hub's
14
+ * registry, which holds this provider only AFTER registration, so it is run from `postBrokerStart`
15
+ * (the full {@link ADDON_MIGRATIONS}) and never offered here: a pass that cannot decide is a
16
+ * guaranteed failure and a critical alert for nothing.
17
+ */
18
+ export declare const INITIALIZE_MIGRATIONS: readonly AddonMigration<LokiCataloguePorts>[];
@@ -1,27 +1,14 @@
1
1
  /**
2
2
  * ONE-SHOT retirement of Loki's private `enabled` setting (2026-07-30, D777).
3
3
  *
4
- * The per-destination `log-destination` capability toggle is the only enable.
5
- * A stored `enabled: false` is carried over to it ONCE, so an operator who had
6
- * Loki off does not silently start shipping logs to a host they may no longer
7
- * control:
4
+ * The per-destination toggle is the only enable, and the legacy flag has not gated
5
+ * shipping since D777. A stored `enabled: false` therefore describes NOTHING in effect:
6
+ * carrying it over would switch off a destination that has been shipping for months, so
7
+ * the retirement disables nothing. It only strips the dead key and sets the marker in
8
+ * ONE store write, so it never repeats.
8
9
  *
9
- * - flag stored `false` → the provider is disabled at the capability;
10
- * - flag stored `true`, or never
11
- * written → the capability is left as it is.
12
- *
13
- * Then the dead key is stripped and the marker is written in the SAME store
14
- * write, so the carry-over never repeats — an operator who re-enables Loki
15
- * afterwards is never switched off again.
16
- *
17
- * Anything that cannot be confirmed (unreadable store, refused toggle — the
18
- * provider is not registered yet while the addon initializes — or a write that
19
- * silently did not land) returns `deferred` and writes nothing; the caller
20
- * retries in the background.
21
- *
22
- * Same shape as the (since removed) magic-link addon's carry-over in
23
- * addon-auth; the one difference is the default the flag had (OFF there, ON
24
- * here).
10
+ * Anything that cannot be confirmed (unreadable store, or a write that silently did not
11
+ * land) returns `deferred` and writes nothing; the caller retries in the background.
25
12
  */
26
13
  import type { StoredKeyRead } from "@camstack/types";
27
14
  /** The retired settings key. */
@@ -32,7 +19,7 @@ export type RetirementOutcome = {
32
19
  readonly kind: "already-retired";
33
20
  } | {
34
21
  readonly kind: "retired";
35
- readonly capDisabled: boolean;
22
+ readonly strippedValue: boolean | null;
36
23
  } | {
37
24
  readonly kind: "deferred";
38
25
  readonly reason: string;
@@ -40,8 +27,6 @@ export type RetirementOutcome = {
40
27
  export interface RetireEnabledFlagDeps {
41
28
  /** Three-way read of one key of the addon's own store. */
42
29
  readStoredKey(key: string): Promise<StoredKeyRead>;
43
- /** Disable this addon at the `log-destination` toggle. Throws when refused. */
44
- disableAtCapability(): Promise<void>;
45
30
  /** ONE store write: strip {@link RETIRED_ENABLED_KEY} and set {@link RETIREMENT_MARKER_KEY}. */
46
31
  commit(): Promise<void>;
47
32
  }
@@ -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-Cyc4oyGh.js");
6
+ const require_dist = require("../../dist-DdlfeOQx.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,9 +1,9 @@
1
- import { $t as UNATTRIBUTED_BUCKET_KEY, Bi as resolveBucketMs, Nt as ROOT_BUCKET_KEY, Pi as reducePoints, ec as errMsg, is as createEvent, mo as BaseAddon, oi as metricsProviderCapability, tc as EventCategory, xr as foldSnapshotByFunction } from "../../dist-C5sQPOZX.mjs";
1
+ import { $t as UNATTRIBUTED_BUCKET_KEY, Fi as reducePoints, Nt as ROOT_BUCKET_KEY, Vi as resolveBucketMs, as as createEvent, ho as BaseAddon, nc as EventCategory, si as metricsProviderCapability, tc as errMsg, xr as foldSnapshotByFunction } from "../../dist-BqlGZK-1.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";
5
5
  import { platform } from "node:os";
6
- import * as fs from "node:fs";
6
+ import * as fs$1 from "node:fs";
7
7
  import { constants, readFileSync } from "node:fs";
8
8
  import { execFile } from "node:child_process";
9
9
  //#region src/builtins/native-metrics/cgroup-memory.ts
@@ -1686,7 +1686,7 @@ var NativeMetricsProvider = class {
1686
1686
  let swapUsedBytes = 0;
1687
1687
  let swapTotalBytes = 0;
1688
1688
  if (IS_LINUX) try {
1689
- const meminfo = fs.readFileSync("/proc/meminfo", "utf-8");
1689
+ const meminfo = fs$1.readFileSync("/proc/meminfo", "utf-8");
1690
1690
  const availKb = meminfo.match(/MemAvailable:\s+(\d+)/)?.[1];
1691
1691
  if (availKb !== void 0) available = parseInt(availKb, 10) * 1024;
1692
1692
  const swapTotal = parseInt(meminfo.match(/SwapTotal:\s+(\d+)/)?.[1] ?? "0", 10) * 1024;
@@ -1779,7 +1779,7 @@ async function sampleMacMemory(provider) {
1779
1779
  }
1780
1780
  function getDiskSpaceInternal(dirPath) {
1781
1781
  return new Promise((resolve, reject) => {
1782
- fs.statfs(dirPath, (err, stats) => {
1782
+ fs$1.statfs(dirPath, (err, stats) => {
1783
1783
  if (err) return reject(err);
1784
1784
  const totalBytes = stats.blocks * stats.bsize;
1785
1785
  const availableBytes = stats.bavail * stats.bsize;
@@ -1797,7 +1797,7 @@ function getDiskSpaceInternal(dirPath) {
1797
1797
  async function takeDiskIoSnapshot() {
1798
1798
  const now = Date.now();
1799
1799
  if (IS_LINUX) try {
1800
- const data = fs.readFileSync("/proc/diskstats", "utf-8");
1800
+ const data = fs$1.readFileSync("/proc/diskstats", "utf-8");
1801
1801
  let readOps = 0, readBytes = 0, writeOps = 0, writeBytes = 0;
1802
1802
  for (const line of data.split("\n")) {
1803
1803
  const parts = line.trim().split(/\s+/);
@@ -1828,7 +1828,7 @@ async function takeDiskIoSnapshot() {
1828
1828
  async function takeNetworkIoSnapshot() {
1829
1829
  const now = Date.now();
1830
1830
  if (IS_LINUX) try {
1831
- const data = fs.readFileSync("/proc/net/dev", "utf-8");
1831
+ const data = fs$1.readFileSync("/proc/net/dev", "utf-8");
1832
1832
  let rxBytes = 0, txBytes = 0, rxPackets = 0, txPackets = 0, rxErrors = 0, txErrors = 0;
1833
1833
  for (const line of data.split("\n")) {
1834
1834
  const match = line.match(/^\s*(\w+):\s+(.+)$/);
@@ -1889,7 +1889,7 @@ async function takeNetworkIoSnapshot() {
1889
1889
  }
1890
1890
  async function getCpuTemperatureInternal() {
1891
1891
  if (IS_LINUX) for (const p of ["/sys/class/thermal/thermal_zone0/temp", "/sys/class/hwmon/hwmon0/temp1_input"]) try {
1892
- const raw = fs.readFileSync(p, "utf-8").trim();
1892
+ const raw = fs$1.readFileSync(p, "utf-8").trim();
1893
1893
  const millideg = parseInt(raw, 10);
1894
1894
  if (!isNaN(millideg)) return Math.round(millideg / 100) / 10;
1895
1895
  } catch {
@@ -1940,10 +1940,10 @@ function getProcessResources() {
1940
1940
  let threadCount = 0;
1941
1941
  if (IS_LINUX) {
1942
1942
  try {
1943
- openFds = fs.readdirSync(`/proc/${process.pid}/fd`).length;
1943
+ openFds = fs$1.readdirSync(`/proc/${process.pid}/fd`).length;
1944
1944
  } catch {}
1945
1945
  try {
1946
- const match = fs.readFileSync(`/proc/${process.pid}/status`, "utf-8").match(/Threads:\s+(\d+)/);
1946
+ const match = fs$1.readFileSync(`/proc/${process.pid}/status`, "utf-8").match(/Threads:\s+(\d+)/);
1947
1947
  if (match) threadCount = parseInt(match[1], 10);
1948
1948
  } catch {}
1949
1949
  }
@@ -1958,7 +1958,7 @@ function getProcessResources() {
1958
1958
  function getPressure(resource) {
1959
1959
  if (!IS_LINUX) return null;
1960
1960
  try {
1961
- const data = fs.readFileSync(`/proc/pressure/${resource}`, "utf-8");
1961
+ const data = fs$1.readFileSync(`/proc/pressure/${resource}`, "utf-8");
1962
1962
  const parseLine = (prefix) => {
1963
1963
  const match = data.match(new RegExp(`${prefix} avg10=(\\d+\\.\\d+) avg60=(\\d+\\.\\d+) avg300=(\\d+\\.\\d+)`));
1964
1964
  if (!match) return null;
@@ -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-Cyc4oyGh.js");
6
+ const require_dist = require("../../dist-DdlfeOQx.js");
7
7
  const require_coral_accelerators = require("../../coral-accelerators-BSVsBVzt.js");
8
8
  let node_path = require("node:path");
9
9
  node_path = require_chunk.__toESM(node_path);
@@ -1,10 +1,10 @@
1
1
  import { o as __toESM, r as __exportAll } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Ti as platformProbeCapability, bi as parseAcceleratorFactsJson, ds as emitReadiness, ec as errMsg, mo as BaseAddon, na as scoreRuntimes, sr as enumerateInferenceDevices, tc as EventCategory } from "../../dist-C5sQPOZX.mjs";
3
- import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-BW3OcrLD.mjs";
2
+ import { Ei as platformProbeCapability, fs as emitReadiness, ho as BaseAddon, nc as EventCategory, ra as scoreRuntimes, sr as enumerateInferenceDevices, tc as errMsg, xi as parseAcceleratorFactsJson } from "../../dist-BqlGZK-1.mjs";
3
+ import { n as detectCoralAccelerator, r as nodeCoralFs } from "../../coral-accelerators-DBlgWB8k.mjs";
4
4
  import * as path$1 from "node:path";
5
5
  import { promisify } from "node:util";
6
6
  import * as os$1 from "node:os";
7
- import * as fs from "node:fs";
7
+ import * as fs$1 from "node:fs";
8
8
  import { execFile } from "node:child_process";
9
9
  //#region src/builtins/platform-probe/accelerator-reprobe.ts
10
10
  /**
@@ -492,14 +492,14 @@ var PlatformScorer = class {
492
492
  if (nvidia) gpu = nvidia;
493
493
  const listRenderNodes = () => {
494
494
  try {
495
- return fs.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
495
+ return fs$1.readdirSync("/dev/dri").filter((n) => n.startsWith("renderD")).map((n) => `/dev/dri/${n}`);
496
496
  } catch {
497
497
  return [];
498
498
  }
499
499
  };
500
500
  const readDrmAttr = (node, attr) => {
501
501
  try {
502
- return fs.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
502
+ return fs$1.readFileSync(`/sys/class/drm/${node.split("/").pop()}/device/${attr}`, "utf8");
503
503
  } catch {
504
504
  return "";
505
505
  }
@@ -525,12 +525,12 @@ var PlatformScorer = class {
525
525
  }
526
526
  const listDir = (p) => {
527
527
  try {
528
- return fs.readdirSync(p);
528
+ return fs$1.readdirSync(p);
529
529
  } catch {
530
530
  return [];
531
531
  }
532
532
  };
533
- const exists = (p) => fs.existsSync(p);
533
+ const exists = (p) => fs$1.existsSync(p);
534
534
  if (!npu) {
535
535
  const { classifyIntelNpu } = await import("../../intel-npu-C8HKvRQF.mjs");
536
536
  npu = classifyIntelNpu({
@@ -558,7 +558,7 @@ var PlatformScorer = class {
558
558
  exists,
559
559
  readFile: (p) => {
560
560
  try {
561
- return fs.readFileSync(p, "utf8");
561
+ return fs$1.readFileSync(p, "utf8");
562
562
  } catch {
563
563
  return "";
564
564
  }
@@ -844,7 +844,7 @@ function jsonValue(text) {
844
844
  function readPublishedAcceleratorFacts(filePath) {
845
845
  let text;
846
846
  try {
847
- text = fs.readFileSync(filePath, "utf8");
847
+ text = fs$1.readFileSync(filePath, "utf8");
848
848
  } catch {
849
849
  return null;
850
850
  }
@@ -859,7 +859,7 @@ function findAcceleratorFactsScript(dataDir, cwd = process.cwd()) {
859
859
  const candidates = [];
860
860
  if (typeof dataDir === "string" && dataDir !== "") candidates.push(path$1.join(dataDir, "addons", "@camstack", "addon-pipeline", "python", "accelerator_facts.py"));
861
861
  candidates.push(path$1.join(cwd, "packages", "addon-pipeline", "python", "accelerator_facts.py"));
862
- for (const candidate of candidates) if (fs.existsSync(candidate)) return candidate;
862
+ for (const candidate of candidates) if (fs$1.existsSync(candidate)) return candidate;
863
863
  return null;
864
864
  }
865
865
  async function defaultExec(command, args, timeoutMs) {
@@ -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-Cyc4oyGh.js");
6
+ const require_dist = require("../../dist-DdlfeOQx.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 { Ko as UnknownRecordKindError, Mi as recordEntriesCapability, Ws as secretViewsOf, mo as BaseAddon, wo as InvalidRecordError } from "../../dist-C5sQPOZX.mjs";
1
+ import { Gs as secretViewsOf, Ni as recordEntriesCapability, To as InvalidRecordError, ho as BaseAddon, qo as UnknownRecordKindError } from "../../dist-BqlGZK-1.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-Cyc4oyGh.js");
6
+ const require_dist = require("../../dist-DdlfeOQx.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 { mo as BaseAddon, tc as EventCategory } from "../../dist-C5sQPOZX.mjs";
1
+ import { ho as BaseAddon, nc as EventCategory } from "../../dist-BqlGZK-1.mjs";
2
2
  //#region src/builtins/remote-access-orchestrator/enabled-providers-reconcile.ts
3
3
  /**
4
4
  * Reconcile the durable `enabledProviders` set against authoritative
@@ -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-Cyc4oyGh.js");
6
+ const require_dist = require("../../dist-DdlfeOQx.js");
7
7
  const require_snapshot_courtesy = require("../../snapshot-courtesy-D_C5-nC0.js");
8
8
  let zod = require("zod");
9
9
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { $s as DeviceType, Zn as deriveBatteryPresence, Zs as DeviceFeature, ec as errMsg, gn as batteryCapability, h as BatteryStatusSchema, hn as bareAddonId, ii as memoizePinnedFfmpeg, js as nodePin, mo as BaseAddon, tc as EventCategory, ua as snapshotCapability, va as streamQualityLabel } from "../../dist-C5sQPOZX.mjs";
1
+ import { Ms as nodePin, Qs as DeviceFeature, Zn as deriveBatteryPresence, ai as memoizePinnedFfmpeg, da as snapshotCapability, ec as DeviceType, gn as batteryCapability, h as BatteryStatusSchema, hn as bareAddonId, ho as BaseAddon, nc as EventCategory, tc as errMsg, ya as streamQualityLabel } from "../../dist-BqlGZK-1.mjs";
2
2
  import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg } from "../../snapshot-courtesy-CyFs1M3I.mjs";
3
3
  import { z } from "zod";
4
4
  import { randomUUID } from "node:crypto";