@camstack/addon-provider-dreo 0.2.126 → 0.2.128

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 (3) hide show
  1. package/dist/addon.js +1404 -131
  2. package/dist/addon.mjs +1404 -131
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -36,7 +36,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
36
36
  var __toCommonJS = (mod) => __hasOwnProp.call(mod, "module.exports") ? mod["module.exports"] : __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
37
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
38
38
  //#endregion
39
- //#region ../types/dist/event-category-C4hVnRo8.mjs
39
+ //#region ../types/dist/event-category-BvOFi6PY.mjs
40
40
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
41
41
  EventCategory["SystemBoot"] = "system.boot";
42
42
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -100,6 +100,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
100
100
  * consumes this category and maps it to the `addon-crash-loop` kind.
101
101
  */
102
102
  EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
103
+ /**
104
+ * A runner whose addon refused to start with a typed reason (D877) - parked
105
+ * in `refused`, never counted by the crash breaker, retried on operator
106
+ * action. One event per refusal.
107
+ */
108
+ EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
109
+ /**
110
+ * A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
111
+ * `refused`. In-process telemetry for the boot check (re-evaluate while any
112
+ * runner is still pending) and the alert centre (close a recovered runner).
113
+ */
114
+ EventCategory["ProcessStateChanged"] = "process.state-changed";
115
+ /**
116
+ * The node's one-shot runner boot check (D877): planned runners against the
117
+ * process service, `degraded` when any is failed, refused or missing. The
118
+ * alert centre turns it into one alert and a direct critical push.
119
+ */
120
+ EventCategory["SystemRunnerCheck"] = "system.runner-check";
103
121
  EventCategory["AddonError"] = "addon.error";
104
122
  EventCategory["AddonPageReady"] = "addon.page-ready";
