@camstack/addon-provider-ecowitt 0.2.127 → 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 +1402 -129
  2. package/dist/addon.mjs +1402 -129
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let http = require("http");
3
3
  let events = require("events");
4
4
  let dgram = require("dgram");
5
- //#region ../types/dist/event-category-C4hVnRo8.mjs
5
+ //#region ../types/dist/event-category-BvOFi6PY.mjs
6
6
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
7
7
  EventCategory["SystemBoot"] = "system.boot";
8
8
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -66,6 +66,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
66
66
  * consumes this category and maps it to the `addon-crash-loop` kind.
67
67
  */
68
68
  EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
69
+ /**
70
+ * A runner whose addon refused to start with a typed reason (D877) - parked
71
+ * in `refused`, never counted by the crash breaker, retried on operator
72
+ * action. One event per refusal.
73
+ */
74
+ EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
75
+ /**
76
+ * A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
77
+ * `refused`. In-process telemetry for the boot check (re-evaluate while any
78
+ * runner is still pending) and the alert centre (close a recovered runner).
79
+ */
80
+ EventCategory["ProcessStateChanged"] = "process.state-changed";
81
+ /**
82
+ * The node's one-shot runner boot check (D877): planned runners against the
83
+ * process service, `degraded` when any is failed, refused or missing. The
84
+ * alert centre turns it into one alert and a direct critical push.
85
+ */
86
+ EventCategory["SystemRunnerCheck"] = "system.runner-check";
69
87
  EventCategory["AddonError"] = "addon.error";
70
88
  EventCategory["AddonPageReady"] = "addon.page-ready";
