@camstack/system 1.2.118 → 1.2.120

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 (60) 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/backup-orchestrator/backup-orchestrator.addon.js +1 -1
  10. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
  11. package/dist/builtins/console-logging/index.js +1 -1
  12. package/dist/builtins/console-logging/index.mjs +1 -1
  13. package/dist/builtins/core-blocks/core-blocks.addon.js +1 -1
  14. package/dist/builtins/core-blocks/core-blocks.addon.mjs +1 -1
  15. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  16. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  17. package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
  18. package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
  19. package/dist/builtins/hub-forwarder/index.js +1 -1
  20. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  21. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  22. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  23. package/dist/builtins/local-auth/local-auth.addon.js +1 -1
  24. package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
  25. package/dist/builtins/local-network/local-network.addon.js +1 -1
  26. package/dist/builtins/local-network/local-network.addon.mjs +1 -1
  27. package/dist/builtins/loki-logging/index.js +1 -1
  28. package/dist/builtins/loki-logging/index.mjs +1 -1
  29. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  30. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  31. package/dist/builtins/platform-probe/index.js +1 -1
  32. package/dist/builtins/platform-probe/index.mjs +1 -1
  33. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  34. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  35. package/dist/builtins/snapshot/index.js +1 -1
  36. package/dist/builtins/snapshot/index.mjs +1 -1
  37. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  38. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  39. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  40. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -2
  41. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  42. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  43. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  44. package/dist/builtins/system-config/system-config.addon.js +1 -1
  45. package/dist/builtins/system-config/system-config.addon.mjs +1 -1
  46. package/dist/builtins/winston-logging/index.js +1 -1
  47. package/dist/builtins/winston-logging/index.mjs +1 -1
  48. package/dist/{dist-C2_1HCpW.js → dist-CX9qXYC4.js} +114 -11
  49. package/dist/{dist-DCTpBXm4.mjs → dist-DNbsZxNv.mjs} +114 -11
  50. package/dist/index.js +187 -9
  51. package/dist/index.mjs +185 -11
  52. package/dist/kernel/config-manager.d.ts +8 -1
  53. package/dist/kernel/index.d.ts +3 -0
  54. package/dist/kernel/isolated-builtin-phase.d.ts +33 -0
  55. package/dist/kernel/settings-door-view.d.ts +7 -0
  56. package/dist/{manifest-python-deps-CwBbX4Ut.js → manifest-python-deps-76dZLxD0.js} +11 -3
  57. package/dist/{manifest-python-deps-SGdbr9D5.mjs → manifest-python-deps-DZSNlHjU.mjs} +12 -4
  58. package/dist/{retired-settings-keys-DHRXLMPn.js → retired-settings-keys-DlIuGG4o.js} +1 -1
  59. package/dist/{retired-settings-keys-Czd76yLZ.mjs → retired-settings-keys-Dt0-obcq.mjs} +1 -1
  60. package/package.json +6 -2
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-C2_1HCpW.js");
3
+ const require_dist = require("./dist-CX9qXYC4.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_formatter = require("./formatter-DqAKDlvN.js");
@@ -25,7 +25,7 @@ const require_builtins_system_config_system_config_addon = require("./builtins/s
25
25
  require("./builtins/system-config/index.js");
26
26
  const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
27
27
  const require_file_data_plane = require("./file-data-plane-DO8KbxCe.js");
28
- const require_manifest_python_deps = require("./manifest-python-deps-CwBbX4Ut.js");
28
+ const require_manifest_python_deps = require("./manifest-python-deps-76dZLxD0.js");
29
29
  const require_resource_monitor = require("./resource-monitor-CdnzxBLP.js");
30
30
  const require_lan_http_bind = require("./lan-http-bind-DmgpFP6_.js");
31
31
  const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
@@ -2611,7 +2611,7 @@ async function ensureAddonNativePrebuilds(addonDir, options) {
2611
2611
  }
2612
2612
  //#endregion
2613
2613
  //#region src/kernel/addon-loader.ts
2614
- function isRecord$1(value) {
2614
+ function isRecord$2(value) {
2615
2615
  return typeof value === "object" && value !== null && !Array.isArray(value);
2616
2616
  }
2617
2617
  /**
@@ -2709,9 +2709,9 @@ async function importAddonModuleFresh(entryPath) {
2709
2709
  * AddonPackageManifest + AddonDeclaration.
2710
2710
  */
2711
2711
  function toAddonPackageManifest(value) {
2712
- if (!isRecord$1(value)) return void 0;
2712
+ if (!isRecord$2(value)) return void 0;
2713
2713
  if (!Array.isArray(value.addons)) return void 0;
2714
- if (!value.addons.every((a) => isRecord$1(a) && typeof a.id === "string")) return void 0;
2714
+ if (!value.addons.every((a) => isRecord$2(a) && typeof a.id === "string")) return void 0;
2715
2715
  return value;
2716
2716
  }
2717
2717
  /** Minimal no-op logger for default parameter */
@@ -2861,7 +2861,7 @@ var AddonLoader = class {
2861
2861
  }
2862
2862
  if (!node_fs.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
2863
2863
  const modUnknown = await importAddonModuleFresh(entryPath);
2864
- const mod = isRecord$1(modUnknown) ? modUnknown : {};
2864
+ const mod = isRecord$2(modUnknown) ? modUnknown : {};
2865
2865
  const AddonClass = require_manifest_python_deps.resolveAddonClass(mod);
2866
2866
  if (!AddonClass) throw new Error(`No addon class in ${entryPath}`);
2867
2867
  this.addons.set(declaration.id, {
@@ -2877,7 +2877,7 @@ var AddonLoader = class {
2877
2877
  /** Load addon from a direct path (for development/testing) */
2878
2878
  async loadFromPath(addonId, modulePath, packageName, declaration, packageVersion = "0.0.0") {
2879
2879
  const modUnknown = await importAddonModuleFresh(modulePath);
2880
- const mod = isRecord$1(modUnknown) ? modUnknown : {};
2880
+ const mod = isRecord$2(modUnknown) ? modUnknown : {};
2881
2881
  const AddonClass = require_manifest_python_deps.resolveAddonClass(mod);
2882
2882
  if (!AddonClass) throw new Error(`Module ${modulePath} has no default export`);
2883
2883
  this.addons.set(addonId, {
@@ -6646,6 +6646,145 @@ function isInfraCapability(name) {
6646
6646
  return infraNames.has(name);
6647
6647
  }
6648
6648
  //#endregion
6649
+ //#region src/kernel/isolated-builtin-phase.ts
6650
+ var INFRA_NAMES = new Set(INFRA_CAPABILITIES.map((c) => c.name));
6651
+ function isolatedBuiltinPhase(capabilities) {
6652
+ return capabilities.some((c) => INFRA_NAMES.has(c.name)) ? "infra" : "consumer";
6653
+ }
6654
+ function partitionIsolatedBuiltinIds(ids, capabilitiesOf) {
6655
+ const infra = [];
6656
+ const consumers = [];
6657
+ for (const id of ids) if (isolatedBuiltinPhase(capabilitiesOf(id)) === "infra") infra.push(id);
6658
+ else consumers.push(id);
6659
+ return {
6660
+ infra,
6661
+ consumers
6662
+ };
6663
+ }
6664
+ /**
6665
+ * Spawn of an infra isolate returns when the child process exists, not when
6666
+ * its UDS handshake has put the engine in the parent's `getCollection`.
6667
+ * In-process builtins that read the door before that handshake throw D44
6668
+ * ("nothing behind it") and are skipped for the rest of the boot.
6669
+ */
6670
+ async function waitUntilReady(isReady, options) {
6671
+ const deadline = Date.now() + options.timeoutMs;
6672
+ for (;;) {
6673
+ if (isReady()) return;
6674
+ if (Date.now() >= deadline) throw new Error(`Timed out waiting for ${options.what}`);
6675
+ await new Promise((resolve) => {
6676
+ setTimeout(resolve, options.intervalMs);
6677
+ });
6678
+ }
6679
+ }
6680
+ //#endregion
6681
+ //#region src/kernel/settings-door-view.ts
6682
+ function isRecord$1(value) {
6683
+ return typeof value === "object" && value !== null && !Array.isArray(value);
6684
+ }
6685
+ function asBlob(value) {
6686
+ return isRecord$1(value) ? value : {};
6687
+ }
6688
+ function unwrapValue(parsed) {
6689
+ if (!isRecord$1(parsed) || !("value" in parsed)) return parsed;
6690
+ return parsed.value;
6691
+ }
6692
+ async function loadPrefixed(door, collection, prefix) {
6693
+ const range = require_builtins_sqlite_storage_sqlite_settings_addon.prefixRange(prefix);
6694
+ const rows = await door.query({
6695
+ collection,
6696
+ ...range !== null ? { filter: { whereBetween: { id: [range.lo, range.hi] } } } : {}
6697
+ });
6698
+ const result = {};
6699
+ for (const row of rows) {
6700
+ if (range !== null && (row.id < range.lo || row.id >= range.hi)) continue;
6701
+ if (!row.id.startsWith(prefix)) continue;
6702
+ result[row.id.slice(prefix.length)] = unwrapValue(row.data);
6703
+ }
6704
+ return result;
6705
+ }
6706
+ async function replacePrefixed(door, collection, prefix, values, wrap) {
6707
+ const range = require_builtins_sqlite_storage_sqlite_settings_addon.prefixRange(prefix);
6708
+ if (range !== null) await door.deleteWhere({
6709
+ collection,
6710
+ filter: { whereBetween: { id: [range.lo, range.hi] } }
6711
+ });
6712
+ for (const [key, value] of Object.entries(values)) {
6713
+ if (value === void 0) continue;
6714
+ await door.set({
6715
+ collection,
6716
+ key: `${prefix}${key}`,
6717
+ value: wrap(key, value)
6718
+ });
6719
+ }
6720
+ }
6721
+ function createDoorSettingsView(addonId, door, sections) {
6722
+ const addonPrefix = `${addonId}.`;
6723
+ return {
6724
+ async readAddonStore() {
6725
+ return loadPrefixed(door, "addon-settings", addonPrefix);
6726
+ },
6727
+ async writeAddonStore(patch) {
6728
+ await replacePrefixed(door, "addon-settings", addonPrefix, {
6729
+ ...await loadPrefixed(door, "addon-settings", addonPrefix),
6730
+ ...patch
6731
+ }, (key, value) => ({
6732
+ addonId,
6733
+ key,
6734
+ value
6735
+ }));
6736
+ },
6737
+ async readDeviceStore(deviceId) {
6738
+ return loadPrefixed(door, "addon-device-settings", `${addonId}:${String(deviceId)}.`);
6739
+ },
6740
+ async writeDeviceStore(deviceId, patch) {
6741
+ const scope = `${addonId}:${String(deviceId)}.`;
6742
+ await replacePrefixed(door, "addon-device-settings", scope, {
6743
+ ...await loadPrefixed(door, "addon-device-settings", scope),
6744
+ ...patch
6745
+ }, (key, value) => ({
6746
+ addonId,
6747
+ deviceId: String(deviceId),
6748
+ key,
6749
+ value
6750
+ }));
6751
+ },
6752
+ async clearDeviceStore(deviceId) {
6753
+ const range = require_builtins_sqlite_storage_sqlite_settings_addon.prefixRange(`${addonId}:${String(deviceId)}.`);
6754
+ if (range === null) return;
6755
+ await door.deleteWhere({
6756
+ collection: "addon-device-settings",
6757
+ filter: { whereBetween: { id: [range.lo, range.hi] } }
6758
+ });
6759
+ },
6760
+ async readDeviceRuntimeState(deviceId) {
6761
+ return asBlob(await door.get({
6762
+ collection: "device-runtime-state",
6763
+ key: String(deviceId)
6764
+ }));
6765
+ },
6766
+ async writeDeviceRuntimeState(deviceId, data) {
6767
+ await door.set({
6768
+ collection: "device-runtime-state",
6769
+ key: String(deviceId),
6770
+ value: data
6771
+ });
6772
+ },
6773
+ async clearDeviceRuntimeState(deviceId) {
6774
+ await door.delete({
6775
+ collection: "device-runtime-state",
6776
+ key: String(deviceId)
6777
+ });
6778
+ },
6779
+ async getSection(section) {
6780
+ return sections.getSection(section);
6781
+ },
6782
+ async setSection(section, patch) {
6783
+ await sections.setSection(section, patch);
6784
+ }
6785
+ };
6786
+ }
6787
+ //#endregion
6649
6788
  //#region ../../node_modules/js-yaml/dist/js-yaml.mjs
6650
6789
  /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
6651
6790
  var __create = Object.create;
@@ -9115,6 +9254,7 @@ var ConfigManager = class ConfigManager {
9115
9254
  configPath;
9116
9255
  bootstrapConfig;
9117
9256
  settingsStore = null;
9257
+ settingsDoor = null;
9118
9258
  runtimeState;
9119
9259
  runtimeStatePath;
9120
9260
  constructor(configPath) {
@@ -9135,6 +9275,14 @@ var ConfigManager = class ConfigManager {
9135
9275
  setSettingsStore(store) {
9136
9276
  this.settingsStore = store;
9137
9277
  }
9278
+ /**
9279
+ * Wire the async `settings-store` door. Used when the engine is isolated
9280
+ * (no sync `ISettingsStore` handle on hub-main). {@link createSettingsView}
9281
+ * prefers the sync store when both are present.
9282
+ */
9283
+ setSettingsDoor(door) {
9284
+ this.settingsDoor = door;
9285
+ }
9138
9286
  get(configPath) {
9139
9287
  return this.resolveConfigValue(configPath);
9140
9288
  }
@@ -9155,8 +9303,21 @@ var ConfigManager = class ConfigManager {
9155
9303
  * Throws if the settings store is not yet wired.
9156
9304
  */
9157
9305
  set(key, value) {
9158
- if (this.settingsStore === null) throw new Error("[ConfigManager] SettingsStore not initialized -- call setSettingsStore() first");
9159
- this.settingsStore.setSystem(key, value);
9306
+ if (this.settingsStore !== null) {
9307
+ this.settingsStore.setSystem(key, value);
9308
+ return;
9309
+ }
9310
+ if (this.settingsDoor !== null) {
9311
+ this.settingsDoor.set({
9312
+ collection: "system-settings",
9313
+ key,
9314
+ value
9315
+ }).catch((err) => {
9316
+ console.error("[ConfigManager] isolated settings-store write failed", err);
9317
+ });
9318
+ return;
9319
+ }
9320
+ throw new Error("[ConfigManager] SettingsStore not initialized -- call setSettingsStore() first");
9160
9321
  }
9161
9322
  /**
9162
9323
  * Bulk-read all keys that belong to a logical section.
@@ -9277,6 +9438,19 @@ var ConfigManager = class ConfigManager {
9277
9438
  this.settingsStore.clearDeviceRuntimeState(deviceId);
9278
9439
  }
9279
9440
  createSettingsView(addonId) {
9441
+ if (this.settingsStore === null && this.settingsDoor !== null) {
9442
+ const door = this.settingsDoor;
9443
+ return createDoorSettingsView(addonId, door, {
9444
+ getSection: (section) => this.getSection(section),
9445
+ setSection: async (section, patch) => {
9446
+ for (const [key, value] of Object.entries(patch)) await door.set({
9447
+ collection: "system-settings",
9448
+ key: `${section}.${key}`,
9449
+ value
9450
+ });
9451
+ }
9452
+ });
9453
+ }
9280
9454
  const cm = this;
9281
9455
  return {
9282
9456
  async readAddonStore() {
@@ -94992,6 +95166,7 @@ exports.createAuthenticatedFileServer = require_file_data_plane.createAuthentica
94992
95166
  exports.createBroker = createBroker;
94993
95167
  exports.createBrokerDeviceManagerApi = require_manifest_python_deps.createBrokerDeviceManagerApi;
94994
95168
  exports.createCoreCapService = createCoreCapService;
95169
+ exports.createDoorSettingsView = createDoorSettingsView;
94995
95170
  exports.createFileDataPlaneHandler = require_file_data_plane.createFileDataPlaneHandler;
94996
95171
  exports.createHubCapForwardService = require_manifest_python_deps.createHubCapForwardService;
94997
95172
  exports.createHubService = createHubService;
@@ -95111,6 +95286,7 @@ exports.isCollectionArrayMethod = require_dist.isCollectionArrayMethod;
95111
95286
  exports.isInfraCapability = isInfraCapability;
95112
95287
  exports.isModelDownloaded = require_file_data_plane.isModelDownloaded;
95113
95288
  exports.isSourceNewer = isSourceNewer;
95289
+ exports.isolatedBuiltinPhase = isolatedBuiltinPhase;
95114
95290
  exports.loadTlsCert = require_lan_http_bind.loadTlsCert;
95115
95291
  exports.localEndpointPath = require_manifest_python_deps.localEndpointPath;
95116
95292
  exports.localProviderLink = require_manifest_python_deps.localProviderLink;
@@ -95118,6 +95294,7 @@ exports.mountNativeCapService = require_manifest_python_deps.mountNativeCapServi
95118
95294
  exports.parseCapAction = require_manifest_python_deps.parseCapAction;
95119
95295
  exports.parseRangeHeader = require_file_data_plane.parseRangeHeader;
95120
95296
  exports.parseTokenizedUrl = require_file_data_plane.parseTokenizedUrl;
95297
+ exports.partitionIsolatedBuiltinIds = partitionIsolatedBuiltinIds;
95121
95298
  exports.proxyToUpstream = proxyToUpstream;
95122
95299
  exports.quarantineAddonResidue = quarantineAddonResidue;
95123
95300
  exports.readExtraSans = require_lan_http_bind.readExtraSans;
@@ -95150,6 +95327,7 @@ exports.subscribePassthrough = require_manifest_python_deps.subscribePassthrough
95150
95327
  exports.udsChildLogToWorkerEntry = require_manifest_python_deps.udsChildLogToWorkerEntry;
95151
95328
  exports.validateProviderRegistrations = require_manifest_python_deps.validateProviderRegistrations;
95152
95329
  exports.validateUploadedTls = require_lan_http_bind.validateUploadedTls;
95330
+ exports.waitUntilReady = waitUntilReady;
95153
95331
  exports.writeExtraSans = require_lan_http_bind.writeExtraSans;
95154
95332
  exports.writePendingRestart = writePendingRestart;
95155
95333
  exports.writeTlsMode = require_lan_http_bind.writeTlsMode;
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 { At as asNumber, B as extractNestedAddonId, Bt as parseJsonUnknown$1, Dt as ReadinessTimeoutError, Et as ReadinessRegistry, Ft as expandCapMethods, Gt as EventCategory$1, H as isArrayOutputSchema, Ht as resolveCapMount, J as lifecycleJobSchema, K as isVoidInput, Mt as createEvent, Nt as emitDownForOwnedCaps, Q as looseSchema, St as DEVICE_STATUS_METHOD, U as isCollectionArrayMethod, Ut as scopeKey, Vt as readinessKey, W as isObjectInput, Z as logLevelAtMost, bt as DATAPLANE_SECRET_HEADER$1, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, it as procedureAuthKey, jt as asString$1, kt as asJsonObject$1, ot as scopesAllowAddon, q as kebabToCamel, st as scopesAllowDeviceCap, t as ALL_CAPABILITY_DEFINITIONS, tt as objectInputDeclaresAddonId, vt as errMsg$1, xt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, y as addonSettingsCapability, zt as parseJsonObject } from "./dist-DCTpBXm4.mjs";
2
+ import { At as asNumber, B as extractNestedAddonId, Bt as parseJsonUnknown$1, Dt as ReadinessTimeoutError, Et as ReadinessRegistry, Ft as expandCapMethods, Gt as EventCategory$1, H as isArrayOutputSchema, Ht as resolveCapMount, J as lifecycleJobSchema, K as isVoidInput, Mt as createEvent, Nt as emitDownForOwnedCaps, Q as looseSchema, St as DEVICE_STATUS_METHOD, U as isCollectionArrayMethod, Ut as scopeKey, Vt as readinessKey, W as isObjectInput, Z as logLevelAtMost, bt as DATAPLANE_SECRET_HEADER$1, d as METHOD_ACCESS_MAP, f as RUNTIME_DEFAULTS, it as procedureAuthKey, jt as asString$1, kt as asJsonObject$1, ot as scopesAllowAddon, q as kebabToCamel, st as scopesAllowDeviceCap, t as ALL_CAPABILITY_DEFINITIONS, tt as objectInputDeclaresAddonId, vt as errMsg$1, xt as DEVICE_SETTINGS_CONTRIBUTION_METHODS, y as addonSettingsCapability, zt as parseJsonObject } from "./dist-DNbsZxNv.mjs";
3
3
  import { AlertCenterAddon } from "./builtins/alerts/alerts.addon.mjs";
4
4
  import "./builtins/alerts/index.mjs";
5
5
  import { t as formatLogLine } from "./formatter-B7qW8bPJ.mjs";
@@ -16,7 +16,7 @@ import "./builtins/local-auth/index.mjs";
16
16
  import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index.mjs";
17
17
  import NativeMetricsAddon, { t as NativeMetricsProvider } from "./builtins/native-metrics/native-metrics.addon.mjs";
18
18
  import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
19
- import { SqliteSettingsAddon, o as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
19
+ import { SqliteSettingsAddon, o as SqliteSettingsBackend, s as prefixRange } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
20
20
  import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
21
21
  import { StorageOrchestratorAddon, n as buildStorageLocationRegistry, t as StorageOrchestratorService } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
22
22
  import "./builtins/storage-orchestrator/index.mjs";
@@ -24,7 +24,7 @@ import { SystemConfigAddon } from "./builtins/system-config/system-config.addon.
24
24
  import "./builtins/system-config/index.mjs";
25
25
  import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
26
26
  import { a as parseTokenizedUrl, c as collectModelFiles, d as downloadModel, f as ensureModel, h as isModelDownloaded, i as parseRangeHeader, l as deleteModelFromDisk, m as getModelFilePath, n as contentTypeFor, o as resolveFilePath, p as fetchJson, r as createAuthenticatedFileServer, s as ModelDownloadService, t as createFileDataPlaneHandler, u as downloadFile } from "./file-data-plane-BhKdxJgf.mjs";
27
- import { $ as buildNativeCapProxy, A as createHubCapForwardService, At as buildHeapSample, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, Dt as HEAP_WATCH_INTERVAL_MS, E as ipcParentLink, Et as HEAP_RECLAIM_TRIGGER_MB, F as createUdsLogger, Ft as strandedMb, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, Mt as shouldReclaim, N as createUdsEventBus, Nt as startHeapWatch, O as HUB_CAP_FWD_ACTION, Ot as HEAP_WATCH_WARN_RATIO, P as udsChildLogToWorkerEntry, Pt as startRunnerHeapWatch, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, Tt as HEAP_RECLAIM_MIN_INTERVAL_MS, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, jt as createV8Reclaimer, k as HUB_CAP_FWD_SERVICE, kt as RUNNER_HEAP_WATCH_INTERVAL_MS, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-SGdbr9D5.mjs";
27
+ import { $ as buildNativeCapProxy, A as createHubCapForwardService, At as buildHeapSample, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as runNpm, D as localProviderLink, Dt as HEAP_WATCH_INTERVAL_MS, E as ipcParentLink, Et as HEAP_RECLAIM_TRIGGER_MB, F as createUdsLogger, Ft as strandedMb, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, Mt as shouldReclaim, N as createUdsEventBus, Nt as startHeapWatch, O as HUB_CAP_FWD_ACTION, Ot as HEAP_WATCH_WARN_RATIO, P as udsChildLogToWorkerEntry, Pt as startRunnerHeapWatch, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as resolveNpmInvocation, T as ipcChildLink, Tt as HEAP_RECLAIM_MIN_INTERVAL_MS, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, jt as createV8Reclaimer, k as HUB_CAP_FWD_SERVICE, kt as RUNNER_HEAP_WATCH_INTERVAL_MS, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveAddonClass, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-DZSNlHjU.mjs";
28
28
  import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-BWmQ5i-o.mjs";
29
29
  import { C as evaluateExistingCert, S as SERVER_AUTH_OID, _ as CA_COMMON_NAME, a as closeLanHttp, b as LEAF_RENEWAL_WINDOW_DAYS, c as readExtraSans, d as writeExtraSans, f as writeTlsMode, g as reissueTlsLeaf, h as loadTlsCert, i as bindPendingLanHttp, l as readTlsAccessStatus, m as ensureTlsCert, n as allFamiliesListenHost, o as readLanHttpState, p as validateUploadedTls, r as applyLanHttp, s as registerLanHttpHandler, t as DEFAULT_LAN_HTTP_PORT, u as readTlsMode, v as collectCertIdentity, x as MAX_LEAF_VALIDITY_DAYS, y as CA_VALIDITY_DAYS } from "./lan-http-bind-jKrj6OjQ.mjs";
30
30
  import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
@@ -2604,7 +2604,7 @@ async function ensureAddonNativePrebuilds(addonDir, options) {
2604
2604
  }
2605
2605
  //#endregion
2606
2606
  //#region src/kernel/addon-loader.ts
2607
- function isRecord$1(value) {
2607
+ function isRecord$2(value) {
2608
2608
  return typeof value === "object" && value !== null && !Array.isArray(value);
2609
2609
  }
2610
2610
  /**
@@ -2702,9 +2702,9 @@ async function importAddonModuleFresh(entryPath) {
2702
2702
  * AddonPackageManifest + AddonDeclaration.
2703
2703
  */
2704
2704
  function toAddonPackageManifest(value) {
2705
- if (!isRecord$1(value)) return void 0;
2705
+ if (!isRecord$2(value)) return void 0;
2706
2706
  if (!Array.isArray(value.addons)) return void 0;
2707
- if (!value.addons.every((a) => isRecord$1(a) && typeof a.id === "string")) return void 0;
2707
+ if (!value.addons.every((a) => isRecord$2(a) && typeof a.id === "string")) return void 0;
2708
2708
  return value;
2709
2709
  }
2710
2710
  /** Minimal no-op logger for default parameter */
@@ -2854,7 +2854,7 @@ var AddonLoader = class {
2854
2854
  }
2855
2855
  if (!fs$17.existsSync(entryPath)) throw new Error(`Entry not found: ${entryPath}`);
2856
2856
  const modUnknown = await importAddonModuleFresh(entryPath);
2857
- const mod = isRecord$1(modUnknown) ? modUnknown : {};
2857
+ const mod = isRecord$2(modUnknown) ? modUnknown : {};
2858
2858
  const AddonClass = resolveAddonClass(mod);
2859
2859
  if (!AddonClass) throw new Error(`No addon class in ${entryPath}`);
2860
2860
  this.addons.set(declaration.id, {
@@ -2870,7 +2870,7 @@ var AddonLoader = class {
2870
2870
  /** Load addon from a direct path (for development/testing) */
2871
2871
  async loadFromPath(addonId, modulePath, packageName, declaration, packageVersion = "0.0.0") {
2872
2872
  const modUnknown = await importAddonModuleFresh(modulePath);
2873
- const mod = isRecord$1(modUnknown) ? modUnknown : {};
2873
+ const mod = isRecord$2(modUnknown) ? modUnknown : {};
2874
2874
  const AddonClass = resolveAddonClass(mod);
2875
2875
  if (!AddonClass) throw new Error(`Module ${modulePath} has no default export`);
2876
2876
  this.addons.set(addonId, {
@@ -6639,6 +6639,145 @@ function isInfraCapability(name) {
6639
6639
  return infraNames.has(name);
6640
6640
  }
6641
6641
  //#endregion
6642
+ //#region src/kernel/isolated-builtin-phase.ts
6643
+ var INFRA_NAMES = new Set(INFRA_CAPABILITIES.map((c) => c.name));
6644
+ function isolatedBuiltinPhase(capabilities) {
6645
+ return capabilities.some((c) => INFRA_NAMES.has(c.name)) ? "infra" : "consumer";
6646
+ }
6647
+ function partitionIsolatedBuiltinIds(ids, capabilitiesOf) {
6648
+ const infra = [];
6649
+ const consumers = [];
6650
+ for (const id of ids) if (isolatedBuiltinPhase(capabilitiesOf(id)) === "infra") infra.push(id);
6651
+ else consumers.push(id);
6652
+ return {
6653
+ infra,
6654
+ consumers
6655
+ };
6656
+ }
6657
+ /**
6658
+ * Spawn of an infra isolate returns when the child process exists, not when
6659
+ * its UDS handshake has put the engine in the parent's `getCollection`.
6660
+ * In-process builtins that read the door before that handshake throw D44
6661
+ * ("nothing behind it") and are skipped for the rest of the boot.
6662
+ */
6663
+ async function waitUntilReady(isReady, options) {
6664
+ const deadline = Date.now() + options.timeoutMs;
6665
+ for (;;) {
6666
+ if (isReady()) return;
6667
+ if (Date.now() >= deadline) throw new Error(`Timed out waiting for ${options.what}`);
6668
+ await new Promise((resolve) => {
6669
+ setTimeout(resolve, options.intervalMs);
6670
+ });
6671
+ }
6672
+ }
6673
+ //#endregion
6674
+ //#region src/kernel/settings-door-view.ts
6675
+ function isRecord$1(value) {
6676
+ return typeof value === "object" && value !== null && !Array.isArray(value);
6677
+ }
6678
+ function asBlob(value) {
6679
+ return isRecord$1(value) ? value : {};
6680
+ }
6681
+ function unwrapValue(parsed) {
6682
+ if (!isRecord$1(parsed) || !("value" in parsed)) return parsed;
6683
+ return parsed.value;
6684
+ }
6685
+ async function loadPrefixed(door, collection, prefix) {
6686
+ const range = prefixRange(prefix);
6687
+ const rows = await door.query({
6688
+ collection,
6689
+ ...range !== null ? { filter: { whereBetween: { id: [range.lo, range.hi] } } } : {}
6690
+ });
6691
+ const result = {};
6692
+ for (const row of rows) {
6693
+ if (range !== null && (row.id < range.lo || row.id >= range.hi)) continue;
6694
+ if (!row.id.startsWith(prefix)) continue;
6695
+ result[row.id.slice(prefix.length)] = unwrapValue(row.data);
6696
+ }
6697
+ return result;
6698
+ }
6699
+ async function replacePrefixed(door, collection, prefix, values, wrap) {
6700
+ const range = prefixRange(prefix);
6701
+ if (range !== null) await door.deleteWhere({
6702
+ collection,
6703
+ filter: { whereBetween: { id: [range.lo, range.hi] } }
6704
+ });
6705
+ for (const [key, value] of Object.entries(values)) {
6706
+ if (value === void 0) continue;
6707
+ await door.set({
6708
+ collection,
6709
+ key: `${prefix}${key}`,
6710
+ value: wrap(key, value)
6711
+ });
6712
+ }
6713
+ }
6714
+ function createDoorSettingsView(addonId, door, sections) {
6715
+ const addonPrefix = `${addonId}.`;
6716
+ return {
6717
+ async readAddonStore() {
6718
+ return loadPrefixed(door, "addon-settings", addonPrefix);
6719
+ },
6720
+ async writeAddonStore(patch) {
6721
+ await replacePrefixed(door, "addon-settings", addonPrefix, {
6722
+ ...await loadPrefixed(door, "addon-settings", addonPrefix),
6723
+ ...patch
6724
+ }, (key, value) => ({
6725
+ addonId,
6726
+ key,
6727
+ value
6728
+ }));
6729
+ },
6730
+ async readDeviceStore(deviceId) {
6731
+ return loadPrefixed(door, "addon-device-settings", `${addonId}:${String(deviceId)}.`);
6732
+ },
6733
+ async writeDeviceStore(deviceId, patch) {
6734
+ const scope = `${addonId}:${String(deviceId)}.`;
6735
+ await replacePrefixed(door, "addon-device-settings", scope, {
6736
+ ...await loadPrefixed(door, "addon-device-settings", scope),
6737
+ ...patch
6738
+ }, (key, value) => ({
6739
+ addonId,
6740
+ deviceId: String(deviceId),
6741
+ key,
6742
+ value
6743
+ }));
6744
+ },
6745
+ async clearDeviceStore(deviceId) {
6746
+ const range = prefixRange(`${addonId}:${String(deviceId)}.`);
6747
+ if (range === null) return;
6748
+ await door.deleteWhere({
6749
+ collection: "addon-device-settings",
6750
+ filter: { whereBetween: { id: [range.lo, range.hi] } }
6751
+ });
6752
+ },
6753
+ async readDeviceRuntimeState(deviceId) {
6754
+ return asBlob(await door.get({
6755
+ collection: "device-runtime-state",
6756
+ key: String(deviceId)
6757
+ }));
6758
+ },
6759
+ async writeDeviceRuntimeState(deviceId, data) {
6760
+ await door.set({
6761
+ collection: "device-runtime-state",
6762
+ key: String(deviceId),
6763
+ value: data
6764
+ });
6765
+ },
6766
+ async clearDeviceRuntimeState(deviceId) {
6767
+ await door.delete({
6768
+ collection: "device-runtime-state",
6769
+ key: String(deviceId)
6770
+ });
6771
+ },
6772
+ async getSection(section) {
6773
+ return sections.getSection(section);
6774
+ },
6775
+ async setSection(section, patch) {
6776
+ await sections.setSection(section, patch);
6777
+ }
6778
+ };
6779
+ }
6780
+ //#endregion
6642
6781
  //#region ../../node_modules/js-yaml/dist/js-yaml.mjs
6643
6782
  /*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */
6644
6783
  var __create = Object.create;
@@ -9108,6 +9247,7 @@ var ConfigManager = class ConfigManager {
9108
9247
  configPath;
9109
9248
  bootstrapConfig;
9110
9249
  settingsStore = null;
9250
+ settingsDoor = null;
9111
9251
  runtimeState;
9112
9252
  runtimeStatePath;
9113
9253
  constructor(configPath) {
@@ -9128,6 +9268,14 @@ var ConfigManager = class ConfigManager {
9128
9268
  setSettingsStore(store) {
9129
9269
  this.settingsStore = store;
9130
9270
  }
9271
+ /**
9272
+ * Wire the async `settings-store` door. Used when the engine is isolated
9273
+ * (no sync `ISettingsStore` handle on hub-main). {@link createSettingsView}
9274
+ * prefers the sync store when both are present.
9275
+ */
9276
+ setSettingsDoor(door) {
9277
+ this.settingsDoor = door;
9278
+ }
9131
9279
  get(configPath) {
9132
9280
  return this.resolveConfigValue(configPath);
9133
9281
  }
@@ -9148,8 +9296,21 @@ var ConfigManager = class ConfigManager {
9148
9296
  * Throws if the settings store is not yet wired.
9149
9297
  */
9150
9298
  set(key, value) {
9151
- if (this.settingsStore === null) throw new Error("[ConfigManager] SettingsStore not initialized -- call setSettingsStore() first");
9152
- this.settingsStore.setSystem(key, value);
9299
+ if (this.settingsStore !== null) {
9300
+ this.settingsStore.setSystem(key, value);
9301
+ return;
9302
+ }
9303
+ if (this.settingsDoor !== null) {
9304
+ this.settingsDoor.set({
9305
+ collection: "system-settings",
9306
+ key,
9307
+ value
9308
+ }).catch((err) => {
9309
+ console.error("[ConfigManager] isolated settings-store write failed", err);
9310
+ });
9311
+ return;
9312
+ }
9313
+ throw new Error("[ConfigManager] SettingsStore not initialized -- call setSettingsStore() first");
9153
9314
  }
9154
9315
  /**
9155
9316
  * Bulk-read all keys that belong to a logical section.
@@ -9270,6 +9431,19 @@ var ConfigManager = class ConfigManager {
9270
9431
  this.settingsStore.clearDeviceRuntimeState(deviceId);
9271
9432
  }
9272
9433
  createSettingsView(addonId) {
9434
+ if (this.settingsStore === null && this.settingsDoor !== null) {
9435
+ const door = this.settingsDoor;
9436
+ return createDoorSettingsView(addonId, door, {
9437
+ getSection: (section) => this.getSection(section),
9438
+ setSection: async (section, patch) => {
9439
+ for (const [key, value] of Object.entries(patch)) await door.set({
9440
+ collection: "system-settings",
9441
+ key: `${section}.${key}`,
9442
+ value
9443
+ });
9444
+ }
9445
+ });
9446
+ }
9273
9447
  const cm = this;
9274
9448
  return {
9275
9449
  async readAddonStore() {
@@ -94816,4 +94990,4 @@ var LifecycleJobEngine = class {
94816
94990
  }
94817
94991
  };
94818
94992
  //#endregion
94819
- export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, proxyToUpstream, quarantineAddonResidue, readExtraSans, readLanHttpState, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, writeExtraSans, writePendingRestart, writeTlsMode };
94993
+ export { AGENT_CAP_FWD_ACTION, AGENT_CAP_FWD_SERVICE, AGENT_READINESS_SERVICE_NAME, ALL_CAPABILITY_DEFINITIONS, AddonApiFactory, AddonDepsManager, AddonEngineManager, AddonHealthMonitor, AddonInstaller, AddonLoader, AddonManifest, AddonRouteRegistry, AlertCenterAddon, ApiKeyManager, AuthManager, CA_COMMON_NAME, CA_VALIDITY_DAYS, CLUSTER_SECRET_MISMATCH_TYPE, CLUSTER_SECRET_REJECTED_EXIT_CODE, CORE_CAP_SERVICE_NAME, CapRouteError, CapRouteResolver, CapUsageRegistry, CapabilityHandle, CapabilityRegistry, CapabilityUnavailableError, ConfigManager, ConfigStore, ConsoleDestination, ConsoleLoggingAddon, CoreBlocksAddon, CustomActionRegistry, DEFAULT_DATA_PATH, DEFAULT_LAN_HTTP_PORT, DEVICE_SETTINGS_CONTRIBUTION_METHODS, DEVICE_STATUS_METHOD, DataPlaneRegistry, DeviceManagerAddon, DeviceRegistry, DeviceStore, EVENT_TOPIC_PREFIX, EngineManagerResolver, EventBus, FeatureManager, FilesystemStorageAddon, FilesystemStorageProvider, FrameDecoder, FsStorageBackend, HEALTH_MONITOR_GRACE_PERIOD_MS, HEALTH_MONITOR_RETRY_INTERVALS_MS, HEALTH_MONITOR_TICK_MS, HEAP_RECLAIM_MIN_INTERVAL_MS, HEAP_RECLAIM_TRIGGER_MB, HEAP_WATCH_INTERVAL_MS, HEAP_WATCH_WARN_RATIO, HUB_CAP_FWD_ACTION, HUB_CAP_FWD_SERVICE, HubForwarderAddon, HubForwarderDestination, HubLogForwarder, HubNodeRegistry, INFRA_CAPABILITIES, IntegrationRegistry, JobJournal, LEAF_RENEWAL_WINDOW_DAYS, LifecycleJobEngine, LifecycleStateMachine, LivenessMonitorAddon, LocalAuthAddon, LocalChildClient, LocalChildRegistry, LogManager, LogRingBuffer, LokiDestination, LokiLoggingAddon, MAX_LEAF_VALIDITY_DAYS, METHOD_ACCESS_MAP, ModelDownloadService, NATIVE_PROVIDER_SERVICE_INFIX, NATIVE_SCAN_DEPTH, NativeMetricsAddon, NativeMetricsProvider, NetworkQualityTracker, NotificationService, PYTHON_VERSION, PipelineRunner, PipelineValidator, PythonEnvManager, QUARANTINE_DIRNAME, RESTART_MARKER_FILE, RUNNER_HEAP_WATCH_INTERVAL_MS, RUNTIME_DEFAULTS, ReadinessRegistry, ReadinessTimeoutError, ReplEngine, RingBuffer, SERVER_AUTH_OID, ScopedLogger, ScopedTokenManager, SocketChannel, SqliteSettingsAddon, SqliteSettingsBackend, StagingArea, StorageLocationManager, StorageManager, StorageOrchestratorAddon, StorageOrchestratorService, SystemConfigAddon, SystemEventBus, TRADITIONAL_NATIVE_PACKAGES, ToastService, UDS_NO_ROUTE_PREFIX, UdsLocalTransportClient, UdsLocalTransportServer, UserManager, WinstonDestination, WinstonLoggingAddon, __resetCapUsageRegistryForTests, adaptBrokerToCluster, addonSettingsCapability, allFamiliesListenHost, applyLanHttp, bindPendingLanHttp, bootstrapSchema, brokerCallForCap, brokerTransportLink, buildBinaryPath, buildCapRouters, buildHeapSample, buildLinkChain, buildNativeCapProxy, buildNodeManifest, buildStorageLocationRegistry, buildUdsNativeCapProxy, builderMountedCapNames, callRegisterNodeWithRetry, callWithServiceDiscovery, capActionName, capActionSuffix, capBareAction, capServiceName, classifyAddonDir, classifyCapRoute, clearPendingRestart, closeLanHttp, clusterEventTopic, clusterSecretMatches, collectCertIdentity, collectModelFiles, contentTypeFor, copyDirRecursive, copyExtraFileDirs, createAddonContext, createAddonDataPlaneFacility, createAddonService, createAuthenticatedFileServer, createBroker, createBrokerDeviceManagerApi, createCoreCapService, createDoorSettingsView, createFileDataPlaneHandler, createHubCapForwardService, createHubService, createKernelHwAccel, createLocalTransport, createParentUnownedCallHandler, createProcessService, createReadinessService, createReadinessServiceForRegistry, createScopedProcessManager, createStreamProbeBrokerService, createUdsAddonContext, createUdsEventBridge, createUdsEventBus, createUdsLogger, createUdsLoggerWithControl, createV8Reclaimer, deleteModelFromDisk, deriveAgentListenPort, describeProviderKindDrift, detectWorkspacePackagesDir, downloadBinary, downloadFile, downloadModel, emitDownForOwnedCaps, encodeFrame, ensureAddonNativePrebuilds, ensureBinary, ensureDir, ensureFfmpeg, ensureLibraryBuilt, ensureModel, ensureNativePrebuilds, ensurePython, ensureTlsCert, evaluateExistingCert, expandCapMethods, fetchJson, findInPath, formatLogLine, getBrokerEventBus, getCapUsageRegistry, getFfmpegDownloadUrl, getModelFilePath, getMoleculerEventStats, getOrInitReadinessRegistry, getOrInitReadinessRegistryForClient, getPidStats, getPlatformInfo, getPythonDownloadUrl, getRestartMarkerPath, getSinglePidStats, getWorkerDeviceRegistry, hasDotNode, hashClusterSecret, installManifestNativeDeps, installManifestPythonDeps, installPackageFromNpm, installPythonPackages, installPythonRequirements, ipcChildLink, ipcParentLink, isAddonDeploySource, isArrayOutputSchema, isClusterSecretMismatchError, isCollectionArrayMethod, isInfraCapability, isModelDownloaded, isSourceNewer, isolatedBuiltinPhase, loadTlsCert, localEndpointPath, localProviderLink, mountNativeCapService, parseCapAction, parseRangeHeader, parseTokenizedUrl, partitionIsolatedBuiltinIds, proxyToUpstream, quarantineAddonResidue, readExtraSans, readLanHttpState, readPendingRestart, readTlsAccessStatus, readTlsMode, readinessKey, registerEventBusService, registerLanHttpHandler, reissueTlsLeaf, resolveFilePath, resolveHwAccel, resolveNpmInvocation, runNpm, scheduleSelfRestart, scopeKey, scopesAllowAddon, scopesAllowDeviceCap, selectAddonResidue, serializeTypedArrays, setHubConnected, setNodeEventInterest, shouldReclaim, startHeapWatch, startRunnerHeapWatch, strandedMb, stripCamstackDeps, subscribePassthrough, udsChildLogToWorkerEntry, validateProviderRegistrations, validateUploadedTls, waitUntilReady, writeExtraSans, writePendingRestart, writeTlsMode };
@@ -1,5 +1,5 @@
1
1
  import { AppConfig } from './config-schema.js';
2
- import { FeatureManifest } from '@camstack/types';
2
+ import { FeatureManifest, ISettingsStoreProvider } from '@camstack/types';
3
3
  export interface AddonSettingsView {
4
4
  readAddonStore(): Promise<Record<string, unknown>>;
5
5
  writeAddonStore(patch: Record<string, unknown>): Promise<void>;
@@ -76,6 +76,7 @@ export declare class ConfigManager {
76
76
  private readonly configPath;
77
77
  private bootstrapConfig;
78
78
  private settingsStore;
79
+ private settingsDoor;
79
80
  private runtimeState;
80
81
  private readonly runtimeStatePath;
81
82
  constructor(configPath: string);
@@ -85,6 +86,12 @@ export declare class ConfigManager {
85
86
  * Before this call, runtime reads/writes fall back to bootstrap + defaults.
86
87
  */
87
88
  setSettingsStore(store: ISettingsStore): void;
89
+ /**
90
+ * Wire the async `settings-store` door. Used when the engine is isolated
91
+ * (no sync `ISettingsStore` handle on hub-main). {@link createSettingsView}
92
+ * prefers the sync store when both are present.
93
+ */
94
+ setSettingsDoor(door: ISettingsStoreProvider): void;
88
95
  /**
89
96
  * Get a config value by dot-notation path.
90
97
  * Priority: bootstrap config (yaml) → settings-store → RUNTIME_DEFAULTS fallback.
@@ -21,6 +21,9 @@ export type { CapabilityRouter, CapabilityRouterFactory, ConfigReader, ProviderO
21
21
  export { CustomActionRegistry, type CustomActionEntry } from './custom-action-registry.js';
22
22
  export { INFRA_CAPABILITIES, isInfraCapability } from './infra-capabilities.js';
23
23
  export type { InfraCapability } from './infra-capabilities.js';
24
+ export { isolatedBuiltinPhase, partitionIsolatedBuiltinIds, waitUntilReady, } from './isolated-builtin-phase.js';
25
+ export type { IsolatedBuiltinPhase, IsolatedBuiltinWaves, CapabilityName, WaitUntilReadyOptions, } from './isolated-builtin-phase.js';
26
+ export { createDoorSettingsView } from './settings-door-view.js';
24
27
  export { ConfigManager } from './config-manager.js';
25
28
  export type { ISettingsStore } from './config-manager.js';
26
29
  export { bootstrapSchema, RUNTIME_DEFAULTS, DEFAULT_DATA_PATH } from './config-schema.js';