@camstack/addon-provider-homeassistant 1.2.173 → 1.2.602

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.
@@ -1,4 +1,4 @@
1
- //#region ../types/dist/event-category-C4hVnRo8.mjs
1
+ //#region ../types/dist/event-category-BvOFi6PY.mjs
2
2
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
3
3
  EventCategory["SystemBoot"] = "system.boot";
4
4
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -62,6 +62,24 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
62
62
  * consumes this category and maps it to the `addon-crash-loop` kind.
63
63
  */
64
64
  EventCategory["AddonRunnerFailed"] = "addon.runner-failed";
65
+ /**
66
+ * A runner whose addon refused to start with a typed reason (D877) - parked
67
+ * in `refused`, never counted by the crash breaker, retried on operator
68
+ * action. One event per refusal.
69
+ */
70
+ EventCategory["AddonRunnerRefused"] = "addon.runner-refused";
71
+ /**
72
+ * A runner settled on a state (D877): `running` (READY), `crashed`, `failed` or
73
+ * `refused`. In-process telemetry for the boot check (re-evaluate while any
74
+ * runner is still pending) and the alert centre (close a recovered runner).
75
+ */
76
+ EventCategory["ProcessStateChanged"] = "process.state-changed";
77
+ /**
78
+ * The node's one-shot runner boot check (D877): planned runners against the
79
+ * process service, `degraded` when any is failed, refused or missing. The
80
+ * alert centre turns it into one alert and a direct critical push.
81
+ */
82
+ EventCategory["SystemRunnerCheck"] = "system.runner-check";
65
83
  EventCategory["AddonError"] = "addon.error";
66
84
  EventCategory["AddonPageReady"] = "addon.page-ready";
67
85
  EventCategory["AddonWidgetReady"] = "addon.widget-ready";
