@camstack/addon-post-analysis 1.2.374 → 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.
Files changed (15) hide show
  1. package/dist/{clip-model-registry-BRzN2GzR.js → clip-model-registry-D0-VNIW5.js} +732 -34
  2. package/dist/{clip-model-registry-BIJ0ZD7t.mjs → clip-model-registry-lQ7QWjLf.mjs} +703 -35
  3. package/dist/embedding-encoder/index.js +1 -1
  4. package/dist/embedding-encoder/index.mjs +1 -1
  5. package/dist/pipeline-analytics/_stub.js +2 -2
  6. package/dist/pipeline-analytics/{_virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BYu-s1rf.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-BPA0T5-F.mjs} +3 -3
  7. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-1AlitJg2.mjs +26 -0
  8. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Cfj8Mv5X.mjs +26 -0
  9. package/dist/pipeline-analytics/{hostInit-DEl2xA0o.mjs → hostInit-DIjMiIYW.mjs} +3 -3
  10. package/dist/pipeline-analytics/index.js +79959 -79565
  11. package/dist/pipeline-analytics/index.mjs +79814 -79420
  12. package/dist/pipeline-analytics/remoteEntry.js +1 -1
  13. package/package.json +1 -1
  14. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Ds_wGoAi.mjs +0 -26
  15. package/dist/pipeline-analytics/_virtual_mf___mfe_internal__addon_pipeline_analytics_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BjCURGur.mjs +0 -26
