@camstack/addon-post-analysis 1.2.373 → 1.2.601

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-jeFu3pma.mjs → clip-model-registry-BuM8eXlN.mjs} +1004 -117
  2. package/dist/{clip-model-registry-Cy2RokDO.js → clip-model-registry-DAZ9ie-f.js} +1027 -116
  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-ujfvEENv.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_pipeline_analytics_widgets-DAs_96VP.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-CElkWYPg.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-SRvLcL_J.mjs +26 -0
  9. package/dist/pipeline-analytics/{hostInit-Ddz0CyLk.mjs → hostInit-C3wjY7W8.mjs} +3 -3
  10. package/dist/pipeline-analytics/index.js +79652 -79203
  11. package/dist/pipeline-analytics/index.mjs +79072 -78623
  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-CyYkqCmx.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-Kh1uHJki.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-bgZLodYc.mjs
5637
+ //#region ../types/dist/sleep-bZIhUvjd.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$2(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$2(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$2(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$1(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$1(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$1) : [];
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$1(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$1(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$1(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$1(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(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(item) && isRecord(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(value) && isRecord(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(incoming) || !isRecord(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(a) && isRecord(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(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) } });
@@ -7908,6 +8034,303 @@ var PeerBytesTicketSchema = object({
7908
8034
  */
7909
8035
  declaredBytes: number().int().nonnegative().nullable()
7910
8036
  });
8037
+ /** Limits and names of `ctx.records` (D881). One authority; the engine and the facade read it. */
8038
+ /** The files a kind may live in. `history` is device-history's (D850), never records. */
8039
+ var RECORD_DATABASES = ["settings", "events"];
8040
+ /** The classes of a kind: the `@durable` vocabulary, one authority (replaces the annotation). */
8041
+ var RECORD_CLASSES = [
8042
+ "config",
8043
+ "ledger",
8044
+ "audit",
8045
+ "mirror",
8046
+ "ephemeral"
8047
+ ];
8048
+ var RECORD_DEFAULT_MAX_DATA_BYTES = 64 * 1024;
8049
+ var RECORD_MAX_DATA_BYTES = 1024 * 1024;
8050
+ var RECORD_BATCH_MAX = 1e3;
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
+ };
8079
+ function defOf(schema) {
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;
8085
+ }
8086
+ function declaredHere(schema) {
8087
+ return globalRegistry.get(schema)?.secret === true;
8088
+ }
8089
+ /** Wrapper kinds whose `innerType` is the field itself. */
8090
+ var WRAPPERS = new Set([
8091
+ "optional",
8092
+ "nullable",
8093
+ "default",
8094
+ "prefault",
8095
+ "catch",
8096
+ "readonly",
8097
+ "nonoptional"
8098
+ ]);
8099
+ /**
8100
+ * The schema layers that make up ONE field: the schema itself and every
8101
+ * wrapper below it (optional / default / nullable / readonly / catch), plus
8102
+ * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
8103
+ * `.transform` on `in`).
8104
+ */
8105
+ function layersOf(schema) {
8106
+ const out = [];
8107
+ const queue = [schema];
8108
+ while (queue.length > 0) {
8109
+ const s = queue.shift();
8110
+ if (!s || out.includes(s)) continue;
8111
+ out.push(s);
8112
+ const def = defOf(s);
8113
+ if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
8114
+ if (def.type === "pipe") {
8115
+ if (def.in) queue.push(def.in);
8116
+ if (def.out) queue.push(def.out);
8117
+ }
8118
+ }
8119
+ return out;
8120
+ }
8121
+ /** True when any layer of this field declares `.meta({ secret: true })`. */
8122
+ function isZodSecret(schema) {
8123
+ return layersOf(schema).some(declaredHere);
8124
+ }
8125
+ /**
8126
+ * Every declared secret path in a config schema: dotted keys, `[]` for "each
8127
+ * element of this array" (`connection.password`, `rows[].token`). A declared
8128
+ * object or array is reported as one path and not descended into — everything
8129
+ * under it is secret.
8130
+ */
8131
+ function collectZodSecretPaths(schema, prefix = "") {
8132
+ if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
8133
+ const paths = [];
8134
+ for (const layer of layersOf(schema)) {
8135
+ const def = defOf(layer);
8136
+ if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
8137
+ else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
8138
+ else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
8139
+ else if (def.type === "intersection") {
8140
+ if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
8141
+ if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
8142
+ }
8143
+ }
8144
+ return [...new Set(paths)];
8145
+ }
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
+ /**
8183
+ * Record kinds (D881): the declaration an addon makes of one kind of fact, the
8184
+ * Zod row schema that describes it, and the helper that turns the two into the
8185
+ * JSON the engine stores.
8186
+ *
8187
+ * A kind is declared ONCE, next to the code that owns it, and the engine's
8188
+ * reconciler creates its indexes - nothing creates DDL at runtime from a write.
8189
+ * Everything the generic machinery needs (secret fields, the entry descriptor)
8190
+ * is DERIVED from the Zod schema: `.meta({ secret: true })` marks a credential,
8191
+ * never a field name (D879).
8192
+ */
8193
+ /** A JSON field path: `trackId`, `auth.accessToken`. Charset-restricted: it is rendered into DDL. */
8194
+ var RecordFieldPathSchema = string().regex(/^[A-Za-z_][A-Za-z0-9_]{0,63}(\.[A-Za-z_][A-Za-z0-9_]{0,63}){0,3}$/);
8195
+ var RecordIndexSchema = object({
8196
+ name: string().regex(/^[a-z][a-z0-9_]{0,31}$/),
8197
+ fields: array(RecordFieldPathSchema).min(1).max(4),
8198
+ unique: boolean().optional()
8199
+ }).strict();
8200
+ var RecordRetentionSchema = union([
8201
+ object({
8202
+ ttlMs: number().int().positive(),
8203
+ from: _enum(["at", "write"])
8204
+ }).strict(),
8205
+ object({
8206
+ maxRows: number().int().positive().optional(),
8207
+ maxRowsPerDevice: number().int().positive().optional()
8208
+ }).strict().refine((r) => r.maxRows !== void 0 || r.maxRowsPerDevice !== void 0, { message: "name maxRows, maxRowsPerDevice or both" }),
8209
+ object({
8210
+ owner: string().min(1),
8211
+ reason: string().min(1)
8212
+ }).strict(),
8213
+ object({ none: string().min(1) }).strict()
8214
+ ]);
8215
+ /** The descriptor a generic entries UI reads (D881 "generic entries"). */
8216
+ var EntryDescriptorSchema = object({
8217
+ title: string().min(1),
8218
+ /** The record body field shown as the entry's name. */
8219
+ nameField: string().min(1),
8220
+ /** JSON Schema of the entry body; `secret: true` marks a password field. */
8221
+ fields: record(string(), unknown())
8222
+ }).strict();
8223
+ /** What crosses the wire and sits in the engine's catalog: JSON only, no Zod. */
8224
+ var RecordKindDeclarationSchema = object({
8225
+ database: _enum(RECORD_DATABASES).default("settings"),
8226
+ class: _enum(RECORD_CLASSES),
8227
+ writeTrigger: string().min(1),
8228
+ device: _enum([
8229
+ "required",
8230
+ "optional",
8231
+ "none"
8232
+ ]).default("none"),
8233
+ at: _enum(["required", "none"]).default("none"),
8234
+ indexes: array(RecordIndexSchema).max(8).default([]),
8235
+ retention: RecordRetentionSchema,
8236
+ deviceRemoval: _enum(["delete", "none"]).default("none"),
8237
+ maxDataBytes: number().int().positive().max(RECORD_MAX_DATA_BYTES).default(RECORD_DEFAULT_MAX_DATA_BYTES),
8238
+ /** Derived from the Zod schema; never written by hand. */
8239
+ secretPaths: array(string().min(1)).default([]),
8240
+ /** The id key of each array that carries a secret (`{ headers: 'name' }`). */
8241
+ secretArrayKeys: record(string(), string()).default({}),
8242
+ /** The legacy table this kind adopts from; the boot guard reads it (D853: no migration code). */
8243
+ adoptsFrom: string().min(1).optional(),
8244
+ /** Kinds that must agree through `transact` sit in one file under one family name. */
8245
+ transactFamily: string().min(1).optional(),
8246
+ entry: EntryDescriptorSchema.optional()
8247
+ }).strict();
8248
+ /** The kind names: lower-case, dash separated, short enough for an index name. */
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
+ }
7911
8334
  /** Shared Zod schemas used across streaming capabilities. */
7912
8335
  var CamProfileSchema = _enum([
7913
8336
  "high",
@@ -8453,69 +8876,6 @@ method(object({ deviceId: number() }), array(StreamSourceEntrySchema)), method(o
8453
8876
  kind: "mutation",
8454
8877
  auth: "admin"
8455
8878
  }), method(object({ deviceId: number() }), unknown().nullable()), method(object({ deviceId: number() }), RawStateResultSchema.nullable(), { auth: "protected" });
8456
- function defOf(schema) {
8457
- return schema._zod?.def ?? {};
8458
- }
8459
- function declaredHere(schema) {
8460
- return globalRegistry.get(schema)?.secret === true;
8461
- }
8462
- /** Wrapper kinds whose `innerType` is the field itself. */
8463
- var WRAPPERS = new Set([
8464
- "optional",
8465
- "nullable",
8466
- "default",
8467
- "prefault",
8468
- "catch",
8469
- "readonly",
8470
- "nonoptional"
8471
- ]);
8472
- /**
8473
- * The schema layers that make up ONE field: the schema itself and every
8474
- * wrapper below it (optional / default / nullable / readonly / catch), plus
8475
- * both sides of a pipe (`z.preprocess` puts the real schema on `out`,
8476
- * `.transform` on `in`).
8477
- */
8478
- function layersOf(schema) {
8479
- const out = [];
8480
- const queue = [schema];
8481
- while (queue.length > 0) {
8482
- const s = queue.shift();
8483
- if (!s || out.includes(s)) continue;
8484
- out.push(s);
8485
- const def = defOf(s);
8486
- if (def.type !== void 0 && WRAPPERS.has(def.type) && def.innerType) queue.push(def.innerType);
8487
- if (def.type === "pipe") {
8488
- if (def.in) queue.push(def.in);
8489
- if (def.out) queue.push(def.out);
8490
- }
8491
- }
8492
- return out;
8493
- }
8494
- /** True when any layer of this field declares `.meta({ secret: true })`. */
8495
- function isZodSecret(schema) {
8496
- return layersOf(schema).some(declaredHere);
8497
- }
8498
- /**
8499
- * Every declared secret path in a config schema: dotted keys, `[]` for "each
8500
- * element of this array" (`connection.password`, `rows[].token`). A declared
8501
- * object or array is reported as one path and not descended into — everything
8502
- * under it is secret.
8503
- */
8504
- function collectZodSecretPaths(schema, prefix = "") {
8505
- if (isZodSecret(schema)) return prefix.length > 0 ? [prefix] : [];
8506
- const paths = [];
8507
- for (const layer of layersOf(schema)) {
8508
- const def = defOf(layer);
8509
- if (def.type === "object" && def.shape) for (const [key, child] of Object.entries(def.shape)) paths.push(...collectZodSecretPaths(child, prefix ? `${prefix}.${key}` : key));
8510
- else if (def.type === "array" && def.element) paths.push(...collectZodSecretPaths(def.element, `${prefix}[]`));
8511
- else if (def.type === "union" && def.options) for (const option of def.options) paths.push(...collectZodSecretPaths(option, prefix));
8512
- else if (def.type === "intersection") {
8513
- if (def.left) paths.push(...collectZodSecretPaths(def.left, prefix));
8514
- if (def.right) paths.push(...collectZodSecretPaths(def.right, prefix));
8515
- }
8516
- }
8517
- return [...new Set(paths)];
8518
- }
8519
8879
  /**
8520
8880
  * AUTO-GENERATED by scripts/generate-device-scoped-caps.ts — DO NOT EDIT.
8521
8881
  *
@@ -16856,6 +17216,41 @@ var ComposableCapabilitiesSchema = object({ caps: array(object({
16856
17216
  keyField: string()
16857
17217
  }).optional()
16858
17218
  })) });
17219
+ /**
17220
+ * The report of a one-shot "move this owner's plaintext secrets into the
17221
+ * keychain" run (D878). COUNTS only - never a value, never a ref.
17222
+ *
17223
+ * The owner runs it on its own rows, through its own write path; an operator
17224
+ * script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
17225
+ * Dry run (`apply: false`) reports what WOULD move and changes nothing.
17226
+ */
17227
+ var RawSecretMigrationInputSchema = object({
17228
+ /** `false` (the default of the script) = report only. */
17229
+ apply: boolean() });
17230
+ var RawSecretMigrationReportSchema = object({
17231
+ apply: boolean(),
17232
+ /** Rows that can carry a secret (a profile, an enrolment). */
17233
+ rows: number().int(),
17234
+ /** Rows whose secret was plaintext when the run started. */
17235
+ raw: number().int(),
17236
+ /** Rows that already held a keychain marker when the run started. */
17237
+ markers: number().int(),
17238
+ /** Plaintext rows moved by THIS run (always 0 on a dry run). */
17239
+ migrated: number().int(),
17240
+ /** Plaintext rows left in place because the move or its read-back failed. */
17241
+ failed: number().int(),
17242
+ /** After the run: rows still holding plaintext. */
17243
+ remainingRaw: number().int(),
17244
+ /** After the run: markers the keychain could not resolve right now. */
17245
+ unresolvedMarkers: number().int(),
17246
+ /**
17247
+ * A second, redundant copy of the secrets' rows that the run found (and, on
17248
+ * `apply`, deleted after verifying the first). Owners with a single copy omit it.
17249
+ */
17250
+ redundantCopies: number().int().optional(),
17251
+ /** True when nothing is raw and every marker resolves. */
17252
+ verified: boolean()
17253
+ });
16859
17254
  /** The block id behind a generated addon/runner id, or null when the id belongs
16860
17255
  * to something else. The inverse of {@link coreBlockAddonId}. */
16861
17256
  function coreBlockIdFromAddonId(addonId) {
@@ -17089,6 +17484,9 @@ method(object({}), object({ blocks: array(CoreBlockSchema) }), { auth: "admin" }
17089
17484
  }), SettingsUpdateResultSchema, {
17090
17485
  kind: "mutation",
17091
17486
  auth: "admin"
17487
+ }), method(RawSecretMigrationInputSchema, RawSecretMigrationReportSchema, {
17488
+ kind: "mutation",
17489
+ auth: "admin"
17092
17490
  }), method(object({}), object({ libs: array(object({
17093
17491
  filePath: string(),
17094
17492
  content: string()
@@ -17351,6 +17749,222 @@ id: union([string(), number()]) }), {
17351
17749
  kind: "mutation",
17352
17750
  auth: "admin"
17353
17751
  });
17752
+ /**
17753
+ * records - an addon's own facts and documents (D881): ledgers, audit rows,
17754
+ * config documents, mirrors. The third storage API next to `ctx.settings`
17755
+ * (operator intent, D870) and device-history (numbers over time, D850).
17756
+ *
17757
+ * Who the OWNER is: `callerAddonId`, stamped by the transport on a call that
17758
+ * crossed a process and stated by a hub in-process caller (`ctx.records` does
17759
+ * that with the addon id closed over). It is deliberately NOT in any input
17760
+ * schema, so a session can never supply it, and a call with no stamp is refused
17761
+ * `records/no-caller`. A kind is readable and writable only by its owner; other
17762
+ * addons go through the owner's capability.
17763
+ *
17764
+ * Every read is three-way: a row, `null`, or the call THROWS. A failed read is
17765
+ * never `[]`. Secret fields are never on the wire: a read shows the
17766
+ * redaction token, `secretRefs` hands the owner's `ctx.secrets` the refs it
17767
+ * resolves itself, and a write may carry only a keychain marker bound to the
17768
+ * row's own ref.
17769
+ *
17770
+ * Internal: addons reach it through `ctx.records`, never directly.
17771
+ */
17772
+ var RecordIdSchema = string().min(1).max(256);
17773
+ /** A JSON object body. Size is the engine's check (`maxDataBytes`), not a schema's. */
17774
+ var RecordBodySchema = record(string(), unknown());
17775
+ var RecordInputSchema = object({
17776
+ id: RecordIdSchema,
17777
+ /** The device this row belongs to (D865 removal, per-device reads). */
17778
+ deviceId: number().int().optional(),
17779
+ /** The domain clock, ms: observed / created / opened. */
17780
+ at: number().int().optional(),
17781
+ /** Producer-set expiry, ms. Refused on a kind whose retention is an engine TTL. */
17782
+ expiresAt: number().int().optional(),
17783
+ data: RecordBodySchema
17784
+ });
17785
+ var RecordViewSchema = object({
17786
+ id: string(),
17787
+ deviceId: number().int().nullable(),
17788
+ at: number().nullable(),
17789
+ expiresAt: number().nullable(),
17790
+ rev: number().int(),
17791
+ updatedAt: number(),
17792
+ data: RecordBodySchema
17793
+ });
17794
+ /** Declared index fields only. Anything else does not compile, by design. */
17795
+ var RecordWhereSchema = record(RecordFieldPathSchema, union([
17796
+ string(),
17797
+ number(),
17798
+ boolean(),
17799
+ object({ in: array(union([
17800
+ string(),
17801
+ number(),
17802
+ boolean()
17803
+ ])).min(1).max(RECORD_BATCH_MAX) }),
17804
+ object({
17805
+ gt: union([string(), number()]).optional(),
17806
+ gte: union([string(), number()]).optional(),
17807
+ lt: union([string(), number()]).optional(),
17808
+ lte: union([string(), number()]).optional()
17809
+ }).refine((r) => Object.keys(r).length > 0, { message: "name at least one bound" })
17810
+ ]));
17811
+ var KindShape = { kind: RecordKindNameSchema };
17812
+ var TimeWindowShape = {
17813
+ deviceId: number().int().optional(),
17814
+ atFrom: number().optional(),
17815
+ atTo: number().optional()
17816
+ };
17817
+ var RecordQueryInputSchema = object({
17818
+ ...KindShape,
17819
+ ...TimeWindowShape,
17820
+ where: RecordWhereSchema.optional(),
17821
+ /** Without `where`: `at` (default for a kind with a clock) or `id`. With `where` the order is the index's. */
17822
+ order: _enum(["at", "id"]).optional(),
17823
+ desc: boolean().optional(),
17824
+ limit: number().int().min(1).max(RECORD_QUERY_MAX).default(100),
17825
+ /** Opaque keyset cursor from a previous answer. There is no offset. */
17826
+ cursor: string().min(1).optional()
17827
+ });
17828
+ var RecordQueryResultSchema = object({
17829
+ records: array(RecordViewSchema),
17830
+ nextCursor: string().nullable()
17831
+ });
17832
+ var RecordKindStateSchema = _enum([
17833
+ "created",
17834
+ "unchanged",
17835
+ "updated"
17836
+ ]);
17837
+ var DeclareKindResultSchema = object({
17838
+ kindId: number().int(),
17839
+ state: RecordKindStateSchema,
17840
+ createdIndexes: array(string()),
17841
+ /** The boot guard: the kind is empty while its legacy table still holds rows. */
17842
+ adoptionPending: object({
17843
+ legacyTable: string(),
17844
+ legacyRows: number().int()
17845
+ }).nullable()
17846
+ });
17847
+ /** Keychain refs a write released (the old marker is gone from the row): the owner deletes the values. */
17848
+ var SecretRefsList = array(string());
17849
+ var RecordSecretRefsSchema = record(string(), record(string(), string()));
17850
+ method(object({ kinds: record(RecordKindNameSchema, RecordKindDeclarationSchema) }), object({ kinds: record(string(), DeclareKindResultSchema) }), {
17851
+ kind: "mutation",
17852
+ auth: "admin"
17853
+ }), method(object({
17854
+ ...KindShape,
17855
+ id: RecordIdSchema
17856
+ }), RecordViewSchema.nullable(), { auth: "admin" }), method(object({
17857
+ ...KindShape,
17858
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
17859
+ }), array(RecordViewSchema), { auth: "admin" }), method(object({
17860
+ ...KindShape,
17861
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
17862
+ }), RecordSecretRefsSchema, { auth: "admin" }), method(object({
17863
+ ...KindShape,
17864
+ record: RecordInputSchema,
17865
+ /** Compare-and-set. `0` means "the row must not exist". */
17866
+ ifRev: number().int().min(0).optional()
17867
+ }), object({
17868
+ rev: number().int(),
17869
+ releasedRefs: SecretRefsList
17870
+ }), {
17871
+ kind: "mutation",
17872
+ auth: "admin"
17873
+ }), method(object({
17874
+ ...KindShape,
17875
+ records: array(RecordInputSchema).min(1).max(RECORD_BATCH_MAX)
17876
+ }), object({
17877
+ count: number().int(),
17878
+ releasedRefs: SecretRefsList
17879
+ }), {
17880
+ kind: "mutation",
17881
+ auth: "admin"
17882
+ }), method(object({
17883
+ ...KindShape,
17884
+ id: RecordIdSchema,
17885
+ data: RecordBodySchema,
17886
+ at: number().int().nullable().optional(),
17887
+ expiresAt: number().int().nullable().optional(),
17888
+ ifRev: number().int().min(1).optional()
17889
+ }), object({
17890
+ rev: number().int(),
17891
+ releasedRefs: SecretRefsList
17892
+ }), {
17893
+ kind: "mutation",
17894
+ auth: "admin"
17895
+ }), method(object({
17896
+ ...KindShape,
17897
+ id: RecordIdSchema
17898
+ }), object({
17899
+ deleted: boolean(),
17900
+ secretRefs: SecretRefsList
17901
+ }), {
17902
+ kind: "mutation",
17903
+ auth: "admin"
17904
+ }), method(object({
17905
+ ...KindShape,
17906
+ ids: array(RecordIdSchema).min(1).max(RECORD_BATCH_MAX)
17907
+ }), object({
17908
+ deleted: number().int(),
17909
+ secretRefs: SecretRefsList
17910
+ }), {
17911
+ kind: "mutation",
17912
+ auth: "admin"
17913
+ }), method(RecordQueryInputSchema, RecordQueryResultSchema, { auth: "admin" }), method(object({
17914
+ ...KindShape,
17915
+ ...TimeWindowShape,
17916
+ where: RecordWhereSchema.optional()
17917
+ }), object({ count: number().int() }), { auth: "admin" }), method(object({
17918
+ ...KindShape,
17919
+ deviceId: number().int().optional(),
17920
+ from: number(),
17921
+ to: number(),
17922
+ bucketMs: number().int().positive()
17923
+ }), object({ buckets: array(object({
17924
+ bucketStart: number(),
17925
+ count: number().int()
17926
+ })) }), { auth: "admin" }), method(object({
17927
+ ...KindShape,
17928
+ op: _enum([
17929
+ "sum",
17930
+ "min",
17931
+ "max",
17932
+ "count"
17933
+ ]),
17934
+ field: RecordFieldPathSchema.optional(),
17935
+ groupBy: RecordFieldPathSchema.optional(),
17936
+ where: RecordWhereSchema.optional()
17937
+ }), object({ rows: array(object({
17938
+ group: union([
17939
+ string(),
17940
+ number(),
17941
+ _null()
17942
+ ]),
17943
+ value: number().nullable()
17944
+ })) }), { auth: "admin" }), method(object({
17945
+ ...KindShape,
17946
+ deviceId: number().int().optional(),
17947
+ atBefore: number().optional(),
17948
+ where: RecordWhereSchema.optional()
17949
+ }), object({
17950
+ deleted: number().int(),
17951
+ secretRefs: SecretRefsList
17952
+ }), {
17953
+ kind: "mutation",
17954
+ auth: "admin"
17955
+ }), method(object({
17956
+ deviceId: number().int(),
17957
+ kinds: array(RecordKindNameSchema).optional()
17958
+ }), object({
17959
+ deleted: record(string(), number().int()),
17960
+ secretRefs: SecretRefsList
17961
+ }), {
17962
+ kind: "mutation",
17963
+ auth: "admin"
17964
+ }), method(object(KindShape), object({ id: number().int() }), {
17965
+ kind: "mutation",
17966
+ auth: "admin"
17967
+ });
17354
17968
  /** One table of the settings database. */
17355
17969
  var StorageTableSchema = object({
17356
17970
  /** The table's full name, e.g. `recorder:addon-settings` or `addon-device-settings`. */
@@ -17363,6 +17977,28 @@ var StorageTableSchema = object({
17363
17977
  /** Declared by an addon since this engine process started (a running addon claims it). */
17364
17978
  declaredThisBoot: boolean()
17365
17979
  });
17980
+ /** One declared record kind (D881) as System -> Data shows it. */
17981
+ var StorageKindSchema = object({
17982
+ owner: string(),
17983
+ kind: string(),
17984
+ database: _enum(["settings", "events"]),
17985
+ class: string(),
17986
+ state: _enum([
17987
+ "declared",
17988
+ "orphaned",
17989
+ "dropped"
17990
+ ]),
17991
+ /** `null` when the caller asked for no counts (`counts: false`). */
17992
+ rows: number().int().nonnegative().nullable(),
17993
+ /** Rows x the average size of a sample; null for an empty kind. */
17994
+ bytesEstimate: number().int().nonnegative().nullable(),
17995
+ writeTrigger: string(),
17996
+ retention: RecordRetentionSchema,
17997
+ /** `true` when the kind is an entry kind (the generic entries UI lists it). */
17998
+ entry: boolean(),
17999
+ /** The whole declaration, secret paths and entry descriptor included (the entries service builds its handle from it). */
18000
+ declaration: RecordKindDeclarationSchema
18001
+ });
17366
18002
  method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: array(StorageTableSchema) }), { auth: "admin" }), method(object({
17367
18003
  collection: string().min(1),
17368
18004
  expectRows: number().int().nonnegative()
@@ -17372,6 +18008,87 @@ method(object({ ownerPrefix: string().min(1).optional() }), object({ tables: arr
17372
18008
  }), {
17373
18009
  kind: "mutation",
17374
18010
  auth: "admin"
18011
+ }), method(object({
18012
+ owner: string().min(1).optional(),
18013
+ /** `false` skips the per-kind row count (a catalog read only). Default true. */
18014
+ counts: boolean().optional()
18015
+ }), object({ kinds: array(StorageKindSchema) }), { auth: "admin" }), method(RecordQueryInputSchema.extend({
18016
+ owner: string().min(1),
18017
+ kind: RecordKindNameSchema
18018
+ }), RecordQueryResultSchema, { auth: "admin" }), method(object({
18019
+ owner: string().min(1),
18020
+ kind: RecordKindNameSchema,
18021
+ records: array(RecordInputSchema).max(RECORD_BATCH_MAX),
18022
+ /** The LAST batch: the copy is complete, the boot guard stops asking. */
18023
+ complete: boolean().optional()
18024
+ }).refine((input) => input.records.length > 0 || input.complete === true, { message: "records must be non-empty unless complete is true" }), object({ adopted: number().int() }), {
18025
+ kind: "mutation",
18026
+ auth: "admin"
18027
+ }), method(object({
18028
+ collection: string().min(1),
18029
+ cursor: string().optional(),
18030
+ limit: number().int().min(1).max(1e3).optional()
18031
+ }), object({
18032
+ rows: array(object({
18033
+ id: string(),
18034
+ data: record(string(), unknown())
18035
+ })),
18036
+ nextCursor: string().nullable()
18037
+ }), { auth: "admin" }), method(object({ collection: string().min(1) }), object({ adopted: boolean() }), { auth: "admin" });
18038
+ /**
18039
+ * record-entries - the ONE admin surface for every list of user-created entries
18040
+ * (D881): notification targets, brokers, LLM profiles, anything an addon
18041
+ * declares as an ENTRY kind (`entry: { title }` in `defineRecordKinds`).
18042
+ *
18043
+ * The UI is generic. `listEntryKinds` hands it, per kind, the JSON Schema of
18044
+ * the entry body with `secret: true` on every credential field, so a password
18045
+ * field is derived from the schema and never from a name. `putEntry` takes the
18046
+ * redaction token for an untouched secret (the stored value is kept), a string
18047
+ * for a new one, and the clear instruction to remove one. A read never carries
18048
+ * a secret value, and a locked keychain refuses the write with
18049
+ * `records/secret-unavailable` instead of storing plaintext.
18050
+ *
18051
+ * Hub-only, served in-process (it acts for each entry's owner on the keychain).
18052
+ */
18053
+ var EntryKindInfoSchema = object({
18054
+ owner: string(),
18055
+ kind: RecordKindNameSchema,
18056
+ title: string(),
18057
+ nameField: string(),
18058
+ /** JSON Schema of the body; `secret: true` marks a password field. */
18059
+ fields: record(string(), unknown()),
18060
+ secretPaths: array(string()),
18061
+ rows: number().int().nonnegative()
18062
+ });
18063
+ var EntryViewSchema = object({
18064
+ id: RecordIdSchema,
18065
+ name: string(),
18066
+ rev: number().int(),
18067
+ updatedAt: number(),
18068
+ /** Secret fields hold the redaction token. */
18069
+ data: RecordBodySchema
18070
+ });
18071
+ var EntryAddress = {
18072
+ owner: string().min(1),
18073
+ kind: RecordKindNameSchema
18074
+ };
18075
+ method(object({}), object({ kinds: array(EntryKindInfoSchema) }), { auth: "admin" }), method(object({ ...EntryAddress }), object({ entries: array(EntryViewSchema) }), { auth: "admin" }), method(object({
18076
+ ...EntryAddress,
18077
+ id: RecordIdSchema.optional(),
18078
+ data: RecordBodySchema,
18079
+ ifRev: number().int().min(1).optional()
18080
+ }), object({
18081
+ id: string(),
18082
+ rev: number().int()
18083
+ }), {
18084
+ kind: "mutation",
18085
+ auth: "admin"
18086
+ }), method(object({
18087
+ ...EntryAddress,
18088
+ id: RecordIdSchema
18089
+ }), object({ deleted: boolean() }), {
18090
+ kind: "mutation",
18091
+ auth: "admin"
17375
18092
  });
17376
18093
  /**
17377
18094
  * `keychain` — the hub's encrypted store of secret values (D787).
@@ -40517,36 +41234,6 @@ method(LlmRuntimeCompleteInputSchema, LlmGenerateResultSchema, {
40517
41234
  timeoutMs: AI_CAP_TRANSPORT_TIMEOUT_MS
40518
41235
  });
40519
41236
  /**
40520
- * The report of a one-shot "move this owner's plaintext secrets into the
40521
- * keychain" run (D878). COUNTS only - never a value, never a ref.
40522
- *
40523
- * The owner runs it on its own rows, through its own write path; an operator
40524
- * script (`scripts/hub/migrate-raw-secrets.ts`) calls the owner's cap method.
40525
- * Dry run (`apply: false`) reports what WOULD move and changes nothing.
40526
- */
40527
- var RawSecretMigrationInputSchema = object({
40528
- /** `false` (the default of the script) = report only. */
40529
- apply: boolean() });
40530
- var RawSecretMigrationReportSchema = object({
40531
- apply: boolean(),
40532
- /** Rows that can carry a secret (a profile, an enrolment). */
40533
- rows: number().int(),
40534
- /** Rows whose secret was plaintext when the run started. */
40535
- raw: number().int(),
40536
- /** Rows that already held a keychain marker when the run started. */
40537
- markers: number().int(),
40538
- /** Plaintext rows moved by THIS run (always 0 on a dry run). */
40539
- migrated: number().int(),
40540
- /** Plaintext rows left in place because the move or its read-back failed. */
40541
- failed: number().int(),
40542
- /** After the run: rows still holding plaintext. */
40543
- remainingRaw: number().int(),
40544
- /** After the run: markers the keychain could not resolve right now. */
40545
- unresolvedMarkers: number().int(),
40546
- /** True when nothing is raw and every marker resolves. */
40547
- verified: boolean()
40548
- });
40549
- /**
40550
41237
  * `llm` — consumer-facing LLM surface (spec §1-§3). Collection-mode: array
40551
41238
  * methods concat-fan across providers; single-row methods route to ONE
40552
41239
  * provider by the `addonId` in the call input (the notification-output
@@ -43742,6 +44429,7 @@ var NcThrottleSchema = object({
43742
44429
  var NC_CONFIRM_MIN_TIMEOUT_MS = 1e3;
43743
44430
  var NC_CONFIRM_MAX_TIMEOUT_MS = 2e4;
43744
44431
  var NC_CONFIRM_DEFAULT_TIMEOUT_MS = 8e3;
44432
+ var NC_CONFIRM_DEFAULT_MAX_IMAGE_PX = 448;
43745
44433
  /** Comparison the model's COUNT must satisfy for the notification to fire. */
43746
44434
  var NcConfirmExpectSchema = object({
43747
44435
  op: _enum([
@@ -68572,13 +69260,14 @@ var BaseDevice = class {
68572
69260
  get state() {
68573
69261
  if (!this._stateProxyCache) {
68574
69262
  const cache = {};
68575
- const handler = { get: (_target, key) => {
69263
+ const handler = { get: (target, key) => {
68576
69264
  const k = key;
68577
- if (k in cache) return cache[k];
69265
+ const existing = Reflect.get(target, k);
69266
+ if (existing !== void 0) return existing;
68578
69267
  const cap = DEVICE_LOCAL_STATE_CAPS[k];
68579
69268
  if (!cap) return void 0;
68580
69269
  const proxy = this.sliceProxy(cap);
68581
- cache[k] = proxy;
69270
+ Reflect.set(target, k, proxy);
68582
69271
  return proxy;
68583
69272
  } };
68584
69273
  this._stateProxyCache = new Proxy(cache, handler);
@@ -68777,7 +69466,7 @@ var BaseDevice = class {
68777
69466
  async updateSourceInfo(patch) {
68778
69467
  const next = mergeSourceInfo(this.sourceInfo, patch);
68779
69468
  this._sourceInfoCache = Object.freeze({ ...next });
68780
- const action = this.ctx.api?.deviceManager?.setMetadata;
69469
+ const action = this.ctx.api.deviceManager?.setMetadata;
68781
69470
  if (action) try {
68782
69471
  await action.mutate({
68783
69472
  deviceId: this.id,
@@ -68812,7 +69501,7 @@ var BaseDevice = class {
68812
69501
  * device boot on a meta refresh.
68813
69502
  */
68814
69503
  async refreshFeatures() {
68815
- const action = this.ctx.api?.deviceManager?.registerDevice;
69504
+ const action = this.ctx.api.deviceManager?.registerDevice;
68816
69505
  if (!action) return;
68817
69506
  try {
68818
69507
  await action.mutate({
@@ -70409,6 +71098,12 @@ Object.freeze({
70409
71098
  addonId: null,
70410
71099
  access: "view"
70411
71100
  },
71101
+ "coreBlocks.migrateRawSecrets": {
71102
+ capName: "core-blocks",
71103
+ capScope: "system",
71104
+ addonId: null,
71105
+ access: "create"
71106
+ },
70412
71107
  "coreBlocks.restart": {
70413
71108
  capName: "core-blocks",
70414
71109
  capScope: "system",
@@ -75161,6 +75856,30 @@ Object.freeze({
75161
75856
  addonId: null,
75162
75857
  access: "create"
75163
75858
  },
75859
+ "recordEntries.deleteEntry": {
75860
+ capName: "record-entries",
75861
+ capScope: "system",
75862
+ addonId: null,
75863
+ access: "delete"
75864
+ },
75865
+ "recordEntries.listEntries": {
75866
+ capName: "record-entries",
75867
+ capScope: "system",
75868
+ addonId: null,
75869
+ access: "view"
75870
+ },
75871
+ "recordEntries.listEntryKinds": {
75872
+ capName: "record-entries",
75873
+ capScope: "system",
75874
+ addonId: null,
75875
+ access: "view"
75876
+ },
75877
+ "recordEntries.putEntry": {
75878
+ capName: "record-entries",
75879
+ capScope: "system",
75880
+ addonId: null,
75881
+ access: "create"
75882
+ },
75164
75883
  "recording.getAvailability": {
75165
75884
  capName: "recording",
75166
75885
  capScope: "device",
@@ -75461,6 +76180,102 @@ Object.freeze({
75461
76180
  addonId: null,
75462
76181
  access: "view"
75463
76182
  },
76183
+ "records.aggregate": {
76184
+ capName: "records",
76185
+ capScope: "system",
76186
+ addonId: null,
76187
+ access: "view"
76188
+ },
76189
+ "records.allocateId": {
76190
+ capName: "records",
76191
+ capScope: "system",
76192
+ addonId: null,
76193
+ access: "create"
76194
+ },
76195
+ "records.count": {
76196
+ capName: "records",
76197
+ capScope: "system",
76198
+ addonId: null,
76199
+ access: "view"
76200
+ },
76201
+ "records.declareKinds": {
76202
+ capName: "records",
76203
+ capScope: "system",
76204
+ addonId: null,
76205
+ access: "create"
76206
+ },
76207
+ "records.delete": {
76208
+ capName: "records",
76209
+ capScope: "system",
76210
+ addonId: null,
76211
+ access: "delete"
76212
+ },
76213
+ "records.deleteDevice": {
76214
+ capName: "records",
76215
+ capScope: "system",
76216
+ addonId: null,
76217
+ access: "delete"
76218
+ },
76219
+ "records.deleteMany": {
76220
+ capName: "records",
76221
+ capScope: "system",
76222
+ addonId: null,
76223
+ access: "delete"
76224
+ },
76225
+ "records.deleteWhere": {
76226
+ capName: "records",
76227
+ capScope: "system",
76228
+ addonId: null,
76229
+ access: "delete"
76230
+ },
76231
+ "records.get": {
76232
+ capName: "records",
76233
+ capScope: "system",
76234
+ addonId: null,
76235
+ access: "view"
76236
+ },
76237
+ "records.getMany": {
76238
+ capName: "records",
76239
+ capScope: "system",
76240
+ addonId: null,
76241
+ access: "view"
76242
+ },
76243
+ "records.histogram": {
76244
+ capName: "records",
76245
+ capScope: "system",
76246
+ addonId: null,
76247
+ access: "view"
76248
+ },
76249
+ "records.patch": {
76250
+ capName: "records",
76251
+ capScope: "system",
76252
+ addonId: null,
76253
+ access: "create"
76254
+ },
76255
+ "records.put": {
76256
+ capName: "records",
76257
+ capScope: "system",
76258
+ addonId: null,
76259
+ access: "create"
76260
+ },
76261
+ "records.putMany": {
76262
+ capName: "records",
76263
+ capScope: "system",
76264
+ addonId: null,
76265
+ access: "create"
76266
+ },
76267
+ "records.query": {
76268
+ capName: "records",
76269
+ capScope: "system",
76270
+ addonId: null,
76271
+ access: "view"
76272
+ },
76273
+ "records.secretRefs": {
76274
+ capName: "records",
76275
+ capScope: "system",
76276
+ addonId: null,
76277
+ access: "view"
76278
+ },
75464
76279
  "sceneMonitor.captureReference": {
75465
76280
  capName: "scene-monitor",
75466
76281
  capScope: "device",
@@ -75893,18 +76708,48 @@ Object.freeze({
75893
76708
  addonId: null,
75894
76709
  access: "create"
75895
76710
  },
76711
+ "storageAdmin.adoptRecords": {
76712
+ capName: "storage-admin",
76713
+ capScope: "system",
76714
+ addonId: null,
76715
+ access: "create"
76716
+ },
75896
76717
  "storageAdmin.dropCollection": {
75897
76718
  capName: "storage-admin",
75898
76719
  capScope: "system",
75899
76720
  addonId: null,
75900
76721
  access: "delete"
75901
76722
  },
76723
+ "storageAdmin.isAdoptedLegacyTable": {
76724
+ capName: "storage-admin",
76725
+ capScope: "system",
76726
+ addonId: null,
76727
+ access: "view"
76728
+ },
76729
+ "storageAdmin.listKinds": {
76730
+ capName: "storage-admin",
76731
+ capScope: "system",
76732
+ addonId: null,
76733
+ access: "view"
76734
+ },
75902
76735
  "storageAdmin.listTables": {
75903
76736
  capName: "storage-admin",
75904
76737
  capScope: "system",
75905
76738
  addonId: null,
75906
76739
  access: "view"
75907
76740
  },
76741
+ "storageAdmin.readLegacyCollection": {
76742
+ capName: "storage-admin",
76743
+ capScope: "system",
76744
+ addonId: null,
76745
+ access: "view"
76746
+ },
76747
+ "storageAdmin.readRecords": {
76748
+ capName: "storage-admin",
76749
+ capScope: "system",
76750
+ addonId: null,
76751
+ access: "view"
76752
+ },
75908
76753
  "storageEvictable.evict": {
75909
76754
  capName: "storage-evictable",
75910
76755
  capScope: "system",
@@ -79499,6 +80344,37 @@ Object.freeze({
79499
80344
  form: "single",
79500
80345
  optional: false
79501
80346
  }],
80347
+ "records.count": [{
80348
+ name: "deviceId",
80349
+ form: "single",
80350
+ optional: true
80351
+ }],
80352
+ "records.deleteDevice": [{
80353
+ name: "deviceId",
80354
+ form: "single",
80355
+ optional: false
80356
+ }],
80357
+ "records.deleteWhere": [{
80358
+ name: "deviceId",
80359
+ form: "single",
80360
+ optional: true
80361
+ }],
80362
+ "records.histogram": [{
80363
+ name: "deviceId",
80364
+ form: "single",
80365
+ optional: true
80366
+ }],
80367
+ "records.putMany": [{
80368
+ name: "records",
80369
+ form: "object-array",
80370
+ optional: false,
80371
+ itemField: "deviceId"
80372
+ }],
80373
+ "records.query": [{
80374
+ name: "deviceId",
80375
+ form: "single",
80376
+ optional: true
80377
+ }],
79502
80378
  "sceneMonitor.captureReference": [{
79503
80379
  name: "deviceId",
79504
80380
  form: "single",
@@ -79615,6 +80491,17 @@ Object.freeze({
79615
80491
  form: "single",
79616
80492
  optional: false
79617
80493
  }],
80494
+ "storageAdmin.adoptRecords": [{
80495
+ name: "records",
80496
+ form: "object-array",
80497
+ optional: false,
80498
+ itemField: "deviceId"
80499
+ }],
80500
+ "storageAdmin.readRecords": [{
80501
+ name: "deviceId",
80502
+ form: "single",
80503
+ optional: true
80504
+ }],
79618
80505
  "streamBroker.acquireEgressTranscode": [{
79619
80506
  name: "deviceId",
79620
80507
  form: "single",
@@ -84501,6 +85388,18 @@ Object.defineProperty(exports, "NC_CONDITION_CATALOG", {
84501
85388
  return NC_CONDITION_CATALOG;
84502
85389
  }
84503
85390
  });
85391
+ Object.defineProperty(exports, "NC_CONFIRM_DEFAULT_MAX_IMAGE_PX", {
85392
+ enumerable: true,
85393
+ get: function() {
85394
+ return NC_CONFIRM_DEFAULT_MAX_IMAGE_PX;
85395
+ }
85396
+ });
85397
+ Object.defineProperty(exports, "NC_CONFIRM_DEFAULT_TIMEOUT_MS", {
85398
+ enumerable: true,
85399
+ get: function() {
85400
+ return NC_CONFIRM_DEFAULT_TIMEOUT_MS;
85401
+ }
85402
+ });
84504
85403
  Object.defineProperty(exports, "NC_CONSUMABLE_LOW_PERCENT_DEFAULT", {
84505
85404
  enumerable: true,
84506
85405
  get: function() {
@@ -84759,6 +85658,12 @@ Object.defineProperty(exports, "RECORDING_SOURCE_CAMSTACK_ADDON", {
84759
85658
  return RECORDING_SOURCE_CAMSTACK_ADDON;
84760
85659
  }
84761
85660
  });
85661
+ Object.defineProperty(exports, "RECORD_MAX_DATA_BYTES", {
85662
+ enumerable: true,
85663
+ get: function() {
85664
+ return RECORD_MAX_DATA_BYTES;
85665
+ }
85666
+ });
84762
85667
  Object.defineProperty(exports, "RebuildObjectEmbeddingsRefusalSchema", {
84763
85668
  enumerable: true,
84764
85669
  get: function() {
@@ -85107,6 +86012,12 @@ Object.defineProperty(exports, "defineCustomActions", {
85107
86012
  return defineCustomActions;
85108
86013
  }
85109
86014
  });
86015
+ Object.defineProperty(exports, "defineRecordKinds", {
86016
+ enumerable: true,
86017
+ get: function() {
86018
+ return defineRecordKinds;
86019
+ }
86020
+ });
85110
86021
  Object.defineProperty(exports, "deleteAlarmProfile", {
85111
86022
  enumerable: true,
85112
86023
  get: function() {