@@ -4104,6 +4122,12 @@ var numberProcessor = (schema, ctx, _json, _params) => {
4104
4122
  var booleanProcessor = (_schema, _ctx, json, _params) => {
4105
4123
  json.type = "boolean";
4106
4124
  };
4125
+ var bigintProcessor = (_schema, ctx, _json, _params) => {
4126
+ if (ctx.unrepresentable === "throw") throw new Error("BigInt cannot be represented in JSON Schema");
4127
+ };
4128
+ var symbolProcessor = (_schema, ctx, _json, _params) => {
4129
+ if (ctx.unrepresentable === "throw") throw new Error("Symbols cannot be represented in JSON Schema");
4130
+ };
4107
4131
  var nullProcessor = (_schema, ctx, json, _params) => {
4108
4132
  if (ctx.target === "openapi-3.0") {
4109
4133
  json.type = "string";
@@ -4111,12 +4135,17 @@ var nullProcessor = (_schema, ctx, json, _params) => {
4111
4135
  json.enum = [null];
4112
4136
  } else json.type = "null";
4113
4137
  };
4138
+ var undefinedProcessor = (_schema, ctx, _json, _params) => {
4139
+ if (ctx.unrepresentable === "throw") throw new Error("Undefined cannot be represented in JSON Schema");
4140
+ };
4114
4141
  var voidProcessor = (_schema, ctx, _json, _params) => {
4115
4142
  if (ctx.unrepresentable === "throw") throw new Error("Void cannot be represented in JSON Schema");
4116
4143
  };
4117
4144
  var neverProcessor = (_schema, _ctx, json, _params) => {
4118
4145
  json.not = {};
4119
4146
  };
4147
+ var anyProcessor = (_schema, _ctx, _json, _params) => {};
4148
+ var unknownProcessor = (_schema, _ctx, _json, _params) => {};
4120
4149
  var dateProcessor = (_schema, ctx, _json, _params) => {
4121
4150
  if (ctx.unrepresentable === "throw") throw new Error("Date cannot be represented in JSON Schema");
4122
4151
  };
@@ -4148,12 +4177,53 @@ var literalProcessor = (schema, ctx, json, _params) => {
4148
4177
  json.enum = vals;
4149
4178
  }
4150
4179
  };
4180
+ var nanProcessor = (_schema, ctx, _json, _params) => {
4181
+ if (ctx.unrepresentable === "throw") throw new Error("NaN cannot be represented in JSON Schema");
4182
+ };
4183
+ var templateLiteralProcessor = (schema, _ctx, json, _params) => {
4184
+ const _json = json;
4185
+ const pattern = schema._zod.pattern;
4186
+ if (!pattern) throw new Error("Pattern not found in template literal");
4187
+ _json.type = "string";
4188
+ _json.pattern = pattern.source;
4189
+ };
4190
+ var fileProcessor = (schema, _ctx, json, _params) => {
4191
+ const _json = json;
4192
+ const file = {
4193
+ type: "string",
4194
+ format: "binary",
4195
+ contentEncoding: "binary"
4196
+ };
4197
+ const { minimum, maximum, mime } = schema._zod.bag;
4198
+ if (minimum !== void 0) file.minLength = minimum;
4199
+ if (maximum !== void 0) file.maxLength = maximum;
4200
+ if (mime) if (mime.length === 1) {
4201
+ file.contentMediaType = mime[0];
4202
+ Object.assign(_json, file);
4203
+ } else {
4204
+ Object.assign(_json, file);
4205
+ _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
4206
+ }
4207
+ else Object.assign(_json, file);
4208
+ };
4209
+ var successProcessor = (_schema, _ctx, json, _params) => {
4210
+ json.type = "boolean";
4211
+ };
4151
4212
  var customProcessor = (_schema, ctx, _json, _params) => {
4152
4213
  if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
4153
4214
  };
4215
+ var functionProcessor = (_schema, ctx, _json, _params) => {
4216
+ if (ctx.unrepresentable === "throw") throw new Error("Function types cannot be represented in JSON Schema");
4217
+ };
4154
4218
  var transformProcessor = (_schema, ctx, _json, _params) => {
4155
4219
  if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
4156
4220
  };
4221
+ var mapProcessor = (_schema, ctx, _json, _params) => {
4222
+ if (ctx.unrepresentable === "throw") throw new Error("Map cannot be represented in JSON Schema");
4223
+ };
4224
+ var setProcessor = (_schema, ctx, _json, _params) => {
4225
+ if (ctx.unrepresentable === "throw") throw new Error("Set cannot be represented in JSON Schema");
4226
+ };
4157
4227
  var arrayProcessor = (schema, ctx, _json, params) => {
4158
4228
  const json = _json;
4159
4229
  const def = schema._zod.def;
@@ -4358,6 +4428,12 @@ var readonlyProcessor = (schema, ctx, json, params) => {
4358
4428
  seen.ref = def.innerType;
4359
4429
  json.readOnly = true;
4360
4430
  };
4431
+ var promiseProcessor = (schema, ctx, _json, params) => {
4432
+ const def = schema._zod.def;
4433
+ process(def.innerType, ctx, params);
4434
+ const seen = ctx.seen.get(schema);
4435
+ seen.ref = def.innerType;
4436
+ };
4361
4437
  var optionalProcessor = (schema, ctx, _json, params) => {
4362
4438
  const def = schema._zod.def;
4363
4439
  process(def.innerType, ctx, params);
@@ -4370,6 +4446,81 @@ var lazyProcessor = (schema, ctx, _json, params) => {
4370
4446
  const seen = ctx.seen.get(schema);
4371
4447
  seen.ref = innerType;
4372
4448
  };
4449
+ var allProcessors = {
4450
+ string: stringProcessor,
4451
+ number: numberProcessor,
4452
+ boolean: booleanProcessor,
4453
+ bigint: bigintProcessor,
4454
+ symbol: symbolProcessor,
4455
+ null: nullProcessor,
4456
+ undefined: undefinedProcessor,
4457
+ void: voidProcessor,
4458
+ never: neverProcessor,
4459
+ any: anyProcessor,
4460
+ unknown: unknownProcessor,
4461
+ date: dateProcessor,
4462
+ enum: enumProcessor,
4463
+ literal: literalProcessor,
4464
+ nan: nanProcessor,
4465
+ template_literal: templateLiteralProcessor,
4466
+ file: fileProcessor,
4467
+ success: successProcessor,
4468
+ custom: customProcessor,
4469
+ function: functionProcessor,
4470
+ transform: transformProcessor,
4471
+ map: mapProcessor,
4472
+ set: setProcessor,
4473
+ array: arrayProcessor,
4474
+ object: objectProcessor,
4475
+ union: unionProcessor,
4476
+ intersection: intersectionProcessor,
4477
+ tuple: tupleProcessor,
4478
+ record: recordProcessor,
4479
+ nullable: nullableProcessor,
4480
+ nonoptional: nonoptionalProcessor,
4481
+ default: defaultProcessor,
4482
+ prefault: prefaultProcessor,
4483
+ catch: catchProcessor,
4484
+ pipe: pipeProcessor,
4485
+ readonly: readonlyProcessor,
4486
+ promise: promiseProcessor,
4487
+ optional: optionalProcessor,
4488
+ lazy: lazyProcessor
4489
+ };
4490
+ function toJSONSchema(input, params) {
4491
+ if ("_idmap" in input) {
4492
+ const registry = input;
4493
+ const ctx = initializeContext({
4494
+ ...params,
4495
+ processors: allProcessors
4496
+ });
4497
+ const defs = {};
4498
+ for (const entry of registry._idmap.entries()) {
4499
+ const [_, schema] = entry;
4500
+ process(schema, ctx);
4501
+ }
4502
+ const schemas = {};
4503
+ ctx.external = {
4504
+ registry,
4505
+ uri: params?.uri,
4506
+ defs
4507
+ };
4508
+ for (const entry of registry._idmap.entries()) {
4509
+ const [key, schema] = entry;
4510
+ extractDefs(ctx, schema);
4511
+ schemas[key] = finalize(ctx, schema);
4512
+ }
4513
+ if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
4514
+ return { schemas };
4515
+ }
4516
+ const ctx = initializeContext({
4517
+ ...params,
4518
+ processors: allProcessors
4519
+ });
4520
+ process(input, ctx);
4521
+ extractDefs(ctx, input);
4522
+ return finalize(ctx, input);
4523
+ }
4373
4524
  //#endregion
4374
4525
  //#region ../../node_modules/zod/v4/classic/iso.js
4375
4526
  var ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
@@ -5386,7 +5537,7 @@ var ZodIssueCode = {
5386
5537
  var ZodFirstPartyTypeKind;
5387
5538
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5388
5539
  //#endregion
5389
- //#region ../types/dist/sleep-bwsTj221.mjs
5540
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5390
5541
  /**
5391
5542
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5392
5543
  * window to float samples (D455).
@@ -5503,7 +5654,7 @@ function isKeychainStoredField(field) {
5503
5654
  var SECRET_CLEAR = { $secretClear: true };
5504
5655
  /** The `'***'` token D634 redaction writes for non-admins. */
5505
5656
  var LEGACY_DEVICE_REDACTION = "***";
5506
- function isRecord$2(value) {
5657
+ function isRecord$5(value) {
5507
5658
  return typeof value === "object" && value !== null && !Array.isArray(value);
5508
5659
  }
5509
5660
  function makeSecretMarker(ref) {
@@ -5514,12 +5665,12 @@ function makeSecretMarker(ref) {
5514
5665
  }
5515
5666
  /** A stored marker: an object whose `$secret` is a non-empty string. */
5516
5667
  function isSecretMarker(value) {
5517
- if (!isRecord$2(value)) return false;
5668
+ if (!isRecord$5(value)) return false;
5518
5669
  const ref = value["$secret"];
5519
5670
  return typeof ref === "string" && ref.length > 0;
5520
5671
  }
5521
5672
  function isSecretClear(value) {
5522
- return isRecord$2(value) && value["$secretClear"] === true;
5673
+ return isRecord$5(value) && value["$secretClear"] === true;
5523
5674
  }
5524
5675
  /**
5525
5676
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -6129,7 +6280,7 @@ var KeychainWriteRefusedError = class extends Error {
6129
6280
  }
6130
6281
  };
6131
6282
  var KEEP = { kind: "keep" };
6132
- function isRecord$1(value) {
6283
+ function isRecord$4(value) {
6133
6284
  return typeof value === "object" && value !== null && !Array.isArray(value);
6134
6285
  }
6135
6286
  function defaultMintId() {
@@ -6142,7 +6293,7 @@ function collectSecretMarkerRefs(value, out = []) {
6142
6293
  return out;
6143
6294
  }
6144
6295
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
6145
- else if (isRecord$1(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6296
+ else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6146
6297
  return out;
6147
6298
  }
6148
6299
  async function storedValueEquals(secrets, marker, candidate) {
@@ -6197,7 +6348,7 @@ function rowId(row, idKey) {
6197
6348
  return null;
6198
6349
  }
6199
6350
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
6200
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$1) : [];
6351
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
6201
6352
  if (!Array.isArray(incoming)) {
6202
6353
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
6203
6354
  return {
@@ -6213,7 +6364,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
6213
6364
  const kept = /* @__PURE__ */ new Set();
6214
6365
  const rows = [];
6215
6366
  for (const row of incoming) {
6216
- if (!isRecord$1(row)) {
6367
+ if (!isRecord$4(row)) {
6217
6368
  rows.push(row);
6218
6369
  continue;
6219
6370
  }
@@ -6238,7 +6389,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6238
6389
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
6239
6390
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
6240
6391
  case "object": {
6241
- if (!isRecord$1(incoming)) {
6392
+ if (!isRecord$4(incoming)) {
6242
6393
  if (incoming === void 0) return KEEP;
6243
6394
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
6244
6395
  return {
@@ -6246,7 +6397,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6246
6397
  value: incoming
6247
6398
  };
6248
6399
  }
6249
- const storedObj = isRecord$1(stored) ? stored : {};
6400
+ const storedObj = isRecord$4(stored) ? stored : {};
6250
6401
  return {
6251
6402
  kind: "value",
6252
6403
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -6369,7 +6520,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
6369
6520
  value: items
6370
6521
  };
6371
6522
  }
6372
- if (isRecord$1(v)) {
6523
+ if (isRecord$4(v)) {
6373
6524
  const out = {};
6374
6525
  for (const [k, child] of Object.entries(v)) {
6375
6526
  const s = substitute(child);
@@ -6401,7 +6552,7 @@ var SecretOverwriteRefusedError = class extends Error {
6401
6552
  this.name = "SecretOverwriteRefusedError";
6402
6553
  }
6403
6554
  };
6404
- function isRecord(value) {
6555
+ function isRecord$3(value) {
6405
6556
  return typeof value === "object" && value !== null && !Array.isArray(value);
6406
6557
  }
6407
6558
  function resolvedValue(pass, marker) {
@@ -6430,7 +6581,7 @@ function inArray(pass, incoming, stored) {
6430
6581
  return incoming.map((item, index) => {
6431
6582
  const twin = stored[index];
6432
6583
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
6433
- if (isRecord(item) && isRecord(twin)) return inArrayRow(pass, item, twin);
6584
+ if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
6434
6585
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
6435
6586
  return item;
6436
6587
  });
@@ -6441,7 +6592,7 @@ function inArrayRow(pass, incoming, stored) {
6441
6592
  const twin = stored[key];
6442
6593
  if (isSecretMarker(twin)) {
6443
6594
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
6444
- } else if (isRecord(value) && isRecord(twin)) out[key] = inArrayRow(pass, value, twin);
6595
+ } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
6445
6596
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
6446
6597
  }
6447
6598
  return out;
@@ -6449,7 +6600,7 @@ function inArrayRow(pass, incoming, stored) {
6449
6600
  async function walk(pass, incoming, stored) {
6450
6601
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
6451
6602
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
6452
- if (!isRecord(incoming) || !isRecord(stored)) return incoming;
6603
+ if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
6453
6604
  const out = { ...incoming };
6454
6605
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
6455
6606
  return out;
@@ -6480,7 +6631,7 @@ async function restoreUnchangedSecrets(input) {
6480
6631
  function isJsonEqual(a, b) {
6481
6632
  if (Object.is(a, b)) return true;
6482
6633
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
6483
- if (isRecord(a) && isRecord(b)) {
6634
+ if (isRecord$3(a) && isRecord$3(b)) {
6484
6635
  const keys = Object.keys(a);
6485
6636
  if (keys.length !== Object.keys(b).length) return false;
6486
6637
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -6504,7 +6655,7 @@ function markerKeysOf(blob, owner) {
6504
6655
  }
6505
6656
  function nodeFromStored(value, owner) {
6506
6657
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
6507
- if (!isRecord(value)) return null;
6658
+ if (!isRecord$3(value)) return null;
6508
6659
  const children = /* @__PURE__ */ new Map();
6509
6660
  for (const [key, child] of Object.entries(value)) {
6510
6661
  const node = nodeFromStored(child, owner);
@@ -7292,7 +7443,7 @@ var BaseAddon = class {
7292
7443
  if (!ctx) return;
7293
7444
  const addonId = ctx.id;
7294
7445
  setImmediate(() => {
7295
- ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
7446
+ ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
7296
7447
  ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
7297
7448
  }).catch((err) => {
7298
7449
  ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
@@ -7786,6 +7937,356 @@ var PeerBytesTicketSchema = object({
7786
7937
  */
7787
7938
  declaredBytes: number().int().nonnegative().nullable()
7788
7939
  });
7940
+ /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
7941
+ /** The files a kind may live in. `history` is device-history's (D850), never records. */
7942
+ var RECORD_DATABASES = ["settings", "events"];
7943
+ /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
7944
+ var RECORD_CLASSES = [
7945
+ "config",
7946
+ "ledger",
7947
+ "audit",
7948
+ "mirror",
7949
+ "ephemeral"
7950
+ ];
7951
+ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
7952
+ var RECORD_MAX_DATA_BYTES = 1024 * 1024;
7953
+ var RECORD_BATCH_MAX = 1e3;
7954
+ var RECORD_QUERY_MAX = 1e3;
7955
+ /** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
7956
+ var RECORD_SETTINGS_MAX_ROWS = 5e4;
7957
+ var PREFIX = "records/";
7958
+ /** The base of every records failure. `detail` is the human part of the message. */
7959
+ var RecordsError = class extends Error {
7960
+ code;
7961
+ detail;
7962
+ constructor(code, detail) {
7963
+ super(`${PREFIX}${code}: ${detail}`);
7964
+ this.name = "RecordsError";
7965
+ this.code = code;
7966
+ this.detail = detail;
7967
+ }
7968
+ };
7969
+ /** The keychain could not store or serve a value: explicit, never an empty string. */
7970
+ var RecordSecretUnavailableError = class extends RecordsError {
7971
+ constructor(detail) {
7972
+ super("secret-unavailable", detail);
7973
+ this.name = "RecordSecretUnavailableError";
7974
+ }
7975
+ };
7976
+ var InvalidRecordError = class extends RecordsError {
7977
+ constructor(detail) {
7978
+ super("invalid-record", detail);
7979
+ this.name = "InvalidRecordError";
7980
+ }
7981
+ };
7982
+ /** A kind declaration the engine refuses (non-additive change, bad shape, wrong file). */
7983
+ var DeclarationRefusedError = class extends RecordsError {
7984
+ constructor(detail) {
7985
+ super("declaration-refused", detail);
7986
+ this.name = "DeclarationRefusedError";
7987
+ }
7988
+ };
7989
+ function defOf(schema) {
7990
+ const zodBag = Reflect.get(schema, "_zod");
7991
+ if (typeof zodBag !== "object" || zodBag === null) return {};
7992
+ const def = Reflect.get(zodBag, "def");
7993
+ if (typeof def !== "object" || def === null) return {};
7994
+ return def;
7995
+ }
7996
+ function declaredHere(schema) {
7997
+ return globalRegistry.get(schema)?.secret === true;
7998
+ }
7999
+ /** Wrapper kinds whose `innerType` is the field itself. */
8000
+ var WRAPPERS = new Set([
8001
+ "optional",
8002
+ "nullable",
8003
+ "default",
8004
+ "prefault",
8005
+ "catch",
8006
+ "readonly",
8007
+ "nonoptional"
8008
+ ]);
8009
+ /**
8010
+ * The schema layers that make up ONE field: the schema itself and every
8011
+ * wrapper below it (optional / default / nullable / readonly / catch), plus
8012
+ * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
8013
+ * `.transform` on `in`).
8014
+ */
8015
+ function layersOf(schema) {
8016
+ const out = [];
8017
+ const queue = [schema];
8018
+ while (queue.length > 0) {
8019
+ const s = queue.shift();
8020
+ if (!s || out.includes(s)) continue;
8021
+ out.push(s);
8022
+ const def = defOf(s);
8023
+ if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
8024
+ if (def.type === "pipe") {
8025
+ if (def.in) queue.push(def.in);
8026
+ if (def.out) queue.push(def.out);
8027
+ }
8028
+ }
8029
+ return out;
8030
+ }
8031
+ /** True when any layer of this field declares `.meta({ secret: true })`. */
8032
+ function isZodSecret(schema) {
8033
+ return layersOf(schema).some(declaredHere);
8034
+ }
8035
+ /**
8036
+ * Every declared secret path in a config schema: dotted keys, `[]` for "each
8037
+ * element of this array" (`connection.password`, `rows[].token`). A declared
8038
+ * object or array is reported as one path and not descended into — everything
8039
+ * under it is secret.
8040
+ */
8041
+ function collectZodSecretPaths(schema, prefix = "") {
8042
+ if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
8043
+ const paths = [];
8044
+ for (const layer of layersOf(schema)) {
8045
+ const def = defOf(layer);
8046
+ if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
8047
+ else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
8048
+ else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
8049
+ else if (def.type === "intersection") {
8050
+ if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
8051
+ if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
8052
+ }
8053
+ }
8054
+ return [...new Set(paths)];
8055
+ }
8056
+ /**
8057
+ * Secret fields of a record, addressed the way a Zod schema declares them
8058
+ * (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
8059
+ * (`auth.accessToken`, `headers[].value`).
8060
+ *
8061
+ * Array elements are matched by a DECLARED id key (`secretArrayKeys`:
8062
+ * `{ headers: 'name' }`), never by index, so reordering a list keeps every
8063
+ * keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
8064
+ * leaf names its element: `headers[X-Api].value`.
8065
+ *
8066
+ * Pure and browser-safe. Nothing here mutates: every transform returns a new value.
8067
+ */
8068
+ /** The array prefixes (declared form, e.g. `headers` or `a.headers`) of a path. */
8069
+ function parseSecretPath(path) {
8070
+ if (path.length === 0) throw new InvalidRecordError("an empty secret path");
8071
+ return path.split(".").map((raw) => {
8072
+ const each = raw.endsWith("[]");
8073
+ const key = each ? raw.slice(0, -2) : raw;
8074
+ if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
8075
+ return {
8076
+ key,
8077
+ each
8078
+ };
8079
+ });
8080
+ }
8081
+ /** The declared array prefixes of `path` that need an id key (`headers`, `a.rows`). */
8082
+ function secretArrayPrefixes(path) {
8083
+ const segments = parseSecretPath(path);
8084
+ const prefixes = [];
8085
+ const walked = [];
8086
+ for (const segment of segments) {
8087
+ walked.push(segment.key);
8088
+ if (segment.each) prefixes.push(walked.join("."));
8089
+ }
8090
+ return prefixes;
8091
+ }
8092
+ /**
8093
+ * Record kinds (D881): the declaration an addon makes of one kind of fact, the
8094
+ * Zod row schema that describes it, and the helper that turns the two into the
8095
+ * JSON the engine stores.
8096
+ *
8097
+ * A kind is declared ONCE, next to the code that owns it, and the engine's
8098
+ * reconciler creates its indexes - nothing creates DDL at runtime from a write.
8099
+ * Everything the generic machinery needs (secret fields, the entry descriptor)
8100
+ * is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
8101
+ * never a field name (D879).
8102
+ */
8103
+ /** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
8104
+ var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
8105
+ var RecordIndexSchema = object({
8106
+ name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
8107
+ fields: array(RecordFieldPathSchema).min(1).max(4),
8108
+ unique: boolean().optional()
8109
+ }).strict();
8110
+ var RecordRetentionSchema = union([
8111
+ object({
8112
+ ttlMs: number().int().positive(),
8113
+ from: _enum(["at", "write"])
8114
+ }).strict(),
8115
+ object({
8116
+ maxRows: number().int().positive().optional(),
8117
+ maxRowsPerDevice: number().int().positive().optional()
8118
+ }).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
8119
+ object({
8120
+ owner: string().min(1),
8121
+ reason: string().min(1)
8122
+ }).strict(),
8123
+ object({ none: string().min(1) }).strict()
8124
+ ]);
8125
+ /** The descriptor a generic entries UI reads (D881 "generic entries"). */
8126
+ var EntryDescriptorSchema = object({
8127
+ title: string().min(1),
8128
+ /** The record body field shown as the entry's name. */
8129
+ nameField: string().min(1),
8130
+ /** JSON Schema of the entry body; `secret: true` marks a password field. */
8131
+ fields: record(string(), unknown())
8132
+ }).strict();
8133
+ /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
8134
+ var RecordKindDeclarationSchema = object({
8135
+ database: _enum(RECORD_DATABASES).default("settings"),
8136
+ class: _enum(RECORD_CLASSES),
8137
+ writeTrigger: string().min(1),
8138
+ device: _enum([
8139
+ "required",
8140
+ "optional",
8141
+ "none"
8142
+ ]).default("none"),
8143
+ at: _enum(["required", "none"]).default("none"),
8144
+ indexes: array(RecordIndexSchema).max(8).default([]),
8145
+ retention: RecordRetentionSchema,
8146
+ deviceRemoval: _enum(["delete", "none"]).default("none"),
8147
+ maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
8148
+ /** Derived from the Zod schema; never written by hand. */
8149
+ secretPaths: array(string().min(1)).default([]),
8150
+ /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8151
+ secretArrayKeys: record(string(), string()).default({}),
8152
+ /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
8153
+ adoptsFrom: string().min(1).optional(),
8154
+ /** Kinds that must agree through `transact` sit in one file under one family name. */
8155
+ transactFamily: string().min(1).optional(),
8156
+ entry: EntryDescriptorSchema.optional()
8157
+ }).strict();
8158
+ /** The kind names: lower-case, dash separated, short enough for an index name. */
8159
+ var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
8160
+ /** Cross-field rules a declaration must satisfy. Throws {@link DeclarationRefusedError}. */
8161
+ function assertValidDeclaration(name, decl) {
8162
+ const refuse = (why) => {
8163
+ throw new DeclarationRefusedError(`kind "${name}": ${why}`);
8164
+ };
8165
+ if (!RecordKindNameSchema.safeParse(name).success) refuse("the name must be lower-case-dashed");
8166
+ const seen = /* @__PURE__ */ new Set();
8167
+ for (const index of decl.indexes) {
8168
+ if (seen.has(index.name)) refuse(`index name "${index.name}" is declared twice`);
8169
+ seen.add(index.name);
8170
+ }
8171
+ const { retention } = decl;
8172
+ const hasSecrets = decl.secretPaths.length > 0;
8173
+ if ("ttlMs" in retention) {
8174
+ if (retention.from === "at" && decl.at !== "required") refuse("a ttl from \"at\" needs at: \"required\"");
8175
+ if (hasSecrets) refuse("a kind with secret fields cannot use engine TTL (its keychain values would be orphaned)");
8176
+ }
8177
+ if ("maxRows" in retention || "maxRowsPerDevice" in retention) {
8178
+ if (retention.maxRowsPerDevice !== void 0 && decl.device !== "required") refuse("maxRowsPerDevice needs device: \"required\"");
8179
+ if (decl.at !== "required") refuse("a row bound trims the oldest \"at\": it needs at: \"required\"");
8180
+ if (hasSecrets) refuse("a kind with secret fields cannot use an engine row bound");
8181
+ const bound = Math.max(retention.maxRows ?? 0, retention.maxRowsPerDevice ?? 0);
8182
+ if (decl.database === "settings" && bound > 5e4) refuse(`a row bound above ${RECORD_SETTINGS_MAX_ROWS} belongs in database: "events" (a big delete on the settings thread stalls every configuration read)`);
8183
+ }
8184
+ if (decl.deviceRemoval === "delete" && decl.device === "none") refuse("deviceRemoval: \"delete\" needs a device: \"required\" or \"optional\"");
8185
+ for (const path of decl.secretPaths) for (const prefix of secretArrayPrefixes(path)) if (decl.secretArrayKeys[prefix] === void 0) refuse(`secret path "${path}" crosses the array "${prefix}": declare its id key in secretArrayKeys`);
8186
+ }
8187
+ function bodyFieldsOf(schema) {
8188
+ return { ...toJSONSchema(schema, {
8189
+ unrepresentable: "any",
8190
+ io: "input"
8191
+ }) };
8192
+ }
8193
+ function isRecordLike(value) {
8194
+ return typeof value === "object" && value !== null && !Array.isArray(value);
8195
+ }
8196
+ /** Does every branch of the body schema carry `field`? (A discriminated union has several.) */
8197
+ function hasNameField(json, field) {
8198
+ const branches = json["oneOf"] ?? json["anyOf"];
8199
+ if (Array.isArray(branches)) return branches.length > 0 && branches.every((b) => isRecordLike(b) && hasNameField(b, field));
8200
+ const properties = json["properties"];
8201
+ return isRecordLike(properties) && Object.prototype.hasOwnProperty.call(properties, field);
8202
+ }
8203
+ /**
8204
+ * Declare the kinds of a package. The keys are the kind names. The result is
8205
+ * what `ctx.records.declare` sends to the engine and what `ctx.records.kind`
8206
+ * types its handle from.
8207
+ */
8208
+ function defineRecordKinds(specs) {
8209
+ const out = {};
8210
+ for (const [name, spec] of Object.entries(specs)) {
8211
+ const secretPaths = collectZodSecretPaths(spec.schema);
8212
+ const nameField = spec.entry?.nameField ?? "name";
8213
+ const fields = bodyFieldsOf(spec.schema);
8214
+ if (spec.entry !== void 0 && !hasNameField(fields, nameField)) throw new DeclarationRefusedError(`kind "${name}": an entry kind's schema needs a "${nameField}" field`);
8215
+ const parsed = RecordKindDeclarationSchema.parse({
8216
+ database: spec.database,
8217
+ class: spec.class,
8218
+ writeTrigger: spec.writeTrigger,
8219
+ device: spec.device,
8220
+ at: spec.at,
8221
+ indexes: spec.indexes === void 0 ? void 0 : [...spec.indexes],
8222
+ retention: spec.retention,
8223
+ deviceRemoval: spec.deviceRemoval,
8224
+ maxDataBytes: spec.maxDataBytes,
8225
+ secretPaths: [...secretPaths],
8226
+ secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
8227
+ adoptsFrom: spec.adoptsFrom,
8228
+ transactFamily: spec.transactFamily,
8229
+ entry: spec.entry === void 0 ? void 0 : {
8230
+ title: spec.entry.title,
8231
+ nameField,
8232
+ fields
8233
+ }
8234
+ });
8235
+ assertValidDeclaration(name, parsed);
8236
+ out[name] = {
8237
+ name,
8238
+ schema: spec.schema,
8239
+ declaration: parsed
8240
+ };
8241
+ }
8242
+ return out;
8243
+ }
8244
+ /**
8245
+ * Entry kinds (D881): every list of user-created entries (notification
8246
+ * targets, brokers, LLM profiles) is ONE record kind with an id, a name and a
8247
+ * kind-specific body, and the admin UI lists/adds/edits/deletes all of them
8248
+ * through the `record-entries` capability with password fields derived from
8249
+ * the schema (`.meta({ secret: true })`).
8250
+ */
8251
+ /** The body of a plain entry: a name and the fields the kind adds. */
8252
+ function entryBody(shape) {
8253
+ return object({
8254
+ name: string().min(1),
8255
+ ...shape
8256
+ });
8257
+ }
8258
+ /**
8259
+ * Declare one entry kind. An entry is configuration: never trimmed by the
8260
+ * engine, never aged, belonging to no device.
8261
+ */
8262
+ function defineEntryKind(name, spec) {
8263
+ const defined = defineRecordKinds({ [name]: {
8264
+ schema: spec.schema,
8265
+ class: "config",
8266
+ writeTrigger: spec.writeTrigger ?? "an operator adds or edits an entry in the entries UI",
8267
+ retention: { none: "an entry goes only when the operator deletes it" },
8268
+ ...spec.database === void 0 ? {} : { database: spec.database },
8269
+ ...spec.indexes === void 0 ? {} : { indexes: spec.indexes },
8270
+ ...spec.secretArrayKeys === void 0 ? {} : { secretArrayKeys: spec.secretArrayKeys },
8271
+ ...spec.adoptsFrom === void 0 ? {} : { adoptsFrom: spec.adoptsFrom },
8272
+ entry: {
8273
+ title: spec.title,
8274
+ ...spec.nameField === void 0 ? {} : { nameField: spec.nameField }
8275
+ }
8276
+ } })[name];
8277
+ if (defined === void 0) throw new DeclarationRefusedError(`entry kind "${name}" was not built`);
8278
+ return defined;
8279
+ }
8280
+ /**
8281
+ * Legacy source for broker entry adoption (B2): brokers live in addon-settings
8282
+ * as one row `<addonId>.brokers` whose value is an array until records-adopt
8283
+ * copies them into the entry kind.
8284
+ */
8285
+ var SETTINGS_BROKERS_ADOPTS_PREFIX = "@settings-brokers/";
8286
+ /** The `adoptsFrom` value for an addon's broker entry kind. */
8287
+ function settingsBrokersAdoptsFrom(addonId) {
8288
+ return `${SETTINGS_BROKERS_ADOPTS_PREFIX}${addonId}`;
8289
+ }
7789
8290
  /** Shared Zod schemas used across streaming capabilities. */
7790
8291
  var CamProfileSchema = _enum([
7791
8292
  "high",
@@ -8309,75 +8810,12 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8309
8810
  kind: "mutation",
8310
8811
  auth: "admin"
8311
8812
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8312
- function defOf(schema) {
8313
- return schema._zod?.def ?? {};
8314
- }
8315
- function declaredHere(schema) {
8316
- return globalRegistry.get(schema)?.secret === true;
8317
- }
8318
- /** Wrapper kinds whose `innerType` is the field itself. */
8319
- var WRAPPERS = new Set([
8320
- "optional",
8321
- "nullable",
8322
- "default",
8323
- "prefault",
8324
- "catch",
8325
- "readonly",
8326
- "nonoptional"
8327
- ]);
8328
- /**
8329
- * The schema layers that make up ONE field: the schema itself and every
8330
- * wrapper below it (optional / default / nullable / readonly / catch), plus
8331
- * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
8332
- * `.transform` on `in`).
8333
- */
8334
- function layersOf(schema) {
8335
- const out = [];
8336
- const queue = [schema];
8337
- while (queue.length > 0) {
8338
- const s = queue.shift();
8339
- if (!s || out.includes(s)) continue;
8340
- out.push(s);
8341
- const def = defOf(s);
8342
- if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
8343
- if (def.type === "pipe") {
8344
- if (def.in) queue.push(def.in);
8345
- if (def.out) queue.push(def.out);
8346
- }
8347
- }
8348
- return out;
8349
- }
8350
- /** True when any layer of this field declares `.meta({ secret: true })`. */
8351
- function isZodSecret(schema) {
8352
- return layersOf(schema).some(declaredHere);
8353
- }
8354
- /**
8355
- * Every declared secret path in a config schema: dotted keys, `[]` for "each
8356
- * element of this array" (`connection.password`, `rows[].token`). A declared
8357
- * object or array is reported as one path and not descended into — everything
8358
- * under it is secret.
8359
- */
8360
- function collectZodSecretPaths(schema, prefix = "") {
8361
- if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
8362
- const paths = [];
8363
- for (const layer of layersOf(schema)) {
8364
- const def = defOf(layer);
8365
- if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
8366
- else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
8367
- else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
8368
- else if (def.type === "intersection") {
8369
- if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
8370
- if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
8371
- }
8372
- }
8373
- return [...new Set(paths)];
8374
- }
8375
8813
  object({
8376
8814
  code: string().regex(/^[a-z][a-z0-9-]*(\.[a-z0-9-]+)+$/),
8377
8815
  params: record(string(), union([string(), number()])).optional()
8378
8816
  });
8379
8817
  //#endregion
8380
- //#region ../types/dist/err-msg--2RrYiLO.mjs
8818
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8381
8819
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8382
8820
  DeviceType["Camera"] = "camera";
8383
8821
  DeviceType["Hub"] = "hub";
@@ -8469,6 +8907,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8469
8907
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8470
8908
  * integrations sharing the same food/desiccant/hopper surface. */
8471
8909
  DeviceType["PetFeeder"] = "pet-feeder";
8910
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
8911
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
8912
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
8913
+ DeviceType["Dishwasher"] = "dishwasher";
8472
8914
  return DeviceType;
8473
8915
  }({});
8474
8916
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -8726,7 +9168,7 @@ function errMsg(err) {
8726
9168
  return String(err);
8727
9169
  }
8728
9170
  //#endregion
8729
- //#region ../types/dist/composition-DOwQB_Ua.mjs
9171
+ //#region ../types/dist/composition-CB6PMT9p.mjs
8730
9172
  /**
8731
9173
  * The ffmpeg build every CamStack node downloads, per platform and arch.
8732
9174
  *
@@ -13275,8 +13717,13 @@ var AlertSeveritySchema = _enum([
13275
13717
  "info",
13276
13718
  "success",
13277
13719
  "warning",
13278
- "error"
13720
+ "error",
13721
+ "critical"
13279
13722
  ]);
13723
+ var AlertActionSchema = object({
13724
+ label: string(),
13725
+ href: string().optional()
13726
+ });
13280
13727
  var AlertStatusSchema = _enum([
13281
13728
  "active",
13282
13729
  "in-progress",
@@ -13294,6 +13741,7 @@ var AlertSchema = object({
13294
13741
  severity: AlertSeveritySchema,
13295
13742
  title: string(),
13296
13743
  message: string(),
13744
+ action: AlertActionSchema.optional(),
13297
13745
  status: AlertStatusSchema,
13298
13746
  progress: number().optional(),
13299
13747
  read: boolean(),
@@ -15878,6 +16326,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
15878
16326
  keyField: string()
15879
16327
  }).optional()
15880
16328
  })) });
16329
+ /**
16330
+ * The report of a one-shot "move this owner's plaintext secrets into the
16331
+ * keychain" run (D878). COUNTS only - never a value, never a ref.
16332
+ *
16333
+ * The owner runs it on its own rows, through its own write path; an operator
16334
+ * script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
16335
+ * Dry run (`apply: false`) reports what WOULD move and changes nothing.
16336
+ */
16337
+ var RawSecretMigrationInputSchema = object({
16338
+ /** `false` (the default of the script) = report only. */
16339
+ apply: boolean() });
16340
+ var RawSecretMigrationReportSchema = object({
16341
+ apply: boolean(),
16342
+ /** Rows that can carry a secret (a profile, an enrolment). */
16343
+ rows: number().int(),
16344
+ /** Rows whose secret was plaintext when the run started. */
16345
+ raw: number().int(),
16346
+ /** Rows that already held a keychain marker when the run started. */
16347
+ markers: number().int(),
16348
+ /** Plaintext rows moved by THIS run (always 0 on a dry run). */
16349
+ migrated: number().int(),
16350
+ /** Plaintext rows left in place because the move or its read-back failed. */
16351
+ failed: number().int(),
16352
+ /** After the run: rows still holding plaintext. */
16353
+ remainingRaw: number().int(),
16354
+ /** After the run: markers the keychain could not resolve right now. */
16355
+ unresolvedMarkers: number().int(),
16356
+ /**
16357
+ * A second, redundant copy of the secrets' rows that the run found (and, on
16358
+ * `apply`, deleted after verifying the first). Owners with a single copy omit it.
16359
+ */
16360
+ redundantCopies: number().int().optional(),
16361
+ /** True when nothing is raw and every marker resolves. */
16362
+ verified: boolean()
16363
+ });
15881
16364
  /** Where a block runs. The operator chooses — a block driving a device on an
15882
16365
  * agent is the reason placement is not fixed to the hub. */
15883
16366
  var CoreBlockPlacementSchema = union([literal("hub"), string().min(1)]);
@@ -16104,6 +16587,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
16104
16587
  }), SettingsUpdateResultSchema, {
16105
16588
  kind: "mutation",
16106
16589
  auth: "admin"
16590
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
16591
+ kind: "mutation",
16592
+ auth: "admin"
16107
16593
  }), method(object({}), object({ libs: array(object({
16108
16594
  filePath: string(),
16109
16595
  content: string()
@@ -16366,6 +16852,222 @@ id: union([string(), number()]) }), {
16366
16852
  kind: "mutation",
16367
16853
  auth: "admin"
16368
16854
  });
16855
+ /**
16856
+ * records - an addon's own facts and documents (D881): ledgers, audit rows,
16857
+ * config documents, mirrors. The third storage API next to `ctx.settings`
16858
+ * (operator intent, D870) and device-history (numbers over time, D850).
16859
+ *
16860
+ * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
16861
+ * crossed a process and stated by a hub in-process caller (`ctx.records` does
16862
+ * that with the addon id closed over). It is deliberately NOT in any input
16863
+ * schema, so a session can never supply it, and a call with no stamp is refused
16864
+ * `records/no-caller`. A kind is readable and writable only by its owner; other
16865
+ * addons go through the owner's capability.
16866
+ *
16867
+ * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
16868
+ * never `[]`. Secret fields are never on the wire: a read shows the
16869
+ * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
16870
+ * resolves itself, and a write may carry only a keychain marker bound to the
16871
+ * row's own ref.
16872
+ *
16873
+ * Internal: addons reach it through `ctx.records`, never directly.
16874
+ */
16875
+ var RecordIdSchema = string().min(1).max(256);
16876
+ /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
16877
+ var RecordBodySchema = record(string(), unknown());
16878
+ var RecordInputSchema = object({
16879
+ id: RecordIdSchema,
16880
+ /** The device this row belongs to (D865 removal, per-device reads). */
16881
+ deviceId: number().int().optional(),
16882
+ /** The domain clock, ms: observed / created / opened. */
16883
+ at: number().int().optional(),
16884
+ /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
16885
+ expiresAt: number().int().optional(),
16886
+ data: RecordBodySchema
16887
+ });
16888
+ var RecordViewSchema = object({
16889
+ id: string(),
16890
+ deviceId: number().int().nullable(),
16891
+ at: number().nullable(),
16892
+ expiresAt: number().nullable(),
16893
+ rev: number().int(),
16894
+ updatedAt: number(),
16895
+ data: RecordBodySchema
16896
+ });
16897
+ /** Declared index fields only. Anything else does not compile, by design. */
16898
+ var RecordWhereSchema = record(RecordFieldPathSchema, union([
16899
+ string(),
16900
+ number(),
16901
+ boolean(),
16902
+ object({ in: array(union([
16903
+ string(),
16904
+ number(),
16905
+ boolean()
16906
+ ])).min(1).max(RECORD_BATCH_MAX) }),
16907
+ object({
16908
+ gt: union([string(), number()]).optional(),
16909
+ gte: union([string(), number()]).optional(),
16910
+ lt: union([string(), number()]).optional(),
16911
+ lte: union([string(), number()]).optional()
16912
+ }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
16913
+ ]));
16914
+ var KindShape = { kind: RecordKindNameSchema };
16915
+ var TimeWindowShape = {
16916
+ deviceId: number().int().optional(),
16917
+ atFrom: number().optional(),
16918
+ atTo: number().optional()
16919
+ };
16920
+ var RecordQueryInputSchema = object({
16921
+ ...KindShape,
16922
+ ...TimeWindowShape,
16923
+ where: RecordWhereSchema.optional(),
16924
+ /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
16925
+ order: _enum(["at", "id"]).optional(),
16926
+ desc: boolean().optional(),
16927
+ limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
16928
+ /** Opaque keyset cursor from a previous answer. There is no offset. */
16929
+ cursor: string().min(1).optional()
16930
+ });
16931
+ var RecordQueryResultSchema = object({
16932
+ records: array(RecordViewSchema),
16933
+ nextCursor: string().nullable()
16934
+ });
16935
+ var RecordKindStateSchema = _enum([
16936
+ "created",
16937
+ "unchanged",
16938
+ "updated"
16939
+ ]);
16940
+ var DeclareKindResultSchema = object({
16941
+ kindId: number().int(),
16942
+ state: RecordKindStateSchema,
16943
+ createdIndexes: array(string()),
16944
+ /** The boot guard: the kind is empty while its legacy table still holds rows. */
16945
+ adoptionPending: object({
16946
+ legacyTable: string(),
16947
+ legacyRows: number().int()
16948
+ }).nullable()
16949
+ });
16950
+ /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
16951
+ var SecretRefsList = array(string());
16952
+ var RecordSecretRefsSchema = record(string(), record(string(), string()));
16953
+ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
16954
+ kind: "mutation",
16955
+ auth: "admin"
16956
+ }), method(object({
16957
+ ...KindShape,
16958
+ id: RecordIdSchema
16959
+ }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
16960
+ ...KindShape,
16961
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16962
+ }), array(RecordViewSchema), { auth: "admin" }), method(object({
16963
+ ...KindShape,
16964
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
16965
+ }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
16966
+ ...KindShape,
16967
+ record: RecordInputSchema,
16968
+ /** Compare-and-set. `0` means "the row must not exist". */
16969
+ ifRev: number().int().min(0).optional()
16970
+ }), object({
16971
+ rev: number().int(),
16972
+ releasedRefs: SecretRefsList
16973
+ }), {
16974
+ kind: "mutation",
16975
+ auth: "admin"
16976
+ }), method(object({
16977
+ ...KindShape,
16978
+ records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
16979
+ }), object({
16980
+ count: number().int(),
16981
+ releasedRefs: SecretRefsList
16982
+ }), {
16983
+ kind: "mutation",
16984
+ auth: "admin"
16985
+ }), method(object({
16986
+ ...KindShape,
16987
+ id: RecordIdSchema,
16988
+ data: RecordBodySchema,
16989
+ at: number().int().nullable().optional(),
16990
+ expiresAt: number().int().nullable().optional(),
16991
+ ifRev: number().int().min(1).optional()
16992
+ }), object({
16993
+ rev: number().int(),
16994
+ releasedRefs: SecretRefsList
16995
+ }), {
16996
+ kind: "mutation",
16997
+ auth: "admin"
16998
+ }), method(object({
16999
+ ...KindShape,
17000
+ id: RecordIdSchema
17001
+ }), object({
17002
+ deleted: boolean(),
17003
+ secretRefs: SecretRefsList
17004
+ }), {
17005
+ kind: "mutation",
17006
+ auth: "admin"
17007
+ }), method(object({
17008
+ ...KindShape,
17009
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
17010
+ }), object({
17011
+ deleted: number().int(),
17012
+ secretRefs: SecretRefsList
17013
+ }), {
17014
+ kind: "mutation",
17015
+ auth: "admin"
17016
+ }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
17017
+ ...KindShape,
17018
+ ...TimeWindowShape,
17019
+ where: RecordWhereSchema.optional()
17020
+ }), object({ count: number().int() }), { auth: "admin" }), method(object({
17021
+ ...KindShape,
17022
+ deviceId: number().int().optional(),
17023
+ from: number(),
17024
+ to: number(),
17025
+ bucketMs: number().int().positive()
17026
+ }), object({ buckets: array(object({
17027
+ bucketStart: number(),
17028
+ count: number().int()
17029
+ })) }), { auth: "admin" }), method(object({
17030
+ ...KindShape,
17031
+ op: _enum([
17032
+ "sum",
17033
+ "min",
17034
+ "max",
17035
+ "count"
17036
+ ]),
17037
+ field: RecordFieldPathSchema.optional(),
17038
+ groupBy: RecordFieldPathSchema.optional(),
17039
+ where: RecordWhereSchema.optional()
17040
+ }), object({ rows: array(object({
17041
+ group: union([
17042
+ string(),
17043
+ number(),
17044
+ _null()
17045
+ ]),
17046
+ value: number().nullable()
17047
+ })) }), { auth: "admin" }), method(object({
17048
+ ...KindShape,
17049
+ deviceId: number().int().optional(),
17050
+ atBefore: number().optional(),
17051
+ where: RecordWhereSchema.optional()
17052
+ }), object({
17053
+ deleted: number().int(),
17054
+ secretRefs: SecretRefsList
17055
+ }), {
17056
+ kind: "mutation",
17057
+ auth: "admin"
17058
+ }), method(object({
17059
+ deviceId: number().int(),
17060
+ kinds: array(RecordKindNameSchema).optional()
17061
+ }), object({
17062
+ deleted: record(string(), number().int()),
17063
+ secretRefs: SecretRefsList
17064
+ }), {
17065
+ kind: "mutation",
17066
+ auth: "admin"
17067
+ }), method(object(KindShape), object({ id: number().int() }), {
17068
+ kind: "mutation",
17069
+ auth: "admin"
17070
+ });
16369
17071
  /** One table of the settings database. */
16370
17072
  var StorageTableSchema = object({
16371
17073
  /** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
@@ -16378,6 +17080,28 @@ var StorageTableSchema = object({
16378
17080
  /** Declared by an addon since this engine process started (a running addon claims it). */
16379
17081
  declaredThisBoot: boolean()
16380
17082
  });
17083
+ /** One declared record kind (D881) as System -> Data shows it. */
17084
+ var StorageKindSchema = object({
17085
+ owner: string(),
17086
+ kind: string(),
17087
+ database: _enum(["settings", "events"]),
17088
+ class: string(),
17089
+ state: _enum([
17090
+ "declared",
17091
+ "orphaned",
17092
+ "dropped"
17093
+ ]),
17094
+ /** `null` when the caller asked for no counts (`counts: false`). */
17095
+ rows: number().int().nonnegative().nullable(),
17096
+ /** Rows x the average size of a sample; null for an empty kind. */
17097
+ bytesEstimate: number().int().nonnegative().nullable(),
17098
+ writeTrigger: string(),
17099
+ retention: RecordRetentionSchema,
17100
+ /** `true` when the kind is an entry kind (the generic entries UI lists it). */
17101
+ entry: boolean(),
17102
+ /** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
17103
+ declaration: RecordKindDeclarationSchema
17104
+ });
16381
17105
  method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
16382
17106
  collection: string().min(1),
16383
17107
  expectRows: number().int().nonnegative()
@@ -16387,6 +17111,87 @@ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: arr
16387
17111
  }), {
16388
17112
  kind: "mutation",
16389
17113
  auth: "admin"
17114
+ }), method(object({
17115
+ owner: string().min(1).optional(),
17116
+ /** `false` skips the per-kind row count (a catalog read only). Default true. */
17117
+ counts: boolean().optional()
17118
+ }), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
17119
+ owner: string().min(1),
17120
+ kind: RecordKindNameSchema
17121
+ }), RecordQueryResultSchema, { auth: "admin" }), method(object({
17122
+ owner: string().min(1),
17123
+ kind: RecordKindNameSchema,
17124
+ records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
17125
+ /** The LAST batch: the copy is complete, the boot guard stops asking. */
17126
+ complete: boolean().optional()
17127
+ }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
17128
+ kind: "mutation",
17129
+ auth: "admin"
17130
+ }), method(object({
17131
+ collection: string().min(1),
17132
+ cursor: string().optional(),
17133
+ limit: number().int().min(1).max(1e3).optional()
17134
+ }), object({
17135
+ rows: array(object({
17136
+ id: string(),
17137
+ data: record(string(), unknown())
17138
+ })),
17139
+ nextCursor: string().nullable()
17140
+ }), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
17141
+ /**
17142
+ * record-entries - the ONE admin surface for every list of user-created entries
17143
+ * (D881): notification targets, brokers, LLM profiles, anything an addon
17144
+ * declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
17145
+ *
17146
+ * The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
17147
+ * the entry body with `secret: true` on every credential field, so a password
17148
+ * field is derived from the schema and never from a name. `putEntry` takes the
17149
+ * redaction token for an untouched secret (the stored value is kept), a string
17150
+ * for a new one, and the clear instruction to remove one. A read never carries
17151
+ * a secret value, and a locked keychain refuses the write with
17152
+ * `records/secret-unavailable` instead of storing plaintext.
17153
+ *
17154
+ * Hub-only, served in-process (it acts for each entry's owner on the keychain).
17155
+ */
17156
+ var EntryKindInfoSchema = object({
17157
+ owner: string(),
17158
+ kind: RecordKindNameSchema,
17159
+ title: string(),
17160
+ nameField: string(),
17161
+ /** JSON Schema of the body; `secret: true` marks a password field. */
17162
+ fields: record(string(), unknown()),
17163
+ secretPaths: array(string()),
17164
+ rows: number().int().nonnegative()
17165
+ });
17166
+ var EntryViewSchema = object({
17167
+ id: RecordIdSchema,
17168
+ name: string(),
17169
+ rev: number().int(),
17170
+ updatedAt: number(),
17171
+ /** Secret fields hold the redaction token. */
17172
+ data: RecordBodySchema
17173
+ });
17174
+ var EntryAddress = {
17175
+ owner: string().min(1),
17176
+ kind: RecordKindNameSchema
17177
+ };
17178
+ method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
17179
+ ...EntryAddress,
17180
+ id: RecordIdSchema.optional(),
17181
+ data: RecordBodySchema,
17182
+ ifRev: number().int().min(1).optional()
17183
+ }), object({
17184
+ id: string(),
17185
+ rev: number().int()
17186
+ }), {
17187
+ kind: "mutation",
17188
+ auth: "admin"
17189
+ }), method(object({
17190
+ ...EntryAddress,
17191
+ id: RecordIdSchema
17192
+ }), object({ deleted: boolean() }), {
17193
+ kind: "mutation",
17194
+ auth: "admin"
16390
17195
  });
16391
17196
  /**
16392
17197
  * `keychain` — the hub's encrypted store of secret values (D787).
@@ -39834,6 +40639,9 @@ method(LlmGenerateBaseInputSchema, LlmGenerateResultSchema, {
39834
40639
  }), _void(), { kind: "mutation" }), method(object({}), array(LlmProfileKindDescriptorSchema)), method(object({}), array(LlmProfileSchema)), method(object({ profile: LlmProfileSchema }), LlmProfileSchema, {
39835
40640
  kind: "mutation",
39836
40641
  auth: "admin"
40642
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
40643
+ kind: "mutation",
40644
+ auth: "admin"
39837
40645
  }), method(ProfileRefInputSchema, _void(), {
39838
40646
  kind: "mutation",
39839
40647
  auth: "admin"
@@ -50381,6 +51189,41 @@ var ServerRollbackInfoSchema = object({
50381
51189
  atMs: number(),
50382
51190
  reason: string()
50383
51191
  });
51192
+ /**
51193
+ * The runner boot check (D877): the runners this node PLANNED (hub: one per
51194
+ * `resolveRunnerId` over its forked addons; agent: the runners its process
51195
+ * service holds, because only the hub plans) against the states the process
51196
+ * service reports. Kept in memory, recomputed by the same one-shot check after
51197
+ * every boot, served on `getServerPackageStatus`.
51198
+ *
51199
+ * `failed` is the D6 breaker's terminal state, `refused` a deterministic Init
51200
+ * refusal (an addon that said "I will not start, and here is why"), `missing` a
51201
+ * planned runner the process service has no entry for.
51202
+ */
51203
+ var RunnerRefusalSchema = object({
51204
+ runnerId: string(),
51205
+ addonIds: array(string()),
51206
+ reason: string()
51207
+ });
51208
+ var RunnerBootCheckSchema = object({
51209
+ checkedAtMs: number(),
51210
+ /** Runners planned for this node. */
51211
+ expected: number(),
51212
+ /** Planned runners whose process is `running`. */
51213
+ running: number(),
51214
+ failed: array(string()),
51215
+ refused: array(RunnerRefusalSchema),
51216
+ missing: array(string()),
51217
+ /**
51218
+ * Runners still on their way: `starting`, or `crashed` waiting on a backoff
51219
+ * respawn. The check is FINAL only when this is empty; until then nothing is
51220
+ * pushed and the verdict is re-evaluated on the next runner state change.
51221
+ * Optional for version skew (absent = settled).
51222
+ */
51223
+ pending: array(string()).optional(),
51224
+ /** True when the plan is the hub's (`missing` is then meaningful); false on an agent. */
51225
+ planKnown: boolean()
51226
+ });
50384
51227
  var ServerPackageStatusSchema = object({
50385
51228
  /** Root package name (`@camstack/server` on the hub). */
50386
51229
  packageName: string(),
@@ -50443,7 +51286,14 @@ var ServerPackageStatusSchema = object({
50443
51286
  * for version skew: an older provider's payload simply omits it, and an
50444
51287
  * absent wrapper is unknown — never `native`.
50445
51288
  */
50446
- wrapper: WrapperIdentitySchema.optional()
51289
+ wrapper: WrapperIdentitySchema.optional(),
51290
+ /**
51291
+ * What this node PLANNED to run against what its process service reports
51292
+ * (D877). Absent until the one-shot boot check has run (~60 s after boot) and
51293
+ * on a provider that predates it. Absent is "not checked yet", never "all
51294
+ * well": a consumer that needs the answer treats it as pending.
51295
+ */
51296
+ runners: RunnerBootCheckSchema.optional()
50447
51297
  });
50448
51298
  var ServerUpdateCheckResultSchema = object({
50449
51299
  packageName: string(),
@@ -50494,6 +51344,13 @@ var ServerUpdateOutcomeSchema = _enum([
50494
51344
  "refused",
50495
51345
  "failed"
50496
51346
  ]);
51347
+ /** One addon the pre-flight found the target version would refuse (D877). */
51348
+ var UpdateBlockerSchema = object({
51349
+ addonId: string(),
51350
+ reason: string(),
51351
+ /** What the operator does about it. */
51352
+ remedy: string()
51353
+ });
50497
51354
  var ServerUpdateActionResultSchema = object({
50498
51355
  accepted: boolean(),
50499
51356
  targetVersion: string().nullable(),
@@ -50511,14 +51368,27 @@ var ServerUpdateActionResultSchema = object({
50511
51368
  * The failure itself, verbatim enough to act on (the npm output for a
50512
51369
  * staging install). Non-null only for `failed`.
50513
51370
  */
50514
- error: string().nullable().optional()
51371
+ error: string().nullable().optional(),
51372
+ /**
51373
+ * The addons the target version would refuse to start on this node's live
51374
+ * store (D877), present when the pre-flight refused the update
51375
+ * (`reason: 'addon-would-refuse'`). Optional for version skew.
51376
+ */
51377
+ blockers: array(UpdateBlockerSchema).optional()
50515
51378
  });
50516
51379
  method(_void(), ServerPackageStatusSchema, { auth: "admin" }), method(_void(), ServerUpdateCheckResultSchema, {
50517
51380
  kind: "mutation",
50518
51381
  auth: "admin"
50519
- }), method(object({
50520
- /** Explicit target version; omitted = latest from the registry. */
50521
- version: string().optional() }), ServerUpdateActionResultSchema, {
51382
+ }), method(object({
51383
+ /** Explicit target version; omitted = latest from the registry. */
51384
+ version: string().optional(),
51385
+ /**
51386
+ * Apply even though the pre-flight (D877) found addons the target would
51387
+ * refuse to start. Off by default: those addons stay down until the
51388
+ * remedy is run, which is the incident this gate exists to prevent.
51389
+ */
51390
+ acknowledgeRefusals: boolean().optional()
51391
+ }), ServerUpdateActionResultSchema, {
50522
51392
  kind: "mutation",
50523
51393
  auth: "admin",
50524
51394
  timeoutMs: 16 * 6e4
@@ -53036,7 +53906,9 @@ var ManifestShapeSchema = object({
53036
53906
  var AddonProcessSchema = object({
53037
53907
  pid: number().optional(),
53038
53908
  mode: string(),
53039
- state: string()
53909
+ state: string(),
53910
+ /** Why the runner is `refused` (an addon's own words), when it is (D877). */
53911
+ reason: string().optional()
53040
53912
  });
53041
53913
  /**
53042
53914
  * Per-addon health snapshot from the kernel's AddonHealthMonitor.
@@ -53804,7 +54676,8 @@ var batteryCapability = {
53804
54676
  DeviceType.Button,
53805
54677
  DeviceType.Switch,
53806
54678
  DeviceType.PetFeeder,
53807
- DeviceType.Container
54679
+ DeviceType.Container,
54680
+ DeviceType.Thermostat
53808
54681
  ],
53809
54682
  methods: {
53810
54683
  /**
@@ -55304,6 +56177,125 @@ onStatusChanged: { data: object({
55304
56177
  * whether persisting is worth a SQLite commit. */
55305
56178
  volatileStateFields: ["lastChangedAt"]
55306
56179
  };
56180
+ /**
56181
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
56182
+ * consumable levels (salt, rinse aid) and common program options.
56183
+ *
56184
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
56185
+ * by any integration that exposes the same program / option surface.
56186
+ *
56187
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
56188
+ * provider refreshes the slice on an interval and eagerly after commands.
56189
+ */
56190
+ var DishwasherStateSchema = _enum([
56191
+ "idle",
56192
+ "running",
56193
+ "paused",
56194
+ "finished",
56195
+ "error",
56196
+ "unavailable"
56197
+ ]);
56198
+ var DishwasherConsumableLevelSchema = _enum([
56199
+ "ok",
56200
+ "low",
56201
+ "empty"
56202
+ ]);
56203
+ var DishwasherStatusSchema = object({
56204
+ state: DishwasherStateSchema,
56205
+ /** Active program id/name, or null when none selected / unknown. */
56206
+ program: string().nullable(),
56207
+ /** Program tokens the hardware accepts — drives the UI selector. */
56208
+ availablePrograms: array(string()),
56209
+ /** Minutes remaining on the active cycle, or null when not running. */
56210
+ remainingMinutes: number().int().nonnegative().nullable(),
56211
+ /** Cycle completion 0..100, or null when not applicable. */
56212
+ progressPercent: number().min(0).max(100).nullable(),
56213
+ /** True when the door is reported open. */
56214
+ doorOpen: boolean(),
56215
+ /** True when remote start is allowed (door closed, power on, etc.). */
56216
+ remoteStartAllowed: boolean(),
56217
+ /** Main power / switched-on state. */
56218
+ powerOn: boolean(),
56219
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
56220
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
56221
+ halfLoad: boolean(),
56222
+ hygienePlus: boolean(),
56223
+ errorCode: number().nullable(),
56224
+ errorLabel: string().nullable(),
56225
+ lastFetchedAt: number()
56226
+ });
56227
+ var dishwasherCapability = {
56228
+ name: "dishwasher",
56229
+ scope: "device",
56230
+ deviceNative: true,
56231
+ mode: "singleton",
56232
+ deviceTypes: [DeviceType.Dishwasher],
56233
+ methods: {
56234
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56235
+ kind: "mutation",
56236
+ auth: "protected"
56237
+ }),
56238
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56239
+ kind: "mutation",
56240
+ auth: "protected"
56241
+ }),
56242
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
56243
+ kind: "mutation",
56244
+ auth: "protected"
56245
+ }),
56246
+ setProgram: method(object({
56247
+ deviceId: number().int().nonnegative(),
56248
+ program: string().min(1)
56249
+ }), _void(), {
56250
+ kind: "mutation",
56251
+ auth: "protected"
56252
+ }),
56253
+ setPower: method(object({
56254
+ deviceId: number().int().nonnegative(),
56255
+ on: boolean()
56256
+ }), _void(), {
56257
+ kind: "mutation",
56258
+ auth: "protected"
56259
+ }),
56260
+ setHalfLoad: method(object({
56261
+ deviceId: number().int().nonnegative(),
56262
+ on: boolean()
56263
+ }), _void(), {
56264
+ kind: "mutation",
56265
+ auth: "protected"
56266
+ }),
56267
+ setHygienePlus: method(object({
56268
+ deviceId: number().int().nonnegative(),
56269
+ on: boolean()
56270
+ }), _void(), {
56271
+ kind: "mutation",
56272
+ auth: "protected"
56273
+ }),
56274
+ setOption: method(object({
56275
+ deviceId: number().int().nonnegative(),
56276
+ key: string().min(1),
56277
+ value: union([
56278
+ boolean(),
56279
+ string(),
56280
+ number()
56281
+ ])
56282
+ }), _void(), {
56283
+ kind: "mutation",
56284
+ auth: "protected"
56285
+ })
56286
+ },
56287
+ status: {
56288
+ schema: DishwasherStatusSchema,
56289
+ kind: "poll"
56290
+ },
56291
+ runtimeState: DishwasherStatusSchema,
56292
+ durability: "session",
56293
+ history: { fields: { progressPercent: {
56294
+ kind: "gauge",
56295
+ unit: "%",
56296
+ deadband: 2
56297
+ } } }
56298
+ };
55307
56299
  var DoorbellStatusSchema = object({
55308
56300
  /** Ms epoch of the last press. null = never observed since this provider started. */
55309
56301
  lastPressedAt: number().nullable(),
@@ -56106,6 +57098,32 @@ var gasCapability = {
56106
57098
  * whether persisting is worth a SQLite commit. */
56107
57099
  volatileStateFields: ["lastChangedAt"]
56108
57100
  };
57101
+ var HeatingValveStatusSchema = object({
57102
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
57103
+ position: number().min(0).max(100).nullable(),
57104
+ /** Ms epoch when the slice was last updated (push or poll). */
57105
+ lastFetchedAt: number()
57106
+ });
57107
+ var heatingValveCapability = {
57108
+ name: "heating-valve",
57109
+ scope: "device",
57110
+ deviceNative: true,
57111
+ mode: "singleton",
57112
+ deviceTypes: [DeviceType.Thermostat],
57113
+ methods: {},
57114
+ status: {
57115
+ schema: HeatingValveStatusSchema,
57116
+ kind: "push"
57117
+ },
57118
+ runtimeState: HeatingValveStatusSchema,
57119
+ durability: "session",
57120
+ history: { fields: { position: {
57121
+ kind: "gauge",
57122
+ unit: "%",
57123
+ deadband: 1
57124
+ } } },
57125
+ volatileStateFields: ["lastFetchedAt"]
57126
+ };
56109
57127
  /**
56110
57128
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
56111
57129
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -63802,7 +64820,11 @@ method(_void(), array(UserSummarySchema), { auth: "admin" }), method(CreateUserI
63802
64820
  kind: "mutation",
63803
64821
  auth: "admin",
63804
64822
  access: "delete"
63805
- }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(object({
64823
+ }), method(object({ userId: string() }), TotpStatusSchema, { auth: "admin" }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
64824
+ kind: "mutation",
64825
+ auth: "admin",
64826
+ access: "create"
64827
+ }), method(object({
63806
64828
  userId: string(),
63807
64829
  code: string()
63808
64830
  }), object({ valid: boolean() }), {
@@ -65522,6 +66544,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65522
66544
  dayNight: dayNightCapability,
65523
66545
  deviceDiscovery: deviceDiscoveryCapability,
65524
66546
  deviceStatus: deviceStatusCapability,
66547
+ dishwasher: dishwasherCapability,
65525
66548
  doorbell: doorbellCapability,
65526
66549
  enumSensor: enumSensorCapability,
65527
66550
  eventEmitter: eventEmitterCapability,
@@ -65529,6 +66552,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
65529
66552
  featureProbe: featureProbeCapability,
65530
66553
  flood: floodCapability,
65531
66554
  gas: gasCapability,
66555
+ heatingValve: heatingValveCapability,
65532
66556
  humidifier: humidifierCapability,
65533
66557
  humiditySensor: humiditySensorCapability,
65534
66558
  image: imageCapability,
@@ -65614,13 +66638,14 @@ var BaseDevice = class {
65614
66638
  get state() {
65615
66639
  if (!this._stateProxyCache) {
65616
66640
  const cache = {};
65617
- const handler = { get: (_target, key) => {
66641
+ const handler = { get: (target, key) => {
65618
66642
  const k = key;
65619
- if (k in cache) return cache[k];
66643
+ const existing = Reflect.get(target, k);
66644
+ if (existing !== void 0) return existing;
65620
66645
  const cap = DEVICE_LOCAL_STATE_CAPS[k];
65621
66646
  if (!cap) return void 0;
65622
66647
  const proxy = this.sliceProxy(cap);
65623
- cache[k] = proxy;
66648
+ Reflect.set(target, k, proxy);
65624
66649
  return proxy;
65625
66650
  } };
65626
66651
  this._stateProxyCache = new Proxy(cache, handler);
@@ -65819,7 +66844,7 @@ var BaseDevice = class {
65819
66844
  async updateSourceInfo(patch) {
65820
66845
  const next = mergeSourceInfo(this.sourceInfo, patch);
65821
66846
  this._sourceInfoCache = Object.freeze({ ...next });
65822
- const action = this.ctx.api?.deviceManager?.setMetadata;
66847
+ const action = this.ctx.api.deviceManager?.setMetadata;
65823
66848
  if (action) try {
65824
66849
  await action.mutate({
65825
66850
  deviceId: this.id,
@@ -65854,7 +66879,7 @@ var BaseDevice = class {
65854
66879
  * device boot on a meta refresh.
65855
66880
  */
65856
66881
  async refreshFeatures() {
65857
- const action = this.ctx.api?.deviceManager?.registerDevice;
66882
+ const action = this.ctx.api.deviceManager?.registerDevice;
65858
66883
  if (!action) return;
65859
66884
  try {
65860
66885
  await action.mutate({
@@ -66253,6 +67278,12 @@ var BaseDeviceProvider = class extends BaseAddon {
66253
67278
  provider: this
66254
67279
  }];
66255
67280
  }
67281
+ /** Flatten `super.onInitialize()` whether it returned an array or an envelope. */
67282
+ providerRegistrationsFromSuper(result) {
67283
+ if (Array.isArray(result)) return result;
67284
+ if (result !== void 0 && result.providers !== void 0) return [...result.providers];
67285
+ return [];
67286
+ }
66256
67287
  async onShutdown() {
66257
67288
  this._restoreShuttingDown = true;
66258
67289
  this.cancelRestoreRetries();
@@ -66779,7 +67810,7 @@ var BaseDeviceProvider = class extends BaseAddon {
66779
67810
  return toDeviceSummary(device, this.addonId);
66780
67811
  }
66781
67812
  };
66782
- 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;
67813
+ 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;
66783
67814
  new Set(Object.values(DeviceType));
66784
67815
  Object.freeze({
66785
67816
  "accessories.getStatus": {
@@ -67928,6 +68959,12 @@ Object.freeze({
67928
68959
  addonId: null,
67929
68960
  access: "view"
67930
68961
  },
68962
+ "coreBlocks.migrateRawSecrets": {
68963
+ capName: "core-blocks",
68964
+ capScope: "system",
68965
+ addonId: null,
68966
+ access: "create"
68967
+ },
67931
68968
  "coreBlocks.restart": {
67932
68969
  capName: "core-blocks",
67933
68970
  capScope: "system",
@@ -69194,6 +70231,60 @@ Object.freeze({
69194
70231
  addonId: null,
69195
70232
  access: "view"
69196
70233
  },
70234
+ "dishwasher.getStatus": {
70235
+ capName: "dishwasher",
70236
+ capScope: "device",
70237
+ addonId: null,
70238
+ access: "view"
70239
+ },
70240
+ "dishwasher.pause": {
70241
+ capName: "dishwasher",
70242
+ capScope: "device",
70243
+ addonId: null,
70244
+ access: "create"
70245
+ },
70246
+ "dishwasher.setHalfLoad": {
70247
+ capName: "dishwasher",
70248
+ capScope: "device",
70249
+ addonId: null,
70250
+ access: "create"
70251
+ },
70252
+ "dishwasher.setHygienePlus": {
70253
+ capName: "dishwasher",
70254
+ capScope: "device",
70255
+ addonId: null,
70256
+ access: "create"
70257
+ },
70258
+ "dishwasher.setOption": {
70259
+ capName: "dishwasher",
70260
+ capScope: "device",
70261
+ addonId: null,
70262
+ access: "create"
70263
+ },
70264
+ "dishwasher.setPower": {
70265
+ capName: "dishwasher",
70266
+ capScope: "device",
70267
+ addonId: null,
70268
+ access: "create"
70269
+ },
70270
+ "dishwasher.setProgram": {
70271
+ capName: "dishwasher",
70272
+ capScope: "device",
70273
+ addonId: null,
70274
+ access: "create"
70275
+ },
70276
+ "dishwasher.start": {
70277
+ capName: "dishwasher",
70278
+ capScope: "device",
70279
+ addonId: null,
70280
+ access: "create"
70281
+ },
70282
+ "dishwasher.stop": {
70283
+ capName: "dishwasher",
70284
+ capScope: "device",
70285
+ addonId: null,
70286
+ access: "create"
70287
+ },
69197
70288
  "doorbell.getStatus": {
69198
70289
  capName: "doorbell",
69199
70290
  capScope: "device",
@@ -69404,6 +70495,12 @@ Object.freeze({
69404
70495
  addonId: null,
69405
70496
  access: "view"
69406
70497
  },
70498
+ "heatingValve.getStatus": {
70499
+ capName: "heating-valve",
70500
+ capScope: "device",
70501
+ addonId: null,
70502
+ access: "view"
70503
+ },
69407
70504
  "humidifier.getStatus": {
69408
70505
  capName: "humidifier",
69409
70506
  capScope: "device",
@@ -69788,6 +70885,12 @@ Object.freeze({
69788
70885
  addonId: null,
69789
70886
  access: "view"
69790
70887
  },
70888
+ "llm.migrateRawSecrets": {
70889
+ capName: "llm",
70890
+ capScope: "system",
70891
+ addonId: null,
70892
+ access: "create"
70893
+ },
69791
70894
  "llm.resolveModelRef": {
69792
70895
  capName: "llm",
69793
70896
  capScope: "system",
@@ -72674,6 +73777,30 @@ Object.freeze({
72674
73777
  addonId: null,
72675
73778
  access: "create"
72676
73779
  },
73780
+ "recordEntries.deleteEntry": {
73781
+ capName: "record-entries",
73782
+ capScope: "system",
73783
+ addonId: null,
73784
+ access: "delete"
73785
+ },
73786
+ "recordEntries.listEntries": {
73787
+ capName: "record-entries",
73788
+ capScope: "system",
73789
+ addonId: null,
73790
+ access: "view"
73791
+ },
73792
+ "recordEntries.listEntryKinds": {
73793
+ capName: "record-entries",
73794
+ capScope: "system",
73795
+ addonId: null,
73796
+ access: "view"
73797
+ },
73798
+ "recordEntries.putEntry": {
73799
+ capName: "record-entries",
73800
+ capScope: "system",
73801
+ addonId: null,
73802
+ access: "create"
73803
+ },
72677
73804
  "recording.getAvailability": {
72678
73805
  capName: "recording",
72679
73806
  capScope: "device",
@@ -72974,6 +74101,102 @@ Object.freeze({
72974
74101
  addonId: null,
72975
74102
  access: "view"
72976
74103
  },
74104
+ "records.aggregate": {
74105
+ capName: "records",
74106
+ capScope: "system",
74107
+ addonId: null,
74108
+ access: "view"
74109
+ },
74110
+ "records.allocateId": {
74111
+ capName: "records",
74112
+ capScope: "system",
74113
+ addonId: null,
74114
+ access: "create"
74115
+ },
74116
+ "records.count": {
74117
+ capName: "records",
74118
+ capScope: "system",
74119
+ addonId: null,
74120
+ access: "view"
74121
+ },
74122
+ "records.declareKinds": {
74123
+ capName: "records",
74124
+ capScope: "system",
74125
+ addonId: null,
74126
+ access: "create"
74127
+ },
74128
+ "records.delete": {
74129
+ capName: "records",
74130
+ capScope: "system",
74131
+ addonId: null,
74132
+ access: "delete"
74133
+ },
74134
+ "records.deleteDevice": {
74135
+ capName: "records",
74136
+ capScope: "system",
74137
+ addonId: null,
74138
+ access: "delete"
74139
+ },
74140
+ "records.deleteMany": {
74141
+ capName: "records",
74142
+ capScope: "system",
74143
+ addonId: null,
74144
+ access: "delete"
74145
+ },
74146
+ "records.deleteWhere": {
74147
+ capName: "records",
74148
+ capScope: "system",
74149
+ addonId: null,
74150
+ access: "delete"
74151
+ },
74152
+ "records.get": {
74153
+ capName: "records",
74154
+ capScope: "system",
74155
+ addonId: null,
74156
+ access: "view"
74157
+ },
74158
+ "records.getMany": {
74159
+ capName: "records",
74160
+ capScope: "system",
74161
+ addonId: null,
74162
+ access: "view"
74163
+ },
74164
+ "records.histogram": {
74165
+ capName: "records",
74166
+ capScope: "system",
74167
+ addonId: null,
74168
+ access: "view"
74169
+ },
74170
+ "records.patch": {
74171
+ capName: "records",
74172
+ capScope: "system",
74173
+ addonId: null,
74174
+ access: "create"
74175
+ },
74176
+ "records.put": {
74177
+ capName: "records",
74178
+ capScope: "system",
74179
+ addonId: null,
74180
+ access: "create"
74181
+ },
74182
+ "records.putMany": {
74183
+ capName: "records",
74184
+ capScope: "system",
74185
+ addonId: null,
74186
+ access: "create"
74187
+ },
74188
+ "records.query": {
74189
+ capName: "records",
74190
+ capScope: "system",
74191
+ addonId: null,
74192
+ access: "view"
74193
+ },
74194
+ "records.secretRefs": {
74195
+ capName: "records",
74196
+ capScope: "system",
74197
+ addonId: null,
74198
+ access: "view"
74199
+ },
72977
74200
  "sceneMonitor.captureReference": {
72978
74201
  capName: "scene-monitor",
72979
74202
  capScope: "device",
@@ -73406,18 +74629,48 @@ Object.freeze({
73406
74629
  addonId: null,
73407
74630
  access: "create"
73408
74631
  },
74632
+ "storageAdmin.adoptRecords": {
74633
+ capName: "storage-admin",
74634
+ capScope: "system",
74635
+ addonId: null,
74636
+ access: "create"
74637
+ },
73409
74638
  "storageAdmin.dropCollection": {
73410
74639
  capName: "storage-admin",
73411
74640
  capScope: "system",
73412
74641
  addonId: null,
73413
74642
  access: "delete"
73414
74643
  },
74644
+ "storageAdmin.isAdoptedLegacyTable": {
74645
+ capName: "storage-admin",
74646
+ capScope: "system",
74647
+ addonId: null,
74648
+ access: "view"
74649
+ },
74650
+ "storageAdmin.listKinds": {
74651
+ capName: "storage-admin",
74652
+ capScope: "system",
74653
+ addonId: null,
74654
+ access: "view"
74655
+ },
73415
74656
  "storageAdmin.listTables": {
73416
74657
  capName: "storage-admin",
73417
74658
  capScope: "system",
73418
74659
  addonId: null,
73419
74660
  access: "view"
73420
74661
  },
74662
+ "storageAdmin.readLegacyCollection": {
74663
+ capName: "storage-admin",
74664
+ capScope: "system",
74665
+ addonId: null,
74666
+ access: "view"
74667
+ },
74668
+ "storageAdmin.readRecords": {
74669
+ capName: "storage-admin",
74670
+ capScope: "system",
74671
+ addonId: null,
74672
+ access: "view"
74673
+ },
73421
74674
  "storageEvictable.evict": {
73422
74675
  capName: "storage-evictable",
73423
74676
  capScope: "system",
@@ -74330,6 +75583,12 @@ Object.freeze({
74330
75583
  addonId: null,
74331
75584
  access: "view"
74332
75585
  },
75586
+ "userManagement.migrateRawSecrets": {
75587
+ capName: "user-management",
75588
+ capScope: "system",
75589
+ addonId: null,
75590
+ access: "create"
75591
+ },
74333
75592
  "userManagement.oauthExchangeCode": {
74334
75593
  capName: "user-management",
74335
75594
  capScope: "system",
@@ -74829,7 +76088,7 @@ Object.freeze({
74829
76088
  access: "create"
74830
76089
  }
74831
76090
  });
74832
- 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;
76091
+ 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;
74833
76092
  DeviceFeature.BatteryOperated;
74834
76093
  Object.freeze({
74835
76094
  "accessories.getStatus": [{
@@ -75653,6 +76912,51 @@ Object.freeze({
75653
76912
  form: "single",
75654
76913
  optional: false
75655
76914
  }],
76915
+ "dishwasher.getStatus": [{
76916
+ name: "deviceId",
76917
+ form: "single",
76918
+ optional: false
76919
+ }],
76920
+ "dishwasher.pause": [{
76921
+ name: "deviceId",
76922
+ form: "single",
76923
+ optional: false
76924
+ }],
76925
+ "dishwasher.setHalfLoad": [{
76926
+ name: "deviceId",
76927
+ form: "single",
76928
+ optional: false
76929
+ }],
76930
+ "dishwasher.setHygienePlus": [{
76931
+ name: "deviceId",
76932
+ form: "single",
76933
+ optional: false
76934
+ }],
76935
+ "dishwasher.setOption": [{
76936
+ name: "deviceId",
76937
+ form: "single",
76938
+ optional: false
76939
+ }],
76940
+ "dishwasher.setPower": [{
76941
+ name: "deviceId",
76942
+ form: "single",
76943
+ optional: false
76944
+ }],
76945
+ "dishwasher.setProgram": [{
76946
+ name: "deviceId",
76947
+ form: "single",
76948
+ optional: false
76949
+ }],
76950
+ "dishwasher.start": [{
76951
+ name: "deviceId",
76952
+ form: "single",
76953
+ optional: false
76954
+ }],
76955
+ "dishwasher.stop": [{
76956
+ name: "deviceId",
76957
+ form: "single",
76958
+ optional: false
76959
+ }],
75656
76960
  "doorbell.getStatus": [{
75657
76961
  name: "deviceId",
75658
76962
  form: "single",
@@ -75722,6 +77026,11 @@ Object.freeze({
75722
77026
  form: "single",
75723
77027
  optional: false
75724
77028
  }],
77029
+ "heatingValve.getStatus": [{
77030
+ name: "deviceId",
77031
+ form: "single",
77032
+ optional: false
77033
+ }],
75725
77034
  "humidifier.getStatus": [{
75726
77035
  name: "deviceId",
75727
77036
  form: "single",
@@ -77006,6 +78315,37 @@ Object.freeze({
77006
78315
  form: "single",
77007
78316
  optional: false
77008
78317
  }],
78318
+ "records.count": [{
78319
+ name: "deviceId",
78320
+ form: "single",
78321
+ optional: true
78322
+ }],
78323
+ "records.deleteDevice": [{
78324
+ name: "deviceId",
78325
+ form: "single",
78326
+ optional: false
78327
+ }],
78328
+ "records.deleteWhere": [{
78329
+ name: "deviceId",
78330
+ form: "single",
78331
+ optional: true
78332
+ }],
78333
+ "records.histogram": [{
78334
+ name: "deviceId",
78335
+ form: "single",
78336
+ optional: true
78337
+ }],
78338
+ "records.putMany": [{
78339
+ name: "records",
78340
+ form: "object-array",
78341
+ optional: false,
78342
+ itemField: "deviceId"
78343
+ }],
78344
+ "records.query": [{
78345
+ name: "deviceId",
78346
+ form: "single",
78347
+ optional: true
78348
+ }],
77009
78349
  "sceneMonitor.captureReference": [{
77010
78350
  name: "deviceId",
77011
78351
  form: "single",
@@ -77122,6 +78462,17 @@ Object.freeze({
77122
78462
  form: "single",
77123
78463
  optional: false
77124
78464
  }],
78465
+ "storageAdmin.adoptRecords": [{
78466
+ name: "records",
78467
+ form: "object-array",
78468
+ optional: false,
78469
+ itemField: "deviceId"
78470
+ }],
78471
+ "storageAdmin.readRecords": [{
78472
+ name: "deviceId",
78473
+ form: "single",
78474
+ optional: true
78475
+ }],
77125
78476
  "streamBroker.acquireEgressTranscode": [{
77126
78477
  name: "deviceId",
77127
78478
  form: "single",
@@ -78831,4 +80182,4 @@ function bestLocationMatch(externalName, existing, threshold = .8) {
78831
80182
  var MB = 1024 * 1024;
78832
80183
  1024 * MB, 3072 * MB;
78833
80184
  //#endregion
78834
- export { oauthIntegrationCapability as $, connectivityCapability as A, record as At, floodCapability as B, buildAddonRouteProvider as C, _enum as Ct, carbonMonoxideCapability as D, literal as Dt, calendarSourceCapability as E, discriminatedUnion as Et, deviceAdoptionCapability as F, EventCategory as Ft, lawnMowerControlCapability as G, humidifierCapability as H, deviceExportCapability as I, motionCapability as J, lockControlCapability as K, enumSensorCapability as L, controlCapability as M, union as Mt, coverCapability as N, unknown as Nt, climateControlCapability as O, number as Ot, deviceAdminLinkCapability as P, url as Pt, numericSensorCapability as Q, eventEmitterCapability as R, brokerCapability as S, nodePin as St, buttonCapability as T, boolean as Tt, humiditySensorCapability as U, gasCapability as V, imageCapability as W, notificationOutputCapability as X, normalizeUnit as Y, notifierCapability as Z, automationControlCapability as _, DeviceRole as _t, COCO_TO_MACRO as a, scriptRunnerCapability as at, binaryCapability as b, BaseAddon as bt, FanDirectionSchema as c, tamperCapability as ct, TargetSchema as d, vacuumControlCapability as dt, parseAdminBase as et, accessoriesCapability as f, valveCapability as ft, ambientLightSensorCapability as g, DeviceFeature as gt, alarmPanelCapability as h, weatherCapability as ht, CAMERA_SWITCH_ORDER as i, pressureSensorCapability as it, contactCapability as j, string as jt, colorCapability as k, object as kt, HvacModeSchema as l, temperatureSensorCapability as lt, airQualitySensorCapability as m, waterHeaterCapability as mt, BaseDevice as n, prepareNotification as nt, CameraSwitchIdSchema as o, smokeCapability as ot, addonRoutesCapability as p, vibrationCapability as pt, mediaPlayerCapability as q, BaseDeviceProvider as r, presenceCapability as rt, EnumSensorDateTimeFormatSchema as s, switchCapability as st, AlarmArmModeSchema as t, powerMeterCapability as tt, MediaPlayerRepeatSchema as u, updateCapability as ut, batteryCapability as v, DeviceType as vt, buildDeviceAdminUrl as w, array as wt, brightnessCapability as x, createEvent as xt, bestLocationMatch as y, errMsg as yt, fanControlCapability as z };
80185
+ export { oauthIntegrationCapability as $, connectivityCapability as A, boolean as At, floodCapability as B, EventCategory as Bt, buildAddonRouteProvider as C, defineEntryKind as Ct, carbonMonoxideCapability as D, settingsBrokersAdoptsFrom as Dt, calendarSourceCapability as E, nodePin as Et, deviceAdoptionCapability as F, record as Ft, lawnMowerControlCapability as G, humidifierCapability as H, deviceExportCapability as I, string as It, motionCapability as J, lockControlCapability as K, enumSensorCapability as L, union as Lt, controlCapability as M, literal as Mt, coverCapability as N, number as Nt, climateControlCapability as O, _enum as Ot, deviceAdminLinkCapability as P, object as Pt, numericSensorCapability as Q, eventEmitterCapability as R, unknown as Rt, brokerCapability as S, createEvent as St, buttonCapability as T, entryBody as Tt, humiditySensorCapability as U, gasCapability as V, imageCapability as W, notificationOutputCapability as X, normalizeUnit as Y, notifierCapability as Z, automationControlCapability as _, DeviceRole as _t, COCO_TO_MACRO as a, scriptRunnerCapability as at, binaryCapability as b, BaseAddon as bt, FanDirectionSchema as c, tamperCapability as ct, TargetSchema as d, vacuumControlCapability as dt, parseAdminBase as et, accessoriesCapability as f, valveCapability as ft, ambientLightSensorCapability as g, DeviceFeature as gt, alarmPanelCapability as h, weatherCapability as ht, CAMERA_SWITCH_ORDER as i, pressureSensorCapability as it, contactCapability as j, discriminatedUnion as jt, colorCapability as k, array as kt, HvacModeSchema as l, temperatureSensorCapability as lt, airQualitySensorCapability as m, waterHeaterCapability as mt, BaseDevice as n, prepareNotification as nt, CameraSwitchIdSchema as o, smokeCapability as ot, addonRoutesCapability as p, vibrationCapability as pt, mediaPlayerCapability as q, BaseDeviceProvider as r, presenceCapability as rt, EnumSensorDateTimeFormatSchema as s, switchCapability as st, AlarmArmModeSchema as t, powerMeterCapability as tt, MediaPlayerRepeatSchema as u, updateCapability as ut, batteryCapability as v, DeviceType as vt, buildDeviceAdminUrl as w, defineRecordKinds as wt, brightnessCapability as x, RecordSecretUnavailableError as xt, bestLocationMatch as y, errMsg as yt, fanControlCapability as z, url as zt };