@camstack/server 1.2.733 → 1.2.735

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 (99) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/core/agent/node-removal-hooks.js +25 -0
  3. package/dist/manual-boot.js +11 -0
  4. package/package.json +4 -6
  5. package/system/dist/addon-runner.js +94 -17
  6. package/system/dist/addon-runner.mjs +95 -18
  7. package/system/dist/{agent-https-D3dptveB.mjs → agent-https-BVCIU0eH.mjs} +1 -1
  8. package/system/dist/{agent-https-v5uyVgpk.js → agent-https-DrCbFr4p.js} +1 -1
  9. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  10. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  11. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  12. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  13. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  14. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  15. package/system/dist/builtins/autotrack/index.js +1 -1
  16. package/system/dist/builtins/autotrack/index.mjs +1 -1
  17. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  18. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  19. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  20. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  21. package/system/dist/builtins/camera-grid/index.js +1 -1
  22. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  23. package/system/dist/builtins/composer/composer.addon.js +3 -3
  24. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  25. package/system/dist/builtins/console-logging/index.js +1 -1
  26. package/system/dist/builtins/console-logging/index.mjs +1 -1
  27. package/system/dist/builtins/core-blocks/core-blocks.addon.js +79 -8
  28. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +90 -21
  29. package/system/dist/builtins/core-blocks/index.mjs +1 -1
  30. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  31. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  32. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  33. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  34. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  35. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  36. package/system/dist/builtins/keychain/index.js +3 -3
  37. package/system/dist/builtins/keychain/index.mjs +3 -3
  38. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  39. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  40. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  41. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  42. package/system/dist/builtins/local-network/local-network.addon.js +91 -21
  43. package/system/dist/builtins/local-network/local-network.addon.mjs +91 -21
  44. package/system/dist/builtins/local-network/scan/dns-wire.d.ts +29 -0
  45. package/system/dist/builtins/loki-logging/index.js +1 -1
  46. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  47. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  48. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  49. package/system/dist/builtins/platform-probe/index.js +1 -1
  50. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  51. package/system/dist/builtins/record-entries/index.js +1 -1
  52. package/system/dist/builtins/record-entries/index.mjs +1 -1
  53. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  54. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  55. package/system/dist/builtins/snapshot/index.js +1 -1
  56. package/system/dist/builtins/snapshot/index.mjs +1 -1
  57. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  58. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  59. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  60. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  61. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  62. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  63. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  64. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  65. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  66. package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
  67. package/system/dist/builtins/winston-logging/index.js +1 -1
  68. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  69. package/system/dist/{composition-sources-j_bFq7Tx.js → composition-sources-BV9n2ivT.js} +1 -1
  70. package/system/dist/{composition-sources-Dnyu7-1p.mjs → composition-sources-CI2tZzAo.mjs} +1 -1
  71. package/system/dist/{constants-GDBin8zB.mjs → constants-Bskr2h1W.mjs} +1 -1
  72. package/system/dist/{constants-C6zJ_38f.js → constants-dYIQm8ab.js} +1 -1
  73. package/system/dist/{device-ca-Bpqrad00.mjs → device-ca-04o7NByo.mjs} +1 -1
  74. package/system/dist/{device-ca-CV9QZvoy.js → device-ca-BF8N9fC6.js} +1 -1
  75. package/system/dist/{dist-CwYYyGAB.js → dist-B4r3_aYb.js} +61 -4
  76. package/system/dist/{dist-DcHvuBfD.mjs → dist-CnC8-kF6.mjs} +56 -5
  77. package/system/dist/{dns-wire-CqgMi_uB.js → dns-wire-B1BvF9Ao.js} +78 -10
  78. package/system/dist/{dns-wire-DO56tOHL.mjs → dns-wire-Dm3H_7ST.mjs} +55 -11
  79. package/system/dist/file-host-worker.js +1 -1
  80. package/system/dist/file-host-worker.mjs +1 -1
  81. package/system/dist/{hub-mdns-ciao-D2sU6sKd.mjs → hub-mdns-ciao-BE1vqriF.mjs} +2 -2
  82. package/system/dist/{hub-mdns-ciao-DNLnbJNG.js → hub-mdns-ciao-MdXDARI0.js} +2 -2
  83. package/system/dist/index.d.ts +1 -0
  84. package/system/dist/index.js +45 -19
  85. package/system/dist/index.mjs +46 -21
  86. package/system/dist/kernel/addon-settings-store.d.ts +25 -0
  87. package/system/dist/kernel/device-settings-resolver.d.ts +27 -0
  88. package/system/dist/kernel/moleculer/runner-device-settings.d.ts +2 -0
  89. package/system/dist/kernel/settings-door-view.d.ts +5 -1
  90. package/system/dist/kernel/settings-view-types.d.ts +7 -1
  91. package/system/dist/migrations/hub/2026-11-02-addon-settings-node-id.d.ts +3 -0
  92. package/system/dist/migrations/hub/index.d.ts +3 -4
  93. package/system/dist/{restore-archive-xTqhDFkW.js → restore-archive-BEUIhG8U.js} +1 -1
  94. package/system/dist/{restore-archive-BGK6EnYj.mjs → restore-archive-Dx9F-3zV.mjs} +82 -82
  95. package/system/dist/{retention-CXu8PB2L.mjs → retention-fsBjIfxP.mjs} +1 -1
  96. package/system/dist/{retention-gQ3GIUA3.js → retention-nNCAON-6.js} +1 -1
  97. package/system/dist/{wal-maintenance-D7XmFaUD.mjs → wal-maintenance-0XhlopB5.mjs} +0 -0
  98. package/system/dist/{wal-maintenance-Hwzm3DCe.js → wal-maintenance-UKXXEEoS.js} +0 -0
  99. package/system/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.735] - 2026-11-02
