@camstack/server 1.2.743 → 1.2.744

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 (94) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/agent/main.js +4 -2
  3. package/package.json +4 -6
  4. package/system/dist/addon-runner.js +145 -76
  5. package/system/dist/addon-runner.mjs +145 -76
  6. package/system/dist/{agent-https-CTLbLv1Z.js → agent-https-BcxBTl03.js} +1 -1
  7. package/system/dist/{agent-https-BXFwvxco.mjs → agent-https-zLZqE2uf.mjs} +1 -1
  8. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  9. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  10. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  11. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  12. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  13. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  14. package/system/dist/builtins/autotrack/index.js +1 -1
  15. package/system/dist/builtins/autotrack/index.mjs +1 -1
  16. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  17. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  18. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  19. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  20. package/system/dist/builtins/camera-grid/index.js +1 -1
  21. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  22. package/system/dist/builtins/composer/composer.addon.js +3 -3
  23. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  24. package/system/dist/builtins/console-logging/index.js +1 -1
  25. package/system/dist/builtins/console-logging/index.mjs +1 -1
  26. package/system/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  27. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  28. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  29. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  30. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  31. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  32. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  33. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  34. package/system/dist/builtins/keychain/index.js +3 -3
  35. package/system/dist/builtins/keychain/index.mjs +3 -3
  36. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  37. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  38. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  39. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  40. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  41. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  42. package/system/dist/builtins/loki-logging/index.js +1 -1
  43. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  44. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  45. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  46. package/system/dist/builtins/platform-probe/index.js +1 -1
  47. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  48. package/system/dist/builtins/record-entries/index.js +1 -1
  49. package/system/dist/builtins/record-entries/index.mjs +1 -1
  50. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  51. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  52. package/system/dist/builtins/snapshot/index.js +1 -1
  53. package/system/dist/builtins/snapshot/index.mjs +1 -1
  54. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  55. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  56. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  57. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  58. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  59. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  60. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  61. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  62. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  63. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  64. package/system/dist/builtins/winston-logging/index.js +1 -1
  65. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  66. package/system/dist/{composition-sources-T2lA4x2c.js → composition-sources-B8hXkZdd.js} +1 -1
  67. package/system/dist/{composition-sources-BsdQWUId.mjs → composition-sources-Bc_D8LR5.mjs} +1 -1
  68. package/system/dist/{constants-3SpeBQ9e.mjs → constants-CBAenEIc.mjs} +1 -1
  69. package/system/dist/{constants-BrhaiRkm.js → constants-oztBWIpa.js} +1 -1
  70. package/system/dist/{device-ca-BCeNjQxi.js → device-ca-C5TjvqyB.js} +1 -1
  71. package/system/dist/{device-ca-Dp9VZmay.mjs → device-ca-DgEn-SoG.mjs} +1 -1
  72. package/system/dist/{dist-hoy7lFFU.js → dist-B0zmp3zn.js} +18 -2
  73. package/system/dist/{dist-CYQNDx7D.mjs → dist-Cdz0_zxq.mjs} +18 -2
  74. package/system/dist/file-host-worker.js +1 -1
  75. package/system/dist/file-host-worker.mjs +1 -1
  76. package/system/dist/{hub-mdns-ciao-Btg3hLbv.js → hub-mdns-ciao-DM_nVIFe.js} +2 -2
  77. package/system/dist/{hub-mdns-ciao-Bmgiu2PS.mjs → hub-mdns-ciao-nWSv_w8h.mjs} +2 -2
  78. package/system/dist/index.js +73 -11
  79. package/system/dist/index.mjs +73 -12
  80. package/system/dist/kernel/moleculer/runner-init-loop.d.ts +25 -0
  81. package/system/dist/kernel/transport/acting-addon.d.ts +17 -0
  82. package/system/dist/kernel/transport/child-cap-protocol.d.ts +12 -0
  83. package/system/dist/kernel/transport/index.d.ts +1 -0
  84. package/system/dist/kernel/transport/local-child-client.d.ts +2 -2
  85. package/system/dist/kernel/transport/local-child-registry.d.ts +7 -0
  86. package/system/dist/kernel/transport/runner-of-addon.d.ts +11 -0
  87. package/system/dist/migrations/hub/2026-11-02-records-owner-group-to-addon.d.ts +11 -0
  88. package/system/dist/{restore-archive-NPXKTdgW.js → restore-archive-CS-DPZ3U.js} +1 -1
  89. package/system/dist/{restore-archive-Da6R2OpB.mjs → restore-archive-gAzBMq-y.mjs} +1 -1
  90. package/system/dist/{retention-YUgpamYA.js → retention-CJ47t_51.js} +1 -1
  91. package/system/dist/{retention-BnRv1V1H.mjs → retention-Cfw9Jeyz.mjs} +1 -1
  92. package/system/dist/{wal-maintenance-B0jahuQG.js → wal-maintenance-BqyLi3Ko.js} +0 -0
  93. package/system/dist/{wal-maintenance-pDyTGZ-n.mjs → wal-maintenance-D8QmKPOV.mjs} +0 -0
  94. package/system/package.json +1 -1
@@ -1,9 +1,9 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Wt as ServerNameSchema, ca as shortHostname, cs as defineCustomActions, ho as BaseAddon, os as customAction, tc as errMsg, vs as hydrateSchema } from "../../dist-CYQNDx7D.mjs";
2
+ import { Wt as ServerNameSchema, ca as shortHostname, cs as defineCustomActions, ho as BaseAddon, os as customAction, tc as errMsg, vs as hydrateSchema } from "../../dist-Cdz0_zxq.mjs";
3
3
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
4
4
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
5
- import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-BXFwvxco.mjs";
6
- import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-3SpeBQ9e.mjs";
5
+ import { B as setProcessAgentHttpsNames, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, R as AgentHttpsNames, V as systemConfigRecordKinds, u as isPrivateAddress, z as getProcessAgentHttpsNames } from "../../agent-https-zLZqE2uf.mjs";
6
+ import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-CBAenEIc.mjs";
7
7
  import { t as require_src } from "../../src-hG4grMU4.mjs";
