@camstack/system 1.2.356 → 1.2.358

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 (76) hide show
  1. package/dist/addon-runner.js +1 -1
  2. package/dist/addon-runner.mjs +1 -1
  3. package/dist/auth/user-manager.d.ts +43 -2
  4. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  6. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  8. package/dist/builtins/alerts/alerts.addon.js +1 -1
  9. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  10. package/dist/builtins/autotrack/index.js +2 -2
  11. package/dist/builtins/autotrack/index.mjs +2 -2
  12. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  14. package/dist/builtins/calendars/calendars.addon.js +1 -1
  15. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  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 +8 -8
  19. package/dist/builtins/composer/composer.addon.mjs +8 -8
  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/core-blocks.addon.js +2 -2
  23. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  24. package/dist/builtins/device-manager/device-manager.addon.js +9 -9
  25. package/dist/builtins/device-manager/device-manager.addon.mjs +9 -9
  26. package/dist/builtins/hub-forwarder/index.js +1 -1
  27. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  28. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  29. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  30. package/dist/builtins/local-auth/admin-account-boot.d.ts +27 -0
  31. package/dist/builtins/local-auth/auth-schema.d.ts +3 -2
  32. package/dist/builtins/local-auth/local-auth.addon.js +281 -8
  33. package/dist/builtins/local-auth/local-auth.addon.mjs +291 -22
  34. package/dist/builtins/local-network/local-network.addon.d.ts +26 -0
  35. package/dist/builtins/local-network/local-network.addon.js +74 -25
  36. package/dist/builtins/local-network/local-network.addon.mjs +74 -25
  37. package/dist/builtins/loki-logging/index.js +1 -1
  38. package/dist/builtins/loki-logging/index.mjs +1 -1
  39. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  40. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  41. package/dist/builtins/platform-probe/index.js +1 -1
  42. package/dist/builtins/platform-probe/index.mjs +1 -1
  43. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  44. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  45. package/dist/builtins/snapshot/index.js +1 -1
  46. package/dist/builtins/snapshot/index.mjs +1 -1
  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.addon.js +0 -0
  50. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +0 -0
  51. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  52. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  53. package/dist/builtins/system-config/system-config.addon.js +1 -1
  54. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  55. package/dist/builtins/winston-logging/index.js +1 -1
  56. package/dist/builtins/winston-logging/index.mjs +1 -1
  57. package/dist/{child-cap-dispatch-wbIQJctP.js → child-cap-dispatch-BWk99kmA.js} +2 -2
  58. package/dist/{child-cap-dispatch-BcRHQBKW.mjs → child-cap-dispatch-C2dFiu87.mjs} +2 -2
  59. package/dist/{composition-sources-CeO0K2cl.js → composition-sources-BaHPH661.js} +1 -1
  60. package/dist/{composition-sources-BBfqepyT.mjs → composition-sources-D8Hapyav.mjs} +1 -1
  61. package/dist/{dist-B7WRgEZY.mjs → dist-D3bhbMY3.mjs} +321 -65
  62. package/dist/{dist-CFVOy8VT.js → dist-DzAHit0a.js} +332 -64
  63. package/dist/index.js +19 -143
  64. package/dist/index.mjs +6 -142
  65. package/dist/kernel/config-manager.d.ts +1 -1
  66. package/dist/kernel/config-schema.d.ts +6 -3
  67. package/dist/{retired-settings-keys-DKRjfz0U.mjs → retired-settings-keys-B6AFmtlO.mjs} +1 -1
  68. package/dist/{retired-settings-keys-CRlTzxaS.js → retired-settings-keys-CkXoPjKy.js} +1 -1
  69. package/dist/tls/boot-tls.d.ts +29 -0
  70. package/dist/tls/https-listener.d.ts +30 -0
  71. package/dist/tls/index.d.ts +4 -1
  72. package/dist/tls/tls-actions.d.ts +29 -0
  73. package/dist/tls/tls-status.d.ts +12 -1
  74. package/dist/{tls-ue_Xefmv.js → tls-CCMX7MjX.js} +319 -54
  75. package/dist/{tls-DTlVWwAI.mjs → tls-CJHogwTl.mjs} +246 -53
  76. package/package.json +3 -3
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-CFVOy8VT.js");
3
+ const require_dist = require("./dist-DzAHit0a.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");
@@ -30,8 +30,8 @@ const require_builtins_system_config_system_config_addon = require("./builtins/s
30
30
  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
- const require_tls$1 = require("./tls-ue_Xefmv.js");
34
- const require_child_cap_dispatch = require("./child-cap-dispatch-wbIQJctP.js");
33
+ const require_tls$1 = require("./tls-CCMX7MjX.js");
34
+ const require_child_cap_dispatch = require("./child-cap-dispatch-BWk99kmA.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");
@@ -7764,137 +7764,6 @@ function createDoorSettingsView(addonId, door, sections) {
7764
7764
  };
7765
7765
  }
7766
7766
  //#endregion