11
+
12
+ ### Changed
13
+
14
+ - Rebuilt against updated dependencies.
15
+
16
+ ## [1.2.734] - 2026-11-02
17
+
18
+ ### Changed
19
+
20
+ - Forgetting a cluster node now also removes the settings rows stored for that node
21
+
10
22
  ## [1.2.733] - 2026-11-02
11
23
 
12
24
  ### Changed
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NodeRemovalDispatcher = exports.NodeTombstoneStore = void 0;
4
4
  exports.registryNodeRemovalHooks = registryNodeRemovalHooks;
5
5
  exports.clearSingletonNodeOverrides = clearSingletonNodeOverrides;
6
+ exports.clearForgottenNodeSettings = clearForgottenNodeSettings;
6
7
  const system_1 = require("@camstack/server/system");
7
8
  const types_1 = require("@camstack/types");
8
9
  const capability_preference_writes_1 = require("../../api/core/capability-preference-writes");
@@ -188,3 +189,27 @@ async function clearSingletonNodeOverrides(nodeId, registry, config) {
188
189
  }
189
190
  return cleared;
190
191
  }
192
+ /**
193
+ * A forgotten node leaves no `addon-settings` row behind (D986): the rows of EVERY addon that
194
+ * carry its `nodeId` go in ONE central delete, the node twin of `clearDeviceSettings` (D865), so
195
+ * no addon needs a handler for its node-scoped settings. A failed delete is logged and returns
196
+ * `null` - it never turns a forget that happened into an error, and the rows stay (visible on the
197
+ * next forget of the same id), never half-removed.
198
+ */
199
+ async function clearForgottenNodeSettings(nodeId, door, logger) {
200
+ try {
201
+ const deleted = await (0, system_1.clearNodeSettings)(door, nodeId);
202
+ logger.info('cleared the settings rows of a forgotten node', {
203
+ tags: { nodeId },
204
+ meta: { deleted },
205
+ });
206
+ return deleted;
207
+ }
208
+ catch (err) {
209
+ logger.warn('could not clear the settings rows of a forgotten node', {
210
+ tags: { nodeId },
211
+ meta: { error: (0, types_1.errMsg)(err) },
212
+ });
213
+ return null;
214
+ }
215
+ }
@@ -197,6 +197,17 @@ async function bootManual(opts) {
197
197
  meta: { overrides },
198
198
  });
199
199
  }
200
+ const settingsStore = addonRegistryService
201
+ .getCapabilityRegistry()
202
+ .getSingleton('settings-store');
203
+ if (settingsStore === null || settingsStore === undefined) {
204
+ nodeRemovalLogger.warn('settings store not registered: the forgotten node keeps its rows', {
205
+ tags: { nodeId },
206
+ });
207
+ }
208
+ else {
209
+ await (0, node_removal_hooks_1.clearForgottenNodeSettings)(nodeId, settingsStore, nodeRemovalLogger);
210
+ }
200
211
  await nodeRemovalDispatcher.nodeForgotten(nodeId, removedAt);
201
212
  });
202
213
  // An implementer that was down at forget time is told once the addons are up.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.733",
3
+ "version": "1.2.735",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -66,9 +66,7 @@
66
66
  ],
67
67
  "requires": {
68
68
  "addons": {
69
- "@camstack/addon-admin-ui": ">=1.2.553",
70
- "@camstack/addon-export-google": ">=0.1.122",
71
- "@camstack/addon-provider-homeassistant": ">=1.2.648"
69
+ "@camstack/addon-admin-ui": ">=1.2.555"
72
70
  },
73
71
  "wrapper": {
74
72
  "desktop": ">=0.0.1",
@@ -77,7 +75,7 @@
77
75
  }
78
76
  },