@@ -4199,6 +4199,12 @@ var numberProcessor = (schema, ctx, _json, _params) => {
4199
4199
  var booleanProcessor = (_schema, _ctx, json, _params) => {
4200
4200
  json.type = "boolean";
4201
4201
  };
4202
+ var bigintProcessor = (_schema, ctx, _json, _params) => {
4203
+ if (ctx.unrepresentable === "throw") throw new Error("BigInt cannot be represented in JSON Schema");
4204
+ };
4205
+ var symbolProcessor = (_schema, ctx, _json, _params) => {
4206
+ if (ctx.unrepresentable === "throw") throw new Error("Symbols cannot be represented in JSON Schema");
4207
+ };
4202
4208
  var nullProcessor = (_schema, ctx, json, _params) => {
4203
4209
  if (ctx.target === "openapi-3.0") {
4204
4210
  json.type = "string";
@@ -4206,12 +4212,17 @@ var nullProcessor = (_schema, ctx, json, _params) => {
4206
4212
  json.enum = [null];
4207
4213
  } else json.type = "null";
4208
4214
  };
4215
+ var undefinedProcessor = (_schema, ctx, _json, _params) => {
4216
+ if (ctx.unrepresentable === "throw") throw new Error("Undefined cannot be represented in JSON Schema");
4217
+ };
4209
4218
  var voidProcessor = (_schema, ctx, _json, _params) => {
4210
4219
  if (ctx.unrepresentable === "throw") throw new Error("Void cannot be represented in JSON Schema");
4211
4220
  };
4212
4221
  var neverProcessor = (_schema, _ctx, json, _params) => {
4213
4222
  json.not = {};
4214
4223
  };
4224
+ var anyProcessor = (_schema, _ctx, _json, _params) => {};
4225
+ var unknownProcessor = (_schema, _ctx, _json, _params) => {};
4215
4226
  var dateProcessor = (_schema, ctx, _json, _params) => {
4216
4227
  if (ctx.unrepresentable === "throw") throw new Error("Date cannot be represented in JSON Schema");
4217
4228
  };
@@ -4243,6 +4254,9 @@ var literalProcessor = (schema, ctx, json, _params) => {
4243
4254
  json.enum = vals;
4244
4255
  }
4245
4256
  };
4257
+ var nanProcessor = (_schema, ctx, _json, _params) => {
4258
+ if (ctx.unrepresentable === "throw") throw new Error("NaN cannot be represented in JSON Schema");
4259
+ };
4246
4260
  var templateLiteralProcessor = (schema, _ctx, json, _params) => {
4247
4261
  const _json = json;
4248
4262
  const pattern = schema._zod.pattern;
@@ -4250,12 +4264,43 @@ var templateLiteralProcessor = (schema, _ctx, json, _params) => {
4250
4264
  _json.type = "string";
4251
4265
  _json.pattern = pattern.source;
4252
4266
  };
4267
+ var fileProcessor = (schema, _ctx, json, _params) => {
4268
+ const _json = json;
4269
+ const file = {
4270
+ type: "string",
4271
+ format: "binary",
4272
+ contentEncoding: "binary"
4273
+ };
4274
+ const { minimum, maximum, mime } = schema._zod.bag;
4275
+ if (minimum !== void 0) file.minLength = minimum;
4276
+ if (maximum !== void 0) file.maxLength = maximum;
4277
+ if (mime) if (mime.length === 1) {
4278
+ file.contentMediaType = mime[0];
4279
+ Object.assign(_json, file);
4280
+ } else {
4281
+ Object.assign(_json, file);
4282
+ _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
4283
+ }
4284
+ else Object.assign(_json, file);
4285
+ };
4286
+ var successProcessor = (_schema, _ctx, json, _params) => {
4287
+ json.type = "boolean";
4288
+ };
4253
4289
  var customProcessor = (_schema, ctx, _json, _params) => {
4254
4290
  if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
4255
4291
  };
4292
+ var functionProcessor = (_schema, ctx, _json, _params) => {
4293
+ if (ctx.unrepresentable === "throw") throw new Error("Function types cannot be represented in JSON Schema");
4294
+ };
4256
4295
  var transformProcessor = (_schema, ctx, _json, _params) => {
4257
4296
  if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
4258
4297
  };
4298
+ var mapProcessor = (_schema, ctx, _json, _params) => {
4299
+ if (ctx.unrepresentable === "throw") throw new Error("Map cannot be represented in JSON Schema");
4300
+ };
4301
+ var setProcessor = (_schema, ctx, _json, _params) => {
4302
+ if (ctx.unrepresentable === "throw") throw new Error("Set cannot be represented in JSON Schema");
4303
+ };
4259
4304
  var arrayProcessor = (schema, ctx, _json, params) => {
4260
4305
  const json = _json;
4261
4306
  const def = schema._zod.def;
@@ -4460,6 +4505,12 @@ var readonlyProcessor = (schema, ctx, json, params) => {
4460
4505
  seen.ref = def.innerType;
4461
4506
  json.readOnly = true;
4462
4507
  };
4508
+ var promiseProcessor = (schema, ctx, _json, params) => {
4509
+ const def = schema._zod.def;
4510
+ process(def.innerType, ctx, params);
4511
+ const seen = ctx.seen.get(schema);
4512
+ seen.ref = def.innerType;
4513
+ };
4463
4514
  var optionalProcessor = (schema, ctx, _json, params) => {
4464
4515
  const def = schema._zod.def;
4465
4516
  process(def.innerType, ctx, params);
@@ -4472,6 +4523,81 @@ var lazyProcessor = (schema, ctx, _json, params) => {
4472
4523
  const seen = ctx.seen.get(schema);
4473
4524
  seen.ref = innerType;
4474
4525
  };
4526
+ var allProcessors = {
4527
+ string: stringProcessor,
4528
+ number: numberProcessor,
4529
+ boolean: booleanProcessor,
4530
+ bigint: bigintProcessor,
4531
+ symbol: symbolProcessor,
4532
+ null: nullProcessor,
4533
+ undefined: undefinedProcessor,
4534
+ void: voidProcessor,
4535
+ never: neverProcessor,
4536
+ any: anyProcessor,
4537
+ unknown: unknownProcessor,
4538
+ date: dateProcessor,
4539
+ enum: enumProcessor,
4540
+ literal: literalProcessor,
4541
+ nan: nanProcessor,
4542
+ template_literal: templateLiteralProcessor,
4543
+ file: fileProcessor,
4544
+ success: successProcessor,
4545
+ custom: customProcessor,
4546
+ function: functionProcessor,
4547
+ transform: transformProcessor,
4548
+ map: mapProcessor,
4549
+ set: setProcessor,
4550
+ array: arrayProcessor,
4551
+ object: objectProcessor,
4552
+ union: unionProcessor,
4553
+ intersection: intersectionProcessor,
4554
+ tuple: tupleProcessor,
4555
+ record: recordProcessor,
4556
+ nullable: nullableProcessor,
4557
+ nonoptional: nonoptionalProcessor,
4558
+ default: defaultProcessor,
4559
+ prefault: prefaultProcessor,
4560
+ catch: catchProcessor,
4561
+ pipe: pipeProcessor,
4562
+ readonly: readonlyProcessor,
4563
+ promise: promiseProcessor,
4564
+ optional: optionalProcessor,
4565
+ lazy: lazyProcessor
4566
+ };
4567
+ function toJSONSchema(input, params) {
4568
+ if ("_idmap" in input) {
4569
+ const registry = input;
4570
+ const ctx = initializeContext({
4571
+ ...params,
4572
+ processors: allProcessors
4573
+ });
4574
+ const defs = {};
4575
+ for (const entry of registry._idmap.entries()) {
4576
+ const [_, schema] = entry;
4577
+ process(schema, ctx);
4578
+ }
4579
+ const schemas = {};
4580
+ ctx.external = {
4581
+ registry,
4582
+ uri: params?.uri,
4583
+ defs
4584
+ };
4585
+ for (const entry of registry._idmap.entries()) {
4586
+ const [key, schema] = entry;
4587
+ extractDefs(ctx, schema);
4588
+ schemas[key] = finalize(ctx, schema);
4589
+ }
4590
+ if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
4591
+ return { schemas };
4592
+ }
4593
+ const ctx = initializeContext({
4594
+ ...params,
4595
+ processors: allProcessors
4596
+ });
4597
+ process(input, ctx);
4598
+ extractDefs(ctx, input);
4599
+ return finalize(ctx, input);
4600
+ }
4475
4601
  //#endregion
4476
4602
  //#region ../../node_modules/zod/v4/classic/iso.js
4477
4603
  var ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
@@ -5508,7 +5634,7 @@ var ZodIssueCode = {
5508
5634
  var ZodFirstPartyTypeKind;
5509
5635
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5510
5636
  //#endregion
5511
- //#region ../types/dist/sleep-WsrozGDL.mjs
5637
+ //#region ../types/dist/sleep-BOjuyoPC.mjs
5512
5638
  /**
5513
5639
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5514
5640
  * window to float samples (D455).
@@ -5625,7 +5751,7 @@ function isKeychainStoredField(field) {
5625
5751
  var SECRET_CLEAR = { $secretClear: true };
5626
5752
  /** The `'***'` token D634 redaction writes for non-admins. */
5627
5753
  var LEGACY_DEVICE_REDACTION = "***";
5628
- function isRecord$4(value) {
5754
+ function isRecord$5(value) {
5629
5755
  return typeof value === "object" && value !== null && !Array.isArray(value);
5630
5756
  }
5631
5757
  function makeSecretMarker(ref) {
@@ -5636,12 +5762,12 @@ function makeSecretMarker(ref) {
5636
5762
  }
5637
5763
  /** A stored marker: an object whose `$secret` is a non-empty string. */
5638
5764
  function isSecretMarker(value) {
5639
- if (!isRecord$4(value)) return false;
5765
+ if (!isRecord$5(value)) return false;
5640
5766
  const ref = value["$secret"];
5641
5767
  return typeof ref === "string" && ref.length > 0;
5642
5768
  }
5643
5769
  function isSecretClear(value) {
5644
- return isRecord$4(value) && value["$secretClear"] === true;
5770
+ return isRecord$5(value) && value["$secretClear"] === true;
5645
5771
  }
5646
5772
  /**
5647
5773
  * The UI view of a stored secret field value: a marker becomes "set", inline
@@ -6251,7 +6377,7 @@ var KeychainWriteRefusedError = class extends Error {
6251
6377
  }
6252
6378
  };
6253
6379
  var KEEP = { kind: "keep" };
6254
- function isRecord$3(value) {
6380
+ function isRecord$4(value) {
6255
6381
  return typeof value === "object" && value !== null && !Array.isArray(value);
6256
6382
  }
6257
6383
  function defaultMintId() {
@@ -6264,7 +6390,7 @@ function collectSecretMarkerRefs(value, out = []) {
6264
6390
  return out;
6265
6391
  }
6266
6392
  if (Array.isArray(value)) for (const item of value) collectSecretMarkerRefs(item, out);
6267
- else if (isRecord$3(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6393
+ else if (isRecord$4(value)) for (const child of Object.values(value)) collectSecretMarkerRefs(child, out);
6268
6394
  return out;
6269
6395
  }
6270
6396
  async function storedValueEquals(secrets, marker, candidate) {
@@ -6319,7 +6445,7 @@ function rowId(row, idKey) {
6319
6445
  return null;
6320
6446
  }
6321
6447
  async function writeArray(ctx, node, incoming, stored, fieldPath) {
6322
- const storedRows = Array.isArray(stored) ? stored.filter(isRecord$3) : [];
6448
+ const storedRows = Array.isArray(stored) ? stored.filter(isRecord$4) : [];
6323
6449
  if (!Array.isArray(incoming)) {
6324
6450
  ctx.deletes.push(...collectSecretMarkerRefs(storedRows));
6325
6451
  return {
@@ -6335,7 +6461,7 @@ async function writeArray(ctx, node, incoming, stored, fieldPath) {
6335
6461
  const kept = /* @__PURE__ */ new Set();
6336
6462
  const rows = [];
6337
6463
  for (const row of incoming) {
6338
- if (!isRecord$3(row)) {
6464
+ if (!isRecord$4(row)) {
6339
6465
  rows.push(row);
6340
6466
  continue;
6341
6467
  }
@@ -6360,7 +6486,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6360
6486
  case "leaf": return writeLeaf(ctx, incoming, stored, fieldPath);
6361
6487
  case "array": return writeArray(ctx, node, incoming, stored, fieldPath);
6362
6488
  case "object": {
6363
- if (!isRecord$3(incoming)) {
6489
+ if (!isRecord$4(incoming)) {
6364
6490
  if (incoming === void 0) return KEEP;
6365
6491
  ctx.deletes.push(...collectSecretMarkerRefs(stored));
6366
6492
  return {
@@ -6368,7 +6494,7 @@ async function writeNode(ctx, node, incoming, stored, fieldPath) {
6368
6494
  value: incoming
6369
6495
  };
6370
6496
  }
6371
- const storedObj = isRecord$3(stored) ? stored : {};
6497
+ const storedObj = isRecord$4(stored) ? stored : {};
6372
6498
  return {
6373
6499
  kind: "value",
6374
6500
  value: await writeMembers(ctx, node.children, incoming, storedObj, (m) => `${fieldPath}.${m}`)
@@ -6491,7 +6617,7 @@ async function resolveSecretMarkers(value, secrets, options = {}) {
6491
6617
  value: items
6492
6618
  };
6493
6619
  }
6494
- if (isRecord$3(v)) {
6620
+ if (isRecord$4(v)) {
6495
6621
  const out = {};
6496
6622
  for (const [k, child] of Object.entries(v)) {
6497
6623
  const s = substitute(child);
@@ -6523,7 +6649,7 @@ var SecretOverwriteRefusedError = class extends Error {
6523
6649
  this.name = "SecretOverwriteRefusedError";
6524
6650
  }
6525
6651
  };
6526
- function isRecord$2(value) {
6652
+ function isRecord$3(value) {
6527
6653
  return typeof value === "object" && value !== null && !Array.isArray(value);
6528
6654
  }
6529
6655
  function resolvedValue(pass, marker) {
@@ -6552,7 +6678,7 @@ function inArray(pass, incoming, stored) {
6552
6678
  return incoming.map((item, index) => {
6553
6679
  const twin = stored[index];
6554
6680
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
6555
- if (isRecord$2(item) && isRecord$2(twin)) return inArrayRow(pass, item, twin);
6681
+ if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
6556
6682
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
6557
6683
  return item;
6558
6684
  });
@@ -6563,7 +6689,7 @@ function inArrayRow(pass, incoming, stored) {
6563
6689
  const twin = stored[key];
6564
6690
  if (isSecretMarker(twin)) {
6565
6691
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
6566
- } else if (isRecord$2(value) && isRecord$2(twin)) out[key] = inArrayRow(pass, value, twin);
6692
+ } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
6567
6693
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
6568
6694
  }
6569
6695
  return out;
@@ -6571,7 +6697,7 @@ function inArrayRow(pass, incoming, stored) {
6571
6697
  async function walk(pass, incoming, stored) {
6572
6698
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
6573
6699
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
6574
- if (!isRecord$2(incoming) || !isRecord$2(stored)) return incoming;
6700
+ if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
6575
6701
  const out = { ...incoming };
6576
6702
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
6577
6703
  return out;
@@ -6602,7 +6728,7 @@ async function restoreUnchangedSecrets(input) {
6602
6728
  function isJsonEqual(a, b) {
6603
6729
  if (Object.is(a, b)) return true;
6604
6730
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
6605
- if (isRecord$2(a) && isRecord$2(b)) {
6731
+ if (isRecord$3(a) && isRecord$3(b)) {
6606
6732
  const keys = Object.keys(a);
6607
6733
  if (keys.length !== Object.keys(b).length) return false;
6608
6734
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -6626,7 +6752,7 @@ function markerKeysOf(blob, owner) {
6626
6752
  }
6627
6753
  function nodeFromStored(value, owner) {
6628
6754
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
6629
- if (!isRecord$2(value)) return null;
6755
+ if (!isRecord$3(value)) return null;
6630
6756
  const children = /* @__PURE__ */ new Map();
6631
6757
  for (const [key, child] of Object.entries(value)) {
6632
6758
  const node = nodeFromStored(child, owner);
@@ -7414,7 +7540,7 @@ var BaseAddon = class {
7414
7540
  if (!ctx) return;
7415
7541
  const addonId = ctx.id;
7416
7542
  setImmediate(() => {
7417
- ctx.api.addons?.restartAddon?.mutate({ addonId }).then(() => {
7543
+ ctx.api.addons.restartAddon.mutate({ addonId }).then(() => {
7418
7544
  ctx.logger.info("addon auto-restart triggered by restart-required setting change", { meta: { changedFields: patchKeys.filter((k) => restartKeys.has(k)) } });
7419
7545
  }).catch((err) => {
7420
7546
  ctx.logger.error("addon auto-restart failed", { meta: { error: err instanceof Error ? err.message : String(err) } });
@@ -7923,8 +8049,39 @@ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
7923
8049
  var RECORD_MAX_DATA_BYTES = 1024 * 1024;
7924
8050
  var RECORD_BATCH_MAX = 1e3;
7925
8051
  var RECORD_QUERY_MAX = 1e3;
8052
+ /** A kind in the `settings` file may not bound itself above this (D447: high volume is `events`). */
8053
+ var RECORD_SETTINGS_MAX_ROWS = 5e4;
8054
+ var PREFIX = "records/";
8055
+ /** The base of every records failure. `detail` is the human part of the message. */
8056
+ var RecordsError = class extends Error {
8057
+ code;
8058
+ detail;
8059
+ constructor(code, detail) {
8060
+ super(`${PREFIX}${code}: ${detail}`);
8061
+ this.name = "RecordsError";
8062
+ this.code = code;
8063
+ this.detail = detail;
8064
+ }
8065
+ };
8066
+ var InvalidRecordError = class extends RecordsError {
8067
+ constructor(detail) {
8068
+ super("invalid-record", detail);
8069
+ this.name = "InvalidRecordError";
8070
+ }
8071
+ };
8072
+ /** A kind declaration the engine refuses (non-additive change, bad shape, wrong file). */
8073
+ var DeclarationRefusedError = class extends RecordsError {
8074
+ constructor(detail) {
8075
+ super("declaration-refused", detail);
8076
+ this.name = "DeclarationRefusedError";
8077
+ }
8078
+ };
7926
8079
  function defOf(schema) {
7927
- return schema._zod?.def ?? {};
8080
+ const zodBag = Reflect.get(schema, "_zod");
8081
+ if (typeof zodBag !== "object" || zodBag === null) return {};
8082
+ const def = Reflect.get(zodBag, "def");
8083
+ if (typeof def !== "object" || def === null) return {};
8084
+ return def;
7928
8085
  }
7929
8086
  function declaredHere(schema) {
7930
8087
  return globalRegistry.get(schema)?.secret === true;
@@ -7987,6 +8144,42 @@ function collectZodSecretPaths(schema, prefix = "") {
7987
8144
  return [...new Set(paths)];
7988
8145
  }
7989
8146
  /**
8147
+ * Secret fields of a record, addressed the way a Zod schema declares them
8148
+ * (`collectZodSecretPaths`): dotted keys, `[]` for "each element of this array"
8149
+ * (`auth.accessToken`, `headers[].value`).
8150
+ *
8151
+ * Array elements are matched by a DECLARED id key (`secretArrayKeys`:
8152
+ * `{ headers: 'name' }`), never by index, so reordering a list keeps every
8153
+ * keychain ref (the same rule as `arrayItemFieldPath`). The concrete path of a
8154
+ * leaf names its element: `headers[X-Api].value`.
8155
+ *
8156
+ * Pure and browser-safe. Nothing here mutates: every transform returns a new value.
8157
+ */
8158
+ /** The array prefixes (declared form, e.g. `headers` or `a.headers`) of a path. */
8159
+ function parseSecretPath(path) {
8160
+ if (path.length === 0) throw new InvalidRecordError("an empty secret path");
8161
+ return path.split(".").map((raw) => {
8162
+ const each = raw.endsWith("[]");
8163
+ const key = each ? raw.slice(0, -2) : raw;
8164
+ if (key.length === 0) throw new InvalidRecordError(`secret path "${path}" has an empty segment`);
8165
+ return {
8166
+ key,
8167
+ each
8168
+ };
8169
+ });
8170
+ }
8171
+ /** The declared array prefixes of `path` that need an id key (`headers`, `a.rows`). */
8172
+ function secretArrayPrefixes(path) {
8173
+ const segments = parseSecretPath(path);
8174
+ const prefixes = [];
8175
+ const walked = [];
8176
+ for (const segment of segments) {
8177
+ walked.push(segment.key);
8178
+ if (segment.each) prefixes.push(walked.join("."));
8179
+ }
8180
+ return prefixes;
8181
+ }
8182
+ /**
7990
8183
  * Record kinds (D881): the declaration an addon makes of one kind of fact, the
7991
8184
  * Zod row schema that describes it, and the helper that turns the two into the
7992
8185
  * JSON the engine stores.
@@ -8054,6 +8247,90 @@ var RecordKindDeclarationSchema = object({
8054
8247
  }).strict();
8055
8248
  /** The kind names: lower-case, dash separated, short enough for an index name. */
8056
8249
  var RecordKindNameSchema = string().regex(/^[a-z][a-z0-9-]{0,47}$/);
8250
+ /** Cross-field rules a declaration must satisfy. Throws {@link DeclarationRefusedError}. */
8251
+ function assertValidDeclaration(name, decl) {
8252
+ const refuse = (why) => {
8253
+ throw new DeclarationRefusedError(`kind "${name}": ${why}`);
8254
+ };
8255
+ if (!RecordKindNameSchema.safeParse(name).success) refuse("the name must be lower-case-dashed");
8256
+ const seen = /* @__PURE__ */ new Set();
8257
+ for (const index of decl.indexes) {
8258
+ if (seen.has(index.name)) refuse(`index name "${index.name}" is declared twice`);
8259
+ seen.add(index.name);
8260
+ }
8261
+ const { retention } = decl;
8262
+ const hasSecrets = decl.secretPaths.length > 0;
8263
+ if ("ttlMs" in retention) {
8264
+ if (retention.from === "at" && decl.at !== "required") refuse("a ttl from \"at\" needs at: \"required\"");
8265
+ if (hasSecrets) refuse("a kind with secret fields cannot use engine TTL (its keychain values would be orphaned)");
8266
+ }
8267
+ if ("maxRows" in retention || "maxRowsPerDevice" in retention) {
8268
+ if (retention.maxRowsPerDevice !== void 0 && decl.device !== "required") refuse("maxRowsPerDevice needs device: \"required\"");
8269
+ if (decl.at !== "required") refuse("a row bound trims the oldest \"at\": it needs at: \"required\"");
8270
+ if (hasSecrets) refuse("a kind with secret fields cannot use an engine row bound");
8271
+ const bound = Math.max(retention.maxRows ?? 0, retention.maxRowsPerDevice ?? 0);
8272
+ 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)`);
8273
+ }
8274
+ if (decl.deviceRemoval === "delete" && decl.device === "none") refuse("deviceRemoval: \"delete\" needs a device: \"required\" or \"optional\"");
8275
+ 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`);
8276
+ }
8277
+ function bodyFieldsOf(schema) {
8278
+ return { ...toJSONSchema(schema, {
8279
+ unrepresentable: "any",
8280
+ io: "input"
8281
+ }) };
8282
+ }
8283
+ function isRecordLike(value) {
8284
+ return typeof value === "object" && value !== null && !Array.isArray(value);
8285
+ }
8286
+ /** Does every branch of the body schema carry `field`? (A discriminated union has several.) */
8287
+ function hasNameField(json, field) {
8288
+ const branches = json["oneOf"] ?? json["anyOf"];
8289
+ if (Array.isArray(branches)) return branches.length > 0 && branches.every((b) => isRecordLike(b) && hasNameField(b, field));
8290
+ const properties = json["properties"];
8291
+ return isRecordLike(properties) && Object.prototype.hasOwnProperty.call(properties, field);
8292
+ }
8293
+ /**
8294
+ * Declare the kinds of a package. The keys are the kind names. The result is
8295
+ * what `ctx.records.declare` sends to the engine and what `ctx.records.kind`
8296
+ * types its handle from.
8297
+ */
8298
+ function defineRecordKinds(specs) {
8299
+ const out = {};
8300
+ for (const [name, spec] of Object.entries(specs)) {
8301
+ const secretPaths = collectZodSecretPaths(spec.schema);
8302
+ const nameField = spec.entry?.nameField ?? "name";
8303
+ const fields = bodyFieldsOf(spec.schema);
8304
+ if (spec.entry !== void 0 && !hasNameField(fields, nameField)) throw new DeclarationRefusedError(`kind "${name}": an entry kind's schema needs a "${nameField}" field`);
8305
+ const parsed = RecordKindDeclarationSchema.parse({
8306
+ database: spec.database,
8307
+ class: spec.class,
8308
+ writeTrigger: spec.writeTrigger,
8309
+ device: spec.device,
8310
+ at: spec.at,
8311
+ indexes: spec.indexes === void 0 ? void 0 : [...spec.indexes],
8312
+ retention: spec.retention,
8313
+ deviceRemoval: spec.deviceRemoval,
8314
+ maxDataBytes: spec.maxDataBytes,
8315
+ secretPaths: [...secretPaths],
8316
+ secretArrayKeys: spec.secretArrayKeys === void 0 ? void 0 : { ...spec.secretArrayKeys },
8317
+ adoptsFrom: spec.adoptsFrom,
8318
+ transactFamily: spec.transactFamily,
8319
+ entry: spec.entry === void 0 ? void 0 : {
8320
+ title: spec.entry.title,
8321
+ nameField,
8322
+ fields
8323
+ }
8324
+ });
8325
+ assertValidDeclaration(name, parsed);
8326
+ out[name] = {
8327
+ name,
8328
+ schema: spec.schema,
8329
+ declaration: parsed
8330
+ };
8331
+ }
8332
+ return out;
8333
+ }
8057
8334
  /** Shared Zod schemas used across streaming capabilities. */
8058
8335
  var CamProfileSchema = _enum([
8059
8336
  "high",
@@ -8606,7 +8883,7 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8606
8883
  * can answer "may a rule actuate this?" without importing the schema barrel
8607
8884
  * (~144MB RSS per runner, D28).
8608
8885
  *
8609
- * Coverage: 88 device-scoped capabilities.
8886
+ * Coverage: 90 device-scoped capabilities.
8610
8887
  */
8611
8888
  var DEVICE_SCOPED_CAPS = new Set([
8612
8889
  "accessories",
@@ -8639,6 +8916,7 @@ var DEVICE_SCOPED_CAPS = new Set([
8639
8916
  "device-extension",
8640
8917
  "device-ops",
8641
8918
  "device-status",
8919
+ "dishwasher",
8642
8920
  "doorbell",
8643
8921
  "enum-sensor",
8644
8922
  "event-emitter",
@@ -8646,6 +8924,7 @@ var DEVICE_SCOPED_CAPS = new Set([
8646
8924
  "feature-probe",
8647
8925
  "flood",
8648
8926
  "gas",
8927
+ "heating-valve",
8649
8928
  "humidifier",
8650
8929
  "humidity-sensor",
8651
8930
  "image",
@@ -8742,7 +9021,7 @@ function sleep(ms) {
8742
9021
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
8743
9022
  }
8744
9023
  //#endregion
8745
- //#region ../types/dist/err-msg--2RrYiLO.mjs
9024
+ //#region ../types/dist/err-msg-BXKzRBwg.mjs
8746
9025
  var DeviceType = /* @__PURE__ */ function(DeviceType) {
8747
9026
  DeviceType["Camera"] = "camera";
8748
9027
  DeviceType["Hub"] = "hub";
@@ -8834,6 +9113,10 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
8834
9113
  * native PetKit (`nodepetkit` `FeederDevice`), reusable by other feeder
8835
9114
  * integrations sharing the same food/desiccant/hopper surface. */
8836
9115
  DeviceType["PetFeeder"] = "pet-feeder";
9116
+ /** Built-in dishwasher — program lifecycle, door / remote-start gates,
9117
+ * salt and rinse-aid levels. Installed with the `dishwasher` cap.
9118
+ * Sources: native Bosch Home Connect, reusable by similar integrations. */
9119
+ DeviceType["Dishwasher"] = "dishwasher";
8837
9120
  return DeviceType;
8838
9121
  }({});
8839
9122
  var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
@@ -9091,7 +9374,7 @@ function errMsg(err) {
9091
9374
  return String(err);
9092
9375
  }
9093
9376
  //#endregion
9094
- //#region ../types/dist/composition-DOwQB_Ua.mjs
9377
+ //#region ../types/dist/composition-CB6PMT9p.mjs
9095
9378
  /**
9096
9379
  * Deterministic SHA-256 hash of an arbitrary serialisable value. The
9097
9380
  * canonical form sorts object keys alphabetically at every depth so two
@@ -14381,8 +14664,13 @@ var AlertSeveritySchema = _enum([
14381
14664
  "info",
14382
14665
  "success",
14383
14666
  "warning",
14384
- "error"
14667
+ "error",
14668
+ "critical"
14385
14669
  ]);
14670
+ var AlertActionSchema = object({
14671
+ label: string(),
14672
+ href: string().optional()
14673
+ });
14386
14674
  var AlertStatusSchema = _enum([
14387
14675
  "active",
14388
14676
  "in-progress",
@@ -14400,6 +14688,7 @@ var AlertSchema = object({
14400
14688
  severity: AlertSeveritySchema,
14401
14689
  title: string(),
14402
14690
  message: string(),
14691
+ action: AlertActionSchema.optional(),
14403
14692
  status: AlertStatusSchema,
14404
14693
  progress: number().optional(),
14405
14694
  read: boolean(),
@@ -17741,13 +18030,23 @@ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: arr
17741
18030
  }), RecordQueryResultSchema, { auth: "admin" }), method(object({
17742
18031
  owner: string().min(1),
17743
18032
  kind: RecordKindNameSchema,
17744
- records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX),
18033
+ records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
17745
18034
  /** The LAST batch: the copy is complete, the boot guard stops asking. */
17746
18035
  complete: boolean().optional()
17747
- }), object({ adopted: number().int() }), {
18036
+ }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
17748
18037
  kind: "mutation",
17749
18038
  auth: "admin"
17750
- });
18039
+ }), method(object({
18040
+ collection: string().min(1),
18041
+ cursor: string().optional(),
18042
+ limit: number().int().min(1).max(1e3).optional()
18043
+ }), object({
18044
+ rows: array(object({
18045
+ id: string(),
18046
+ data: record(string(), unknown())
18047
+ })),
18048
+ nextCursor: string().nullable()
18049
+ }), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
17751
18050
  /**
17752
18051
  * record-entries - the ONE admin surface for every list of user-created entries
17753
18052
  * (D881): notification targets, brokers, LLM profiles, anything an addon
@@ -44142,6 +44441,7 @@ var NcThrottleSchema = object({
44142
44441
  var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
44143
44442
  var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
44144
44443
  var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
44444
+ var NC_CONFIRM_DEFAULT_MAX_IMAGE_PX = 448;
44145
44445
  /** Comparison the model's COUNT must satisfy for the notification to fire. */
44146
44446
  var NcConfirmExpectSchema = object({
44147
44447
  op: _enum([
@@ -56914,7 +57214,8 @@ var batteryCapability = {
56914
57214
  DeviceType.Button,
56915
57215
  DeviceType.Switch,
56916
57216
  DeviceType.PetFeeder,
56917
- DeviceType.Container
57217
+ DeviceType.Container,
57218
+ DeviceType.Thermostat
56918
57219
  ],
56919
57220
  methods: {
56920
57221
  /**
@@ -58436,6 +58737,125 @@ onStatusChanged: { data: object({
58436
58737
  * whether persisting is worth a SQLite commit. */
58437
58738
  volatileStateFields: ["lastChangedAt"]
58438
58739
  };
58740
+ /**
58741
+ * Smart-dishwasher cap — program lifecycle, door / remote-start gates,
58742
+ * consumable levels (salt, rinse aid) and common program options.
58743
+ *
58744
+ * Sources: native Bosch Home Connect (`dishwasher` device type). Reusable
58745
+ * by any integration that exposes the same program / option surface.
58746
+ *
58747
+ * `kind: 'poll'` — cloud REST APIs typically have no push channel; the
58748
+ * provider refreshes the slice on an interval and eagerly after commands.
58749
+ */
58750
+ var DishwasherStateSchema = _enum([
58751
+ "idle",
58752
+ "running",
58753
+ "paused",
58754
+ "finished",
58755
+ "error",
58756
+ "unavailable"
58757
+ ]);
58758
+ var DishwasherConsumableLevelSchema = _enum([
58759
+ "ok",
58760
+ "low",
58761
+ "empty"
58762
+ ]);
58763
+ var DishwasherStatusSchema = object({
58764
+ state: DishwasherStateSchema,
58765
+ /** Active program id/name, or null when none selected / unknown. */
58766
+ program: string().nullable(),
58767
+ /** Program tokens the hardware accepts — drives the UI selector. */
58768
+ availablePrograms: array(string()),
58769
+ /** Minutes remaining on the active cycle, or null when not running. */
58770
+ remainingMinutes: number().int().nonnegative().nullable(),
58771
+ /** Cycle completion 0..100, or null when not applicable. */
58772
+ progressPercent: number().min(0).max(100).nullable(),
58773
+ /** True when the door is reported open. */
58774
+ doorOpen: boolean(),
58775
+ /** True when remote start is allowed (door closed, power on, etc.). */
58776
+ remoteStartAllowed: boolean(),
58777
+ /** Main power / switched-on state. */
58778
+ powerOn: boolean(),
58779
+ saltLevel: DishwasherConsumableLevelSchema.nullable(),
58780
+ rinseAidLevel: DishwasherConsumableLevelSchema.nullable(),
58781
+ halfLoad: boolean(),
58782
+ hygienePlus: boolean(),
58783
+ errorCode: number().nullable(),
58784
+ errorLabel: string().nullable(),
58785
+ lastFetchedAt: number()
58786
+ });
58787
+ var dishwasherCapability = {
58788
+ name: "dishwasher",
58789
+ scope: "device",
58790
+ deviceNative: true,
58791
+ mode: "singleton",
58792
+ deviceTypes: [DeviceType.Dishwasher],
58793
+ methods: {
58794
+ start: method(object({ deviceId: number().int().nonnegative() }), _void(), {
58795
+ kind: "mutation",
58796
+ auth: "protected"
58797
+ }),
58798
+ pause: method(object({ deviceId: number().int().nonnegative() }), _void(), {
58799
+ kind: "mutation",
58800
+ auth: "protected"
58801
+ }),
58802
+ stop: method(object({ deviceId: number().int().nonnegative() }), _void(), {
58803
+ kind: "mutation",
58804
+ auth: "protected"
58805
+ }),
58806
+ setProgram: method(object({
58807
+ deviceId: number().int().nonnegative(),
58808
+ program: string().min(1)
58809
+ }), _void(), {
58810
+ kind: "mutation",
58811
+ auth: "protected"
58812
+ }),
58813
+ setPower: method(object({
58814
+ deviceId: number().int().nonnegative(),
58815
+ on: boolean()
58816
+ }), _void(), {
58817
+ kind: "mutation",
58818
+ auth: "protected"
58819
+ }),
58820
+ setHalfLoad: method(object({
58821
+ deviceId: number().int().nonnegative(),
58822
+ on: boolean()
58823
+ }), _void(), {
58824
+ kind: "mutation",
58825
+ auth: "protected"
58826
+ }),
58827
+ setHygienePlus: method(object({
58828
+ deviceId: number().int().nonnegative(),
58829
+ on: boolean()
58830
+ }), _void(), {
58831
+ kind: "mutation",
58832
+ auth: "protected"
58833
+ }),
58834
+ setOption: method(object({
58835
+ deviceId: number().int().nonnegative(),
58836
+ key: string().min(1),
58837
+ value: union([
58838
+ boolean(),
58839
+ string(),
58840
+ number()
58841
+ ])
58842
+ }), _void(), {
58843
+ kind: "mutation",
58844
+ auth: "protected"
58845
+ })
58846
+ },
58847
+ status: {
58848
+ schema: DishwasherStatusSchema,
58849
+ kind: "poll"
58850
+ },
58851
+ runtimeState: DishwasherStatusSchema,
58852
+ durability: "session",
58853
+ history: { fields: { progressPercent: {
58854
+ kind: "gauge",
58855
+ unit: "%",
58856
+ deadband: 2
58857
+ } } }
58858
+ };
58439
58859
  var DoorbellStatusSchema = object({
58440
58860
  /** Ms epoch of the last press. null = never observed since this provider started. */
58441
58861
  lastPressedAt: number().nullable(),
@@ -59277,6 +59697,32 @@ var gasCapability = {
59277
59697
  * whether persisting is worth a SQLite commit. */
59278
59698
  volatileStateFields: ["lastChangedAt"]
59279
59699
  };
59700
+ var HeatingValveStatusSchema = object({
59701
+ /** Radiator valve opening 0 (closed) .. 100 (open). Null = not yet known. */
59702
+ position: number().min(0).max(100).nullable(),
59703
+ /** Ms epoch when the slice was last updated (push or poll). */
59704
+ lastFetchedAt: number()
59705
+ });
59706
+ var heatingValveCapability = {
59707
+ name: "heating-valve",
59708
+ scope: "device",
59709
+ deviceNative: true,
59710
+ mode: "singleton",
59711
+ deviceTypes: [DeviceType.Thermostat],
59712
+ methods: {},
59713
+ status: {
59714
+ schema: HeatingValveStatusSchema,
59715
+ kind: "push"
59716
+ },
59717
+ runtimeState: HeatingValveStatusSchema,
59718
+ durability: "session",
59719
+ history: { fields: { position: {
59720
+ kind: "gauge",
59721
+ unit: "%",
59722
+ deadband: 1
59723
+ } } },
59724
+ volatileStateFields: ["lastFetchedAt"]
59725
+ };
59280
59726
  /**
59281
59727
  * Humidifier / dehumidifier cap. Models HA `humidifier.*` entities —
59282
59728
  * an on/off actuator with an optional target-humidity setpoint and an
@@ -68880,6 +69326,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
68880
69326
  dayNight: dayNightCapability,
68881
69327
  deviceDiscovery: deviceDiscoveryCapability,
68882
69328
  deviceStatus: deviceStatusCapability,
69329
+ dishwasher: dishwasherCapability,
68883
69330
  doorbell: doorbellCapability,
68884
69331
  enumSensor: enumSensorCapability,
68885
69332
  eventEmitter: eventEmitterCapability,
@@ -68887,6 +69334,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
68887
69334
  featureProbe: featureProbeCapability,
68888
69335
  flood: floodCapability,
68889
69336
  gas: gasCapability,
69337
+ heatingValve: heatingValveCapability,
68890
69338
  humidifier: humidifierCapability,
68891
69339
  humiditySensor: humiditySensorCapability,
68892
69340
  image: imageCapability,
@@ -68972,13 +69420,14 @@ var BaseDevice = class {
68972
69420
  get state() {
68973
69421
  if (!this._stateProxyCache) {
68974
69422
  const cache = {};
68975
- const handler = { get: (_target, key) => {
69423
+ const handler = { get: (target, key) => {
68976
69424
  const k = key;
68977
- if (k in cache) return cache[k];
69425
+ const existing = Reflect.get(target, k);
69426
+ if (existing !== void 0) return existing;
68978
69427
  const cap = DEVICE_LOCAL_STATE_CAPS[k];
68979
69428
  if (!cap) return void 0;
68980
69429
  const proxy = this.sliceProxy(cap);
68981
- cache[k] = proxy;
69430
+ Reflect.set(target, k, proxy);
68982
69431
  return proxy;
68983
69432
  } };
68984
69433
  this._stateProxyCache = new Proxy(cache, handler);
@@ -69177,7 +69626,7 @@ var BaseDevice = class {
69177
69626
  async updateSourceInfo(patch) {
69178
69627
  const next = mergeSourceInfo(this.sourceInfo, patch);
69179
69628
  this._sourceInfoCache = Object.freeze({ ...next });
69180
- const action = this.ctx.api?.deviceManager?.setMetadata;
69629
+ const action = this.ctx.api.deviceManager?.setMetadata;
69181
69630
  if (action) try {
69182
69631
  await action.mutate({
69183
69632
  deviceId: this.id,
@@ -69212,7 +69661,7 @@ var BaseDevice = class {
69212
69661
  * device boot on a meta refresh.
69213
69662
  */
69214
69663
  async refreshFeatures() {
69215
- const action = this.ctx.api?.deviceManager?.registerDevice;
69664
+ const action = this.ctx.api.deviceManager?.registerDevice;
69216
69665
  if (!action) return;
69217
69666
  try {
69218
69667
  await action.mutate({
@@ -69660,7 +70109,7 @@ var DeclaredDevices = class {
69660
70109
  return removed;
69661
70110
  }
69662
70111
  };
69663
- 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;
70112
+ 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;
69664
70113
  new Set(Object.values(DeviceType));
69665
70114
  Object.freeze({
69666
70115
  "accessories.getStatus": {
@@ -72081,6 +72530,60 @@ Object.freeze({
72081
72530
  addonId: null,
72082
72531
  access: "view"
72083
72532
  },
72533
+ "dishwasher.getStatus": {
72534
+ capName: "dishwasher",
72535
+ capScope: "device",
72536
+ addonId: null,
72537
+ access: "view"
72538
+ },
72539
+ "dishwasher.pause": {
72540
+ capName: "dishwasher",
72541
+ capScope: "device",
72542
+ addonId: null,
72543
+ access: "create"
72544
+ },
72545
+ "dishwasher.setHalfLoad": {
72546
+ capName: "dishwasher",
72547
+ capScope: "device",
72548
+ addonId: null,
72549
+ access: "create"
72550
+ },
72551
+ "dishwasher.setHygienePlus": {
72552
+ capName: "dishwasher",
72553
+ capScope: "device",
72554
+ addonId: null,
72555
+ access: "create"
72556
+ },
72557
+ "dishwasher.setOption": {
72558
+ capName: "dishwasher",
72559
+ capScope: "device",
72560
+ addonId: null,
72561
+ access: "create"
72562
+ },
72563
+ "dishwasher.setPower": {
72564
+ capName: "dishwasher",
72565
+ capScope: "device",
72566
+ addonId: null,
72567
+ access: "create"
72568
+ },
72569
+ "dishwasher.setProgram": {
72570
+ capName: "dishwasher",
72571
+ capScope: "device",
72572
+ addonId: null,
72573
+ access: "create"
72574
+ },
72575
+ "dishwasher.start": {
72576
+ capName: "dishwasher",
72577
+ capScope: "device",
72578
+ addonId: null,
72579
+ access: "create"
72580
+ },
72581
+ "dishwasher.stop": {
72582
+ capName: "dishwasher",
72583
+ capScope: "device",
72584
+ addonId: null,
72585
+ access: "create"
72586
+ },
72084
72587
  "doorbell.getStatus": {
72085
72588
  capName: "doorbell",
72086
72589
  capScope: "device",
@@ -72291,6 +72794,12 @@ Object.freeze({
72291
72794
  addonId: null,
72292
72795
  access: "view"
72293
72796
  },
72797
+ "heatingValve.getStatus": {
72798
+ capName: "heating-valve",
72799
+ capScope: "device",
72800
+ addonId: null,
72801
+ access: "view"
72802
+ },
72294
72803
  "humidifier.getStatus": {
72295
72804
  capName: "humidifier",
72296
72805
  capScope: "device",
@@ -76431,6 +76940,12 @@ Object.freeze({
76431
76940
  addonId: null,
76432
76941
  access: "delete"
76433
76942
  },
76943
+ "storageAdmin.isAdoptedLegacyTable": {
76944
+ capName: "storage-admin",
76945
+ capScope: "system",
76946
+ addonId: null,
76947
+ access: "view"
76948
+ },
76434
76949
  "storageAdmin.listKinds": {
76435
76950
  capName: "storage-admin",
76436
76951
  capScope: "system",
@@ -76443,6 +76958,12 @@ Object.freeze({
76443
76958
  addonId: null,
76444
76959
  access: "view"
76445
76960
  },
76961
+ "storageAdmin.readLegacyCollection": {
76962
+ capName: "storage-admin",
76963
+ capScope: "system",
76964
+ addonId: null,
76965
+ access: "view"
76966
+ },
76446
76967
  "storageAdmin.readRecords": {
76447
76968
  capName: "storage-admin",
76448
76969
  capScope: "system",
@@ -77866,7 +78387,7 @@ Object.freeze({
77866
78387
  access: "create"
77867
78388
  }
77868
78389
  });
77869
- 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;
78390
+ 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;
77870
78391
  DeviceFeature.BatteryOperated;
77871
78392
  Object.freeze({
77872
78393
  "accessories.getStatus": [{
@@ -78690,6 +79211,51 @@ Object.freeze({
78690
79211
  form: "single",
78691
79212
  optional: false
78692
79213
  }],
79214
+ "dishwasher.getStatus": [{
79215
+ name: "deviceId",
79216
+ form: "single",
79217
+ optional: false
79218
+ }],
79219
+ "dishwasher.pause": [{
79220
+ name: "deviceId",
79221
+ form: "single",
79222
+ optional: false
79223
+ }],
79224
+ "dishwasher.setHalfLoad": [{
79225
+ name: "deviceId",
79226
+ form: "single",
79227
+ optional: false
79228
+ }],
79229
+ "dishwasher.setHygienePlus": [{
79230
+ name: "deviceId",
79231
+ form: "single",
79232
+ optional: false
79233
+ }],
79234
+ "dishwasher.setOption": [{
79235
+ name: "deviceId",
79236
+ form: "single",
79237
+ optional: false
79238
+ }],
79239
+ "dishwasher.setPower": [{
79240
+ name: "deviceId",
79241
+ form: "single",
79242
+ optional: false
79243
+ }],
79244
+ "dishwasher.setProgram": [{
79245
+ name: "deviceId",
79246
+ form: "single",
79247
+ optional: false
79248
+ }],
79249
+ "dishwasher.start": [{
79250
+ name: "deviceId",
79251
+ form: "single",
79252
+ optional: false
79253
+ }],
79254
+ "dishwasher.stop": [{
79255
+ name: "deviceId",
79256
+ form: "single",
79257
+ optional: false
79258
+ }],
78693
79259
  "doorbell.getStatus": [{
78694
79260
  name: "deviceId",
78695
79261
  form: "single",
@@ -78759,6 +79325,11 @@ Object.freeze({
78759
79325
  form: "single",
78760
79326
  optional: false
78761
79327
  }],
79328
+ "heatingValve.getStatus": [{
79329
+ name: "deviceId",
79330
+ form: "single",
79331
+ optional: false
79332
+ }],
78762
79333
  "humidifier.getStatus": [{
78763
79334
  name: "deviceId",
78764
79335
  form: "single",
@@ -80582,6 +81153,103 @@ Object.freeze({
80582
81153
  "network-access": "ingress",
80583
81154
  "smtp-provider": "email"
80584
81155
  });
81156
+ /** Width of a bucket the history store accepts. */
81157
+ var HISTORY_BUCKET_MS = 5 * 6e4;
81158
+ function bucketStartOf(at) {
81159
+ return Math.floor(at / HISTORY_BUCKET_MS) * HISTORY_BUCKET_MS;
81160
+ }
81161
+ function subjectId(subject) {
81162
+ return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
81163
+ }
81164
+ function seriesIdentity(key, subject, scope) {
81165
+ return `${key}\u0000${subjectId(subject)}\u0000${scope}`;
81166
+ }
81167
+ function toClosed(b) {
81168
+ return {
81169
+ key: b.key,
81170
+ subject: b.subject,
81171
+ scope: b.scope,
81172
+ bucketStart: b.bucketStart,
81173
+ samples: b.samples,
81174
+ sum: b.sum,
81175
+ min: b.min,
81176
+ max: b.max,
81177
+ last: b.last,
81178
+ lastTs: b.lastTs
81179
+ };
81180
+ }
81181
+ var BucketAccumulator = class {
81182
+ open = /* @__PURE__ */ new Map();
81183
+ requeued = /* @__PURE__ */ new Map();
81184
+ /** Add one observation. A non-finite value or timestamp is ignored (never counted as 0). */
81185
+ note(key, subject, scope, value, at) {
81186
+ if (!Number.isFinite(value) || !Number.isFinite(at)) return;
81187
+ const bucketStart = bucketStartOf(at);
81188
+ const id = `${seriesIdentity(key, subject, scope)}\u0000${bucketStart}`;
81189
+ const existing = this.open.get(id);
81190
+ if (existing === void 0) {
81191
+ this.open.set(id, {
81192
+ key,
81193
+ subject,
81194
+ scope,
81195
+ bucketStart,
81196
+ samples: 1,
81197
+ sum: value,
81198
+ min: value,
81199
+ max: value,
81200
+ last: value,
81201
+ lastTs: at
81202
+ });
81203
+ return;
81204
+ }
81205
+ existing.samples += 1;
81206
+ existing.sum += value;
81207
+ if (value < existing.min) existing.min = value;
81208
+ if (value > existing.max) existing.max = value;
81209
+ if (at >= existing.lastTs) {
81210
+ existing.last = value;
81211
+ existing.lastTs = at;
81212
+ }
81213
+ }
81214
+ /**
81215
+ * Buckets whose window ended at or before `now`, oldest first, requeued ones
81216
+ * included. They leave the accumulator: delivery is the caller's.
81217
+ */
81218
+ takeClosed(now) {
81219
+ const out = [];
81220
+ for (const [id, bucket] of this.open) if (bucket.bucketStart + 3e5 <= now) {
81221
+ out.push(toClosed(bucket));
81222
+ this.open.delete(id);
81223
+ }
81224
+ for (const list of this.requeued.values()) out.push(...list);
81225
+ this.requeued.clear();
81226
+ return out.toSorted((a, b) => a.bucketStart - b.bucketStart);
81227
+ }
81228
+ /**
81229
+ * Put undelivered buckets back for the next `takeClosed`. Keeps the newest
81230
+ * {@link MAX_REQUEUED_BUCKETS_PER_SERIES} per series and returns the buckets
81231
+ * it dropped (empty when none).
81232
+ */
81233
+ requeue(buckets) {
81234
+ const dropped = [];
81235
+ for (const bucket of buckets) {
81236
+ const id = seriesIdentity(bucket.key, bucket.subject, bucket.scope);
81237
+ const list = [...this.requeued.get(id) ?? [], bucket].toSorted((a, b) => a.bucketStart - b.bucketStart);
81238
+ while (list.length > 12) {
81239
+ const oldest = list.shift();
81240
+ if (oldest !== void 0) dropped.push(oldest);
81241
+ }
81242
+ this.requeued.set(id, list);
81243
+ }
81244
+ return dropped;
81245
+ }
81246
+ /** Buckets currently held (open plus requeued) — for a gauge in the producer's own status. */
81247
+ pendingBucketCount() {
81248
+ let n = this.open.size;
81249
+ for (const list of this.requeued.values()) n += list.length;
81250
+ return n;
81251
+ }
81252
+ };
80585
81253
  DeviceType.Camera;
80586
81254
  var G711_SCALE_CORRECTION_DB = {
80587
81255
  PCMU: 20 * Math.log10(4),
@@ -84745,6 +85413,12 @@ Object.defineProperty(exports, "BirthDecisionRecordSchema", {
84745
85413
  return BirthDecisionRecordSchema;
84746
85414
  }
84747
85415
  });
85416
+ Object.defineProperty(exports, "BucketAccumulator", {
85417
+ enumerable: true,
85418
+ get: function() {
85419
+ return BucketAccumulator;
85420
+ }
85421
+ });
84748
85422
  Object.defineProperty(exports, "CLIP_EMBEDDING_STEP_ID", {
84749
85423
  enumerable: true,
84750
85424
  get: function() {
@@ -85087,6 +85761,18 @@ Object.defineProperty(exports, "NC_CONDITION_CATALOG", {
85087
85761
  return NC_CONDITION_CATALOG;
85088
85762
  }
85089
85763
  });
85764
+ Object.defineProperty(exports, "NC_CONFIRM_DEFAULT_MAX_IMAGE_PX", {
85765
+ enumerable: true,
85766
+ get: function() {
85767
+ return NC_CONFIRM_DEFAULT_MAX_IMAGE_PX;
85768
+ }
85769
+ });
85770
+ Object.defineProperty(exports, "NC_CONFIRM_DEFAULT_TIMEOUT_MS", {
85771
+ enumerable: true,
85772
+ get: function() {
85773
+ return NC_CONFIRM_DEFAULT_TIMEOUT_MS;
85774
+ }
85775
+ });
85090
85776
  Object.defineProperty(exports, "NC_CONSUMABLE_LOW_PERCENT_DEFAULT", {
85091
85777
  enumerable: true,
85092
85778
  get: function() {
@@ -85345,6 +86031,12 @@ Object.defineProperty(exports, "RECORDING_SOURCE_CAMSTACK_ADDON", {
85345
86031
  return RECORDING_SOURCE_CAMSTACK_ADDON;
85346
86032
  }
85347
86033
  });
86034
+ Object.defineProperty(exports, "RECORD_MAX_DATA_BYTES", {
86035
+ enumerable: true,
86036
+ get: function() {
86037
+ return RECORD_MAX_DATA_BYTES;
86038
+ }
86039
+ });
85348
86040
  Object.defineProperty(exports, "RebuildObjectEmbeddingsRefusalSchema", {
85349
86041
  enumerable: true,
85350
86042
  get: function() {
@@ -85693,6 +86385,12 @@ Object.defineProperty(exports, "defineCustomActions", {
85693
86385
  return defineCustomActions;
85694
86386
  }
85695
86387
  });
86388
+ Object.defineProperty(exports, "defineRecordKinds", {
86389
+ enumerable: true,
86390
+ get: function() {
86391
+ return defineRecordKinds;
86392
+ }
86393
+ });
85696
86394
  Object.defineProperty(exports, "deleteAlarmProfile", {
85697
86395
  enumerable: true,
85698
86396
  get: function() {