@camstack/system 1.2.461 → 1.2.463

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 (104) hide show
  1. package/dist/addon-runner.js +21 -276
  2. package/dist/addon-runner.mjs +21 -276
  3. package/dist/{agent-https-Iw3RSQup.mjs → agent-https-B9gbXoJI.mjs} +1 -1
  4. package/dist/{agent-https-Dnr_nIVx.js → agent-https-DhFIbEwN.js} +1 -1
  5. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/dist/builtins/autotrack/index.js +1 -1
  12. package/dist/builtins/autotrack/index.mjs +1 -1
  13. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.d.ts +1 -3
  14. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +51 -502
  15. package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +51 -502
  16. package/dist/builtins/backup-orchestrator/destination-policy.d.ts +5 -21
  17. package/dist/builtins/backup-orchestrator/record-kinds.d.ts +0 -2
  18. package/dist/builtins/backup-orchestrator/schedule-store.d.ts +5 -13
  19. package/dist/builtins/backup-orchestrator/seed-marker-store.d.ts +9 -19
  20. package/dist/builtins/calendars/calendars.addon.js +1 -1
  21. package/dist/builtins/calendars/calendars.addon.mjs +1 -1
  22. package/dist/builtins/camera-grid/index.js +1 -1
  23. package/dist/builtins/camera-grid/index.mjs +1 -1
  24. package/dist/builtins/cluster-agent/record-kinds.d.ts +0 -1
  25. package/dist/builtins/composer/composer.addon.js +2 -2
  26. package/dist/builtins/composer/composer.addon.mjs +2 -2
  27. package/dist/builtins/console-logging/index.js +1 -1
  28. package/dist/builtins/console-logging/index.mjs +1 -1
  29. package/dist/builtins/core-blocks/core-blocks.addon.js +2 -2
  30. package/dist/builtins/core-blocks/core-blocks.addon.mjs +2 -2
  31. package/dist/builtins/device-history/device-history.addon.js +1 -1
  32. package/dist/builtins/device-history/device-history.addon.mjs +1 -1
  33. package/dist/builtins/device-manager/device-manager.addon.js +2 -2
  34. package/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  35. package/dist/builtins/hub-forwarder/index.js +1 -1
  36. package/dist/builtins/hub-forwarder/index.mjs +1 -1
  37. package/dist/builtins/keychain/index.js +3 -3
  38. package/dist/builtins/keychain/index.mjs +3 -3
  39. package/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  40. package/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  41. package/dist/builtins/local-auth/auth-schema.d.ts +2 -12
  42. package/dist/builtins/local-auth/local-auth.addon.js +52 -191
  43. package/dist/builtins/local-auth/local-auth.addon.mjs +52 -191
  44. package/dist/builtins/local-auth/oauth-session-manager.d.ts +13 -4
  45. package/dist/builtins/local-auth/record-kinds.d.ts +1 -1
  46. package/dist/builtins/local-network/local-network.addon.js +2 -2
  47. package/dist/builtins/local-network/local-network.addon.mjs +2 -2
  48. package/dist/builtins/loki-logging/index.js +1 -1
  49. package/dist/builtins/loki-logging/index.mjs +1 -1
  50. package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  51. package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  52. package/dist/builtins/platform-probe/index.js +1 -1
  53. package/dist/builtins/platform-probe/index.mjs +1 -1
  54. package/dist/builtins/record-entries/index.js +1 -1
  55. package/dist/builtins/record-entries/index.mjs +1 -1
  56. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  57. package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  58. package/dist/builtins/snapshot/index.js +1 -1
  59. package/dist/builtins/snapshot/index.mjs +1 -1
  60. package/dist/builtins/sqlite-storage/file-host-protocol.d.ts +0 -9
  61. package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  62. package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  63. package/dist/builtins/sqlite-storage/index.js +1 -1
  64. package/dist/builtins/sqlite-storage/index.mjs +1 -1
  65. package/dist/builtins/sqlite-storage/owned-sqlite-file.d.ts +0 -8
  66. package/dist/builtins/sqlite-storage/records/records-sql.d.ts +0 -2
  67. package/dist/builtins/sqlite-storage/sqlite-settings-backend.d.ts +0 -28
  68. package/dist/builtins/sqlite-storage/sqlite-settings.addon.d.ts +1 -2
  69. package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +6 -170
  70. package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +6 -170
  71. package/dist/builtins/sqlite-storage/storage-admin-provider.d.ts +3 -17
  72. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  73. package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  74. package/dist/builtins/system-config/system-config.addon.js +3 -3
  75. package/dist/builtins/system-config/system-config.addon.mjs +3 -3
  76. package/dist/builtins/winston-logging/index.js +1 -1
  77. package/dist/builtins/winston-logging/index.mjs +1 -1
  78. package/dist/{composition-sources-DNRZWR1j.mjs → composition-sources-CGtooHSL.mjs} +1 -1
  79. package/dist/{composition-sources-b0e_2I-D.js → composition-sources-oXvmbMHX.js} +1 -1
  80. package/dist/{constants-6OeJiZgi.js → constants-5mrGZxwS.js} +1 -1
  81. package/dist/{constants-BnkOdj9Q.mjs → constants-CdutnpL9.mjs} +1 -1
  82. package/dist/{device-ca-CPTDs--d.js → device-ca-B3xUzps7.js} +1 -1
  83. package/dist/{device-ca-Bnkw8GyU.mjs → device-ca-DZHKlZlD.mjs} +1 -1
  84. package/dist/{dist-Wy8cTxg6.mjs → dist-C2OBCa-A.mjs} +40 -80
  85. package/dist/{dist-Bn-RNanh.js → dist-D9aw_d0G.js} +39 -91
  86. package/dist/file-host-worker.js +1 -1
  87. package/dist/file-host-worker.mjs +1 -1
  88. package/dist/{hub-mdns-ciao-CJu0nhla.mjs → hub-mdns-ciao-Bm09NrMS.mjs} +2 -2
  89. package/dist/{hub-mdns-ciao-CTBTlia4.js → hub-mdns-ciao-CFlhVKK6.js} +2 -2
  90. package/dist/index.d.ts +1 -1
  91. package/dist/index.js +88 -240
  92. package/dist/index.mjs +89 -236
  93. package/dist/kernel/index.d.ts +0 -1
  94. package/dist/kernel/moleculer/runner-addon-settings.d.ts +1 -6
  95. package/dist/kernel/moleculer/runner-device-settings.d.ts +2 -2
  96. package/dist/{restore-archive-DM1OBYq4.js → restore-archive-6zkRREHO.js} +1 -1
  97. package/dist/{restore-archive-CM23Pq9B.mjs → restore-archive-CSOR_tyN.mjs} +1 -1
  98. package/dist/{retired-settings-keys-D_VwZiDt.js → retired-settings-keys-CGUqX-Oz.js} +0 -6
  99. package/dist/{retired-settings-keys-Bhwe4ymb.mjs → retired-settings-keys-C_Kjp-Bj.mjs} +1 -1
  100. package/dist/{wal-maintenance-Bj_MmDkr.mjs → wal-maintenance-Dg6IzSgz.mjs} +0 -0
  101. package/dist/{wal-maintenance-CaJjuLHq.js → wal-maintenance-jXcOxm2T.js} +0 -0
  102. package/package.json +1 -1
  103. package/dist/builtins/sqlite-storage/retired-collections.d.ts +0 -146
  104. package/dist/kernel/legacy-blob-guard.d.ts +0 -63