79
77
  "dependencies": {
80
- "@camstack/addon-admin-ui": "1.2.553",
78
+ "@camstack/addon-admin-ui": "1.2.555",
81
79
  "@camstack/addon-agent-ui": "1.2.313",
82
80
  "@camstack/addon-auth": "1.2.175",
83
81
  "@camstack/addon-benchmark": "1.2.311",
@@ -88,7 +86,7 @@
88
86
  "@camstack/addon-post-analysis": "1.2.662",
89
87
  "@camstack/develop": "0.1.44",
90
88
  "@camstack/sdk": "1.2.155",
91
- "@camstack/types": "1.2.473",
89
+ "@camstack/types": "1.2.475",
92
90
  "@camstack/ui-library": "1.2.371",
93
91
  "@fastify/compress": "^9.0.0",
94
92
  "@fastify/cookie": "^11.0.2",
@@ -10210,10 +10210,44 @@ async function loadPrefixed(door, collection, prefix, decode = unwrapStoredValue
10210
10210
  //#region src/kernel/addon-settings-store.ts
10211
10211
  /** The collection every addon's settings share. Named nowhere else (with sections' own module). */
10212
10212
  var ADDON_SETTINGS_COLLECTION = "addon-settings";
10213
+ /** Row data of a field: `nodeId` only on a node row (the key says which node). */
10214
+ function rowData(addonId, key, value) {
10215
+ const nodeId = (0, _camstack_types_addon.nodeIdOfScopedKey)(key);
10216
+ return nodeId === null ? {
10217
+ addonId,
10218
+ key,
10219
+ value
10220
+ } : {
10221
+ addonId,
10222
+ key,
10223
+ value,
10224
+ nodeId
10225
+ };
10226
+ }
10227
+ /**
10228
+ * The cluster and fleet-default rows of one addon (no node suffix), through the `query` slice
10229
+ * alone, so a runner's client door serves it as hub-main's door does. Three-way like every read
10230
+ * here; the device resolver's fleet-default layer (D986).
10231
+ */
10232
+ async function readUnscopedAddonSettings(door, addonId) {
10233
+ try {
10234
+ const all = await loadPrefixed(door, ADDON_SETTINGS_COLLECTION, `${addonId}.`);
10235
+ const value = Object.fromEntries(Object.entries(all).filter(([key]) => (0, _camstack_types_addon.nodeIdOfScopedKey)(key) === null));
10236
+ return Object.keys(value).length === 0 ? { kind: "absent" } : {
10237
+ kind: "present",
10238
+ value
10239
+ };
10240
+ } catch (err) {
10241
+ return {
10242
+ kind: "unreadable",
10243
+ error: err instanceof Error ? err.message : String(err)
10244
+ };
10245
+ }
10246
+ }
10213
10247
  function createAddonSettingsStore(door, addonId) {
10214
10248
  const prefix = `${addonId}.`;
10215
10249
  const message = (err) => err instanceof Error ? err.message : String(err);
10216
- return {
10250
+ const store = {
10217
10251
  async read() {
10218
10252
  try {
10219
10253
  const value = await loadPrefixed(door, ADDON_SETTINGS_COLLECTION, prefix);
@@ -10251,11 +10285,7 @@ function createAddonSettingsStore(door, addonId) {
10251
10285
  for (const [key, value] of Object.entries(patch)) if (value === void 0) removed.push(`${prefix}${key}`);
10252
10286
  else records.push({
10253
10287
  id: `${prefix}${key}`,
10254
- data: {
10255
- addonId,
10256
- key,
10257
- value
10258
- }
10288
+ data: rowData(addonId, key, value)
10259
10289
  });
10260
10290
  if (records.length === 0 && removed.length === 0) return;
10261
10291
  if (prefixRange(prefix) === null) throw new Error(`addon settings: "${addonId}" cannot be expressed as an id range`);
@@ -10269,8 +10299,32 @@ function createAddonSettingsStore(door, addonId) {
10269
10299
  conflict: ["id"],
10270
10300
  records
10271
10301
  }] : []] });
10302
+ },
10303
+ readUnscoped: () => readUnscopedAddonSettings(door, addonId),
10304
+ async readNode(nodeId) {
10305
+ const all = await store.read();
10306
+ if (all.kind !== "present") return all;
10307
+ const value = {};
10308
+ for (const [key, field] of Object.entries(all.value)) {
10309
+ if ((0, _camstack_types_addon.nodeIdOfScopedKey)(key) !== nodeId) continue;
10310
+ value[key.slice(0, key.indexOf("@"))] = field;
10311
+ }
10312
+ return Object.keys(value).length === 0 ? { kind: "absent" } : {
10313
+ kind: "present",
10314
+ value
10315
+ };
10316
+ },
10317
+ async mergeNode(nodeId, patch) {
10318
+ if (nodeId === "") throw new Error("node settings: an empty node id names every node");
10319
+ const scoped = {};
10320
+ for (const [key, value] of Object.entries(patch)) {
10321
+ if (key.includes("@")) throw new Error(`node settings: "${key}" is already scoped`);
10322
+ scoped[`${key}@${nodeId}`] = value;
10323
+ }
10324
+ return store.merge(scoped);
10272
10325
  }
10273
10326
  };
10327
+ return store;
10274
10328
  }
10275
10329
  //#endregion
10276
10330
  //#region src/kernel/system-settings-policy.ts
@@ -10423,6 +10477,35 @@ async function readDeviceOrThrow(store, deviceId) {
10423
10477
  }
10424
10478
  }
10425
10479
  //#endregion