7767
- //#region src/kernel/config-schema.ts
7768
- /** Default data directory — used when CAMSTACK_DATA env var is not set */
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()));
7778
- var serverSchema = zod.z.object({
7779
- port: zod.z.number().default(4443),
7780
- host: zod.z.string().default("0.0.0.0"),
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([])
7790
- });
7791
- var authSchema = zod.z.object({
7792
- jwtSecret: zod.z.string().nullable().default(null),
7793
- adminUsername: zod.z.string().default("admin"),
7794
- adminPassword: zod.z.string().default("changeme")
7795
- });
7796
- var hubSchema = zod.z.object({
7797
- url: zod.z.string().default("ws://localhost:4443/agent"),
7798
- token: zod.z.string().default("")
7799
- });
7800
- var agentSchema = zod.z.object({
7801
- name: zod.z.string().default(""),
7802
- /** Port for the agent status page (minimal HTML) */
7803
- statusPort: zod.z.number().default(4444)
7804
- });
7805
- var tlsSchema = zod.z.object({
7806
- /** Enable HTTPS (default: true) */
7807
- enabled: zod.z.boolean().default(true),
7808
- /** Path to custom cert file (PEM). If not set, auto-generates self-signed. */
7809
- certPath: zod.z.string().optional(),
7810
- /** Path to custom key file (PEM). Required if certPath is set. */
7811
- keyPath: zod.z.string().optional()
7812
- });
7813
- /**
7814
- * Bootstrap-time addon configuration — read PURELY from YAML, before the
7815
- * kernel can talk to the settings-store. This breaks the chicken-and-egg
7816
- * where the settings store itself is implemented by an addon: the kernel
7817
- * needs to know WHICH addon to load first to provide the store, and that
7818
- * decision can't itself live in the store.
7819
- *
7820
- * Backward-compatible: every field is optional + defaults reproduce the
7821
- * current hard-coded behavior. Existing config.yaml files keep working.
7822
- */
7823
- var bootstrapAddonsSchema = zod.z.object({
7824
- /**
7825
- * Addon implementing the `settings-store` capability. Loaded FIRST,
7826
- * before any other addon is enabled — every other addon's enable
7827
- * state, settings, and ordering lives in the store it provides.
7828
- *
7829
- * Default: '@camstack/addon-sqlite-storage' (the workspace's
7830
- * default SQLite-backed store). Future alternatives could swap this
7831
- * for postgres/redis without touching kernel code.
7832
- */
7833
- settingsStoreAddon: zod.z.string().default("@camstack/addon-sqlite-storage"),
7834
- /**
7835
- * How the launcher provisions REQUIRED_PACKAGES into `data/addons/`
7836
- * on startup.
7837
- *
7838
- * - `'npm'` — pull from the npm registry (production default).
7839
- * - `'local'` — copy `packages/<X>/` from the workspace into
7840
- * `data/addons/<X>/`. Use for the Electron-
7841
- * packaged bundle and the e2e harness.
7842
- * - `'symlink'` — point `data/addons/<X>` at the workspace source
7843
- * dir via a directory symlink. Dev-only: a
7844
- * workspace rebuild (`npm run build -w <X>`) is
7845
- * immediately reflected at the next addon load,
7846
- * no copy step. Falls back to `'local'` on
7847
- * platforms that reject symlink creation (Windows
7848
- * without developer-mode).
7849
- *
7850
- * The `CAMSTACK_INSTALL_SOURCE` env var, when set, wins over this
7851
- * field. Leave undefined to keep the launcher's default behaviour
7852
- * (npm when no workspace, local when a bundled addons dir is
7853
- * present, …).
7854
- */
7855
- installSource: zod.z.enum([
7856
- "npm",
7857
- "local",
7858
- "symlink"
7859
- ]).optional(),
7860
- /**
7861
- * Override the kernel's hard-coded `AddonInstaller.REQUIRED_PACKAGES`.
7862
- * Passing an array here REPLACES the default list entirely — useful
7863
- * for stripped-down deployments (only the bundle of addons the
7864
- * operator actually wants) and for forcing a different storage
7865
- * backend at first boot.
7866
- *
7867
- * Leave undefined to use the kernel-shipped defaults.
7868
- */
7869
- requiredAddons: zod.z.array(zod.z.string()).optional(),
7870
- /**
7871
- * Disable list applied AFTER the settings-store reports the enabled
7872
- * set. Operator escape hatch — boot without a known-broken addon
7873
- * without having to mutate the store.
7874
- */
7875
- forceDisable: zod.z.array(zod.z.string()).default([])
7876
- });
7877
- /** Bootstrap config -- loaded from config.yaml ONLY at startup.
7878
- * All other settings live in SQL (system_settings table). */
7879
- var bootstrapSchema = zod.z.object({
7880
- /** Server mode: 'hub' (full server) or 'agent' (worker node) */
7881
- mode: zod.z.enum(["hub", "agent"]).default("hub"),
7882
- server: serverSchema.default(serverSchema.parse({})),
7883
- auth: authSchema.default(authSchema.parse({})),
7884
- /** Hub connection config — only used when mode='agent' */
7885
- hub: hubSchema.default(hubSchema.parse({})),
7886
- /** Agent-specific config — only used when mode='agent' */
7887
- agent: agentSchema.default(agentSchema.parse({})),
7888
- /** TLS configuration */
7889
- tls: tlsSchema.default(tlsSchema.parse({})),
7890
- /**
7891
- * Addon bootstrap directives — minimum addon set needed before the
7892
- * kernel can reach the settings-store. See bootstrapAddonsSchema.
7893
- * Spec: docs/superpowers/specs/2026-05-15-yaml-bootstrap-expansion.md
7894
- */
7895
- bootstrap: bootstrapAddonsSchema.default(bootstrapAddonsSchema.parse({}))
7896
- });
7897
- //#endregion
7898
7767
  //#region ../../node_modules/js-yaml/dist/js-yaml.mjs
