@camstack/addon-provider-unraid 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
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- //#region ../types/dist/event-category-C4hVnRo8.mjs
2
+ //#region ../types/dist/event-category-BvOFi6PY.mjs
3
3
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4
4
  EventCategory["SystemBoot"] = "system.boot";
5
5
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -63,6 +63,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
63
63
  * consumes this category and maps it to the `addon-crash-loop` kind.
64
64
  */
65
65
  EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
66
+ /**
67
+ * A runner whose addon refused to start with a typed reason (D877) - parked
68
+ * in `refused`, never counted by the crash breaker, retried on operator
69
+ * action. One event per refusal.
70
+ */
71
+ EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
72
+ /**
73
+ * A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
74
+ * `refused`. In-process telemetry for the boot check (re-evaluate while any
75
+ * runner is still pending) and the alert centre (close a recovered runner).
76
+ */
77
+ EventCategory["ProcessStateChanged"] = "process.state-changed";
78
+ /**
79
+ * The node's one-shot runner boot check (D877): planned runners against the
80
+ * process service, `degraded` when any is failed, refused or missing. The
81
+ * alert centre turns it into one alert and a direct critical push.
82
+ */
83
+ EventCategory["SystemRunnerCheck"] = "system.runner-check";
66
84
  EventCategory["AddonError"] = "addon.error";
67
85
  EventCategory["AddonPageReady"] = "addon.page-ready";