10480
+ //#region src/kernel/device-settings-resolver.ts
10481
+ /**
10482
+ * The ONE fleet-default resolver (D986 point 3), shared by hub-main's settings view and the forked
10483
+ * runner's, over the same two stores both already use (D870):
10484
+ *
10485
+ * device row (`addon-device-settings`) -> fleet-default row (`addon-settings`) -> schema default
10486
+ *
10487
+ * `readDeviceStore` keeps returning the device's RAW overrides; this is a separate, additive read
10488
+ * that says, per field, the value AND where it came from (`device` | `fleet-default` |
10489
+ * `schema-default`), so a device form can mark an inherited field and offer Reset. Reset is "delete
10490
+ * the device row" (`writeDeviceStore(id, { field: undefined })`): an override equal to the default
10491
+ * stays an override.
10492
+ *
10493
+ * Both layers are read THREE-way: a store that did not answer THROWS. Falling back to the schema
10494
+ * default on a failed read would show, and let a caller act on, a value nobody chose (D49).
10495
+ */
10496
+ function createDeviceSettingsResolver(door, addonId) {
10497
+ const deviceStore = createDeviceSettingsStore(door, addonId);
10498
+ return { async resolve(deviceId, schemaDefaults) {
10499
+ const [fleet, deviceOverrides] = await Promise.all([readUnscopedAddonSettings(door, addonId), readDeviceOrThrow(deviceStore, deviceId)]);
10500
+ if (fleet.kind === "unreadable") throw new Error(`fleet defaults of "${addonId}" could not be read: ${fleet.error}`);
10501
+ return (0, _camstack_types_addon.resolveDeviceSettings)({
10502
+ schemaDefaults,
10503
+ fleetDefaults: fleet.kind === "present" ? fleet.value : {},
10504
+ deviceOverrides
10505
+ });
10506
+ } };
10507
+ }
10508
+ //#endregion
10426
10509
  //#region src/kernel/settings-door-view.ts
10427
10510
  /**
10428
10511
  * Every `system-settings` row under `prefix`, keyed by the suffix — or a throw.
@@ -10534,16 +10617,6 @@ function createRunnerAddonSettings(client, addonId) {
10534
10617
  }
10535
10618
  //#endregion
10536
10619
  //#region src/kernel/moleculer/runner-device-settings.ts
10537
- /**
10538
- * The forked runner's `ctx.settings` device methods (D870).
10539
- *
10540
- * A runner does not hold the settings door; it holds a tRPC client of the hub's
10541
- * `settings-store` cap. This file adapts that client to the door slice the
10542
- * per-device store needs and hands back the five view methods — the SAME module
10543
- * hub-main's view uses, so a device's settings are one set of rows whichever
10544
- * process asks. Before D870 the runner kept its own `<addonId>:addon-devices`
10545
- * blob per device; a hub-side write to the rows was invisible to it.
10546
- */
10547
10620
  /** The door slice the per-device store needs, over a tRPC client. */