7899
7768
  /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
7900
7769
  var __create = Object.create;
@@ -10257,9 +10126,7 @@ var ENV_VAR_MAP = {
10257
10126
  /** config.yaml, env overrides applied, parsed. */
10258
10127
  function loadBootstrapConfig(configPath) {
10259
10128
  const merged = applyEnvOverrides((0, _camstack_types_addon.asJsonObject)(loadYaml(configPath)) ?? {});
10260
- const config = bootstrapSchema.parse(merged);
10261
- warnDefaultCredentials(config);
10262
- return config;
10129
+ return require_builtins_local_auth_local_auth_addon.bootstrapSchema.parse(merged);
10263
10130
  }
10264
10131
  function writeBootstrapSection(configPath, section, data) {
10265
10132
  if (!BOOTSTRAP_SECTIONS.has(section)) throw new Error(`[ConfigManager] Section "${section}" is a runtime setting — use setSection() to persist via the settings-store, not update() which writes to config.yaml`);
@@ -10270,7 +10137,7 @@ function writeBootstrapSection(configPath, section, data) {
10270
10137
  ...existing,
10271
10138
  ...data
10272
10139
  };
10273
- const validation = bootstrapSchema.safeParse(raw);
10140
+ const validation = require_builtins_local_auth_local_auth_addon.bootstrapSchema.safeParse(raw);
10274
10141
  if (!validation.success) throw new Error(`[ConfigManager] Invalid config update for section "${section}": ${validation.error.message}`);
10275
10142
  const tmpPath = `${configPath}.tmp`;
10276
10143
  node_fs.writeFileSync(tmpPath, dump(raw, {
@@ -10357,9 +10224,6 @@ function loadYaml(configPath) {
10357
10224
  console.log(`[ConfigManager] Loaded config from: ${configPath}`);
10358
10225
  return parsed;
10359
10226
  }
10360
- function warnDefaultCredentials(config) {
10361
- if (config.auth.adminPassword === "changeme") console.warn("[ConfigManager] Warning: Using default admin password \"changeme\". Set auth.adminPassword in your config.yaml or the CAMSTACK_ADMIN_PASS env var.");
10362
- }
10363
10227
  //#endregion
10364
10228
  //#region src/kernel/store-settings-view.ts
10365
10229
  function createStoreSettingsView(addonId, cm) {
@@ -96495,7 +96359,7 @@ exports.ConsoleLoggingAddon = require_builtins_console_logging_index.ConsoleLogg
96495
96359
  exports.CoreBlocksAddon = require_builtins_core_blocks_core_blocks_addon.CoreBlocksAddon;
96496
96360
  exports.CustomActionRegistry = require_custom_action_registry.CustomActionRegistry;
96497
96361
  exports.DECISIVE_HEAP_SPACES = require_child_cap_dispatch.DECISIVE_HEAP_SPACES;
96498
- exports.DEFAULT_DATA_PATH = DEFAULT_DATA_PATH;
96362
+ exports.DEFAULT_DATA_PATH = require_builtins_local_auth_local_auth_addon.DEFAULT_DATA_PATH;
96499
96363
  exports.DEFAULT_LAN_HTTP_PORT = require_tls$1.DEFAULT_LAN_HTTP_PORT;
96500
96364
  exports.DEFAULT_LOG_LEVEL = DEFAULT_LOG_LEVEL;
96501
96365
  exports.DEVICE_SETTINGS_CONTRIBUTION_METHODS = require_dist.DEVICE_SETTINGS_CONTRIBUTION_METHODS;
@@ -96609,6 +96473,7 @@ exports.TRADITIONAL_NATIVE_PACKAGES = TRADITIONAL_NATIVE_PACKAGES;
96609
96473
  exports.ToastService = ToastService;
96610
96474
  exports.UDS_NO_ROUTE_PREFIX = require_child_cap_dispatch.UDS_NO_ROUTE_PREFIX;
96611
96475
  exports.UNCLAIMED = UNCLAIMED;
96476
+ exports.UPLOADED_CA_FILE = require_tls$1.UPLOADED_CA_FILE;
96612
96477
  exports.UdsLocalTransportClient = require_child_cap_dispatch.UdsLocalTransportClient;
96613
96478
  exports.UdsLocalTransportServer = require_child_cap_dispatch.UdsLocalTransportServer;
96614
96479
  exports.UserManager = require_builtins_local_auth_local_auth_addon.UserManager;
@@ -96622,10 +96487,11 @@ exports.addonSettingsCapability = require_dist.addonSettingsCapability;
96622
96487
  exports.afterWorkerOnlineAnnounce = require_child_cap_dispatch.afterWorkerOnlineAnnounce;
96623
96488
  exports.allFamiliesListenHost = require_tls$1.allFamiliesListenHost;
96624
96489
  exports.answerClaimedGetStatus = require_child_cap_dispatch.answerClaimedGetStatus;
96490
+ exports.applyCertificateToListener = require_tls$1.applyCertificateToListener;
96625
96491
  exports.applyLanHttp = require_tls$1.applyLanHttp;
96626
96492
  exports.attributeStall = require_event_loop_stall_monitor.attributeStall;
96627
96493
  exports.bindPendingLanHttp = require_tls$1.bindPendingLanHttp;
96628
- exports.bootstrapSchema = bootstrapSchema;
96494
+ exports.bootstrapSchema = require_builtins_local_auth_local_auth_addon.bootstrapSchema;
96629
96495
  exports.brokerCallForCap = require_child_cap_dispatch.brokerCallForCap;
96630
96496
  exports.brokerTransportLink = require_child_cap_dispatch.brokerTransportLink;
96631
96497
  Object.defineProperty(exports, "buildBinaryPath", {
@@ -96652,6 +96518,7 @@ exports.capBareAction = require_child_cap_dispatch.capBareAction;
96652
96518
  exports.capServiceName = require_child_cap_dispatch.capServiceName;
96653
96519
  exports.classifyAddonDir = classifyAddonDir;
96654
96520
  exports.classifyCapRoute = require_child_cap_dispatch.classifyCapRoute;
96521
+ exports.clearHttpsListener = require_tls$1.clearHttpsListener;
96655
96522
  exports.clearPendingRestart = clearPendingRestart;
96656
96523
  exports.closeLanHttp = require_tls$1.closeLanHttp;
96657
96524
  exports.clusterEventTopic = require_child_cap_dispatch.clusterEventTopic;
@@ -96821,6 +96688,7 @@ exports.isModelDownloaded = require_event_loop_stall_monitor.isModelDownloaded;
96821
96688
  exports.isSettingsReadUnavailable = require_builtins_local_auth_local_auth_addon.isSettingsReadUnavailable;
96822
96689
  exports.isSourceNewer = isSourceNewer;
96823
96690
  exports.isolatedBuiltinPhase = isolatedBuiltinPhase;
96691
+ exports.leafFingerprintOf = require_tls$1.leafFingerprintOf;
96824
96692
  exports.loadTlsCert = require_tls$1.loadTlsCert;
96825
96693
  exports.localEndpointPath = require_child_cap_dispatch.localEndpointPath;
96826
96694
  exports.localProviderLink = require_child_cap_dispatch.localProviderLink;
@@ -96832,6 +96700,7 @@ exports.parseRangeHeader = require_event_loop_stall_monitor.parseRangeHeader;
96832
96700
  exports.parseRssBudgetMb = require_child_cap_dispatch.parseRssBudgetMb;
96833
96701
  exports.parseTokenizedUrl = require_event_loop_stall_monitor.parseTokenizedUrl;
96834
96702
  exports.partitionIsolatedBuiltinIds = partitionIsolatedBuiltinIds;
96703
+ exports.prepareBootTls = require_tls$1.prepareBootTls;
96835
96704
  exports.proxyToUpstream = proxyToUpstream;
96836
96705
  exports.quarantineAddonResidue = quarantineAddonResidue;
96837
96706
  exports.readExtraSans = require_tls$1.readExtraSans;
@@ -96844,12 +96713,16 @@ exports.readTlsMode = require_tls$1.readTlsMode;
96844
96713
  exports.readinessKey = require_dist.readinessKey;
96845
96714
  exports.reclaimIntervalMs = require_child_cap_dispatch.reclaimIntervalMs;
96846
96715
  exports.recordSocketFrame = require_child_cap_dispatch.recordSocketFrame;
96716
+ exports.regenerateCertificate = require_tls$1.regenerateCertificate;
96847
96717
  exports.registerEventBusService = require_child_cap_dispatch.registerEventBusService;
96718
+ exports.registerHttpsListener = require_tls$1.registerHttpsListener;
96848
96719
  exports.registerLanHttpHandler = require_tls$1.registerLanHttpHandler;
96849
96720
  exports.reissueTlsLeaf = require_tls$1.reissueTlsLeaf;
96721
+ exports.reloadHttpsListener = require_tls$1.reloadHttpsListener;
96850
96722
  exports.resolveFilePath = require_event_loop_stall_monitor.resolveFilePath;
96851
96723
  exports.resolveHwAccel = require_child_cap_dispatch.resolveHwAccel;
96852
96724
  exports.resolveNpmInvocation = require_child_cap_dispatch.resolveNpmInvocation;
96725
+ exports.revertToGeneratedCertificate = require_tls$1.revertToGeneratedCertificate;
96853
96726
  exports.runHubAddonBoot = runHubAddonBoot;
96854
96727
  exports.runNpm = require_child_cap_dispatch.runNpm;
96855
96728
  exports.sampleSocketDirection = require_child_cap_dispatch.sampleSocketDirection;
@@ -96860,6 +96733,7 @@ exports.scopesAllowDeviceCap = require_dist.scopesAllowDeviceCap;
96860
96733
  exports.selectAddonResidue = selectAddonResidue;
96861
96734
  exports.selectReportedSpaces = require_child_cap_dispatch.selectReportedSpaces;
96862
96735
  exports.serializeTypedArrays = require_child_cap_dispatch.serializeTypedArrays;
96736
+ exports.servedHttpsLeafFingerprint = require_tls$1.servedHttpsLeafFingerprint;
96863
96737
  exports.setHubConnected = require_child_cap_dispatch.setHubConnected;
96864
96738
  exports.setNodeEventInterest = require_child_cap_dispatch.setNodeEventInterest;
96865
96739
  exports.setWrapperActive = require_builtins_device_manager_device_manager_addon.setWrapperActive;
@@ -96867,10 +96741,12 @@ exports.shouldReclaim = require_child_cap_dispatch.shouldReclaim;
96867
96741
  exports.signalAllRunnerGroups = require_child_cap_dispatch.signalAllRunnerGroups;
96868
96742
  exports.socketDirectionBytes = require_child_cap_dispatch.socketDirectionBytes;
96869
96743
  exports.socketDirectionMessages = require_child_cap_dispatch.socketDirectionMessages;
96744
+ exports.splitPemCertificates = require_tls$1.splitPemCertificates;
96870
96745
  exports.startEventLoopStallMonitor = require_event_loop_stall_monitor.startEventLoopStallMonitor;
96871
96746
  exports.startHeapWatch = require_child_cap_dispatch.startHeapWatch;
96872
96747
  exports.startRunnerHeapWatch = require_child_cap_dispatch.startRunnerHeapWatch;
96873
96748
  exports.storeMayAnswer = storeMayAnswer;
96749
+ exports.storeUploadedCertificate = require_tls$1.storeUploadedCertificate;
96874
96750
  exports.strandedMb = require_child_cap_dispatch.strandedMb;
96875
96751
  exports.stripCamstackDeps = stripCamstackDeps;
96876
96752
  exports.subscribePassthrough = require_child_cap_dispatch.subscribePassthrough;
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 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-B7WRgEZY.mjs";
2
+ import { $n as errMsg$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, Sr as scopeKey, T as LOG_LEVEL_RANK, Tr as EventCategory$1, W as addonSettingsCapability, _n as resolveMethodAuth, ar as ReadinessTimeoutError, bn as scopesAllowDeviceCap, br as readinessKey, cn as procedureAuthKey, cr as asNumber, dr as emitDownForOwnedCaps, ir as ReadinessRegistry, kt as extractNestedAddonId, lr as asString$1, nn as objectInputDeclaresAddonId, nr as DEVICE_SETTINGS_CONTRIBUTION_METHODS, pr as expandCapMethods, qt as looseSchema, rn as objectInputDeclaresRequiredDeviceId, rr as DEVICE_STATUS_METHOD, sr as asJsonObject$1, t as ALL_CAPABILITY_DEFINITIONS, tr as DATAPLANE_SECRET_HEADER$1, ur as createEvent, vr as parseJsonObject, xr as resolveCapMount, yn as scopesAllowAddon, yr as parseJsonUnknown, zt as kebabToCamel } from "./dist-D3bhbMY3.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";
@@ -15,7 +15,7 @@ import "./builtins/device-manager/index.mjs";
15
15
  import { HubForwarderAddon, HubForwarderDestination } from "./builtins/hub-forwarder/index.mjs";
16
16
  import { LivenessMonitorAddon } from "./builtins/liveness-monitor/liveness-monitor.addon.mjs";
17
17
  import "./builtins/liveness-monitor/index.mjs";
18
- import { LocalAuthAddon, a as isSettingsReadUnavailable, c as ApiKeyManager, i as SettingsReadUnavailableError, n as ScopedTokenManager, o as require_ms, r as AuthManager, s as require_safe_buffer, t as UserManager } from "./builtins/local-auth/local-auth.addon.mjs";
18
+ import { LocalAuthAddon, a as AuthManager, c as require_ms, i as ScopedTokenManager, l as require_safe_buffer, n as bootstrapSchema, o as SettingsReadUnavailableError, r as UserManager, s as isSettingsReadUnavailable, t as DEFAULT_DATA_PATH, u as ApiKeyManager } from "./builtins/local-auth/local-auth.addon.mjs";
19
19
  import "./builtins/local-auth/index.mjs";
20
20
  import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index.mjs";
21
21
  import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/native-metrics/native-metrics.addon.mjs";
@@ -29,8 +29,8 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
29
29
  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
- 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 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-BcRHQBKW.mjs";
32
+ import { A as allFamiliesListenHost, C as collectCertIdentity, D as SERVER_AUTH_OID, E as MAX_LEAF_VALIDITY_DAYS, F as registerLanHttpHandler, M as bindPendingLanHttp, N as closeLanHttp, O as evaluateExistingCert, P as readLanHttpState, S as CA_COMMON_NAME, T as LEAF_RENEWAL_WINDOW_DAYS, _ as writeExtraSans, a as validateUploadedTls, b as loadTlsCert, c as registerHttpsListener, d as prepareBootTls, f as UPLOADED_CA_FILE, g as splitPemCertificates, h as readTlsMode, i as storeUploadedCertificate, j as applyLanHttp, k as DEFAULT_LAN_HTTP_PORT, l as reloadHttpsListener, m as readTlsAccessStatus, n as regenerateCertificate, o as clearHttpsListener, p as readExtraSans, r as revertToGeneratedCertificate, s as leafFingerprintOf, t as applyCertificateToListener, u as servedHttpsLeafFingerprint, v as writeTlsMode, w as CA_VALIDITY_DAYS, x as reissueTlsLeaf, y as ensureTlsCert } from "./tls-CJHogwTl.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-C2dFiu87.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";
@@ -7757,137 +7757,6 @@ function createDoorSettingsView(addonId, door, sections) {
7757
7757
  };
7758
7758
  }
7759
7759
  //#endregion
7760
- //#region src/kernel/config-schema.ts
7761
- /** Default data directory — used when CAMSTACK_DATA env var is not set */
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()));
7771
- var serverSchema = z.object({
7772
- port: z.number().default(4443),
7773
- host: z.string().default("0.0.0.0"),
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([])
7783
- });
7784
- var authSchema = z.object({
7785
- jwtSecret: z.string().nullable().default(null),
7786
- adminUsername: z.string().default("admin"),
7787
- adminPassword: z.string().default("changeme")
7788
- });
7789
- var hubSchema = z.object({
7790
- url: z.string().default("ws://localhost:4443/agent"),
7791
- token: z.string().default("")
7792
- });
7793
- var agentSchema = z.object({
7794
- name: z.string().default(""),
7795
- /** Port for the agent status page (minimal HTML) */
7796
- statusPort: z.number().default(4444)
7797
- });
7798
- var tlsSchema = z.object({
7799
- /** Enable HTTPS (default: true) */
7800
- enabled: z.boolean().default(true),
7801
- /** Path to custom cert file (PEM). If not set, auto-generates self-signed. */
7802
- certPath: z.string().optional(),
7803
- /** Path to custom key file (PEM). Required if certPath is set. */
7804
- keyPath: z.string().optional()
7805
- });
7806
- /**
7807
- * Bootstrap-time addon configuration — read PURELY from YAML, before the
7808
- * kernel can talk to the settings-store. This breaks the chicken-and-egg
7809
- * where the settings store itself is implemented by an addon: the kernel
7810
- * needs to know WHICH addon to load first to provide the store, and that
7811
- * decision can't itself live in the store.
7812
- *
7813
- * Backward-compatible: every field is optional + defaults reproduce the
7814
- * current hard-coded behavior. Existing config.yaml files keep working.
7815
- */
7816
- var bootstrapAddonsSchema = z.object({
7817
- /**
7818
- * Addon implementing the `settings-store` capability. Loaded FIRST,
7819
- * before any other addon is enabled — every other addon's enable
7820
- * state, settings, and ordering lives in the store it provides.
7821
- *
7822
- * Default: '@camstack/addon-sqlite-storage' (the workspace's
7823
- * default SQLite-backed store). Future alternatives could swap this
7824
- * for postgres/redis without touching kernel code.
7825
- */
7826
- settingsStoreAddon: z.string().default("@camstack/addon-sqlite-storage"),
7827
- /**
7828
- * How the launcher provisions REQUIRED_PACKAGES into `data/addons/`
7829
- * on startup.
7830
- *
7831
- * - `'npm'` — pull from the npm registry (production default).
7832
- * - `'local'` — copy `packages/<X>/` from the workspace into
7833
- * `data/addons/<X>/`. Use for the Electron-
7834
- * packaged bundle and the e2e harness.
7835
- * - `'symlink'` — point `data/addons/<X>` at the workspace source
7836
- * dir via a directory symlink. Dev-only: a
7837
- * workspace rebuild (`npm run build -w <X>`) is
7838
- * immediately reflected at the next addon load,
7839
- * no copy step. Falls back to `'local'` on
7840
- * platforms that reject symlink creation (Windows
7841
- * without developer-mode).
7842
- *
7843
- * The `CAMSTACK_INSTALL_SOURCE` env var, when set, wins over this
7844
- * field. Leave undefined to keep the launcher's default behaviour
7845
- * (npm when no workspace, local when a bundled addons dir is
7846
- * present, …).
7847
- */
7848
- installSource: z.enum([
7849
- "npm",
7850
- "local",
7851
- "symlink"
7852
- ]).optional(),
7853
- /**
7854
- * Override the kernel's hard-coded `AddonInstaller.REQUIRED_PACKAGES`.
7855
- * Passing an array here REPLACES the default list entirely — useful
7856
- * for stripped-down deployments (only the bundle of addons the
7857
- * operator actually wants) and for forcing a different storage
7858
- * backend at first boot.
7859
- *
7860
- * Leave undefined to use the kernel-shipped defaults.
7861
- */
7862
- requiredAddons: z.array(z.string()).optional(),
7863
- /**
7864
- * Disable list applied AFTER the settings-store reports the enabled
7865
- * set. Operator escape hatch — boot without a known-broken addon
7866
- * without having to mutate the store.
7867
- */
7868
- forceDisable: z.array(z.string()).default([])
7869
- });
7870
- /** Bootstrap config -- loaded from config.yaml ONLY at startup.
7871
- * All other settings live in SQL (system_settings table). */
7872
- var bootstrapSchema = z.object({
7873
- /** Server mode: 'hub' (full server) or 'agent' (worker node) */
7874
- mode: z.enum(["hub", "agent"]).default("hub"),
7875
- server: serverSchema.default(serverSchema.parse({})),
7876
- auth: authSchema.default(authSchema.parse({})),
7877
- /** Hub connection config — only used when mode='agent' */
7878
- hub: hubSchema.default(hubSchema.parse({})),
7879
- /** Agent-specific config — only used when mode='agent' */
7880
- agent: agentSchema.default(agentSchema.parse({})),
7881
- /** TLS configuration */
7882
- tls: tlsSchema.default(tlsSchema.parse({})),
7883
- /**
7884
- * Addon bootstrap directives — minimum addon set needed before the
7885
- * kernel can reach the settings-store. See bootstrapAddonsSchema.
7886
- * Spec: docs/superpowers/specs/2026-05-15-yaml-bootstrap-expansion.md
7887
- */
7888
- bootstrap: bootstrapAddonsSchema.default(bootstrapAddonsSchema.parse({}))
7889
- });
7890
- //#endregion
7891
7760
  //#region ../../node_modules/js-yaml/dist/js-yaml.mjs
7892
7761
  /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
7893
7762
  var __create = Object.create;
@@ -10250,9 +10119,7 @@ var ENV_VAR_MAP = {
10250
10119
  /** config.yaml, env overrides applied, parsed. */
10251
10120
  function loadBootstrapConfig(configPath) {
10252
10121
  const merged = applyEnvOverrides(asJsonObject(loadYaml(configPath)) ?? {});
10253
- const config = bootstrapSchema.parse(merged);
10254
- warnDefaultCredentials(config);
10255
- return config;
10122
+ return bootstrapSchema.parse(merged);
10256
10123
  }
10257
10124
  function writeBootstrapSection(configPath, section, data) {
10258
10125
  if (!BOOTSTRAP_SECTIONS.has(section)) throw new Error(`[ConfigManager] Section "${section}" is a runtime setting — use setSection() to persist via the settings-store, not update() which writes to config.yaml`);
@@ -10350,9 +10217,6 @@ function loadYaml(configPath) {
10350
10217
  console.log(`[ConfigManager] Loaded config from: ${configPath}`);
10351
10218
  return parsed;
10352
10219
  }
10353
- function warnDefaultCredentials(config) {
10354
- if (config.auth.adminPassword === "changeme") console.warn("[ConfigManager] Warning: Using default admin password \"changeme\". Set auth.adminPassword in your config.yaml or the CAMSTACK_ADMIN_PASS env var.");
10355
- }
10356
10220
  //#endregion
10357
10221
  //#region src/kernel/store-settings-view.ts
10358
10222
  function createStoreSettingsView(addonId, cm) {
@@ -96446,4 +96310,4 @@ var LifecycleJobEngine = class {
96446
96310
  }
96447
96311
  };
96448
96312
  //#endregion
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 };
96313
+ 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, UPLOADED_CA_FILE, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, ZERO_LOOP_DELAY, __resetCapUsageRegistryForTests, __resetLoggingGateForTests, adaptBrokerToCluster, addonSettingsCapability, afterWorkerOnlineAnnounce, allFamiliesListenHost, answerClaimedGetStatus, applyCertificateToListener, 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, clearHttpsListener, 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, leafFingerprintOf, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, nextRssBudgetState, overlayGetStatus, parseCapAction, parseRangeHeader, parseRssBudgetMb, parseTokenizedUrl, partitionIsolatedBuiltinIds, prepareBootTls, proxyToUpstream, quarantineAddonResidue, readExtraSans, readHeapSpaces, readLanHttpState, readPendingRestart, readSocketQueues, readTlsAccessStatus, readTlsMode, readinessKey, reclaimIntervalMs, recordSocketFrame, regenerateCertificate, registerEventBusService, registerHttpsListener, registerLanHttpHandler, reissueTlsLeaf, reloadHttpsListener, resolveFilePath, resolveHwAccel, resolveNpmInvocation, revertToGeneratedCertificate, runHubAddonBoot, runNpm, sampleSocketDirection, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, selectReportedSpaces, serializeTypedArrays, servedHttpsLeafFingerprint, setHubConnected, setNodeEventInterest, setWrapperActive, shouldReclaim, signalAllRunnerGroups, socketDirectionBytes, socketDirectionMessages, splitPemCertificates, startEventLoopStallMonitor, startHeapWatch, startRunnerHeapWatch, storeMayAnswer, storeUploadedCertificate, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -1,5 +1,5 @@
1
- import { AppConfig } from './config-schema.js';
2
1
  import { FeatureManifest, ISettingsStoreProvider } from '@camstack/types';
2
+ import { AppConfig } from './config-schema.js';
3
3
  import { ISettingsStore, KernelAddonSettingsView } from './settings-view-types.js';
4
4
  import { SystemSettingsPreload } from './system-settings-mirror.js';
5
5
  export type { AddonSettingsView, ISettingsStore, KernelAddonSettingsView, SettingsViewBackend, } from './settings-view-types.js';
@@ -1,6 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  /** Default data directory — used when CAMSTACK_DATA env var is not set */
3
3
  export declare const DEFAULT_DATA_PATH = "camstack-data";
4
+ /**
5
+ * The admin password seeded on first boot when none is configured. A SEED
6
+ * only: it never overwrites an existing account's password (`ensureAdminExists`).
7
+ */
8
+ export declare const DEFAULT_ADMIN_PASSWORD = "changeme";
4
9
  /** Bootstrap config -- loaded from config.yaml ONLY at startup.
5
10
  * All other settings live in SQL (system_settings table). */
6
11
  export declare const bootstrapSchema: z.ZodObject<{
@@ -29,14 +34,12 @@ export declare const bootstrapSchema: z.ZodObject<{
29
34
  }, z.core.$strip>>;
30
35
  tls: z.ZodDefault<z.ZodObject<{
31
36
  enabled: z.ZodDefault<z.ZodBoolean>;
32
- certPath: z.ZodOptional<z.ZodString>;
33
- keyPath: z.ZodOptional<z.ZodString>;
34
37
  }, z.core.$strip>>;
35
38
  bootstrap: z.ZodDefault<z.ZodObject<{
36
39
  settingsStoreAddon: z.ZodDefault<z.ZodString>;
37
40
  installSource: z.ZodOptional<z.ZodEnum<{
38
- local: "local";
39
41
  npm: "npm";
42
+ local: "local";
40
43
  symlink: "symlink";
41
44
  }>>;
42
45
  requiredAddons: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -1,4 +1,4 @@
1
- import { ar as asJsonObject } from "./dist-B7WRgEZY.mjs";
1
+ import { sr as asJsonObject } from "./dist-D3bhbMY3.mjs";
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-CFVOy8VT.js");
1
+ const require_dist = require("./dist-DzAHit0a.js");
2
2
  //#region src/builtins/sqlite-storage/retired-settings-keys.ts
3
3
  /**
4
4
  * Is THIS node the one whose settings store is the cluster's authority?
@@ -0,0 +1,29 @@
1
+ import { CertOptions, EnsureTlsResult, TlsCertPair } from './cert-manager.js';
2
+ /** The certificate source a booting listener serves. */
3
+ export type BootTlsMode = 'generated' | 'uploaded';
4
+ export interface BootTls {
5
+ readonly mode: BootTlsMode;
6
+ readonly pair: TlsCertPair;
7
+ /**
8
+ * The `ensureTlsCert` outcome — present only for a generated certificate,
9
+ * so a reissue reaches the operator as an alert. `undefined` when an
10
+ * uploaded certificate is served: the hub never evaluates, let alone
11
+ * reissues, a certificate the operator supplied.
12
+ */
13
+ readonly ensured: EnsureTlsResult | undefined;
14
+ /**
15
+ * True when the mode marker said `uploaded` but the files were gone, so
16
+ * the node fell back to its generated certificate. The caller logs it:
17
+ * a certificate source that changed under the operator is never silent.
18
+ */
19
+ readonly uploadedMissing: boolean;
20
+ }
21
+ /**
22
+ * Decide what the listener serves at boot. The admin UI (Network → Local
23
+ * access) is the only way to set a certificate (D726): it either leaves the
24
+ * hub on its generated local-CA leaf (D227) or uploads one, recorded by the
25
+ * `tls/mode` marker. An uploaded certificate is served verbatim — running it
26
+ * through `ensureTlsCert` would replace it on the first restart, because a
27
+ * leaf the local root did not issue is one of that rule's reissue triggers.
28
+ */
29
+ export declare function prepareBootTls(dataDir: string, options?: CertOptions): Promise<BootTls>;
@@ -0,0 +1,30 @@
1
+ import { Server as TlsServer } from 'node:tls';
2
+ import { TlsCertPair } from './cert-manager.js';
3
+ export type HttpsReloadOutcome = {
4
+ readonly kind: 'reloaded';
5
+ readonly servedLeafFingerprint: string;
6
+ } | {
7
+ readonly kind: 'no-listener';
8
+ } | {
9
+ readonly kind: 'failed';
10
+ readonly error: string;
11
+ };
12
+ /** SHA-256 fingerprint of the first certificate (the leaf) in a PEM chain. */
13
+ export declare function leafFingerprintOf(chain: Buffer | string): string;
14
+ /**
15
+ * Called once by the server after its HTTPS listener is up, with the pair it
16
+ * was started on. From here on a certificate action swaps the served
17
+ * certificate in place (`setSecureContext`) — new handshakes get the new
18
+ * leaf, open connections keep theirs, nothing restarts.
19
+ */
20
+ export declare function registerHttpsListener(server: TlsServer, pair: TlsCertPair): void;
21
+ /** Forget the listener — on shutdown, and between specs. */
22
+ export declare function clearHttpsListener(): void;
23
+ /**
24
+ * The leaf the HTTPS listener serves now, or `null` when this process has no
25
+ * registered listener (TLS off, or a process that does not own one) — in
26
+ * which case nobody can say, and `null` is the honest answer.
27
+ */
28
+ export declare function servedHttpsLeafFingerprint(): string | null;
29
+ /** Serve `pair` from now on. Never throws: the outcome says what happened. */
30
+ export declare function reloadHttpsListener(pair: TlsCertPair): HttpsReloadOutcome;