@camstack/system 1.2.353 → 1.2.355

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 (82) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/dist/builtins/autotrack/index.js +1 -1
  10. package/dist/builtins/autotrack/index.mjs +1 -1
  11. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  13. package/dist/builtins/calendars/calendar-prefs-store.d.ts +7 -0
  14. package/dist/builtins/calendars/calendars.addon.js +3 -2
  15. package/dist/builtins/calendars/calendars.addon.mjs +3 -2
  16. package/dist/builtins/camera-grid/index.js +1 -1
  17. package/dist/builtins/camera-grid/index.mjs +1 -1
  18. package/dist/builtins/composer/composer.addon.js +56 -5
  19. package/dist/builtins/composer/composer.addon.mjs +56 -5
  20. package/dist/builtins/console-logging/index.js +1 -1
  21. package/dist/builtins/console-logging/index.mjs +1 -1
  22. package/dist/builtins/core-blocks/block-settings-store.d.ts +5 -0
  23. package/dist/builtins/core-blocks/core-blocks.addon.js +7 -2
  24. package/dist/builtins/core-blocks/core-blocks.addon.mjs +7 -2
  25. package/dist/builtins/device-manager/device-manager.addon.js +3 -3
  26. package/dist/builtins/device-manager/device-manager.addon.mjs +3 -3
  27. package/dist/builtins/hub-forwarder/index.js +1 -1
  28. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  29. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  30. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  31. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  32. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  33. package/dist/builtins/local-network/local-network.addon.d.ts +21 -6
  34. package/dist/builtins/local-network/local-network.addon.js +81 -54
  35. package/dist/builtins/local-network/local-network.addon.mjs +81 -55
  36. package/dist/builtins/loki-logging/index.js +1 -1
  37. package/dist/builtins/loki-logging/index.mjs +1 -1
  38. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  39. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  40. package/dist/builtins/platform-probe/index.js +1 -1
  41. package/dist/builtins/platform-probe/index.mjs +1 -1
  42. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  43. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  44. package/dist/builtins/snapshot/index.js +1 -1
  45. package/dist/builtins/snapshot/index.mjs +1 -1
  46. package/dist/builtins/sqlite-storage/analyze-stats.d.ts +0 -2
  47. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  48. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  49. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +9 -11
  50. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +0 -0
  51. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  52. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +2 -2
  53. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +2 -2
  54. package/dist/builtins/system-config/system-config.addon.js +1 -1
  55. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  56. package/dist/builtins/winston-logging/index.js +1 -1
  57. package/dist/builtins/winston-logging/index.mjs +1 -1
  58. package/dist/{child-cap-dispatch-CvYlCq60.js → child-cap-dispatch-CqV-7-QZ.js} +27 -86
  59. package/dist/{child-cap-dispatch-C6IpRb4P.mjs → child-cap-dispatch-DMx2axev.mjs} +28 -81
  60. package/dist/{composition-sources-CAFDvTRs.js → composition-sources-Bk-MjK1D.js} +1 -1
  61. package/dist/{composition-sources-BGlDi3CT.mjs → composition-sources-Dpl1G0Gr.mjs} +1 -1
  62. package/dist/{dist-CXVXFdJX.js → dist-BWicEEVA.js} +233 -79
  63. package/dist/{dist-Cm556q2j.mjs → dist-OCi0K-iM.mjs} +216 -80
  64. package/dist/http/reverse-proxy.d.ts +11 -1
  65. package/dist/index.d.ts +1 -1
  66. package/dist/index.js +71 -56
  67. package/dist/index.mjs +72 -56
  68. package/dist/kernel/config-schema.d.ts +1 -0
  69. package/dist/kernel/event-plane-report.d.ts +7 -36
  70. package/dist/kernel/fs-utils.d.ts +1 -5
  71. package/dist/kernel/heap-spaces.d.ts +2 -23
  72. package/dist/kernel/index.d.ts +0 -2
  73. package/dist/kernel/moleculer/event-bus-core.d.ts +6 -28
  74. package/dist/kernel/moleculer/process-service.d.ts +2 -5
  75. package/dist/kernel/moleculer/runner-native-allocator.d.ts +1 -6
  76. package/dist/kernel/transport/index.d.ts +1 -1
  77. package/dist/kernel/transport/local-child-registry.d.ts +8 -41
  78. package/dist/kernel/transport/uds-event-bridge.d.ts +2 -2
  79. package/dist/{retired-settings-keys-D24IW4qo.js → retired-settings-keys-DLJ7MvIB.js} +1 -1
  80. package/dist/{retired-settings-keys-DzkSqnH0.mjs → retired-settings-keys-TDzxE6GA.mjs} +1 -1
  81. package/package.json +1 -1
  82. package/dist/kernel/heap-allocation-sample.d.ts +0 -107
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_chunk = require("./chunk-Cek0wNdY.js");
3
- const require_dist = require("./dist-CXVXFdJX.js");
3
+ const require_dist = require("./dist-BWicEEVA.js");
4
4
  const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
5
5
  require("./builtins/alerts/index.js");
6
6
  const require_builtins_calendars_calendars_addon = require("./builtins/calendars/calendars.addon.js");
@@ -31,7 +31,7 @@ require("./builtins/system-config/index.js");
31
31
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
32
32
  const require_event_loop_stall_monitor = require("./event-loop-stall-monitor-ey4mbofz.js");
33
33
  const require_tls$1 = require("./tls-ue_Xefmv.js");
34
- const require_child_cap_dispatch = require("./child-cap-dispatch-CvYlCq60.js");
34
+ const require_child_cap_dispatch = require("./child-cap-dispatch-CqV-7-QZ.js");
35
35
  const require_resource_monitor = require("./resource-monitor-BgWGRxN5.js");
36
36
  const require_custom_action_registry = require("./custom-action-registry-acBY3mHA.js");
37
37
  let zod = require("zod");
@@ -410,6 +410,38 @@ function canServeDataPlane(state) {
410
410
  * headers + body), so `Content-Range`, backpressure and client-disconnect are all
411
411
  * native. No bytes are buffered; nothing crosses the cap channel.
412
412
  */
413
+ /**
414
+ * The upstream's response headers, minus the CORS policy, which belongs to the
415
+ * EDGE (D707). The hub stamps its allowlist verdict on `clientRes` with
416
+ * `setHeader` before hijacking, and Node merges those into `writeHead` — so an
417
+ * upstream `access-control-*` header would OVERRIDE the hub's answer: the
418
+ * authenticated file-server's `*` reached a refused origin this way. `Vary` is
419
+ * merged rather than replaced, so the edge's `Origin` survives an upstream
420
+ * `Accept-Encoding`.
421
+ */
422
+ function edgeOwnedResponseHeaders(upRes, clientRes) {
423
+ const out = {};
424
+ for (const [name, value] of Object.entries(upRes.headers)) {
425
+ if (value === void 0) continue;
426
+ const lower = name.toLowerCase();
427
+ if (lower.startsWith("access-control-")) continue;
428
+ out[lower] = value;
429
+ }
430
+ const edgeVary = clientRes.getHeader("vary");
431
+ const upVary = out["vary"];
432
+ if (typeof edgeVary === "string" && edgeVary.length > 0 && upVary !== void 0) {
433
+ const tokens = /* @__PURE__ */ new Set();
434
+ const merged = [];
435
+ for (const part of [edgeVary, String(upVary)].join(",").split(",")) {
436
+ const token = part.trim();
437
+ if (token.length === 0 || tokens.has(token.toLowerCase())) continue;
438
+ tokens.add(token.toLowerCase());
439
+ merged.push(token);
440
+ }
441
+ out["vary"] = merged.join(", ");
442
+ }
443
+ return out;
444
+ }
413
445
  /** Reverse-proxy one request to an addon data-plane listener. Fire-and-forget:
414
446
  * the caller must `reply.hijack()` (or otherwise stop the framework from also
415
447
  * responding) before calling this, since we drive `clientRes` directly. */
