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