68
86
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -5387,7 +5405,7 @@ var ZodIssueCode = {
5387
5405
  var ZodFirstPartyTypeKind;
5388
5406
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5389
5407
  //#endregion
5390
- //#region ../types/dist/sleep-DRqxtc0C.mjs
5408
+ //#region ../types/dist/sleep-BegKjwUu.mjs
5391
5409
  /**
5392
5410
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5393
5411
  * window to float samples (D455).
@@ -5504,7 +5522,7 @@ function isKeychainStoredField(field) {
5504
5522
  var SECRET_CLEAR = { $secretClear: true };
5505
5523
  /** The `'***'` token D634 redaction writes for non-admins. */
5506
5524
  var LEGACY_DEVICE_REDACTION = "***";
5507
- function isRecord$2(value) {
5525
+ function isRecord$5(value) {
5508
5526
  return typeof value === "object" && value !== null && !Array.isArray(value);
5509
5527
  }
5510
5528
  function makeSecretMarker(ref) {
@@ -5515,12 +5533,12 @@ function makeSecretMarker(ref) {
5515
5533
  }
5516
5534
  /** A stored marker: an object whose `$secret` is a non-empty string. */
5517
5535
  function isSecretMarker(value) {
5518
- if (!isRecord$2(value)) return false;
5536
+ if (!isRecord$5(value)) return false;
5519
5537
  const ref = value["$secret"];
5520
5538
  return typeof ref === "string" && ref.length > 0;
5521
5539
  }
5522
5540
  function isSecretClear(value) {
5523
- return isRecord$2(value) && value["$secretClear"] === true;
5541
+ return isRecord$5(value) && value["$secretClear"] === true;
5524
5542
  }
5525
5543
  /**
5526
5544
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -6130,7 +6148,7 @@ var KeychainWriteRefusedError = class extends Error {
6130
6148
  }
6131
6149
  };
6132
6150
  var KEEP = { kind: "keep" };
6133
- function isRecord$1(value) {
6151
+ function isRecord$4(value) {
6134
6152
  return typeof value === "object" && value !== null && !Array.isArray(value);
6135
6153
  }
6136
6154
  function defaultMintId() {
@@ -6143,7 +6161,7 @@ function collectSecretMarkerRefs(value, out = []) {
6143
6161
  return out;
6144
6162
  }
6145
6163
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
6146
- else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6164
+ else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6147
6165
  return out;
6148
6166
  }
6149
6167
  async function storedValueEquals(secrets, marker, candidate) {
@@ -6198,7 +6216,7 @@ function rowId(row, idKey) {
6198
6216
  return null;
6199
6217
  }
6200
6218
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
6201
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
6219
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
6202
6220
  if (!Array.isArray(incoming)) {
6203
6221
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
6204
6222
  return {
@@ -6214,7 +6232,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
6214
6232
  const kept = /* @__PURE__ */ new Set();
6215
6233
  const rows = [];
6216
6234
  for (const row of incoming) {
6217
- if (!isRecord$1(row)) {
6235
+ if (!isRecord$4(row)) {
6218
6236
  rows.push(row);
6219
6237
  continue;
6220
6238
  }
@@ -6239,7 +6257,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6239
6257
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
6240
6258
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
6241
6259
  case "object": {
6242
- if (!isRecord$1(incoming)) {
6260
+ if (!isRecord$4(incoming)) {
6243
6261
  if (incoming === void 0) return KEEP;
6244
6262
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
6245
6263
  return {
@@ -6247,7 +6265,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6247
6265
  value: incoming
6248
6266
  };
6249
6267
  }
6250
- const storedObj = isRecord$1(stored) ? stored : {};
6268
+ const storedObj = isRecord$4(stored) ? stored : {};
6251
6269
  return {
6252
6270
  kind: "value",
6253
6271
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -6370,7 +6388,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
6370
6388
  value: items
6371
6389
  };
6372
6390
  }
6373
- if (isRecord$1(v)) {
6391
+ if (isRecord$4(v)) {
6374
6392
  const out = {};
6375
6393
  for (const [k, child] of Object.entries(v)) {
6376
6394
  const s = substitute(child);
@@ -6402,7 +6420,7 @@ var SecretOverwriteRefusedError = class extends Error {
6402
6420
  this.name = "SecretOverwriteRefusedError";
6403
6421
  }
6404
6422
  };
6405
- function isRecord(value) {
6423
+ function isRecord$3(value) {
6406
6424
  return typeof value === "object" && value !== null && !Array.isArray(value);
6407
6425
  }
6408
6426
  function resolvedValue(pass, marker) {
@@ -6431,7 +6449,7 @@ function inArray(pass, incoming, stored) {
6431
6449
  return incoming.map((item, index) => {
6432
6450
  const twin = stored[index];
6433
6451
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
6434
- if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
6452
+ if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
6435
6453
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
6436
6454
  return item;
6437
6455
  });
@@ -6442,7 +6460,7 @@ function inArrayRow(pass, incoming, stored) {
6442
6460
  const twin = stored[key];
6443
6461
  if (isSecretMarker(twin)) {
6444
6462
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
6445
- } else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
6463
+ } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
6446
6464
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
6447
6465
  }
6448
6466
  return out;
@@ -6450,7 +6468,7 @@ function inArrayRow(pass, incoming, stored) {
6450
6468
  async function walk(pass, incoming, stored) {
6451
6469
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
6452
6470
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
6453
- if (!isRecord(incoming) || !isRecord(stored)) return incoming;
6471
+ if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
6454
6472
  const out = { ...incoming };
6455
6473
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
6456
6474
  return out;
@@ -6481,7 +6499,7 @@ async function restoreUnchangedSecrets(input) {
6481
6499
  function isJsonEqual(a, b) {
6482
6500
  if (Object.is(a, b)) return true;
6483
6501
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
6484
- if (isRecord(a) && isRecord(b)) {
6502
+ if (isRecord$3(a) && isRecord$3(b)) {
6485
6503
  const keys = Object.keys(a);
6486
6504
  if (keys.length !== Object.keys(b).length) return false;
6487
6505
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -6505,7 +6523,7 @@ function markerKeysOf(blob, owner) {
6505
6523
  }
6506
6524
  function nodeFromStored(value, owner) {
6507
6525
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
6508
- if (!isRecord(value)) return null;
6526
+ if (!isRecord$3(value)) return null;
6509
6527
  const children = /* @__PURE__ */ new Map();
6510
6528
  for (const [key, child] of Object.entries(value)) {
6511
6529
  const node = nodeFromStored(child, owner);
@@ -6638,7 +6656,6 @@ function createHandle(raw, opts) {
6638
6656
  const writeAddon = (patch) => write("addon", opts.addonTree(), void 0, patch, () => readStoredAddonBlob(raw), (p) => raw.writeAddonStore(p));
6639
6657
  const readAddonStoreResult = raw.readAddonStoreResult;
6640
6658
  const readAddonStoreKeyResult = raw.readAddonStoreKeyResult;
6641
- const readDeviceStoreBatch = raw.readDeviceStoreBatch;
6642
6659
  const overrides = {
6643
6660
  readAddonStore: async () => resolveRead("addon", await raw.readAddonStore()),
6644
6661
  ...readAddonStoreResult !== void 0 ? { readAddonStoreResult: async () => {
@@ -6662,12 +6679,12 @@ function createHandle(raw, opts) {
6662
6679
  };
6663
6680
  } } : {},
6664
6681
  readDeviceStore: async (deviceId) => resolveRead(`device:${deviceId}`, await raw.readDeviceStore(deviceId)),
6665
- ...readDeviceStoreBatch !== void 0 ? { readDeviceStoreBatch: async (deviceIds) => {
6666
- const rows = await readDeviceStoreBatch.call(raw, deviceIds);
6682
+ readDeviceStoreBatch: async (deviceIds) => {
6683
+ const rows = await raw.readDeviceStoreBatch(deviceIds);
6667
6684
  const out = /* @__PURE__ */ new Map();
6668
6685
  for (const [deviceId, blob] of rows) out.set(deviceId, await resolveRead(`device:${deviceId}`, blob));
6669
6686
  return out;
6670
- } } : {},
6687
+ },
6671
6688
  writeAddonStore: async (patch) => {
6672
6689
  await writeAddon(patch);
6673
6690
  },
@@ -7294,7 +7311,7 @@ var BaseAddon = class {
7294
7311
  if (!ctx) return;
7295
7312
  const addonId = ctx.id;
7296
7313
  setImmediate(() => {
7297
- ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
7314
+ ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
7298
7315
  ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
7299
7316
  }).catch((err) => {
7300
7317
  ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
@@ -7494,7 +7511,7 @@ var BaseAddon = class {
7494
7511
  return this._addonSecretTree;
7495
7512
  }
7496
7513
  deviceSecretTree() {
7497
- this._deviceSecretTree ??= secretTreeFromSchema(this.deviceSettingsSchema());
7514
+ this._deviceSecretTree ??= mergeSecretStatePaths(secretTreeFromSchema(this.deviceSettingsSchema()), this.secretStatePaths);
7498
7515
  return this._deviceSecretTree;
7499
7516
  }
7500
7517
  /**
@@ -7570,42 +7587,135 @@ var BaseAddon = class {
7570
7587
  this[timerOf] = timer;
7571
7588
  }
7572
7589
  /**
7573
- * Wrap `ctx.settings.readAddonStore()` with a short retry budget so a
7574
- * transient settings-store outage (mid-restart of sqlite-settings, tsx-watch
7575
- * swap, or any race where the SqliteSettingsBackend is between shutdown and
7576
- * re-initialize) doesn't propagate up into `initialize()` and leave the
7590
+ * Wrap `ctx.settings.readAddonStore()` with a retry budget so a transient
7591
+ * settings-store outage doesn't propagate up into `initialize()` and leave the
7577
7592
  * addon permanently broken.
7578
7593
  *
7579
- * Retry only the two known infra fingerprints. Anything else propagates so
7580
- * real bugs surface immediately. After the budget expires we fall back to
7581
- * `{}` (defaults) — the addon's first successful patch will rehydrate.
7594
+ * Two kinds of outage, two budgets:
7595
+ * - the store's own restart fingerprints (`SqliteSettingsBackend not
7596
+ * initialized`, `provider not available`): a short budget, then the addon
7597
+ * falls back to `{}` (defaults) - its first successful patch rehydrates;
7598
+ * - a TRANSPORT failure (the hub is restarting while this runner boots:
7599
+ * `discovery deadline exceeded`, `parent could not route`, a refused or
7600
+ * timed-out connection). Since D870 a runner's settings read THROWS instead
7601
+ * of answering `{}`, so without a budget a hub restart ends in a respawn
7602
+ * loop. A long, bounded budget; only after it the error propagates - the
7603
+ * addon never runs on defaults for a store it could not ask.
7604
+ * Anything else propagates immediately so real bugs surface.
7582
7605
  */
7583
7606
  async readAddonStoreWithRetry() {
7584
7607
  const settings = this.rawSettings();
7585
7608
  if (!settings) return {};
7586
- const delaysMs = [
7587
- 150,
7588
- 350,
7589
- 600,
7590
- 900
7591
- ];
7592
7609
  let lastErr;
7593
- for (let attempt = 0; attempt <= delaysMs.length; attempt++) try {
7610
+ for (let attempt = 0;; attempt++) try {
7594
7611
  const stored = await settings.readAddonStore() ?? {};
7595
7612
  this.settingsStoreReady = true;
7596
7613
  return stored;
7597
7614
  } catch (err) {
7598
7615
  lastErr = err;
7599
- const msg = err instanceof Error ? err.message : String(err);
7600
- if (!(msg.includes("SqliteSettingsBackend not initialized") || msg.includes("provider not available"))) throw err;
7601
- if (attempt === delaysMs.length) break;
7602
- await new Promise((r) => setTimeout(r, delaysMs[attempt]));
7616
+ const kind = classifyStoreError(err);
7617
+ if (kind === "permanent") throw err;
7618
+ const delay = (kind === "transport" ? TRANSPORT_RETRY_DELAYS_MS : RESTART_RETRY_DELAYS_MS)[attempt];
7619
+ if (delay === void 0) {
7620
+ if (kind === "transport") throw err;
7621
+ break;
7622
+ }
7623
+ await new Promise((r) => setTimeout(r, delay));
7603
7624
  }
7604
7625
  this.settingsStoreReady = false;
7605
7626
  this._ctx?.logger?.warn?.("readAddonStore: settings-store unavailable after retries — using defaults", { meta: { error: lastErr instanceof Error ? lastErr.message : String(lastErr) } });
7606
7627
  return {};
7607
7628
  }
7608
7629
  };
7630
+ /** The settings store's own restart fingerprints. */
7631
+ var RESTART_RETRY_DELAYS_MS = [
7632
+ 150,
7633
+ 350,
7634
+ 600,
7635
+ 900
7636
+ ];
7637
+ /** A hub restarting under a booting runner: ~100 s in total. */
7638
+ var TRANSPORT_RETRY_DELAYS_MS = [
7639
+ 150,
7640
+ 350,
7641
+ 600,
7642
+ 900,
7643
+ 2e3,
7644
+ 5e3,
7645
+ 1e4,
7646
+ 2e4,
7647
+ 3e4,
7648
+ 3e4
7649
+ ];
7650
+ var RESTART_FINGERPRINTS = ["SqliteSettingsBackend not initialized", "provider not available"];
7651
+ /** Node / socket error codes of a connection that did not happen or broke. */
7652
+ var TRANSPORT_CODES = new Set([
7653
+ "ECONNREFUSED",
7654
+ "ECONNRESET",
7655
+ "ETIMEDOUT",
7656
+ "EPIPE",
7657
+ "EHOSTUNREACH",
7658
+ "ENETUNREACH"
7659
+ ]);
7660
+ /** tRPC error codes that mean "the other side is not answering now", not "your call is wrong". */
7661
+ var UNAVAILABLE_TRPC_CODES = new Set([
7662
+ "TIMEOUT",
7663
+ "SERVICE_UNAVAILABLE",
7664
+ "BAD_GATEWAY",
7665
+ "GATEWAY_TIMEOUT"
7666
+ ]);
7667
+ /** The exact phrases OUR transport raises when it cannot reach the hub. */
7668
+ var TRANSPORT_PHRASES = [
7669
+ "discovery deadline exceeded",
7670
+ "parent could not route child unowned cap call",
7671
+ "UDS request timed out after",
7672
+ "channel closed"
7673
+ ];
7674
+ /** Moleculer error `type`s of a call that could not be served right now. */
7675
+ var MOLECULER_TRANSIENT_TYPES = new Set([
7676
+ "REQUEST_TIMEOUT",
7677
+ "SERVICE_NOT_FOUND",
7678
+ "SERVICE_NOT_AVAILABLE",
7679
+ "REQUEST_REJECTED",
7680
+ "BROKER_DISCONNECTED"
7681
+ ]);
7682
+ function stringProp(value, key) {
7683
+ if (typeof value !== "object" || value === null) return void 0;
7684
+ const found = Reflect.get(value, key);
7685
+ return typeof found === "string" ? found : void 0;
7686
+ }
7687
+ /** The code an error carries: its own, its cause's, or a tRPC `data.code`. */
7688
+ function errorCode(err) {
7689
+ const out = {};
7690
+ const cause = typeof err === "object" && err !== null ? Reflect.get(err, "cause") : void 0;
7691
+ const data = typeof err === "object" && err !== null ? Reflect.get(err, "data") : void 0;
7692
+ const node = stringProp(err, "code") ?? stringProp(cause, "code");
7693
+ if (node !== void 0) out.node = node;
7694
+ const trpc = stringProp(data, "code");
7695
+ if (trpc !== void 0) out.trpc = trpc;
7696
+ return out;
7697
+ }
7698
+ /**
7699
+ * Is a settings read failure worth retrying, and with which budget? Only
7700
+ * EXPLICIT signals count: a socket error code, a tRPC "unavailable" code, or
7701
+ * one of the exact phrases our own transport raises. A message that merely
7702
+ * contains "timed out" or "unreachable" is not evidence of anything, and
7703
+ * `settings store not wired` is a wiring bug that retrying cannot fix.
7704
+ */
7705
+ function classifyStoreError(err) {
7706
+ const message = err instanceof Error ? err.message : String(err);
7707
+ if (RESTART_FINGERPRINTS.some((f) => message.includes(f))) return "restart";
7708
+ const code = errorCode(err);
7709
+ if (code.node !== void 0 && TRANSPORT_CODES.has(code.node)) return "transport";
7710
+ if (code.trpc !== void 0 && UNAVAILABLE_TRPC_CODES.has(code.trpc)) return "transport";
7711
+ if (typeof err === "object" && err !== null) {
7712
+ if (Reflect.get(err, "retryable") === true) return "transport";
7713
+ const type = stringProp(err, "type");
7714
+ if (type !== void 0 && MOLECULER_TRANSIENT_TYPES.has(type)) return "transport";
7715
+ }
7716
+ if (TRANSPORT_PHRASES.some((f) => message.includes(f))) return "transport";
7717
+ return "permanent";
7718
+ }
7609
7719
  /**
7610
7720
  * Collect the keys of every field marked `perNode: true`, recursing into
7611
7721
  * layout containers (`group` fields and `sub-tabs` tabs) the same way
@@ -7695,6 +7805,156 @@ var PeerBytesTicketSchema = object({
7695
7805
  */
7696
7806
  declaredBytes: number().int().nonnegative().nullable()
7697
7807
  });
7808
+ /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
7809
+ /** The files a kind may live in. `history` is device-history's (D850), never records. */
7810
+ var RECORD_DATABASES = ["settings", "events"];
7811
+ /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
7812
+ var RECORD_CLASSES = [
7813
+ "config",
7814
+ "ledger",
7815
+ "audit",
7816
+ "mirror",
7817
+ "ephemeral"
7818
+ ];
7819
+ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
7820
+ var RECORD_MAX_DATA_BYTES = 1024 * 1024;
7821
+ var RECORD_BATCH_MAX = 1e3;
7822
+ var RECORD_QUERY_MAX = 1e3;
7823
+ function defOf(schema) {
7824
+ const zodBag = Reflect.get(schema, "_zod");
7825
+ if (typeof zodBag !== "object" || zodBag === null) return {};
7826
+ const def = Reflect.get(zodBag, "def");
7827
+ if (typeof def !== "object" || def === null) return {};
7828
+ return def;
7829
+ }
7830
+ function declaredHere(schema) {
7831
+ return globalRegistry.get(schema)?.secret === true;
7832
+ }
7833
+ /** Wrapper kinds whose `innerType` is the field itself. */
7834
+ var WRAPPERS = new Set([
7835
+ "optional",
7836
+ "nullable",
7837
+ "default",
7838
+ "prefault",
7839
+ "catch",
7840
+ "readonly",
7841
+ "nonoptional"
7842
+ ]);
7843
+ /**
7844
+ * The schema layers that make up ONE field: the schema itself and every
7845
+ * wrapper below it (optional / default / nullable / readonly / catch), plus
7846
+ * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
7847
+ * `.transform` on `in`).
7848
+ */
7849
+ function layersOf(schema) {
7850
+ const out = [];
7851
+ const queue = [schema];
7852
+ while (queue.length > 0) {
7853
+ const s = queue.shift();
7854
+ if (!s || out.includes(s)) continue;
7855
+ out.push(s);
7856
+ const def = defOf(s);
7857
+ if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
7858
+ if (def.type === "pipe") {
7859
+ if (def.in) queue.push(def.in);
7860
+ if (def.out) queue.push(def.out);
7861
+ }
7862
+ }
7863
+ return out;
7864
+ }
7865
+ /** True when any layer of this field declares `.meta({ secret: true })`. */
7866
+ function isZodSecret(schema) {
7867
+ return layersOf(schema).some(declaredHere);
7868
+ }
7869
+ /**
7870
+ * Every declared secret path in a config schema: dotted keys, `[]` for "each
7871
+ * element of this array" (`connection.password`, `rows[].token`). A declared
7872
+ * object or array is reported as one path and not descended into — everything
7873
+ * under it is secret.
7874
+ */
7875
+ function collectZodSecretPaths(schema, prefix = "") {
7876
+ if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
7877
+ const paths = [];
7878
+ for (const layer of layersOf(schema)) {
7879
+ const def = defOf(layer);
7880
+ if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
7881
+ else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
7882
+ else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
7883
+ else if (def.type === "intersection") {
7884
+ if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
7885
+ if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
7886
+ }
7887
+ }
7888
+ return [...new Set(paths)];
7889
+ }
7890
+ /**
7891
+ * Record kinds (D881): the declaration an addon makes of one kind of fact, the
7892
+ * Zod row schema that describes it, and the helper that turns the two into the
7893
+ * JSON the engine stores.
7894
+ *
7895
+ * A kind is declared ONCE, next to the code that owns it, and the engine's
7896
+ * reconciler creates its indexes - nothing creates DDL at runtime from a write.
7897
+ * Everything the generic machinery needs (secret fields, the entry descriptor)
7898
+ * is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
7899
+ * never a field name (D879).
7900
+ */
7901
+ /** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
7902
+ var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
7903
+ var RecordIndexSchema = object({
7904
+ name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
7905
+ fields: array(RecordFieldPathSchema).min(1).max(4),
7906
+ unique: boolean().optional()
7907
+ }).strict();
7908
+ var RecordRetentionSchema = union([
7909
+ object({
7910
+ ttlMs: number().int().positive(),
7911
+ from: _enum(["at", "write"])
7912
+ }).strict(),
7913
+ object({
7914
+ maxRows: number().int().positive().optional(),
7915
+ maxRowsPerDevice: number().int().positive().optional()
7916
+ }).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
7917
+ object({
7918
+ owner: string().min(1),
7919
+ reason: string().min(1)
7920
+ }).strict(),
7921
+ object({ none: string().min(1) }).strict()
7922
+ ]);
7923
+ /** The descriptor a generic entries UI reads (D881 "generic entries"). */
7924
+ var EntryDescriptorSchema = object({
7925
+ title: string().min(1),
7926
+ /** The record body field shown as the entry's name. */
7927
+ nameField: string().min(1),
7928
+ /** JSON Schema of the entry body; `secret: true` marks a password field. */
7929
+ fields: record(string(), unknown())
7930
+ }).strict();
7931
+ /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
7932
+ var RecordKindDeclarationSchema = object({
7933
+ database: _enum(RECORD_DATABASES).default("settings"),
7934
+ class: _enum(RECORD_CLASSES),
7935
+ writeTrigger: string().min(1),
7936
+ device: _enum([
7937
+ "required",
7938
+ "optional",
7939
+ "none"
7940
+ ]).default("none"),
7941
+ at: _enum(["required", "none"]).default("none"),
7942
+ indexes: array(RecordIndexSchema).max(8).default([]),
7943
+ retention: RecordRetentionSchema,
7944
+ deviceRemoval: _enum(["delete", "none"]).default("none"),
7945
+ maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
7946
+ /** Derived from the Zod schema; never written by hand. */
7947
+ secretPaths: array(string().min(1)).default([]),
7948
+ /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
7949
+ secretArrayKeys: record(string(), string()).default({}),
7950
+ /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
7951
+ adoptsFrom: string().min(1).optional(),
7952
+ /** Kinds that must agree through `transact` sit in one file under one family name. */
7953
+ transactFamily: string().min(1).optional(),
7954
+ entry: EntryDescriptorSchema.optional()
7955
+ }).strict();
7956
+ /** The kind names: lower-case, dash separated, short enough for an index name. */
7957
+ var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
7698
7958
  /** Shared Zod schemas used across streaming capabilities. */
7699
7959
  var CamProfileSchema = _enum([
7700
7960
  "high",
@@ -8159,69 +8419,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8159
8419
  kind: "mutation",
8160
8420
  auth: "admin"
8161
8421
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8162
- function defOf(schema) {
8163
- return schema._zod?.def ?? {};
8164
- }
8165
- function declaredHere(schema) {
8166
- return globalRegistry.get(schema)?.secret === true;
8167
- }
8168
- /** Wrapper kinds whose `innerType` is the field itself. */
8169
- var WRAPPERS = new Set([
8170
- "optional",
8171
- "nullable",
8172
- "default",
8173
- "prefault",
8174
- "catch",
8175
- "readonly",
8176
- "nonoptional"
8177
- ]);
8178
- /**
8179
- * The schema layers that make up ONE field: the schema itself and every
8180
- * wrapper below it (optional / default / nullable / readonly / catch), plus
8181
- * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
8182
- * `.transform` on `in`).
8183
- */
8184
- function layersOf(schema) {
8185
- const out = [];
8186
- const queue = [schema];
8187
- while (queue.length > 0) {
8188
- const s = queue.shift();
8189
- if (!s || out.includes(s)) continue;
8190
- out.push(s);
8191
- const def = defOf(s);
8192
- if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
8193
- if (def.type === "pipe") {
8194
- if (def.in) queue.push(def.in);
8195
- if (def.out) queue.push(def.out);
8196
- }
8197
- }
8198
- return out;
8199
- }
8200
- /** True when any layer of this field declares `.meta({ secret: true })`. */
8201
- function isZodSecret(schema) {
8202
- return layersOf(schema).some(declaredHere);
8203
- }
8204
- /**
8205
- * Every declared secret path in a config schema: dotted keys, `[]` for "each
8206
- * element of this array" (`connection.password`, `rows[].token`). A declared
8207
- * object or array is reported as one path and not descended into — everything
8208
- * under it is secret.
8209
- */
8210
- function collectZodSecretPaths(schema, prefix = "") {
8211
- if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
8212
- const paths = [];
8213
- for (const layer of layersOf(schema)) {
8214
- const def = defOf(layer);
8215
- if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
8216
- else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
8217
- else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
8218
- else if (def.type === "intersection") {
8219
- if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
8220
- if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
8221
- }
8222
- }
8223
- return [...new Set(paths)];
8224
- }
8225
8422
  object({
8226
8423
  code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
8227
8424
  params: record(string(), union([string(), number()])).optional()
@@ -8241,7 +8438,7 @@ function userError(code, params, englishFallback) {
8241
8438
  return new CamstackError(code, params, englishFallback);
8242
8439
  }
8243
8440
  //#endregion
8244
- //#region ../types/dist/err-msg-DLerKiVO.mjs
8441
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8245
8442
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8246
8443
  DeviceType["Camera"] = "camera";
8247
8444
  DeviceType["Hub"] = "hub";
@@ -8333,6 +8530,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8333
8530
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8334
8531
  * integrations sharing the same food/desiccant/hopper surface. */
8335
8532
  DeviceType["PetFeeder"] = "pet-feeder";
8533
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8534
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8535
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8536
+ DeviceType["Dishwasher"] = "dishwasher";
8336
8537
  return DeviceType;
8337
8538
  }({});
8338
8539
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8510,6 +8711,9 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
8510
8711
  /** Virtual HA toggle (input_boolean.*) — distinguishable from a
8511
8712
  * real Switch device for UI rendering / export adapters. */
8512
8713
  DeviceRole["BinaryHelper"] = "binary-helper";
8714
+ /** A smart plug: a `switch` whose source says it is an outlet (HA
8715
+ * `device_class: outlet`). The Alexa export shows it as a SMARTPLUG. */
8716
+ DeviceRole["Outlet"] = "outlet";
8513
8717
  /** Generic motion / occupancy / moving event source. Distinct from
8514
8718
  * the camera accessory PirSensor role: that one is a camera child;
8515
8719
  * this is a standalone HA / 3rd-party motion sensor. */
@@ -8587,7 +8791,7 @@ function errMsg(err) {
8587
8791
  return String(err);
8588
8792
  }
8589
8793
  //#endregion
8590
- //#region ../types/dist/composition-EQ9Ok0Ee.mjs
8794
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8591
8795
  /**
8592
8796
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8593
8797
  *
@@ -11791,11 +11995,10 @@ var ClipModelMetaSchema = object({
11791
11995
  /**
11792
11996
  * The `vector-store` index this model's vectors live in. ONE feature space
11793
11997
  * per index: two models share an index only when their vectors are ranked
11794
- * against each other, which for CLIP means never across families. MobileCLIP
11795
- * S1 and S2 share `object-clip` for history (separated by the row's
11796
- * `modelId`); any other model gets its own.
11998
+ * against each other, which for CLIP means never across families. Every
11999
+ * model gets its own.
11797
12000
  */
11798
- vectorIndex: string().regex(/^object-clip(-[a-z0-9][a-z0-9-]*)?$/),
12001
+ vectorIndex: string().regex(/^object-clip-[a-z0-9][a-z0-9-]*$/),
11799
12002
  /**
11800
12003
  * The text encoder's tokenizer, a declared SIBLING file of its onnx. The name
11801
12004
  * must be unique per tokenizer: every model's siblings land in ONE flat
@@ -12974,8 +13177,13 @@ var AlertSeveritySchema = _enum([
12974
13177
  "info",
12975
13178
  "success",
12976
13179
  "warning",
12977
- "error"
13180
+ "error",
13181
+ "critical"
12978
13182
  ]);
13183
+ var AlertActionSchema = object({
13184
+ label: string(),
13185
+ href: string().optional()
13186
+ });
12979
13187
  var AlertStatusSchema = _enum([
12980
13188
  "active",
12981
13189
  "in-progress",
@@ -12993,6 +13201,7 @@ var AlertSchema = object({
12993
13201
  severity: AlertSeveritySchema,
12994
13202
  title: string(),
12995
13203
  message: string(),
13204
+ action: AlertActionSchema.optional(),
12996
13205
  status: AlertStatusSchema,
12997
13206
  progress: number().optional(),
12998
13207
  read: boolean(),
@@ -15528,6 +15737,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
15528
15737
  keyField: string()
15529
15738
  }).optional()
15530
15739
  })) });
15740
+ /**
15741
+ * The report of a one-shot "move this owner's plaintext secrets into the
15742
+ * keychain" run (D878). COUNTS only - never a value, never a ref.
15743
+ *
15744
+ * The owner runs it on its own rows, through its own write path; an operator
15745
+ * script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
15746
+ * Dry run (`apply: false`) reports what WOULD move and changes nothing.
15747
+ */
15748
+ var RawSecretMigrationInputSchema = object({
15749
+ /** `false` (the default of the script) = report only. */
15750
+ apply: boolean() });
15751
+ var RawSecretMigrationReportSchema = object({
15752
+ apply: boolean(),
15753
+ /** Rows that can carry a secret (a profile, an enrolment). */
15754
+ rows: number().int(),
15755
+ /** Rows whose secret was plaintext when the run started. */
15756
+ raw: number().int(),
15757
+ /** Rows that already held a keychain marker when the run started. */
15758
+ markers: number().int(),
15759
+ /** Plaintext rows moved by THIS run (always 0 on a dry run). */
15760
+ migrated: number().int(),
15761
+ /** Plaintext rows left in place because the move or its read-back failed. */
15762
+ failed: number().int(),
15763
+ /** After the run: rows still holding plaintext. */
15764
+ remainingRaw: number().int(),
15765
+ /** After the run: markers the keychain could not resolve right now. */
15766
+ unresolvedMarkers: number().int(),
15767
+ /**
15768
+ * A second, redundant copy of the secrets' rows that the run found (and, on
15769
+ * `apply`, deleted after verifying the first). Owners with a single copy omit it.
15770
+ */
15771
+ redundantCopies: number().int().optional(),
15772
+ /** True when nothing is raw and every marker resolves. */
15773
+ verified: boolean()
15774
+ });
15531
15775
  /** Where a block runs. The operator chooses — a block driving a device on an
15532
15776
  * agent is the reason placement is not fixed to the hub. */
15533
15777
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -15754,6 +15998,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
15754
15998
  }), SettingsUpdateResultSchema, {
15755
15999
  kind: "mutation",
15756
16000
  auth: "admin"
16001
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
16002
+ kind: "mutation",
16003
+ auth: "admin"
15757
16004
  }), method(object({}), object({ libs: array(object({
15758
16005
  filePath: string(),
15759
16006
  content: string()
@@ -16017,6 +16264,347 @@ id: union([string(), number()]) }), {
16017
16264
  auth: "admin"
16018
16265
  });
16019
16266
  /**
16267
+ * records - an addon's own facts and documents (D881): ledgers, audit rows,
16268
+ * config documents, mirrors. The third storage API next to `ctx.settings`
16269
+ * (operator intent, D870) and device-history (numbers over time, D850).
16270
+ *
16271
+ * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
16272
+ * crossed a process and stated by a hub in-process caller (`ctx.records` does
16273
+ * that with the addon id closed over). It is deliberately NOT in any input
16274
+ * schema, so a session can never supply it, and a call with no stamp is refused
16275
+ * `records/no-caller`. A kind is readable and writable only by its owner; other
16276
+ * addons go through the owner's capability.
16277
+ *
16278
+ * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
16279
+ * never `[]`. Secret fields are never on the wire: a read shows the
16280
+ * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
16281
+ * resolves itself, and a write may carry only a keychain marker bound to the
16282
+ * row's own ref.
16283
+ *
16284
+ * Internal: addons reach it through `ctx.records`, never directly.
16285
+ */
16286
+ var RecordIdSchema = string().min(1).max(256);
16287
+ /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
16288
+ var RecordBodySchema = record(string(), unknown());
16289
+ var RecordInputSchema = object({
16290
+ id: RecordIdSchema,
16291
+ /** The device this row belongs to (D865 removal, per-device reads). */
16292
+ deviceId: number().int().optional(),
16293
+ /** The domain clock, ms: observed / created / opened. */
16294
+ at: number().int().optional(),
16295
+ /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
16296
+ expiresAt: number().int().optional(),
16297
+ data: RecordBodySchema
16298
+ });
16299
+ var RecordViewSchema = object({
16300
+ id: string(),
16301
+ deviceId: number().int().nullable(),
16302
+ at: number().nullable(),
16303
+ expiresAt: number().nullable(),
16304
+ rev: number().int(),
16305
+ updatedAt: number(),
16306
+ data: RecordBodySchema
16307
+ });
16308
+ /** Declared index fields only. Anything else does not compile, by design. */
16309
+ var RecordWhereSchema = record(RecordFieldPathSchema, union([
16310
+ string(),
16311
+ number(),
16312
+ boolean(),
16313
+ object({ in: array(union([
16314
+ string(),
16315
+ number(),
16316
+ boolean()
16317
+ ])).min(1).max(RECORD_BATCH_MAX) }),
16318
+ object({
16319
+ gt: union([string(), number()]).optional(),
16320
+ gte: union([string(), number()]).optional(),
16321
+ lt: union([string(), number()]).optional(),
16322
+ lte: union([string(), number()]).optional()
16323
+ }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
16324
+ ]));
16325
+ var KindShape = { kind: RecordKindNameSchema };
16326
+ var TimeWindowShape = {
16327
+ deviceId: number().int().optional(),
16328
+ atFrom: number().optional(),
16329
+ atTo: number().optional()
16330
+ };
16331
+ var RecordQueryInputSchema = object({
16332
+ ...KindShape,
16333
+ ...TimeWindowShape,
16334
+ where: RecordWhereSchema.optional(),
16335
+ /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
16336
+ order: _enum(["at", "id"]).optional(),
16337
+ desc: boolean().optional(),
16338
+ limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
16339
+ /** Opaque keyset cursor from a previous answer. There is no offset. */
16340
+ cursor: string().min(1).optional()
16341
+ });
16342
+ var RecordQueryResultSchema = object({
16343
+ records: array(RecordViewSchema),
16344
+ nextCursor: string().nullable()
16345
+ });
16346
+ var RecordKindStateSchema = _enum([
16347
+ "created",
16348
+ "unchanged",
16349
+ "updated"
16350
+ ]);
16351
+ var DeclareKindResultSchema = object({
16352
+ kindId: number().int(),
16353
+ state: RecordKindStateSchema,
16354
+ createdIndexes: array(string()),
16355
+ /** The boot guard: the kind is empty while its legacy table still holds rows. */
16356
+ adoptionPending: object({
16357
+ legacyTable: string(),
16358
+ legacyRows: number().int()
16359
+ }).nullable()
16360
+ });
16361
+ /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16362
+ var SecretRefsList = array(string());
16363
+ var RecordSecretRefsSchema = record(string(), record(string(), string()));
16364
+ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16365
+ kind: "mutation",
16366
+ auth: "admin"
16367
+ }), method(object({
16368
+ ...KindShape,
16369
+ id: RecordIdSchema
16370
+ }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
16371
+ ...KindShape,
16372
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16373
+ }), array(RecordViewSchema), { auth: "admin" }), method(object({
16374
+ ...KindShape,
16375
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16376
+ }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
16377
+ ...KindShape,
16378
+ record: RecordInputSchema,
16379
+ /** Compare-and-set. `0` means "the row must not exist". */
16380
+ ifRev: number().int().min(0).optional()
16381
+ }), object({
16382
+ rev: number().int(),
16383
+ releasedRefs: SecretRefsList
16384
+ }), {
16385
+ kind: "mutation",
16386
+ auth: "admin"
16387
+ }), method(object({
16388
+ ...KindShape,
16389
+ records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
16390
+ }), object({
16391
+ count: number().int(),
16392
+ releasedRefs: SecretRefsList
16393
+ }), {
16394
+ kind: "mutation",
16395
+ auth: "admin"
16396
+ }), method(object({
16397
+ ...KindShape,
16398
+ id: RecordIdSchema,
16399
+ data: RecordBodySchema,
16400
+ at: number().int().nullable().optional(),
16401
+ expiresAt: number().int().nullable().optional(),
16402
+ ifRev: number().int().min(1).optional()
16403
+ }), object({
16404
+ rev: number().int(),
16405
+ releasedRefs: SecretRefsList
16406
+ }), {
16407
+ kind: "mutation",
16408
+ auth: "admin"
16409
+ }), method(object({
16410
+ ...KindShape,
16411
+ id: RecordIdSchema
16412
+ }), object({
16413
+ deleted: boolean(),
16414
+ secretRefs: SecretRefsList
16415
+ }), {
16416
+ kind: "mutation",
16417
+ auth: "admin"
16418
+ }), method(object({
16419
+ ...KindShape,
16420
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16421
+ }), object({
16422
+ deleted: number().int(),
16423
+ secretRefs: SecretRefsList
16424
+ }), {
16425
+ kind: "mutation",
16426
+ auth: "admin"
16427
+ }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
16428
+ ...KindShape,
16429
+ ...TimeWindowShape,
16430
+ where: RecordWhereSchema.optional()
16431
+ }), object({ count: number().int() }), { auth: "admin" }), method(object({
16432
+ ...KindShape,
16433
+ deviceId: number().int().optional(),
16434
+ from: number(),
16435
+ to: number(),
16436
+ bucketMs: number().int().positive()
16437
+ }), object({ buckets: array(object({
16438
+ bucketStart: number(),
16439
+ count: number().int()
16440
+ })) }), { auth: "admin" }), method(object({
16441
+ ...KindShape,
16442
+ op: _enum([
16443
+ "sum",
16444
+ "min",
16445
+ "max",
16446
+ "count"
16447
+ ]),
16448
+ field: RecordFieldPathSchema.optional(),
16449
+ groupBy: RecordFieldPathSchema.optional(),
16450
+ where: RecordWhereSchema.optional()
16451
+ }), object({ rows: array(object({
16452
+ group: union([
16453
+ string(),
16454
+ number(),
16455
+ _null()
16456
+ ]),
16457
+ value: number().nullable()
16458
+ })) }), { auth: "admin" }), method(object({
16459
+ ...KindShape,
16460
+ deviceId: number().int().optional(),
16461
+ atBefore: number().optional(),
16462
+ where: RecordWhereSchema.optional()
16463
+ }), object({
16464
+ deleted: number().int(),
16465
+ secretRefs: SecretRefsList
16466
+ }), {
16467
+ kind: "mutation",
16468
+ auth: "admin"
16469
+ }), method(object({
16470
+ deviceId: number().int(),
16471
+ kinds: array(RecordKindNameSchema).optional()
16472
+ }), object({
16473
+ deleted: record(string(), number().int()),
16474
+ secretRefs: SecretRefsList
16475
+ }), {
16476
+ kind: "mutation",
16477
+ auth: "admin"
16478
+ }), method(object(KindShape), object({ id: number().int() }), {
16479
+ kind: "mutation",
16480
+ auth: "admin"
16481
+ });
16482
+ /** One table of the settings database. */
16483
+ var StorageTableSchema = object({
16484
+ /** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
16485
+ name: string(),
16486
+ /** The owner prefix of a scoped name (`recorder` for `recorder:addon-settings`), else null. */
16487
+ owner: string().nullable(),
16488
+ rows: number().int().nonnegative(),
16489
+ /** Bytes the table's pages occupy (`dbstat`); null when the engine cannot measure. */
16490
+ bytes: number().int().nonnegative().nullable(),
16491
+ /** Declared by an addon since this engine process started (a running addon claims it). */
16492
+ declaredThisBoot: boolean()
16493
+ });
16494
+ /** One declared record kind (D881) as System -> Data shows it. */
16495
+ var StorageKindSchema = object({
16496
+ owner: string(),
16497
+ kind: string(),
16498
+ database: _enum(["settings", "events"]),
16499
+ class: string(),
16500
+ state: _enum([
16501
+ "declared",
16502
+ "orphaned",
16503
+ "dropped"
16504
+ ]),
16505
+ /** `null` when the caller asked for no counts (`counts: false`). */
16506
+ rows: number().int().nonnegative().nullable(),
16507
+ /** Rows x the average size of a sample; null for an empty kind. */
16508
+ bytesEstimate: number().int().nonnegative().nullable(),
16509
+ writeTrigger: string(),
16510
+ retention: RecordRetentionSchema,
16511
+ /** `true` when the kind is an entry kind (the generic entries UI lists it). */
16512
+ entry: boolean(),
16513
+ /** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
16514
+ declaration: RecordKindDeclarationSchema
16515
+ });
16516
+ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
16517
+ collection: string().min(1),
16518
+ expectRows: number().int().nonnegative()
16519
+ }), object({
16520
+ dropped: literal(true),
16521
+ rows: number().int().nonnegative()
16522
+ }), {
16523
+ kind: "mutation",
16524
+ auth: "admin"
16525
+ }), method(object({
16526
+ owner: string().min(1).optional(),
16527
+ /** `false` skips the per-kind row count (a catalog read only). Default true. */
16528
+ counts: boolean().optional()
16529
+ }), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
16530
+ owner: string().min(1),
16531
+ kind: RecordKindNameSchema
16532
+ }), RecordQueryResultSchema, { auth: "admin" }), method(object({
16533
+ owner: string().min(1),
16534
+ kind: RecordKindNameSchema,
16535
+ records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
16536
+ /** The LAST batch: the copy is complete, the boot guard stops asking. */
16537
+ complete: boolean().optional()
16538
+ }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
16539
+ kind: "mutation",
16540
+ auth: "admin"
16541
+ }), method(object({
16542
+ collection: string().min(1),
16543
+ cursor: string().optional(),
16544
+ limit: number().int().min(1).max(1e3).optional()
16545
+ }), object({
16546
+ rows: array(object({
16547
+ id: string(),
16548
+ data: record(string(), unknown())
16549
+ })),
16550
+ nextCursor: string().nullable()
16551
+ }), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
16552
+ /**
16553
+ * record-entries - the ONE admin surface for every list of user-created entries
16554
+ * (D881): notification targets, brokers, LLM profiles, anything an addon
16555
+ * declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
16556
+ *
16557
+ * The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
16558
+ * the entry body with `secret: true` on every credential field, so a password
16559
+ * field is derived from the schema and never from a name. `putEntry` takes the
16560
+ * redaction token for an untouched secret (the stored value is kept), a string
16561
+ * for a new one, and the clear instruction to remove one. A read never carries
16562
+ * a secret value, and a locked keychain refuses the write with
16563
+ * `records/secret-unavailable` instead of storing plaintext.
16564
+ *
16565
+ * Hub-only, served in-process (it acts for each entry's owner on the keychain).
16566
+ */
16567
+ var EntryKindInfoSchema = object({
16568
+ owner: string(),
16569
+ kind: RecordKindNameSchema,
16570
+ title: string(),
16571
+ nameField: string(),
16572
+ /** JSON Schema of the body; `secret: true` marks a password field. */
16573
+ fields: record(string(), unknown()),
16574
+ secretPaths: array(string()),
16575
+ rows: number().int().nonnegative()
16576
+ });
16577
+ var EntryViewSchema = object({
16578
+ id: RecordIdSchema,
16579
+ name: string(),
16580
+ rev: number().int(),
16581
+ updatedAt: number(),
16582
+ /** Secret fields hold the redaction token. */
16583
+ data: RecordBodySchema
16584
+ });
16585
+ var EntryAddress = {
16586
+ owner: string().min(1),
16587
+ kind: RecordKindNameSchema
16588
+ };
16589
+ method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
16590
+ ...EntryAddress,
16591
+ id: RecordIdSchema.optional(),
16592
+ data: RecordBodySchema,
16593
+ ifRev: number().int().min(1).optional()
16594
+ }), object({
16595
+ id: string(),
16596
+ rev: number().int()
16597
+ }), {
16598
+ kind: "mutation",
16599
+ auth: "admin"
16600
+ }), method(object({
16601
+ ...EntryAddress,
16602
+ id: RecordIdSchema
16603
+ }), object({ deleted: boolean() }), {
16604
+ kind: "mutation",
16605
+ auth: "admin"
16606
+ });
16607
+ /**
16020
16608
  * `keychain` — the hub's encrypted store of secret values (D787).
16021
16609
  *
16022
16610
  * Settings blobs never hold a secret: they hold a marker
@@ -16557,6 +17145,16 @@ method(object({}), KeychainStatusSchema, { auth: "admin" }), method(object({}),
16557
17145
  kind: "mutation",
16558
17146
  auth: "admin",
16559
17147
  caller: "required"
17148
+ }), method(object({
17149
+ ref: string().min(1),
17150
+ value: string().min(1)
17151
+ }), object({
17152
+ ref: string(),
17153
+ version: number().int()
17154
+ }), {
17155
+ kind: "mutation",
17156
+ auth: "admin",
17157
+ caller: "required"
16560
17158
  }), method(object({ refs: array(string().min(1)).max(1e3) }), object({
16561
17159
  deleted: array(string()).readonly(),
16562
17160
  kept: array(object({
@@ -17078,7 +17676,11 @@ var deviceDiscoveryCapability = {
17078
17676
  };
17079
17677
  /**
17080
17678
  * `device-adoption` — generic discovery + adoption surface,
17081
- * system-scoped singleton. The de-HA-ified successor to `ha-discovery`:
17679
+ * system-scoped collection (one provider per integration addon), routed
17680
+ * by explicit `{ addonId }` on direct `deviceAdoption.*` calls — the same
17681
+ * pin model as `connection-test`. The admin UI keeps using
17682
+ * `deviceManager.adoption*` (which already threads `addonId`). The de-HA-ified
17683
+ * successor to `ha-discovery`:
17082
17684
  * keyed by `integrationId` (the addon resolves integrationId → broker
17083
17685
  * internally) rather than a connection-specific `brokerId`, and it
17084
17686
  * REUSES the shared `DiscoveredChildDevice` candidate type from
@@ -39331,6 +39933,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
39331
39933
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
39332
39934
  kind: "mutation",
39333
39935
  auth: "admin"
39936
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
39937
+ kind: "mutation",
39938
+ auth: "admin"
39334
39939
  }), method(ProfileRefInputSchema, _void(), {
39335
39940
  kind: "mutation",
39336
39941
  auth: "admin"
@@ -49840,6 +50445,41 @@ var ServerRollbackInfoSchema = object({
49840
50445
  atMs: number(),
49841
50446
  reason: string()
49842
50447
  });
50448
+ /**
50449
+ * The runner boot check (D877): the runners this node PLANNED (hub: one per
50450
+ * `resolveRunnerId` over its forked addons; agent: the runners its process
50451
+ * service holds, because only the hub plans) against the states the process
50452
+ * service reports. Kept in memory, recomputed by the same one-shot check after
50453
+ * every boot, served on `getServerPackageStatus`.
50454
+ *
50455
+ * `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
50456
+ * refusal (an addon that said "I will not start, and here is why"), `missing` a
50457
+ * planned runner the process service has no entry for.
50458
+ */
50459
+ var RunnerRefusalSchema = object({
50460
+ runnerId: string(),
50461
+ addonIds: array(string()),
50462
+ reason: string()
50463
+ });
50464
+ var RunnerBootCheckSchema = object({
50465
+ checkedAtMs: number(),
50466
+ /** Runners planned for this node. */
50467
+ expected: number(),
50468
+ /** Planned runners whose process is `running`. */
50469
+ running: number(),
50470
+ failed: array(string()),
50471
+ refused: array(RunnerRefusalSchema),
50472
+ missing: array(string()),
50473
+ /**
50474
+ * Runners still on their way: `starting`, or `crashed` waiting on a backoff
50475
+ * respawn. The check is FINAL only when this is empty; until then nothing is
50476
+ * pushed and the verdict is re-evaluated on the next runner state change.
50477
+ * Optional for version skew (absent = settled).
50478
+ */
50479
+ pending: array(string()).optional(),
50480
+ /** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
50481
+ planKnown: boolean()
50482
+ });
49843
50483
  var ServerPackageStatusSchema = object({
49844
50484
  /** Root package name (`@camstack/server` on the hub). */
49845
50485
  packageName: string(),
@@ -49902,7 +50542,14 @@ var ServerPackageStatusSchema = object({
49902
50542
  * for version skew: an older provider's payload simply omits it, and an
49903
50543
  * absent wrapper is unknown — never `native`.
49904
50544
  */
49905
- wrapper: WrapperIdentitySchema.optional()
50545
+ wrapper: WrapperIdentitySchema.optional(),
50546
+ /**
50547
+ * What this node PLANNED to run against what its process service reports
50548
+ * (D877). Absent until the one-shot boot check has run (~60 s after boot) and
50549
+ * on a provider that predates it. Absent is "not checked yet", never "all
50550
+ * well": a consumer that needs the answer treats it as pending.
50551
+ */
50552
+ runners: RunnerBootCheckSchema.optional()
49906
50553
  });
49907
50554
  var ServerUpdateCheckResultSchema = object({
49908
50555
  packageName: string(),
@@ -49953,6 +50600,13 @@ var ServerUpdateOutcomeSchema = _enum([
49953
50600
  "refused",
49954
50601
  "failed"
49955
50602
  ]);
50603
+ /** One addon the pre-flight found the target version would refuse (D877). */
50604
+ var UpdateBlockerSchema = object({
50605
+ addonId: string(),
50606
+ reason: string(),
50607
+ /** What the operator does about it. */
50608
+ remedy: string()
50609
+ });
49956
50610
  var ServerUpdateActionResultSchema = object({
49957
50611
  accepted: boolean(),
49958
50612
  targetVersion: string().nullable(),
@@ -49970,14 +50624,27 @@ var ServerUpdateActionResultSchema = object({
49970
50624
  * The failure itself, verbatim enough to act on (the npm output for a
49971
50625
  * staging install). Non-null only for `failed`.
49972
50626
  */
49973
- error: string().nullable().optional()
50627
+ error: string().nullable().optional(),
50628
+ /**
50629
+ * The addons the target version would refuse to start on this node's live
50630
+ * store (D877), present when the pre-flight refused the update
50631
+ * (`reason: 'addon-would-refuse'`). Optional for version skew.
50632
+ */
50633
+ blockers: array(UpdateBlockerSchema).optional()
49974
50634
  });
49975
50635
  method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
49976
50636
  kind: "mutation",
49977
50637
  auth: "admin"
49978
- }), method(object({
49979
- /** Explicit target version; omitted = latest from the registry. */
49980
- version: string().optional() }), ServerUpdateActionResultSchema, {
50638
+ }), method(object({
50639
+ /** Explicit target version; omitted = latest from the registry. */
50640
+ version: string().optional(),
50641
+ /**
50642
+ * Apply even though the pre-flight (D877) found addons the target would
50643
+ * refuse to start. Off by default: those addons stay down until the
50644
+ * remedy is run, which is the incident this gate exists to prevent.
50645
+ */
50646
+ acknowledgeRefusals: boolean().optional()
50647
+ }), ServerUpdateActionResultSchema, {
49981
50648
  kind: "mutation",
49982
50649
  auth: "admin",
49983
50650
  timeoutMs: 16 * 6e4
@@ -52423,7 +53090,9 @@ var ManifestShapeSchema = object({
52423
53090
  var AddonProcessSchema = object({
52424
53091
  pid: number().optional(),
52425
53092
  mode: string(),
52426
- state: string()
53093
+ state: string(),
53094
+ /** Why the runner is `refused` (an addon's own words), when it is (D877). */
53095
+ reason: string().optional()
52427
53096
  });
52428
53097
  /**
52429
53098
  * Per-addon health snapshot from the kernel's AddonHealthMonitor.
@@ -53191,7 +53860,8 @@ var batteryCapability = {
53191
53860
  DeviceType.Button,
53192
53861
  DeviceType.Switch,
53193
53862
  DeviceType.PetFeeder,
53194
- DeviceType.Container
53863
+ DeviceType.Container,
53864
+ DeviceType.Thermostat
53195
53865
  ],
53196
53866
  methods: {
53197
53867
  /**
@@ -53829,6 +54499,12 @@ var ClimateControlStatusSchema = object({
53829
54499
  /** Horizontal louver swing on/off. Null when the device has no
53830
54500
  * horizontal swing surface (gate with `DeviceFeature.ClimateSwingHorizontal`). */
53831
54501
  swingHorizontal: boolean().nullable(),
54502
+ /** Lowest setpoint the device accepts, Celsius. Absent / null = not reported. */
54503
+ minTemp: number().nullable().optional(),
54504
+ /** Highest setpoint the device accepts, Celsius. Absent / null = not reported. */
54505
+ maxTemp: number().nullable().optional(),
54506
+ /** Setpoint granularity, Celsius (0.5, 1). Absent / null = not reported. */
54507
+ tempStep: number().positive().nullable().optional(),
53832
54508
  /** Ms epoch when the slice was last updated (push or command). */
53833
54509
  lastFetchedAt: number()
53834
54510
  });
@@ -54675,6 +55351,161 @@ onStatusChanged: { data: object({
54675
55351
  * whether persisting is worth a SQLite commit. */
54676
55352
  volatileStateFields: ["lastChangedAt"]
54677
55353
  };
55354
+ /**
55355
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
55356
+ * consumable levels (salt, rinse aid) and common program options.
55357
+ *
55358
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
55359
+ * by any integration that exposes the same program / option surface.
55360
+ *
55361
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
55362
+ * provider refreshes the slice on an interval and eagerly after commands.
55363
+ */
55364
+ var DishwasherStateSchema = _enum([
55365
+ "idle",
55366
+ "running",
55367
+ "paused",
55368
+ "finished",
55369
+ "error",
55370
+ "unavailable"
55371
+ ]);
55372
+ var DishwasherConsumableLevelSchema = _enum([
55373
+ "ok",
55374
+ "low",
55375
+ "empty"
55376
+ ]);
55377
+ var DishwasherStatusSchema = object({
55378
+ state: DishwasherStateSchema,
55379
+ /** Active program id/name, or null when none selected / unknown. */
55380
+ program: string().nullable(),
55381
+ /** Program tokens the hardware accepts — drives the UI selector. */
55382
+ availablePrograms: array(string()),
55383
+ /** Minutes remaining on the active cycle, or null when not running. */
55384
+ remainingMinutes: number().int().nonnegative().nullable(),
55385
+ /** Cycle completion 0..100, or null when not applicable. */
55386
+ progressPercent: number().min(0).max(100).nullable(),
55387
+ /** True when the door is reported open. */
55388
+ doorOpen: boolean(),
55389
+ /** True when remote start is allowed (door closed, power on, etc.). */
55390
+ remoteStartAllowed: boolean(),
55391
+ /** Main power / switched-on state. */
55392
+ powerOn: boolean(),
55393
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
55394
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
55395
+ halfLoad: boolean(),
55396
+ hygienePlus: boolean(),
55397
+ /** Extra dry option when the appliance exposes it. */
55398
+ extraDry: boolean(),
55399
+ /** Intensive zone (lower basket) when the appliance exposes it. */
55400
+ intensiveZone: boolean(),
55401
+ /** VarioSpeed / VarioSpeed+ when the appliance exposes it. */
55402
+ varioSpeedPlus: boolean(),
55403
+ /** Child lock (controls disabled on the appliance). */
55404
+ childLock: boolean(),
55405
+ errorCode: number().nullable(),
55406
+ errorLabel: string().nullable(),
55407
+ lastFetchedAt: number()
55408
+ });
55409
+ var dishwasherCapability = {
55410
+ name: "dishwasher",
55411
+ scope: "device",
55412
+ deviceNative: true,
55413
+ mode: "singleton",
55414
+ deviceTypes: [DeviceType.Dishwasher],
55415
+ methods: {
55416
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55417
+ kind: "mutation",
55418
+ auth: "protected"
55419
+ }),
55420
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55421
+ kind: "mutation",
55422
+ auth: "protected"
55423
+ }),
55424
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
55425
+ kind: "mutation",
55426
+ auth: "protected"
55427
+ }),
55428
+ setProgram: method(object({
55429
+ deviceId: number().int().nonnegative(),
55430
+ program: string().min(1)
55431
+ }), _void(), {
55432
+ kind: "mutation",
55433
+ auth: "protected"
55434
+ }),
55435
+ setPower: method(object({
55436
+ deviceId: number().int().nonnegative(),
55437
+ on: boolean()
55438
+ }), _void(), {
55439
+ kind: "mutation",
55440
+ auth: "protected"
55441
+ }),
55442
+ setHalfLoad: method(object({
55443
+ deviceId: number().int().nonnegative(),
55444
+ on: boolean()
55445
+ }), _void(), {
55446
+ kind: "mutation",
55447
+ auth: "protected"
55448
+ }),
55449
+ setHygienePlus: method(object({
55450
+ deviceId: number().int().nonnegative(),
55451
+ on: boolean()
55452
+ }), _void(), {
55453
+ kind: "mutation",
55454
+ auth: "protected"
55455
+ }),
55456
+ setExtraDry: method(object({
55457
+ deviceId: number().int().nonnegative(),
55458
+ on: boolean()
55459
+ }), _void(), {
55460
+ kind: "mutation",
55461
+ auth: "protected"
55462
+ }),
55463
+ setIntensiveZone: method(object({
55464
+ deviceId: number().int().nonnegative(),
55465
+ on: boolean()
55466
+ }), _void(), {
55467
+ kind: "mutation",
55468
+ auth: "protected"
55469
+ }),
55470
+ setVarioSpeedPlus: method(object({
55471
+ deviceId: number().int().nonnegative(),
55472
+ on: boolean()
55473
+ }), _void(), {
55474
+ kind: "mutation",
55475
+ auth: "protected"
55476
+ }),
55477
+ setChildLock: method(object({
55478
+ deviceId: number().int().nonnegative(),
55479
+ on: boolean()
55480
+ }), _void(), {
55481
+ kind: "mutation",
55482
+ auth: "protected"
55483
+ }),
55484
+ setOption: method(object({
55485
+ deviceId: number().int().nonnegative(),
55486
+ key: string().min(1),
55487
+ value: union([
55488
+ boolean(),
55489
+ string(),
55490
+ number()
55491
+ ])
55492
+ }), _void(), {
55493
+ kind: "mutation",
55494
+ auth: "protected"
55495
+ })
55496
+ },
55497
+ status: {
55498
+ schema: DishwasherStatusSchema,
55499
+ kind: "poll"
55500
+ },
55501
+ runtimeState: DishwasherStatusSchema,
55502
+ durability: "session",
55503
+ history: { fields: { progressPercent: {
55504
+ kind: "gauge",
55505
+ unit: "%",
55506
+ deadband: 2
55507
+ } } }
55508
+ };
54678
55509
  var DoorbellStatusSchema = object({
54679
55510
  /** Ms epoch of the last press. null = never observed since this provider started. */
54680
55511
  lastPressedAt: number().nullable(),
@@ -55477,6 +56308,32 @@ var gasCapability = {
55477
56308
  * whether persisting is worth a SQLite commit. */
55478
56309
  volatileStateFields: ["lastChangedAt"]
55479
56310
  };
56311
+ var HeatingValveStatusSchema = object({
56312
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
56313
+ position: number().min(0).max(100).nullable(),
56314
+ /** Ms epoch when the slice was last updated (push or poll). */
56315
+ lastFetchedAt: number()
56316
+ });
56317
+ var heatingValveCapability = {
56318
+ name: "heating-valve",
56319
+ scope: "device",
56320
+ deviceNative: true,
56321
+ mode: "singleton",
56322
+ deviceTypes: [DeviceType.Thermostat],
56323
+ methods: {},
56324
+ status: {
56325
+ schema: HeatingValveStatusSchema,
56326
+ kind: "push"
56327
+ },
56328
+ runtimeState: HeatingValveStatusSchema,
56329
+ durability: "session",
56330
+ history: { fields: { position: {
56331
+ kind: "gauge",
56332
+ unit: "%",
56333
+ deadband: 1
56334
+ } } },
56335
+ volatileStateFields: ["lastFetchedAt"]
56336
+ };
55480
56337
  /**
55481
56338
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
55482
56339
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -56609,7 +57466,19 @@ var TlsStatusSchema = object({
56609
57466
  sans: array(string()),
56610
57467
  caCertPem: string().nullable(),
56611
57468
  reissueError: string().nullable(),
56612
- restartRequired: boolean()
57469
+ restartRequired: boolean(),
57470
+ /** An uploaded certificate is served but no CA is kept for it and it is not publicly signed (D873). */
57471
+ caMissing: boolean(),
57472
+ /** Does the hub's own generated CA carry a critical name constraint? `null` while it has none. */
57473
+ localCaConstrained: boolean().nullable(),
57474
+ /** ISO time the generated CA was replaced by a constrained one; devices must re-download it. */
57475
+ caReplacedAt: string().nullable(),
57476
+ /** The uploaded certificate kept on disk, selectable again after "Revert to generated". */
57477
+ storedUpload: object({
57478
+ leafFingerprintSha256: string(),
57479
+ validTo: string(),
57480
+ hasCa: boolean()
57481
+ }).nullable()
56613
57482
  });
56614
57483
  method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(object({
56615
57484
  /**
@@ -56665,6 +57534,9 @@ method(_void(), ListResultSchema), method(_void(), PreferredSchema), method(obje
56665
57534
  }), method(_void(), object({ pem: string() })), method(_void(), TlsStatusSchema, {
56666
57535
  kind: "mutation",
56667
57536
  auth: "admin"
57537
+ }), method(_void(), TlsStatusSchema, {
57538
+ kind: "mutation",
57539
+ auth: "admin"
56668
57540
  });
56669
57541
  var LockControlStatusSchema = object({
56670
57542
  /** Lifecycle state of the lock. `jammed` means the motor reported
@@ -63158,7 +64030,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
63158
64030
  kind: "mutation",
63159
64031
  auth: "admin",
63160
64032
  access: "delete"
63161
- }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(object({
64033
+ }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
64034
+ kind: "mutation",
64035
+ auth: "admin",
64036
+ access: "create"
64037
+ }), method(object({
63162
64038
  userId: string(),
63163
64039
  code: string()
63164
64040
  }), object({ valid: boolean() }), {
@@ -64878,6 +65754,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
64878
65754
  dayNight: dayNightCapability,
64879
65755
  deviceDiscovery: deviceDiscoveryCapability,
64880
65756
  deviceStatus: deviceStatusCapability,
65757
+ dishwasher: dishwasherCapability,
64881
65758
  doorbell: doorbellCapability,
64882
65759
  enumSensor: enumSensorCapability,
64883
65760
  eventEmitter: eventEmitterCapability,
@@ -64885,6 +65762,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
64885
65762
  featureProbe: featureProbeCapability,
64886
65763
  flood: floodCapability,
64887
65764
  gas: gasCapability,
65765
+ heatingValve: heatingValveCapability,
64888
65766
  humidifier: humidifierCapability,
64889
65767
  humiditySensor: humiditySensorCapability,
64890
65768
  image: imageCapability,
@@ -64970,13 +65848,14 @@ var BaseDevice = class {
64970
65848
  get state() {
64971
65849
  if (!this._stateProxyCache) {
64972
65850
  const cache = {};
64973
- const handler = { get: (_target, key) => {
65851
+ const handler = { get: (target, key) => {
64974
65852
  const k = key;
64975
- if (k in cache) return cache[k];
65853
+ const existing = Reflect.get(target, k);
65854
+ if (existing !== void 0) return existing;
64976
65855
  const cap = DEVICE_LOCAL_STATE_CAPS[k];
64977
65856
  if (!cap) return void 0;
64978
65857
  const proxy = this.sliceProxy(cap);
64979
- cache[k] = proxy;
65858
+ Reflect.set(target, k, proxy);
64980
65859
  return proxy;
64981
65860
  } };
64982
65861
  this._stateProxyCache = new Proxy(cache, handler);
@@ -65175,7 +66054,7 @@ var BaseDevice = class {
65175
66054
  async updateSourceInfo(patch) {
65176
66055
  const next = mergeSourceInfo(this.sourceInfo, patch);
65177
66056
  this._sourceInfoCache = Object.freeze({ ...next });
65178
- const action = this.ctx.api?.deviceManager?.setMetadata;
66057
+ const action = this.ctx.api.deviceManager?.setMetadata;
65179
66058
  if (action) try {
65180
66059
  await action.mutate({
65181
66060
  deviceId: this.id,
@@ -65210,7 +66089,7 @@ var BaseDevice = class {
65210
66089
  * device boot on a meta refresh.
65211
66090
  */
65212
66091
  async refreshFeatures() {
65213
- const action = this.ctx.api?.deviceManager?.registerDevice;
66092
+ const action = this.ctx.api.deviceManager?.registerDevice;
65214
66093
  if (!action) return;
65215
66094
  try {
65216
66095
  await action.mutate({
@@ -65609,6 +66488,12 @@ var BaseDeviceProvider = class extends BaseAddon {
65609
66488
  provider: this
65610
66489
  }];
65611
66490
  }
66491
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
66492
+ providerRegistrationsFromSuper(result) {
66493
+ if (Array.isArray(result)) return result;
66494
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
66495
+ return [];
66496
+ }
65612
66497
  async onShutdown() {
65613
66498
  this._restoreShuttingDown = true;
65614
66499
  this.cancelRestoreRetries();
@@ -66135,7 +67020,7 @@ var BaseDeviceProvider = class extends BaseAddon {
66135
67020
  return toDeviceSummary(device, this.addonId);
66136
67021
  }
66137
67022
  };
66138
- 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;
67023
+ 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;
66139
67024
  new Set(Object.values(DeviceType));
66140
67025
  Object.freeze({
66141
67026
  "accessories.getStatus": {
@@ -67284,6 +68169,12 @@ Object.freeze({
67284
68169
  addonId: null,
67285
68170
  access: "view"
67286
68171
  },
68172
+ "coreBlocks.migrateRawSecrets": {
68173
+ capName: "core-blocks",
68174
+ capScope: "system",
68175
+ addonId: null,
68176
+ access: "create"
68177
+ },
67287
68178
  "coreBlocks.restart": {
67288
68179
  capName: "core-blocks",
67289
68180
  capScope: "system",
@@ -68550,6 +69441,84 @@ Object.freeze({
68550
69441
  addonId: null,
68551
69442
  access: "view"
68552
69443
  },
69444
+ "dishwasher.getStatus": {
69445
+ capName: "dishwasher",
69446
+ capScope: "device",
69447
+ addonId: null,
69448
+ access: "view"
69449
+ },
69450
+ "dishwasher.pause": {
69451
+ capName: "dishwasher",
69452
+ capScope: "device",
69453
+ addonId: null,
69454
+ access: "create"
69455
+ },
69456
+ "dishwasher.setChildLock": {
69457
+ capName: "dishwasher",
69458
+ capScope: "device",
69459
+ addonId: null,
69460
+ access: "create"
69461
+ },
69462
+ "dishwasher.setExtraDry": {
69463
+ capName: "dishwasher",
69464
+ capScope: "device",
69465
+ addonId: null,
69466
+ access: "create"
69467
+ },
69468
+ "dishwasher.setHalfLoad": {
69469
+ capName: "dishwasher",
69470
+ capScope: "device",
69471
+ addonId: null,
69472
+ access: "create"
69473
+ },
69474
+ "dishwasher.setHygienePlus": {
69475
+ capName: "dishwasher",
69476
+ capScope: "device",
69477
+ addonId: null,
69478
+ access: "create"
69479
+ },
69480
+ "dishwasher.setIntensiveZone": {
69481
+ capName: "dishwasher",
69482
+ capScope: "device",
69483
+ addonId: null,
69484
+ access: "create"
69485
+ },
69486
+ "dishwasher.setOption": {
69487
+ capName: "dishwasher",
69488
+ capScope: "device",
69489
+ addonId: null,
69490
+ access: "create"
69491
+ },
69492
+ "dishwasher.setPower": {
69493
+ capName: "dishwasher",
69494
+ capScope: "device",
69495
+ addonId: null,
69496
+ access: "create"
69497
+ },
69498
+ "dishwasher.setProgram": {
69499
+ capName: "dishwasher",
69500
+ capScope: "device",
69501
+ addonId: null,
69502
+ access: "create"
69503
+ },
69504
+ "dishwasher.setVarioSpeedPlus": {
69505
+ capName: "dishwasher",
69506
+ capScope: "device",
69507
+ addonId: null,
69508
+ access: "create"
69509
+ },
69510
+ "dishwasher.start": {
69511
+ capName: "dishwasher",
69512
+ capScope: "device",
69513
+ addonId: null,
69514
+ access: "create"
69515
+ },
69516
+ "dishwasher.stop": {
69517
+ capName: "dishwasher",
69518
+ capScope: "device",
69519
+ addonId: null,
69520
+ access: "create"
69521
+ },
68553
69522
  "doorbell.getStatus": {
68554
69523
  capName: "doorbell",
68555
69524
  capScope: "device",
@@ -68760,6 +69729,12 @@ Object.freeze({
68760
69729
  addonId: null,
68761
69730
  access: "view"
68762
69731
  },
69732
+ "heatingValve.getStatus": {
69733
+ capName: "heating-valve",
69734
+ capScope: "device",
69735
+ addonId: null,
69736
+ access: "view"
69737
+ },
68763
69738
  "humidifier.getStatus": {
68764
69739
  capName: "humidifier",
68765
69740
  capScope: "device",
@@ -68970,6 +69945,12 @@ Object.freeze({
68970
69945
  addonId: null,
68971
69946
  access: "create"
68972
69947
  },
69948
+ "keychainAdmin.importSecret": {
69949
+ capName: "keychain-admin",
69950
+ capScope: "system",
69951
+ addonId: null,
69952
+ access: "create"
69953
+ },
68973
69954
  "keychainAdmin.listAudit": {
68974
69955
  capName: "keychain-admin",
68975
69956
  capScope: "system",
@@ -69138,6 +70119,12 @@ Object.freeze({
69138
70119
  addonId: null,
69139
70120
  access: "view"
69140
70121
  },
70122
+ "llm.migrateRawSecrets": {
70123
+ capName: "llm",
70124
+ capScope: "system",
70125
+ addonId: null,
70126
+ access: "create"
70127
+ },
69141
70128
  "llm.resolveModelRef": {
69142
70129
  capName: "llm",
69143
70130
  capScope: "system",
@@ -69366,6 +70353,12 @@ Object.freeze({
69366
70353
  addonId: null,
69367
70354
  access: "create"
69368
70355
  },
70356
+ "localNetwork.useStoredUploadedCertificate": {
70357
+ capName: "local-network",
70358
+ capScope: "system",
70359
+ addonId: null,
70360
+ access: "create"
70361
+ },
69369
70362
  "lockControl.getStatus": {
69370
70363
  capName: "lock-control",
69371
70364
  capScope: "device",
@@ -72018,6 +73011,30 @@ Object.freeze({
72018
73011
  addonId: null,
72019
73012
  access: "create"
72020
73013
  },
73014
+ "recordEntries.deleteEntry": {
73015
+ capName: "record-entries",
73016
+ capScope: "system",
73017
+ addonId: null,
73018
+ access: "delete"
73019
+ },
73020
+ "recordEntries.listEntries": {
73021
+ capName: "record-entries",
73022
+ capScope: "system",
73023
+ addonId: null,
73024
+ access: "view"
73025
+ },
73026
+ "recordEntries.listEntryKinds": {
73027
+ capName: "record-entries",
73028
+ capScope: "system",
73029
+ addonId: null,
73030
+ access: "view"
73031
+ },
73032
+ "recordEntries.putEntry": {
73033
+ capName: "record-entries",
73034
+ capScope: "system",
73035
+ addonId: null,
73036
+ access: "create"
73037
+ },
72021
73038
  "recording.getAvailability": {
72022
73039
  capName: "recording",
72023
73040
  capScope: "device",
@@ -72318,6 +73335,102 @@ Object.freeze({
72318
73335
  addonId: null,
72319
73336
  access: "view"
72320
73337
  },
73338
+ "records.aggregate": {
73339
+ capName: "records",
73340
+ capScope: "system",
73341
+ addonId: null,
73342
+ access: "view"
73343
+ },
73344
+ "records.allocateId": {
73345
+ capName: "records",
73346
+ capScope: "system",
73347
+ addonId: null,
73348
+ access: "create"
73349
+ },
73350
+ "records.count": {
73351
+ capName: "records",
73352
+ capScope: "system",
73353
+ addonId: null,
73354
+ access: "view"
73355
+ },
73356
+ "records.declareKinds": {
73357
+ capName: "records",
73358
+ capScope: "system",
73359
+ addonId: null,
73360
+ access: "create"
73361
+ },
73362
+ "records.delete": {
73363
+ capName: "records",
73364
+ capScope: "system",
73365
+ addonId: null,
73366
+ access: "delete"
73367
+ },
73368
+ "records.deleteDevice": {
73369
+ capName: "records",
73370
+ capScope: "system",
73371
+ addonId: null,
73372
+ access: "delete"
73373
+ },
73374
+ "records.deleteMany": {
73375
+ capName: "records",
73376
+ capScope: "system",
73377
+ addonId: null,
73378
+ access: "delete"
73379
+ },
73380
+ "records.deleteWhere": {
73381
+ capName: "records",
73382
+ capScope: "system",
73383
+ addonId: null,
73384
+ access: "delete"
73385
+ },
73386
+ "records.get": {
73387
+ capName: "records",
73388
+ capScope: "system",
73389
+ addonId: null,
73390
+ access: "view"
73391
+ },
73392
+ "records.getMany": {
73393
+ capName: "records",
73394
+ capScope: "system",
73395
+ addonId: null,
73396
+ access: "view"
73397
+ },
73398
+ "records.histogram": {
73399
+ capName: "records",
73400
+ capScope: "system",
73401
+ addonId: null,
73402
+ access: "view"
73403
+ },
73404
+ "records.patch": {
73405
+ capName: "records",
73406
+ capScope: "system",
73407
+ addonId: null,
73408
+ access: "create"
73409
+ },
73410
+ "records.put": {
73411
+ capName: "records",
73412
+ capScope: "system",
73413
+ addonId: null,
73414
+ access: "create"
73415
+ },
73416
+ "records.putMany": {
73417
+ capName: "records",
73418
+ capScope: "system",
73419
+ addonId: null,
73420
+ access: "create"
73421
+ },
73422
+ "records.query": {
73423
+ capName: "records",
73424
+ capScope: "system",
73425
+ addonId: null,
73426
+ access: "view"
73427
+ },
73428
+ "records.secretRefs": {
73429
+ capName: "records",
73430
+ capScope: "system",
73431
+ addonId: null,
73432
+ access: "view"
73433
+ },
72321
73434
  "sceneMonitor.captureReference": {
72322
73435
  capName: "scene-monitor",
72323
73436
  capScope: "device",
@@ -72750,6 +73863,48 @@ Object.freeze({
72750
73863
  addonId: null,
72751
73864
  access: "create"
72752
73865
  },
73866
+ "storageAdmin.adoptRecords": {
73867
+ capName: "storage-admin",
73868
+ capScope: "system",
73869
+ addonId: null,
73870
+ access: "create"
73871
+ },
73872
+ "storageAdmin.dropCollection": {
73873
+ capName: "storage-admin",
73874
+ capScope: "system",
73875
+ addonId: null,
73876
+ access: "delete"
73877
+ },
73878
+ "storageAdmin.isAdoptedLegacyTable": {
73879
+ capName: "storage-admin",
73880
+ capScope: "system",
73881
+ addonId: null,
73882
+ access: "view"
73883
+ },
73884
+ "storageAdmin.listKinds": {
73885
+ capName: "storage-admin",
73886
+ capScope: "system",
73887
+ addonId: null,
73888
+ access: "view"
73889
+ },
73890
+ "storageAdmin.listTables": {
73891
+ capName: "storage-admin",
73892
+ capScope: "system",
73893
+ addonId: null,
73894
+ access: "view"
73895
+ },
73896
+ "storageAdmin.readLegacyCollection": {
73897
+ capName: "storage-admin",
73898
+ capScope: "system",
73899
+ addonId: null,
73900
+ access: "view"
73901
+ },
73902
+ "storageAdmin.readRecords": {
73903
+ capName: "storage-admin",
73904
+ capScope: "system",
73905
+ addonId: null,
73906
+ access: "view"
73907
+ },
72753
73908
  "storageEvictable.evict": {
72754
73909
  capName: "storage-evictable",
72755
73910
  capScope: "system",
@@ -73662,6 +74817,12 @@ Object.freeze({
73662
74817
  addonId: null,
73663
74818
  access: "view"
73664
74819
  },
74820
+ "userManagement.migrateRawSecrets": {
74821
+ capName: "user-management",
74822
+ capScope: "system",
74823
+ addonId: null,
74824
+ access: "create"
74825
+ },
73665
74826
  "userManagement.oauthExchangeCode": {
73666
74827
  capName: "user-management",
73667
74828
  capScope: "system",
@@ -74161,7 +75322,7 @@ Object.freeze({
74161
75322
  access: "create"
74162
75323
  }
74163
75324
  });
74164
- 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;
75325
+ 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;
74165
75326
  DeviceFeature.BatteryOperated;
74166
75327
  Object.freeze({
74167
75328
  "accessories.getStatus": [{
@@ -74985,6 +76146,71 @@ Object.freeze({
74985
76146
  form: "single",
74986
76147
  optional: false
74987
76148
  }],
76149
+ "dishwasher.getStatus": [{
76150
+ name: "deviceId",
76151
+ form: "single",
76152
+ optional: false
76153
+ }],
76154
+ "dishwasher.pause": [{
76155
+ name: "deviceId",
76156
+ form: "single",
76157
+ optional: false
76158
+ }],
76159
+ "dishwasher.setChildLock": [{
76160
+ name: "deviceId",
76161
+ form: "single",
76162
+ optional: false
76163
+ }],
76164
+ "dishwasher.setExtraDry": [{
76165
+ name: "deviceId",
76166
+ form: "single",
76167
+ optional: false
76168
+ }],
76169
+ "dishwasher.setHalfLoad": [{
76170
+ name: "deviceId",
76171
+ form: "single",
76172
+ optional: false
76173
+ }],
76174
+ "dishwasher.setHygienePlus": [{
76175
+ name: "deviceId",
76176
+ form: "single",
76177
+ optional: false
76178
+ }],
76179
+ "dishwasher.setIntensiveZone": [{
76180
+ name: "deviceId",
76181
+ form: "single",
76182
+ optional: false
76183
+ }],
76184
+ "dishwasher.setOption": [{
76185
+ name: "deviceId",
76186
+ form: "single",
76187
+ optional: false
76188
+ }],
76189
+ "dishwasher.setPower": [{
76190
+ name: "deviceId",
76191
+ form: "single",
76192
+ optional: false
76193
+ }],
76194
+ "dishwasher.setProgram": [{
76195
+ name: "deviceId",
76196
+ form: "single",
76197
+ optional: false
76198
+ }],
76199
+ "dishwasher.setVarioSpeedPlus": [{
76200
+ name: "deviceId",
76201
+ form: "single",
76202
+ optional: false
76203
+ }],
76204
+ "dishwasher.start": [{
76205
+ name: "deviceId",
76206
+ form: "single",
76207
+ optional: false
76208
+ }],
76209
+ "dishwasher.stop": [{
76210
+ name: "deviceId",
76211
+ form: "single",
76212
+ optional: false
76213
+ }],
74988
76214
  "doorbell.getStatus": [{
74989
76215
  name: "deviceId",
74990
76216
  form: "single",
@@ -75054,6 +76280,11 @@ Object.freeze({
75054
76280
  form: "single",
75055
76281
  optional: false
75056
76282
  }],
76283
+ "heatingValve.getStatus": [{
76284
+ name: "deviceId",
76285
+ form: "single",
76286
+ optional: false
76287
+ }],
75057
76288
  "humidifier.getStatus": [{
75058
76289
  name: "deviceId",
75059
76290
  form: "single",
@@ -76338,6 +77569,37 @@ Object.freeze({
76338
77569
  form: "single",
76339
77570
  optional: false
76340
77571
  }],
77572
+ "records.count": [{
77573
+ name: "deviceId",
77574
+ form: "single",
77575
+ optional: true
77576
+ }],
77577
+ "records.deleteDevice": [{
77578
+ name: "deviceId",
77579
+ form: "single",
77580
+ optional: false
77581
+ }],
77582
+ "records.deleteWhere": [{
77583
+ name: "deviceId",
77584
+ form: "single",
77585
+ optional: true
77586
+ }],
77587
+ "records.histogram": [{
77588
+ name: "deviceId",
77589
+ form: "single",
77590
+ optional: true
77591
+ }],
77592
+ "records.putMany": [{
77593
+ name: "records",
77594
+ form: "object-array",
77595
+ optional: false,
77596
+ itemField: "deviceId"
77597
+ }],
77598
+ "records.query": [{
77599
+ name: "deviceId",
77600
+ form: "single",
77601
+ optional: true
77602
+ }],
76341
77603
  "sceneMonitor.captureReference": [{
76342
77604
  name: "deviceId",
76343
77605
  form: "single",
@@ -76454,6 +77716,17 @@ Object.freeze({
76454
77716
  form: "single",
76455
77717
  optional: false
76456
77718
  }],
77719
+ "storageAdmin.adoptRecords": [{
77720
+ name: "records",
77721
+ form: "object-array",
77722
+ optional: false,
77723
+ itemField: "deviceId"
77724
+ }],
77725
+ "storageAdmin.readRecords": [{
77726
+ name: "deviceId",
77727
+ form: "single",
77728
+ optional: true
77729
+ }],
76457
77730
  "streamBroker.acquireEgressTranscode": [{
76458
77731
  name: "deviceId",
76459
77732
  form: "single",