10548
10621
  function doorOverClient(client) {
10549
10622
  return {
@@ -10564,15 +10637,19 @@ function createRunnerDeviceSettings(client, addonId) {
10564
10637
  };
10565
10638
  return {
10566
10639
  readDeviceStore: async () => refuse(),
10640
+ readResolvedDeviceStore: async () => refuse(),
10567
10641
  readDeviceStoreBatch: async () => refuse(),
10568
10642
  listDeviceStoreIds: async () => refuse(),
10569
10643
  writeDeviceStore: async () => refuse(),
10570
10644
  clearDeviceStore: async () => refuse()
10571
10645
  };
10572
10646
  }
10573
- const store = createDeviceSettingsStore(doorOverClient(client), addonId);
10647
+ const door = doorOverClient(client);
10648
+ const store = createDeviceSettingsStore(door, addonId);
10649
+ const resolver = createDeviceSettingsResolver(door, addonId);
10574
10650
  return {
10575
10651
  readDeviceStore: (deviceId) => readDeviceOrThrow(store, deviceId),
10652
+ readResolvedDeviceStore: (deviceId, schemaDefaults) => resolver.resolve(deviceId, schemaDefaults),
10576
10653
  readDeviceStoreBatch: (ids) => store.readBatch(ids),
10577
10654
  listDeviceStoreIds: () => store.listIds(),
10578
10655
  writeDeviceStore: (deviceId, patch) => store.merge(deviceId, patch),
@@ -3,7 +3,7 @@ import * as fs$1 from "node:fs";
3
3
  import fs, { createReadStream, createWriteStream, existsSync, readFileSync, readdirSync } from "node:fs";
4
4
  import * as path from "node:path";
5
5
  import { basename, dirname, isAbsolute, join } from "node:path";
6
- import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry, ReadinessTimeoutError, addonSliceHandleApi, asJsonObject, asString, collectZodSecretPaths, createDebugEmitter, createDeviceProxy, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, describeCustomActions, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, isCollectionArrayMethodName, isProviderOptionalMethodName, maskUrlCredentials, normalizeAddonInitResult, readErrorI18n, readNodePin, resolveSecretViewsIn, scopeKey, scrubKnownSecrets, withCapInputDefaults } from "@camstack/types/addon";
6
+ import { BOOT_RECOVERY_BACKOFF_MS, CALLER_STAMPED_CAPABILITIES, DATAPLANE_SECRET_HEADER, DEVICE_CHILDREN_BATCH_MAX, DeviceType, DisposerChain, ErrorI18nPayloadSchema, EventCategory, PEER_BYTES_CHUNK_BYTES, PEER_BYTES_MAX_OUTSTANDING, PEER_BYTES_STALL_MS, PEER_BYTES_TICKET_TTL_MS, ReadinessRegistry, ReadinessTimeoutError, addonSliceHandleApi, asJsonObject, asString, collectZodSecretPaths, createDebugEmitter, createDeviceProxy, createEventBusSliceSource, createRecordsAccess, createSecretsAccess, describeCustomActions, deviceOpsCapability, emitReadiness, errMsg, expandCapMethods, isCollectionArrayMethodName, isProviderOptionalMethodName, maskUrlCredentials, nodeIdOfScopedKey, normalizeAddonInitResult, readErrorI18n, readNodePin, resolveDeviceSettings, resolveSecretViewsIn, scopeKey, scrubKnownSecrets, withCapInputDefaults } from "@camstack/types/addon";
7
7
  import { execFile } from "node:child_process";
8
8
  import { promisify } from "node:util";
9
9
  import * as os from "node:os";
@@ -10155,10 +10155,44 @@ async function loadPrefixed(door, collection, prefix, decode = unwrapStoredValue
10155
10155
  //#region src/kernel/addon-settings-store.ts
10156
10156
  /** The collection every addon's settings share. Named nowhere else (with sections' own module). */
10157
10157
  var ADDON_SETTINGS_COLLECTION = "addon-settings";
10158
+ /** Row data of a field: `nodeId` only on a node row (the key says which node). */
10159
+ function rowData(addonId, key, value) {
10160
+ const nodeId = nodeIdOfScopedKey(key);
10161
+ return nodeId === null ? {
10162
+ addonId,
10163
+ key,
10164
+ value
10165
+ } : {
10166
+ addonId,
10167
+ key,
10168
+ value,
10169
+ nodeId
10170
+ };
10171
+ }
10172
+ /**
10173
+ * The cluster and fleet-default rows of one addon (no node suffix), through the `query` slice
10174
+ * alone, so a runner's client door serves it as hub-main's door does. Three-way like every read
10175
+ * here; the device resolver's fleet-default layer (D986).
10176
+ */
10177
+ async function readUnscopedAddonSettings(door, addonId) {
10178
+ try {
10179
+ const all = await loadPrefixed(door, ADDON_SETTINGS_COLLECTION, `${addonId}.`);
10180
+ const value = Object.fromEntries(Object.entries(all).filter(([key]) => nodeIdOfScopedKey(key) === null));
10181
+ return Object.keys(value).length === 0 ? { kind: "absent" } : {
10182
+ kind: "present",
10183
+ value
10184
+ };
10185
+ } catch (err) {
10186
+ return {
10187
+ kind: "unreadable",
10188
+ error: err instanceof Error ? err.message : String(err)
10189
+ };
10190
+ }
10191
+ }
10158
10192
  function createAddonSettingsStore(door, addonId) {
10159
10193
  const prefix = `${addonId}.`;
10160
10194
  const message = (err) => err instanceof Error ? err.message : String(err);
10161
- return {
10195
+ const store = {
10162
10196
  async read() {
10163
10197
  try {
10164
10198
  const value = await loadPrefixed(door, ADDON_SETTINGS_COLLECTION, prefix);
@@ -10196,11 +10230,7 @@ function createAddonSettingsStore(door, addonId) {
10196
10230
  for (const [key, value] of Object.entries(patch)) if (value === void 0) removed.push(`${prefix}${key}`);
10197
10231
  else records.push({
10198
10232
  id: `${prefix}${key}`,
10199
- data: {
10200
- addonId,
10201
- key,
10202
- value
10203
- }
10233
+ data: rowData(addonId, key, value)
10204
10234
  });
10205
10235
  if (records.length === 0 && removed.length === 0) return;
10206
10236
  if (prefixRange(prefix) === null) throw new Error(`addon settings: "${addonId}" cannot be expressed as an id range`);
@@ -10214,8 +10244,32 @@ function createAddonSettingsStore(door, addonId) {
10214
10244
  conflict: ["id"],
10215
10245
  records
10216
10246
  }] : []] });
10247
+ },
10248
+ readUnscoped: () => readUnscopedAddonSettings(door, addonId),
10249
+ async readNode(nodeId) {
10250
+ const all = await store.read();
10251
+ if (all.kind !== "present") return all;
10252
+ const value = {};
10253
+ for (const [key, field] of Object.entries(all.value)) {
10254
+ if (nodeIdOfScopedKey(key) !== nodeId) continue;
10255
+ value[key.slice(0, key.indexOf("@"))] = field;
10256
+ }
10257
+ return Object.keys(value).length === 0 ? { kind: "absent" } : {
10258
+ kind: "present",
10259
+ value
10260
+ };
10261
+ },
10262
+ async mergeNode(nodeId, patch) {
10263
+ if (nodeId === "") throw new Error("node settings: an empty node id names every node");
10264
+ const scoped = {};
10265
+ for (const [key, value] of Object.entries(patch)) {
10266
+ if (key.includes("@")) throw new Error(`node settings: "${key}" is already scoped`);
10267
+ scoped[`${key}@${nodeId}`] = value;
10268
+ }
10269
+ return store.merge(scoped);
10217
10270
  }
10218
10271
  };
10272
+ return store;
10219
10273
  }
10220
10274
  //#endregion
10221
10275
  //#region src/kernel/system-settings-policy.ts
@@ -10368,6 +10422,35 @@ async function readDeviceOrThrow(store, deviceId) {
10368
10422
  }
10369
10423
  }
10370
10424
  //#endregion