71
89
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5390,7 +5408,7 @@ var ZodIssueCode$1 = {
5390
5408
  var ZodFirstPartyTypeKind$1;
5391
5409
  ZodFirstPartyTypeKind$1 || (ZodFirstPartyTypeKind$1 = {});
5392
5410
  //#endregion
5393
- //#region ../types/dist/sleep-DRqxtc0C.mjs
5411
+ //#region ../types/dist/sleep-BegKjwUu.mjs
5394
5412
  /**
5395
5413
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5396
5414
  * window to float samples (D455).
@@ -5507,7 +5525,7 @@ function isKeychainStoredField(field) {
5507
5525
  var SECRET_CLEAR = { $secretClear: true };
5508
5526
  /** The `'***'` token D634 redaction writes for non-admins. */
5509
5527
  var LEGACY_DEVICE_REDACTION = "***";
5510
- function isRecord$2(value) {
5528
+ function isRecord$5(value) {
5511
5529
  return typeof value === "object" && value !== null && !Array.isArray(value);
5512
5530
  }
5513
5531
  function makeSecretMarker(ref) {
@@ -5518,12 +5536,12 @@ function makeSecretMarker(ref) {
5518
5536
  }
5519
5537
  /** A stored marker: an object whose `$secret` is a non-empty string. */
5520
5538
  function isSecretMarker(value) {
5521
- if (!isRecord$2(value)) return false;
5539
+ if (!isRecord$5(value)) return false;
5522
5540
  const ref = value["$secret"];
5523
5541
  return typeof ref === "string" && ref.length > 0;
5524
5542
  }
5525
5543
  function isSecretClear(value) {
5526
- return isRecord$2(value) && value["$secretClear"] === true;
5544
+ return isRecord$5(value) && value["$secretClear"] === true;
5527
5545
  }
5528
5546
  /**
5529
5547
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -6133,7 +6151,7 @@ var KeychainWriteRefusedError = class extends Error {
6133
6151
  }
6134
6152
  };
6135
6153
  var KEEP = { kind: "keep" };
6136
- function isRecord$1(value) {
6154
+ function isRecord$4(value) {
6137
6155
  return typeof value === "object" && value !== null && !Array.isArray(value);
6138
6156
  }
6139
6157
  function defaultMintId() {
@@ -6146,7 +6164,7 @@ function collectSecretMarkerRefs(value, out = []) {
6146
6164
  return out;
6147
6165
  }
6148
6166
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
6149
- else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6167
+ else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6150
6168
  return out;
6151
6169
  }
6152
6170
  async function storedValueEquals(secrets, marker, candidate) {
@@ -6201,7 +6219,7 @@ function rowId(row, idKey) {
6201
6219
  return null;
6202
6220
  }
6203
6221
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
6204
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
6222
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
6205
6223
  if (!Array.isArray(incoming)) {
6206
6224
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
6207
6225
  return {
@@ -6217,7 +6235,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
6217
6235
  const kept = /* @__PURE__ */ new Set();
6218
6236
  const rows = [];
6219
6237
  for (const row of incoming) {
6220
- if (!isRecord$1(row)) {
6238
+ if (!isRecord$4(row)) {
6221
6239
  rows.push(row);
6222
6240
  continue;
6223
6241
  }
@@ -6242,7 +6260,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6242
6260
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
6243
6261
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
6244
6262
  case "object": {
6245
- if (!isRecord$1(incoming)) {
6263
+ if (!isRecord$4(incoming)) {
6246
6264
  if (incoming === void 0) return KEEP;
6247
6265
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
6248
6266
  return {
@@ -6250,7 +6268,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6250
6268
  value: incoming
6251
6269
  };
6252
6270
  }
6253
- const storedObj = isRecord$1(stored) ? stored : {};
6271
+ const storedObj = isRecord$4(stored) ? stored : {};
6254
6272
  return {
6255
6273
  kind: "value",
6256
6274
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -6373,7 +6391,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
6373
6391
  value: items
6374
6392
  };
6375
6393
  }
6376
- if (isRecord$1(v)) {
6394
+ if (isRecord$4(v)) {
6377
6395
  const out = {};
6378
6396
  for (const [k, child] of Object.entries(v)) {
6379
6397
  const s = substitute(child);
@@ -6405,7 +6423,7 @@ var SecretOverwriteRefusedError = class extends Error {
6405
6423
  this.name = "SecretOverwriteRefusedError";
6406
6424
  }
6407
6425
  };
6408
- function isRecord(value) {
6426
+ function isRecord$3(value) {
6409
6427
  return typeof value === "object" && value !== null && !Array.isArray(value);
6410
6428
  }
6411
6429
  function resolvedValue(pass, marker) {
@@ -6434,7 +6452,7 @@ function inArray(pass, incoming, stored) {
6434
6452
  return incoming.map((item, index) => {
6435
6453
  const twin = stored[index];
6436
6454
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
6437
- if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
6455
+ if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
6438
6456
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
6439
6457
  return item;
6440
6458
  });
@@ -6445,7 +6463,7 @@ function inArrayRow(pass, incoming, stored) {
6445
6463
  const twin = stored[key];
6446
6464
  if (isSecretMarker(twin)) {
6447
6465
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
6448
- } else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
6466
+ } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
6449
6467
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
6450
6468
  }
6451
6469
  return out;
@@ -6453,7 +6471,7 @@ function inArrayRow(pass, incoming, stored) {
6453
6471
  async function walk(pass, incoming, stored) {
6454
6472
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
6455
6473
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
6456
- if (!isRecord(incoming) || !isRecord(stored)) return incoming;
6474
+ if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
6457
6475
  const out = { ...incoming };
6458
6476
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
6459
6477
  return out;
@@ -6484,7 +6502,7 @@ async function restoreUnchangedSecrets(input) {
6484
6502
  function isJsonEqual(a, b) {
6485
6503
  if (Object.is(a, b)) return true;
6486
6504
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
6487
- if (isRecord(a) && isRecord(b)) {
6505
+ if (isRecord$3(a) && isRecord$3(b)) {
6488
6506
  const keys = Object.keys(a);
6489
6507
  if (keys.length !== Object.keys(b).length) return false;
6490
6508
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -6508,7 +6526,7 @@ function markerKeysOf(blob, owner) {
6508
6526
  }
6509
6527
  function nodeFromStored(value, owner) {
6510
6528
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
6511
- if (!isRecord(value)) return null;
6529
+ if (!isRecord$3(value)) return null;
6512
6530
  const children = /* @__PURE__ */ new Map();
6513
6531
  for (const [key, child] of Object.entries(value)) {
6514
6532
  const node = nodeFromStored(child, owner);
@@ -6641,7 +6659,6 @@ function createHandle(raw, opts) {
6641
6659
  const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
6642
6660
  const readAddonStoreResult = raw.readAddonStoreResult;
6643
6661
  const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
6644
- const readDeviceStoreBatch = raw.readDeviceStoreBatch;
6645
6662
  const overrides = {
6646
6663
  readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
6647
6664
  ...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
@@ -6665,12 +6682,12 @@ function createHandle(raw, opts) {
6665
6682
  };
6666
6683
  } } : {},
6667
6684
  readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
6668
- ...readDeviceStoreBatch !== void 0 ? { readDeviceStoreBatch: async (deviceIds) => {
6669
- const rows = await readDeviceStoreBatch.call(raw, deviceIds);
6685
+ readDeviceStoreBatch: async (deviceIds) => {
6686
+ const rows = await raw.readDeviceStoreBatch(deviceIds);
6670
6687
  const out = /* @__PURE__ */ new Map();
6671
6688
  for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
6672
6689
  return out;
6673
- } } : {},
6690
+ },
6674
6691
  writeAddonStore: async (patch) => {
6675
6692
  await writeAddon(patch);
6676
6693
  },
@@ -7297,7 +7314,7 @@ var BaseAddon = class {
7297
7314
  if (!ctx) return;
7298
7315
  const addonId = ctx.id;
7299
7316
  setImmediate(() => {
7300
- ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
7317
+ ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
7301
7318
  ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
7302
7319
  }).catch((err) => {
7303
7320
  ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
@@ -7497,7 +7514,7 @@ var BaseAddon = class {
7497
7514
  return this._addonSecretTree;
7498
7515
  }
7499
7516
  deviceSecretTree() {
7500
- this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
7517
+ this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
7501
7518
  return this._deviceSecretTree;
7502
7519
  }
7503
7520
  /**
@@ -7573,42 +7590,135 @@ var BaseAddon = class {
7573
7590
  this[timerOf] = timer;
7574
7591
  }
7575
7592
  /**
7576
- * Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
7577
- * transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
7578
- * swap, or any race where the SqliteSettingsBackend is between shutdown and
7579
- * re-initialize) doesn't propagate up into `initialize()` and leave the
7593
+ * Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
7594
+ * settings-store outage doesn't propagate up into `initialize()` and leave the
7580
7595
  * addon permanently broken.
7581
7596
  *
7582
- * Retry only the two known infra fingerprints. Anything else propagates so
7583
- * real bugs surface immediately. After the budget expires we fall back to
7584
- * `{}` (defaults) — the addon's first successful patch will rehydrate.
7597
+ * Two kinds of outage, two budgets:
7598
+ * - the store's own restart fingerprints (`SqliteSettingsBackend not
7599
+ * initialized`, `provider not available`): a short budget, then the addon
7600
+ * falls back to `{}` (defaults) - its first successful patch rehydrates;
7601
+ * - a TRANSPORT failure (the hub is restarting while this runner boots:
7602
+ * `discovery deadline exceeded`, `parent could not route`, a refused or
7603
+ * timed-out connection). Since D870 a runner's settings read THROWS instead
7604
+ * of answering `{}`, so without a budget a hub restart ends in a respawn
7605
+ * loop. A long, bounded budget; only after it the error propagates - the
7606
+ * addon never runs on defaults for a store it could not ask.
7607
+ * Anything else propagates immediately so real bugs surface.
7585
7608
  */
7586
7609
  async readAddonStoreWithRetry() {
7587
7610
  const settings = this.rawSettings();
7588
7611
  if (!settings) return {};
7589
- const delaysMs = [
7590
- 150,
7591
- 350,
7592
- 600,
7593
- 900
7594
- ];
7595
7612
  let lastErr;
7596
- for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
7613
+ for (let attempt = 0;; attempt++) try {
7597
7614
  const stored = await settings.readAddonStore() ?? {};
7598
7615
  this.settingsStoreReady = true;
7599
7616
  return stored;
7600
7617
  } catch (err) {
7601
7618
  lastErr = err;
7602
- const msg = err instanceof Error ? err.message : String(err);
7603
- if (!(msg.includes("SqliteSettingsBackend not initialized") || msg.includes("provider not available"))) throw err;
7604
- if (attempt === delaysMs.length) break;
7605
- await new Promise((r) => setTimeout(r, delaysMs[attempt]));
7619
+ const kind = classifyStoreError(err);
7620
+ if (kind === "permanent") throw err;
7621
+ const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
7622
+ if (delay === void 0) {
7623
+ if (kind === "transport") throw err;
7624
+ break;
7625
+ }
7626
+ await new Promise((r) => setTimeout(r, delay));
7606
7627
  }
7607
7628
  this.settingsStoreReady = false;
7608
7629
  this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
7609
7630
  return {};
7610
7631
  }
7611
7632
  };
7633
+ /** The settings store's own restart fingerprints. */
7634
+ var RESTART_RETRY_DELAYS_MS = [
7635
+ 150,
7636
+ 350,
7637
+ 600,
7638
+ 900
7639
+ ];
7640
+ /** A hub restarting under a booting runner: ~100 s in total. */
7641
+ var TRANSPORT_RETRY_DELAYS_MS = [
7642
+ 150,
7643
+ 350,
7644
+ 600,
7645
+ 900,
7646
+ 2e3,
7647
+ 5e3,
7648
+ 1e4,
7649
+ 2e4,
7650
+ 3e4,
7651
+ 3e4
7652
+ ];
7653
+ var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
7654
+ /** Node / socket error codes of a connection that did not happen or broke. */
7655
+ var TRANSPORT_CODES = new Set([
7656
+ "ECONNREFUSED",
7657
+ "ECONNRESET",
7658
+ "ETIMEDOUT",
7659
+ "EPIPE",
7660
+ "EHOSTUNREACH",
7661
+ "ENETUNREACH"
7662
+ ]);
7663
+ /** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
7664
+ var UNAVAILABLE_TRPC_CODES = new Set([
7665
+ "TIMEOUT",
7666
+ "SERVICE_UNAVAILABLE",
7667
+ "BAD_GATEWAY",
7668
+ "GATEWAY_TIMEOUT"
7669
+ ]);
7670
+ /** The exact phrases OUR transport raises when it cannot reach the hub. */
7671
+ var TRANSPORT_PHRASES = [
7672
+ "discovery deadline exceeded",
7673
+ "parent could not route child unowned cap call",
7674
+ "UDS request timed out after",
7675
+ "channel closed"
7676
+ ];
7677
+ /** Moleculer error `type`s of a call that could not be served right now. */
7678
+ var MOLECULER_TRANSIENT_TYPES = new Set([
7679
+ "REQUEST_TIMEOUT",
7680
+ "SERVICE_NOT_FOUND",
7681
+ "SERVICE_NOT_AVAILABLE",
7682
+ "REQUEST_REJECTED",
7683
+ "BROKER_DISCONNECTED"
7684
+ ]);
7685
+ function stringProp(value, key) {
7686
+ if (typeof value !== "object" || value === null) return void 0;
7687
+ const found = Reflect.get(value, key);
7688
+ return typeof found === "string" ? found : void 0;
7689
+ }
7690
+ /** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
7691
+ function errorCode(err) {
7692
+ const out = {};
7693
+ const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
7694
+ const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
7695
+ const node = stringProp(err, "code") ?? stringProp(cause, "code");
7696
+ if (node !== void 0) out.node = node;
7697
+ const trpc = stringProp(data, "code");
7698
+ if (trpc !== void 0) out.trpc = trpc;
7699
+ return out;
7700
+ }
7701
+ /**
7702
+ * Is a settings read failure worth retrying, and with which budget? Only
7703
+ * EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
7704
+ * one of the exact phrases our own transport raises. A message that merely
7705
+ * contains "timed out" or "unreachable" is not evidence of anything, and
7706
+ * `settings store not wired` is a wiring bug that retrying cannot fix.
7707
+ */
7708
+ function classifyStoreError(err) {
7709
+ const message = err instanceof Error ? err.message : String(err);
7710
+ if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
7711
+ const code = errorCode(err);
7712
+ if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
7713
+ if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
7714
+ if (typeof err === "object" && err !== null) {
7715
+ if (Reflect.get(err, "retryable") === true) return "transport";
7716
+ const type = stringProp(err, "type");
7717
+ if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
7718
+ }
7719
+ if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
7720
+ return "permanent";
7721
+ }
7612
7722
  /**
7613
7723
  * Collect the keys of every field marked `perNode: true`, recursing into
7614
7724
  * layout containers (`group` fields and `sub-tabs` tabs) the same way
@@ -7698,6 +7808,156 @@ var PeerBytesTicketSchema = object({
7698
7808
  */
7699
7809
  declaredBytes: number().int().nonnegative().nullable()
7700
7810
  });
7811
+ /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
7812
+ /** The files a kind may live in. `history` is device-history's (D850), never records. */
7813
+ var RECORD_DATABASES = ["settings", "events"];
7814
+ /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
7815
+ var RECORD_CLASSES = [
7816
+ "config",
7817
+ "ledger",
7818
+ "audit",
7819
+ "mirror",
7820
+ "ephemeral"
7821
+ ];
7822
+ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
7823
+ var RECORD_MAX_DATA_BYTES = 1024 * 1024;
7824
+ var RECORD_BATCH_MAX = 1e3;
7825
+ var RECORD_QUERY_MAX = 1e3;
7826
+ function defOf(schema) {
7827
+ const zodBag = Reflect.get(schema, "_zod");
7828
+ if (typeof zodBag !== "object" || zodBag === null) return {};
7829
+ const def = Reflect.get(zodBag, "def");
7830
+ if (typeof def !== "object" || def === null) return {};
7831
+ return def;
7832
+ }
7833
+ function declaredHere(schema) {
7834
+ return globalRegistry.get(schema)?.secret === true;
7835
+ }
7836
+ /** Wrapper kinds whose `innerType` is the field itself. */
7837
+ var WRAPPERS = new Set([
7838
+ "optional",
7839
+ "nullable",
7840
+ "default",
7841
+ "prefault",
7842
+ "catch",
7843
+ "readonly",
7844
+ "nonoptional"
7845
+ ]);
7846
+ /**
7847
+ * The schema layers that make up ONE field: the schema itself and every
7848
+ * wrapper below it (optional / default / nullable / readonly / catch), plus
7849
+ * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
7850
+ * `.transform` on `in`).
7851
+ */
7852
+ function layersOf(schema) {
7853
+ const out = [];
7854
+ const queue = [schema];
7855
+ while (queue.length > 0) {
7856
+ const s = queue.shift();
7857
+ if (!s || out.includes(s)) continue;
7858
+ out.push(s);
7859
+ const def = defOf(s);
7860
+ if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
7861
+ if (def.type === "pipe") {
7862
+ if (def.in) queue.push(def.in);
7863
+ if (def.out) queue.push(def.out);
7864
+ }
7865
+ }
7866
+ return out;
7867
+ }
7868
+ /** True when any layer of this field declares `.meta({ secret: true })`. */
7869
+ function isZodSecret(schema) {
7870
+ return layersOf(schema).some(declaredHere);
7871
+ }
7872
+ /**
7873
+ * Every declared secret path in a config schema: dotted keys, `[]` for "each
7874
+ * element of this array" (`connection.password`, `rows[].token`). A declared
7875
+ * object or array is reported as one path and not descended into — everything
7876
+ * under it is secret.
7877
+ */
7878
+ function collectZodSecretPaths(schema, prefix = "") {
7879
+ if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
7880
+ const paths = [];
7881
+ for (const layer of layersOf(schema)) {
7882
+ const def = defOf(layer);
7883
+ if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
7884
+ else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
7885
+ else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
7886
+ else if (def.type === "intersection") {
7887
+ if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
7888
+ if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
7889
+ }
7890
+ }
7891
+ return [...new Set(paths)];
7892
+ }
7893
+ /**
7894
+ * Record kinds (D881): the declaration an addon makes of one kind of fact, the
7895
+ * Zod row schema that describes it, and the helper that turns the two into the
7896
+ * JSON the engine stores.
7897
+ *
7898
+ * A kind is declared ONCE, next to the code that owns it, and the engine's
7899
+ * reconciler creates its indexes - nothing creates DDL at runtime from a write.
7900
+ * Everything the generic machinery needs (secret fields, the entry descriptor)
7901
+ * is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
7902
+ * never a field name (D879).
7903
+ */
7904
+ /** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
7905
+ var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
7906
+ var RecordIndexSchema = object({
7907
+ name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
7908
+ fields: array(RecordFieldPathSchema).min(1).max(4),
7909
+ unique: boolean().optional()
7910
+ }).strict();
7911
+ var RecordRetentionSchema = union([
7912
+ object({
7913
+ ttlMs: number().int().positive(),
7914
+ from: _enum(["at", "write"])
7915
+ }).strict(),
7916
+ object({
7917
+ maxRows: number().int().positive().optional(),
7918
+ maxRowsPerDevice: number().int().positive().optional()
7919
+ }).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
7920
+ object({
7921
+ owner: string().min(1),
7922
+ reason: string().min(1)
7923
+ }).strict(),
7924
+ object({ none: string().min(1) }).strict()
7925
+ ]);
7926
+ /** The descriptor a generic entries UI reads (D881 "generic entries"). */
7927
+ var EntryDescriptorSchema = object({
7928
+ title: string().min(1),
7929
+ /** The record body field shown as the entry's name. */
7930
+ nameField: string().min(1),
7931
+ /** JSON Schema of the entry body; `secret: true` marks a password field. */
7932
+ fields: record(string(), unknown())
7933
+ }).strict();
7934
+ /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
7935
+ var RecordKindDeclarationSchema = object({
7936
+ database: _enum(RECORD_DATABASES).default("settings"),
7937
+ class: _enum(RECORD_CLASSES),
7938
+ writeTrigger: string().min(1),
7939
+ device: _enum([
7940
+ "required",
7941
+ "optional",
7942
+ "none"
7943
+ ]).default("none"),
7944
+ at: _enum(["required", "none"]).default("none"),
7945
+ indexes: array(RecordIndexSchema).max(8).default([]),
7946
+ retention: RecordRetentionSchema,
7947
+ deviceRemoval: _enum(["delete", "none"]).default("none"),
7948
+ maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
7949
+ /** Derived from the Zod schema; never written by hand. */
7950
+ secretPaths: array(string().min(1)).default([]),
7951
+ /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
7952
+ secretArrayKeys: record(string(), string()).default({}),
7953
+ /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
7954
+ adoptsFrom: string().min(1).optional(),
7955
+ /** Kinds that must agree through `transact` sit in one file under one family name. */
7956
+ transactFamily: string().min(1).optional(),
7957
+ entry: EntryDescriptorSchema.optional()
7958
+ }).strict();
7959
+ /** The kind names: lower-case, dash separated, short enough for an index name. */
7960
+ var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
7701
7961
  /** Shared Zod schemas used across streaming capabilities. */
7702
7962
  var CamProfileSchema = _enum([
7703
7963
  "high",
@@ -8162,69 +8422,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8162
8422
  kind: "mutation",
8163
8423
  auth: "admin"
8164
8424
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8165
- function defOf(schema) {
8166
- return schema._zod?.def ?? {};
8167
- }
8168
- function declaredHere(schema) {
8169
- return globalRegistry.get(schema)?.secret === true;
8170
- }
8171
- /** Wrapper kinds whose `innerType` is the field itself. */
8172
- var WRAPPERS = new Set([
8173
- "optional",
8174
- "nullable",
8175
- "default",
8176
- "prefault",
8177
- "catch",
8178
- "readonly",
8179
- "nonoptional"
8180
- ]);
8181
- /**
8182
- * The schema layers that make up ONE field: the schema itself and every
8183
- * wrapper below it (optional / default / nullable / readonly / catch), plus
8184
- * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
8185
- * `.transform` on `in`).
8186
- */
8187
- function layersOf(schema) {
8188
- const out = [];
8189
- const queue = [schema];
8190
- while (queue.length > 0) {
8191
- const s = queue.shift();
8192
- if (!s || out.includes(s)) continue;
8193
- out.push(s);
8194
- const def = defOf(s);
8195
- if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
8196
- if (def.type === "pipe") {
8197
- if (def.in) queue.push(def.in);
8198
- if (def.out) queue.push(def.out);
8199
- }
8200
- }
8201
- return out;
8202
- }
8203
- /** True when any layer of this field declares `.meta({ secret: true })`. */
8204
- function isZodSecret(schema) {
8205
- return layersOf(schema).some(declaredHere);
8206
- }
8207
- /**
8208
- * Every declared secret path in a config schema: dotted keys, `[]` for "each
8209
- * element of this array" (`connection.password`, `rows[].token`). A declared
8210
- * object or array is reported as one path and not descended into — everything
8211
- * under it is secret.
8212
- */
8213
- function collectZodSecretPaths(schema, prefix = "") {
8214
- if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
8215
- const paths = [];
8216
- for (const layer of layersOf(schema)) {
8217
- const def = defOf(layer);
8218
- if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
8219
- else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
8220
- else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
8221
- else if (def.type === "intersection") {
8222
- if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
8223
- if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
8224
- }
8225
- }
8226
- return [...new Set(paths)];
8227
- }
8228
8425
  object({
8229
8426
  code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
8230
8427
  params: record(string(), union([string(), number()])).optional()
@@ -8244,7 +8441,7 @@ function userError(code, params, englishFallback) {
8244
8441
  return new CamstackError(code, params, englishFallback);
8245
8442
  }
8246
8443
  //#endregion
8247
- //#region ../types/dist/err-msg-DLerKiVO.mjs
8444
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8248
8445
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8249
8446
  DeviceType["Camera"] = "camera";
8250
8447
  DeviceType["Hub"] = "hub";
@@ -8336,6 +8533,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8336
8533
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8337
8534
  * integrations sharing the same food/desiccant/hopper surface. */
8338
8535
  DeviceType["PetFeeder"] = "pet-feeder";
8536
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8537
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8538
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8539
+ DeviceType["Dishwasher"] = "dishwasher";
8339
8540
  return DeviceType;
8340
8541
  }({});
8341
8542
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8513,6 +8714,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8513
8714
  /** Virtual HA toggle (input_boolean.*) — distinguishable from a
8514
8715
  * real Switch device for UI rendering / export adapters. */
8515
8716
  DeviceRole["BinaryHelper"] = "binary-helper";
8717
+ /** A smart plug: a `switch` whose source says it is an outlet (HA
8718
+ * `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
8719
+ DeviceRole["Outlet"] = "outlet";
8516
8720
  /** Generic motion / occupancy / moving event source. Distinct from
8517
8721
  * the camera accessory PirSensor role: that one is a camera child;
8518
8722
  * this is a standalone HA / 3rd-party motion sensor. */
@@ -8590,7 +8794,7 @@ function errMsg(err) {
8590
8794
  return String(err);
8591
8795
  }
8592
8796
  //#endregion
8593
- //#region ../types/dist/composition-EQ9Ok0Ee.mjs
8797
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8594
8798
  /**
8595
8799
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8596
8800
  *
@@ -11794,11 +11998,10 @@ var ClipModelMetaSchema = object({
11794
11998
  /**
11795
11999
  * The `vector-store` index this model's vectors live in. ONE feature space
11796
12000
  * per index: two models share an index only when their vectors are ranked
11797
- * against each other, which for CLIP means never across families. MobileCLIP
11798
- * S1 and S2 share `object-clip` for history (separated by the row's
11799
- * `modelId`); any other model gets its own.
12001
+ * against each other, which for CLIP means never across families. Every
12002
+ * model gets its own.
11800
12003
  */
11801
- vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
12004
+ vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
11802
12005
  /**
11803
12006
  * The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
11804
12007
  * must be unique per tokenizer: every model's siblings land in ONE flat
@@ -12977,8 +13180,13 @@ var AlertSeveritySchema = _enum([
12977
13180
  "info",
12978
13181
  "success",
12979
13182
  "warning",
12980
- "error"
13183
+ "error",
13184
+ "critical"
12981
13185
  ]);
13186
+ var AlertActionSchema = object({
13187
+ label: string(),
13188
+ href: string().optional()
13189
+ });
12982
13190
  var AlertStatusSchema = _enum([
12983
13191
  "active",
12984
13192
  "in-progress",
@@ -12996,6 +13204,7 @@ var AlertSchema = object({
12996
13204
  severity: AlertSeveritySchema,
12997
13205
  title: string(),
12998
13206
  message: string(),
13207
+ action: AlertActionSchema.optional(),
12999
13208
  status: AlertStatusSchema,
13000
13209
  progress: number().optional(),
13001
13210
  read: boolean(),
@@ -15531,6 +15740,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
15531
15740
  keyField: string()
15532
15741
  }).optional()
15533
15742
  })) });
15743
+ /**
15744
+ * The report of a one-shot "move this owner's plaintext secrets into the
15745
+ * keychain" run (D878). COUNTS only - never a value, never a ref.
15746
+ *
15747
+ * The owner runs it on its own rows, through its own write path; an operator
15748
+ * script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
15749
+ * Dry run (`apply: false`) reports what WOULD move and changes nothing.
15750
+ */
15751
+ var RawSecretMigrationInputSchema = object({
15752
+ /** `false` (the default of the script) = report only. */
15753
+ apply: boolean() });
15754
+ var RawSecretMigrationReportSchema = object({
15755
+ apply: boolean(),
15756
+ /** Rows that can carry a secret (a profile, an enrolment). */
15757
+ rows: number().int(),
15758
+ /** Rows whose secret was plaintext when the run started. */
15759
+ raw: number().int(),
15760
+ /** Rows that already held a keychain marker when the run started. */
15761
+ markers: number().int(),
15762
+ /** Plaintext rows moved by THIS run (always 0 on a dry run). */
15763
+ migrated: number().int(),
15764
+ /** Plaintext rows left in place because the move or its read-back failed. */
15765
+ failed: number().int(),
15766
+ /** After the run: rows still holding plaintext. */
15767
+ remainingRaw: number().int(),
15768
+ /** After the run: markers the keychain could not resolve right now. */
15769
+ unresolvedMarkers: number().int(),
15770
+ /**
15771
+ * A second, redundant copy of the secrets' rows that the run found (and, on
15772
+ * `apply`, deleted after verifying the first). Owners with a single copy omit it.
15773
+ */
15774
+ redundantCopies: number().int().optional(),
15775
+ /** True when nothing is raw and every marker resolves. */
15776
+ verified: boolean()
15777
+ });
15534
15778
  /** Where a block runs. The operator chooses — a block driving a device on an
15535
15779
  * agent is the reason placement is not fixed to the hub. */
15536
15780
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -15757,6 +16001,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
15757
16001
  }), SettingsUpdateResultSchema, {
15758
16002
  kind: "mutation",
15759
16003
  auth: "admin"
16004
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
16005
+ kind: "mutation",
16006
+ auth: "admin"
15760
16007
  }), method(object({}), object({ libs: array(object({
15761
16008
  filePath: string(),
15762
16009
  content: string()
@@ -16020,6 +16267,347 @@ id: union([string(), number()]) }), {
16020
16267
  auth: "admin"
16021
16268
  });
16022
16269
  /**
16270
+ * records - an addon's own facts and documents (D881): ledgers, audit rows,
16271
+ * config documents, mirrors. The third storage API next to `ctx.settings`
16272
+ * (operator intent, D870) and device-history (numbers over time, D850).
16273
+ *
16274
+ * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
16275
+ * crossed a process and stated by a hub in-process caller (`ctx.records` does
16276
+ * that with the addon id closed over). It is deliberately NOT in any input
16277
+ * schema, so a session can never supply it, and a call with no stamp is refused
16278
+ * `records/no-caller`. A kind is readable and writable only by its owner; other
16279
+ * addons go through the owner's capability.
16280
+ *
16281
+ * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
16282
+ * never `[]`. Secret fields are never on the wire: a read shows the
16283
+ * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
16284
+ * resolves itself, and a write may carry only a keychain marker bound to the
16285
+ * row's own ref.
16286
+ *
16287
+ * Internal: addons reach it through `ctx.records`, never directly.
16288
+ */
16289
+ var RecordIdSchema = string().min(1).max(256);
16290
+ /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
16291
+ var RecordBodySchema = record(string(), unknown());
16292
+ var RecordInputSchema = object({
16293
+ id: RecordIdSchema,
16294
+ /** The device this row belongs to (D865 removal, per-device reads). */
16295
+ deviceId: number().int().optional(),
16296
+ /** The domain clock, ms: observed / created / opened. */
16297
+ at: number().int().optional(),
16298
+ /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
16299
+ expiresAt: number().int().optional(),
16300
+ data: RecordBodySchema
16301
+ });
16302
+ var RecordViewSchema = object({
16303
+ id: string(),
16304
+ deviceId: number().int().nullable(),
16305
+ at: number().nullable(),
16306
+ expiresAt: number().nullable(),
16307
+ rev: number().int(),
16308
+ updatedAt: number(),
16309
+ data: RecordBodySchema
16310
+ });
16311
+ /** Declared index fields only. Anything else does not compile, by design. */
16312
+ var RecordWhereSchema = record(RecordFieldPathSchema, union([
16313
+ string(),
16314
+ number(),
16315
+ boolean(),
16316
+ object({ in: array(union([
16317
+ string(),
16318
+ number(),
16319
+ boolean()
16320
+ ])).min(1).max(RECORD_BATCH_MAX) }),
16321
+ object({
16322
+ gt: union([string(), number()]).optional(),
16323
+ gte: union([string(), number()]).optional(),
16324
+ lt: union([string(), number()]).optional(),
16325
+ lte: union([string(), number()]).optional()
16326
+ }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
16327
+ ]));
16328
+ var KindShape = { kind: RecordKindNameSchema };
16329
+ var TimeWindowShape = {
16330
+ deviceId: number().int().optional(),
16331
+ atFrom: number().optional(),
16332
+ atTo: number().optional()
16333
+ };
16334
+ var RecordQueryInputSchema = object({
16335
+ ...KindShape,
16336
+ ...TimeWindowShape,
16337
+ where: RecordWhereSchema.optional(),
16338
+ /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
16339
+ order: _enum(["at", "id"]).optional(),
16340
+ desc: boolean().optional(),
16341
+ limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
16342
+ /** Opaque keyset cursor from a previous answer. There is no offset. */
16343
+ cursor: string().min(1).optional()
16344
+ });
16345
+ var RecordQueryResultSchema = object({
16346
+ records: array(RecordViewSchema),
16347
+ nextCursor: string().nullable()
16348
+ });
16349
+ var RecordKindStateSchema = _enum([
16350
+ "created",
16351
+ "unchanged",
16352
+ "updated"
16353
+ ]);
16354
+ var DeclareKindResultSchema = object({
16355
+ kindId: number().int(),
16356
+ state: RecordKindStateSchema,
16357
+ createdIndexes: array(string()),
16358
+ /** The boot guard: the kind is empty while its legacy table still holds rows. */
16359
+ adoptionPending: object({
16360
+ legacyTable: string(),
16361
+ legacyRows: number().int()
16362
+ }).nullable()
16363
+ });
16364
+ /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16365
+ var SecretRefsList = array(string());
16366
+ var RecordSecretRefsSchema = record(string(), record(string(), string()));
16367
+ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16368
+ kind: "mutation",
16369
+ auth: "admin"
16370
+ }), method(object({
16371
+ ...KindShape,
16372
+ id: RecordIdSchema
16373
+ }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
16374
+ ...KindShape,
16375
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16376
+ }), array(RecordViewSchema), { auth: "admin" }), method(object({
16377
+ ...KindShape,
16378
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16379
+ }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
16380
+ ...KindShape,
16381
+ record: RecordInputSchema,
16382
+ /** Compare-and-set. `0` means "the row must not exist". */
16383
+ ifRev: number().int().min(0).optional()
16384
+ }), object({
16385
+ rev: number().int(),
16386
+ releasedRefs: SecretRefsList
16387
+ }), {
16388
+ kind: "mutation",
16389
+ auth: "admin"
16390
+ }), method(object({
16391
+ ...KindShape,
16392
+ records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
16393
+ }), object({
16394
+ count: number().int(),
16395
+ releasedRefs: SecretRefsList
16396
+ }), {
16397
+ kind: "mutation",
16398
+ auth: "admin"
16399
+ }), method(object({
16400
+ ...KindShape,
16401
+ id: RecordIdSchema,
16402
+ data: RecordBodySchema,
16403
+ at: number().int().nullable().optional(),
16404
+ expiresAt: number().int().nullable().optional(),
16405
+ ifRev: number().int().min(1).optional()
16406
+ }), object({
16407
+ rev: number().int(),
16408
+ releasedRefs: SecretRefsList
16409
+ }), {
16410
+ kind: "mutation",
16411
+ auth: "admin"
16412
+ }), method(object({
16413
+ ...KindShape,
16414
+ id: RecordIdSchema
16415
+ }), object({
16416
+ deleted: boolean(),
16417
+ secretRefs: SecretRefsList
16418
+ }), {
16419
+ kind: "mutation",
16420
+ auth: "admin"
16421
+ }), method(object({
16422
+ ...KindShape,
16423
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16424
+ }), object({
16425
+ deleted: number().int(),
16426
+ secretRefs: SecretRefsList
16427
+ }), {
16428
+ kind: "mutation",
16429
+ auth: "admin"
16430
+ }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
16431
+ ...KindShape,
16432
+ ...TimeWindowShape,
16433
+ where: RecordWhereSchema.optional()
16434
+ }), object({ count: number().int() }), { auth: "admin" }), method(object({
16435
+ ...KindShape,
16436
+ deviceId: number().int().optional(),
16437
+ from: number(),
16438
+ to: number(),
16439
+ bucketMs: number().int().positive()
16440
+ }), object({ buckets: array(object({
16441
+ bucketStart: number(),
16442
+ count: number().int()
16443
+ })) }), { auth: "admin" }), method(object({
16444
+ ...KindShape,
16445
+ op: _enum([
16446
+ "sum",
16447
+ "min",
16448
+ "max",
16449
+ "count"
16450
+ ]),
16451
+ field: RecordFieldPathSchema.optional(),
16452
+ groupBy: RecordFieldPathSchema.optional(),
16453
+ where: RecordWhereSchema.optional()
16454
+ }), object({ rows: array(object({
16455
+ group: union([
16456
+ string(),
16457
+ number(),
16458
+ _null()
16459
+ ]),
16460
+ value: number().nullable()
16461
+ })) }), { auth: "admin" }), method(object({
16462
+ ...KindShape,
16463
+ deviceId: number().int().optional(),
16464
+ atBefore: number().optional(),
16465
+ where: RecordWhereSchema.optional()
16466
+ }), object({
16467
+ deleted: number().int(),
16468
+ secretRefs: SecretRefsList
16469
+ }), {
16470
+ kind: "mutation",
16471
+ auth: "admin"
16472
+ }), method(object({
16473
+ deviceId: number().int(),
16474
+ kinds: array(RecordKindNameSchema).optional()
16475
+ }), object({
16476
+ deleted: record(string(), number().int()),
16477
+ secretRefs: SecretRefsList
16478
+ }), {
16479
+ kind: "mutation",
16480
+ auth: "admin"
16481
+ }), method(object(KindShape), object({ id: number().int() }), {
16482
+ kind: "mutation",
16483
+ auth: "admin"
16484
+ });
16485
+ /** One table of the settings database. */
16486
+ var StorageTableSchema = object({
16487
+ /** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
16488
+ name: string(),
16489
+ /** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
16490
+ owner: string().nullable(),
16491
+ rows: number().int().nonnegative(),
16492
+ /** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
16493
+ bytes: number().int().nonnegative().nullable(),
16494
+ /** Declared by an addon since this engine process started (a running addon claims it). */
16495
+ declaredThisBoot: boolean()
16496
+ });
16497
+ /** One declared record kind (D881) as System -> Data shows it. */
16498
+ var StorageKindSchema = object({
16499
+ owner: string(),
16500
+ kind: string(),
16501
+ database: _enum(["settings", "events"]),
16502
+ class: string(),
16503
+ state: _enum([
16504
+ "declared",
16505
+ "orphaned",
16506
+ "dropped"
16507
+ ]),
16508
+ /** `null` when the caller asked for no counts (`counts: false`). */
16509
+ rows: number().int().nonnegative().nullable(),
16510
+ /** Rows x the average size of a sample; null for an empty kind. */
16511
+ bytesEstimate: number().int().nonnegative().nullable(),
16512
+ writeTrigger: string(),
16513
+ retention: RecordRetentionSchema,
16514
+ /** `true` when the kind is an entry kind (the generic entries UI lists it). */
16515
+ entry: boolean(),
16516
+ /** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
16517
+ declaration: RecordKindDeclarationSchema
16518
+ });
16519
+ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
16520
+ collection: string().min(1),
16521
+ expectRows: number().int().nonnegative()
16522
+ }), object({
16523
+ dropped: literal(true),
16524
+ rows: number().int().nonnegative()
16525
+ }), {
16526
+ kind: "mutation",
16527
+ auth: "admin"
16528
+ }), method(object({
16529
+ owner: string().min(1).optional(),
16530
+ /** `false` skips the per-kind row count (a catalog read only). Default true. */
16531
+ counts: boolean().optional()
16532
+ }), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
16533
+ owner: string().min(1),
16534
+ kind: RecordKindNameSchema
16535
+ }), RecordQueryResultSchema, { auth: "admin" }), method(object({
16536
+ owner: string().min(1),
16537
+ kind: RecordKindNameSchema,
16538
+ records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
16539
+ /** The LAST batch: the copy is complete, the boot guard stops asking. */
16540
+ complete: boolean().optional()
16541
+ }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
16542
+ kind: "mutation",
16543
+ auth: "admin"
16544
+ }), method(object({
16545
+ collection: string().min(1),
16546
+ cursor: string().optional(),
16547
+ limit: number().int().min(1).max(1e3).optional()
16548
+ }), object({
16549
+ rows: array(object({
16550
+ id: string(),
16551
+ data: record(string(), unknown())
16552
+ })),
16553
+ nextCursor: string().nullable()
16554
+ }), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
16555
+ /**
16556
+ * record-entries - the ONE admin surface for every list of user-created entries
16557
+ * (D881): notification targets, brokers, LLM profiles, anything an addon
16558
+ * declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
16559
+ *
16560
+ * The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
16561
+ * the entry body with `secret: true` on every credential field, so a password
16562
+ * field is derived from the schema and never from a name. `putEntry` takes the
16563
+ * redaction token for an untouched secret (the stored value is kept), a string
16564
+ * for a new one, and the clear instruction to remove one. A read never carries
16565
+ * a secret value, and a locked keychain refuses the write with
16566
+ * `records/secret-unavailable` instead of storing plaintext.
16567
+ *
16568
+ * Hub-only, served in-process (it acts for each entry's owner on the keychain).
16569
+ */
16570
+ var EntryKindInfoSchema = object({
16571
+ owner: string(),
16572
+ kind: RecordKindNameSchema,
16573
+ title: string(),
16574
+ nameField: string(),
16575
+ /** JSON Schema of the body; `secret: true` marks a password field. */
16576
+ fields: record(string(), unknown()),
16577
+ secretPaths: array(string()),
16578
+ rows: number().int().nonnegative()
16579
+ });
16580
+ var EntryViewSchema = object({
16581
+ id: RecordIdSchema,
16582
+ name: string(),
16583
+ rev: number().int(),
16584
+ updatedAt: number(),
16585
+ /** Secret fields hold the redaction token. */
16586
+ data: RecordBodySchema
16587
+ });
16588
+ var EntryAddress = {
16589
+ owner: string().min(1),
16590
+ kind: RecordKindNameSchema
16591
+ };
16592
+ method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
16593
+ ...EntryAddress,
16594
+ id: RecordIdSchema.optional(),
16595
+ data: RecordBodySchema,
16596
+ ifRev: number().int().min(1).optional()
16597
+ }), object({
16598
+ id: string(),
16599
+ rev: number().int()
16600
+ }), {
16601
+ kind: "mutation",
16602
+ auth: "admin"
16603
+ }), method(object({
16604
+ ...EntryAddress,
16605
+ id: RecordIdSchema
16606
+ }), object({ deleted: boolean() }), {
16607
+ kind: "mutation",
16608
+ auth: "admin"
16609
+ });
16610
+ /**
16023
16611
  * `keychain` — the hub's encrypted store of secret values (D787).
16024
16612
  *
16025
16613
  * Settings blobs never hold a secret: they hold a marker
@@ -16560,6 +17148,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
16560
17148
  kind: "mutation",
16561
17149
  auth: "admin",
16562
17150
  caller: "required"
17151
+ }), method(object({
17152
+ ref: string().min(1),
17153
+ value: string().min(1)
17154
+ }), object({
17155
+ ref: string(),
17156
+ version: number().int()
17157
+ }), {
17158
+ kind: "mutation",
17159
+ auth: "admin",
17160
+ caller: "required"
16563
17161
  }), method(object({ refs: array(string().min(1)).max(1e3) }), object({
16564
17162
  deleted: array(string()).readonly(),
16565
17163
  kept: array(object({
@@ -17081,7 +17679,11 @@ var deviceDiscoveryCapability = {
17081
17679
  };
17082
17680
  /**
17083
17681
  * `device-adoption` — generic discovery + adoption surface,
17084
- * system-scoped singleton. The de-HA-ified successor to `ha-discovery`:
17682
+ * system-scoped collection (one provider per integration addon), routed
17683
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
17684
+ * pin model as `connection-test`. The admin UI keeps using
17685
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
17686
+ * successor to `ha-discovery`:
17085
17687
  * keyed by `integrationId` (the addon resolves integrationId → broker
17086
17688
  * internally) rather than a connection-specific `brokerId`, and it
17087
17689
  * REUSES the shared `DiscoveredChildDevice` candidate type from
@@ -39334,6 +39936,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
39334
39936
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
39335
39937
  kind: "mutation",
39336
39938
  auth: "admin"
39939
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
39940
+ kind: "mutation",
39941
+ auth: "admin"
39337
39942
  }), method(ProfileRefInputSchema, _void(), {
39338
39943
  kind: "mutation",
39339
39944
  auth: "admin"
@@ -49843,6 +50448,41 @@ var ServerRollbackInfoSchema = object({
49843
50448
  atMs: number(),
49844
50449
  reason: string()
49845
50450
  });
50451
+ /**
50452
+ * The runner boot check (D877): the runners this node PLANNED (hub: one per
50453
+ * `resolveRunnerId` over its forked addons; agent: the runners its process
50454
+ * service holds, because only the hub plans) against the states the process
50455
+ * service reports. Kept in memory, recomputed by the same one-shot check after
50456
+ * every boot, served on `getServerPackageStatus`.
50457
+ *
50458
+ * `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
50459
+ * refusal (an addon that said "I will not start, and here is why"), `missing` a
50460
+ * planned runner the process service has no entry for.
50461
+ */
50462
+ var RunnerRefusalSchema = object({
50463
+ runnerId: string(),
50464
+ addonIds: array(string()),
50465
+ reason: string()
50466
+ });
50467
+ var RunnerBootCheckSchema = object({
50468
+ checkedAtMs: number(),
50469
+ /** Runners planned for this node. */
50470
+ expected: number(),
50471
+ /** Planned runners whose process is `running`. */
50472
+ running: number(),
50473
+ failed: array(string()),
50474
+ refused: array(RunnerRefusalSchema),
50475
+ missing: array(string()),
50476
+ /**
50477
+ * Runners still on their way: `starting`, or `crashed` waiting on a backoff
50478
+ * respawn. The check is FINAL only when this is empty; until then nothing is
50479
+ * pushed and the verdict is re-evaluated on the next runner state change.
50480
+ * Optional for version skew (absent = settled).
50481
+ */
50482
+ pending: array(string()).optional(),
50483
+ /** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
50484
+ planKnown: boolean()
50485
+ });
49846
50486
  var ServerPackageStatusSchema = object({
49847
50487
  /** Root package name (`@camstack/server` on the hub). */
49848
50488
  packageName: string(),
@@ -49905,7 +50545,14 @@ var ServerPackageStatusSchema = object({
49905
50545
  * for version skew: an older provider's payload simply omits it, and an
49906
50546
  * absent wrapper is unknown — never `native`.
49907
50547
  */
49908
- wrapper: WrapperIdentitySchema.optional()
50548
+ wrapper: WrapperIdentitySchema.optional(),
50549
+ /**
50550
+ * What this node PLANNED to run against what its process service reports
50551
+ * (D877). Absent until the one-shot boot check has run (~60 s after boot) and
50552
+ * on a provider that predates it. Absent is "not checked yet", never "all
50553
+ * well": a consumer that needs the answer treats it as pending.
50554
+ */
50555
+ runners: RunnerBootCheckSchema.optional()
49909
50556
  });
49910
50557
  var ServerUpdateCheckResultSchema = object({
49911
50558
  packageName: string(),
@@ -49956,6 +50603,13 @@ var ServerUpdateOutcomeSchema = _enum([
49956
50603
  "refused",
49957
50604
  "failed"
49958
50605
  ]);
50606
+ /** One addon the pre-flight found the target version would refuse (D877). */
50607
+ var UpdateBlockerSchema = object({
50608
+ addonId: string(),
50609
+ reason: string(),
50610
+ /** What the operator does about it. */
50611
+ remedy: string()
50612
+ });
49959
50613
  var ServerUpdateActionResultSchema = object({
49960
50614
  accepted: boolean(),
49961
50615
  targetVersion: string().nullable(),
@@ -49973,14 +50627,27 @@ var ServerUpdateActionResultSchema = object({
49973
50627
  * The failure itself, verbatim enough to act on (the npm output for a
49974
50628
  * staging install). Non-null only for `failed`.
49975
50629
  */
49976
- error: string().nullable().optional()
50630
+ error: string().nullable().optional(),
50631
+ /**
50632
+ * The addons the target version would refuse to start on this node's live
50633
+ * store (D877), present when the pre-flight refused the update
50634
+ * (`reason: 'addon-would-refuse'`). Optional for version skew.
50635
+ */
50636
+ blockers: array(UpdateBlockerSchema).optional()
49977
50637
  });
49978
50638
  method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
49979
50639
  kind: "mutation",
49980
50640
  auth: "admin"
49981
- }), method(object({
49982
- /** Explicit target version; omitted = latest from the registry. */
49983
- version: string().optional() }), ServerUpdateActionResultSchema, {
50641
+ }), method(object({
50642
+ /** Explicit target version; omitted = latest from the registry. */
50643
+ version: string().optional(),
50644
+ /**
50645
+ * Apply even though the pre-flight (D877) found addons the target would
50646
+ * refuse to start. Off by default: those addons stay down until the
50647
+ * remedy is run, which is the incident this gate exists to prevent.
50648
+ */
50649
+ acknowledgeRefusals: boolean().optional()
50650
+ }), ServerUpdateActionResultSchema, {
49984
50651
  kind: "mutation",
49985
50652
  auth: "admin",
49986
50653
  timeoutMs: 16 * 6e4
@@ -52426,7 +53093,9 @@ var ManifestShapeSchema = object({
52426
53093
  var AddonProcessSchema = object({
52427
53094
  pid: number().optional(),
52428
53095
  mode: string(),
52429
- state: string()
53096
+ state: string(),
53097
+ /** Why the runner is `refused` (an addon's own words), when it is (D877). */
53098
+ reason: string().optional()
52430
53099
  });
52431
53100
  /**
52432
53101
  * Per-addon health snapshot from the kernel's AddonHealthMonitor.
@@ -53194,7 +53863,8 @@ var batteryCapability = {
53194
53863
  DeviceType.Button,
53195
53864
  DeviceType.Switch,
53196
53865
  DeviceType.PetFeeder,
53197
- DeviceType.Container
53866
+ DeviceType.Container,
53867
+ DeviceType.Thermostat
53198
53868
  ],
53199
53869
  methods: {
53200
53870
  /**
@@ -53815,6 +54485,12 @@ var ClimateControlStatusSchema = object({
53815
54485
  /** Horizontal louver swing on/off. Null when the device has no
53816
54486
  * horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
53817
54487
  swingHorizontal: boolean().nullable(),
54488
+ /** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
54489
+ minTemp: number().nullable().optional(),
54490
+ /** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
54491
+ maxTemp: number().nullable().optional(),
54492
+ /** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
54493
+ tempStep: number().positive().nullable().optional(),
53818
54494
  /** Ms epoch when the slice was last updated (push or command). */
53819
54495
  lastFetchedAt: number()
53820
54496
  });
@@ -54661,6 +55337,161 @@ onStatusChanged: { data: object({
54661
55337
  * whether persisting is worth a SQLite commit. */
54662
55338
  volatileStateFields: ["lastChangedAt"]
54663
55339
  };
55340
+ /**
55341
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55342
+ * consumable levels (salt, rinse aid) and common program options.
55343
+ *
55344
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55345
+ * by any integration that exposes the same program / option surface.
55346
+ *
55347
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55348
+ * provider refreshes the slice on an interval and eagerly after commands.
55349
+ */
55350
+ var DishwasherStateSchema = _enum([
55351
+ "idle",
55352
+ "running",
55353
+ "paused",
55354
+ "finished",
55355
+ "error",
55356
+ "unavailable"
55357
+ ]);
55358
+ var DishwasherConsumableLevelSchema = _enum([
55359
+ "ok",
55360
+ "low",
55361
+ "empty"
55362
+ ]);
55363
+ var DishwasherStatusSchema = object({
55364
+ state: DishwasherStateSchema,
55365
+ /** Active program id/name, or null when none selected / unknown. */
55366
+ program: string().nullable(),
55367
+ /** Program tokens the hardware accepts — drives the UI selector. */
55368
+ availablePrograms: array(string()),
55369
+ /** Minutes remaining on the active cycle, or null when not running. */
55370
+ remainingMinutes: number().int().nonnegative().nullable(),
55371
+ /** Cycle completion 0..100, or null when not applicable. */
55372
+ progressPercent: number().min(0).max(100).nullable(),
55373
+ /** True when the door is reported open. */
55374
+ doorOpen: boolean(),
55375
+ /** True when remote start is allowed (door closed, power on, etc.). */
55376
+ remoteStartAllowed: boolean(),
55377
+ /** Main power / switched-on state. */
55378
+ powerOn: boolean(),
55379
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55380
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55381
+ halfLoad: boolean(),
55382
+ hygienePlus: boolean(),
55383
+ /** Extra dry option when the appliance exposes it. */
55384
+ extraDry: boolean(),
55385
+ /** Intensive zone (lower basket) when the appliance exposes it. */
55386
+ intensiveZone: boolean(),
55387
+ /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
55388
+ varioSpeedPlus: boolean(),
55389
+ /** Child lock (controls disabled on the appliance). */
55390
+ childLock: boolean(),
55391
+ errorCode: number().nullable(),
55392
+ errorLabel: string().nullable(),
55393
+ lastFetchedAt: number()
55394
+ });
55395
+ var dishwasherCapability = {
55396
+ name: "dishwasher",
55397
+ scope: "device",
55398
+ deviceNative: true,
55399
+ mode: "singleton",
55400
+ deviceTypes: [DeviceType.Dishwasher],
55401
+ methods: {
55402
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55403
+ kind: "mutation",
55404
+ auth: "protected"
55405
+ }),
55406
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55407
+ kind: "mutation",
55408
+ auth: "protected"
55409
+ }),
55410
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55411
+ kind: "mutation",
55412
+ auth: "protected"
55413
+ }),
55414
+ setProgram: method(object({
55415
+ deviceId: number().int().nonnegative(),
55416
+ program: string().min(1)
55417
+ }), _void(), {
55418
+ kind: "mutation",
55419
+ auth: "protected"
55420
+ }),
55421
+ setPower: method(object({
55422
+ deviceId: number().int().nonnegative(),
55423
+ on: boolean()
55424
+ }), _void(), {
55425
+ kind: "mutation",
55426
+ auth: "protected"
55427
+ }),
55428
+ setHalfLoad: method(object({
55429
+ deviceId: number().int().nonnegative(),
55430
+ on: boolean()
55431
+ }), _void(), {
55432
+ kind: "mutation",
55433
+ auth: "protected"
55434
+ }),
55435
+ setHygienePlus: method(object({
55436
+ deviceId: number().int().nonnegative(),
55437
+ on: boolean()
55438
+ }), _void(), {
55439
+ kind: "mutation",
55440
+ auth: "protected"
55441
+ }),
55442
+ setExtraDry: method(object({
55443
+ deviceId: number().int().nonnegative(),
55444
+ on: boolean()
55445
+ }), _void(), {
55446
+ kind: "mutation",
55447
+ auth: "protected"
55448
+ }),
55449
+ setIntensiveZone: method(object({
55450
+ deviceId: number().int().nonnegative(),
55451
+ on: boolean()
55452
+ }), _void(), {
55453
+ kind: "mutation",
55454
+ auth: "protected"
55455
+ }),
55456
+ setVarioSpeedPlus: method(object({
55457
+ deviceId: number().int().nonnegative(),
55458
+ on: boolean()
55459
+ }), _void(), {
55460
+ kind: "mutation",
55461
+ auth: "protected"
55462
+ }),
55463
+ setChildLock: method(object({
55464
+ deviceId: number().int().nonnegative(),
55465
+ on: boolean()
55466
+ }), _void(), {
55467
+ kind: "mutation",
55468
+ auth: "protected"
55469
+ }),
55470
+ setOption: method(object({
55471
+ deviceId: number().int().nonnegative(),
55472
+ key: string().min(1),
55473
+ value: union([
55474
+ boolean(),
55475
+ string(),
55476
+ number()
55477
+ ])
55478
+ }), _void(), {
55479
+ kind: "mutation",
55480
+ auth: "protected"
55481
+ })
55482
+ },
55483
+ status: {
55484
+ schema: DishwasherStatusSchema,
55485
+ kind: "poll"
55486
+ },
55487
+ runtimeState: DishwasherStatusSchema,
55488
+ durability: "session",
55489
+ history: { fields: { progressPercent: {
55490
+ kind: "gauge",
55491
+ unit: "%",
55492
+ deadband: 2
55493
+ } } }
55494
+ };
54664
55495
  var DoorbellStatusSchema = object({
54665
55496
  /** Ms epoch of the last press. null = never observed since this provider started. */
54666
55497
  lastPressedAt: number().nullable(),
@@ -55463,6 +56294,32 @@ var gasCapability = {
55463
56294
  * whether persisting is worth a SQLite commit. */
55464
56295
  volatileStateFields: ["lastChangedAt"]
55465
56296
  };
56297
+ var HeatingValveStatusSchema = object({
56298
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56299
+ position: number().min(0).max(100).nullable(),
56300
+ /** Ms epoch when the slice was last updated (push or poll). */
56301
+ lastFetchedAt: number()
56302
+ });
56303
+ var heatingValveCapability = {
56304
+ name: "heating-valve",
56305
+ scope: "device",
56306
+ deviceNative: true,
56307
+ mode: "singleton",
56308
+ deviceTypes: [DeviceType.Thermostat],
56309
+ methods: {},
56310
+ status: {
56311
+ schema: HeatingValveStatusSchema,
56312
+ kind: "push"
56313
+ },
56314
+ runtimeState: HeatingValveStatusSchema,
56315
+ durability: "session",
56316
+ history: { fields: { position: {
56317
+ kind: "gauge",
56318
+ unit: "%",
56319
+ deadband: 1
56320
+ } } },
56321
+ volatileStateFields: ["lastFetchedAt"]
56322
+ };
55466
56323
  /**
55467
56324
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
55468
56325
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -56595,7 +57452,19 @@ var TlsStatusSchema = object({
56595
57452
  sans: array(string()),
56596
57453
  caCertPem: string().nullable(),
56597
57454
  reissueError: string().nullable(),
56598
- restartRequired: boolean()
57455
+ restartRequired: boolean(),
57456
+ /** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
57457
+ caMissing: boolean(),
57458
+ /** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
57459
+ localCaConstrained: boolean().nullable(),
57460
+ /** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
57461
+ caReplacedAt: string().nullable(),
57462
+ /** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
57463
+ storedUpload: object({
57464
+ leafFingerprintSha256: string(),
57465
+ validTo: string(),
57466
+ hasCa: boolean()
57467
+ }).nullable()
56599
57468
  });
56600
57469
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
56601
57470
  /**
@@ -56651,6 +57520,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
56651
57520
  }), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
56652
57521
  kind: "mutation",
56653
57522
  auth: "admin"
57523
+ }), method(_void(), TlsStatusSchema, {
57524
+ kind: "mutation",
57525
+ auth: "admin"
56654
57526
  });
56655
57527
  var LockControlStatusSchema = object({
56656
57528
  /** Lifecycle state of the lock. `jammed` means the motor reported
@@ -63144,7 +64016,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
63144
64016
  kind: "mutation",
63145
64017
  auth: "admin",
63146
64018
  access: "delete"
63147
- }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(object({
64019
+ }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
64020
+ kind: "mutation",
64021
+ auth: "admin",
64022
+ access: "create"
64023
+ }), method(object({
63148
64024
  userId: string(),
63149
64025
  code: string()
63150
64026
  }), object({ valid: boolean() }), {
@@ -64864,6 +65740,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
64864
65740
  dayNight: dayNightCapability,
64865
65741
  deviceDiscovery: deviceDiscoveryCapability,
64866
65742
  deviceStatus: deviceStatusCapability,
65743
+ dishwasher: dishwasherCapability,
64867
65744
  doorbell: doorbellCapability,
64868
65745
  enumSensor: enumSensorCapability,
64869
65746
  eventEmitter: eventEmitterCapability,
@@ -64871,6 +65748,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
64871
65748
  featureProbe: featureProbeCapability,
64872
65749
  flood: floodCapability,
64873
65750
  gas: gasCapability,
65751
+ heatingValve: heatingValveCapability,
64874
65752
  humidifier: humidifierCapability,
64875
65753
  humiditySensor: humiditySensorCapability,
64876
65754
  image: imageCapability,
@@ -64956,13 +65834,14 @@ var BaseDevice = class {
64956
65834
  get state() {
64957
65835
  if (!this._stateProxyCache) {
64958
65836
  const cache = {};
64959
- const handler = { get: (_target, key) => {
65837
+ const handler = { get: (target, key) => {
64960
65838
  const k = key;
64961
- if (k in cache) return cache[k];
65839
+ const existing = Reflect.get(target, k);
65840
+ if (existing !== void 0) return existing;
64962
65841
  const cap = DEVICE_LOCAL_STATE_CAPS[k];
64963
65842
  if (!cap) return void 0;
64964
65843
  const proxy = this.sliceProxy(cap);
64965
- cache[k] = proxy;
65844
+ Reflect.set(target, k, proxy);
64966
65845
  return proxy;
64967
65846
  } };
64968
65847
  this._stateProxyCache = new Proxy(cache, handler);
@@ -65161,7 +66040,7 @@ var BaseDevice = class {
65161
66040
  async updateSourceInfo(patch) {
65162
66041
  const next = mergeSourceInfo(this.sourceInfo, patch);
65163
66042
  this._sourceInfoCache = Object.freeze({ ...next });
65164
- const action = this.ctx.api?.deviceManager?.setMetadata;
66043
+ const action = this.ctx.api.deviceManager?.setMetadata;
65165
66044
  if (action) try {
65166
66045
  await action.mutate({
65167
66046
  deviceId: this.id,
@@ -65196,7 +66075,7 @@ var BaseDevice = class {
65196
66075
  * device boot on a meta refresh.
65197
66076
  */
65198
66077
  async refreshFeatures() {
65199
- const action = this.ctx.api?.deviceManager?.registerDevice;
66078
+ const action = this.ctx.api.deviceManager?.registerDevice;
65200
66079
  if (!action) return;
65201
66080
  try {
65202
66081
  await action.mutate({
@@ -65595,6 +66474,12 @@ var BaseDeviceProvider = class extends BaseAddon {
65595
66474
  provider: this
65596
66475
  }];
65597
66476
  }
66477
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66478
+ providerRegistrationsFromSuper(result) {
66479
+ if (Array.isArray(result)) return result;
66480
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66481
+ return [];
66482
+ }
65598
66483
  async onShutdown() {
65599
66484
  this._restoreShuttingDown = true;
65600
66485
  this.cancelRestoreRetries();
@@ -66121,7 +67006,7 @@ var BaseDeviceProvider = class extends BaseAddon {
66121
67006
  return toDeviceSummary(device, this.addonId);
66122
67007
  }
66123
67008
  };
66124
- 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;
67009
+ 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;
66125
67010
  new Set(Object.values(DeviceType));
66126
67011
  Object.freeze({
66127
67012
  "accessories.getStatus": {
@@ -67270,6 +68155,12 @@ Object.freeze({
67270
68155
  addonId: null,
67271
68156
  access: "view"
67272
68157
  },
68158
+ "coreBlocks.migrateRawSecrets": {
68159
+ capName: "core-blocks",
68160
+ capScope: "system",
68161
+ addonId: null,
68162
+ access: "create"
68163
+ },
67273
68164
  "coreBlocks.restart": {
67274
68165
  capName: "core-blocks",
67275
68166
  capScope: "system",
@@ -68536,6 +69427,84 @@ Object.freeze({
68536
69427
  addonId: null,
68537
69428
  access: "view"
68538
69429
  },
69430
+ "dishwasher.getStatus": {
69431
+ capName: "dishwasher",
69432
+ capScope: "device",
69433
+ addonId: null,
69434
+ access: "view"
69435
+ },
69436
+ "dishwasher.pause": {
69437
+ capName: "dishwasher",
69438
+ capScope: "device",
69439
+ addonId: null,
69440
+ access: "create"
69441
+ },
69442
+ "dishwasher.setChildLock": {
69443
+ capName: "dishwasher",
69444
+ capScope: "device",
69445
+ addonId: null,
69446
+ access: "create"
69447
+ },
69448
+ "dishwasher.setExtraDry": {
69449
+ capName: "dishwasher",
69450
+ capScope: "device",
69451
+ addonId: null,
69452
+ access: "create"
69453
+ },
69454
+ "dishwasher.setHalfLoad": {
69455
+ capName: "dishwasher",
69456
+ capScope: "device",
69457
+ addonId: null,
69458
+ access: "create"
69459
+ },
69460
+ "dishwasher.setHygienePlus": {
69461
+ capName: "dishwasher",
69462
+ capScope: "device",
69463
+ addonId: null,
69464
+ access: "create"
69465
+ },
69466
+ "dishwasher.setIntensiveZone": {
69467
+ capName: "dishwasher",
69468
+ capScope: "device",
69469
+ addonId: null,
69470
+ access: "create"
69471
+ },
69472
+ "dishwasher.setOption": {
69473
+ capName: "dishwasher",
69474
+ capScope: "device",
69475
+ addonId: null,
69476
+ access: "create"
69477
+ },
69478
+ "dishwasher.setPower": {
69479
+ capName: "dishwasher",
69480
+ capScope: "device",
69481
+ addonId: null,
69482
+ access: "create"
69483
+ },
69484
+ "dishwasher.setProgram": {
69485
+ capName: "dishwasher",
69486
+ capScope: "device",
69487
+ addonId: null,
69488
+ access: "create"
69489
+ },
69490
+ "dishwasher.setVarioSpeedPlus": {
69491
+ capName: "dishwasher",
69492
+ capScope: "device",
69493
+ addonId: null,
69494
+ access: "create"
69495
+ },
69496
+ "dishwasher.start": {
69497
+ capName: "dishwasher",
69498
+ capScope: "device",
69499
+ addonId: null,
69500
+ access: "create"
69501
+ },
69502
+ "dishwasher.stop": {
69503
+ capName: "dishwasher",
69504
+ capScope: "device",
69505
+ addonId: null,
69506
+ access: "create"
69507
+ },
68539
69508
  "doorbell.getStatus": {
68540
69509
  capName: "doorbell",
68541
69510
  capScope: "device",
@@ -68746,6 +69715,12 @@ Object.freeze({
68746
69715
  addonId: null,
68747
69716
  access: "view"
68748
69717
  },
69718
+ "heatingValve.getStatus": {
69719
+ capName: "heating-valve",
69720
+ capScope: "device",
69721
+ addonId: null,
69722
+ access: "view"
69723
+ },
68749
69724
  "humidifier.getStatus": {
68750
69725
  capName: "humidifier",
68751
69726
  capScope: "device",
@@ -68956,6 +69931,12 @@ Object.freeze({
68956
69931
  addonId: null,
68957
69932
  access: "create"
68958
69933
  },
69934
+ "keychainAdmin.importSecret": {
69935
+ capName: "keychain-admin",
69936
+ capScope: "system",
69937
+ addonId: null,
69938
+ access: "create"
69939
+ },
68959
69940
  "keychainAdmin.listAudit": {
68960
69941
  capName: "keychain-admin",
68961
69942
  capScope: "system",
@@ -69124,6 +70105,12 @@ Object.freeze({
69124
70105
  addonId: null,
69125
70106
  access: "view"
69126
70107
  },
70108
+ "llm.migrateRawSecrets": {
70109
+ capName: "llm",
70110
+ capScope: "system",
70111
+ addonId: null,
70112
+ access: "create"
70113
+ },
69127
70114
  "llm.resolveModelRef": {
69128
70115
  capName: "llm",
69129
70116
  capScope: "system",
@@ -69352,6 +70339,12 @@ Object.freeze({
69352
70339
  addonId: null,
69353
70340
  access: "create"
69354
70341
  },
70342
+ "localNetwork.useStoredUploadedCertificate": {
70343
+ capName: "local-network",
70344
+ capScope: "system",
70345
+ addonId: null,
70346
+ access: "create"
70347
+ },
69355
70348
  "lockControl.getStatus": {
69356
70349
  capName: "lock-control",
69357
70350
  capScope: "device",
@@ -72004,6 +72997,30 @@ Object.freeze({
72004
72997
  addonId: null,
72005
72998
  access: "create"
72006
72999
  },
73000
+ "recordEntries.deleteEntry": {
73001
+ capName: "record-entries",
73002
+ capScope: "system",
73003
+ addonId: null,
73004
+ access: "delete"
73005
+ },
73006
+ "recordEntries.listEntries": {
73007
+ capName: "record-entries",
73008
+ capScope: "system",
73009
+ addonId: null,
73010
+ access: "view"
73011
+ },
73012
+ "recordEntries.listEntryKinds": {
73013
+ capName: "record-entries",
73014
+ capScope: "system",
73015
+ addonId: null,
73016
+ access: "view"
73017
+ },
73018
+ "recordEntries.putEntry": {
73019
+ capName: "record-entries",
73020
+ capScope: "system",
73021
+ addonId: null,
73022
+ access: "create"
73023
+ },
72007
73024
  "recording.getAvailability": {
72008
73025
  capName: "recording",
72009
73026
  capScope: "device",
@@ -72304,6 +73321,102 @@ Object.freeze({
72304
73321
  addonId: null,
72305
73322
  access: "view"
72306
73323
  },
73324
+ "records.aggregate": {
73325
+ capName: "records",
73326
+ capScope: "system",
73327
+ addonId: null,
73328
+ access: "view"
73329
+ },
73330
+ "records.allocateId": {
73331
+ capName: "records",
73332
+ capScope: "system",
73333
+ addonId: null,
73334
+ access: "create"
73335
+ },
73336
+ "records.count": {
73337
+ capName: "records",
73338
+ capScope: "system",
73339
+ addonId: null,
73340
+ access: "view"
73341
+ },
73342
+ "records.declareKinds": {
73343
+ capName: "records",
73344
+ capScope: "system",
73345
+ addonId: null,
73346
+ access: "create"
73347
+ },
73348
+ "records.delete": {
73349
+ capName: "records",
73350
+ capScope: "system",
73351
+ addonId: null,
73352
+ access: "delete"
73353
+ },
73354
+ "records.deleteDevice": {
73355
+ capName: "records",
73356
+ capScope: "system",
73357
+ addonId: null,
73358
+ access: "delete"
73359
+ },
73360
+ "records.deleteMany": {
73361
+ capName: "records",
73362
+ capScope: "system",
73363
+ addonId: null,
73364
+ access: "delete"
73365
+ },
73366
+ "records.deleteWhere": {
73367
+ capName: "records",
73368
+ capScope: "system",
73369
+ addonId: null,
73370
+ access: "delete"
73371
+ },
73372
+ "records.get": {
73373
+ capName: "records",
73374
+ capScope: "system",
73375
+ addonId: null,
73376
+ access: "view"
73377
+ },
73378
+ "records.getMany": {
73379
+ capName: "records",
73380
+ capScope: "system",
73381
+ addonId: null,
73382
+ access: "view"
73383
+ },
73384
+ "records.histogram": {
73385
+ capName: "records",
73386
+ capScope: "system",
73387
+ addonId: null,
73388
+ access: "view"
73389
+ },
73390
+ "records.patch": {
73391
+ capName: "records",
73392
+ capScope: "system",
73393
+ addonId: null,
73394
+ access: "create"
73395
+ },
73396
+ "records.put": {
73397
+ capName: "records",
73398
+ capScope: "system",
73399
+ addonId: null,
73400
+ access: "create"
73401
+ },
73402
+ "records.putMany": {
73403
+ capName: "records",
73404
+ capScope: "system",
73405
+ addonId: null,
73406
+ access: "create"
73407
+ },
73408
+ "records.query": {
73409
+ capName: "records",
73410
+ capScope: "system",
73411
+ addonId: null,
73412
+ access: "view"
73413
+ },
73414
+ "records.secretRefs": {
73415
+ capName: "records",
73416
+ capScope: "system",
73417
+ addonId: null,
73418
+ access: "view"
73419
+ },
72307
73420
  "sceneMonitor.captureReference": {
72308
73421
  capName: "scene-monitor",
72309
73422
  capScope: "device",
@@ -72736,6 +73849,48 @@ Object.freeze({
72736
73849
  addonId: null,
72737
73850
  access: "create"
72738
73851
  },
73852
+ "storageAdmin.adoptRecords": {
73853
+ capName: "storage-admin",
73854
+ capScope: "system",
73855
+ addonId: null,
73856
+ access: "create"
73857
+ },
73858
+ "storageAdmin.dropCollection": {
73859
+ capName: "storage-admin",
73860
+ capScope: "system",
73861
+ addonId: null,
73862
+ access: "delete"
73863
+ },
73864
+ "storageAdmin.isAdoptedLegacyTable": {
73865
+ capName: "storage-admin",
73866
+ capScope: "system",
73867
+ addonId: null,
73868
+ access: "view"
73869
+ },
73870
+ "storageAdmin.listKinds": {
73871
+ capName: "storage-admin",
73872
+ capScope: "system",
73873
+ addonId: null,
73874
+ access: "view"
73875
+ },
73876
+ "storageAdmin.listTables": {
73877
+ capName: "storage-admin",
73878
+ capScope: "system",
73879
+ addonId: null,
73880
+ access: "view"
73881
+ },
73882
+ "storageAdmin.readLegacyCollection": {
73883
+ capName: "storage-admin",
73884
+ capScope: "system",
73885
+ addonId: null,
73886
+ access: "view"
73887
+ },
73888
+ "storageAdmin.readRecords": {
73889
+ capName: "storage-admin",
73890
+ capScope: "system",
73891
+ addonId: null,
73892
+ access: "view"
73893
+ },
72739
73894
  "storageEvictable.evict": {
72740
73895
  capName: "storage-evictable",
72741
73896
  capScope: "system",
@@ -73648,6 +74803,12 @@ Object.freeze({
73648
74803
  addonId: null,
73649
74804
  access: "view"
73650
74805
  },
74806
+ "userManagement.migrateRawSecrets": {
74807
+ capName: "user-management",
74808
+ capScope: "system",
74809
+ addonId: null,
74810
+ access: "create"
74811
+ },
73651
74812
  "userManagement.oauthExchangeCode": {
73652
74813
  capName: "user-management",
73653
74814
  capScope: "system",
@@ -74147,7 +75308,7 @@ Object.freeze({
74147
75308
  access: "create"
74148
75309
  }
74149
75310
  });
74150
- 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;
75311
+ 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;
74151
75312
  DeviceFeature.BatteryOperated;
74152
75313
  Object.freeze({
74153
75314
  "accessories.getStatus": [{
@@ -74971,6 +76132,71 @@ Object.freeze({
74971
76132
  form: "single",
74972
76133
  optional: false
74973
76134
  }],
76135
+ "dishwasher.getStatus": [{
76136
+ name: "deviceId",
76137
+ form: "single",
76138
+ optional: false
76139
+ }],
76140
+ "dishwasher.pause": [{
76141
+ name: "deviceId",
76142
+ form: "single",
76143
+ optional: false
76144
+ }],
76145
+ "dishwasher.setChildLock": [{
76146
+ name: "deviceId",
76147
+ form: "single",
76148
+ optional: false
76149
+ }],
76150
+ "dishwasher.setExtraDry": [{
76151
+ name: "deviceId",
76152
+ form: "single",
76153
+ optional: false
76154
+ }],
76155
+ "dishwasher.setHalfLoad": [{
76156
+ name: "deviceId",
76157
+ form: "single",
76158
+ optional: false
76159
+ }],
76160
+ "dishwasher.setHygienePlus": [{
76161
+ name: "deviceId",
76162
+ form: "single",
76163
+ optional: false
76164
+ }],
76165
+ "dishwasher.setIntensiveZone": [{
76166
+ name: "deviceId",
76167
+ form: "single",
76168
+ optional: false
76169
+ }],
76170
+ "dishwasher.setOption": [{
76171
+ name: "deviceId",
76172
+ form: "single",
76173
+ optional: false
76174
+ }],
76175
+ "dishwasher.setPower": [{
76176
+ name: "deviceId",
76177
+ form: "single",
76178
+ optional: false
76179
+ }],
76180
+ "dishwasher.setProgram": [{
76181
+ name: "deviceId",
76182
+ form: "single",
76183
+ optional: false
76184
+ }],
76185
+ "dishwasher.setVarioSpeedPlus": [{
76186
+ name: "deviceId",
76187
+ form: "single",
76188
+ optional: false
76189
+ }],
76190
+ "dishwasher.start": [{
76191
+ name: "deviceId",
76192
+ form: "single",
76193
+ optional: false
76194
+ }],
76195
+ "dishwasher.stop": [{
76196
+ name: "deviceId",
76197
+ form: "single",
76198
+ optional: false
76199
+ }],
74974
76200
  "doorbell.getStatus": [{
74975
76201
  name: "deviceId",
74976
76202
  form: "single",
@@ -75040,6 +76266,11 @@ Object.freeze({
75040
76266
  form: "single",
75041
76267
  optional: false
75042
76268
  }],
76269
+ "heatingValve.getStatus": [{
76270
+ name: "deviceId",
76271
+ form: "single",
76272
+ optional: false
76273
+ }],
75043
76274
  "humidifier.getStatus": [{
75044
76275
  name: "deviceId",
75045
76276
  form: "single",
@@ -76324,6 +77555,37 @@ Object.freeze({
76324
77555
  form: "single",
76325
77556
  optional: false
76326
77557
  }],
77558
+ "records.count": [{
77559
+ name: "deviceId",
77560
+ form: "single",
77561
+ optional: true
77562
+ }],
77563
+ "records.deleteDevice": [{
77564
+ name: "deviceId",
77565
+ form: "single",
77566
+ optional: false
77567
+ }],
77568
+ "records.deleteWhere": [{
77569
+ name: "deviceId",
77570
+ form: "single",
77571
+ optional: true
77572
+ }],
77573
+ "records.histogram": [{
77574
+ name: "deviceId",
77575
+ form: "single",
77576
+ optional: true
77577
+ }],
77578
+ "records.putMany": [{
77579
+ name: "records",
77580
+ form: "object-array",
77581
+ optional: false,
77582
+ itemField: "deviceId"
77583
+ }],
77584
+ "records.query": [{
77585
+ name: "deviceId",
77586
+ form: "single",
77587
+ optional: true
77588
+ }],
76327
77589
  "sceneMonitor.captureReference": [{
76328
77590
  name: "deviceId",
76329
77591
  form: "single",
@@ -76440,6 +77702,17 @@ Object.freeze({
76440
77702
  form: "single",
76441
77703
  optional: false
76442
77704
  }],
77705
+ "storageAdmin.adoptRecords": [{
77706
+ name: "records",
77707
+ form: "object-array",
77708
+ optional: false,
77709
+ itemField: "deviceId"
77710
+ }],
77711
+ "storageAdmin.readRecords": [{
77712
+ name: "deviceId",
77713
+ form: "single",
77714
+ optional: true
77715
+ }],
76443
77716
  "streamBroker.acquireEgressTranscode": [{
76444
77717
  name: "deviceId",
76445
77718
  form: "single",