@@ -80,7 +80,7 @@ function refusalReportOf(addonId, err) {
80
80
  }
81
81
  //#endregion
82
82
  //#region src/kernel/addon-class-resolver.ts
83
- function isRecord$5(value) {
83
+ function isRecord$4(value) {
84
84
  return typeof value === "object" && value !== null && !Array.isArray(value);
85
85
  }
86
86
  /**
@@ -104,14 +104,14 @@ function isRecord$5(value) {
104
104
  function isAddonConstructor(fn) {
105
105
  if (typeof fn !== "function") return false;
106
106
  const proto = fn.prototype;
107
- if (!isRecord$5(proto)) return false;
107
+ if (!isRecord$4(proto)) return false;
108
108
  return typeof proto["initialize"] === "function";
109
109
  }
110
110
  function resolveAddonClass(mod) {
111
111
  let candidate = mod["default"];
112
- if (isRecord$5(candidate) && "default" in candidate) candidate = candidate["default"];
112
+ if (isRecord$4(candidate) && "default" in candidate) candidate = candidate["default"];
113
113
  if (isAddonConstructor(candidate)) return candidate;
114
- if (isRecord$5(candidate)) {
114
+ if (isRecord$4(candidate)) {
115
115
  const fn = Object.values(candidate).find(isAddonConstructor);
116
116
  if (fn) return fn;
117
117
  }
@@ -5514,7 +5514,7 @@ var RuntimeStateLoadError = class extends Error {
5514
5514
  this.name = "RuntimeStateLoadError";
5515
5515
  }
5516
5516
  };
5517
- function isRecord$4(value) {
5517
+ function isRecord$3(value) {
5518
5518
  return typeof value === "object" && value !== null && !Array.isArray(value);
5519
5519
  }
5520
5520
  function errorMessage(err) {
@@ -5545,7 +5545,7 @@ async function loadRuntimeStateOrRefuse(load, logger, target) {
5545
5545
  } catch (err) {
5546
5546
  return refuse(errorMessage(err), err);
5547
5547
  }
5548
- if (!isRecord$4(answer)) return refuse(`answered ${answer === null ? "null" : typeof answer}`);
5548
+ if (!isRecord$3(answer)) return refuse(`answered ${answer === null ? "null" : typeof answer}`);
5549
5549
  return answer;
5550
5550
  }
5551
5551
  //#endregion
@@ -9668,11 +9668,11 @@ function prefixRange(prefix) {
9668
9668
  }
9669
9669
  //#endregion
9670
9670
  //#region src/kernel/prefix-walk.ts
9671
- function isRecord$3(value) {
9671
+ function isRecord$2(value) {
9672
9672
  return typeof value === "object" && value !== null && !Array.isArray(value);
9673
9673
  }
9674
9674
  function unwrapStoredValue(parsed) {
9675
- if (!isRecord$3(parsed) || !("value" in parsed)) return parsed;
9675
+ if (!isRecord$2(parsed) || !("value" in parsed)) return parsed;
9676
9676
  return parsed.value;
9677
9677
  }
9678
9678
  /**
@@ -10017,7 +10017,7 @@ function createSectionsStore(door) {
10017
10017
  //#endregion
10018
10018
  //#region src/kernel/moleculer/runner-addon-settings.ts
10019
10019
  /** @param client the hub's `settingsStore` client; `undefined` makes every call THROW. */
10020
- function createRunnerAddonSettings(client, addonId, before = async () => {}) {
10020
+ function createRunnerAddonSettings(client, addonId) {
10021
10021
  if (client === void 0) {
10022
10022
  const refuse = async () => {
10023
10023
  throw new Error(`settings of "${addonId}": settings store not wired`);
@@ -10039,22 +10039,10 @@ function createRunnerAddonSettings(client, addonId, before = async () => {}) {
10039
10039
  };
10040
10040
  }
10041
10041
  const door = {
10042
- query: async (input) => {
10043
- await before();
10044
- return client.query.query(input);
10045
- },
10046
- get: async (input) => {
10047
- await before();
10048
- return client.get.query(input);
10049
- },
10050
- set: async (input) => {
10051
- await before();
10052
- return client.set.mutate(input);
10053
- },
10054
- transact: async (input) => {
10055
- await before();
10056
- return client.transact.mutate(input);
10057
- }
10042
+ query: (input) => client.query.query(input),
10043
+ get: (input) => client.get.query(input),
10044
+ set: (input) => client.set.mutate(input),
10045
+ transact: (input) => client.transact.mutate(input)
10058
10046
  };
10059
10047
  const store = createAddonSettingsStore(door, addonId);
10060
10048
  const sections = createSectionsStore(door);
@@ -10095,226 +10083,6 @@ function createRunnerAddonSettings(client, addonId, before = async () => {}) {
10095
10083
  };
10096
10084
  }
10097
10085
  //#endregion
10098
- //#region src/builtins/sqlite-storage/retired-settings-keys.ts
10099
- /**
10100
- * The dead keys, per row.
10101
- *
10102
- * ## Addressing these rows
10103
- *
10104
- * Every namespace below is a FORKED addon, whose `ctx.settings` comes from
10105
- * `addon-context-factory` and writes `<addonId>:addon-settings` row `root`. The
10106
- * scoped table is therefore the right target — unlike the hub builtin whose
10107
- * mis-addressed spec is dissected at {@link RetiredRowSpec}. Confirmed per
10108
- * namespace against `packages/<pkg>/package.json`'s manifest `id`.
10109
- *
10110
- * ## `keys` vs `perNodeKeys` is a data-loss decision, not a style choice
10111
- *
10112
- * `perNodeKeys` matches `<key>` AND `<key>@<nodeId>`. That is right for a key
10113
- * whose per-node copies are all dead (the engine cascade, the decoder
10114
- * `backend`). It is WRONG for `probedBestHwaccel` / `probedBestAudioBackend`,
10115
- * where the bare key is unreachable residue but every `@<nodeId>` copy is the
10116
- * node's live probe result — those go under `keys`, which is exact-match.
10117
- *
10118
- * `detection-pipeline` / `addon-settings` / `root` — every key in this row is
10119
- * dead; the row itself is kept because the addon writes a live key into it
10120
- * (`videoPipelineSteps`). `pipelineTemplates` is no longer read or written
10121
- * (templates were removed, D759) and is deliberately NOT listed here: stored
10122
- * template rows are left exactly as they are.
10123
- *
10124
- * - `pipelineSteps` / `pipelineEngine`: the persisted GLOBAL step + engine
10125
- * seed. Removed with `getGlobalSteps` becoming pure — dispatch builds steps
10126
- * from the orchestrator's `agentSettings` plus per-camera overrides, and
10127
- * never consulted the seed. See `addon-pipeline/src/detection-pipeline/provider.ts`.
10128
- * - `engineRuntime` / `engineBackend` / `engineDevice` / `probedBestEngine`:
10129
- * the per-node engine CASCADE, removed with the operator-facing engine
10130
- * election. Each node now runs a device-array of inference pools balanced
10131
- * per session, and the node-default pool derives live from the node's own
10132
- * hardware (`resolveAutoEngine`). See
10133
- * `addon-pipeline/src/detection-pipeline/engine-store-keys.ts`.
10134
- */
10135
- var RETIRED_SETTINGS_KEYS = [
10136
- {
10137
- namespace: "detection-pipeline",
10138
- collection: "addon-settings",
10139
- row: "root",
10140
- keys: ["pipelineSteps", "pipelineEngine"],
10141
- perNodeKeys: [
10142
- "engineRuntime",
10143
- "engineBackend",
10144
- "engineDevice",
10145
- "probedBestEngine"
10146
- ],
10147
- reason: "global step/engine seed and the per-node engine cascade — both removed; the live per-camera dispatch path never read either"
10148
- },
10149
- {
10150
- namespace: "pipeline-orchestrator",
10151
- collection: "addon-settings",
10152
- row: "root",
10153
- keys: [
10154
- "enabledNodes",
10155
- "enabledDecoderNodes",
10156
- "enabledAudioNodes",
10157
- "remoteSourcingNodes",
10158
- "nativeLeaseTtlMs"
10159
- ],
10160
- perNodeKeys: ["backend"],
10161
- reason: "the pre-singleton \"enabled nodes\" role model (node capability now lives per node in agent-settings and is derived by NodeTopology.refresh, never read from this row), `nativeLeaseTtlMs` superseded by `nativeLeaseActivityMs`, and the decoder `backend` selector whose resolver returns DEFAULT_DECODER_BACKEND unconditionally (decoder-backend.ts)"
10162
- },
10163
- {
10164
- namespace: "stream-broker",
10165
- collection: "addon-settings",
10166
- row: "root",
10167
- keys: [
10168
- "maxDecodeFps",
10169
- "initialReconnectDelayMs",
10170
- "maxReconnectDelayMs"
10171
- ],
10172
- perNodeKeys: [],
10173
- reason: "three form knobs deleted 2026-08-28 (D272): nothing capped decode fps, and the reconnect ladder has always run on the INITIAL/MAX_RECONNECT_DELAY_MS constants"
10174
- },
10175
- {
10176
- namespace: "embedding-encoder",
10177
- collection: "addon-settings",
10178
- row: "root",
10179
- keys: ["runtime", "backend"],
10180
- perNodeKeys: [],
10181
- reason: "two selects deleted 2026-08-28 (D272); their only reference was a withTags log field, and the CUDA/CoreML options named acceleration that has never existed — embedding inference is always ONNX in the embedded Python"
10182
- },
10183
- {
10184
- namespace: "audio-analyzer",
10185
- collection: "addon-settings",
10186
- row: "root",
10187
- keys: ["selectedAudioModel", "probedBestAudioBackend"],
10188
- perNodeKeys: [],
10189
- reason: "`selectedAudioModel` deleted 2026-08-28 (D272) — createAudioPipeline takes a backend and no model id, so it never reached inference; the BARE `probedBestAudioBackend` is pre-perNode residue that projectStore already drops (no bare fallback), so no node can ever read it"
10190
- },
10191
- {
10192
- namespace: "decoder-nodeav",
10193
- collection: "addon-settings",
10194
- row: "root",
10195
- keys: ["probedBestHwaccel"],
10196
- perNodeKeys: [],
10197
- reason: "bare pre-perNode residue — the live probe result is `probedBestHwaccel@<nodeId>` and `projectStore` deliberately drops the bare key, so nothing can read it"
10198
- },
10199
- {
10200
- namespace: "pipeline-analytics",
10201
- collection: "addon-settings",
10202
- row: "root",
10203
- keys: ["mediaAttachPolicy"],
10204
- perNodeKeys: [],
10205
- reason: "deleted 2026-08-28 (D272) — absent from MediaSettingsSchema, so the value was never even resolved, let alone read"
10206
- }
10207
- ];
10208
- //#endregion
10209
- //#region src/kernel/legacy-blob-guard.ts
10210
- /** Root keys retired long before D870: they never count as "settings still to migrate". */
10211
- var OWN_RETIRED_ROOT_KEYS = new Set([
10212
- "recordingConfigs",
10213
- "recordingExports",
10214
- "recordingOpsLog",
10215
- "probeSnapshots",
10216
- "rtspTokens",
10217
- "profileMap"
10218
- ]);
10219
- /** Is `key` of `addonId` a root key that was retired (and must not be migrated)? */
10220
- function isRetiredRootKey(addonId, key) {
10221
- if (OWN_RETIRED_ROOT_KEYS.has(key)) return true;
10222
- return RETIRED_SETTINGS_KEYS.some((spec) => spec.namespace === addonId && (spec.keys.includes(key) || spec.perNodeKeys.some((k) => key === k || key.startsWith(`${k}@`))));
10223
- }
10224
- /** Stable `code` of the D870 refusal. */
10225
- var UNMIGRATED_SETTINGS_CODE = "unmigrated-settings";
10226
- /** The remedy the refusal (and the update pre-flight) names. */
10227
- var UNMIGRATED_SETTINGS_REMEDY = "Run scripts/hub/migrate-device-store.ts --copy --apply (D870), then restart the addon.";
10228
- var UnmigratedSettingsError = class extends AddonRefusedError {
10229
- constructor(addonId, what) {
10230
- super(UNMIGRATED_SETTINGS_CODE, `addon "${addonId}" refuses to start: ${what} - the settings it had are still in the per-addon tables and the standard store holds none. Run scripts/hub/migrate-device-store.ts --copy --apply (D870) before starting it.`, UNMIGRATED_SETTINGS_REMEDY);
10231
- this.name = "UnmigratedSettingsError";
10232
- }
10233
- };
10234
- async function countOf(client, input) {
10235
- const n = await client.count.query(input);
10236
- if (typeof n !== "number") throw new Error("settings store answered a non-number to a count");
10237
- return n;
10238
- }
10239
- var LEGACY_PAGE = 500;
10240
- var LEGACY_PAGE_BUDGET = 200;
10241
- var ID_TAIL = "";
10242
- function isRecord$2(value) {
10243
- return typeof value === "object" && value !== null && !Array.isArray(value);
10244
- }
10245
- /**
10246
- * Does the addon's per-device blob table hold a row the copy would actually
10247
- * migrate - a positive numeric id with a non-empty record? An addon whose rows
10248
- * the copy skips anyway must not be refused for them.
10249
- */
10250
- async function hasMigratableDeviceRow(client, addonId) {
10251
- let cursor = "";
10252
- for (let page = 0; page < LEGACY_PAGE_BUDGET; page++) {
10253
- const rows = await client.query.query({
10254
- namespace: addonId,
10255
- collection: "addon-devices",
10256
- filter: {
10257
- whereBetween: { id: [cursor, ID_TAIL] },
10258
- orderBy: {
10259
- field: "id",
10260
- direction: "asc"
10261
- },
10262
- limit: LEGACY_PAGE
10263
- }
10264
- });
10265
- if (!Array.isArray(rows)) throw new Error("settings store answered a non-list to a query");
10266
- let lastId = cursor;
10267
- for (const row of rows) {
10268
- if (!isRecord$2(row) || typeof row["id"] !== "string") continue;
10269
- lastId = row["id"];
10270
- const id = Number(row["id"]);
10271
- const data = row["data"];
10272
- if (Number.isInteger(id) && id > 0 && isRecord$2(data) && Object.keys(data).length > 0) return true;
10273
- }
10274
- if (rows.length < LEGACY_PAGE || lastId === cursor) return false;
10275
- cursor = lastId;
10276
- }
10277
- throw new Error(`addon "${addonId}": more legacy blob pages than the guard will read`);
10278
- }
10279
- /**
10280
- * THROWS when the addon has blob settings and the standard store has none of
10281
- * its own. A store that cannot be asked also throws: it is not "no blobs".
10282
- */
10283
- async function assertLegacyBlobsMigrated(client, addonId, logger) {
10284
- const legacyDevices = await hasMigratableDeviceRow(client, addonId);
10285
- const root = await client.get.query({
10286
- namespace: addonId,
10287
- collection: "addon-settings",
10288
- key: "root"
10289
- });
10290
- const legacySettings = isRecord$2(root) && Object.keys(root).some((key) => !isRetiredRootKey(addonId, key));
10291
- if (!legacyDevices && !legacySettings) return;
10292
- const rangeOf = (prefix) => {
10293
- const range = prefixRange(prefix);
10294
- if (range === null) throw new Error(`no id range for addon "${addonId}"`);
10295
- return { whereBetween: { id: [range.lo, range.hi] } };
10296
- };
10297
- const newDevices = await countOf(client, {
10298
- collection: "addon-device-settings",
10299
- filter: rangeOf(`${addonId}:`)
10300
- });
10301
- const newSettings = await countOf(client, {
10302
- collection: "addon-settings",
10303
- filter: rangeOf(`${addonId}.`)
10304
- });
10305
- const problems = [];
10306
- if (legacyDevices && newDevices === 0) problems.push("per-device blobs");
10307
- if (legacySettings && newSettings === 0) problems.push("an addon settings blob");
10308
- if (problems.length === 0) return;
10309
- const error = new UnmigratedSettingsError(addonId, problems.join(" and "));
10310
- logger.error(error.message, { meta: {
10311
- addonId,
10312
- newDevices,
10313
- newSettings
10314
- } });
10315
- throw error;
10316
- }
10317
- //#endregion
10318
10086
  //#region src/kernel/moleculer/runner-device-settings.ts
10319
10087
  /**
10320
10088
  * The forked runner's `ctx.settings` device methods (D870).
@@ -10327,20 +10095,11 @@ async function assertLegacyBlobsMigrated(client, addonId, logger) {
10327
10095
  * blob per device; a hub-side write to the rows was invisible to it.
10328
10096
  */
10329
10097
  /** The door slice the per-device store needs, over a tRPC client. */
10330
- function doorOverClient(client, before = async () => {}) {
10098
+ function doorOverClient(client) {
10331
10099
  return {
10332
- query: async (input) => {
10333
- await before();
10334
- return client.query.query(input);
10335
- },
10336
- transact: async (input) => {
10337
- await before();
10338
- return client.transact.mutate(input);
10339
- },
10340
- deleteWhere: async (input) => {
10341
- await before();
10342
- return client.deleteWhere.mutate(input);
10343
- }
10100
+ query: (input) => client.query.query(input),
10101
+ transact: (input) => client.transact.mutate(input),
10102
+ deleteWhere: (input) => client.deleteWhere.mutate(input)
10344
10103
  };
10345
10104
  }
10346
10105
  /**
@@ -10348,7 +10107,7 @@ function doorOverClient(client, before = async () => {}) {
10348
10107
  * runner has none — every call then THROWS: a store that could not be asked
10349
10108
  * is not an empty one.
10350
10109
  */
10351
- function createRunnerDeviceSettings(client, addonId, before = async () => {}) {
10110
+ function createRunnerDeviceSettings(client, addonId) {
10352
10111
  if (client === void 0) {
10353
10112
  const refuse = () => {
10354
10113
  throw new Error(`device settings of "${addonId}": settings store not wired`);
@@ -10361,7 +10120,7 @@ function createRunnerDeviceSettings(client, addonId, before = async () => {}) {
10361
10120
  clearDeviceStore: async () => refuse()
10362
10121
  };
10363
10122
  }
10364
- const store = createDeviceSettingsStore(doorOverClient(client, before), addonId);
10123
+ const store = createDeviceSettingsStore(doorOverClient(client), addonId);
10365
10124
  return {
10366
10125
  readDeviceStore: (deviceId) => readDeviceOrThrow(store, deviceId),
10367
10126
  readDeviceStoreBatch: (ids) => store.readBatch(ids),
@@ -10638,23 +10397,9 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
10638
10397
  }
10639
10398
  };
10640
10399
  const deviceSettingsClient = Reflect.get(api, "settingsStore");
10641
- let blobsChecked = null;
10642
- const bootGuard = () => {
10643
- const client = deviceSettingsClient;
10644
- if (client === void 0) return Promise.resolve();
10645
- blobsChecked ??= assertLegacyBlobsMigrated({
10646
- get: { query: (input) => client.get.query(input) },
10647
- query: { query: (input) => client.query.query(input) },
10648
- count: { query: (input) => client.count.query(input) }
10649
- }, addonId, scopedLogger).catch((err) => {
10650
- blobsChecked = null;
10651
- throw err;
10652
- });
10653
- return blobsChecked;
10654
- };
10655
10400
  const settingsView = {
10656
- ...createRunnerAddonSettings(deviceSettingsClient, addonId, bootGuard),
10657
- ...createRunnerDeviceSettings(deviceSettingsClient, addonId, bootGuard),
10401
+ ...createRunnerAddonSettings(deviceSettingsClient, addonId),
10402
+ ...createRunnerDeviceSettings(deviceSettingsClient, addonId),
10658
10403
  async readDeviceRuntimeState(deviceId) {
10659
10404
  return readBlob("device-runtime-state", String(deviceId));
10660
10405
  },
@@ -1,4 +1,4 @@
1
- import { Gi as defineRecordKinds } from "./dist-Wy8cTxg6.mjs";
1
+ import { Ui as defineRecordKinds } from "./dist-C2OBCa-A.mjs";
2
2
  import { S as backdatedNotBefore, _ 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-DK__ETIe.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-Bn-RNanh.js");
2
+ const require_dist = require("./dist-D9aw_d0G.js");
3
3
  const require_x509_es = require("./x509.es-C4cOo48M.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-Bn-RNanh.js");
6
+ const require_dist = require("../../dist-D9aw_d0G.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 { Ta as EventCategory, ni as BaseAddon, ti as errMsg, yt as addonPagesCapability } from "../../dist-Wy8cTxg6.mjs";
1
+ import { $r as errMsg, Ca as EventCategory, _t as addonPagesCapability, ei as BaseAddon } from "../../dist-C2OBCa-A.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-Bn-RNanh.js");
6
+ const require_dist = require("../../dist-D9aw_d0G.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 { Ta as EventCategory, ni as BaseAddon, ti as errMsg, xt as addonWidgetsCapability } from "../../dist-Wy8cTxg6.mjs";
1
+ import { $r as errMsg, Ca as EventCategory, ei as BaseAddon, yt as addonWidgetsCapability } from "../../dist-C2OBCa-A.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-Bn-RNanh.js");
6
+ const require_dist = require("../../dist-D9aw_d0G.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 { Ct as alertEpisodePayload, Gi as defineRecordKinds, Hi as createEvent, Sn as isAlertEpisodeSeverity, St as alertEpisodeId, Ta as EventCategory, i as AlertSchema, ni as BaseAddon, ti as errMsg, wt as alertsCapability, xn as isAlertEpisodeOpen } from "../../dist-Wy8cTxg6.mjs";
1
+ import { $r as errMsg, Bi as createEvent, Ca as EventCategory, St as alertsCapability, Ui as defineRecordKinds, bn as isAlertEpisodeSeverity, bt as alertEpisodeId, ei as BaseAddon, i as AlertSchema, xt as alertEpisodePayload, yn as isAlertEpisodeOpen } from "../../dist-C2OBCa-A.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-Bn-RNanh.js");
6
+ const require_dist = require("../../dist-D9aw_d0G.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 { L as FIRST_LEVEL_MACRO_CLASSES, Ot as bareAddonId, Qi as isEvent, Ta as EventCategory, ni as BaseAddon, rr as ptzAutotrackCapability, ti as errMsg } from "../../dist-Wy8cTxg6.mjs";
1
+ import { $r as errMsg, Ca as EventCategory, Et as bareAddonId, L as FIRST_LEVEL_MACRO_CLASSES, Xi as isEvent, ei as BaseAddon, tr as ptzAutotrackCapability } from "../../dist-C2OBCa-A.mjs";
2
2
  //#region src/builtins/autotrack/autotrack-config.ts
3
3
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
4
4
  deadZoneFraction: .5,
@@ -64,7 +64,7 @@ export declare class BackupOrchestratorAddon extends BaseAddon<Record<string, ne
64
64
  * lazily seeding a default for any `locationId` we haven't seen
65
65
  * before. Idempotent — `ensureDefault` no-ops on already-persisted
66
66
  * rows. Falls back to the in-memory default policy when the policy
67
- * service isn't wired (no settings-store backend available).
67
+ * service isn't wired (no `ctx.records`).
68
68
  */
69
69
  private loadPoliciesIndexed;
70
70
  private fallbackPolicy;
@@ -281,8 +281,6 @@ export declare class BackupOrchestratorAddon extends BaseAddon<Record<string, ne
281
281
  private listSchedules;
282
282
  private upsertSchedule;
283
283
  private deleteSchedule;
284
- private resolveScheduleService;
285
- private resolvePolicyService;
286
284
  /**
287
285
  * Narrow `ctx.api.storage` to the subset the manifest helpers need.
288
286
  * Lets the helpers be unit-tested with a Map-backed fake without