10425
+ //#region src/kernel/device-settings-resolver.ts
10426
+ /**
10427
+ * The ONE fleet-default resolver (D986 point 3), shared by hub-main's settings view and the forked
10428
+ * runner's, over the same two stores both already use (D870):
10429
+ *
10430
+ * device row (`addon-device-settings`) -> fleet-default row (`addon-settings`) -> schema default
10431
+ *
10432
+ * `readDeviceStore` keeps returning the device's RAW overrides; this is a separate, additive read
10433
+ * that says, per field, the value AND where it came from (`device` | `fleet-default` |
10434
+ * `schema-default`), so a device form can mark an inherited field and offer Reset. Reset is "delete
10435
+ * the device row" (`writeDeviceStore(id, { field: undefined })`): an override equal to the default
10436
+ * stays an override.
10437
+ *
10438
+ * Both layers are read THREE-way: a store that did not answer THROWS. Falling back to the schema
10439
+ * default on a failed read would show, and let a caller act on, a value nobody chose (D49).
10440
+ */
10441
+ function createDeviceSettingsResolver(door, addonId) {
10442
+ const deviceStore = createDeviceSettingsStore(door, addonId);
10443
+ return { async resolve(deviceId, schemaDefaults) {
10444
+ const [fleet, deviceOverrides] = await Promise.all([readUnscopedAddonSettings(door, addonId), readDeviceOrThrow(deviceStore, deviceId)]);
10445
+ if (fleet.kind === "unreadable") throw new Error(`fleet defaults of "${addonId}" could not be read: ${fleet.error}`);
10446
+ return resolveDeviceSettings({
10447
+ schemaDefaults,
10448
+ fleetDefaults: fleet.kind === "present" ? fleet.value : {},
10449
+ deviceOverrides
10450
+ });
10451
+ } };
10452
+ }
10453
+ //#endregion
10371
10454
  //#region src/kernel/settings-door-view.ts
10372
10455
  /**
10373
10456
  * Every `system-settings` row under `prefix`, keyed by the suffix — or a throw.
@@ -10479,16 +10562,6 @@ function createRunnerAddonSettings(client, addonId) {
10479
10562
  }
10480
10563
  //#endregion
10481
10564
  //#region src/kernel/moleculer/runner-device-settings.ts
10482
- /**
10483
- * The forked runner's `ctx.settings` device methods (D870).
10484
- *
10485
- * A runner does not hold the settings door; it holds a tRPC client of the hub's
10486
- * `settings-store` cap. This file adapts that client to the door slice the
10487
- * per-device store needs and hands back the five view methods — the SAME module
10488
- * hub-main's view uses, so a device's settings are one set of rows whichever
10489
- * process asks. Before D870 the runner kept its own `<addonId>:addon-devices`
10490
- * blob per device; a hub-side write to the rows was invisible to it.
10491
- */
10492
10565
  /** The door slice the per-device store needs, over a tRPC client. */