@@ -430,17 +462,11 @@ function proxyToUpstream(opts) {
430
462
  path: upstreamPath,
431
463
  headers
432
464
  }, (upRes) => {
433
- clientRes.writeHead(upRes.statusCode ?? 502, {
434
- "access-control-allow-origin": "*",
435
- ...upRes.headers
436
- });
465
+ clientRes.writeHead(upRes.statusCode ?? 502, edgeOwnedResponseHeaders(upRes, clientRes));
437
466
  upRes.pipe(clientRes);
438
467
  });
439
468
  upstream.on("error", (err) => {
440
- if (!clientRes.headersSent) clientRes.writeHead(502, {
441
- "content-type": "application/json",
442
- "access-control-allow-origin": "*"
443
- });
469
+ if (!clientRes.headersSent) clientRes.writeHead(502, { "content-type": "application/json" });
444
470
  clientRes.end(JSON.stringify({
445
471
  error: "data-plane upstream error",
446
472
  detail: String(err)
@@ -3211,8 +3237,7 @@ async function copyDirRecursive(src, dest) {
3211
3237
  * `addons/` stays node_modules-free, which is what lets the backup tar the whole
3212
3238
  * folder with no exclusion list (see ADR-0027). An addon that genuinely needs an
3213
3239
  * un-bundleable runtime dep declares it explicitly in
3214
- * `camstack.runtimeDependencies`; the debug escape hatch
3215
- * `CAMSTACK_INSTALL_FULL_DEPS=1` restores the legacy install-everything path.
3240
+ * `camstack.runtimeDependencies`.
3216
3241
  *
3217
3242
  * (Historically this mirrored the build preset's COMMON_NATIVE_DEPS and
3218
3243
  * per-addon-installed node-av/sharp/onnxruntime-node/ssh2/werift/systeminformation
@@ -3243,13 +3268,9 @@ function readRuntimeDependencies(pkg) {
3243
3268
  * `dependencies` so `--omit=peer` installs can't drop them (pipeline's
3244
3269
  * patched `werift`).
3245
3270
  *
3246
- * Escape hatch: `CAMSTACK_INSTALL_FULL_DEPS=1` restores the legacy behaviour
3247
- * (strip only @camstack/*) for debugging a suspected undeclared runtime dep.
3248
- *
3249
3271
  * Returns a new object (immutable).
3250
3272
  */
3251
3273
  function stripBundledDeps(pkg) {
3252
- if (process.env.CAMSTACK_INSTALL_FULL_DEPS === "1") return stripCamstackDeps(pkg);
3253
3274
  const camstack = pkg.camstack;
3254
3275
  if (camstack !== null && typeof camstack === "object" && !Array.isArray(camstack) && camstack.system === true) return stripCamstackDeps(pkg);
3255
3276
  const keep = new Set([...RUNTIME_NATIVE_KEEP, ...readRuntimeDependencies(pkg)]);
@@ -7746,10 +7767,26 @@ function createDoorSettingsView(addonId, door, sections) {
7746
7767
  //#region src/kernel/config-schema.ts
7747
7768
  /** Default data directory — used when CAMSTACK_DATA env var is not set */
7748
7769
  var DEFAULT_DATA_PATH = "camstack-data";
7770
+ /**
7771
+ * A list of browser origins from config.yaml (a YAML list) or from the
7772
+ * `CAMSTACK_CORS_ORIGINS` env var (one comma-separated string — env carries
7773
+ * only strings). Validation of each entry is the CORS policy's job
7774
+ * (`server/backend/src/api/cors/cors-policy.ts`), which logs what it rejects;
7775
+ * the schema only fixes the SHAPE so a typo cannot stop the hub from booting.
7776
+ */
7777
+ var originListSchema = zod.z.preprocess((value) => typeof value === "string" ? value.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0) : value, zod.z.array(zod.z.string()));
7749
7778
  var serverSchema = zod.z.object({
7750
7779
  port: zod.z.number().default(4443),
7751
7780
  host: zod.z.string().default("0.0.0.0"),
7752
- dataPath: zod.z.string().default(DEFAULT_DATA_PATH)
7781
+ dataPath: zod.z.string().default(DEFAULT_DATA_PATH),
7782
+ /**
7783
+ * EXTRA browser origins allowed to call this hub cross-origin (D707), on
7784
+ * top of the built-ins: the hub's own origin, the hosted viewer PWA and the
7785
+ * native app's opaque `null` origin. Bootstrap-owned on purpose — widening
7786
+ * who may read hub responses in a browser is a security decision, and the
7787
+ * policy is live from the first request, before the settings store exists.
7788
+ */
7789
+ corsOrigins: originListSchema.default([])
7753
7790
  });
7754
7791
  var authSchema = zod.z.object({
7755
7792
  jwtSecret: zod.z.string().nullable().default(null),
@@ -10214,7 +10251,8 @@ var ENV_VAR_MAP = {
10214
10251
  CAMSTACK_DATA: "server.dataPath",
10215
10252
  CAMSTACK_JWT_SECRET: "auth.jwtSecret",
10216
10253
  CAMSTACK_ADMIN_USER: "auth.adminUsername",
10217
- CAMSTACK_ADMIN_PASS: "auth.adminPassword"
10254
+ CAMSTACK_ADMIN_PASS: "auth.adminPassword",
10255
+ CAMSTACK_CORS_ORIGINS: "server.corsOrigins"
10218
10256
  };
10219
10257
  /** config.yaml, env overrides applied, parsed. */
10220
10258
  function loadBootstrapConfig(configPath) {
@@ -94366,9 +94404,8 @@ function resolveUseHostname() {
94366
94404
  function createBroker(config) {
94367
94405
  const { nodeID, mode, hubAddress, logLevel = "warn", secret, tcpPort = DEFAULT_HUB_TCP_PORT, udpPort = DEFAULT_UDP_PORT } = config;
94368
94406
  const useHostname = resolveUseHostname();
94369
- const moleculerDebug = process.env["CAMSTACK_MOLECULER_DEBUG"] === "1" || process.env["CAMSTACK_MOLECULER_DEBUG"] === "true";
94370
- const infraLevel = moleculerDebug ? "debug" : "error";
94371
- const wildcardLevel = moleculerDebug ? "debug" : logLevel;
94407
+ const infraLevel = "error";
94408
+ const wildcardLevel = logLevel;
94372
94409
  if (mode === "test") return new ServiceBroker({
94373
94410
  nodeID,
94374
94411
  transporter: "Fake",
@@ -94398,7 +94435,7 @@ function createBroker(config) {
94398
94435
  udpDiscovery: true,
94399
94436
  udpPort,
94400
94437
  udpPeriod: 5,
94401
- debug: moleculerDebug
94438
+ debug: false
94402
94439
  }
94403
94440
  },
94404
94441
  logger: {
@@ -94418,7 +94455,7 @@ function createBroker(config) {
94418
94455
  maxPacketSize: 10 * 1024 * 1024,
94419
94456
  port: config.agentListenPort ?? deriveAgentListenPort(nodeID),
94420
94457
  useHostname,
94421
- debug: moleculerDebug
94458
+ debug: false
94422
94459
  };
94423
94460
  if (hubAddress) {
94424
94461
  tcpOptions.urls = normalizeHubUrl(hubAddress, tcpPort);
@@ -95226,26 +95263,16 @@ var CrashSupervisor = class {
95226
95263
  * restores the glibc/sharp defaults. Recoverable without a rebuild.
95227
95264
  * 2. A value the operator already put in the environment (`MALLOC_ARENA_MAX`,
95228
95265
  * `VIPS_CONCURRENCY`) — inherited verbatim, never overwritten.
95229
- * 3. `CAMSTACK_RUNNER_MALLOC_ARENA_MAX` — the CamStack override.
95230
- * 4. The defaults above.
95231
- *
95232
- * A nonsense override falls back to the default rather than being passed through:
95233
- * glibc reads `MALLOC_ARENA_MAX=0` as "unbounded", which is the very state this
95234
- * exists to leave.
95266
+ * 3. The defaults above.
95235
95267
  */
95236
95268
  function runnerNativeAllocatorEnv(parentEnv, platform = process.platform) {
95237
95269
  if (platform !== "linux") return {};
95238
95270
  if (parentEnv["CAMSTACK_RUNNER_NATIVE_ALLOCATOR"] === "off") return {};
95239
95271
  return {
95240
- MALLOC_ARENA_MAX: parentEnv["MALLOC_ARENA_MAX"] ?? String(positiveInt(parentEnv["CAMSTACK_RUNNER_MALLOC_ARENA_MAX"], 2)),
95272
+ MALLOC_ARENA_MAX: parentEnv["MALLOC_ARENA_MAX"] ?? String(2),
95241
95273
  VIPS_CONCURRENCY: parentEnv["VIPS_CONCURRENCY"] ?? String(1)
95242
95274
  };
95243
95275
  }
95244
- function positiveInt(raw, fallback) {
95245
- if (raw === void 0) return fallback;
95246
- const n = Number.parseInt(raw, 10);
95247
- return Number.isFinite(n) && n > 0 ? n : fallback;
95248
- }
95249
95276
  /**
95250
95277
  * The child's environment, with the allocator pair applied or REMOVED.
95251
95278
  *
@@ -95454,6 +95481,8 @@ function isHeavyRunner(addons) {
95454
95481
  * Reaching for a bigger number here when RSS is the complaint is the standard wrong move.
95455
95482
  */
95456
95483
  var HEAVY_MAX_OLD_MB_DEFAULT = 1024;
95484
+ /** Light runners' young-generation semi-space, in MB. */
95485
+ var LIGHT_SEMI_SPACE_MB = 2;
95457
95486
  /**
95458
95487
  * The runner's old-space ceiling in MB, or 0 for "uncapped".
95459
95488
  *
@@ -95463,7 +95492,7 @@ var HEAVY_MAX_OLD_MB_DEFAULT = 1024;
95463
95492
  * the cap for the whole runner, which is the intended escape hatch.
95464
95493
  */
95465
95494
  function runnerMaxOldSpaceMb(addons, heavy) {
95466
- const envDefault = heavy ? positiveIntEnv("CAMSTACK_RUNNER_HEAVY_MAX_OLD_MB", HEAVY_MAX_OLD_MB_DEFAULT) : positiveIntEnv("CAMSTACK_RUNNER_LIGHT_MAX_OLD_MB", 0);
95495
+ const envDefault = heavy ? HEAVY_MAX_OLD_MB_DEFAULT : 0;
95467
95496
  const declared = addons.map((a) => readAddonHeapDeclaration(a).maxOldSpaceMb).filter((mb) => mb !== void 0);
95468
95497
  if (declared.length === 0) return envDefault;
95469
95498
  if (declared.includes(0)) return 0;
@@ -95490,38 +95519,25 @@ function runnerRssBudgetMb(addons) {
95490
95519
  * (`--max-semi-space-size`) to reclaim V8's over-reservation — a measured ~15 MB/runner win — bound
95491
95520
  * V8's platform thread pool (`--v8-pool-size`, see {@link LIGHT_V8_POOL_SIZE_DEFAULT}: a measured
95492
95521
  * ~58 threads across the hub's 29 light runners, against a cgroup `pids.max` this host has already
95493
- * hit) and keep an opt-in old-space cap (`CAMSTACK_RUNNER_LIGHT_MAX_OLD_MB`, unset = uncapped). HEAVY
95522
+ * hit) and carry no old-space cap unless a manifest declares one. HEAVY
95494
95523
  * runners keep V8's default young generation but ALWAYS carry an old-space ceiling; see
95495
95524
  * {@link HEAVY_MAX_OLD_MB_DEFAULT} for why, and how a runner declares its own.
95496
95525
  *
95497
- * Kill-switch: `CAMSTACK_RUNNER_HEAP_TUNING=off` disables all flags (recover without a rebuild).
95498
- * Overrides: `CAMSTACK_RUNNER_LIGHT_SEMI_SPACE_MB` (default 2),
95499
- * `CAMSTACK_RUNNER_LIGHT_V8_POOL_SIZE` (default {@link LIGHT_V8_POOL_SIZE_DEFAULT}; below 1 omits
95500
- * the flag — `0` means "size from the CPU count" to V8, not "off"),
95501
- * `CAMSTACK_RUNNER_LIGHT_MAX_OLD_MB`
95502
- * (default unset = no old-space cap), `CAMSTACK_RUNNER_HEAVY_MAX_OLD_MB`
95503
- * (default {@link HEAVY_MAX_OLD_MB_DEFAULT}; `0` restores the old uncapped behaviour).
95526
+ * The per-addon override is the manifest's declared `maxOldSpaceMb` (`0` = uncapped); the
95527
+ * environment overrides and the `CAMSTACK_RUNNER_HEAP_TUNING=off` kill switch were removed on
95528
+ * 2026-10-06 — nothing had set them since the rollout.
95504
95529
  */
95505
95530
  function runnerHeapFlags(addons) {
95506
- if (process.env["CAMSTACK_RUNNER_HEAP_TUNING"] === "off") return [];
95507
95531
  const heavy = isHeavyRunner(addons);
95508
95532
  const flags = [];
95509
95533
  if (!heavy) {
95510
- const semiMb = positiveIntEnv("CAMSTACK_RUNNER_LIGHT_SEMI_SPACE_MB", 2);
95511
- if (semiMb > 0) flags.push(`--max-semi-space-size=${semiMb}`);
95512
- const v8Pool = positiveIntEnv("CAMSTACK_RUNNER_LIGHT_V8_POOL_SIZE", 2);
95513
- if (v8Pool > 0) flags.push(`--v8-pool-size=${v8Pool}`);
95534
+ flags.push(`--max-semi-space-size=${LIGHT_SEMI_SPACE_MB}`);
95535
+ flags.push(`--v8-pool-size=2`);
95514
95536
  }
95515
95537
  const oldMb = runnerMaxOldSpaceMb(addons, heavy);
95516
95538
  if (oldMb > 0) flags.push(`--max-old-space-size=${oldMb}`);
95517
95539
  return flags;
95518
95540
  }
95519
- function positiveIntEnv(name, fallback) {
95520
- const raw = process.env[name];
95521
- if (raw === void 0) return fallback;
95522
- const n = Number.parseInt(raw, 10);
95523
- return Number.isFinite(n) && n >= 0 ? n : fallback;
95524
- }
95525
95541
  var MAX_BACKOFF_MS = 3e4;
95526
95542
  var CRASH_WINDOW_MS = 6e4;
95527
95543
  var MAX_CRASHES_IN_WINDOW = 5;
@@ -96821,7 +96837,6 @@ exports.quarantineAddonResidue = quarantineAddonResidue;
96821
96837
  exports.readExtraSans = require_tls$1.readExtraSans;
96822
96838
  exports.readHeapSpaces = require_child_cap_dispatch.readHeapSpaces;
96823
96839
  exports.readLanHttpState = require_tls$1.readLanHttpState;
96824
- exports.readMoleculerFanoutMode = require_child_cap_dispatch.readMoleculerFanoutMode;
96825
96840
  exports.readPendingRestart = readPendingRestart;
96826
96841
  exports.readSocketQueues = require_child_cap_dispatch.readSocketQueues;
96827
96842
  exports.readTlsAccessStatus = require_tls$1.readTlsAccessStatus;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM$1, r as __exportAll, t as __commonJSMin$1 } from "./chunk-CNf5ZN-e.mjs";
2
- import { $n as ReadinessRegistry, Bt as lifecycleJobSchema, D as METHOD_ACCESS_MAP, Dt as extractNestedAddonId, Ft as isObjectInput, Gt as looseSchema, It as isVoidInput, Jn as errMsg$1, Lt as kebabToCamel, M as RUNTIME_DEFAULTS, Mt as isArrayOutputSchema, Nt as isCollectionArrayMethod, Qn as DEVICE_STATUS_METHOD, U as addonSettingsCapability, Wt as logLevelAtMost, Xn as DATAPLANE_SECRET_HEADER$1, Zn as DEVICE_SETTINGS_CONTRIBUTION_METHODS, _r as scopeKey, an as procedureAuthKey, ar as createEvent, br as EventCategory$1, cr as expandCapMethods, en as objectInputDeclaresAddonId, er as ReadinessTimeoutError, gn as scopesAllowDeviceCap, gr as resolveCapMount, hn as scopesAllowAddon, hr as readinessKey, ir as asString$1, mr as parseJsonUnknown, nr as asJsonObject$1, or as emitDownForOwnedCaps, pn as resolveMethodAuth, pr as parseJsonObject, rr as asNumber, t as ALL_CAPABILITY_DEFINITIONS, tn as objectInputDeclaresRequiredDeviceId, w as LOG_LEVEL_RANK } from "./dist-Cm556q2j.mjs";
2
+ import { $n as DATAPLANE_SECRET_HEADER$1, Cr as EventCategory$1, Ft as isCollectionArrayMethod, Ht as lifecycleJobSchema, Kt as logLevelAtMost, Lt as isObjectInput, N as RUNTIME_DEFAULTS, O as METHOD_ACCESS_MAP, Pt as isArrayOutputSchema, Rt as isVoidInput, T as LOG_LEVEL_RANK, W as addonSettingsCapability, Zn as errMsg$1, _r as parseJsonUnknown, ar as asJsonObject$1, br as scopeKey, cn as procedureAuthKey, cr as createEvent, dr as expandCapMethods, er as DEVICE_SETTINGS_CONTRIBUTION_METHODS, gn as resolveMethodAuth, gr as parseJsonObject, kt as extractNestedAddonId, lr as emitDownForOwnedCaps, nn as objectInputDeclaresAddonId, nr as ReadinessRegistry, or as asNumber, qt as looseSchema, rn as objectInputDeclaresRequiredDeviceId, rr as ReadinessTimeoutError, sr as asString$1, t as ALL_CAPABILITY_DEFINITIONS, tr as DEVICE_STATUS_METHOD, vn as scopesAllowAddon, vr as readinessKey, yn as scopesAllowDeviceCap, yr as resolveCapMount, zt as kebabToCamel } from "./dist-OCi0K-iM.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { CalendarsAddon } from "./builtins/calendars/calendars.addon.mjs";
@@ -30,7 +30,7 @@ import "./builtins/system-config/index.mjs";
30
30
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
31
31
  import { _ as ensureModel, a as createFileDataPlaneHandler, c as parseRangeHeader, d as ModelDownloadService, g as downloadModel, h as downloadFile, i as startEventLoopStallMonitor, l as parseTokenizedUrl, m as deleteModelFromDisk, n as STALL_TICK_MS, o as contentTypeFor, p as collectModelFiles, r as attributeStall, s as createAuthenticatedFileServer, t as STALL_REPORT_MS, u as resolveFilePath, v as fetchJson, x as isModelDownloaded, y as getModelFilePath } from "./event-loop-stall-monitor-EXjzIxDz.mjs";
32
32
  import { C as registerLanHttpHandler, S as readLanHttpState, _ as DEFAULT_LAN_HTTP_PORT, a as writeTlsMode, b as bindPendingLanHttp, c as loadTlsCert, d as collectCertIdentity, f as CA_VALIDITY_DAYS, g as evaluateExistingCert, h as SERVER_AUTH_OID, i as writeExtraSans, l as reissueTlsLeaf, m as MAX_LEAF_VALIDITY_DAYS, n as readTlsAccessStatus, o as validateUploadedTls, p as LEAF_RENEWAL_WINDOW_DAYS, r as readTlsMode, s as ensureTlsCert, t as readExtraSans, u as CA_COMMON_NAME, v as allFamiliesListenHost, x as closeLanHttp, y as applyLanHttp } from "./tls-DTlVWwAI.mjs";
33
- import { $ as CapRouteError, $n as CAP_ACTION_UNLABELLED, $t as RUNNER_HEAP_WATCH_INTERVAL_MS, A as resolveHwAccel, An as OUTBOUND_QUEUE_COOLDOWN_MS, At as serializeTypedArrays, B as udsChildLogToWorkerEntry, Bn as SOCKET_QUEUE_TOP_N, Bt as createAddonPeerBytesFacility, C as getBrokerEventBus, Cn as DECISIVE_HEAP_SPACES, Ct as NATIVE_PROVIDER_SERVICE_INFIX, D as subscribePassthrough, Dn as heapSpaceField, Dt as capServiceName, E as setNodeEventInterest, En as formatHeapSpaces, Et as capBareAction, F as ipcParentLink, Fn as MESH_QUEUE_TOP_N, Ft as installManifestNativeDeps, G as UDS_NO_ROUTE_PREFIX, Gn as readSocketQueues, Gt as HEAP_RECLAIM_TRIGGER_MB, H as createUdsLoggerWithControl, Hn as createSocketPlaneReader, Ht as createAddonDataPlaneFacility, I as localProviderLink, In as createMeshQueueReader, It as resolveAddonClass, J as answerClaimedGetStatus, Jn as recordSocketFrame, Jt as HUB_MAIN_HEAP_WATCH_LABEL, K as afterWorkerOnlineAnnounce, Kn as EMPTY_SOCKET_DIRECTION, Kt as HEAP_WATCH_INTERVAL_MS, L as createParentUnownedCallHandler, Ln as formatMeshQueue, Lt as buildNpmChildEnv, M as brokerTransportLink, Mn as OUTBOUND_QUEUE_THRESHOLD_BYTES, Mt as CapabilityHandle, N as buildLinkChain, Nn as createOutboundQueueGate, Nt as CapabilityUnavailableError, O as AddonDepsManager, On as readHeapSpaces, Ot as parseCapAction, P as deviceCapResolverLink, Pn as formatOutboundQueueVerdict, Pt as copyBundledNativeModules, Q as CapRouteResolver, Qn as CAP_ACTION_OVERFLOW_LABEL, Qt as RSS_BUDGET_RELEASE_RATIO, R as createUdsEventBridge, Rn as EMPTY_SOCKET_PLANE_BASELINE, Rt as resolveNpmInvocation, S as clusterEventTopic, Sn as isArrayBufferCensusReport, St as validateProviderRegistrations, T as registerEventBusService, Tn as emitHeapDiagnosticReport, Tt as capActionSuffix, U as LocalChildClient, Un as diffSocketPlane, Ut as HEAP_RECLAIM_MIN_INTERVAL_MS, V as createUdsLogger, Vn as createSocketPlaneMeter, Vt as hostNodeIdOf, W as LocalChildRegistry, Wn as formatSocketPlane, Wt as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, X as AGENT_CAP_FWD_ACTION, Xn as socketDirectionBytes, Xt as HUB_RSS_BUDGET_ENV, Y as deviceOfGetStatus, Yn as sampleSocketDirection, Yt as HUB_MAIN_RSS_BUDGET_MB, Z as AGENT_CAP_FWD_SERVICE, Zn as socketDirectionMessages, Zt as RSS_BUDGET_REANNOUNCE_MIN_MS, _ as getWorkerDeviceRegistry, _n as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, a as reapProcessGroup, an as createV8Reclaimer, ar as EVENT_PLANE_TOP_N, at as __resetCapUsageRegistryForTests, b as setHubConnected, bn as createInspectorArrayBufferCensus, c as runnerOwnsProcessGroup, cn as nextRssBudgetState, cr as diffEventPlane, ct as UdsLocalTransportClient, d as summarizeMembers, dn as shouldReclaim, dt as PeerAnsweredError, en as RUNNER_RSS_BUDGET_ENV, er as EMPTY_CAP_ACTION_READING, et as classifyCapRoute, f as installManifestSystemDeps, fn as startHeapWatch, ft as localEndpointPath, g as createUdsAddonContext, gn as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, gt as createBrokerDeviceManagerApi, h as createAddonContext, hn as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, ht as buildNativeCapProxy, in as createLoopDelayMeter, ir as diffCapActionCensus, it as PARENT_ROUTED_PROVIDER_ADDON_ID, j as brokerCallForCap, jn as OUTBOUND_QUEUE_SUSTAIN_MS, jt as DeviceRegistry, k as createKernelHwAccel, kn as selectReportedSpaces, kt as deserializeTypedArrays, l as signalAllRunnerGroups, ln as parseRssBudgetMb, lr as formatEventPlane, lt as UdsLocalTransportServer, m as adaptBrokerToCluster, mn as strandedMb, mt as encodeFrame, nn as buildHeapSample, nr as capActionLabel, nt as readMoleculerFanoutMode, o as registerRunnerGroup, on as describeRss, or as createEventPlaneMeter, ot as getCapUsageRegistry, p as installManifestPythonDeps, pn as startRunnerHeapWatch, pt as FrameDecoder, q as GET_STATUS_METHOD, qn as createSocketDirectionCounters, qt as HEAP_WATCH_WARN_RATIO, r as defaultProcessGroupOps, rn as createDeferredHeapWatchSink, rr as createCapActionCensus, rt as CapUsageRegistry, s as releaseRunnerGroup, sn as hubMainRssBudget, sr as createEventPlaneReader, st as createLocalTransport, t as CAP_METHOD_NOT_IMPLEMENTED, tn as ZERO_LOOP_DELAY, tr as MAX_CAP_ACTIONS_PER_PEER, tt as callWithServiceDiscovery, un as reclaimIntervalMs, ut as SocketChannel, v as getOrInitReadinessRegistry, vn as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, w as getMoleculerEventStats, wn as HEAP_SPACE_REPORT_MIN_MB, wt as capActionName, x as EVENT_TOPIC_PREFIX, xn as formatArrayBufferCensus, xt as createAddonService, y as getOrInitReadinessRegistryForClient, yn as createArrayBufferCensusGate, yt as mountNativeCapService, z as createUdsEventBus, zn as SOCKET_PLANE_TOP_N, zt as runNpm } from "./child-cap-dispatch-C6IpRb4P.mjs";
33
+ import { $ as CapRouteError, $n as EMPTY_CAP_ACTION_READING, $t as RUNNER_RSS_BUDGET_ENV, A as resolveHwAccel, An as OUTBOUND_QUEUE_SUSTAIN_MS, At as DeviceRegistry, B as udsChildLogToWorkerEntry, Bn as createSocketPlaneMeter, Bt as hostNodeIdOf, C as getBrokerEventBus, Cn as HEAP_SPACE_REPORT_MIN_MB, Ct as capActionName, D as subscribePassthrough, Dn as readHeapSpaces, Dt as parseCapAction, E as setNodeEventInterest, En as heapSpaceField, Et as capServiceName, F as ipcParentLink, Fn as createMeshQueueReader, Ft as resolveAddonClass, G as UDS_NO_ROUTE_PREFIX, Gn as EMPTY_SOCKET_DIRECTION, Gt as HEAP_WATCH_INTERVAL_MS, H as createUdsLoggerWithControl, Hn as diffSocketPlane, Ht as HEAP_RECLAIM_MIN_INTERVAL_MS, I as localProviderLink, In as formatMeshQueue, It as buildNpmChildEnv, J as answerClaimedGetStatus, Jn as sampleSocketDirection, Jt as HUB_MAIN_RSS_BUDGET_MB, K as afterWorkerOnlineAnnounce, Kn as createSocketDirectionCounters, Kt as HEAP_WATCH_WARN_RATIO, L as createParentUnownedCallHandler, Ln as EMPTY_SOCKET_PLANE_BASELINE, Lt as resolveNpmInvocation, M as brokerTransportLink, Mn as createOutboundQueueGate, Mt as CapabilityUnavailableError, N as buildLinkChain, Nn as formatOutboundQueueVerdict, Nt as copyBundledNativeModules, O as AddonDepsManager, On as selectReportedSpaces, Ot as deserializeTypedArrays, P as deviceCapResolverLink, Pn as MESH_QUEUE_TOP_N, Pt as installManifestNativeDeps, Q as CapRouteResolver, Qn as CAP_ACTION_UNLABELLED, Qt as RUNNER_HEAP_WATCH_INTERVAL_MS, R as createUdsEventBridge, Rn as SOCKET_PLANE_TOP_N, Rt as runNpm, S as clusterEventTopic, Sn as DECISIVE_HEAP_SPACES, St as NATIVE_PROVIDER_SERVICE_INFIX, T as registerEventBusService, Tn as formatHeapSpaces, Tt as capBareAction, U as LocalChildClient, Un as formatSocketPlane, Ut as HEAP_RECLAIM_STEADY_STATE_INTERVAL_MS, V as createUdsLogger, Vn as createSocketPlaneReader, Vt as createAddonDataPlaneFacility, W as LocalChildRegistry, Wn as readSocketQueues, Wt as HEAP_RECLAIM_TRIGGER_MB, X as AGENT_CAP_FWD_ACTION, Xn as socketDirectionMessages, Xt as RSS_BUDGET_REANNOUNCE_MIN_MS, Y as deviceOfGetStatus, Yn as socketDirectionBytes, Yt as HUB_RSS_BUDGET_ENV, Z as AGENT_CAP_FWD_SERVICE, Zn as CAP_ACTION_OVERFLOW_LABEL, Zt as RSS_BUDGET_RELEASE_RATIO, _ as getWorkerDeviceRegistry, _n as ARRAY_BUFFER_RELEASE_MIN_DROP_RATIO, a as reapProcessGroup, an as describeRss, ar as createEventPlaneMeter, at as getCapUsageRegistry, b as setHubConnected, bn as formatArrayBufferCensus, bt as createAddonService, c as runnerOwnsProcessGroup, cn as parseRssBudgetMb, cr as formatEventPlane, ct as UdsLocalTransportServer, d as summarizeMembers, dn as startHeapWatch, dt as localEndpointPath, en as ZERO_LOOP_DELAY, er as MAX_CAP_ACTIONS_PER_PEER, et as classifyCapRoute, f as installManifestSystemDeps, fn as startRunnerHeapWatch, ft as FrameDecoder, g as createUdsAddonContext, gn as ARRAY_BUFFER_CENSUS_THRESHOLD_MB, h as createAddonContext, hn as ARRAY_BUFFER_CENSUS_SUSTAIN_MS, ht as createBrokerDeviceManagerApi, in as createV8Reclaimer, ir as EVENT_PLANE_TOP_N, it as __resetCapUsageRegistryForTests, j as brokerCallForCap, jn as OUTBOUND_QUEUE_THRESHOLD_BYTES, jt as CapabilityHandle, k as createKernelHwAccel, kn as OUTBOUND_QUEUE_COOLDOWN_MS, kt as serializeTypedArrays, l as signalAllRunnerGroups, ln as reclaimIntervalMs, lt as SocketChannel, m as adaptBrokerToCluster, mn as ARRAY_BUFFER_CENSUS_COOLDOWN_MS, mt as buildNativeCapProxy, nn as createDeferredHeapWatchSink, nr as createCapActionCensus, nt as CapUsageRegistry, o as registerRunnerGroup, on as hubMainRssBudget, or as createEventPlaneReader, ot as createLocalTransport, p as installManifestPythonDeps, pn as strandedMb, pt as encodeFrame, q as GET_STATUS_METHOD, qn as recordSocketFrame, qt as HUB_MAIN_HEAP_WATCH_LABEL, r as defaultProcessGroupOps, rn as createLoopDelayMeter, rr as diffCapActionCensus, rt as PARENT_ROUTED_PROVIDER_ADDON_ID, s as releaseRunnerGroup, sn as nextRssBudgetState, sr as diffEventPlane, st as UdsLocalTransportClient, t as CAP_METHOD_NOT_IMPLEMENTED, tn as buildHeapSample, tr as capActionLabel, tt as callWithServiceDiscovery, un as shouldReclaim, ut as PeerAnsweredError, v as getOrInitReadinessRegistry, vn as createArrayBufferCensusGate, vt as mountNativeCapService, w as getMoleculerEventStats, wn as emitHeapDiagnosticReport, wt as capActionSuffix, x as EVENT_TOPIC_PREFIX, xn as isArrayBufferCensusReport, xt as validateProviderRegistrations, y as getOrInitReadinessRegistryForClient, yn as createInspectorArrayBufferCensus, z as createUdsEventBus, zn as SOCKET_QUEUE_TOP_N, zt as createAddonPeerBytesFacility } from "./child-cap-dispatch-DMx2axev.mjs";
34
34
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-B2WZ8_q9.mjs";
35
35
  import { t as CustomActionRegistry } from "./custom-action-registry-B4Cf4O_X.mjs";
36
36
  import { z } from "zod";
@@ -403,6 +403,38 @@ function canServeDataPlane(state) {
403
403
  * headers + body), so `Content-Range`, backpressure and client-disconnect are all
404
404
  * native. No bytes are buffered; nothing crosses the cap channel.
405
405
  */
406
+ /**
407
+ * The upstream's response headers, minus the CORS policy, which belongs to the
408
+ * EDGE (D707). The hub stamps its allowlist verdict on `clientRes` with
409
+ * `setHeader` before hijacking, and Node merges those into `writeHead` — so an
410
+ * upstream `access-control-*` header would OVERRIDE the hub's answer: the
411
+ * authenticated file-server's `*` reached a refused origin this way. `Vary` is
412
+ * merged rather than replaced, so the edge's `Origin` survives an upstream
413
+ * `Accept-Encoding`.
414
+ */
415
+ function edgeOwnedResponseHeaders(upRes, clientRes) {
416
+ const out = {};
417
+ for (const [name, value] of Object.entries(upRes.headers)) {
418
+ if (value === void 0) continue;
419
+ const lower = name.toLowerCase();
420
+ if (lower.startsWith("access-control-")) continue;
421
+ out[lower] = value;
422
+ }
423
+ const edgeVary = clientRes.getHeader("vary");
424
+ const upVary = out["vary"];
425
+ if (typeof edgeVary === "string" && edgeVary.length > 0 && upVary !== void 0) {
426
+ const tokens = /* @__PURE__ */ new Set();
427
+ const merged = [];
428
+ for (const part of [edgeVary, String(upVary)].join(",").split(",")) {
429
+ const token = part.trim();
430
+ if (token.length === 0 || tokens.has(token.toLowerCase())) continue;
431
+ tokens.add(token.toLowerCase());
432
+ merged.push(token);
433
+ }
434
+ out["vary"] = merged.join(", ");
435
+ }
436
+ return out;
437
+ }
406
438
  /** Reverse-proxy one request to an addon data-plane listener. Fire-and-forget:
407
439
  * the caller must `reply.hijack()` (or otherwise stop the framework from also
408
440
  * responding) before calling this, since we drive `clientRes` directly. */
@@ -423,17 +455,11 @@ function proxyToUpstream(opts) {
423
455
  path: upstreamPath,
424
456
  headers
425
457
  }, (upRes) => {
426
- clientRes.writeHead(upRes.statusCode ?? 502, {
427
- "access-control-allow-origin": "*",
428
- ...upRes.headers
429
- });
458
+ clientRes.writeHead(upRes.statusCode ?? 502, edgeOwnedResponseHeaders(upRes, clientRes));
430
459
  upRes.pipe(clientRes);
431
460
  });
432
461
  upstream.on("error", (err) => {
433
- if (!clientRes.headersSent) clientRes.writeHead(502, {
434
- "content-type": "application/json",
435
- "access-control-allow-origin": "*"
436
- });
462
+ if (!clientRes.headersSent) clientRes.writeHead(502, { "content-type": "application/json" });
437
463
  clientRes.end(JSON.stringify({
438
464
  error: "data-plane upstream error",
439
465
  detail: String(err)
@@ -3204,8 +3230,7 @@ async function copyDirRecursive(src, dest) {
3204
3230
  * `addons/` stays node_modules-free, which is what lets the backup tar the whole
3205
3231
  * folder with no exclusion list (see ADR-0027). An addon that genuinely needs an
3206
3232
  * un-bundleable runtime dep declares it explicitly in
3207
- * `camstack.runtimeDependencies`; the debug escape hatch
3208
- * `CAMSTACK_INSTALL_FULL_DEPS=1` restores the legacy install-everything path.
3233
+ * `camstack.runtimeDependencies`.
3209
3234
  *
3210
3235
  * (Historically this mirrored the build preset's COMMON_NATIVE_DEPS and
3211
3236
  * per-addon-installed node-av/sharp/onnxruntime-node/ssh2/werift/systeminformation
@@ -3236,13 +3261,9 @@ function readRuntimeDependencies(pkg) {
3236
3261
  * `dependencies` so `--omit=peer` installs can't drop them (pipeline's
3237
3262
  * patched `werift`).
3238
3263
  *
3239
- * Escape hatch: `CAMSTACK_INSTALL_FULL_DEPS=1` restores the legacy behaviour
3240
- * (strip only @camstack/*) for debugging a suspected undeclared runtime dep.
3241
- *
3242
3264
  * Returns a new object (immutable).
3243
3265
  */
3244
3266
  function stripBundledDeps(pkg) {
3245
- if (process.env.CAMSTACK_INSTALL_FULL_DEPS === "1") return stripCamstackDeps(pkg);
3246
3267
  const camstack = pkg.camstack;
3247
3268
  if (camstack !== null && typeof camstack === "object" && !Array.isArray(camstack) && camstack.system === true) return stripCamstackDeps(pkg);
3248
3269
  const keep = new Set([...RUNTIME_NATIVE_KEEP, ...readRuntimeDependencies(pkg)]);
@@ -7739,10 +7760,26 @@ function createDoorSettingsView(addonId, door, sections) {
7739
7760
  //#region src/kernel/config-schema.ts
7740
7761
  /** Default data directory — used when CAMSTACK_DATA env var is not set */
7741
7762
  var DEFAULT_DATA_PATH = "camstack-data";
7763
+ /**
7764
+ * A list of browser origins from config.yaml (a YAML list) or from the
7765
+ * `CAMSTACK_CORS_ORIGINS` env var (one comma-separated string — env carries
7766
+ * only strings). Validation of each entry is the CORS policy's job
7767
+ * (`server/backend/src/api/cors/cors-policy.ts`), which logs what it rejects;
7768
+ * the schema only fixes the SHAPE so a typo cannot stop the hub from booting.
7769
+ */
7770
+ var originListSchema = z.preprocess((value) => typeof value === "string" ? value.split(",").map((entry) => entry.trim()).filter((entry) => entry.length > 0) : value, z.array(z.string()));
7742
7771
  var serverSchema = z.object({
7743
7772
  port: z.number().default(4443),
7744
7773
  host: z.string().default("0.0.0.0"),
7745
- dataPath: z.string().default(DEFAULT_DATA_PATH)
7774
+ dataPath: z.string().default(DEFAULT_DATA_PATH),
7775
+ /**
7776
+ * EXTRA browser origins allowed to call this hub cross-origin (D707), on
7777
+ * top of the built-ins: the hub's own origin, the hosted viewer PWA and the
7778
+ * native app's opaque `null` origin. Bootstrap-owned on purpose — widening
7779
+ * who may read hub responses in a browser is a security decision, and the
7780
+ * policy is live from the first request, before the settings store exists.
7781
+ */
7782
+ corsOrigins: originListSchema.default([])
7746
7783
  });
7747
7784
  var authSchema = z.object({
7748
7785
  jwtSecret: z.string().nullable().default(null),
@@ -10207,7 +10244,8 @@ var ENV_VAR_MAP = {
10207
10244
  CAMSTACK_DATA: "server.dataPath",
10208
10245
  CAMSTACK_JWT_SECRET: "auth.jwtSecret",
10209
10246
  CAMSTACK_ADMIN_USER: "auth.adminUsername",
10210
- CAMSTACK_ADMIN_PASS: "auth.adminPassword"
10247
+ CAMSTACK_ADMIN_PASS: "auth.adminPassword",
10248
+ CAMSTACK_CORS_ORIGINS: "server.corsOrigins"
10211
10249
  };
10212
10250
  /** config.yaml, env overrides applied, parsed. */
10213
10251
  function loadBootstrapConfig(configPath) {
@@ -94359,9 +94397,8 @@ function resolveUseHostname() {
94359
94397
  function createBroker(config) {
94360
94398
  const { nodeID, mode, hubAddress, logLevel = "warn", secret, tcpPort = DEFAULT_HUB_TCP_PORT, udpPort = DEFAULT_UDP_PORT } = config;
94361
94399
  const useHostname = resolveUseHostname();
94362
- const moleculerDebug = process.env["CAMSTACK_MOLECULER_DEBUG"] === "1" || process.env["CAMSTACK_MOLECULER_DEBUG"] === "true";
94363
- const infraLevel = moleculerDebug ? "debug" : "error";
94364
- const wildcardLevel = moleculerDebug ? "debug" : logLevel;
94400
+ const infraLevel = "error";
94401
+ const wildcardLevel = logLevel;
94365
94402
  if (mode === "test") return new ServiceBroker({
94366
94403
  nodeID,
94367
94404
  transporter: "Fake",
@@ -94391,7 +94428,7 @@ function createBroker(config) {
94391
94428
  udpDiscovery: true,
94392
94429
  udpPort,
94393
94430
  udpPeriod: 5,
94394
- debug: moleculerDebug
94431
+ debug: false
94395
94432
  }
94396
94433
  },
94397
94434
  logger: {
@@ -94411,7 +94448,7 @@ function createBroker(config) {
94411
94448
  maxPacketSize: 10 * 1024 * 1024,
94412
94449
  port: config.agentListenPort ?? deriveAgentListenPort(nodeID),
94413
94450
  useHostname,
94414
- debug: moleculerDebug
94451
+ debug: false
94415
94452
  };
94416
94453
  if (hubAddress) {
94417
94454
  tcpOptions.urls = normalizeHubUrl(hubAddress, tcpPort);
@@ -95219,26 +95256,16 @@ var CrashSupervisor = class {
95219
95256
  * restores the glibc/sharp defaults. Recoverable without a rebuild.
95220
95257
  * 2. A value the operator already put in the environment (`MALLOC_ARENA_MAX`,
95221
95258
  * `VIPS_CONCURRENCY`) — inherited verbatim, never overwritten.
95222
- * 3. `CAMSTACK_RUNNER_MALLOC_ARENA_MAX` — the CamStack override.
95223
- * 4. The defaults above.
95224
- *
95225
- * A nonsense override falls back to the default rather than being passed through:
95226
- * glibc reads `MALLOC_ARENA_MAX=0` as "unbounded", which is the very state this
95227
- * exists to leave.
95259
+ * 3. The defaults above.
95228
95260
  */
95229
95261
  function runnerNativeAllocatorEnv(parentEnv, platform = process.platform) {
95230
95262
  if (platform !== "linux") return {};
95231
95263
  if (parentEnv["CAMSTACK_RUNNER_NATIVE_ALLOCATOR"] === "off") return {};
95232
95264
  return {
95233
- MALLOC_ARENA_MAX: parentEnv["MALLOC_ARENA_MAX"] ?? String(positiveInt(parentEnv["CAMSTACK_RUNNER_MALLOC_ARENA_MAX"], 2)),
95265
+ MALLOC_ARENA_MAX: parentEnv["MALLOC_ARENA_MAX"] ?? String(2),
95234
95266
  VIPS_CONCURRENCY: parentEnv["VIPS_CONCURRENCY"] ?? String(1)
95235
95267
  };
95236
95268
  }
95237
- function positiveInt(raw, fallback) {
95238
- if (raw === void 0) return fallback;
95239
- const n = Number.parseInt(raw, 10);
95240
- return Number.isFinite(n) && n > 0 ? n : fallback;
95241
- }
95242
95269
  /**
95243
95270
  * The child's environment, with the allocator pair applied or REMOVED.
95244
95271
  *
@@ -95447,6 +95474,8 @@ function isHeavyRunner(addons) {
95447
95474
  * Reaching for a bigger number here when RSS is the complaint is the standard wrong move.
95448
95475
  */
95449
95476
  var HEAVY_MAX_OLD_MB_DEFAULT = 1024;
95477
+ /** Light runners' young-generation semi-space, in MB. */
95478
+ var LIGHT_SEMI_SPACE_MB = 2;
95450
95479
  /**
95451
95480
  * The runner's old-space ceiling in MB, or 0 for "uncapped".
95452
95481
  *
@@ -95456,7 +95485,7 @@ var HEAVY_MAX_OLD_MB_DEFAULT = 1024;
95456
95485
  * the cap for the whole runner, which is the intended escape hatch.
95457
95486
  */
95458
95487
  function runnerMaxOldSpaceMb(addons, heavy) {
95459
- const envDefault = heavy ? positiveIntEnv("CAMSTACK_RUNNER_HEAVY_MAX_OLD_MB", HEAVY_MAX_OLD_MB_DEFAULT) : positiveIntEnv("CAMSTACK_RUNNER_LIGHT_MAX_OLD_MB", 0);
95488
+ const envDefault = heavy ? HEAVY_MAX_OLD_MB_DEFAULT : 0;
95460
95489
  const declared = addons.map((a) => readAddonHeapDeclaration(a).maxOldSpaceMb).filter((mb) => mb !== void 0);
95461
95490
  if (declared.length === 0) return envDefault;
95462
95491
  if (declared.includes(0)) return 0;
@@ -95483,38 +95512,25 @@ function runnerRssBudgetMb(addons) {
95483
95512
  * (`--max-semi-space-size`) to reclaim V8's over-reservation — a measured ~15 MB/runner win — bound
95484
95513
  * V8's platform thread pool (`--v8-pool-size`, see {@link LIGHT_V8_POOL_SIZE_DEFAULT}: a measured
95485
95514
  * ~58 threads across the hub's 29 light runners, against a cgroup `pids.max` this host has already
95486
- * hit) and keep an opt-in old-space cap (`CAMSTACK_RUNNER_LIGHT_MAX_OLD_MB`, unset = uncapped). HEAVY
95515
+ * hit) and carry no old-space cap unless a manifest declares one. HEAVY
95487
95516
  * runners keep V8's default young generation but ALWAYS carry an old-space ceiling; see
95488
95517
  * {@link HEAVY_MAX_OLD_MB_DEFAULT} for why, and how a runner declares its own.
95489
95518
  *
95490
- * Kill-switch: `CAMSTACK_RUNNER_HEAP_TUNING=off` disables all flags (recover without a rebuild).
95491
- * Overrides: `CAMSTACK_RUNNER_LIGHT_SEMI_SPACE_MB` (default 2),
95492
- * `CAMSTACK_RUNNER_LIGHT_V8_POOL_SIZE` (default {@link LIGHT_V8_POOL_SIZE_DEFAULT}; below 1 omits
95493
- * the flag — `0` means "size from the CPU count" to V8, not "off"),
95494
- * `CAMSTACK_RUNNER_LIGHT_MAX_OLD_MB`
95495
- * (default unset = no old-space cap), `CAMSTACK_RUNNER_HEAVY_MAX_OLD_MB`
95496
- * (default {@link HEAVY_MAX_OLD_MB_DEFAULT}; `0` restores the old uncapped behaviour).
95519
+ * The per-addon override is the manifest's declared `maxOldSpaceMb` (`0` = uncapped); the
95520
+ * environment overrides and the `CAMSTACK_RUNNER_HEAP_TUNING=off` kill switch were removed on
95521
+ * 2026-10-06 — nothing had set them since the rollout.
95497
95522
  */
95498
95523
  function runnerHeapFlags(addons) {
95499
- if (process.env["CAMSTACK_RUNNER_HEAP_TUNING"] === "off") return [];
95500
95524
  const heavy = isHeavyRunner(addons);
95501
95525
  const flags = [];
95502
95526
  if (!heavy) {
95503
- const semiMb = positiveIntEnv("CAMSTACK_RUNNER_LIGHT_SEMI_SPACE_MB", 2);
95504
- if (semiMb > 0) flags.push(`--max-semi-space-size=${semiMb}`);
95505
- const v8Pool = positiveIntEnv("CAMSTACK_RUNNER_LIGHT_V8_POOL_SIZE", 2);
95506
- if (v8Pool > 0) flags.push(`--v8-pool-size=${v8Pool}`);
95527
+ flags.push(`--max-semi-space-size=${LIGHT_SEMI_SPACE_MB}`);
95528
+ flags.push(`--v8-pool-size=2`);
95507
95529
  }
95508
95530
  const oldMb = runnerMaxOldSpaceMb(addons, heavy);
95509
95531
  if (oldMb > 0) flags.push(`--max-old-space-size=${oldMb}`);
95510
95532
  return flags;
95511
95533
  }
95512
- function positiveIntEnv(name, fallback) {
95513
- const raw = process.env[name];
95514
- if (raw === void 0) return fallback;
95515
- const n = Number.parseInt(raw, 10);
95516
- return Number.isFinite(n) && n >= 0 ? n : fallback;
95517
- }
95518
95534
  var MAX_BACKOFF_MS = 3e4;
95519
95535
  var CRASH_WINDOW_MS = 6e4;
95520
95536
  var MAX_CRASHES_IN_WINDOW = 5;
@@ -96430,4 +96446,4 @@ var LifecycleJobEngine = class {
96430
96446
  }
96431
96447
  };
96432
96448
  //#endregion
96433
- export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, 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, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, 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, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MESH_QUEUE_TOP_N, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, 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, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, ScopedLogger, ScopedTokenManager, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, afterWorkerOnlineAnnounce, allFamiliesListenHost, answerClaimedGetStatus, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hostNodeIdOf, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSettingsReadUnavailable, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, overlayGetStatus, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readMoleculerFanoutMode, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, setWrapperActive, shouldReclaim, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, storeMayAnswer, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
96449
+ export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, 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, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CAP_ACTION_OVERFLOW_LABEL, CAP_ACTION_UNLABELLED, CAP_METHOD_NOT_IMPLEMENTED, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CalendarsAddon, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ComposerAddon, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DECISIVE_HEAP_SPACES, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEFAULT_LOG_LEVEL, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EMPTY_CAP_ACTION_READING, EMPTY_SOCKET_DIRECTION, EMPTY_SOCKET_PLANE_BASELINE, EVENT_PLANE_TOP_N, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, 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, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LoggingGate, LokiDestination, LokiLoggingAddon, MAX_CAP_ACTIONS_PER_PEER, MAX_LEAF_VALIDITY_DAYS, MESH_QUEUE_TOP_N, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, OUTBOUND_QUEUE_COOLDOWN_MS, OUTBOUND_QUEUE_SUSTAIN_MS, OUTBOUND_QUEUE_THRESHOLD_BYTES, PARENT_ROUTED_PROVIDER_ADDON_ID, PYTHON_VERSION, PeerAnsweredError, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, 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, ReplEngine, RingBuffer, SERVER_AUTH_OID, SOCKET_PLANE_TOP_N, SOCKET_QUEUE_TOP_N, STALL_REPORT_MS, STALL_TICK_MS, STORE_READABLE_BOOTSTRAP_KEYS, ScopedLogger, ScopedTokenManager, SettingsReadUnavailableError, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UNCLAIMED, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, afterWorkerOnlineAnnounce, allFamiliesListenHost, answerClaimedGetStatus, applyLanHttp, attributeStall, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildNpmChildEnv, buildStorageLocationRegistry, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, canServeDataPlane, capActionLabel, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonPeerBytesFacility, createAddonService, createArrayBufferCensusGate, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCapActionCensus, createCoreCapService, createDeferredHeapWatchSink, createDoorSettingsView, createEventPlaneMeter, createEventPlaneReader, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createInspectorArrayBufferCensus, createKernelHwAccel, createLocalTransport, createLoopDelayMeter, createMeshQueueReader, createOutboundQueueGate, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createSocketDirectionCounters, createSocketPlaneMeter, createSocketPlaneReader, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, describeRss, detectWorkspacePackagesDir, deviceCapResolverLink, deviceOfGetStatus, diffCapActionCensus, diffEventPlane, diffSocketPlane, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, emitHeapDiagnosticReport, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatArrayBufferCensus, formatEventPlane, formatHeapSpaces, formatLogLine, formatMeshQueue, formatOutboundQueueVerdict, formatSocketPlane, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getLoggingGate, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, heapSpaceField, hostNodeIdOf, hubMainRssBudget, installManifestNativeDeps, installManifestPythonDeps, installManifestSystemDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcParentLink, isAddonDeploySource, isArrayBufferCensusReport, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSettingsReadUnavailable, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, overlayGetStatus, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, setHubConnected, setNodeEventInterest, setWrapperActive, shouldReclaim, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, storeMayAnswer, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -12,6 +12,7 @@ export declare const bootstrapSchema: z.ZodObject<{
12
12
  port: z.ZodDefault<z.ZodNumber>;
13
13
  host: z.ZodDefault<z.ZodString>;
14
14
  dataPath: z.ZodDefault<z.ZodString>;
15
+ corsOrigins: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodString>>>;
15
16
  }, z.core.$strip>>;
16
17
  auth: z.ZodDefault<z.ZodObject<{
17
18
  jwtSecret: z.ZodDefault<z.ZodNullable<z.ZodString>>;