105
123
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5424,7 +5442,7 @@ var ZodIssueCode = {
5424
5442
  var ZodFirstPartyTypeKind;
5425
5443
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5426
5444
  //#endregion
5427
- //#region ../types/dist/sleep-DRqxtc0C.mjs
5445
+ //#region ../types/dist/sleep-BegKjwUu.mjs
5428
5446
  /**
5429
5447
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5430
5448
  * window to float samples (D455).
@@ -5541,7 +5559,7 @@ function isKeychainStoredField(field) {
5541
5559
  var SECRET_CLEAR = { $secretClear: true };
5542
5560
  /** The `'***'` token D634 redaction writes for non-admins. */
5543
5561
  var LEGACY_DEVICE_REDACTION = "***";
5544
- function isRecord$2(value) {
5562
+ function isRecord$5(value) {
5545
5563
  return typeof value === "object" && value !== null && !Array.isArray(value);
5546
5564
  }
5547
5565
  function makeSecretMarker(ref) {
@@ -5552,12 +5570,12 @@ function makeSecretMarker(ref) {
5552
5570
  }
5553
5571
  /** A stored marker: an object whose `$secret` is a non-empty string. */
5554
5572
  function isSecretMarker(value) {
5555
- if (!isRecord$2(value)) return false;
5573
+ if (!isRecord$5(value)) return false;
5556
5574
  const ref = value["$secret"];
5557
5575
  return typeof ref === "string" && ref.length > 0;
5558
5576
  }
5559
5577
  function isSecretClear(value) {
5560
- return isRecord$2(value) && value["$secretClear"] === true;
5578
+ return isRecord$5(value) && value["$secretClear"] === true;
5561
5579
  }
5562
5580
  /**
5563
5581
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -6167,7 +6185,7 @@ var KeychainWriteRefusedError = class extends Error {
6167
6185
  }
6168
6186
  };
6169
6187
  var KEEP = { kind: "keep" };
6170
- function isRecord$1(value) {
6188
+ function isRecord$4(value) {
6171
6189
  return typeof value === "object" && value !== null && !Array.isArray(value);
6172
6190
  }
6173
6191
  function defaultMintId() {
@@ -6180,7 +6198,7 @@ function collectSecretMarkerRefs(value, out = []) {
6180
6198
  return out;
6181
6199
  }
6182
6200
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
6183
- else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6201
+ else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6184
6202
  return out;
6185
6203
  }
6186
6204
  async function storedValueEquals(secrets, marker, candidate) {
@@ -6235,7 +6253,7 @@ function rowId(row, idKey) {
6235
6253
  return null;
6236
6254
  }
6237
6255
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
6238
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
6256
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
6239
6257
  if (!Array.isArray(incoming)) {
6240
6258
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
6241
6259
  return {
@@ -6251,7 +6269,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
6251
6269
  const kept = /* @__PURE__ */ new Set();
6252
6270
  const rows = [];
6253
6271
  for (const row of incoming) {
6254
- if (!isRecord$1(row)) {
6272
+ if (!isRecord$4(row)) {
6255
6273
  rows.push(row);
6256
6274
  continue;
6257
6275
  }
@@ -6276,7 +6294,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6276
6294
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
6277
6295
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
6278
6296
  case "object": {
6279
- if (!isRecord$1(incoming)) {
6297
+ if (!isRecord$4(incoming)) {
6280
6298
  if (incoming === void 0) return KEEP;
6281
6299
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
6282
6300
  return {
@@ -6284,7 +6302,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6284
6302
  value: incoming
6285
6303
  };
6286
6304
  }
6287
- const storedObj = isRecord$1(stored) ? stored : {};
6305
+ const storedObj = isRecord$4(stored) ? stored : {};
6288
6306
  return {
6289
6307
  kind: "value",
6290
6308
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -6407,7 +6425,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
6407
6425
  value: items
6408
6426
  };
6409
6427
  }
6410
- if (isRecord$1(v)) {
6428
+ if (isRecord$4(v)) {
6411
6429
  const out = {};
6412
6430
  for (const [k, child] of Object.entries(v)) {
6413
6431
  const s = substitute(child);
@@ -6439,7 +6457,7 @@ var SecretOverwriteRefusedError = class extends Error {
6439
6457
  this.name = "SecretOverwriteRefusedError";
6440
6458
  }
6441
6459
  };
6442
- function isRecord(value) {
6460
+ function isRecord$3(value) {
6443
6461
  return typeof value === "object" && value !== null && !Array.isArray(value);
6444
6462
  }
6445
6463
  function resolvedValue(pass, marker) {
@@ -6468,7 +6486,7 @@ function inArray(pass, incoming, stored) {
6468
6486
  return incoming.map((item, index) => {
6469
6487
  const twin = stored[index];
6470
6488
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
6471
- if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
6489
+ if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
6472
6490
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
6473
6491
  return item;
6474
6492
  });
@@ -6479,7 +6497,7 @@ function inArrayRow(pass, incoming, stored) {
6479
6497
  const twin = stored[key];
6480
6498
  if (isSecretMarker(twin)) {
6481
6499
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
6482
- } else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
6500
+ } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
6483
6501
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
6484
6502
  }
6485
6503
  return out;
@@ -6487,7 +6505,7 @@ function inArrayRow(pass, incoming, stored) {
6487
6505
  async function walk(pass, incoming, stored) {
6488
6506
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
6489
6507
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
6490
- if (!isRecord(incoming) || !isRecord(stored)) return incoming;
6508
+ if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
6491
6509
  const out = { ...incoming };
6492
6510
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
6493
6511
  return out;
@@ -6518,7 +6536,7 @@ async function restoreUnchangedSecrets(input) {
6518
6536
  function isJsonEqual(a, b) {
6519
6537
  if (Object.is(a, b)) return true;
6520
6538
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
6521
- if (isRecord(a) && isRecord(b)) {
6539
+ if (isRecord$3(a) && isRecord$3(b)) {
6522
6540
  const keys = Object.keys(a);
6523
6541
  if (keys.length !== Object.keys(b).length) return false;
6524
6542
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -6542,7 +6560,7 @@ function markerKeysOf(blob, owner) {
6542
6560
  }
6543
6561
  function nodeFromStored(value, owner) {
6544
6562
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
6545
- if (!isRecord(value)) return null;
6563
+ if (!isRecord$3(value)) return null;
6546
6564
  const children = /* @__PURE__ */ new Map();
6547
6565
  for (const [key, child] of Object.entries(value)) {
6548
6566
  const node = nodeFromStored(child, owner);
@@ -6675,7 +6693,6 @@ function createHandle(raw, opts) {
6675
6693
  const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
6676
6694
  const readAddonStoreResult = raw.readAddonStoreResult;
6677
6695
  const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
6678
- const readDeviceStoreBatch = raw.readDeviceStoreBatch;
6679
6696
  const overrides = {
6680
6697
  readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
6681
6698
  ...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
@@ -6699,12 +6716,12 @@ function createHandle(raw, opts) {
6699
6716
  };
6700
6717
  } } : {},
6701
6718
  readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
6702
- ...readDeviceStoreBatch !== void 0 ? { readDeviceStoreBatch: async (deviceIds) => {
6703
- const rows = await readDeviceStoreBatch.call(raw, deviceIds);
6719
+ readDeviceStoreBatch: async (deviceIds) => {
6720
+ const rows = await raw.readDeviceStoreBatch(deviceIds);
6704
6721
  const out = /* @__PURE__ */ new Map();
6705
6722
  for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
6706
6723
  return out;
6707
- } } : {},
6724
+ },
6708
6725
  writeAddonStore: async (patch) => {
6709
6726
  await writeAddon(patch);
6710
6727
  },
@@ -7331,7 +7348,7 @@ var BaseAddon = class {
7331
7348
  if (!ctx) return;
7332
7349
  const addonId = ctx.id;
7333
7350
  setImmediate(() => {
7334
- ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
7351
+ ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
7335
7352
  ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
7336
7353
  }).catch((err) => {
7337
7354
  ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
@@ -7531,7 +7548,7 @@ var BaseAddon = class {
7531
7548
  return this._addonSecretTree;
7532
7549
  }
7533
7550
  deviceSecretTree() {
7534
- this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
7551
+ this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
7535
7552
  return this._deviceSecretTree;
7536
7553
  }
7537
7554
  /**
@@ -7607,42 +7624,135 @@ var BaseAddon = class {
7607
7624
  this[timerOf] = timer;
7608
7625
  }
7609
7626
  /**
7610
- * Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
7611
- * transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
7612
- * swap, or any race where the SqliteSettingsBackend is between shutdown and
7613
- * re-initialize) doesn't propagate up into `initialize()` and leave the
7627
+ * Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
7628
+ * settings-store outage doesn't propagate up into `initialize()` and leave the
7614
7629
  * addon permanently broken.
7615
7630
  *
7616
- * Retry only the two known infra fingerprints. Anything else propagates so
7617
- * real bugs surface immediately. After the budget expires we fall back to
7618
- * `{}` (defaults) — the addon's first successful patch will rehydrate.
7631
+ * Two kinds of outage, two budgets:
7632
+ * - the store's own restart fingerprints (`SqliteSettingsBackend not
7633
+ * initialized`, `provider not available`): a short budget, then the addon
7634
+ * falls back to `{}` (defaults) - its first successful patch rehydrates;
7635
+ * - a TRANSPORT failure (the hub is restarting while this runner boots:
7636
+ * `discovery deadline exceeded`, `parent could not route`, a refused or
7637
+ * timed-out connection). Since D870 a runner's settings read THROWS instead
7638
+ * of answering `{}`, so without a budget a hub restart ends in a respawn
7639
+ * loop. A long, bounded budget; only after it the error propagates - the
7640
+ * addon never runs on defaults for a store it could not ask.
7641
+ * Anything else propagates immediately so real bugs surface.
7619
7642
  */
7620
7643
  async readAddonStoreWithRetry() {
7621
7644
  const settings = this.rawSettings();
7622
7645
  if (!settings) return {};
7623
- const delaysMs = [
7624
- 150,
7625
- 350,
7626
- 600,
7627
- 900
7628
- ];
7629
7646
  let lastErr;
7630
- for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
7647
+ for (let attempt = 0;; attempt++) try {
7631
7648
  const stored = await settings.readAddonStore() ?? {};
7632
7649
  this.settingsStoreReady = true;
7633
7650
  return stored;
7634
7651
  } catch (err) {
7635
7652
  lastErr = err;
7636
- const msg = err instanceof Error ? err.message : String(err);
7637
- if (!(msg.includes("SqliteSettingsBackend not initialized") || msg.includes("provider not available"))) throw err;
7638
- if (attempt === delaysMs.length) break;
7639
- await new Promise((r) => setTimeout(r, delaysMs[attempt]));
7653
+ const kind = classifyStoreError(err);
7654
+ if (kind === "permanent") throw err;
7655
+ const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
7656
+ if (delay === void 0) {
7657
+ if (kind === "transport") throw err;
7658
+ break;
7659
+ }
7660
+ await new Promise((r) => setTimeout(r, delay));
7640
7661
  }
7641
7662
  this.settingsStoreReady = false;
7642
7663
  this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
7643
7664
  return {};
7644
7665
  }
7645
7666
  };
7667
+ /** The settings store's own restart fingerprints. */
7668
+ var RESTART_RETRY_DELAYS_MS = [
7669
+ 150,
7670
+ 350,
7671
+ 600,
7672
+ 900
7673
+ ];
7674
+ /** A hub restarting under a booting runner: ~100 s in total. */
7675
+ var TRANSPORT_RETRY_DELAYS_MS = [
7676
+ 150,
7677
+ 350,
7678
+ 600,
7679
+ 900,
7680
+ 2e3,
7681
+ 5e3,
7682
+ 1e4,
7683
+ 2e4,
7684
+ 3e4,
7685
+ 3e4
7686
+ ];
7687
+ var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
7688
+ /** Node / socket error codes of a connection that did not happen or broke. */
7689
+ var TRANSPORT_CODES = new Set([
7690
+ "ECONNREFUSED",
7691
+ "ECONNRESET",
7692
+ "ETIMEDOUT",
7693
+ "EPIPE",
7694
+ "EHOSTUNREACH",
7695
+ "ENETUNREACH"
7696
+ ]);
7697
+ /** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
7698
+ var UNAVAILABLE_TRPC_CODES = new Set([
7699
+ "TIMEOUT",
7700
+ "SERVICE_UNAVAILABLE",
7701
+ "BAD_GATEWAY",
7702
+ "GATEWAY_TIMEOUT"
7703
+ ]);
7704
+ /** The exact phrases OUR transport raises when it cannot reach the hub. */
7705
+ var TRANSPORT_PHRASES = [
7706
+ "discovery deadline exceeded",
7707
+ "parent could not route child unowned cap call",
7708
+ "UDS request timed out after",
7709
+ "channel closed"
7710
+ ];
7711
+ /** Moleculer error `type`s of a call that could not be served right now. */
7712
+ var MOLECULER_TRANSIENT_TYPES = new Set([
7713
+ "REQUEST_TIMEOUT",
7714
+ "SERVICE_NOT_FOUND",
7715
+ "SERVICE_NOT_AVAILABLE",
7716
+ "REQUEST_REJECTED",
7717
+ "BROKER_DISCONNECTED"
7718
+ ]);
7719
+ function stringProp(value, key) {
7720
+ if (typeof value !== "object" || value === null) return void 0;
7721
+ const found = Reflect.get(value, key);
7722
+ return typeof found === "string" ? found : void 0;
7723
+ }
7724
+ /** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
7725
+ function errorCode(err) {
7726
+ const out = {};
7727
+ const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
7728
+ const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
7729
+ const node = stringProp(err, "code") ?? stringProp(cause, "code");
7730
+ if (node !== void 0) out.node = node;
7731
+ const trpc = stringProp(data, "code");
7732
+ if (trpc !== void 0) out.trpc = trpc;
7733
+ return out;
7734
+ }
7735
+ /**
7736
+ * Is a settings read failure worth retrying, and with which budget? Only
7737
+ * EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
7738
+ * one of the exact phrases our own transport raises. A message that merely
7739
+ * contains "timed out" or "unreachable" is not evidence of anything, and
7740
+ * `settings store not wired` is a wiring bug that retrying cannot fix.
7741
+ */
7742
+ function classifyStoreError(err) {
7743
+ const message = err instanceof Error ? err.message : String(err);
7744
+ if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
7745
+ const code = errorCode(err);
7746
+ if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
7747
+ if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
7748
+ if (typeof err === "object" && err !== null) {
7749
+ if (Reflect.get(err, "retryable") === true) return "transport";
7750
+ const type = stringProp(err, "type");
7751
+ if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
7752
+ }
7753
+ if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
7754
+ return "permanent";
7755
+ }
7646
7756
  /**
7647
7757
  * Collect the keys of every field marked `perNode: true`, recursing into
7648
7758
  * layout containers (`group` fields and `sub-tabs` tabs) the same way
@@ -7732,6 +7842,156 @@ var PeerBytesTicketSchema = object({
7732
7842
  */
7733
7843
  declaredBytes: number().int().nonnegative().nullable()
7734
7844
  });
7845
+ /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
7846
+ /** The files a kind may live in. `history` is device-history's (D850), never records. */
7847
+ var RECORD_DATABASES = ["settings", "events"];
7848
+ /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
7849
+ var RECORD_CLASSES = [
7850
+ "config",
7851
+ "ledger",
7852
+ "audit",
7853
+ "mirror",
7854
+ "ephemeral"
7855
+ ];
7856
+ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
7857
+ var RECORD_MAX_DATA_BYTES = 1024 * 1024;
7858
+ var RECORD_BATCH_MAX = 1e3;
7859
+ var RECORD_QUERY_MAX = 1e3;
7860
+ function defOf(schema) {
7861
+ const zodBag = Reflect.get(schema, "_zod");
7862
+ if (typeof zodBag !== "object" || zodBag === null) return {};
7863
+ const def = Reflect.get(zodBag, "def");
7864
+ if (typeof def !== "object" || def === null) return {};
7865
+ return def;
7866
+ }
7867
+ function declaredHere(schema) {
7868
+ return globalRegistry.get(schema)?.secret === true;
7869
+ }
7870
+ /** Wrapper kinds whose `innerType` is the field itself. */
7871
+ var WRAPPERS = new Set([
7872
+ "optional",
7873
+ "nullable",
7874
+ "default",
7875
+ "prefault",
7876
+ "catch",
7877
+ "readonly",
7878
+ "nonoptional"
7879
+ ]);
7880
+ /**
7881
+ * The schema layers that make up ONE field: the schema itself and every
7882
+ * wrapper below it (optional / default / nullable / readonly / catch), plus
7883
+ * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
7884
+ * `.transform` on `in`).
7885
+ */
7886
+ function layersOf(schema) {
7887
+ const out = [];
7888
+ const queue = [schema];
7889
+ while (queue.length > 0) {
7890
+ const s = queue.shift();
7891
+ if (!s || out.includes(s)) continue;
7892
+ out.push(s);
7893
+ const def = defOf(s);
7894
+ if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
7895
+ if (def.type === "pipe") {
7896
+ if (def.in) queue.push(def.in);
7897
+ if (def.out) queue.push(def.out);
7898
+ }
7899
+ }
7900
+ return out;
7901
+ }
7902
+ /** True when any layer of this field declares `.meta({ secret: true })`. */
7903
+ function isZodSecret(schema) {
7904
+ return layersOf(schema).some(declaredHere);
7905
+ }
7906
+ /**
7907
+ * Every declared secret path in a config schema: dotted keys, `[]` for "each
7908
+ * element of this array" (`connection.password`, `rows[].token`). A declared
7909
+ * object or array is reported as one path and not descended into — everything
7910
+ * under it is secret.
7911
+ */
7912
+ function collectZodSecretPaths(schema, prefix = "") {
7913
+ if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
7914
+ const paths = [];
7915
+ for (const layer of layersOf(schema)) {
7916
+ const def = defOf(layer);
7917
+ if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
7918
+ else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
7919
+ else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
7920
+ else if (def.type === "intersection") {
7921
+ if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
7922
+ if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
7923
+ }
7924
+ }
7925
+ return [...new Set(paths)];
7926
+ }
7927
+ /**
7928
+ * Record kinds (D881): the declaration an addon makes of one kind of fact, the
7929
+ * Zod row schema that describes it, and the helper that turns the two into the
7930
+ * JSON the engine stores.
7931
+ *
7932
+ * A kind is declared ONCE, next to the code that owns it, and the engine's
7933
+ * reconciler creates its indexes - nothing creates DDL at runtime from a write.
7934
+ * Everything the generic machinery needs (secret fields, the entry descriptor)
7935
+ * is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
7936
+ * never a field name (D879).
7937
+ */
7938
+ /** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
7939
+ var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
7940
+ var RecordIndexSchema = object({
7941
+ name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
7942
+ fields: array(RecordFieldPathSchema).min(1).max(4),
7943
+ unique: boolean().optional()
7944
+ }).strict();
7945
+ var RecordRetentionSchema = union([
7946
+ object({
7947
+ ttlMs: number().int().positive(),
7948
+ from: _enum(["at", "write"])
7949
+ }).strict(),
7950
+ object({
7951
+ maxRows: number().int().positive().optional(),
7952
+ maxRowsPerDevice: number().int().positive().optional()
7953
+ }).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
7954
+ object({
7955
+ owner: string().min(1),
7956
+ reason: string().min(1)
7957
+ }).strict(),
7958
+ object({ none: string().min(1) }).strict()
7959
+ ]);
7960
+ /** The descriptor a generic entries UI reads (D881 "generic entries"). */
7961
+ var EntryDescriptorSchema = object({
7962
+ title: string().min(1),
7963
+ /** The record body field shown as the entry's name. */
7964
+ nameField: string().min(1),
7965
+ /** JSON Schema of the entry body; `secret: true` marks a password field. */
7966
+ fields: record(string(), unknown())
7967
+ }).strict();
7968
+ /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
7969
+ var RecordKindDeclarationSchema = object({
7970
+ database: _enum(RECORD_DATABASES).default("settings"),
7971
+ class: _enum(RECORD_CLASSES),
7972
+ writeTrigger: string().min(1),
7973
+ device: _enum([
7974
+ "required",
7975
+ "optional",
7976
+ "none"
7977
+ ]).default("none"),
7978
+ at: _enum(["required", "none"]).default("none"),
7979
+ indexes: array(RecordIndexSchema).max(8).default([]),
7980
+ retention: RecordRetentionSchema,
7981
+ deviceRemoval: _enum(["delete", "none"]).default("none"),
7982
+ maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
7983
+ /** Derived from the Zod schema; never written by hand. */
7984
+ secretPaths: array(string().min(1)).default([]),
7985
+ /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
7986
+ secretArrayKeys: record(string(), string()).default({}),
7987
+ /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
7988
+ adoptsFrom: string().min(1).optional(),
7989
+ /** Kinds that must agree through `transact` sit in one file under one family name. */
7990
+ transactFamily: string().min(1).optional(),
7991
+ entry: EntryDescriptorSchema.optional()
7992
+ }).strict();
7993
+ /** The kind names: lower-case, dash separated, short enough for an index name. */
7994
+ var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
7735
7995
  /** Shared Zod schemas used across streaming capabilities. */
7736
7996
  var CamProfileSchema = _enum([
7737
7997
  "high",
@@ -8196,75 +8456,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8196
8456
  kind: "mutation",
8197
8457
  auth: "admin"
8198
8458
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8199
- function defOf(schema) {
8200
- return schema._zod?.def ?? {};
8201
- }
8202
- function declaredHere(schema) {
8203
- return globalRegistry.get(schema)?.secret === true;
8204
- }
8205
- /** Wrapper kinds whose `innerType` is the field itself. */
8206
- var WRAPPERS = new Set([
8207
- "optional",
8208
- "nullable",
8209
- "default",
8210
- "prefault",
8211
- "catch",
8212
- "readonly",
8213
- "nonoptional"
8214
- ]);
8215
- /**
8216
- * The schema layers that make up ONE field: the schema itself and every
8217
- * wrapper below it (optional / default / nullable / readonly / catch), plus
8218
- * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
8219
- * `.transform` on `in`).
8220
- */
8221
- function layersOf(schema) {
8222
- const out = [];
8223
- const queue = [schema];
8224
- while (queue.length > 0) {
8225
- const s = queue.shift();
8226
- if (!s || out.includes(s)) continue;
8227
- out.push(s);
8228
- const def = defOf(s);
8229
- if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
8230
- if (def.type === "pipe") {
8231
- if (def.in) queue.push(def.in);
8232
- if (def.out) queue.push(def.out);
8233
- }
8234
- }
8235
- return out;
8236
- }
8237
- /** True when any layer of this field declares `.meta({ secret: true })`. */
8238
- function isZodSecret(schema) {
8239
- return layersOf(schema).some(declaredHere);
8240
- }
8241
- /**
8242
- * Every declared secret path in a config schema: dotted keys, `[]` for "each
8243
- * element of this array" (`connection.password`, `rows[].token`). A declared
8244
- * object or array is reported as one path and not descended into — everything
8245
- * under it is secret.
8246
- */
8247
- function collectZodSecretPaths(schema, prefix = "") {
8248
- if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
8249
- const paths = [];
8250
- for (const layer of layersOf(schema)) {
8251
- const def = defOf(layer);
8252
- if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
8253
- else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
8254
- else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
8255
- else if (def.type === "intersection") {
8256
- if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
8257
- if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
8258
- }
8259
- }
8260
- return [...new Set(paths)];
8261
- }
8262
8459
  object({
8263
8460
  code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
8264
8461
  params: record(string(), union([string(), number()])).optional()
8265
8462
  });
8266
8463
  //#endregion
8267
- //#region ../types/dist/err-msg-DLerKiVO.mjs
8464
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8268
8465
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8269
8466
  DeviceType["Camera"] = "camera";
8270
8467
  DeviceType["Hub"] = "hub";
@@ -8356,6 +8553,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8356
8553
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8357
8554
  * integrations sharing the same food/desiccant/hopper surface. */
8358
8555
  DeviceType["PetFeeder"] = "pet-feeder";
8556
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8557
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8558
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8559
+ DeviceType["Dishwasher"] = "dishwasher";
8359
8560
  return DeviceType;
8360
8561
  }({});
8361
8562
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8533,6 +8734,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8533
8734
  /** Virtual HA toggle (input_boolean.*) — distinguishable from a
8534
8735
  * real Switch device for UI rendering / export adapters. */
8535
8736
  DeviceRole["BinaryHelper"] = "binary-helper";
8737
+ /** A smart plug: a `switch` whose source says it is an outlet (HA
8738
+ * `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
8739
+ DeviceRole["Outlet"] = "outlet";
8536
8740
  /** Generic motion / occupancy / moving event source. Distinct from
8537
8741
  * the camera accessory PirSensor role: that one is a camera child;
8538
8742
  * this is a standalone HA / 3rd-party motion sensor. */
@@ -8610,7 +8814,7 @@ function errMsg(err) {
8610
8814
  return String(err);
8611
8815
  }
8612
8816
  //#endregion
8613
- //#region ../types/dist/composition-EQ9Ok0Ee.mjs
8817
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8614
8818
  /**
8615
8819
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8616
8820
  *
@@ -11814,11 +12018,10 @@ var ClipModelMetaSchema = object({
11814
12018
  /**
11815
12019
  * The `vector-store` index this model's vectors live in. ONE feature space
11816
12020
  * per index: two models share an index only when their vectors are ranked
11817
- * against each other, which for CLIP means never across families. MobileCLIP
11818
- * S1 and S2 share `object-clip` for history (separated by the row's
11819
- * `modelId`); any other model gets its own.
12021
+ * against each other, which for CLIP means never across families. Every
12022
+ * model gets its own.
11820
12023
  */
11821
- vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
12024
+ vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
11822
12025
  /**
11823
12026
  * The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
11824
12027
  * must be unique per tokenizer: every model's siblings land in ONE flat
@@ -12997,8 +13200,13 @@ var AlertSeveritySchema = _enum([
12997
13200
  "info",
12998
13201
  "success",
12999
13202
  "warning",
13000
- "error"
13203
+ "error",
13204
+ "critical"
13001
13205
  ]);
13206
+ var AlertActionSchema = object({
13207
+ label: string(),
13208
+ href: string().optional()
13209
+ });
13002
13210
  var AlertStatusSchema = _enum([
13003
13211
  "active",
13004
13212
  "in-progress",
@@ -13016,6 +13224,7 @@ var AlertSchema = object({
13016
13224
  severity: AlertSeveritySchema,
13017
13225
  title: string(),
13018
13226
  message: string(),
13227
+ action: AlertActionSchema.optional(),
13019
13228
  status: AlertStatusSchema,
13020
13229
  progress: number().optional(),
13021
13230
  read: boolean(),
@@ -15551,6 +15760,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
15551
15760
  keyField: string()
15552
15761
  }).optional()
15553
15762
  })) });
15763
+ /**
15764
+ * The report of a one-shot "move this owner's plaintext secrets into the
15765
+ * keychain" run (D878). COUNTS only - never a value, never a ref.
15766
+ *
15767
+ * The owner runs it on its own rows, through its own write path; an operator
15768
+ * script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
15769
+ * Dry run (`apply: false`) reports what WOULD move and changes nothing.
15770
+ */
15771
+ var RawSecretMigrationInputSchema = object({
15772
+ /** `false` (the default of the script) = report only. */
15773
+ apply: boolean() });
15774
+ var RawSecretMigrationReportSchema = object({
15775
+ apply: boolean(),
15776
+ /** Rows that can carry a secret (a profile, an enrolment). */
15777
+ rows: number().int(),
15778
+ /** Rows whose secret was plaintext when the run started. */
15779
+ raw: number().int(),
15780
+ /** Rows that already held a keychain marker when the run started. */
15781
+ markers: number().int(),
15782
+ /** Plaintext rows moved by THIS run (always 0 on a dry run). */
15783
+ migrated: number().int(),
15784
+ /** Plaintext rows left in place because the move or its read-back failed. */
15785
+ failed: number().int(),
15786
+ /** After the run: rows still holding plaintext. */
15787
+ remainingRaw: number().int(),
15788
+ /** After the run: markers the keychain could not resolve right now. */
15789
+ unresolvedMarkers: number().int(),
15790
+ /**
15791
+ * A second, redundant copy of the secrets' rows that the run found (and, on
15792
+ * `apply`, deleted after verifying the first). Owners with a single copy omit it.
15793
+ */
15794
+ redundantCopies: number().int().optional(),
15795
+ /** True when nothing is raw and every marker resolves. */
15796
+ verified: boolean()
15797
+ });
15554
15798
  /** Where a block runs. The operator chooses — a block driving a device on an
15555
15799
  * agent is the reason placement is not fixed to the hub. */
15556
15800
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -15777,6 +16021,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
15777
16021
  }), SettingsUpdateResultSchema, {
15778
16022
  kind: "mutation",
15779
16023
  auth: "admin"
16024
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
16025
+ kind: "mutation",
16026
+ auth: "admin"
15780
16027
  }), method(object({}), object({ libs: array(object({
15781
16028
  filePath: string(),
15782
16029
  content: string()
@@ -16040,6 +16287,347 @@ id: union([string(), number()]) }), {
16040
16287
  auth: "admin"
16041
16288
  });
16042
16289
  /**
16290
+ * records - an addon's own facts and documents (D881): ledgers, audit rows,
16291
+ * config documents, mirrors. The third storage API next to `ctx.settings`
16292
+ * (operator intent, D870) and device-history (numbers over time, D850).
16293
+ *
16294
+ * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
16295
+ * crossed a process and stated by a hub in-process caller (`ctx.records` does
16296
+ * that with the addon id closed over). It is deliberately NOT in any input
16297
+ * schema, so a session can never supply it, and a call with no stamp is refused
16298
+ * `records/no-caller`. A kind is readable and writable only by its owner; other
16299
+ * addons go through the owner's capability.
16300
+ *
16301
+ * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
16302
+ * never `[]`. Secret fields are never on the wire: a read shows the
16303
+ * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
16304
+ * resolves itself, and a write may carry only a keychain marker bound to the
16305
+ * row's own ref.
16306
+ *
16307
+ * Internal: addons reach it through `ctx.records`, never directly.
16308
+ */
16309
+ var RecordIdSchema = string().min(1).max(256);
16310
+ /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
16311
+ var RecordBodySchema = record(string(), unknown());
16312
+ var RecordInputSchema = object({
16313
+ id: RecordIdSchema,
16314
+ /** The device this row belongs to (D865 removal, per-device reads). */
16315
+ deviceId: number().int().optional(),
16316
+ /** The domain clock, ms: observed / created / opened. */
16317
+ at: number().int().optional(),
16318
+ /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
16319
+ expiresAt: number().int().optional(),
16320
+ data: RecordBodySchema
16321
+ });
16322
+ var RecordViewSchema = object({
16323
+ id: string(),
16324
+ deviceId: number().int().nullable(),
16325
+ at: number().nullable(),
16326
+ expiresAt: number().nullable(),
16327
+ rev: number().int(),
16328
+ updatedAt: number(),
16329
+ data: RecordBodySchema
16330
+ });
16331
+ /** Declared index fields only. Anything else does not compile, by design. */
16332
+ var RecordWhereSchema = record(RecordFieldPathSchema, union([
16333
+ string(),
16334
+ number(),
16335
+ boolean(),
16336
+ object({ in: array(union([
16337
+ string(),
16338
+ number(),
16339
+ boolean()
16340
+ ])).min(1).max(RECORD_BATCH_MAX) }),
16341
+ object({
16342
+ gt: union([string(), number()]).optional(),
16343
+ gte: union([string(), number()]).optional(),
16344
+ lt: union([string(), number()]).optional(),
16345
+ lte: union([string(), number()]).optional()
16346
+ }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
16347
+ ]));
16348
+ var KindShape = { kind: RecordKindNameSchema };
16349
+ var TimeWindowShape = {
16350
+ deviceId: number().int().optional(),
16351
+ atFrom: number().optional(),
16352
+ atTo: number().optional()
16353
+ };
16354
+ var RecordQueryInputSchema = object({
16355
+ ...KindShape,
16356
+ ...TimeWindowShape,
16357
+ where: RecordWhereSchema.optional(),
16358
+ /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
16359
+ order: _enum(["at", "id"]).optional(),
16360
+ desc: boolean().optional(),
16361
+ limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
16362
+ /** Opaque keyset cursor from a previous answer. There is no offset. */
16363
+ cursor: string().min(1).optional()
16364
+ });
16365
+ var RecordQueryResultSchema = object({
16366
+ records: array(RecordViewSchema),
16367
+ nextCursor: string().nullable()
16368
+ });
16369
+ var RecordKindStateSchema = _enum([
16370
+ "created",
16371
+ "unchanged",
16372
+ "updated"
16373
+ ]);
16374
+ var DeclareKindResultSchema = object({
16375
+ kindId: number().int(),
16376
+ state: RecordKindStateSchema,
16377
+ createdIndexes: array(string()),
16378
+ /** The boot guard: the kind is empty while its legacy table still holds rows. */
16379
+ adoptionPending: object({
16380
+ legacyTable: string(),
16381
+ legacyRows: number().int()
16382
+ }).nullable()
16383
+ });
16384
+ /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16385
+ var SecretRefsList = array(string());
16386
+ var RecordSecretRefsSchema = record(string(), record(string(), string()));
16387
+ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16388
+ kind: "mutation",
16389
+ auth: "admin"
16390
+ }), method(object({
16391
+ ...KindShape,
16392
+ id: RecordIdSchema
16393
+ }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
16394
+ ...KindShape,
16395
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16396
+ }), array(RecordViewSchema), { auth: "admin" }), method(object({
16397
+ ...KindShape,
16398
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16399
+ }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
16400
+ ...KindShape,
16401
+ record: RecordInputSchema,
16402
+ /** Compare-and-set. `0` means "the row must not exist". */
16403
+ ifRev: number().int().min(0).optional()
16404
+ }), object({
16405
+ rev: number().int(),
16406
+ releasedRefs: SecretRefsList
16407
+ }), {
16408
+ kind: "mutation",
16409
+ auth: "admin"
16410
+ }), method(object({
16411
+ ...KindShape,
16412
+ records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
16413
+ }), object({
16414
+ count: number().int(),
16415
+ releasedRefs: SecretRefsList
16416
+ }), {
16417
+ kind: "mutation",
16418
+ auth: "admin"
16419
+ }), method(object({
16420
+ ...KindShape,
16421
+ id: RecordIdSchema,
16422
+ data: RecordBodySchema,
16423
+ at: number().int().nullable().optional(),
16424
+ expiresAt: number().int().nullable().optional(),
16425
+ ifRev: number().int().min(1).optional()
16426
+ }), object({
16427
+ rev: number().int(),
16428
+ releasedRefs: SecretRefsList
16429
+ }), {
16430
+ kind: "mutation",
16431
+ auth: "admin"
16432
+ }), method(object({
16433
+ ...KindShape,
16434
+ id: RecordIdSchema
16435
+ }), object({
16436
+ deleted: boolean(),
16437
+ secretRefs: SecretRefsList
16438
+ }), {
16439
+ kind: "mutation",
16440
+ auth: "admin"
16441
+ }), method(object({
16442
+ ...KindShape,
16443
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16444
+ }), object({
16445
+ deleted: number().int(),
16446
+ secretRefs: SecretRefsList
16447
+ }), {
16448
+ kind: "mutation",
16449
+ auth: "admin"
16450
+ }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
16451
+ ...KindShape,
16452
+ ...TimeWindowShape,
16453
+ where: RecordWhereSchema.optional()
16454
+ }), object({ count: number().int() }), { auth: "admin" }), method(object({
16455
+ ...KindShape,
16456
+ deviceId: number().int().optional(),
16457
+ from: number(),
16458
+ to: number(),
16459
+ bucketMs: number().int().positive()
16460
+ }), object({ buckets: array(object({
16461
+ bucketStart: number(),
16462
+ count: number().int()
16463
+ })) }), { auth: "admin" }), method(object({
16464
+ ...KindShape,
16465
+ op: _enum([
16466
+ "sum",
16467
+ "min",
16468
+ "max",
16469
+ "count"
16470
+ ]),
16471
+ field: RecordFieldPathSchema.optional(),
16472
+ groupBy: RecordFieldPathSchema.optional(),
16473
+ where: RecordWhereSchema.optional()
16474
+ }), object({ rows: array(object({
16475
+ group: union([
16476
+ string(),
16477
+ number(),
16478
+ _null()
16479
+ ]),
16480
+ value: number().nullable()
16481
+ })) }), { auth: "admin" }), method(object({
16482
+ ...KindShape,
16483
+ deviceId: number().int().optional(),
16484
+ atBefore: number().optional(),
16485
+ where: RecordWhereSchema.optional()
16486
+ }), object({
16487
+ deleted: number().int(),
16488
+ secretRefs: SecretRefsList
16489
+ }), {
16490
+ kind: "mutation",
16491
+ auth: "admin"
16492
+ }), method(object({
16493
+ deviceId: number().int(),
16494
+ kinds: array(RecordKindNameSchema).optional()
16495
+ }), object({
16496
+ deleted: record(string(), number().int()),
16497
+ secretRefs: SecretRefsList
16498
+ }), {
16499
+ kind: "mutation",
16500
+ auth: "admin"
16501
+ }), method(object(KindShape), object({ id: number().int() }), {
16502
+ kind: "mutation",
16503
+ auth: "admin"
16504
+ });
16505
+ /** One table of the settings database. */
16506
+ var StorageTableSchema = object({
16507
+ /** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
16508
+ name: string(),
16509
+ /** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
16510
+ owner: string().nullable(),
16511
+ rows: number().int().nonnegative(),
16512
+ /** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
16513
+ bytes: number().int().nonnegative().nullable(),
16514
+ /** Declared by an addon since this engine process started (a running addon claims it). */
16515
+ declaredThisBoot: boolean()
16516
+ });
16517
+ /** One declared record kind (D881) as System -> Data shows it. */
16518
+ var StorageKindSchema = object({
16519
+ owner: string(),
16520
+ kind: string(),
16521
+ database: _enum(["settings", "events"]),
16522
+ class: string(),
16523
+ state: _enum([
16524
+ "declared",
16525
+ "orphaned",
16526
+ "dropped"
16527
+ ]),
16528
+ /** `null` when the caller asked for no counts (`counts: false`). */
16529
+ rows: number().int().nonnegative().nullable(),
16530
+ /** Rows x the average size of a sample; null for an empty kind. */
16531
+ bytesEstimate: number().int().nonnegative().nullable(),
16532
+ writeTrigger: string(),
16533
+ retention: RecordRetentionSchema,
16534
+ /** `true` when the kind is an entry kind (the generic entries UI lists it). */
16535
+ entry: boolean(),
16536
+ /** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
16537
+ declaration: RecordKindDeclarationSchema
16538
+ });
16539
+ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
16540
+ collection: string().min(1),
16541
+ expectRows: number().int().nonnegative()
16542
+ }), object({
16543
+ dropped: literal(true),
16544
+ rows: number().int().nonnegative()
16545
+ }), {
16546
+ kind: "mutation",
16547
+ auth: "admin"
16548
+ }), method(object({
16549
+ owner: string().min(1).optional(),
16550
+ /** `false` skips the per-kind row count (a catalog read only). Default true. */
16551
+ counts: boolean().optional()
16552
+ }), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
16553
+ owner: string().min(1),
16554
+ kind: RecordKindNameSchema
16555
+ }), RecordQueryResultSchema, { auth: "admin" }), method(object({
16556
+ owner: string().min(1),
16557
+ kind: RecordKindNameSchema,
16558
+ records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
16559
+ /** The LAST batch: the copy is complete, the boot guard stops asking. */
16560
+ complete: boolean().optional()
16561
+ }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
16562
+ kind: "mutation",
16563
+ auth: "admin"
16564
+ }), method(object({
16565
+ collection: string().min(1),
16566
+ cursor: string().optional(),
16567
+ limit: number().int().min(1).max(1e3).optional()
16568
+ }), object({
16569
+ rows: array(object({
16570
+ id: string(),
16571
+ data: record(string(), unknown())
16572
+ })),
16573
+ nextCursor: string().nullable()
16574
+ }), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
16575
+ /**
16576
+ * record-entries - the ONE admin surface for every list of user-created entries
16577
+ * (D881): notification targets, brokers, LLM profiles, anything an addon
16578
+ * declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
16579
+ *
16580
+ * The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
16581
+ * the entry body with `secret: true` on every credential field, so a password
16582
+ * field is derived from the schema and never from a name. `putEntry` takes the
16583
+ * redaction token for an untouched secret (the stored value is kept), a string
16584
+ * for a new one, and the clear instruction to remove one. A read never carries
16585
+ * a secret value, and a locked keychain refuses the write with
16586
+ * `records/secret-unavailable` instead of storing plaintext.
16587
+ *
16588
+ * Hub-only, served in-process (it acts for each entry's owner on the keychain).
16589
+ */
16590
+ var EntryKindInfoSchema = object({
16591
+ owner: string(),
16592
+ kind: RecordKindNameSchema,
16593
+ title: string(),
16594
+ nameField: string(),
16595
+ /** JSON Schema of the body; `secret: true` marks a password field. */
16596
+ fields: record(string(), unknown()),
16597
+ secretPaths: array(string()),
16598
+ rows: number().int().nonnegative()
16599
+ });
16600
+ var EntryViewSchema = object({
16601
+ id: RecordIdSchema,
16602
+ name: string(),
16603
+ rev: number().int(),
16604
+ updatedAt: number(),
16605
+ /** Secret fields hold the redaction token. */
16606
+ data: RecordBodySchema
16607
+ });
16608
+ var EntryAddress = {
16609
+ owner: string().min(1),
16610
+ kind: RecordKindNameSchema
16611
+ };
16612
+ method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
16613
+ ...EntryAddress,
16614
+ id: RecordIdSchema.optional(),
16615
+ data: RecordBodySchema,
16616
+ ifRev: number().int().min(1).optional()
16617
+ }), object({
16618
+ id: string(),
16619
+ rev: number().int()
16620
+ }), {
16621
+ kind: "mutation",
16622
+ auth: "admin"
16623
+ }), method(object({
16624
+ ...EntryAddress,
16625
+ id: RecordIdSchema
16626
+ }), object({ deleted: boolean() }), {
16627
+ kind: "mutation",
16628
+ auth: "admin"
16629
+ });
16630
+ /**
16043
16631
  * `keychain` — the hub's encrypted store of secret values (D787).
16044
16632
  *
16045
16633
  * Settings blobs never hold a secret: they hold a marker
@@ -16580,6 +17168,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
16580
17168
  kind: "mutation",
16581
17169
  auth: "admin",
16582
17170
  caller: "required"
17171
+ }), method(object({
17172
+ ref: string().min(1),
17173
+ value: string().min(1)
17174
+ }), object({
17175
+ ref: string(),
17176
+ version: number().int()
17177
+ }), {
17178
+ kind: "mutation",
17179
+ auth: "admin",
17180
+ caller: "required"
16583
17181
  }), method(object({ refs: array(string().min(1)).max(1e3) }), object({
16584
17182
  deleted: array(string()).readonly(),
16585
17183
  kept: array(object({
@@ -16988,7 +17586,11 @@ var deviceDiscoveryCapability = {
16988
17586
  };
16989
17587
  /**
16990
17588
  * `device-adoption` — generic discovery + adoption surface,
16991
- * system-scoped singleton. The de-HA-ified successor to `ha-discovery`:
17589
+ * system-scoped collection (one provider per integration addon), routed
17590
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
17591
+ * pin model as `connection-test`. The admin UI keeps using
17592
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
17593
+ * successor to `ha-discovery`:
16992
17594
  * keyed by `integrationId` (the addon resolves integrationId → broker
16993
17595
  * internally) rather than a connection-specific `brokerId`, and it
16994
17596
  * REUSES the shared `DiscoveredChildDevice` candidate type from
@@ -17153,7 +17755,7 @@ var ResyncResultSchema = object({
17153
17755
  var deviceAdoptionCapability = {
17154
17756
  name: "device-adoption",
17155
17757
  scope: "system",
17156
- mode: "singleton",
17758
+ mode: "collection",
17157
17759
  status: {
17158
17760
  schema: AdoptionStatusSchema,
17159
17761
  kind: "poll"
@@ -39258,6 +39860,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
39258
39860
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
39259
39861
  kind: "mutation",
39260
39862
  auth: "admin"
39863
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
39864
+ kind: "mutation",
39865
+ auth: "admin"
39261
39866
  }), method(ProfileRefInputSchema, _void(), {
39262
39867
  kind: "mutation",
39263
39868
  auth: "admin"
@@ -49767,6 +50372,41 @@ var ServerRollbackInfoSchema = object({
49767
50372
  atMs: number(),
49768
50373
  reason: string()
49769
50374
  });
50375
+ /**
50376
+ * The runner boot check (D877): the runners this node PLANNED (hub: one per
50377
+ * `resolveRunnerId` over its forked addons; agent: the runners its process
50378
+ * service holds, because only the hub plans) against the states the process
50379
+ * service reports. Kept in memory, recomputed by the same one-shot check after
50380
+ * every boot, served on `getServerPackageStatus`.
50381
+ *
50382
+ * `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
50383
+ * refusal (an addon that said "I will not start, and here is why"), `missing` a
50384
+ * planned runner the process service has no entry for.
50385
+ */
50386
+ var RunnerRefusalSchema = object({
50387
+ runnerId: string(),
50388
+ addonIds: array(string()),
50389
+ reason: string()
50390
+ });
50391
+ var RunnerBootCheckSchema = object({
50392
+ checkedAtMs: number(),
50393
+ /** Runners planned for this node. */
50394
+ expected: number(),
50395
+ /** Planned runners whose process is `running`. */
50396
+ running: number(),
50397
+ failed: array(string()),
50398
+ refused: array(RunnerRefusalSchema),
50399
+ missing: array(string()),
50400
+ /**
50401
+ * Runners still on their way: `starting`, or `crashed` waiting on a backoff
50402
+ * respawn. The check is FINAL only when this is empty; until then nothing is
50403
+ * pushed and the verdict is re-evaluated on the next runner state change.
50404
+ * Optional for version skew (absent = settled).
50405
+ */
50406
+ pending: array(string()).optional(),
50407
+ /** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
50408
+ planKnown: boolean()
50409
+ });
49770
50410
  var ServerPackageStatusSchema = object({
49771
50411
  /** Root package name (`@camstack/server` on the hub). */
49772
50412
  packageName: string(),
@@ -49829,7 +50469,14 @@ var ServerPackageStatusSchema = object({
49829
50469
  * for version skew: an older provider's payload simply omits it, and an
49830
50470
  * absent wrapper is unknown — never `native`.
49831
50471
  */
49832
- wrapper: WrapperIdentitySchema.optional()
50472
+ wrapper: WrapperIdentitySchema.optional(),
50473
+ /**
50474
+ * What this node PLANNED to run against what its process service reports
50475
+ * (D877). Absent until the one-shot boot check has run (~60 s after boot) and
50476
+ * on a provider that predates it. Absent is "not checked yet", never "all
50477
+ * well": a consumer that needs the answer treats it as pending.
50478
+ */
50479
+ runners: RunnerBootCheckSchema.optional()
49833
50480
  });
49834
50481
  var ServerUpdateCheckResultSchema = object({
49835
50482
  packageName: string(),
@@ -49880,6 +50527,13 @@ var ServerUpdateOutcomeSchema = _enum([
49880
50527
  "refused",
49881
50528
  "failed"
49882
50529
  ]);
50530
+ /** One addon the pre-flight found the target version would refuse (D877). */
50531
+ var UpdateBlockerSchema = object({
50532
+ addonId: string(),
50533
+ reason: string(),
50534
+ /** What the operator does about it. */
50535
+ remedy: string()
50536
+ });
49883
50537
  var ServerUpdateActionResultSchema = object({
49884
50538
  accepted: boolean(),
49885
50539
  targetVersion: string().nullable(),
@@ -49897,14 +50551,27 @@ var ServerUpdateActionResultSchema = object({
49897
50551
  * The failure itself, verbatim enough to act on (the npm output for a
49898
50552
  * staging install). Non-null only for `failed`.
49899
50553
  */
49900
- error: string().nullable().optional()
50554
+ error: string().nullable().optional(),
50555
+ /**
50556
+ * The addons the target version would refuse to start on this node's live
50557
+ * store (D877), present when the pre-flight refused the update
50558
+ * (`reason: 'addon-would-refuse'`). Optional for version skew.
50559
+ */
50560
+ blockers: array(UpdateBlockerSchema).optional()
49901
50561
  });
49902
50562
  method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
49903
50563
  kind: "mutation",
49904
50564
  auth: "admin"
49905
- }), method(object({
49906
- /** Explicit target version; omitted = latest from the registry. */
49907
- version: string().optional() }), ServerUpdateActionResultSchema, {
50565
+ }), method(object({
50566
+ /** Explicit target version; omitted = latest from the registry. */
50567
+ version: string().optional(),
50568
+ /**
50569
+ * Apply even though the pre-flight (D877) found addons the target would
50570
+ * refuse to start. Off by default: those addons stay down until the
50571
+ * remedy is run, which is the incident this gate exists to prevent.
50572
+ */
50573
+ acknowledgeRefusals: boolean().optional()
50574
+ }), ServerUpdateActionResultSchema, {
49908
50575
  kind: "mutation",
49909
50576
  auth: "admin",
49910
50577
  timeoutMs: 16 * 6e4
@@ -52350,7 +53017,9 @@ var ManifestShapeSchema = object({
52350
53017
  var AddonProcessSchema = object({
52351
53018
  pid: number().optional(),
52352
53019
  mode: string(),
52353
- state: string()
53020
+ state: string(),
53021
+ /** Why the runner is `refused` (an addon's own words), when it is (D877). */
53022
+ reason: string().optional()
52354
53023
  });
52355
53024
  /**
52356
53025
  * Per-addon health snapshot from the kernel's AddonHealthMonitor.
@@ -53118,7 +53787,8 @@ var batteryCapability = {
53118
53787
  DeviceType.Button,
53119
53788
  DeviceType.Switch,
53120
53789
  DeviceType.PetFeeder,
53121
- DeviceType.Container
53790
+ DeviceType.Container,
53791
+ DeviceType.Thermostat
53122
53792
  ],
53123
53793
  methods: {
53124
53794
  /**
@@ -53739,6 +54409,12 @@ var ClimateControlStatusSchema = object({
53739
54409
  /** Horizontal louver swing on/off. Null when the device has no
53740
54410
  * horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
53741
54411
  swingHorizontal: boolean().nullable(),
54412
+ /** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
54413
+ minTemp: number().nullable().optional(),
54414
+ /** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
54415
+ maxTemp: number().nullable().optional(),
54416
+ /** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
54417
+ tempStep: number().positive().nullable().optional(),
53742
54418
  /** Ms epoch when the slice was last updated (push or command). */
53743
54419
  lastFetchedAt: number()
53744
54420
  });
@@ -54593,6 +55269,161 @@ onStatusChanged: { data: object({
54593
55269
  * whether persisting is worth a SQLite commit. */
54594
55270
  volatileStateFields: ["lastChangedAt"]
54595
55271
  };
55272
+ /**
55273
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55274
+ * consumable levels (salt, rinse aid) and common program options.
55275
+ *
55276
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55277
+ * by any integration that exposes the same program / option surface.
55278
+ *
55279
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55280
+ * provider refreshes the slice on an interval and eagerly after commands.
55281
+ */
55282
+ var DishwasherStateSchema = _enum([
55283
+ "idle",
55284
+ "running",
55285
+ "paused",
55286
+ "finished",
55287
+ "error",
55288
+ "unavailable"
55289
+ ]);
55290
+ var DishwasherConsumableLevelSchema = _enum([
55291
+ "ok",
55292
+ "low",
55293
+ "empty"
55294
+ ]);
55295
+ var DishwasherStatusSchema = object({
55296
+ state: DishwasherStateSchema,
55297
+ /** Active program id/name, or null when none selected / unknown. */
55298
+ program: string().nullable(),
55299
+ /** Program tokens the hardware accepts — drives the UI selector. */
55300
+ availablePrograms: array(string()),
55301
+ /** Minutes remaining on the active cycle, or null when not running. */
55302
+ remainingMinutes: number().int().nonnegative().nullable(),
55303
+ /** Cycle completion 0..100, or null when not applicable. */
55304
+ progressPercent: number().min(0).max(100).nullable(),
55305
+ /** True when the door is reported open. */
55306
+ doorOpen: boolean(),
55307
+ /** True when remote start is allowed (door closed, power on, etc.). */
55308
+ remoteStartAllowed: boolean(),
55309
+ /** Main power / switched-on state. */
55310
+ powerOn: boolean(),
55311
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55312
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55313
+ halfLoad: boolean(),
55314
+ hygienePlus: boolean(),
55315
+ /** Extra dry option when the appliance exposes it. */
55316
+ extraDry: boolean(),
55317
+ /** Intensive zone (lower basket) when the appliance exposes it. */
55318
+ intensiveZone: boolean(),
55319
+ /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
55320
+ varioSpeedPlus: boolean(),
55321
+ /** Child lock (controls disabled on the appliance). */
55322
+ childLock: boolean(),
55323
+ errorCode: number().nullable(),
55324
+ errorLabel: string().nullable(),
55325
+ lastFetchedAt: number()
55326
+ });
55327
+ var dishwasherCapability = {
55328
+ name: "dishwasher",
55329
+ scope: "device",
55330
+ deviceNative: true,
55331
+ mode: "singleton",
55332
+ deviceTypes: [DeviceType.Dishwasher],
55333
+ methods: {
55334
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55335
+ kind: "mutation",
55336
+ auth: "protected"
55337
+ }),
55338
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55339
+ kind: "mutation",
55340
+ auth: "protected"
55341
+ }),
55342
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55343
+ kind: "mutation",
55344
+ auth: "protected"
55345
+ }),
55346
+ setProgram: method(object({
55347
+ deviceId: number().int().nonnegative(),
55348
+ program: string().min(1)
55349
+ }), _void(), {
55350
+ kind: "mutation",
55351
+ auth: "protected"
55352
+ }),
55353
+ setPower: method(object({
55354
+ deviceId: number().int().nonnegative(),
55355
+ on: boolean()
55356
+ }), _void(), {
55357
+ kind: "mutation",
55358
+ auth: "protected"
55359
+ }),
55360
+ setHalfLoad: method(object({
55361
+ deviceId: number().int().nonnegative(),
55362
+ on: boolean()
55363
+ }), _void(), {
55364
+ kind: "mutation",
55365
+ auth: "protected"
55366
+ }),
55367
+ setHygienePlus: method(object({
55368
+ deviceId: number().int().nonnegative(),
55369
+ on: boolean()
55370
+ }), _void(), {
55371
+ kind: "mutation",
55372
+ auth: "protected"
55373
+ }),
55374
+ setExtraDry: method(object({
55375
+ deviceId: number().int().nonnegative(),
55376
+ on: boolean()
55377
+ }), _void(), {
55378
+ kind: "mutation",
55379
+ auth: "protected"
55380
+ }),
55381
+ setIntensiveZone: method(object({
55382
+ deviceId: number().int().nonnegative(),
55383
+ on: boolean()
55384
+ }), _void(), {
55385
+ kind: "mutation",
55386
+ auth: "protected"
55387
+ }),
55388
+ setVarioSpeedPlus: method(object({
55389
+ deviceId: number().int().nonnegative(),
55390
+ on: boolean()
55391
+ }), _void(), {
55392
+ kind: "mutation",
55393
+ auth: "protected"
55394
+ }),
55395
+ setChildLock: method(object({
55396
+ deviceId: number().int().nonnegative(),
55397
+ on: boolean()
55398
+ }), _void(), {
55399
+ kind: "mutation",
55400
+ auth: "protected"
55401
+ }),
55402
+ setOption: method(object({
55403
+ deviceId: number().int().nonnegative(),
55404
+ key: string().min(1),
55405
+ value: union([
55406
+ boolean(),
55407
+ string(),
55408
+ number()
55409
+ ])
55410
+ }), _void(), {
55411
+ kind: "mutation",
55412
+ auth: "protected"
55413
+ })
55414
+ },
55415
+ status: {
55416
+ schema: DishwasherStatusSchema,
55417
+ kind: "poll"
55418
+ },
55419
+ runtimeState: DishwasherStatusSchema,
55420
+ durability: "session",
55421
+ history: { fields: { progressPercent: {
55422
+ kind: "gauge",
55423
+ unit: "%",
55424
+ deadband: 2
55425
+ } } }
55426
+ };
54596
55427
  var DoorbellStatusSchema = object({
54597
55428
  /** Ms epoch of the last press. null = never observed since this provider started. */
54598
55429
  lastPressedAt: number().nullable(),
@@ -55395,6 +56226,32 @@ var gasCapability = {
55395
56226
  * whether persisting is worth a SQLite commit. */
55396
56227
  volatileStateFields: ["lastChangedAt"]
55397
56228
  };
56229
+ var HeatingValveStatusSchema = object({
56230
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56231
+ position: number().min(0).max(100).nullable(),
56232
+ /** Ms epoch when the slice was last updated (push or poll). */
56233
+ lastFetchedAt: number()
56234
+ });
56235
+ var heatingValveCapability = {
56236
+ name: "heating-valve",
56237
+ scope: "device",
56238
+ deviceNative: true,
56239
+ mode: "singleton",
56240
+ deviceTypes: [DeviceType.Thermostat],
56241
+ methods: {},
56242
+ status: {
56243
+ schema: HeatingValveStatusSchema,
56244
+ kind: "push"
56245
+ },
56246
+ runtimeState: HeatingValveStatusSchema,
56247
+ durability: "session",
56248
+ history: { fields: { position: {
56249
+ kind: "gauge",
56250
+ unit: "%",
56251
+ deadband: 1
56252
+ } } },
56253
+ volatileStateFields: ["lastFetchedAt"]
56254
+ };
55398
56255
  /**
55399
56256
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
55400
56257
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -56527,7 +57384,19 @@ var TlsStatusSchema = object({
56527
57384
  sans: array(string()),
56528
57385
  caCertPem: string().nullable(),
56529
57386
  reissueError: string().nullable(),
56530
- restartRequired: boolean()
57387
+ restartRequired: boolean(),
57388
+ /** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
57389
+ caMissing: boolean(),
57390
+ /** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
57391
+ localCaConstrained: boolean().nullable(),
57392
+ /** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
57393
+ caReplacedAt: string().nullable(),
57394
+ /** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
57395
+ storedUpload: object({
57396
+ leafFingerprintSha256: string(),
57397
+ validTo: string(),
57398
+ hasCa: boolean()
57399
+ }).nullable()
56531
57400
  });
56532
57401
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
56533
57402
  /**
@@ -56583,6 +57452,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
56583
57452
  }), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
56584
57453
  kind: "mutation",
56585
57454
  auth: "admin"
57455
+ }), method(_void(), TlsStatusSchema, {
57456
+ kind: "mutation",
57457
+ auth: "admin"
56586
57458
  });
56587
57459
  var LockControlStatusSchema = object({
56588
57460
  /** Lifecycle state of the lock. `jammed` means the motor reported
@@ -63076,7 +63948,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
63076
63948
  kind: "mutation",
63077
63949
  auth: "admin",
63078
63950
  access: "delete"
63079
- }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(object({
63951
+ }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
63952
+ kind: "mutation",
63953
+ auth: "admin",
63954
+ access: "create"
63955
+ }), method(object({
63080
63956
  userId: string(),
63081
63957
  code: string()
63082
63958
  }), object({ valid: boolean() }), {
@@ -64796,6 +65672,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
64796
65672
  dayNight: dayNightCapability,
64797
65673
  deviceDiscovery: deviceDiscoveryCapability,
64798
65674
  deviceStatus: deviceStatusCapability,
65675
+ dishwasher: dishwasherCapability,
64799
65676
  doorbell: doorbellCapability,
64800
65677
  enumSensor: enumSensorCapability,
64801
65678
  eventEmitter: eventEmitterCapability,
@@ -64803,6 +65680,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
64803
65680
  featureProbe: featureProbeCapability,
64804
65681
  flood: floodCapability,
64805
65682
  gas: gasCapability,
65683
+ heatingValve: heatingValveCapability,
64806
65684
  humidifier: humidifierCapability,
64807
65685
  humiditySensor: humiditySensorCapability,
64808
65686
  image: imageCapability,
@@ -64888,13 +65766,14 @@ var BaseDevice$1 = class {
64888
65766
  get state() {
64889
65767
  if (!this._stateProxyCache) {
64890
65768
  const cache = {};
64891
- const handler = { get: (_target, key) => {
65769
+ const handler = { get: (target, key) => {
64892
65770
  const k = key;
64893
- if (k in cache) return cache[k];
65771
+ const existing = Reflect.get(target, k);
65772
+ if (existing !== void 0) return existing;
64894
65773
  const cap = DEVICE_LOCAL_STATE_CAPS[k];
64895
65774
  if (!cap) return void 0;
64896
65775
  const proxy = this.sliceProxy(cap);
64897
- cache[k] = proxy;
65776
+ Reflect.set(target, k, proxy);
64898
65777
  return proxy;
64899
65778
  } };
64900
65779
  this._stateProxyCache = new Proxy(cache, handler);
@@ -65093,7 +65972,7 @@ var BaseDevice$1 = class {
65093
65972
  async updateSourceInfo(patch) {
65094
65973
  const next = mergeSourceInfo(this.sourceInfo, patch);
65095
65974
  this._sourceInfoCache = Object.freeze({ ...next });
65096
- const action = this.ctx.api?.deviceManager?.setMetadata;
65975
+ const action = this.ctx.api.deviceManager?.setMetadata;
65097
65976
  if (action) try {
65098
65977
  await action.mutate({
65099
65978
  deviceId: this.id,
@@ -65128,7 +66007,7 @@ var BaseDevice$1 = class {
65128
66007
  * device boot on a meta refresh.
65129
66008
  */
65130
66009
  async refreshFeatures() {
65131
- const action = this.ctx.api?.deviceManager?.registerDevice;
66010
+ const action = this.ctx.api.deviceManager?.registerDevice;
65132
66011
  if (!action) return;
65133
66012
  try {
65134
66013
  await action.mutate({
@@ -65527,6 +66406,12 @@ var BaseDeviceProvider = class extends BaseAddon {
65527
66406
  provider: this
65528
66407
  }];
65529
66408
  }
66409
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66410
+ providerRegistrationsFromSuper(result) {
66411
+ if (Array.isArray(result)) return result;
66412
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66413
+ return [];
66414
+ }
65530
66415
  async onShutdown() {
65531
66416
  this._restoreShuttingDown = true;
65532
66417
  this.cancelRestoreRetries();
@@ -66053,7 +66938,7 @@ var BaseDeviceProvider = class extends BaseAddon {
66053
66938
  return toDeviceSummary(device, this.addonId);
66054
66939
  }
66055
66940
  };
66056
- DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder;
66941
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Camera, DeviceType.Hub, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
66057
66942
  new Set(Object.values(DeviceType));
66058
66943
  Object.freeze({
66059
66944
  "accessories.getStatus": {
@@ -67202,6 +68087,12 @@ Object.freeze({
67202
68087
  addonId: null,
67203
68088
  access: "view"
67204
68089
  },
68090
+ "coreBlocks.migrateRawSecrets": {
68091
+ capName: "core-blocks",
68092
+ capScope: "system",
68093
+ addonId: null,
68094
+ access: "create"
68095
+ },
67205
68096
  "coreBlocks.restart": {
67206
68097
  capName: "core-blocks",
67207
68098
  capScope: "system",
@@ -68468,6 +69359,84 @@ Object.freeze({
68468
69359
  addonId: null,
68469
69360
  access: "view"
68470
69361
  },
69362
+ "dishwasher.getStatus": {
69363
+ capName: "dishwasher",
69364
+ capScope: "device",
69365
+ addonId: null,
69366
+ access: "view"
69367
+ },
69368
+ "dishwasher.pause": {
69369
+ capName: "dishwasher",
69370
+ capScope: "device",
69371
+ addonId: null,
69372
+ access: "create"
69373
+ },
69374
+ "dishwasher.setChildLock": {
69375
+ capName: "dishwasher",
69376
+ capScope: "device",
69377
+ addonId: null,
69378
+ access: "create"
69379
+ },
69380
+ "dishwasher.setExtraDry": {
69381
+ capName: "dishwasher",
69382
+ capScope: "device",
69383
+ addonId: null,
69384
+ access: "create"
69385
+ },
69386
+ "dishwasher.setHalfLoad": {
69387
+ capName: "dishwasher",
69388
+ capScope: "device",
69389
+ addonId: null,
69390
+ access: "create"
69391
+ },
69392
+ "dishwasher.setHygienePlus": {
69393
+ capName: "dishwasher",
69394
+ capScope: "device",
69395
+ addonId: null,
69396
+ access: "create"
69397
+ },
69398
+ "dishwasher.setIntensiveZone": {
69399
+ capName: "dishwasher",
69400
+ capScope: "device",
69401
+ addonId: null,
69402
+ access: "create"
69403
+ },
69404
+ "dishwasher.setOption": {
69405
+ capName: "dishwasher",
69406
+ capScope: "device",
69407
+ addonId: null,
69408
+ access: "create"
69409
+ },
69410
+ "dishwasher.setPower": {
69411
+ capName: "dishwasher",
69412
+ capScope: "device",
69413
+ addonId: null,
69414
+ access: "create"
69415
+ },
69416
+ "dishwasher.setProgram": {
69417
+ capName: "dishwasher",
69418
+ capScope: "device",
69419
+ addonId: null,
69420
+ access: "create"
69421
+ },
69422
+ "dishwasher.setVarioSpeedPlus": {
69423
+ capName: "dishwasher",
69424
+ capScope: "device",
69425
+ addonId: null,
69426
+ access: "create"
69427
+ },
69428
+ "dishwasher.start": {
69429
+ capName: "dishwasher",
69430
+ capScope: "device",
69431
+ addonId: null,
69432
+ access: "create"
69433
+ },
69434
+ "dishwasher.stop": {
69435
+ capName: "dishwasher",
69436
+ capScope: "device",
69437
+ addonId: null,
69438
+ access: "create"
69439
+ },
68471
69440
  "doorbell.getStatus": {
68472
69441
  capName: "doorbell",
68473
69442
  capScope: "device",
@@ -68678,6 +69647,12 @@ Object.freeze({
68678
69647
  addonId: null,
68679
69648
  access: "view"
68680
69649
  },
69650
+ "heatingValve.getStatus": {
69651
+ capName: "heating-valve",
69652
+ capScope: "device",
69653
+ addonId: null,
69654
+ access: "view"
69655
+ },
68681
69656
  "humidifier.getStatus": {
68682
69657
  capName: "humidifier",
68683
69658
  capScope: "device",
@@ -68888,6 +69863,12 @@ Object.freeze({
68888
69863
  addonId: null,
68889
69864
  access: "create"
68890
69865
  },
69866
+ "keychainAdmin.importSecret": {
69867
+ capName: "keychain-admin",
69868
+ capScope: "system",
69869
+ addonId: null,
69870
+ access: "create"
69871
+ },
68891
69872
  "keychainAdmin.listAudit": {
68892
69873
  capName: "keychain-admin",
68893
69874
  capScope: "system",
@@ -69056,6 +70037,12 @@ Object.freeze({
69056
70037
  addonId: null,
69057
70038
  access: "view"
69058
70039
  },
70040
+ "llm.migrateRawSecrets": {
70041
+ capName: "llm",
70042
+ capScope: "system",
70043
+ addonId: null,
70044
+ access: "create"
70045
+ },
69059
70046
  "llm.resolveModelRef": {
69060
70047
  capName: "llm",
69061
70048
  capScope: "system",
@@ -69284,6 +70271,12 @@ Object.freeze({
69284
70271
  addonId: null,
69285
70272
  access: "create"
69286
70273
  },
70274
+ "localNetwork.useStoredUploadedCertificate": {
70275
+ capName: "local-network",
70276
+ capScope: "system",
70277
+ addonId: null,
70278
+ access: "create"
70279
+ },
69287
70280
  "lockControl.getStatus": {
69288
70281
  capName: "lock-control",
69289
70282
  capScope: "device",
@@ -71936,6 +72929,30 @@ Object.freeze({
71936
72929
  addonId: null,
71937
72930
  access: "create"
71938
72931
  },
72932
+ "recordEntries.deleteEntry": {
72933
+ capName: "record-entries",
72934
+ capScope: "system",
72935
+ addonId: null,
72936
+ access: "delete"
72937
+ },
72938
+ "recordEntries.listEntries": {
72939
+ capName: "record-entries",
72940
+ capScope: "system",
72941
+ addonId: null,
72942
+ access: "view"
72943
+ },
72944
+ "recordEntries.listEntryKinds": {
72945
+ capName: "record-entries",
72946
+ capScope: "system",
72947
+ addonId: null,
72948
+ access: "view"
72949
+ },
72950
+ "recordEntries.putEntry": {
72951
+ capName: "record-entries",
72952
+ capScope: "system",
72953
+ addonId: null,
72954
+ access: "create"
72955
+ },
71939
72956
  "recording.getAvailability": {
71940
72957
  capName: "recording",
71941
72958
  capScope: "device",
@@ -72236,6 +73253,102 @@ Object.freeze({
72236
73253
  addonId: null,
72237
73254
  access: "view"
72238
73255
  },
73256
+ "records.aggregate": {
73257
+ capName: "records",
73258
+ capScope: "system",
73259
+ addonId: null,
73260
+ access: "view"
73261
+ },
73262
+ "records.allocateId": {
73263
+ capName: "records",
73264
+ capScope: "system",
73265
+ addonId: null,
73266
+ access: "create"
73267
+ },
73268
+ "records.count": {
73269
+ capName: "records",
73270
+ capScope: "system",
73271
+ addonId: null,
73272
+ access: "view"
73273
+ },
73274
+ "records.declareKinds": {
73275
+ capName: "records",
73276
+ capScope: "system",
73277
+ addonId: null,
73278
+ access: "create"
73279
+ },
73280
+ "records.delete": {
73281
+ capName: "records",
73282
+ capScope: "system",
73283
+ addonId: null,
73284
+ access: "delete"
73285
+ },
73286
+ "records.deleteDevice": {
73287
+ capName: "records",
73288
+ capScope: "system",
73289
+ addonId: null,
73290
+ access: "delete"
73291
+ },
73292
+ "records.deleteMany": {
73293
+ capName: "records",
73294
+ capScope: "system",
73295
+ addonId: null,
73296
+ access: "delete"
73297
+ },
73298
+ "records.deleteWhere": {
73299
+ capName: "records",
73300
+ capScope: "system",
73301
+ addonId: null,
73302
+ access: "delete"
73303
+ },
73304
+ "records.get": {
73305
+ capName: "records",
73306
+ capScope: "system",
73307
+ addonId: null,
73308
+ access: "view"
73309
+ },
73310
+ "records.getMany": {
73311
+ capName: "records",
73312
+ capScope: "system",
73313
+ addonId: null,
73314
+ access: "view"
73315
+ },
73316
+ "records.histogram": {
73317
+ capName: "records",
73318
+ capScope: "system",
73319
+ addonId: null,
73320
+ access: "view"
73321
+ },
73322
+ "records.patch": {
73323
+ capName: "records",
73324
+ capScope: "system",
73325
+ addonId: null,
73326
+ access: "create"
73327
+ },
73328
+ "records.put": {
73329
+ capName: "records",
73330
+ capScope: "system",
73331
+ addonId: null,
73332
+ access: "create"
73333
+ },
73334
+ "records.putMany": {
73335
+ capName: "records",
73336
+ capScope: "system",
73337
+ addonId: null,
73338
+ access: "create"
73339
+ },
73340
+ "records.query": {
73341
+ capName: "records",
73342
+ capScope: "system",
73343
+ addonId: null,
73344
+ access: "view"
73345
+ },
73346
+ "records.secretRefs": {
73347
+ capName: "records",
73348
+ capScope: "system",
73349
+ addonId: null,
73350
+ access: "view"
73351
+ },
72239
73352
  "sceneMonitor.captureReference": {
72240
73353
  capName: "scene-monitor",
72241
73354
  capScope: "device",
@@ -72668,6 +73781,48 @@ Object.freeze({
72668
73781
  addonId: null,
72669
73782
  access: "create"
72670
73783
  },
73784
+ "storageAdmin.adoptRecords": {
73785
+ capName: "storage-admin",
73786
+ capScope: "system",
73787
+ addonId: null,
73788
+ access: "create"
73789
+ },
73790
+ "storageAdmin.dropCollection": {
73791
+ capName: "storage-admin",
73792
+ capScope: "system",
73793
+ addonId: null,
73794
+ access: "delete"
73795
+ },
73796
+ "storageAdmin.isAdoptedLegacyTable": {
73797
+ capName: "storage-admin",
73798
+ capScope: "system",
73799
+ addonId: null,
73800
+ access: "view"
73801
+ },
73802
+ "storageAdmin.listKinds": {
73803
+ capName: "storage-admin",
73804
+ capScope: "system",
73805
+ addonId: null,
73806
+ access: "view"
73807
+ },
73808
+ "storageAdmin.listTables": {
73809
+ capName: "storage-admin",
73810
+ capScope: "system",
73811
+ addonId: null,
73812
+ access: "view"
73813
+ },
73814
+ "storageAdmin.readLegacyCollection": {
73815
+ capName: "storage-admin",
73816
+ capScope: "system",
73817
+ addonId: null,
73818
+ access: "view"
73819
+ },
73820
+ "storageAdmin.readRecords": {
73821
+ capName: "storage-admin",
73822
+ capScope: "system",
73823
+ addonId: null,
73824
+ access: "view"
73825
+ },
72671
73826
  "storageEvictable.evict": {
72672
73827
  capName: "storage-evictable",
72673
73828
  capScope: "system",
@@ -73580,6 +74735,12 @@ Object.freeze({
73580
74735
  addonId: null,
73581
74736
  access: "view"
73582
74737
  },
74738
+ "userManagement.migrateRawSecrets": {
74739
+ capName: "user-management",
74740
+ capScope: "system",
74741
+ addonId: null,
74742
+ access: "create"
74743
+ },
73583
74744
  "userManagement.oauthExchangeCode": {
73584
74745
  capName: "user-management",
73585
74746
  capScope: "system",
@@ -74079,7 +75240,7 @@ Object.freeze({
74079
75240
  access: "create"
74080
75241
  }
74081
75242
  });
74082
- DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder;
75243
+ DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher;
74083
75244
  DeviceFeature.BatteryOperated;
74084
75245
  Object.freeze({
74085
75246
  "accessories.getStatus": [{
@@ -74903,6 +76064,71 @@ Object.freeze({
74903
76064
  form: "single",
74904
76065
  optional: false
74905
76066
  }],
76067
+ "dishwasher.getStatus": [{
76068
+ name: "deviceId",
76069
+ form: "single",
76070
+ optional: false
76071
+ }],
76072
+ "dishwasher.pause": [{
76073
+ name: "deviceId",
76074
+ form: "single",
76075
+ optional: false
76076
+ }],
76077
+ "dishwasher.setChildLock": [{
76078
+ name: "deviceId",
76079
+ form: "single",
76080
+ optional: false
76081
+ }],
76082
+ "dishwasher.setExtraDry": [{
76083
+ name: "deviceId",
76084
+ form: "single",
76085
+ optional: false
76086
+ }],
76087
+ "dishwasher.setHalfLoad": [{
76088
+ name: "deviceId",
76089
+ form: "single",
76090
+ optional: false
76091
+ }],
76092
+ "dishwasher.setHygienePlus": [{
76093
+ name: "deviceId",
76094
+ form: "single",
76095
+ optional: false
76096
+ }],
76097
+ "dishwasher.setIntensiveZone": [{
76098
+ name: "deviceId",
76099
+ form: "single",
76100
+ optional: false
76101
+ }],
76102
+ "dishwasher.setOption": [{
76103
+ name: "deviceId",
76104
+ form: "single",
76105
+ optional: false
76106
+ }],
76107
+ "dishwasher.setPower": [{
76108
+ name: "deviceId",
76109
+ form: "single",
76110
+ optional: false
76111
+ }],
76112
+ "dishwasher.setProgram": [{
76113
+ name: "deviceId",
76114
+ form: "single",
76115
+ optional: false
76116
+ }],
76117
+ "dishwasher.setVarioSpeedPlus": [{
76118
+ name: "deviceId",
76119
+ form: "single",
76120
+ optional: false
76121
+ }],
76122
+ "dishwasher.start": [{
76123
+ name: "deviceId",
76124
+ form: "single",
76125
+ optional: false
76126
+ }],
76127
+ "dishwasher.stop": [{
76128
+ name: "deviceId",
76129
+ form: "single",
76130
+ optional: false
76131
+ }],
74906
76132
  "doorbell.getStatus": [{
74907
76133
  name: "deviceId",
74908
76134
  form: "single",
@@ -74972,6 +76198,11 @@ Object.freeze({
74972
76198
  form: "single",
74973
76199
  optional: false
74974
76200
  }],
76201
+ "heatingValve.getStatus": [{
76202
+ name: "deviceId",
76203
+ form: "single",
76204
+ optional: false
76205
+ }],
74975
76206
  "humidifier.getStatus": [{
74976
76207
  name: "deviceId",
74977
76208
  form: "single",
@@ -76256,6 +77487,37 @@ Object.freeze({
76256
77487
  form: "single",
76257
77488
  optional: false
76258
77489
  }],
77490
+ "records.count": [{
77491
+ name: "deviceId",
77492
+ form: "single",
77493
+ optional: true
77494
+ }],
77495
+ "records.deleteDevice": [{
77496
+ name: "deviceId",
77497
+ form: "single",
77498
+ optional: false
77499
+ }],
77500
+ "records.deleteWhere": [{
77501
+ name: "deviceId",
77502
+ form: "single",
77503
+ optional: true
77504
+ }],
77505
+ "records.histogram": [{
77506
+ name: "deviceId",
77507
+ form: "single",
77508
+ optional: true
77509
+ }],
77510
+ "records.putMany": [{
77511
+ name: "records",
77512
+ form: "object-array",
77513
+ optional: false,
77514
+ itemField: "deviceId"
77515
+ }],
77516
+ "records.query": [{
77517
+ name: "deviceId",
77518
+ form: "single",
77519
+ optional: true
77520
+ }],
76259
77521
  "sceneMonitor.captureReference": [{
76260
77522
  name: "deviceId",
76261
77523
  form: "single",
@@ -76372,6 +77634,17 @@ Object.freeze({
76372
77634
  form: "single",
76373
77635
  optional: false
76374
77636
  }],
77637
+ "storageAdmin.adoptRecords": [{
77638
+ name: "records",
77639
+ form: "object-array",
77640
+ optional: false,
77641
+ itemField: "deviceId"
77642
+ }],
77643
+ "storageAdmin.readRecords": [{
77644
+ name: "deviceId",
77645
+ form: "single",
77646
+ optional: true
77647
+ }],
76375
77648
  "streamBroker.acquireEgressTranscode": [{
76376
77649
  name: "deviceId",
76377
77650
  form: "single",
@@ -84088,7 +85361,7 @@ var DreoProviderAddon = class extends BaseDeviceProvider {
84088
85361
  super({});
84089
85362
  }
84090
85363
  async onInitialize() {
84091
- const regs = await super.onInitialize();
85364
+ const regs = this.providerRegistrationsFromSuper(await super.onInitialize());
84092
85365
  this.clients = new DreoClientRegistry(this.ctx.logger);
84093
85366
  this.clients.setOnConnected((integrationId) => {
84094
85367
  this.ctx.logger.info("Dreo: integration connected", { meta: { integrationId } });