10493
10566
  function doorOverClient(client) {
10494
10567
  return {
@@ -10509,15 +10582,19 @@ function createRunnerDeviceSettings(client, addonId) {
10509
10582
  };
10510
10583
  return {
10511
10584
  readDeviceStore: async () => refuse(),
10585
+ readResolvedDeviceStore: async () => refuse(),
10512
10586
  readDeviceStoreBatch: async () => refuse(),
10513
10587
  listDeviceStoreIds: async () => refuse(),
10514
10588
  writeDeviceStore: async () => refuse(),
10515
10589
  clearDeviceStore: async () => refuse()
10516
10590
  };
10517
10591
  }
10518
- const store = createDeviceSettingsStore(doorOverClient(client), addonId);
10592
+ const door = doorOverClient(client);
10593
+ const store = createDeviceSettingsStore(door, addonId);
10594
+ const resolver = createDeviceSettingsResolver(door, addonId);
10519
10595
  return {
10520
10596
  readDeviceStore: (deviceId) => readDeviceOrThrow(store, deviceId),
10597
+ readResolvedDeviceStore: (deviceId, schemaDefaults) => resolver.resolve(deviceId, schemaDefaults),
10521
10598
  readDeviceStoreBatch: (ids) => store.readBatch(ids),
10522
10599
  listDeviceStoreIds: () => store.listIds(),
10523
10600
  writeDeviceStore: (deviceId, patch) => store.merge(deviceId, patch),
@@ -1,4 +1,4 @@
1
- import { is as defineRecordKinds } from "./dist-DcHvuBfD.mjs";
1
+ import { is as defineRecordKinds } from "./dist-CnC8-kF6.mjs";
2
2
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
3
3
  import { z } from "zod";
4
4
  import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-CwYYyGAB.js");
2
+ const require_dist = require("./dist-B4r3_aYb.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
4
  let zod = require("zod");
5
5
  let node_crypto = require("node:crypto");
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ks as errMsg, do as BaseAddon, in as addonPagesCapability, qs as EventCategory } from "../../dist-DcHvuBfD.mjs";
1
+ import { Js as EventCategory, do as BaseAddon, in as addonPagesCapability, qs as errMsg } from "../../dist-CnC8-kF6.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Ks as errMsg, do as BaseAddon, on as addonWidgetsCapability, qs as EventCategory } from "../../dist-DcHvuBfD.mjs";
1
+ import { Js as EventCategory, do as BaseAddon, on as addonWidgetsCapability, qs as errMsg } from "../../dist-CnC8-kF6.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  //#region src/builtins/alerts/alert-episode-policy.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { Ks as errMsg, Or as isAlertEpisodeOpen, cn as alertEpisodePayload, d as AlertSchema, do as BaseAddon, is as defineRecordKinds, kr as isAlertEpisodeSeverity, ln as alertsCapability, qs as EventCategory, sn as alertEpisodeId, ts as createEvent } from "../../dist-DcHvuBfD.mjs";
1
+ import { Js as EventCategory, Or as isAlertEpisodeOpen, cn as alertEpisodePayload, d as AlertSchema, do as BaseAddon, is as defineRecordKinds, kr as isAlertEpisodeSeverity, ln as alertsCapability, qs as errMsg, sn as alertEpisodeId, ts as createEvent } from "../../dist-CnC8-kF6.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  //#region src/builtins/alerts/alert-episode-policy.ts
4
4
  /**
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  //#region src/builtins/autotrack/autotrack-config.ts
8
8
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
9
9
  deadZoneFraction: .5,
@@ -1,4 +1,4 @@
1
- import { Ks as errMsg, do as BaseAddon, hs as isEvent, ki as ptzAutotrackCapability, mn as bareAddonId, qs as EventCategory, tt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-DcHvuBfD.mjs";
1
+ import { Js as EventCategory, do as BaseAddon, hs as isEvent, ki as ptzAutotrackCapability, mn as bareAddonId, qs as errMsg, tt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-CnC8-kF6.mjs";
2
2
  //#region src/builtins/autotrack/autotrack-config.ts
3
3
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
4
4
  deadZoneFraction: .5,
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_restore_archive = require("../../restore-archive-xTqhDFkW.js");
8
+ const require_restore_archive = require("../../restore-archive-BEUIhG8U.js");
9
9
  let node_crypto = require("node:crypto");
10
10
  let node_fs_promises = require("node:fs/promises");
11
11
  node_fs_promises = require_chunk.__toESM(node_fs_promises);
@@ -1,6 +1,6 @@
1
- import { Rs as toNodeId, do as BaseAddon, ei as mayWriteToLocation, fa as storageOccupancyCapability, pn as backupCapability, qs as EventCategory, ws as nodePin } from "../../dist-DcHvuBfD.mjs";
1
+ import { Js as EventCategory, Ts as nodePin, do as BaseAddon, ei as mayWriteToLocation, fa as storageOccupancyCapability, pn as backupCapability, zs as toNodeId } from "../../dist-CnC8-kF6.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-BGK6EnYj.mjs";
3
+ import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-Dx9F-3zV.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import * as fsp from "node:fs/promises";
6
6
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let zod = require("zod");
9
9
  //#region src/builtins/calendars/calendar-color.ts
@@ -1,4 +1,4 @@
1
- import { Sn as calendarsCapability, T as CalendarPreferencesSchema, do as BaseAddon, is as defineRecordKinds } from "../../dist-DcHvuBfD.mjs";
1
+ import { Sn as calendarsCapability, T as CalendarPreferencesSchema, do as BaseAddon, is as defineRecordKinds } from "../../dist-CnC8-kF6.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/builtins/calendars/calendar-color.ts
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  let zod = require("zod");
8
8
  let _camstack_types_node = require("@camstack/types/node");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Cn as cameraGridLayoutCapability, Gs as DeviceType, K as DeclaredDevices, Kn as declarationOwnerNodeId, Ks as errMsg, L as DERIVED_CAMERA_SILENCED_CAP_NAMES, St as MOTION_CLOSE_AFTER_MS, Us as DeviceFeature, Va as buildFfmpegArgs, do as BaseAddon, fs as hydrateSchema, m as BaseDevice, ma as streamCatalogCapability, ni as memoizePinnedFfmpeg, qs as EventCategory, sa as snapshotCapability, si as motionCapability, ts as createEvent } from "../../dist-DcHvuBfD.mjs";
1
+ import { Cn as cameraGridLayoutCapability, Js as EventCategory, K as DeclaredDevices, Kn as declarationOwnerNodeId, Ks as DeviceType, L as DERIVED_CAMERA_SILENCED_CAP_NAMES, St as MOTION_CLOSE_AFTER_MS, Va as buildFfmpegArgs, Ws as DeviceFeature, do as BaseAddon, fs as hydrateSchema, m as BaseDevice, ma as streamCatalogCapability, ni as memoizePinnedFfmpeg, qs as errMsg, sa as snapshotCapability, si as motionCapability, ts as createEvent } from "../../dist-CnC8-kF6.mjs";
2
2
  import { z } from "zod";
3
3
  import { FfmpegProcess } from "@camstack/types/node";
4
4
  import { join } from "node:path";
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
7
- const require_composition_sources = require("../../composition-sources-j_bFq7Tx.js");
8
- const require_retention = require("../../retention-gQ3GIUA3.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
+ const require_composition_sources = require("../../composition-sources-BV9n2ivT.js");
8
+ const require_retention = require("../../retention-nNCAON-6.js");
9
9
  let zod = require("zod");
10
10
  //#region src/builtins/composer/actuator-invoke.ts
11
11
  /**
@@ -1,6 +1,6 @@
1
- import { Ba as MINUTE_MS, Bn as coverCapability, Ea as valveCapability, Fa as DAY_MS, Ga as compositionFeatureEnabled, Gs as DeviceType, Ha as cloneStatefulExpressionMemory, Ia as DEFAULT_HISTORY_RETENTION, Ja as compositionSourceKey, Jr as lockControlCapability, K as DeclaredDevices, Ka as compositionItemFieldPath, Ks as errMsg, La as HISTORY_FAST_MS, Mn as composerCapability, Nn as compositionFieldKey, Pa as COMPOSER_ADDON_ID, Qa as evaluateStatistic, Ra as HISTORY_SLOW_MS, Si as planComposition, Tr as groupTemplate, Ua as composedDeviceRef, Wa as composedDeviceStableId, Wi as resolveMutate, Xa as disarmRoseMemory, Ya as createStatefulExpressionMemory, Za as evaluateDerivative, _a as switchCapability, _s as isReadingQuantity, ao as openStatistic, b as COMPOSED_ITEM_FIXED_FIELDS, co as statisticCadenceMs, do as BaseAddon, eo as integrateReading, ft as HvacModeSchema, gn as brightnessCapability, gr as fanOutTargets, hr as fanControlCapability, io as openReset, jn as colorCapability, kn as climateControlCapability, lo as toExpressionValue, lr as evaluateCompositionField, m as BaseDevice, n as ACTUATOR_METHODS, na as sharedActuatorMethods, no as isHistoryHelper, o as ALL_CAPABILITY_DEFINITIONS, oo as planResetTier, pr as expressionContainsBuiltinCall, qa as compositionSliceKey, qi as runFanOut, qn as declaredSeriesKind, qs as EventCategory, r as ACTUATOR_TEMPLATE_IDS, ra as sharedColorModes, ri as methodRefusal, ro as nextLocalMidnight, rt as FanDirectionSchema, si as motionCapability, so as planStatisticTier, st as GroupCommandResultSchema, ta as sharedActuatorFeatures, ti as mediaPlayerCapability, to as isForwardInputRef, ts as createEvent, vn as buildCapabilityLookup, vr as featureForwards, wr as groupCommandsCapability, yi as parseColorInput, za as HOUR_MS, zr as kebabToCamel } from "../../dist-DcHvuBfD.mjs";
2
- import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-Dnyu7-1p.mjs";
3
- import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-CXu8PB2L.mjs";
1
+ import { Ba as MINUTE_MS, Bn as coverCapability, Ea as valveCapability, Fa as DAY_MS, Ga as compositionFeatureEnabled, Ha as cloneStatefulExpressionMemory, Ia as DEFAULT_HISTORY_RETENTION, Ja as compositionSourceKey, Jr as lockControlCapability, Js as EventCategory, K as DeclaredDevices, Ka as compositionItemFieldPath, Ks as DeviceType, La as HISTORY_FAST_MS, Mn as composerCapability, Nn as compositionFieldKey, Pa as COMPOSER_ADDON_ID, Qa as evaluateStatistic, Ra as HISTORY_SLOW_MS, Si as planComposition, Tr as groupTemplate, Ua as composedDeviceRef, Wa as composedDeviceStableId, Wi as resolveMutate, Xa as disarmRoseMemory, Ya as createStatefulExpressionMemory, Za as evaluateDerivative, _a as switchCapability, _s as isReadingQuantity, ao as openStatistic, b as COMPOSED_ITEM_FIXED_FIELDS, co as statisticCadenceMs, do as BaseAddon, eo as integrateReading, ft as HvacModeSchema, gn as brightnessCapability, gr as fanOutTargets, hr as fanControlCapability, io as openReset, jn as colorCapability, kn as climateControlCapability, lo as toExpressionValue, lr as evaluateCompositionField, m as BaseDevice, n as ACTUATOR_METHODS, na as sharedActuatorMethods, no as isHistoryHelper, o as ALL_CAPABILITY_DEFINITIONS, oo as planResetTier, pr as expressionContainsBuiltinCall, qa as compositionSliceKey, qi as runFanOut, qn as declaredSeriesKind, qs as errMsg, r as ACTUATOR_TEMPLATE_IDS, ra as sharedColorModes, ri as methodRefusal, ro as nextLocalMidnight, rt as FanDirectionSchema, si as motionCapability, so as planStatisticTier, st as GroupCommandResultSchema, ta as sharedActuatorFeatures, ti as mediaPlayerCapability, to as isForwardInputRef, ts as createEvent, vn as buildCapabilityLookup, vr as featureForwards, wr as groupCommandsCapability, yi as parseColorInput, za as HOUR_MS, zr as kebabToCamel } from "../../dist-CnC8-kF6.mjs";
2
+ import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-CI2tZzAo.mjs";
3
+ import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-fsBjIfxP.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/builtins/composer/actuator-invoke.ts
6
6
  /**
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-CwYYyGAB.js");
6
+ const require_dist = require("../../dist-B4r3_aYb.js");
7
7
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
8
  //#region src/builtins/console-logging/console-destination.ts
9
9
  var LEVEL_RANK = {