8
8
  import { z } from "zod";
9
9
  import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
@@ -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-hoy7lFFU.js");
6
+ const require_dist = require("../../dist-B0zmp3zn.js");
7
7
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
8
  const require_log_file_read_protocol = require("../../log-file-read-protocol-D0WcLbIV.js");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { $r as logDestinationCapability, ho as BaseAddon } from "../../dist-CYQNDx7D.mjs";
1
+ import { $r as logDestinationCapability, ho as BaseAddon } from "../../dist-Cdz0_zxq.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
3
3
  import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-B7M3X3bT.mjs";
4
4
  import { createRequire } from "node:module";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-hoy7lFFU.js");
1
+ const require_dist = require("./dist-B0zmp3zn.js");
2
2
  //#region src/builtins/shared/device-state-changed.ts
3
3
  /** Structural narrowing helper for untrusted bus payloads. */
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- import { Qa as compositionSourceKey, tc as errMsg } from "./dist-CYQNDx7D.mjs";
1
+ import { Qa as compositionSourceKey, tc as errMsg } from "./dist-Cdz0_zxq.mjs";
2
2
  //#region src/builtins/shared/device-state-changed.ts
3
3
  /** Structural narrowing helper for untrusted bus payloads. */
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- import { es as buildSecretRef } from "./dist-CYQNDx7D.mjs";
1
+ import { es as buildSecretRef } from "./dist-Cdz0_zxq.mjs";
2
2
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
3
3
  var MESH_CA_KEY_REF = buildSecretRef({
4
4
  owner: "system",
@@ -1,5 +1,5 @@
1
1
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
2
- var MESH_CA_KEY_REF = require("./dist-hoy7lFFU.js").buildSecretRef({
2
+ var MESH_CA_KEY_REF = require("./dist-B0zmp3zn.js").buildSecretRef({
3
3
  owner: "system",
4
4
  scope: { kind: "global" },
5
5
  fieldPath: "meshCaKey"
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-hoy7lFFU.js");
1
+ const require_dist = require("./dist-B0zmp3zn.js");
2
2
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/auth/jwt-signing-key.ts
@@ -1,4 +1,4 @@
1
- import { H as DEVICE_SAN_CREDENTIAL_PREFIX, U as DEVICE_SAN_USER_PREFIX, es as buildSecretRef } from "./dist-CYQNDx7D.mjs";
1
+ import { H as DEVICE_SAN_CREDENTIAL_PREFIX, U as DEVICE_SAN_USER_PREFIX, es as buildSecretRef } from "./dist-Cdz0_zxq.mjs";
2
2
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
3
3
  import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
4
4
  //#region src/auth/jwt-signing-key.ts
@@ -1165,7 +1165,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1165
1165
  return DeviceRole;
1166
1166
  }({});
1167
1167
  //#endregion
1168
- //#region ../types/dist/sleep-hmSP-eJt.mjs
1168
+ //#region ../types/dist/sleep-C6LqREpb.mjs
1169
1169
  /**
1170
1170
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1171
1171
  * window to float samples (D455).
@@ -1245,6 +1245,22 @@ function buildAlawTable() {
1245
1245
  buildUlawTable();
1246
1246
  buildAlawTable();
1247
1247
  /**
1248
+ * An addon whose own migrations did not apply refuses to initialise (D987). The error is typed
1249
+ * so a runner hosting several addons can tell "this addon is blocked" from a crash and keep its
1250
+ * co-located siblings running. Recognised by NAME and shape, never `instanceof`: a forked addon
1251
+ * bundles its own copy of this module, so the class the runner sees is not the one that threw.
1252
+ */
1253
+ var MIGRATIONS_BLOCKED_ERROR_NAME = "AddonMigrationsBlockedError";
1254
+ var AddonMigrationsBlockedError = class extends Error {
1255
+ /** The ledger ids that did not apply and block the owner. */
1256
+ migrationIds;
1257
+ constructor(migrationIds) {
1258
+ super(`migration(s) ${migrationIds.join(", ")} did not apply and block this addon — fix or retry them (migrations.retry), then restart it`);
1259
+ this.name = MIGRATIONS_BLOCKED_ERROR_NAME;
1260
+ this.migrationIds = migrationIds;
1261
+ }
1262
+ };
1263
+ /**
1248
1264
  * The value a redacted secret is replaced with on every read surface.
1249
1265
  *
1250
1266
  * It is also the WRITE-BACK token: an `upsertLocation` that sends this value
@@ -3023,7 +3039,7 @@ var BaseAddon = class {
3023
3039
  startMigration: (input) => api.startMigration.mutate(input),
3024
3040
  finishMigration: (input) => api.finishMigration.mutate(input)
3025
3041
  }, migrations, this.ctx.logger);
3026
- if (report.blockOwner.length > 0) throw new Error(`migration(s) ${report.blockOwner.join(", ")} did not apply and block this addon — fix or retry them (migrations.retry), then restart it`);
3042
+ if (report.blockOwner.length > 0) throw new AddonMigrationsBlockedError(report.blockOwner);
3027
3043
  return report;
3028
3044
  }
3029
3045
  /**
@@ -1165,7 +1165,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1165
1165
  return DeviceRole;
1166
1166
  }({});
1167
1167
  //#endregion
1168
- //#region ../types/dist/sleep-hmSP-eJt.mjs
1168
+ //#region ../types/dist/sleep-C6LqREpb.mjs
1169
1169
  /**
1170
1170
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1171
1171
  * window to float samples (D455).
@@ -1245,6 +1245,22 @@ function buildAlawTable() {
1245
1245
  buildUlawTable();
1246
1246
  buildAlawTable();
1247
1247
  /**
1248
+ * An addon whose own migrations did not apply refuses to initialise (D987). The error is typed
1249
+ * so a runner hosting several addons can tell "this addon is blocked" from a crash and keep its
1250
+ * co-located siblings running. Recognised by NAME and shape, never `instanceof`: a forked addon
1251
+ * bundles its own copy of this module, so the class the runner sees is not the one that threw.
1252
+ */
1253
+ var MIGRATIONS_BLOCKED_ERROR_NAME = "AddonMigrationsBlockedError";
1254
+ var AddonMigrationsBlockedError = class extends Error {
1255
+ /** The ledger ids that did not apply and block the owner. */
1256
+ migrationIds;
1257
+ constructor(migrationIds) {
1258
+ super(`migration(s) ${migrationIds.join(", ")} did not apply and block this addon — fix or retry them (migrations.retry), then restart it`);
1259
+ this.name = MIGRATIONS_BLOCKED_ERROR_NAME;
1260
+ this.migrationIds = migrationIds;
1261
+ }
1262
+ };
1263
+ /**
1248
1264
  * The value a redacted secret is replaced with on every read surface.
1249
1265
  *
1250
1266
  * It is also the WRITE-BACK token: an `upsertLocation` that sends this value
@@ -3023,7 +3039,7 @@ var BaseAddon = class {
3023
3039
  startMigration: (input) => api.startMigration.mutate(input),
3024
3040
  finishMigration: (input) => api.finishMigration.mutate(input)
3025
3041
  }, migrations, this.ctx.logger);
3026
- if (report.blockOwner.length > 0) throw new Error(`migration(s) ${report.blockOwner.join(", ")} did not apply and block this addon — fix or retry them (migrations.retry), then restart it`);
3042
+ if (report.blockOwner.length > 0) throw new AddonMigrationsBlockedError(report.blockOwner);
3027
3043
  return report;
3028
3044
  }
3029
3045
  /**
@@ -1,5 +1,5 @@
1
1
  require("./chunk-Cek0wNdY.js");
2
- const require_wal_maintenance = require("./wal-maintenance-B0jahuQG.js");
2
+ const require_wal_maintenance = require("./wal-maintenance-BqyLi3Ko.js");
3
3
  let node_worker_threads = require("node:worker_threads");
4
4
  //#region src/builtins/sqlite-storage/file-host-worker.ts
5
5
  /**
@@ -1,4 +1,4 @@
1
- import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-pDyTGZ-n.mjs";
1
+ import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-D8QmKPOV.mjs";
2
2
  import { parentPort, threadId, workerData } from "node:worker_threads";
3
3
  //#region src/builtins/sqlite-storage/file-host-worker.ts
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-hoy7lFFU.js");
2
+ const require_dist = require("./dist-B0zmp3zn.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
- const require_agent_https = require("./agent-https-CTLbLv1Z.js");
4
+ const require_agent_https = require("./agent-https-BcxBTl03.js");
5
5
  let node_crypto = require("node:crypto");
6
6
  let _camstack_types_node = require("@camstack/types/node");
7
7
  let node_fs_promises = require("node:fs/promises");
@@ -1,7 +1,7 @@
1
1
  import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
2
- import { Xs as userError } from "./dist-CYQNDx7D.mjs";
2
+ import { Xs as userError } from "./dist-Cdz0_zxq.mjs";
3
3
  import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
4
- import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-BXFwvxco.mjs";
4
+ import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-zLZqE2uf.mjs";
5
5
  import { X509Certificate, createPrivateKey } from "node:crypto";
6
6
  import { writeOwnerOnlyFileSync } from "@camstack/types/node";
7
7
  import { mkdir, writeFile } from "node:fs/promises";
@@ -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-hoy7lFFU.js");
4
- const require_device_ca = require("./device-ca-BCeNjQxi.js");
3
+ const require_dist = require("./dist-B0zmp3zn.js");
4
+ const require_device_ca = require("./device-ca-C5TjvqyB.js");
5
5
  const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
6
6
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
7
7
  require("./builtins/alerts/index.js");
@@ -26,21 +26,21 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
26
26
  const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
27
27
  const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
28
28
  const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
29
- const require_wal_maintenance = require("./wal-maintenance-B0jahuQG.js");
29
+ const require_wal_maintenance = require("./wal-maintenance-BqyLi3Ko.js");
30
30
  const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
31
31
  const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
32
32
  const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
33
33
  require("./builtins/storage-orchestrator/index.js");
34
- const require_agent_https = require("./agent-https-CTLbLv1Z.js");
35
- const require_constants = require("./constants-BrhaiRkm.js");
34
+ const require_agent_https = require("./agent-https-BcxBTl03.js");
35
+ const require_constants = require("./constants-oztBWIpa.js");
36
36
  const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
37
37
  require("./builtins/system-config/index.js");
38
38
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
39
39
  const require_custom_action_registry = require("./custom-action-registry-JuMHGKEc.js");
40
- const require_hub_mdns_ciao = require("./hub-mdns-ciao-Btg3hLbv.js");
40
+ const require_hub_mdns_ciao = require("./hub-mdns-ciao-DM_nVIFe.js");
41
41
  const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
42
42
  const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
43
- const require_restore_archive = require("./restore-archive-NPXKTdgW.js");
43
+ const require_restore_archive = require("./restore-archive-CS-DPZ3U.js");
44
44
  const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
45
45
  let zod = require("zod");
46
46
  let node_crypto = require("node:crypto");
@@ -19665,6 +19665,22 @@ function createLocalTransport() {
19665
19665
  };
19666
19666
  }
19667
19667
  //#endregion
19668
+ //#region src/kernel/transport/runner-of-addon.ts
19669
+ /**
19670
+ * The agent's runner -> addons map, filled where a spawn plan computes each addon's runner id
19671
+ * (`resolveRunnerId`) and read by the agent's `LocalChildRegistry` to verify which addon a grouped
19672
+ * runner acts for. An addon never planned here resolves to itself, as on the hub.
19673
+ */
19674
+ var RunnerOfAddon = class {
19675
+ byAddon = /* @__PURE__ */ new Map();
19676
+ /** Remember the plan and hand the runner id back, so the call site stays one expression. */
19677
+ record(addonId, runnerId) {
19678
+ this.byAddon.set(addonId, runnerId);
19679
+ return runnerId;
19680
+ }
19681
+ resolve = (addonId) => this.byAddon.get(addonId) ?? addonId;
19682
+ };
19683
+ //#endregion
19668
19684
  //#region src/kernel/moleculer/cap-usage-registry.ts
19669
19685
  /**
19670
19686
  * In-memory observation of tRPC cap calls between addons — the store behind
@@ -20343,6 +20359,30 @@ async function answerDeviceCallRedirect(hook, call) {
20343
20359
  });
20344
20360
  return answer.kind === "redirected" ? { result: answer.result } : null;
20345
20361
  }
20362
+ //#endregion
20363
+ //#region src/kernel/transport/acting-addon.ts
20364
+ /**
20365
+ * The addon a grouped child acts for (the records owner).
20366
+ *
20367
+ * A grouped runner is stamped with its GROUP id by the transport, and the group can change when
20368
+ * the grouping does; the data of the caps below is keyed by the ADDON, which never changes. The
20369
+ * child therefore claims the addon it acts for, and the parent checks the claim against its own
20370
+ * runner map before it stamps the call with it.
20371
+ */
20372
+ /** The caps whose rows and secret refs are keyed by the calling ADDON, not by its runner. */
20373
+ var ADDON_KEYED_CAPS = ["records"];
20374
+ /** A child claimed an addon its runner does not host. Typed so a caller can tell it from a crash. */
20375
+ var ActingAddonRefusedError = class extends Error {
20376
+ runnerId;
20377
+ claimedAddonId;
20378
+ code = "acting-addon-not-hosted";
20379
+ constructor(runnerId, claimedAddonId) {
20380
+ super(`acting-addon-not-hosted: runner "${runnerId}" does not host addon "${claimedAddonId}"; the call is refused`);
20381
+ this.runnerId = runnerId;
20382
+ this.claimedAddonId = claimedAddonId;
20383
+ this.name = "ActingAddonRefusedError";
20384
+ }
20385
+ };
20346
20386
  /** The source every runner lifecycle event this registry emits carries. */
20347
20387
  var LIFECYCLE_SOURCE = {
20348
20388
  type: "core",
@@ -21011,6 +21051,22 @@ var LocalChildRegistry = class {
21011
21051
  });
21012
21052
  }
21013
21053
  }
21054
+ /**
21055
+ * The caller stamp of a `cap-call-out`. A claim (`actingAddonId`) is checked against the
21056
+ * runner map the parent built at spawn (`resolveChildIdForAddon`, identity for a solo runner):
21057
+ * a runner that does not host the addon is refused. Only the caps keyed by the ADDON
21058
+ * (`ADDON_KEYED_CAPS`) use the verified addon id; every other cap keeps the runner stamp.
21059
+ */
21060
+ callerStampOf(childId, out) {
21061
+ const claimed = out.actingAddonId;
21062
+ if (claimed === void 0 || childId === null) return childId;
21063
+ if (this.resolveChildIdForAddon === void 0) {
21064
+ if (claimed !== childId && ADDON_KEYED_CAPS.includes(out.capName)) throw new ActingAddonRefusedError(childId, claimed);
21065
+ return childId;
21066
+ }
21067
+ if ((this.resolveChildIdForAddon(claimed) ?? claimed) !== childId) throw new ActingAddonRefusedError(childId, claimed);
21068
+ return ADDON_KEYED_CAPS.includes(out.capName) ? claimed : childId;
21069
+ }
21014
21070
  onConnection(channel) {
21015
21071
  let childId = null;
21016
21072
  const incarnation = this.nextIncarnation++;
@@ -21084,6 +21140,7 @@ var LocalChildRegistry = class {
21084
21140
  }
21085
21141
  if (msg.kind === "cap-call-out") {
21086
21142
  const out = msg;
21143
+ const callerStamp = this.callerStampOf(childId, out);
21087
21144
  const hints = out.hints ?? liftRoutingHints(out.args);
21088
21145
  const materialise = () => payload !== void 0 ? unpackPayload(payload) : out.args;
21089
21146
  const buildInput = () => ({
@@ -21093,7 +21150,7 @@ var LocalChildRegistry = class {
21093
21150
  ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
21094
21151
  ...out.nodeId !== void 0 ? { nodeId: out.nodeId } : {},
21095
21152
  ...out.native === true ? { native: true } : {},
21096
- ...childId !== null ? { callerAddonId: childId } : {}
21153
+ ...callerStamp !== null ? { callerAddonId: callerStamp } : {}
21097
21154
  });
21098
21155
  if (this.claimedStatus !== void 0 && out.method === "getStatus") {
21099
21156
  const claimed = await answerClaimedGetStatus(this.claimedStatus, {
@@ -21139,7 +21196,7 @@ var LocalChildRegistry = class {
21139
21196
  method: out.method,
21140
21197
  args: void 0,
21141
21198
  ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
21142
- ...childId !== null ? { callerAddonId: childId } : {}
21199
+ ...callerStamp !== null ? { callerAddonId: callerStamp } : {}
21143
21200
  };
21144
21201
  const declared = this.capTimeoutMs?.(out.capName, out.method);
21145
21202
  return entry.channel.request(forward, {
@@ -21512,7 +21569,8 @@ var LocalChildClient = class {
21512
21569
  const routing = {
21513
21570
  ...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
21514
21571
  ...input.nodeId !== void 0 ? { nodeId: input.nodeId } : {},
21515
- ...input.native === true ? { native: true } : {}
21572
+ ...input.native === true ? { native: true } : {},
21573
+ ...input.actingAddonId !== void 0 ? { actingAddonId: input.actingAddonId } : {}
21516
21574
  };
21517
21575
  if (this.parentRawForward && input.args !== void 0) {
21518
21576
  const hints = liftRoutingHints(input.args);
@@ -24002,7 +24060,10 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
24002
24060
  const links = [localProviderLink(workerResolver, observerOpts)];
24003
24061
  if (runtime.mode === "uds") {
24004
24062
  const udsClient = runtime.client;
24005
- links.push(ipcParentLink(() => (input) => udsClient.callOut(input)));
24063
+ links.push(ipcParentLink(() => (input) => udsClient.callOut({
24064
+ ...input,
24065
+ actingAddonId: addonId
24066
+ })));
24006
24067
  } else {
24007
24068
  const parentCallOutGetter = options?.getParentCallOut;
24008
24069
  if (parentCallOutGetter !== void 0) links.push(ipcParentLink(parentCallOutGetter));
@@ -28265,6 +28326,7 @@ exports.ReadinessTimeoutError = require_dist.ReadinessTimeoutError;
28265
28326
  exports.RecordsEngine = require_wal_maintenance.RecordsEngine;
28266
28327
  exports.ReplEngine = ReplEngine;
28267
28328
  exports.RingBuffer = RingBuffer;
28329
+ exports.RunnerOfAddon = RunnerOfAddon;
28268
28330
  exports.SERVER_AUTH_OID = require_agent_https.SERVER_AUTH_OID;
28269
28331
  exports.SERVER_NAMESPACE = SERVER_NAMESPACE;
28270
28332
  exports.SOCKET_PLANE_TOP_N = SOCKET_PLANE_TOP_N;
@@ -1,6 +1,6 @@
1
1
  import { i as __require } from "./chunk-CNf5ZN-e.mjs";
2
- import { Bs as resolveCapMount, E as CatalogFileSchema, Fo as RUNTIME_DEFAULTS, Fs as parseJsonObject, Hr as kebabToCamel$1, Hs as scopeKey, Io as ReadinessRegistry, Is as parseJsonUnknown, Ki as resolveMethodAuth, Lo as ReadinessTimeoutError, Nr as isArrayOutputSchema, Pr as isCollectionArrayMethod, Rs as readinessKey, Vr as isVoidInput, Xo as asNumber, Xs as userError, Yo as asJsonObject$1, Zo as asString$1, Zs as withoutCallerStamp, _i as objectInputDeclaresAddonId, _o as CALLER_STAMPED_CAPABILITIES$1, a as AGENT_MDNS_TXT_KEYS, as as createEvent$1, ba as supportedRuntimes, bo as DEVICE_STATUS_METHOD, bt as METHOD_ACCESS_MAP, ds as emitDownForOwnedCaps, ei as logLevelAtMost, fa as splitTranslationRef, hn as bareAddonId, hr as extractNestedAddonId, hs as getDebugInterest, i as AGENT_MDNS_SERVICE_TYPE, ji as procedureAuthKey, kr as interpolate, na as scopesAllowDeviceCap, nc as EventCategory$1, o as ALL_CAPABILITY_DEFINITIONS, on as addonSettingsCapability, ps as expandCapMethods, qr as lifecycleJobSchema, ta as scopesAllowAddon, tc as errMsg$1, ti as looseSchema, us as defineRecordKinds, vi as objectInputDeclaresRequiredDeviceId, vo as DATAPLANE_SECRET_HEADER$1, vt as LOG_LEVEL_RANK, y as CATALOG_LANGS, yo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, ys as isDebugChannelName, zr as isObjectInput } from "./dist-CYQNDx7D.mjs";
3
- import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-Dp9VZmay.mjs";
2
+ import { Bs as resolveCapMount, E as CatalogFileSchema, Fo as RUNTIME_DEFAULTS, Fs as parseJsonObject, Hr as kebabToCamel$1, Hs as scopeKey, Io as ReadinessRegistry, Is as parseJsonUnknown, Ki as resolveMethodAuth, Lo as ReadinessTimeoutError, Nr as isArrayOutputSchema, Pr as isCollectionArrayMethod, Rs as readinessKey, Vr as isVoidInput, Xo as asNumber, Xs as userError, Yo as asJsonObject$1, Zo as asString$1, Zs as withoutCallerStamp, _i as objectInputDeclaresAddonId, _o as CALLER_STAMPED_CAPABILITIES$1, a as AGENT_MDNS_TXT_KEYS, as as createEvent$1, ba as supportedRuntimes, bo as DEVICE_STATUS_METHOD, bt as METHOD_ACCESS_MAP, ds as emitDownForOwnedCaps, ei as logLevelAtMost, fa as splitTranslationRef, hn as bareAddonId, hr as extractNestedAddonId, hs as getDebugInterest, i as AGENT_MDNS_SERVICE_TYPE, ji as procedureAuthKey, kr as interpolate, na as scopesAllowDeviceCap, nc as EventCategory$1, o as ALL_CAPABILITY_DEFINITIONS, on as addonSettingsCapability, ps as expandCapMethods, qr as lifecycleJobSchema, ta as scopesAllowAddon, tc as errMsg$1, ti as looseSchema, us as defineRecordKinds, vi as objectInputDeclaresRequiredDeviceId, vo as DATAPLANE_SECRET_HEADER$1, vt as LOG_LEVEL_RANK, y as CATALOG_LANGS, yo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, ys as isDebugChannelName, zr as isObjectInput } from "./dist-Cdz0_zxq.mjs";
3
+ import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-DgEn-SoG.mjs";
4
4
  import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
5
5
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
6
6
  import "./builtins/alerts/index.mjs";
@@ -25,21 +25,21 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
25
25
  import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
26
26
  import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
27
27
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
28
- import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-pDyTGZ-n.mjs";
28
+ import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-D8QmKPOV.mjs";
29
29
  import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
30
30
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
31
31
  import { StorageOrchestratorAddon, a as stripForwardedCaller, i as createHubCapForwardService, l as STORAGE_DRAIN_STATE_LEGACY, n as HUB_CAP_FWD_ACTION, o as buildStorageLocationRegistry, r as HUB_CAP_FWD_SERVICE, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
32
32
  import "./builtins/storage-orchestrator/index.mjs";
33
- import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-BXFwvxco.mjs";
34
- import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-3SpeBQ9e.mjs";
33
+ import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-zLZqE2uf.mjs";
34
+ import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-CBAenEIc.mjs";
35
35
  import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
36
36
  import "./builtins/system-config/index.mjs";
37
37
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
38
38
  import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-oHl1xltx.mjs";
39
- import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-Bmgiu2PS.mjs";
39
+ import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-nWSv_w8h.mjs";
40
40
  import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
41
41
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
42
- import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-Da6R2OpB.mjs";
42
+ import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-gAzBMq-y.mjs";
43
43
  import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
44
44
  import { z } from "zod";
45
45
  import * as crypto$1 from "node:crypto";
@@ -19662,6 +19662,22 @@ function createLocalTransport() {
19662
19662
  };
19663
19663
  }
19664
19664
  //#endregion
19665
+ //#region src/kernel/transport/runner-of-addon.ts
19666
+ /**
19667
+ * The agent's runner -> addons map, filled where a spawn plan computes each addon's runner id
19668
+ * (`resolveRunnerId`) and read by the agent's `LocalChildRegistry` to verify which addon a grouped
19669
+ * runner acts for. An addon never planned here resolves to itself, as on the hub.
19670
+ */
19671
+ var RunnerOfAddon = class {
19672
+ byAddon = /* @__PURE__ */ new Map();
19673
+ /** Remember the plan and hand the runner id back, so the call site stays one expression. */
19674
+ record(addonId, runnerId) {
19675
+ this.byAddon.set(addonId, runnerId);
19676
+ return runnerId;
19677
+ }
19678
+ resolve = (addonId) => this.byAddon.get(addonId) ?? addonId;
19679
+ };
19680
+ //#endregion
19665
19681
  //#region src/kernel/moleculer/cap-usage-registry.ts
19666
19682
  /**
19667
19683
  * In-memory observation of tRPC cap calls between addons — the store behind
@@ -20340,6 +20356,30 @@ async function answerDeviceCallRedirect(hook, call) {
20340
20356
  });
20341
20357
  return answer.kind === "redirected" ? { result: answer.result } : null;
20342
20358
  }
20359
+ //#endregion
20360
+ //#region src/kernel/transport/acting-addon.ts
20361
+ /**
20362
+ * The addon a grouped child acts for (the records owner).
20363
+ *
20364
+ * A grouped runner is stamped with its GROUP id by the transport, and the group can change when
20365
+ * the grouping does; the data of the caps below is keyed by the ADDON, which never changes. The
20366
+ * child therefore claims the addon it acts for, and the parent checks the claim against its own
20367
+ * runner map before it stamps the call with it.
20368
+ */
20369
+ /** The caps whose rows and secret refs are keyed by the calling ADDON, not by its runner. */
20370
+ var ADDON_KEYED_CAPS = ["records"];
20371
+ /** A child claimed an addon its runner does not host. Typed so a caller can tell it from a crash. */
20372
+ var ActingAddonRefusedError = class extends Error {
20373
+ runnerId;
20374
+ claimedAddonId;
20375
+ code = "acting-addon-not-hosted";
20376
+ constructor(runnerId, claimedAddonId) {
20377
+ super(`acting-addon-not-hosted: runner "${runnerId}" does not host addon "${claimedAddonId}"; the call is refused`);
20378
+ this.runnerId = runnerId;
20379
+ this.claimedAddonId = claimedAddonId;
20380
+ this.name = "ActingAddonRefusedError";
20381
+ }
20382
+ };
20343
20383
  /** The source every runner lifecycle event this registry emits carries. */
20344
20384
  var LIFECYCLE_SOURCE = {
20345
20385
  type: "core",
@@ -21008,6 +21048,22 @@ var LocalChildRegistry = class {
21008
21048
  });
21009
21049
  }
21010
21050
  }
21051
+ /**
21052
+ * The caller stamp of a `cap-call-out`. A claim (`actingAddonId`) is checked against the
21053
+ * runner map the parent built at spawn (`resolveChildIdForAddon`, identity for a solo runner):
21054
+ * a runner that does not host the addon is refused. Only the caps keyed by the ADDON
21055
+ * (`ADDON_KEYED_CAPS`) use the verified addon id; every other cap keeps the runner stamp.
21056
+ */
21057
+ callerStampOf(childId, out) {
21058
+ const claimed = out.actingAddonId;
21059
+ if (claimed === void 0 || childId === null) return childId;
21060
+ if (this.resolveChildIdForAddon === void 0) {
21061
+ if (claimed !== childId && ADDON_KEYED_CAPS.includes(out.capName)) throw new ActingAddonRefusedError(childId, claimed);
21062
+ return childId;
21063
+ }
21064
+ if ((this.resolveChildIdForAddon(claimed) ?? claimed) !== childId) throw new ActingAddonRefusedError(childId, claimed);
21065
+ return ADDON_KEYED_CAPS.includes(out.capName) ? claimed : childId;
21066
+ }
21011
21067
  onConnection(channel) {
21012
21068
  let childId = null;
21013
21069
  const incarnation = this.nextIncarnation++;
@@ -21081,6 +21137,7 @@ var LocalChildRegistry = class {
21081
21137
  }
21082
21138
  if (msg.kind === "cap-call-out") {
21083
21139
  const out = msg;
21140
+ const callerStamp = this.callerStampOf(childId, out);
21084
21141
  const hints = out.hints ?? liftRoutingHints(out.args);
21085
21142
  const materialise = () => payload !== void 0 ? unpackPayload(payload) : out.args;
21086
21143
  const buildInput = () => ({
@@ -21090,7 +21147,7 @@ var LocalChildRegistry = class {
21090
21147
  ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
21091
21148
  ...out.nodeId !== void 0 ? { nodeId: out.nodeId } : {},
21092
21149
  ...out.native === true ? { native: true } : {},
21093
- ...childId !== null ? { callerAddonId: childId } : {}
21150
+ ...callerStamp !== null ? { callerAddonId: callerStamp } : {}
21094
21151
  });
21095
21152
  if (this.claimedStatus !== void 0 && out.method === "getStatus") {
21096
21153
  const claimed = await answerClaimedGetStatus(this.claimedStatus, {
@@ -21136,7 +21193,7 @@ var LocalChildRegistry = class {
21136
21193
  method: out.method,
21137
21194
  args: void 0,
21138
21195
  ...out.deviceId !== void 0 ? { deviceId: out.deviceId } : {},
21139
- ...childId !== null ? { callerAddonId: childId } : {}
21196
+ ...callerStamp !== null ? { callerAddonId: callerStamp } : {}
21140
21197
  };
21141
21198
  const declared = this.capTimeoutMs?.(out.capName, out.method);
21142
21199
  return entry.channel.request(forward, {
@@ -21509,7 +21566,8 @@ var LocalChildClient = class {
21509
21566
  const routing = {
21510
21567
  ...input.deviceId !== void 0 ? { deviceId: input.deviceId } : {},
21511
21568
  ...input.nodeId !== void 0 ? { nodeId: input.nodeId } : {},
21512
- ...input.native === true ? { native: true } : {}
21569
+ ...input.native === true ? { native: true } : {},
21570
+ ...input.actingAddonId !== void 0 ? { actingAddonId: input.actingAddonId } : {}
21513
21571
  };
21514
21572
  if (this.parentRawForward && input.args !== void 0) {
21515
21573
  const hints = liftRoutingHints(input.args);
@@ -23999,7 +24057,10 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
23999
24057
  const links = [localProviderLink(workerResolver, observerOpts)];
24000
24058
  if (runtime.mode === "uds") {
24001
24059
  const udsClient = runtime.client;
24002
- links.push(ipcParentLink(() => (input) => udsClient.callOut(input)));
24060
+ links.push(ipcParentLink(() => (input) => udsClient.callOut({
24061
+ ...input,
24062
+ actingAddonId: addonId
24063
+ })));
24003
24064
  } else {
24004
24065
  const parentCallOutGetter = options?.getParentCallOut;
24005
24066
  if (parentCallOutGetter !== void 0) links.push(ipcParentLink(parentCallOutGetter));
@@ -28065,4 +28126,4 @@ function resetCatalogRegistryForTests() {
28065
28126
  }
28066
28127
  //#endregion
28067
28128
  var readAllRows = import_read_all_rows.readAllRows;
28068
- export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, INTEGRATIONS_LEGACY, INTEGRATION_SETTINGS_LEGACY, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, ReplEngine, RingBuffer, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORAGE_DRAIN_STATE_LEGACY, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHttpsListener, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };
28129
+ export { ADDON_VERSION_REASON_HUB, ADDON_VERSION_REASON_REGISTRY_LATEST, AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_DASHBOARD_ORIGINS_FIELD, AGENT_HTTPS_NAMES_COLLECTION, AGENT_HTTPS_NAMES_COLUMNS, AGENT_MAIN_HEAP_WATCH_LABEL, AGENT_READINESS_SERVICE_NAME, AGENT_UI_UNLOCK_TTL_MS, AGENT_UI_UNLOCK_TYP, AGENT_UI_UNLOCK_USE, AGENT_UI_UNLOCK_VERSION, ALL_CAPABILITY_DEFINITIONS, ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ARRAY_BUFFER_CENSUS_THRESHOLD_MB, ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRefusedError, AddonRouteRegistry, AgentHttpsInstallError, AgentHttpsNames, AgentMdnsAdvertiser, AgentMeshIdentityGate, AgentPairing, AlertCenterAddon, AuthAuditLog, AuthManager, BackupDecryptError, BackupKeyFormatError, BackupKeyMismatchError, BackupKeyRequiredError, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, CatalogRegistry, ClusterNodeHistoryBodySchema, ClusterNodeTombstoneBodySchema, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_HUB_TLS_TCP_PORT, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_CA_KEY_REF, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceCaStore, DeviceCredentialManager, DeviceHistoryAddon, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FIRST_BOOT_ADMIN_PASSWORD, FIRST_BOOT_ADMIN_USERNAME, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, GET_STATUS_METHOD, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_SPACE_REPORT_MIN_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HUB_MAIN_HEAP_WATCH_LABEL, HUB_MAIN_RSS_BUDGET_MB, HUB_RSS_BUDGET_ENV, HUB_RSS_BUDGET_OVERRIDE_SOURCE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, HubPairing, INFRA_CAPABILITIES, INTEGRATIONS_LEGACY, INTEGRATION_SETTINGS_LEGACY, IntegrationRegistry, InvalidCorsOriginError, JWT_SIGNING_KEY_REF, JobJournal, JwtSigningKeyUnavailableError, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LoginSessionManager, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MEMBERSHIP_PATHS, MESH_ACTION_FORBIDDEN_TYPE, MESH_CA_FIELD, MESH_CA_KEY_REF, MESH_CA_SETTINGS_KEY, MESH_NODE_CERTIFICATES_COLLECTION, MESH_NODE_CERTIFICATES_COLUMNS, MESH_NODE_UNAUTHENTICATED_TYPE, MESH_QUEUE_TOP_N, MESH_TLS_PORT_HELLO_FIELD, METHOD_ACCESS_MAP, MembershipResponder, MeshCaKeeper, MeshCertificateRegistry, MeshCrl, MeshIdentityGate, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OPAQUE_ORIGIN, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PAIRING_CODE_DIGITS, PAIRING_MAX_CODE_ATTEMPTS, PAIRING_MAX_SESSIONS, PAIRING_PATHS, PAIRING_PIN_DIGITS, PAIRING_PROTOCOL, PAIRING_TTL_MS, PARENT_ROUTED_PROVIDER_ADDON_ID, PERMITTED_DNS_SUFFIXES, PERMITTED_IP_RANGES, PREVIOUS_LEAF_GRACE_MS, PYTHON_VERSION, PairingHttpError, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, REFRESH_TOKEN_PREFIX, RENEWAL_ABANDONED, RESTART_MARKER_FILE, RSS_BUDGET_REANNOUNCE_MIN_MS, RSS_BUDGET_RELEASE_RATIO, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNNER_RSS_BUDGET_ENV, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, RecordsEngine, ReplEngine, RingBuffer, RunnerOfAddon, SERVER_AUTH_OID, SERVER_NAMESPACE, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORAGE_DRAIN_STATE_LEGACY, STORE_READABLE_BOOTSTRAP_KEYS, SYSTEM_SECRET_OWNER, ScopedLogger, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemBackupService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, TlsTcpTransporter, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UPLOADED_CA_FILE, USER_MANAGEMENT_INTERNAL, UdsLocalTransportClient, UdsLocalTransportServer, UnlockTicketJtiStore, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, acceptAgentSans, adaptBrokerToCluster, addonSettingsCapability, adoptModelRevisions, afterWorkerOnlineAnnounce, agentHttpsPaths, allFamiliesListenHost, answerClaimedGetStatus, answerDeviceCallRedirect, applyCertificateToListener, applyLanHttp, asBrokerLike, attachUserManagementInternal, attributeStall, backupOrchestratorRecordKinds, backupRecordStoresOf, bareAddonOf, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildAgentAnnouncement, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNameConstraintSet, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, buildTransporter, builderMountedCapNames, caFingerprint, caFingerprintCompact, caReplacementMarkerFile, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, catalogNamespaceOf, certificateNames, chainsToPublicRoot, checkUploadedCa, classifyAddonDir, classifyCapRoute, clearHttpsListener, clearNodeSettings, clearPendingRestart, clearPlatformKeychainKey, closeLanHttp, clusterAgentRecordKinds, clusterEventTopic, clusterNodeHistoryRecordKind, clusterNodeTombstoneRecordKind, collectAgentNames, collectCertIdentity, collectModelFiles, compileLogFilter, computePairingCommitment, computePairingSas, connectBrokerTransport, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createAgentEventScope, createAgentHttpsRequest, createAgentTransport, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCiaoPublisher, createCidrMatcher, createCoreCapService, createCoreCatalogRegistry, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createKernelInferenceEngine, createLocalTransport, createLoopDelayMeter, createMeshAccessMiddleware, createMeshCsrPem, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, currentBrokerTransporter, decideAddonVersionMove, deleteModelFromDisk, deriveAgentListenPort, describeCsr, describeHttpsLeaf, describeMeshLeaf, describeProviderKindDrift, describeRss, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, disconnectBrokerTransport, downloadBinary, downloadFile, downloadModel, dropProcessPeer, emitDownForOwnedCaps, emitHeapDiagnosticReport, emitProcessNodeRegistered, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, exportMeshPrivateKeyPem, fetchJson, filterIsEmpty, findAddonRefusal, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, generateBackupKeyPair, generateDeviceCa, generateMeshCa, generateMeshKeyPair, getBrokerEventBus, getBrokerTlsTransporter, getCapUsageRegistry, getCatalogRegistry, getFfmpegDownloadUrl, getLocalEventInterest, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPlatformKeychainKey, getProcessAgentHttpsNames, getProcessJwtSigningKeyState, getProcessMeshCaState, getProcessMeshCertificateRegistry, getProcessMeshTlsListenerState, getProcessNodeMeshTransport, getProcessPeerLeaf, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getUserManagementInternal, getWorkerDeviceRegistry, hasDotNode, heapSpaceField, hostNodeIdOf, hubHostFromMeshAddress, hubMainRssBudget, hubServerVersionOf, installAgentHttps, installBrokerTransporter, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, integrationRegistryRecordKinds, ipcParentLink, isAddonDeploySource, isAllowedAgentDashboardReturnTo, isArrayBufferCensusReport, isArrayOutputSchema, isCollectionArrayMethod, isConstrainedCa, isContainerBridgeAddress, isCredentialKeyName, isInfraCapability, isInsecureOrigin, isInstalledTransporter, isLocalOnlyHostname, isModelDownloaded, isPeerEventPacket, isPrivateAddress, isProcessVerifiedMeshPeer, isRemoteForbiddenAction, isRemoteForbiddenOnAgent, isSettingsReadUnavailable, isSourceNewer, isValidAgentNodeId, isolatedBuiltinPhase, issueAgentHttpsLeaf, issueDeviceLeaf, issueMeshLeafForNode, issueMeshLeafFromCsr, keyFingerprintShort, leafFingerprintOf, levelRank, lineContainsText, lineMatches, loadAgentHttps, loadBootstrapConfig, loadDeviceCa, loadMeshCa, loadTlsCert, localCaCommonName, localEndpointPath, localProviderLink, localSupportedPythonRuntimes, mapSignalsToInferenceHardware, meshErrorType, mintAgentUiUnlockTicket, mountNativeCapService, nextRssBudgetState, normalizeIp, normalizeOrigin, onLocalEventInterestChange, onProcessNodeRegistered, onSessionsRevoked, openMeshTlsWhenRevocationsLoaded, originNodeOf, overlayGetStatus, parseAgentDashboardOrigins, parseCapAction, parseCidrList, parseOriginList, parseRangeHeader, parseRssBudgetMb, parseTokenExpiry, parseTokenizedUrl, partitionIsolatedBuiltinIds, pemDigest, permitsIdentity, permitsName, pinnedHttpsCaFingerprint, preferencesLimitReasonOf, prepareBootTls, prepareRestoreArchive, probePlatform, processJwtSigningKey, processMeshCrl, proxyToUpstream, quarantineAddonResidue, readAllRows, readBackupEncryptionHeader, readCidrSetting, readExtraSans, readHeapSpaces, readLanHttpState, readNameConstraints, readOriginSetting, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsEnabled, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, redactLogEntry, redactLogMeta, redactLogText, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, renewMeshCertificate, replaceUnconstrainedLocalCa, requireProcessMeshCa, resetCatalogRegistryForTests, resolveFilePath, resolveFormatRevision, resolveHwAccel, resolveNpmInvocation, retirePreviousLocalCa, revertToGeneratedCertificate, revisionWeightUrl, revokeMeshCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setHuggingFaceReachabilityObserver, setNodeEventInterest, setPlatformKeychainKey, setProcessAgentHttpsNames, setProcessMeshCertificateRegistry, setProcessMeshPeerTransportLookup, setProcessMeshTlsEnabler, setProcessMeshTlsListenerState, setWrapperActive, shouldReclaim, signMembershipProof, signPairingProof, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, stampCallerAddonId, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, staticJwtSigningKey, storageOrchestratorRecordKinds, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, stripForgedIdentity, stripForwardedCaller, subscribePassthrough, systemHostFacts, udsChildLogToWorkerEntry, useStoredUploadedCertificate, validateProviderRegistrations, validateUploadedTls, verifyAgentUiUnlockTicket, verifyDeviceLeaf, verifyDeviceSignature, verifyMembershipAnswer, verifyPairingProof, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsEnabled, writeTlsMode };