@camstack/server 1.2.821 → 1.2.823

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 (112) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api/trpc/generated-cap-routers.js +20 -0
  3. package/package.json +9 -10
  4. package/system/dist/addon-runner.js +18 -13
  5. package/system/dist/addon-runner.mjs +19 -14
  6. package/system/dist/addon-utils.mjs +1 -1
  7. package/system/dist/{agent-https-N6Or6UAu.mjs → agent-https-CDl7mB_F.mjs} +1 -1
  8. package/system/dist/{agent-https-Bp5yzi8b.js → agent-https-Df53Fvk1.js} +1 -1
  9. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  10. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  11. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  12. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  13. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  14. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  15. package/system/dist/builtins/autotrack/index.js +1 -1
  16. package/system/dist/builtins/autotrack/index.mjs +1 -1
  17. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  18. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  19. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  20. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  21. package/system/dist/builtins/camera-grid/index.js +1 -1
  22. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  23. package/system/dist/builtins/composer/composed-device-set.d.ts +5 -1
  24. package/system/dist/builtins/composer/composed-device.d.ts +4 -0
  25. package/system/dist/builtins/composer/composed-name.d.ts +30 -0
  26. package/system/dist/builtins/composer/composer.addon.js +94 -6
  27. package/system/dist/builtins/composer/composer.addon.mjs +94 -6
  28. package/system/dist/builtins/composer/composer.d.ts +13 -0
  29. package/system/dist/builtins/console-logging/index.js +1 -1
  30. package/system/dist/builtins/console-logging/index.mjs +1 -1
  31. package/system/dist/builtins/core-blocks/actions-service.d.ts +16 -0
  32. package/system/dist/builtins/core-blocks/composition-api.d.ts +6 -0
  33. package/system/dist/builtins/core-blocks/core-blocks.addon.js +214 -8
  34. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +214 -8
  35. package/system/dist/builtins/core-blocks/device-template-door.d.ts +25 -0
  36. package/system/dist/builtins/core-blocks/fan-presets-service.d.ts +5 -0
  37. package/system/dist/builtins/core-blocks/rename-composition-block.d.ts +16 -0
  38. package/system/dist/builtins/core-blocks/scheduler/scheduler-engine.d.ts +5 -0
  39. package/system/dist/builtins/core-blocks/step-condition-door.d.ts +19 -0
  40. package/system/dist/builtins/core-blocks/sync-composed-device-name.d.ts +19 -0
  41. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  42. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  43. package/system/dist/builtins/device-manager/device-manager.addon.d.ts +7 -0
  44. package/system/dist/builtins/device-manager/device-manager.addon.js +691 -4
  45. package/system/dist/builtins/device-manager/device-manager.addon.mjs +689 -3
  46. package/system/dist/builtins/device-manager/device-template/template-host.d.ts +60 -0
  47. package/system/dist/builtins/device-manager/device-template-actions.d.ts +33 -0
  48. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  49. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  50. package/system/dist/builtins/keychain/index.js +4 -4
  51. package/system/dist/builtins/keychain/index.mjs +4 -4
  52. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  53. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  54. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  55. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  56. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  57. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  58. package/system/dist/builtins/loki-logging/index.js +1 -1
  59. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  60. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  61. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  62. package/system/dist/builtins/platform-probe/index.js +1 -1
  63. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  64. package/system/dist/builtins/record-entries/index.js +1 -1
  65. package/system/dist/builtins/record-entries/index.mjs +1 -1
  66. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  67. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  68. package/system/dist/builtins/snapshot/index.js +1 -1
  69. package/system/dist/builtins/snapshot/index.mjs +1 -1
  70. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  71. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  72. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  73. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  74. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  75. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  76. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  77. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  78. package/system/dist/builtins/system-config/system-config.addon.js +9 -9
  79. package/system/dist/builtins/system-config/system-config.addon.mjs +287 -287
  80. package/system/dist/builtins/winston-logging/index.js +1 -1
  81. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  82. package/system/dist/{capture-engine-4lB0sLCf.js → capture-engine-C0Z5rwCO.js} +1 -1
  83. package/system/dist/{capture-engine-Cz7z5d36.mjs → capture-engine-D_GQBgrZ.mjs} +1 -1
  84. package/system/dist/{composition-sources-C9gEj25e.js → composition-sources-DIZx3mW3.js} +1 -1
  85. package/system/dist/{composition-sources-C0e2g_VP.mjs → composition-sources-mx-2yCDv.mjs} +1 -1
  86. package/system/dist/{constants-CZMy7dor.mjs → constants-BQlx9HDp.mjs} +1 -1
  87. package/system/dist/{constants-Cq3B9yzj.js → constants-CAOcKiWT.js} +1 -1
  88. package/system/dist/{coral-accelerators-DBlgWB8k.mjs → coral-accelerators-BW3OcrLD.mjs} +6 -6
  89. package/system/dist/{custom-action-registry-B9zFBNVa.mjs → custom-action-registry-N7flBDwT.mjs} +37 -37
  90. package/system/dist/{device-ca-BenyQXJV.js → device-ca-93LsCF_Q.js} +1 -1
  91. package/system/dist/{device-ca-BmQ6N-A-.mjs → device-ca-CK6GTnNh.mjs} +1 -1
  92. package/system/dist/device-template-worker.js +5 -7032
  93. package/system/dist/device-template-worker.mjs +1 -7026
  94. package/system/dist/{dist-DuKMbGBM.mjs → dist-BQiyo22b.mjs} +667 -50
  95. package/system/dist/{dist-M5VX8Hqf.js → dist-izXDzt4g.js} +714 -49
  96. package/system/dist/file-host-worker.js +1 -1
  97. package/system/dist/file-host-worker.mjs +1 -1
  98. package/system/dist/{hub-mdns-ciao-k3pOKWyZ.js → hub-mdns-ciao-Dt_tgvol.js} +2 -2
  99. package/system/dist/{hub-mdns-ciao-CXBfBwAy.mjs → hub-mdns-ciao-srpOrqIP.mjs} +2 -2
  100. package/system/dist/index.js +26 -21
  101. package/system/dist/index.mjs +238 -233
  102. package/system/dist/{legacy-integration-rows-door-mIpR3e6X.js → legacy-integration-rows-door-BH43eDu6.js} +1 -1
  103. package/system/dist/{legacy-integration-rows-door-C13OeuW9.mjs → legacy-integration-rows-door-wu2GWY6U.mjs} +1 -1
  104. package/system/dist/rename-composition-block-6oLQVzft.js +112 -0
  105. package/system/dist/rename-composition-block-CH6ZoSJA.mjs +101 -0
  106. package/system/dist/{restore-archive-DDeQFJN5.mjs → restore-archive-C4rR2SYV.mjs} +154 -154
  107. package/system/dist/{restore-archive-CCgt7SZ8.js → restore-archive-DpZ2PbLN.js} +7 -7
  108. package/system/dist/template-protocol-BmMM5VBf.mjs +7033 -0
  109. package/system/dist/template-protocol-CTP4eAo_.js +7059 -0
  110. package/system/dist/{wal-maintenance-Cj7xe4wN.mjs → wal-maintenance-CNfp0HHX.mjs} +0 -0
  111. package/system/dist/{wal-maintenance-D5M6hl53.js → wal-maintenance-DAA2qJja.js} +0 -0
  112. package/system/package.json +1 -1
@@ -803,7 +803,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
803
803
  return EventCategory;
804
804
  }({});
805
805
  //#endregion
806
- //#region ../types/dist/device-type-DTTZKB2I.mjs
806
+ //#region ../types/dist/composed-stable-id-DLcPInGv.mjs
807
807
  /**
808
808
  import { errMsg } from '@camstack/types'
809
809
  * Extract a human-readable message from an unknown error value.
@@ -1214,8 +1214,14 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1214
1214
  DeviceRole["IrTransmitter"] = "ir-transmitter";
1215
1215
  return DeviceRole;
1216
1216
  }({});
1217
+ /**
1218
+ * A composed device's stableId is this prefix plus the block id. Its own module,
1219
+ * free of zod, so the addon runner can read it through `@camstack/types/addon`
1220
+ * without loading the schema barrel (D28).
1221
+ */
1222
+ var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1217
1223
  //#endregion
1218
- //#region ../types/dist/sleep-DnVqHJc4.mjs
1224
+ //#region ../types/dist/sleep-B36hHDDz.mjs
1219
1225
  /**
1220
1226
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1221
1227
  * window to float samples (D455).
@@ -3342,7 +3348,7 @@ var SecretOverwriteRefusedError = class extends Error {
3342
3348
  this.name = "SecretOverwriteRefusedError";
3343
3349
  }
3344
3350
  };
3345
- function isRecord$3(value) {
3351
+ function isRecord$3$1(value) {
3346
3352
  return typeof value === "object" && value !== null && !Array.isArray(value);
3347
3353
  }
3348
3354
  function resolvedValue(pass, marker) {
@@ -3371,7 +3377,7 @@ function inArray(pass, incoming, stored) {
3371
3377
  return incoming.map((item, index) => {
3372
3378
  const twin = stored[index];
3373
3379
  if (isSecretMarker(twin)) return typeof item === "string" && item === resolvedValue(pass, twin) ? twin : item;
3374
- if (isRecord$3(item) && isRecord$3(twin)) return inArrayRow(pass, item, twin);
3380
+ if (isRecord$3$1(item) && isRecord$3$1(twin)) return inArrayRow(pass, item, twin);
3375
3381
  if (Array.isArray(item) && Array.isArray(twin)) return inArray(pass, item, twin);
3376
3382
  return item;
3377
3383
  });
@@ -3382,7 +3388,7 @@ function inArrayRow(pass, incoming, stored) {
3382
3388
  const twin = stored[key];
3383
3389
  if (isSecretMarker(twin)) {
3384
3390
  if (typeof value === "string" && value === resolvedValue(pass, twin)) out[key] = twin;
3385
- } else if (isRecord$3(value) && isRecord$3(twin)) out[key] = inArrayRow(pass, value, twin);
3391
+ } else if (isRecord$3$1(value) && isRecord$3$1(twin)) out[key] = inArrayRow(pass, value, twin);
3386
3392
  else if (Array.isArray(value) && Array.isArray(twin)) out[key] = inArray(pass, value, twin);
3387
3393
  }
3388
3394
  return out;
@@ -3390,7 +3396,7 @@ function inArrayRow(pass, incoming, stored) {
3390
3396
  async function walk(pass, incoming, stored) {
3391
3397
  if (isSecretMarker(stored)) return atMarker(pass, incoming, stored);
3392
3398
  if (Array.isArray(incoming) && Array.isArray(stored)) return inArray(pass, incoming, stored);
3393
- if (!isRecord$3(incoming) || !isRecord$3(stored)) return incoming;
3399
+ if (!isRecord$3$1(incoming) || !isRecord$3$1(stored)) return incoming;
3394
3400
  const out = { ...incoming };
3395
3401
  for (const [key, value] of Object.entries(incoming)) out[key] = await walk(pass, value, stored[key]);
3396
3402
  return out;
@@ -3421,7 +3427,7 @@ async function restoreUnchangedSecrets(input) {
3421
3427
  function isJsonEqual(a, b) {
3422
3428
  if (Object.is(a, b)) return true;
3423
3429
  if (Array.isArray(a)) return Array.isArray(b) && a.length === b.length && a.every((v, i) => isJsonEqual(v, b[i]));
3424
- if (isRecord$3(a) && isRecord$3(b)) {
3430
+ if (isRecord$3$1(a) && isRecord$3$1(b)) {
3425
3431
  const keys = Object.keys(a);
3426
3432
  if (keys.length !== Object.keys(b).length) return false;
3427
3433
  return keys.every((k) => Object.prototype.hasOwnProperty.call(b, k) && isJsonEqual(a[k], b[k]));
@@ -3445,7 +3451,7 @@ function markerKeysOf(blob, owner) {
3445
3451
  }
3446
3452
  function nodeFromStored(value, owner) {
3447
3453
  if (isSecretMarker(value)) return isSecretRefOwnedBy(value.$secret, owner) ? { kind: "leaf" } : null;
3448
- if (!isRecord$3(value)) return null;
3454
+ if (!isRecord$3$1(value)) return null;
3449
3455
  const children = /* @__PURE__ */ new Map();
3450
3456
  for (const [key, child] of Object.entries(value)) {
3451
3457
  const node = nodeFromStored(child, owner);
@@ -13805,7 +13811,7 @@ function sleep(ms) {
13805
13811
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
13806
13812
  }
13807
13813
  //#endregion
13808
- //#region ../types/dist/composition-C6TZGqUb.mjs
13814
+ //#region ../types/dist/composition-BFJq1Y88.mjs
13809
13815
  var AUDIO_ENCODER_BY_CODEC = {
13810
13816
  opus: "libopus",
13811
13817
  aac: "aac",
@@ -16200,8 +16206,6 @@ function helperMembers(spec) {
16200
16206
  */
16201
16207
  /** The owner of every composed device: the `composer` builtin. */
16202
16208
  var COMPOSER_ADDON_ID = "composer";
16203
- /** A composed device's stableId is this prefix plus the block id. */
16204
- var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
16205
16209
  /** Longest snippet a `code` source may carry (slice 4). */
16206
16210
  var MAX_COMPOSITION_CODE_LENGTH = 2e4;
16207
16211
  /** One field of one capability of one source device. */
@@ -43881,11 +43885,35 @@ function normalizeStepTargets(steps) {
43881
43885
  /**
43882
43886
  * The steps an internal Action may contain: cap and wait, and nothing that can
43883
43887
  * call back into an Action — so an Action can never reach itself (no cycles).
43888
+ * This is the LEAF shape: no condition of its own.
43889
+ */
43890
+ var LeafActionStepSchema = z.discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
43891
+ /**
43892
+ * The optional guard of a step (#472): `if` is the ONE `when` tree (D980), read
43893
+ * on the state mirror when the step is reached; `else` runs when it is false.
43894
+ * An `else` holds leaf steps only — the nesting is bounded at ONE level, so a
43895
+ * branch can never grow a tree the trace has to draw.
43884
43896
  */
43885
- var ActionStepSchema = z.discriminatedUnion("kind", [AutomationWaitStepSchema, AutomationCapStepSchema]);
43897
+ var stepGuardShape = {
43898
+ if: AutomationWhenSchema.optional(),
43899
+ else: z.array(LeafActionStepSchema).max(10).optional()
43900
+ };
43901
+ var elseNeedsIf = {
43902
+ message: "an else list needs the condition it is the other side of (if)",
43903
+ path: ["else"]
43904
+ };
43905
+ var GuardedWaitStepSchema = AutomationWaitStepSchema.extend(stepGuardShape).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
43906
+ var GuardedCapStepSchema = AutomationCapStepBaseSchema.extend(stepGuardShape).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
43907
+ message: "a cap step needs a target",
43908
+ path: ["target"]
43909
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
43910
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
43911
+ path: ["actionId"]
43912
+ }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
43913
+ var ActionStepSchema = z.discriminatedUnion("kind", [GuardedWaitStepSchema, GuardedCapStepSchema]);
43886
43914
  var AutomationActionSchema = z.discriminatedUnion("kind", [
43887
- AutomationWaitStepSchema,
43888
- AutomationCapStepSchema,
43915
+ GuardedWaitStepSchema,
43916
+ GuardedCapStepSchema,
43889
43917
  z.object({
43890
43918
  kind: z.literal("action"),
43891
43919
  /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
@@ -44804,7 +44832,7 @@ var StepDeviceTraceSchema = z.object({
44804
44832
  outcome: z.enum(["ok", "error"]),
44805
44833
  message: z.string().optional()
44806
44834
  });
44807
- var AutomationStepTraceSchema = z.object({
44835
+ var StepTraceBaseSchema = z.object({
44808
44836
  /** `actions.<i>` */
44809
44837
  path: z.string().min(1),
44810
44838
  kind: z.string().min(1),
@@ -44823,15 +44851,35 @@ var AutomationStepTraceSchema = z.object({
44823
44851
  * is shown as {@link REDACTED_ARG}. Absent on traces written before it existed.
44824
44852
  */
44825
44853
  args: z.record(z.string(), TraceValueSchema).optional(),
44826
- /** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. */
44854
+ /**
44855
+ * The device values a templated arg printed as `—`, one `ref: reason` each
44856
+ * (D1021): why a sentence says "—" where a number was expected. Bounded.
44857
+ */
44858
+ templates: z.array(z.string()).max(20).optional(),
44859
+ /**
44860
+ * What the step's own `if` read when the step was reached (#472): `true` the
44861
+ * step ran, `false` its `else` ran (or nothing did), `unknown` a state leaf
44862
+ * could not be read, so NEITHER side ran. Absent on an unguarded step.
44863
+ */
44864
+ condition: z.enum([
44865
+ "true",
44866
+ "false",
44867
+ "unknown"
44868
+ ]).optional(),
44869
+ /** Why the condition read what it read, in the evaluator's own words. */
44870
+ conditionReason: z.string().optional(),
44871
+ /** `empty`: the target resolved to no device, so nothing was done — never silently `ok`. `skipped`: its `if` was false (or unknown) and nothing ran in its place. */
44827
44872
  outcome: z.enum([
44828
44873
  "ok",
44829
44874
  "error",
44830
44875
  "not-run",
44831
- "empty"
44876
+ "empty",
44877
+ "skipped"
44832
44878
  ]),
44833
44879
  message: z.string().optional()
44834
44880
  });
44881
+ /** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
44882
+ var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: z.array(StepTraceBaseSchema).optional() });
44835
44883
  var AutomationRunTraceSchema = z.object({
44836
44884
  runId: z.string().min(1),
44837
44885
  startedAt: z.number(),
@@ -45139,6 +45187,7 @@ z.enum([
45139
45187
  "invalid-variables",
45140
45188
  "invalid-steps",
45141
45189
  "not-linked",
45190
+ "template-scope",
45142
45191
  "busy"
45143
45192
  ]);
45144
45193
  /**
@@ -45163,9 +45212,50 @@ var ActionRunChangedSchema = z.object({
45163
45212
  lastRunAt: z.number().nullable(),
45164
45213
  lastError: z.string().nullable()
45165
45214
  });
45215
+ /**
45216
+ * The guard of a conditional step (#472): the step's `if` is the ONE `when`
45217
+ * tree (D980), read on a {@link ConditionMirror} filled for exactly the leaves
45218
+ * the tree names, at the moment the step is reached. A state that cannot be
45219
+ * read is UNKNOWN, and unknown runs neither side (D49: a failed read changes
45220
+ * nothing, and never decides a branch).
45221
+ */
45222
+ /** Fill a mirror for the tree's leaves from `fetchers` and judge it NOW. */
45223
+ async function evaluateStepCondition(when, fetchers, now = Date.now) {
45224
+ const mirror = new ConditionMirror(collectWhenMirrorSources(when));
45225
+ await mirror.refresh(fetchers);
45226
+ const evaluation = evaluateWhenTree(when, mirror, now());
45227
+ const first = evaluation.nodes.filter((n) => n.outcome !== "pass").map((n) => n.reason)[0];
45228
+ if (evaluation.unknown) return {
45229
+ result: "unknown",
45230
+ reason: `a state the condition reads is not known${first === void 0 ? "" : ` (${first})`}`
45231
+ };
45232
+ return evaluation.pass ? {
45233
+ result: "true",
45234
+ reason: "the condition holds"
45235
+ } : {
45236
+ result: "false",
45237
+ reason: first ?? "the condition does not hold"
45238
+ };
45239
+ }
45166
45240
  function errorMessage(err) {
45167
45241
  return err instanceof Error ? err.message : String(err);
45168
45242
  }
45243
+ /** A guard that throws is an unknown, never a crash of the run. */
45244
+ async function readGuard(guard) {
45245
+ try {
45246
+ return await guard();
45247
+ } catch (err) {
45248
+ return {
45249
+ result: "unknown",
45250
+ reason: `the condition could not be read: ${errorMessage(err)}`
45251
+ };
45252
+ }
45253
+ }
45254
+ /** The else level of a trace is one level deep: a nested trace carries no `else` of its own. */
45255
+ function withoutElse(trace) {
45256
+ const { else: _else, ...rest } = trace;
45257
+ return rest;
45258
+ }
45169
45259
  async function runSteps(steps, options) {
45170
45260
  const traces = [];
45171
45261
  let failed = false;
@@ -45183,10 +45273,57 @@ async function runSteps(steps, options) {
45183
45273
  continue;
45184
45274
  }
45185
45275
  const startedAt = options.now();
45276
+ let guardTrace = {};
45277
+ if (step.guard !== void 0) {
45278
+ const verdict = await readGuard(step.guard);
45279
+ guardTrace = {
45280
+ condition: verdict.result,
45281
+ conditionReason: verdict.reason
45282
+ };
45283
+ if (verdict.result === "unknown") options.onGuardUnknown?.({
45284
+ index,
45285
+ path,
45286
+ reason: verdict.reason,
45287
+ deviceId: step.meta.deviceId
45288
+ });
45289
+ if (verdict.result !== "true") {
45290
+ const branch = verdict.result === "false" ? step.otherwise ?? [] : [];
45291
+ if (branch.length === 0) {
45292
+ traces.push({
45293
+ ...step.meta,
45294
+ ...guardTrace,
45295
+ path,
45296
+ startedAt,
45297
+ endedAt: options.now(),
45298
+ outcome: "skipped",
45299
+ message: verdict.result === "unknown" ? `not run: ${verdict.reason}` : `not run: the condition is false (${verdict.reason})`
45300
+ });
45301
+ continue;
45302
+ }
45303
+ const sub = await runSteps(branch, {
45304
+ ...options,
45305
+ pathPrefix: `${path}.else`
45306
+ });
45307
+ if (sub.failed) failed = true;
45308
+ else if (sub.aborted) aborted = true;
45309
+ traces.push({
45310
+ ...step.meta,
45311
+ ...guardTrace,
45312
+ path,
45313
+ startedAt,
45314
+ endedAt: options.now(),
45315
+ outcome: sub.failed ? "error" : "ok",
45316
+ ...sub.failed ? { message: "an else step failed" } : {},
45317
+ else: sub.steps.map(withoutElse)
45318
+ });
45319
+ continue;
45320
+ }
45321
+ }
45186
45322
  let deviceId = step.meta.deviceId;
45187
45323
  let sent;
45188
45324
  const perDevice = [];
45189
45325
  let emptyReason;
45326
+ let templateNotes = [];
45190
45327
  const scope = {
45191
45328
  setDeviceId: (id) => {
45192
45329
  deviceId = id;
@@ -45199,8 +45336,12 @@ async function runSteps(steps, options) {
45199
45336
  },
45200
45337
  setArgs: (args) => {
45201
45338
  sent = args;
45339
+ },
45340
+ setTemplateNotes: (notes) => {
45341
+ templateNotes = notes.slice(0, 20);
45202
45342
  }
45203
45343
  };
45344
+ const templatesTrace = () => templateNotes.length === 0 ? {} : { templates: [...templateNotes] };
45204
45345
  const argsTrace = () => sent === void 0 ? {} : { args: buildStepArgsTrace(sent) };
45205
45346
  const devicesTrace = () => perDevice.length === 0 ? {} : { devices: perDevice.slice(0, 200) };
45206
45347
  try {
@@ -45209,7 +45350,9 @@ async function runSteps(steps, options) {
45209
45350
  ...step.meta,
45210
45351
  ...deviceId === void 0 || perDevice.length > 1 ? {} : { deviceId },
45211
45352
  ...argsTrace(),
45353
+ ...templatesTrace(),
45212
45354
  ...devicesTrace(),
45355
+ ...guardTrace,
45213
45356
  path,
45214
45357
  startedAt,
45215
45358
  endedAt: options.now(),
@@ -45229,7 +45372,9 @@ async function runSteps(steps, options) {
45229
45372
  ...step.meta,
45230
45373
  ...deviceId === void 0 || perDevice.length > 1 ? {} : { deviceId },
45231
45374
  ...argsTrace(),
45375
+ ...templatesTrace(),
45232
45376
  ...devicesTrace(),
45377
+ ...guardTrace,
45233
45378
  path,
45234
45379
  startedAt,
45235
45380
  endedAt: options.now(),
@@ -45278,6 +45423,125 @@ function resolveStepArgs(value, vars, onMissing) {
45278
45423
  if (value !== null && typeof value === "object") return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, resolveStepArgs(v, vars, onMissing)]));
45279
45424
  return value;
45280
45425
  }
45426
+ /** A device template that did not render: the step fails with this, never throws past `runSteps`. */
45427
+ var StepTemplateError = class extends Error {
45428
+ reason;
45429
+ constructor(reason, message) {
45430
+ super(`device template [${reason}]: ${message}`);
45431
+ this.reason = reason;
45432
+ this.name = "StepTemplateError";
45433
+ }
45434
+ };
45435
+ /**
45436
+ * A `{{vars.x}}` slot, set aside while a template renders. The slot carries a
45437
+ * nonce drawn per call, so a device value that happens to contain the sentinel
45438
+ * characters can never name a held variable.
45439
+ */
45440
+ var VAR_SLOT_OPEN = "";
45441
+ var VAR_SLOT_CLOSE = "";
45442
+ var TEMPLATE_MARKUP_RE = /\{\{|\{%/;
45443
+ function newSlotNonce() {
45444
+ return Math.random().toString(36).slice(2, 12);
45445
+ }
45446
+ function slotPattern(nonce) {
45447
+ return new RegExp(`${VAR_SLOT_OPEN}${nonce}:([A-Za-z_][A-Za-z0-9_]*)${VAR_SLOT_CLOSE}`, "g");
45448
+ }
45449
+ /** True when a string, once its `{{vars.x}}` slots are set aside, still carries template markup. */
45450
+ function carriesDeviceTemplate(text) {
45451
+ return TEMPLATE_MARKUP_RE.test(text.replace(TEMPLATE_RE, ""));
45452
+ }
45453
+ /** Every string in `value` that is a device template (D1021), de-duplicated, in walk order. */
45454
+ function collectDeviceTemplates(value) {
45455
+ const found = /* @__PURE__ */ new Set();
45456
+ const walk = (node) => {
45457
+ if (typeof node === "string") {
45458
+ if (carriesDeviceTemplate(node)) found.add(node);
45459
+ } else if (Array.isArray(node)) for (const item of node) walk(item);
45460
+ else if (node !== null && typeof node === "object") for (const item of Object.values(node)) walk(item);
45461
+ };
45462
+ walk(value);
45463
+ return [...found];
45464
+ }
45465
+ function protectVarSlots(text, nonce) {
45466
+ return text.replace(TEMPLATE_RE, (_m, key) => `${VAR_SLOT_OPEN}${nonce}:${key}${VAR_SLOT_CLOSE}`);
45467
+ }
45468
+ function restoreVarSlots(text, nonce, vars, onMissing) {
45469
+ return text.replace(slotPattern(nonce), (_m, key) => {
45470
+ const v = vars[key];
45471
+ if (v === void 0) {
45472
+ onMissing(key);
45473
+ return "";
45474
+ }
45475
+ return String(v);
45476
+ });
45477
+ }
45478
+ /**
45479
+ * {@link resolveStepArgs} plus the device templates of a step (D1021). A string
45480
+ * that carries `{{ … }}` / `{% … %}` beyond a `{{vars.x}}` slot is rendered by
45481
+ * `render` BEFORE the variables are put in, so a variable's value is data and
45482
+ * never template source (an action variable can come from a non-admin caller).
45483
+ * A refused render, or no renderer, throws {@link StepTemplateError}: the step
45484
+ * fails with the typed reason and nothing is dispatched.
45485
+ */
45486
+ async function resolveStepArgsWithTemplates(value, vars, onMissing, render) {
45487
+ const nonce = newSlotNonce();
45488
+ const sources = [];
45489
+ const indexOf = /* @__PURE__ */ new Map();
45490
+ const hold = (text) => {
45491
+ const known = indexOf.get(text);
45492
+ if (known !== void 0) return known;
45493
+ sources.push(text);
45494
+ indexOf.set(text, sources.length - 1);
45495
+ return sources.length - 1;
45496
+ };
45497
+ class Pending {
45498
+ index;
45499
+ constructor(index) {
45500
+ this.index = index;
45501
+ }
45502
+ }
45503
+ const collect = (node) => {
45504
+ if (isVarRef(node)) return resolveStepArgs(node, vars, onMissing);
45505
+ if (typeof node === "string") return carriesDeviceTemplate(node) ? new Pending(hold(protectVarSlots(node, nonce))) : resolveStepArgs(node, vars, onMissing);
45506
+ if (Array.isArray(node)) return node.map(collect);
45507
+ if (node !== null && typeof node === "object") return Object.fromEntries(Object.entries(node).map(([k, v]) => [k, collect(v)]));
45508
+ return node;
45509
+ };
45510
+ const skeleton = collect(value);
45511
+ if (sources.length === 0) return {
45512
+ value: skeleton,
45513
+ notes: []
45514
+ };
45515
+ if (render === void 0) throw new StepTemplateError("unavailable", "this node has no device template renderer");
45516
+ let answers;
45517
+ try {
45518
+ answers = await render(sources);
45519
+ } catch (err) {
45520
+ throw new StepTemplateError("unavailable", errorMessage(err));
45521
+ }
45522
+ const texts = [];
45523
+ const notes = [];
45524
+ for (const index of sources.keys()) {
45525
+ const answer = answers[index];
45526
+ if (answer === void 0) throw new StepTemplateError("unavailable", `no answer for template ${index + 1}`);
45527
+ if (!answer.ok) throw new StepTemplateError(answer.refusal.reason, answer.refusal.message);
45528
+ texts.push(restoreVarSlots(answer.text, nonce, vars, onMissing));
45529
+ for (const entry of answer.trace) {
45530
+ const note = `${entry.ref}: ${entry.reason}`;
45531
+ if (!notes.includes(note)) notes.push(note);
45532
+ }
45533
+ }
45534
+ const fill = (node) => {
45535
+ if (node instanceof Pending) return texts[node.index] ?? "";
45536
+ if (Array.isArray(node)) return node.map(fill);
45537
+ if (node !== null && typeof node === "object") return Object.fromEntries(Object.entries(node).map(([k, v]) => [k, fill(v)]));
45538
+ return node;
45539
+ };
45540
+ return {
45541
+ value: fill(skeleton),
45542
+ notes
45543
+ };
45544
+ }
45281
45545
  function stepMetaOfAction(step) {
45282
45546
  if (step.kind === "wait") return { kind: "wait" };
45283
45547
  const { target, actionId } = normalizeCapStep(step);
@@ -45331,19 +45595,36 @@ async function runForDevices(deviceIds, scope, work, concurrency = 4) {
45331
45595
  * variables. Variables are substituted per step, at the moment it runs, so a
45332
45596
  * missing one fails THAT step (traced) and leaves the later ones not-run.
45333
45597
  */
45598
+ /** The guard and the else list of a step, bound to the run (#472); `{}` for an unguarded step. */
45599
+ function guardOf(step, vars, deps) {
45600
+ const when = step.if;
45601
+ if (when === void 0) return {};
45602
+ const evaluate = deps.evaluateCondition;
45603
+ return {
45604
+ guard: async () => evaluate === void 0 ? {
45605
+ result: "unknown",
45606
+ reason: "this consumer has no condition evaluator"
45607
+ } : evaluate(when),
45608
+ ...step.else === void 0 ? {} : { otherwise: buildActionSteps(step.else, vars, deps) }
45609
+ };
45610
+ }
45334
45611
  function buildActionSteps(steps, vars, deps) {
45335
45612
  return steps.map((step) => {
45613
+ const guarded = guardOf(step, vars, deps);
45336
45614
  const meta = stepMetaOfAction(step);
45337
45615
  if (step.kind === "wait") return {
45338
45616
  meta,
45617
+ ...guarded,
45339
45618
  run: () => deps.sleep(step.seconds * 1e3)
45340
45619
  };
45341
45620
  const normalized = normalizeCapStep(step);
45342
45621
  return {
45343
45622
  meta,
45623
+ ...guarded,
45344
45624
  run: async (scope) => {
45345
- const resolved = resolveStepArgs(step.args ?? {}, vars, deps.onMissingVar);
45346
- const args = isPlainRecord(resolved) ? resolved : {};
45625
+ const templated = await resolveStepArgsWithTemplates(step.args ?? {}, vars, deps.onMissingVar, deps.renderTemplates);
45626
+ if (templated.notes.length > 0) scope.setTemplateNotes(templated.notes);
45627
+ const args = isPlainRecord(templated.value) ? templated.value : {};
45347
45628
  const target = await deps.resolveTarget(normalized.target, normalized.actionId, vars, {
45348
45629
  actionId: normalized.actionId,
45349
45630
  owner: deps.owner
@@ -53106,6 +53387,25 @@ var CAP_CUSTOMIZE_CATALOG = {
53106
53387
  }]
53107
53388
  }
53108
53389
  };
53390
+ /**
53391
+ * Unit meta on runtime-state fields. The composed-device row reads this;
53392
+ * it is not an override list (D944).
53393
+ */
53394
+ var CAP_RUNTIME_FIELD_UNITS = {
53395
+ "ambient-light-sensor": { illuminance: "lx" },
53396
+ "battery": {
53397
+ level: "%",
53398
+ voltage: "V"
53399
+ },
53400
+ "humidity-sensor": { humidity: "%" },
53401
+ "power-meter": {
53402
+ power: "W",
53403
+ energy: "kWh",
53404
+ voltage: "V",
53405
+ current: "A"
53406
+ },
53407
+ "temperature-sensor": { temperature: "°C" }
53408
+ };
53109
53409
  function problem(code, path, message) {
53110
53410
  return {
53111
53411
  code,
@@ -57947,6 +58247,161 @@ function checkDeviceAlias(alias, isTaken) {
57947
58247
  };
57948
58248
  }
57949
58249
  /**
58250
+ * Device value templates, the parts that need no template engine (D1021).
58251
+ *
58252
+ * A template is plain text with Jinja-style `{{ … }}` / `{% … %}` blocks:
58253
+ * `{{ stufa_veranda.temperature | unit('°F') | round(1) }}`. Devices are named
58254
+ * by their alias (`device-alias.ts`); a field is `alias.field` when the field
58255
+ * name is unique across the device's capabilities, else `alias.<cap>.field`,
58256
+ * and an ambiguous `alias.field` is refused by name.
58257
+ *
58258
+ * The engine itself (nunjucks) lives ONLY in the hub's renderer
58259
+ * (`packages/system/src/builtins/device-manager/device-template/`, guard
58260
+ * `check-device-template-grammar`): it does not sandbox, so it renders only in
58261
+ * a worker thread under a wall-time budget, over frozen plain data. This file
58262
+ * is the shared vocabulary — limits, refusal reasons, the trace, and how a
58263
+ * `(alias, path)` reference resolves against a device's slices.
58264
+ */
58265
+ var DEVICE_TEMPLATE_MAX_LENGTH = 4096;
58266
+ var DEVICE_TEMPLATE_MAX_OUTPUT = 4096;
58267
+ var DeviceTemplateSchema = z.string().min(1).max(DEVICE_TEMPLATE_MAX_LENGTH);
58268
+ /** The filters a template may use. Anything else is refused at parse time. */
58269
+ var DEVICE_TEMPLATE_FILTERS = [
58270
+ "unit",
58271
+ "round",
58272
+ "default",
58273
+ "since",
58274
+ "ago",
58275
+ "format",
58276
+ "upper",
58277
+ "lower",
58278
+ "title",
58279
+ "capitalize",
58280
+ "trim",
58281
+ "abs",
58282
+ "int",
58283
+ "float",
58284
+ "length",
58285
+ "d",
58286
+ "join",
58287
+ "replace",
58288
+ "first",
58289
+ "last",
58290
+ "sort",
58291
+ "reverse",
58292
+ "sum",
58293
+ "string",
58294
+ "list",
58295
+ "truncate"
58296
+ ];
58297
+ var DeviceTemplateRefusalSchema = z.object({
58298
+ reason: z.enum([
58299
+ "too-long",
58300
+ "syntax",
58301
+ "forbidden-syntax",
58302
+ "forbidden-member",
58303
+ "unknown-filter",
58304
+ "ambiguous-field",
58305
+ "busy",
58306
+ "budget-exceeded",
58307
+ "timeout",
58308
+ "output-too-large",
58309
+ "render-failed",
58310
+ "out-of-scope",
58311
+ "unavailable"
58312
+ ]),
58313
+ message: z.string()
58314
+ });
58315
+ var DeviceTemplateTraceEntrySchema = z.object({
58316
+ ref: z.string(),
58317
+ reason: z.enum([
58318
+ "unknown-alias",
58319
+ "unknown-field",
58320
+ "no-field",
58321
+ "unavailable"
58322
+ ])
58323
+ });
58324
+ var DeviceTemplateRenderSchema = z.discriminatedUnion("ok", [z.object({
58325
+ ok: z.literal(true),
58326
+ text: z.string(),
58327
+ trace: z.array(DeviceTemplateTraceEntrySchema)
58328
+ }), z.object({
58329
+ ok: z.literal(false),
58330
+ refusal: DeviceTemplateRefusalSchema,
58331
+ trace: z.array(DeviceTemplateTraceEntrySchema)
58332
+ })]);
58333
+ /** A capability name as a template spells it: `temperature-sensor` → `temperature_sensor`. */
58334
+ function templateCapKey(cap) {
58335
+ return cap.replace(/-/g, "_");
58336
+ }
58337
+ function isRecord$3(value) {
58338
+ return typeof value === "object" && value !== null && !Array.isArray(value);
58339
+ }
58340
+ function pickPath(root, path) {
58341
+ let cursor = root;
58342
+ for (const part of path) if (Array.isArray(cursor) && typeof part === "number") cursor = cursor[part];
58343
+ else if (isRecord$3(cursor) && Object.hasOwn(cursor, String(part))) cursor = cursor[String(part)];
58344
+ else return;
58345
+ return cursor;
58346
+ }
58347
+ /**
58348
+ * Resolve the path after an alias. `<cap>.field…` when the first segment names
58349
+ * one of the device's caps; otherwise `field…` when exactly one cap carries a
58350
+ * field of that name; several caps carrying it is `ambiguous`, naming them.
58351
+ */
58352
+ function resolveTemplateRef(view, path) {
58353
+ const head = path[0];
58354
+ if (head === void 0) return {
58355
+ kind: "missing",
58356
+ reason: "no-field"
58357
+ };
58358
+ const caps = Object.keys(view.slices);
58359
+ const named = caps.find((cap) => cap === head || templateCapKey(cap) === head);
58360
+ if (named !== void 0) {
58361
+ const rest = path.slice(1);
58362
+ if (rest.length === 0) return {
58363
+ kind: "missing",
58364
+ reason: "no-field"
58365
+ };
58366
+ const value = pickPath(view.slices[named], rest);
58367
+ if (value === void 0) return {
58368
+ kind: "missing",
58369
+ reason: "unknown-field"
58370
+ };
58371
+ return {
58372
+ kind: "value",
58373
+ cap: named,
58374
+ fieldPath: rest,
58375
+ value
58376
+ };
58377
+ }
58378
+ const owners = caps.filter((cap) => {
58379
+ const slice = view.slices[cap];
58380
+ return isRecord$3(slice) && Object.hasOwn(slice, String(head));
58381
+ });
58382
+ if (owners.length === 0) return {
58383
+ kind: "missing",
58384
+ reason: "unknown-field"
58385
+ };
58386
+ const [only] = owners;
58387
+ if (owners.length > 1 || only === void 0) return {
58388
+ kind: "ambiguous",
58389
+ field: String(head),
58390
+ caps: owners
58391
+ };
58392
+ const value = pickPath(view.slices[only], path);
58393
+ if (value === void 0) return {
58394
+ kind: "missing",
58395
+ reason: "unknown-field"
58396
+ };
58397
+ return {
58398
+ kind: "value",
58399
+ cap: only,
58400
+ fieldPath: path,
58401
+ value
58402
+ };
58403
+ }
58404
+ /**
57950
58405
  * A SITE ZONE — a named part of the property that several locations belong to.
57951
58406
  *
57952
58407
  * "Night zone" holds every bedroom; "Zona giorno" the living room and the
@@ -58839,7 +59294,13 @@ var deviceManagerCapability = {
58839
59294
  * row + emits `EventCategory.DeviceMetaChanged`. */
58840
59295
  setName: method(z.object({
58841
59296
  deviceId: z.number(),
58842
- name: z.string()
59297
+ name: z.string(),
59298
+ /**
59299
+ * Absent or true: an operator rename, which stamps `userNamed`.
59300
+ * False: the system copying a block name onto the device. That write
59301
+ * must not look like the operator's, or the next reconcile freezes it.
59302
+ */
59303
+ stampUserNamed: z.boolean().optional()
58843
59304
  }), z.void(), {
58844
59305
  kind: "mutation",
58845
59306
  auth: "admin"
@@ -58868,6 +59329,38 @@ var deviceManagerCapability = {
58868
59329
  kind: "mutation",
58869
59330
  auth: "admin"
58870
59331
  }),
59332
+ /**
59333
+ * Render device value templates (D1021). The ONE door every consumer uses:
59334
+ * an action step, a scheduler point, a notification rule, a generated
59335
+ * automation block. Admin-only (an in-process block carries the mesh
59336
+ * principal): it reads device state by alias, so a non-admin never calls it
59337
+ * directly. `allowedDeviceIds` is the set the END caller was proven to see;
59338
+ * a template naming another device answers `out-of-scope`. Answers are
59339
+ * index-aligned with `templates`.
59340
+ */
59341
+ renderDeviceTemplates: method(z.object({
59342
+ templates: z.array(DeviceTemplateSchema).max(64),
59343
+ allowedDeviceIds: z.array(z.number().int()).optional()
59344
+ }), z.object({ results: z.array(DeviceTemplateRenderSchema) }), { auth: "admin" }),
59345
+ /**
59346
+ * Vet templates without rendering them: the syntax refusal, or the devices
59347
+ * each names and whether `allowedDeviceIds` covers them. The save door and
59348
+ * the run-time scope check both ask this.
59349
+ */
59350
+ checkDeviceTemplates: method(z.object({
59351
+ templates: z.array(z.string()).max(64),
59352
+ allowedDeviceIds: z.array(z.number().int()).optional()
59353
+ }), z.object({ results: z.array(z.discriminatedUnion("ok", [z.object({
59354
+ ok: z.literal(true),
59355
+ aliases: z.array(z.object({
59356
+ alias: z.string(),
59357
+ deviceId: z.number().int().nullable(),
59358
+ allowed: z.boolean()
59359
+ }))
59360
+ }), z.object({
59361
+ ok: z.literal(false),
59362
+ refusal: DeviceTemplateRefusalSchema
59363
+ })])) }), { auth: "admin" }),
58871
59364
  /** Update the operator-organisational location label. `null`
58872
59365
  * clears it. */
58873
59366
  setLocation: method(z.object({
@@ -63479,6 +63972,17 @@ var TIMED_RUN_DEVICE_TYPES = [DeviceType.Heater, DeviceType.PetFountain];
63479
63972
  function timedRunLimitOf(deviceType) {
63480
63973
  return TIMED_RUN_LIMITS[deviceType] ?? null;
63481
63974
  }
63975
+ var MS_PER_SECOND = 1e3;
63976
+ var MS_PER_MINUTE = 6e4;
63977
+ /**
63978
+ * Whole units left on an armed run. Minutes and seconds both ceil, and a run
63979
+ * that has not expired yet never reads as zero.
63980
+ */
63981
+ function timedRunRemaining(activeUntil, now, unit) {
63982
+ const left = activeUntil - now;
63983
+ if (left <= 0) return 0;
63984
+ return Math.max(1, Math.ceil(left / (unit === "min" ? MS_PER_MINUTE : MS_PER_SECOND)));
63985
+ }
63482
63986
  /** Seconds in a duration of `duration` `unit`. */
63483
63987
  function timedRunSeconds(duration, unit) {
63484
63988
  return unit === "min" ? duration * 60 : duration;
@@ -64018,7 +64522,13 @@ var HeroTimedRunSlotSchema = z.object({
64018
64522
  activeUntil: z.number().nullable(),
64019
64523
  quickRun: TimedRunQuickRunSchema,
64020
64524
  run: HeroActionSchema,
64021
- cancel: HeroActionSchema
64525
+ cancel: HeroActionSchema,
64526
+ /**
64527
+ * Whole units left (the limit's unit, ceil). `null` while nothing is armed.
64528
+ * A number, not words: the row formats it, and a text here would not fit the
64529
+ * hero-layout declaration.
64530
+ */
64531
+ remaining: z.number().nullable()
64022
64532
  });
64023
64533
  var HeroPowerSupplySlotSchema = z.object({
64024
64534
  /** The plug's state; `null` = unknown, never off. */
@@ -64137,18 +64647,31 @@ var HeroModelSchema = z.object({
64137
64647
  * 4. a trailing fact (power, else battery, else consumables).
64138
64648
  *
64139
64649
  * Selection rules, all taken from the model:
64140
- * - ONE control is ever shown: the device's own power; else the FIRST control of
64650
+ * - the primary control is the device's own power; else the FIRST control of
64141
64651
  * the FIRST row that has any (a later row's control is never promoted). When
64142
64652
  * the model lists that part in `gated`, the row has no inline control: the
64143
64653
  * projection never falls through to another control the caller could use.
64654
+ * - a timed run, when the model carries the slot, sits beside that primary:
64655
+ * Run while idle, Stop while armed. Gating the slot hides the control.
64144
64656
  * - the status line is the head (what plays, else the state) plus at most
64145
- * {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded;
64657
+ * {@link ROW_STATUS_FACTS_MAX} facts, the trailing fact excluded, then the
64658
+ * time left on an armed timed run;
64146
64659
  * - the trailing fact is the first of power, battery, consumables.
64147
64660
  *
64148
64661
  * `projectDeviceRow` is pure and computes nothing: it selects from a
64149
64662
  * {@link HeroModel}. A row that needed a value the hero lacks would mean the
64150
64663
  * model is missing it, so the fix goes in the model.
64151
64664
  */
64665
+ /**
64666
+ * The row's timed-run control. `id` is `timed-run.run` while idle and
64667
+ * `timed-run.cancel` while armed; `duration` and `unit` are the one-tap run
64668
+ * a Run press starts.
64669
+ */
64670
+ var HeroRowTimedRunSchema = z.object({
64671
+ id: z.enum(["timed-run.run", "timed-run.cancel"]),
64672
+ duration: z.number(),
64673
+ unit: z.enum(["min", "s"])
64674
+ });
64152
64675
  var HeroRowModelSchema = z.object({
64153
64676
  deviceId: z.number().int(),
64154
64677
  name: z.string(),
@@ -64161,6 +64684,11 @@ var HeroRowModelSchema = z.object({
64161
64684
  statusLine: z.array(HeroTextSchema),
64162
64685
  /** `null` = the type has no inline control, or the caller may not act on it. */
64163
64686
  primary: HeroControlSchema.nullable(),
64687
+ /**
64688
+ * Beside `primary` when the device offers a timed run: Run while idle, Stop
64689
+ * while armed. `null` when there is no slot, or the caller may not act.
64690
+ */
64691
+ timedRun: HeroRowTimedRunSchema.nullable(),
64164
64692
  trailing: HeroFactSchema.nullable()
64165
64693
  });
64166
64694
  /** The trailing fact, in order of preference. */
@@ -64197,7 +64725,30 @@ function primaryOf(model) {
64197
64725
  return null;
64198
64726
  }
64199
64727
  function statusLineOf(model, trailing) {
64200
- return [model.rows.find((r) => r.id === "now-playing")?.status ?? null ?? model.title, ...model.facts.filter((f) => f !== trailing).map((f) => f.text).slice(0, 3)];
64728
+ const head = model.rows.find((r) => r.id === "now-playing")?.status ?? null ?? model.title;
64729
+ const rest = model.facts.filter((f) => f !== trailing).map((f) => f.text).slice(0, 3);
64730
+ const slot = model.timedRun;
64731
+ if (slot === null || slot.remaining === null) return [head, ...rest];
64732
+ const word = slot.quickRun.unit === "min" ? "min" : "s";
64733
+ const left = {
64734
+ en: `${slot.remaining} ${word}`,
64735
+ it: `${slot.remaining} ${word}`
64736
+ };
64737
+ return [
64738
+ head,
64739
+ ...rest,
64740
+ left
64741
+ ];
64742
+ }
64743
+ /** Run while the slot is idle, Stop while it is armed. Hidden when the caller may not act. */
64744
+ function timedRunOf(model) {
64745
+ const slot = model.timedRun;
64746
+ if (slot === null || model.gated.includes("timed-run")) return null;
64747
+ return {
64748
+ id: slot.activeUntil === null ? "timed-run.run" : "timed-run.cancel",
64749
+ duration: slot.quickRun.duration,
64750
+ unit: slot.quickRun.unit
64751
+ };
64201
64752
  }
64202
64753
  function projectDeviceRow(model) {
64203
64754
  const trailing = trailingOf(model.facts);
@@ -64211,6 +64762,7 @@ function projectDeviceRow(model) {
64211
64762
  scene: model.scene,
64212
64763
  statusLine: statusLineOf(model, trailing),
64213
64764
  primary: primaryOf(model),
64765
+ timedRun: timedRunOf(model),
64214
64766
  trailing
64215
64767
  };
64216
64768
  }
@@ -97638,12 +98190,42 @@ function deriveBatteryPresence(input) {
97638
98190
  * priority-in-sync.ts` fails the build when either drifts — the comment that
97639
98191
  * used to ask for this could not.
97640
98192
  *
97641
- * The rule has two halves and the ORDER matters: an operator's explicit pick
97642
- * wins outright, and only in its absence does type priority decide. The pick is
97643
- * keyed on the child's re-sync-stable `entityId`, not its numeric id, so it
97644
- * survives a re-sync that reallocates ids.
98193
+ * The rule has three halves and the ORDER matters: an operator's explicit pick
98194
+ * wins outright; else a declaration on the device type
98195
+ * ({@link CONTAINER_PRIMARY_CHILD_RULES}); else role, namesake, then type
98196
+ * priority. The pick is keyed on the child's re-sync-stable `entityId`, not
98197
+ * its numeric id, so it survives a re-sync that reallocates ids.
97645
98198
  */
97646
98199
  /**
98200
+ * Device types that name their primary child. A heat pump stands for itself:
98201
+ * its hero is the system row, not the climate circuit that type-rank would
98202
+ * otherwise pick.
98203
+ */
98204
+ var CONTAINER_PRIMARY_CHILD_RULES = [{
98205
+ deviceType: DeviceType.HeatPump,
98206
+ primary: "self"
98207
+ }];
98208
+ /**
98209
+ * The type declaration, before the heuristic. `fall-through` means the
98210
+ * heuristic still decides: the type declared nothing, or it named a child
98211
+ * type that is not among the children.
98212
+ */
98213
+ function declaredChildType(primary) {
98214
+ if (primary === "self") return void 0;
98215
+ return primary.childType;
98216
+ }
98217
+ function applyPrimaryChildRule(rule, children) {
98218
+ if (rule === void 0) return { kind: "fall-through" };
98219
+ const childType = declaredChildType(rule.primary);
98220
+ if (childType === void 0) return { kind: "none" };
98221
+ const match = children.find((child) => child.type === childType);
98222
+ if (match === void 0) return { kind: "fall-through" };
98223
+ return {
98224
+ kind: "child",
98225
+ child: match
98226
+ };
98227
+ }
98228
+ /**
97647
98229
  * Type priority, most→least "primary". An actuator (climate / lock / cover / …)
97648
98230
  * outranks a bare `switch` so a container's defining child wins over its
97649
98231
  * auxiliary switches. Unknown or absent types sort after every entry.
@@ -97730,9 +98312,10 @@ function rank(type) {
97730
98312
  }
97731
98313
  /**
97732
98314
  * The child a container stands for: the operator's pick when it still exists,
97733
- * else the highest-priority type. `null` for a childless container — a caller
97734
- * must decide what an empty container means for it, rather than being handed a
97735
- * child that is not there.
98315
+ * else the device type's declaration, else the highest-priority type. `null`
98316
+ * for a childless container, and for a type that stands for itself — a caller
98317
+ * must decide what "no child" means for it, rather than being handed a child
98318
+ * that is not the device.
97736
98319
  */
97737
98320
  /**
97738
98321
  * Two names for the same thing, compared the way an integration writes them.
@@ -97761,11 +98344,14 @@ function sameName(childName, containerName) {
97761
98344
  const flatten = (v) => v.toLowerCase().replace(/[-_\s]+/g, " ").trim();
97762
98345
  return flatten(childName) === flatten(containerName);
97763
98346
  }
97764
- function resolveContainerPrimaryChild(children, overrideEntityId, containerName) {
98347
+ function resolveContainerPrimaryChild(children, overrideEntityId, containerName, containerType) {
97765
98348
  if (overrideEntityId !== void 0 && overrideEntityId !== null) {
97766
98349
  const picked = children.find((c) => c.stableId === overrideEntityId) ?? children.find((c) => c.entityId !== void 0 && c.entityId === overrideEntityId);
97767
98350
  if (picked !== void 0) return picked;
97768
98351
  }
98352
+ const declared = applyPrimaryChildRule(CONTAINER_PRIMARY_CHILD_RULES.find((entry) => entry.deviceType === containerType), children);
98353
+ if (declared.kind === "none") return null;
98354
+ if (declared.kind === "child") return declared.child;
97769
98355
  const namesake = (c) => containerName !== void 0 && containerName.length > 0 && c.name !== void 0 && sameName(c.name, containerName) ? 0 : 1;
97770
98356
  return [...children].toSorted((a, b) => roleRank(a.role) - roleRank(b.role) || namesake(a) - namesake(b) || rank(a.type) - rank(b.type))[0] ?? null;
97771
98357
  }
@@ -97813,7 +98399,7 @@ function expandContainer(id, byId, byParent, visited, out) {
97813
98399
  type: c.type,
97814
98400
  ...c.role !== void 0 && c.role !== null ? { role: c.role } : {},
97815
98401
  ...c.name !== void 0 ? { name: c.name } : {}
97816
- })), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name);
98402
+ })), byId.get(id)?.primaryChildEntityId, byId.get(id)?.name, candidate.type);
97817
98403
  if (primary !== null) expandContainer(primary.id, byId, byParent, nextVisited, out);
97818
98404
  }
97819
98405
  /**
@@ -99903,7 +100489,7 @@ var CLIMATE_FAMILY_CONTRIBUTIONS = {
99903
100489
  /**
99904
100490
  * The heat pump's contribution to a hero (D1026): the compressor scene, every
99905
100491
  * circuit as a row with its own label and icon, the powers as pills (the
99906
- * instantaneous COP only when both powers are known) and a "System" group with
100492
+ * instantaneous COP is "—" when it cannot be computed) and a "System" group with
99907
100493
  * one selector per mode. Values and their limits come from the slice, which the
99908
100494
  * gateway filled: a selector with no allowed value is not drawn, a missing
99909
100495
  * reading is never a 0 (D393).
@@ -99975,9 +100561,22 @@ function circuitRow(circuit) {
99975
100561
  };
99976
100562
  }
99977
100563
  var kilowatts = (watts) => `${Number((watts / 1e3).toFixed(2))} kW`;
100564
+ /** A COP that cannot be computed is still the pill: "—", never an absent reading (D393). */
100565
+ function copPill(cop) {
100566
+ if (cop === null) return {
100567
+ icon: "gauge",
100568
+ text: t("Instantaneous COP —", "COP istantaneo —"),
100569
+ tone: "muted"
100570
+ };
100571
+ const text = String(Number(cop.toFixed(1)));
100572
+ return {
100573
+ icon: "gauge",
100574
+ text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
100575
+ tone: "success"
100576
+ };
100577
+ }
99978
100578
  function powerPills(status) {
99979
100579
  const { thermalW, electricalW } = status.power;
99980
- const cop = heatPumpInstantCop(status.power);
99981
100580
  const pills = [];
99982
100581
  if (thermalW !== null) pills.push({
99983
100582
  icon: "flame",
@@ -99989,14 +100588,7 @@ function powerPills(status) {
99989
100588
  text: t(`Electrical ${kilowatts(electricalW)}`, `Elettrica ${kilowatts(electricalW)}`),
99990
100589
  tone: "muted"
99991
100590
  });
99992
- if (cop !== null) {
99993
- const text = String(Number(cop.toFixed(1)));
99994
- pills.push({
99995
- icon: "gauge",
99996
- text: t(`Instantaneous COP ${text}`, `COP istantaneo ${text}`),
99997
- tone: "success"
99998
- });
99999
- }
100591
+ pills.push(copPill(heatPumpInstantCop(status.power)));
100000
100592
  return pills;
100001
100593
  }
100002
100594
  /** The independent system modes, in the order the card draws them. */
@@ -100524,10 +101116,14 @@ function timerTile(quickRun) {
100524
101116
  value: t(text, text)
100525
101117
  };
100526
101118
  }
101119
+ function remainingWords(amount, unit) {
101120
+ const word = unit === "min" ? "min" : "s";
101121
+ return t(`${amount} ${word}`, `${amount} ${word}`);
101122
+ }
100527
101123
  var timedRunContribution = contribution("timed-run", TimedRunStatusSchema, (slice, ctx) => {
100528
101124
  const type = deviceTypeOf(ctx.type);
100529
- const limit = type === void 0 ? void 0 : TIMED_RUN_LIMITS[type];
100530
- if (limit === void 0) return {};
101125
+ const limit = type === void 0 ? null : timedRunLimitOf(type);
101126
+ if (limit === null) return {};
100531
101127
  const quickRun = slice?.quickRun ?? timedRunQuickRun(limit, null);
100532
101128
  const activeUntil = slice?.activeUntil != null && slice.activeUntil > ctx.now ? slice.activeUntil : null;
100533
101129
  const runArgs = {
@@ -100537,11 +101133,12 @@ var timedRunContribution = contribution("timed-run", TimedRunStatusSchema, (slic
100537
101133
  const run = action("timed-run.run", t(`Run ${quickRun.duration} ${quickRun.unit}`, `Avvia ${quickRun.duration} ${quickRun.unit}`), "timer", "timed-run", "runFor", runArgs, "primary");
100538
101134
  const cancel = action("timed-run.cancel", t("Stop", "Ferma"), "timer-off", "timed-run", "cancel");
100539
101135
  const restart = action("timed-run.restart", t("Restart", "Riavvia"), "rotate-cw", "timed-run", "runFor", runArgs);
100540
- const left = activeUntil === null ? 0 : Math.max(1, Math.ceil((activeUntil - ctx.now) / 6e4));
101136
+ const remaining = activeUntil === null ? null : timedRunRemaining(activeUntil, ctx.now, quickRun.unit);
101137
+ const words = remaining === null ? null : remainingWords(remaining, quickRun.unit);
100541
101138
  const row = {
100542
101139
  id: "run-for",
100543
101140
  icon: "timer",
100544
- status: activeUntil === null ? t(`Run for ${quickRun.duration} ${quickRun.unit}`, `Avvia per ${quickRun.duration} ${quickRun.unit}`) : t(`Stops in ${left} min`, `Si ferma tra ${left} min`),
101141
+ status: words === null ? t(`Run for ${quickRun.duration} ${quickRun.unit}`, `Avvia per ${quickRun.duration} ${quickRun.unit}`) : t(`Stops in ${words.en}`, `Si ferma tra ${words.it}`),
100545
101142
  controls: activeUntil === null ? [asAction(run)] : [asAction(cancel), asAction(restart)]
100546
101143
  };
100547
101144
  const armed = activeUntil === null ? {} : { right: [timerTile(quickRun)] };
@@ -100550,7 +101147,8 @@ var timedRunContribution = contribution("timed-run", TimedRunStatusSchema, (slic
100550
101147
  activeUntil,
100551
101148
  quickRun,
100552
101149
  run,
100553
- cancel
101150
+ cancel,
101151
+ remaining
100554
101152
  },
100555
101153
  rows: [row],
100556
101154
  tilesFallback: true,
@@ -104214,6 +104812,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
104214
104812
  access: "create",
104215
104813
  role: "admin"
104216
104814
  },
104815
+ "deviceManager.checkDeviceTemplates": {
104816
+ capName: "device-manager",
104817
+ capScope: "system",
104818
+ addonId: null,
104819
+ access: "view",
104820
+ role: "admin"
104821
+ },
104217
104822
  "deviceManager.cleanupDeletedDevicesData": {
104218
104823
  capName: "device-manager",
104219
104824
  capScope: "system",
@@ -104613,6 +105218,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
104613
105218
  access: "create",
104614
105219
  role: "admin"
104615
105220
  },
105221
+ "deviceManager.renderDeviceTemplates": {
105222
+ capName: "device-manager",
105223
+ capScope: "system",
105224
+ addonId: null,
105225
+ access: "view",
105226
+ role: "admin"
105227
+ },
104616
105228
  "deviceManager.reportDiscoveryObservations": {
104617
105229
  capName: "device-manager",
104618
105230
  capScope: "system",
@@ -112529,7 +113141,6 @@ function offered(received) {
112529
113141
  };
112530
113142
  }
112531
113143
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
112532
- z.string().min(1).max(4096);
112533
113144
  /**
112534
113145
  * Runtime list of cap names with status. Used by the settings
112535
113146
  * aggregator to enumerate caps whose `status` should be polled +
@@ -116099,6 +116710,12 @@ var SESSION_ONLY_POLICY = {
116099
116710
  durability: "session",
116100
116711
  volatileFields: []
116101
116712
  };
116713
+ /**
116714
+ * The unit a composed-device field row offers convert-unit from (D941, D944).
116715
+ */
116716
+ function runtimeFieldUnit(cap, path) {
116717
+ return CAP_RUNTIME_FIELD_UNITS[cap]?.[path];
116718
+ }
116102
116719
  var G711_SCALE_CORRECTION_DB = {
116103
116720
  PCMU: 20 * Math.log10(4),
116104
116721
  PCMA: 20 * Math.log10(8)
@@ -117902,4 +118519,4 @@ z.object({
117902
118519
  commands: z.record(z.string(), z.unknown())
117903
118520
  });
117904
118521
  //#endregion
117905
- export { EMPTY_AUTOMATION_STATE as $, templateCapability as $a, processTimeZoneOr as $i, coreBlocksCapability as $n, BaseAddon as $o, isDefaultAppConnectionEndpoint as $r, defineEntryKind as $s, SsoBridgeClaimsSchema as $t, ControlStatusSchema as A, scopesAllowDeviceCap as Aa, parseSecretRef as Ac, nextOccurrence as Ai, buildHeroModel as An, composedDeviceRef as Ao, fanControlCapability as Ar, StoredRecordKindDeclarationSchema as As, PREFERENCES_MAX_VALUE_BYTES as At, DEVICE_ENROLLMENT_TTL_MS as B, snapshotCapability as Ba, toNodeId as Bc, parseAcceleratorFactsJson as Bi, climateControlCapability as Bn, helperMembers as Bo, generateDeviceAlias as Br, assertValidDeclaration as Bs, REMOTE_MEDIA_COMMANDS as Bt, CORE_BLOCKS_ADDON_ID as C, resolveRunnerId as Ca, mapSecretLeaves as Cc, memoizePinnedFfmpeg as Ci, bareAddonId as Cn, HISTORY_FAST_MS as Co, enumerateSchemaFields as Cr, RecordIntegrationInstances as Cs, MINUTES_PER_DAY as Ct, CatalogFileSchema as D, runtimeStatePolicyFor as Da, normalizeSecretOwner as Dc, modeForSwitch as Di, buildCapabilityLookup as Dn, MINUTE_MS as Do, expandContainer as Dr, RecordUniqueViolationError as Ds, MigrationMetaSchema as Dt, CalendarPreferencesSchema as E, runSteps as Ea, normalizeNodeId as Ec, migrationsCapability as Ei, buildActionSteps as En, HelperMemberSchema as Eo, evictionPolicyOfLocation as Er, RecordTooLargeError as Es, MigrationLedgerEntrySchema as Et, DATABASE_SNAPSHOT_TIMEOUT_MS as F, sharedActuatorMethods as Fa, scopeKey as Fc, normalizeUnit as Fi, capUnitResolver as Fn, compositionSourceKey as Fo, findChannelSource as Fr, actionEffect as Fs, PreferenceDeviceIdSchema as Ft, DEVICE_SAN_USER_PREFIX as G, storageMigrationCapability as Ga, withoutCallerStamp as Gc, pickAppLinkHub as Gi, composerCapability as Gn, nextLocalMidnight as Go, internalActionId as Gr, collectSecretMarkerRefs as Gs, RunningStateStatusSchema as Gt, DEVICE_ID_FIELD as H, stableIdMapOf as Ha, transformSecretWrite as Hc, parseStreamParamsFormPatch as Hi, colorCapability as Hn, integrateReading as Ho, groupTemplate as Hr, buildSecretRef as Hs, RecordingStatusSchema as Ht, DATA_STORE_DATABASES as I, sharedColorModes as Ia, secretTreeFromPaths as Ic, objectInputDeclaresAddonId as Ii, catalogueIssues as In, createStatefulExpressionMemory as Io, foldSnapshotByFunction as Ir, asJsonObject as Is, PreferenceNamespaceSchema as It, DeclaredDevices as J, streamCatalogCapability as Ja, DeviceType as Jc, powerSourceCapability as Ji, consumablesCapability as Jn, planResetTier as Jo, isAlertEpisodeSeverity as Jr, commandOrigin as Js, STREAM_PROFILE_META as Jt, DEVICE_TOMBSTONE_RETENTION_MS as K, storageOccupancyCapability as Ka, DeviceFeature as Kc, planComposition as Ki, compositionFieldKey as Kn, openReset as Ko, interpolate as Kr, collectZodSecretPaths as Ks, STORAGE_ACCESS_FALLBACK as Kt, DAY_NAMES as L, shortHostname as La, secretTreeFromSchema as Lc, objectInputDeclaresRequiredDeviceId as Li, checkDeviceAlias as Ln, disarmRoseMemory as Lo, formatDeviceRevoker as Lr, asNumber as Ls, PreferenceValueSchema as Lt, CredentialTokenClaimsSchema as M, seedInstanceOnce as Ma, recordSecretRef as Mc, normalizeCapStep as Mi, calendarsCapability as Mn, compositionFeatureEnabled as Mo, fanPresetsCapability as Mr, UnindexedFilterError as Ms, PackageRequiresSchema as Mt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as N, settingsStoreCapability as Na, resolveCapMount as Nc, normalizeCoreBlockWrite as Ni, cameraGridLayoutCapability as Nn, compositionItemFieldPath as No, featureForwards as Nr, UnknownRecordKindError as Ns, PetFountainStatusSchema as Nt, ConditionMirror as O, schedulersCapability as Oa, parseJsonObject as Oc, modeMayWrite as Oi, buildDeviceEnrollmentLink as On, buildFfmpegArgs as Oo, expressionContainsBuiltinCall as Or, RevConflictError as Os, NetworkTunnelStartedDataSchema as Ot, DATABASE_SNAPSHOT_SUFFIX as P, sharedActuatorFeatures as Pa, resolveSecretMarkers as Pc, normalizeStepTargets as Pi, canonicalIconKey as Pn, compositionSliceKey as Po, filesystemBrowseCapability as Pr, WELL_KNOWN_TAB_MAP as Ps, PowerSourceInfoSchema as Pt, DiscoveryProposalBodySchema as Q, switchStateOfMode as Qa, procedureAuthKey as Qi, coreBlockSourceKind as Qn, wattMillisecondsToKwh as Qo, isCredentialTokenPayload as Qr, defineCustomActions as Qs, ServerNameSchema as Qt, DEFAULT_HOLD_OVERRIDE as R, siteFor as Ra, secretViewsOf as Rc, occurrenceOn as Ri, checkRoleAddress as Rn, evaluateDerivative as Ro, formatMinutes as Rr, asString$1 as Rs, QuantityUnitError as Rt, COMPOSER_RUNNER_ID as S, resolveRemoteSource as Sa, makeSecretMarker as Sc, mediaPlayerFeaturesOfRoles as Si, backupCapability as Sn, DEFAULT_HISTORY_RETENTION as So, enumerateItemArrayFields as Sr, ReadinessTimeoutError as Ss, MIGRATION_API_V1_METHODS as St, CREDENTIAL_TOKEN_AUDIENCE as T, runFanOut as Ta, nodePin as Tc, metricsProviderCapability as Ti, brightnessCapability as Tn, HOUR_MS as To, evaluateWhenTree as Tr, RecordNotFoundError as Ts, MediaPlayerStatusSchema as Tt, DEVICE_NONCE_TTL_MS as U, storageAdminCapability as Ua, userError as Uc, petFountainCapability as Ui, compareVersions as Un, isForwardInputRef as Uo, heroLayoutCapability as Ur, collectSecretConfigKeys as Us, RemoteAssumedStateSchema as Ut, DEVICE_HISTORY_ENERGY_KEY as V, splitTranslationRef as Va, toSecretFieldView as Vc, parseColorInput as Vi, collectWhenMirrorSources as Vn, historyRetentionFromSettings as Vo, groupCommandsCapability as Vr, auditedFields as Vs, ROOT_BUCKET_KEY as Vt, DEVICE_SAN_CREDENTIAL_PREFIX as W, storageCapability as Wa, vocabActionIdFor as Wc, petFountainWaterItem as Wi, compileScalarOverride as Wn, isHistoryHelper as Wo, integrationInstancesCapability as Wr, collectSecretLeaves as Ws, RemoteLayoutPayloadSchema as Wt, DeviceStatusSchema as X, supportedRuntimes as Xa, featuresOfBoundCaps as Xc, preconditionOf as Xi, coreBlockComposition as Xn, statisticCadenceMs as Xo, isArrayOutputSchema as Xr, customAction as Xs, SchedulerSchema as Xt, DeviceRunSchema as Y, streamQualityLabel as Ya, errMsg as Yc, powerSourceLinkOfComposition as Yi, coreBlockAddonId as Yn, planStatisticTier as Yo, isAppLinkBase as Yr, createEvent as Ys, SchedulerError as Yt, DeviceTombstoneSchema as Z, switchCapability as Za, EventCategory as Zc, problemsBlockSave as Zi, coreBlockIdFromAddonId as Zn, toExpressionValue as Zo, isCollectionArrayMethod as Zr, defineAddonMigrations as Zs, ScopedTokenSchema as Zt, CAMERA_SWITCH_ORDER as _, resolveHubAddressRoles as _a, isSecretClear as _c, logLevelAtMost as _i, alertEpisodePayload as _n, withLocationMode as _o, deviceRunsCapability as _r, RECORD_SWEEP_INTERVAL_MS as _s, KEYCHAIN_RESET_TRIGGER_ACTOR as _t, AGENT_MDNS_SERVICE_TYPE as a, recordsCapability as aa, formatSecretScope as ac, kebabToCamel as ai, TemplateKindSchema as an, toTimings as ao, declarationOwnerNodeId as ar, DeclarationRefusedError as as, FanDirectionSchema as at, CATALOG_LANGS as b, resolveMutate as ba, isSecretMarkerLike as bc, mayWriteToLocation as bi, armRemovalReconcile as bn, CompositionSchema as bo, deviceTransitionsCapability as br, RUNTIME_DEFAULTS as bs, LOG_LEVEL_RANK as bt, ActionError as c, remoteLayoutComponentsCapability as ca, historyUnitFor as cc, legacyAutoLinkIds as ci, UserRecordSchema as cn, validateComposition as co, defineExtensionSlotProvider as cr, ForeignSecretMarkerError as cs, FieldClaimSchema as ct, ActionVariableSchema as d, resolveActionVariables as da, isDebugChannelName as dc, localDateOf as di, actionsCapability as dn, valveCapability as do, describeUnmet as dr, NoCallerError as ds, HISTORY_ITEM_CATALOG as dt, projectDeviceRow as ea, defineRecordKinds as ec, isInternalActionId as ei, StorageCleanupJobSchema as en, timedRunCapability as eo, coverCapability as er, BatchTooLargeError as es, EMPTY_REMOTE_ASSUMED_STATE as et, AlertSchema as f, resolveAppConnections as fa, isDeviceConfigCap as fc, localNetworkCapability as fi, addonIdOfActionId as fn, vectorDimFromBase64 as fo, deviceCredentialsCapability as fr, PlaintextSecretError as fs, HUB_MDNS_SERVICE_TYPE as ft, BatteryStatusSchema as g, resolveHeroLayout as ga, isReadingQuantity as gc, logDestinationCapability as gi, alertEpisodeId as gn, withDefaultRunning as go, deviceRemovalHookCapability as gr, RECORD_SECRET_COLLECTION_PREFIX as gs, INTERNAL_ACTION_PREFIX as gt, BaseDevice as h, resolveCoreBlockFiles as ha, isKeychainStoredField as hc, lockDoorLinkOfComposition as hi, addonWidgetsCapability as hn, weekdayOfLocalDate as ho, deviceManagerCapability as hr, RECORD_DELETE_BATCH as hs, IDLE_ACTION_STATUS as ht, ACTUATOR_TEMPLATE_IDS as i, recordEntriesCapability as ia, expandCapMethods as ic, isVoidInput as ii, SwitchStatusSchema as in, timedRunSeconds as io, databaseSnapshotCapability as ir, DEVICE_STATUS_METHOD as is, FanControlStatusSchema as it, CoreBlockSchema as j, scoreRuntimes as ja, readinessKey as jc, normalizeActionUnits as ji, buildStreamParamsConfigSchema as jn, composedDeviceStableId as jo, fanOutTargets as jr, TransactRefusedError as js, PROPOSAL_MIN_SPAN_MS as jt, ConsumableItemSchema as k, scopesAllowAddon as ka, parseJsonUnknown as kc, motionCapability as ki, buildDeviceSignatureMessage as kn, cloneStatefulExpressionMemory as ko, extractNestedAddonId as kr, SECRET_CLEAR as ks, PET_FOUNTAIN_WATER_KEY as kt, ActionStepSchema as l, remoteSourceSteps as la, hydrateSchema as lc, legacyModeOf as li, actionSourceCapability as ln, validateCustomAddress as lo, deriveBatteryPresence as lr, HISTORY_DEFAULT_MIN_INTERVAL_MS as ls, GroupCommandResultSchema as lt, BUILTIN_REMOTE_COMPONENTS as m, resolveCoreBlockEntry as ma, isInstanceEnabled as mc, lockControlCapability as mi, addonSettingsCapability as mn, vectorStoreCapability as mo, deviceHistoryCapability as mr, RECORD_BATCH_MAX_BYTES as ms, HvacModeSchema as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, ptzAutotrackCapability as na, emitReadiness as nc, isObjectInput as ni, StorageLocationTypeSchema as nn, timedRunMaxIn as no, customKeyOfRole as nr, DATAPLANE_SECRET_HEADER as ns, FAN_CAPTURE_FIELDS as nt, AGENT_MDNS_TXT_KEYS as o, reducePoints as oa, getDebugInterest as oc, keychainAdminCapability as oi, TokenScopeSchema as on, unmetRequirements as oo, declaredSeriesKind as or, DeviceTransitionSchema as os, FanPresetSchema as ot, AutomationStateDocSchema as p, resolveBucketMs as pa, isEvent as pc, locationIconKey as pi, addonPagesCapability as pn, vectorIndexDimConflictError as po, deviceExtensionCapability as pr, RECORD_BATCH_MAX as ps, HUB_MDNS_TXT_KEYS as pt, DataStoreDatabaseSchema as q, storageProviderCapability as qa, DeviceRole as qc, platformProbeCapability as qi, compositionSourceRefs as qn, openStatistic as qo, isAlertEpisodeOpen as qr, commandEffect as qs, STORAGE_LOCATION_MODES as qt, ACTUATOR_METHODS as r, readStoredRemoteConfig as ra, entryBody as rc, isSameAddonId as ri, StorageMigrationJobSchema as rn, timedRunQuickRun as ro, dataStoreProviderCapability as rr, DEVICE_SETTINGS_CONTRIBUTION_METHODS as rs, FIRST_LEVEL_MACRO_CLASSES as rt, ALL_CAPABILITY_DEFINITIONS as s, remoteCapability as sa, historyItemFieldPath as sc, keychainCapability as si, UNATTRIBUTED_BUCKET_KEY as sn, userManagementCapability as so, decodeVectorBase64 as sr, FilterRequiredError as ss, FieldClaimModeSchema as st, ACTION_RUN_MAX_MS as t, proposeRunningThreshold as ta, emitDownForOwnedCaps as tc, isLocationEnabled as ti, StorageLocationModeSchema as tn, timedRunLimitOf as to, createDeviceExtensionProvider as tr, CALLER_STAMPED_CAPABILITIES as ts, EMPTY_REMOTE_CONFIG as tt, ActionTargetResolver as u, replacedFieldKeys as ua, isCommand as uc, lifecycleJobSchema as ui, actionWaitTotalMs as un, validateSchedulerInput as uo, describeComposableCaps as ur, InvalidRecordError as us, HISTORY_CATALOG as ut, CAMSTACK_APP_LINK_ORIGIN as v, resolveLocationMode as va, isSecretFieldView as vc, looseSchema as vi, alertsCapability as vn, zoneOnlySite as vo, deviceStateCapability as vr, REDACTED_SECRET as vs, KeychainAuditEntrySchema as vt, CORE_BLOCK_ADDON_PREFIX as w, resolveStepArgs as wa, nodeIdOfScopedKey as wc, methodRefusal as wi, batteryCapability as wn, HISTORY_SLOW_MS as wo, evaluateCompositionField as wr, RecordKindDeclarationSchema as ws, MOTION_CLOSE_AFTER_MS as wt, COMPOSED_ITEM_FIXED_FIELDS as x, resolveNotificationTapAddress as xa, isSecretRefOwnedBy as xc, mediaPlayerCapability as xi, authProviderCapability as xn, DAY_MS as xo, enumerateInferenceDevices as xr, ReadinessRegistry as xs, METHOD_ACCESS_MAP as xt, CAP_NAMES_WITH_STATUS as y, resolveMethodAuth as ya, isSecretMarker as yc, mayReadLocation as yi, appendTrace as yn, COMPOSER_ADDON_ID as yo, deviceStatusCapability as yr, REMOVE_LEAF as ys, KeychainResetRecordSchema as yt, DERIVED_CAMERA_SILENCED_CAP_NAMES as z, siteZoneKey as za, sleep as zc, orderMigrations as zi, checkTemplatePayload as zn, evaluateStatistic as zo, gbToBytes as zr, assertTransactScope as zs, RECORDING_SOURCE_CAMSTACK_ADDON as zt };
118522
+ export { DeviceStatusSchema as $, storageOccupancyCapability as $a, COMPOSED_DEVICE_STABLE_ID_PREFIX as $c, powerSourceCapability as $i, coreBlockAddonId as $n, openReset as $o, isAlertEpisodeSeverity as $r, collectZodSecretPaths as $s, SchedulerSchema as $t, ControlStatusSchema as A, resolveTemplateRef as Aa, mapSecretLeaves as Ac, metricsProviderCapability as Ai, buildCapabilityLookup as An, HISTORY_FAST_MS as Ao, evaluateWhenTree as Ar, RecordIntegrationInstances as As, MigrationMetaSchema as At, DEVICE_ENROLLMENT_TTL_MS as B, settingsStoreCapability as Ba, resolveCapMount as Bc, normalizeUnit as Bi, checkDeviceAlias as Bn, compositionItemFieldPath as Bo, findChannelSource as Br, UnknownRecordKindError as Bs, PreferenceValueSchema as Bt, CORE_BLOCKS_ADDON_ID as C, resolveLocationMode as Ca, isReadingQuantity as Cc, looseSchema as Ci, armRemovalReconcile as Cn, withDefaultRunning as Co, deviceStatusCapability as Cr, RECORD_SECRET_COLLECTION_PREFIX as Cs, LOG_LEVEL_RANK as Ct, CatalogFileSchema as D, resolveRemoteSource as Da, isSecretMarkerLike as Dc, mediaPlayerFeaturesOfRoles as Di, batteryCapability as Dn, CompositionSchema as Do, enumerateSchemaFields as Dr, RUNTIME_DEFAULTS as Ds, MOTION_CLOSE_AFTER_MS as Dt, CalendarPreferencesSchema as E, resolveNotificationTapAddress as Ea, isSecretMarker as Ec, mediaPlayerCapability as Ei, bareAddonId as En, COMPOSER_ADDON_ID as Eo, enumerateItemArrayFields as Er, REMOVE_LEAF as Es, MINUTES_PER_DAY as Et, DATABASE_SNAPSHOT_TIMEOUT_MS as F, schedulersCapability as Fa, parseJsonObject as Fc, nextOccurrence as Fi, calendarsCapability as Fn, buildFfmpegArgs as Fo, fanControlCapability as Fr, RevConflictError as Fs, PackageRequiresSchema as Ft, DEVICE_SAN_USER_PREFIX as G, siteFor as Ga, secretViewsOf as Gc, parseAcceleratorFactsJson as Gi, collectWhenMirrorSources as Gn, evaluateDerivative as Go, generateDeviceAlias as Gr, asString$1 as Gs, RecordingStatusSchema as Gt, DEVICE_ID_FIELD as H, sharedActuatorMethods as Ha, scopeKey as Hc, objectInputDeclaresRequiredDeviceId as Hi, checkTemplatePayload as Hn, compositionSourceKey as Ho, formatDeviceRevoker as Hr, actionEffect as Hs, RECORDING_SOURCE_CAMSTACK_ADDON as Ht, DATA_STORE_DATABASES as I, scopesAllowAddon as Ia, parseJsonUnknown as Ic, normalizeActionUnits as Ii, cameraGridLayoutCapability as In, cloneStatefulExpressionMemory as Io, fanOutTargets as Ir, SECRET_CLEAR as Is, PetFountainStatusSchema as It, DEVICE_TEMPLATE_MAX_OUTPUT as J, splitTranslationRef as Ja, toSecretFieldView as Jc, petFountainCapability as Ji, compileScalarOverride as Jn, historyRetentionFromSettings as Jo, heroLayoutCapability as Jr, auditedFields as Js, RunningStateStatusSchema as Jt, DEVICE_TEMPLATE_FILTERS as K, siteZoneKey as Ka, sleep as Kc, parseColorInput as Ki, colorCapability as Kn, evaluateStatistic as Ko, groupCommandsCapability as Kr, assertTransactScope as Ks, RemoteAssumedStateSchema as Kt, DAY_NAMES as L, scopesAllowDeviceCap as La, parseSecretRef as Lc, normalizeCapStep as Li, canonicalIconKey as Ln, composedDeviceRef as Lo, fanPresetsCapability as Lr, StoredRecordKindDeclarationSchema as Ls, PowerSourceInfoSchema as Lt, CredentialTokenClaimsSchema as M, runSteps as Ma, nodePin as Mc, modeForSwitch as Mi, buildDeviceSignatureMessage as Mn, HOUR_MS as Mo, expandContainer as Mr, RecordNotFoundError as Ms, PET_FOUNTAIN_WATER_KEY as Mt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as N, runtimeFieldUnit as Na, normalizeNodeId as Nc, modeMayWrite as Ni, buildHeroModel as Nn, HelperMemberSchema as No, expressionContainsBuiltinCall as Nr, RecordTooLargeError as Ns, PREFERENCES_MAX_VALUE_BYTES as Nt, ConditionMirror as O, resolveRunnerId as Oa, isSecretRefOwnedBy as Oc, memoizePinnedFfmpeg as Oi, brightnessCapability as On, DAY_MS as Oo, evaluateCompositionField as Or, ReadinessRegistry as Os, MediaPlayerStatusSchema as Ot, DATABASE_SNAPSHOT_SUFFIX as P, runtimeStatePolicyFor as Pa, normalizeSecretOwner as Pc, motionCapability as Pi, buildStreamParamsConfigSchema as Pn, MINUTE_MS as Po, extractNestedAddonId as Pr, RecordUniqueViolationError as Ps, PROPOSAL_MIN_SPAN_MS as Pt, DeviceRunSchema as Q, storageMigrationCapability as Qa, withoutCallerStamp as Qc, platformProbeCapability as Qi, consumablesCapability as Qn, nextLocalMidnight as Qo, isAlertEpisodeOpen as Qr, collectSecretMarkerRefs as Qs, SchedulerError as Qt, DEFAULT_HOLD_OVERRIDE as R, scoreRuntimes as Ra, readinessKey as Rc, normalizeCoreBlockWrite as Ri, capUnitResolver as Rn, composedDeviceStableId as Ro, featureForwards as Rr, TransactRefusedError as Rs, PreferenceDeviceIdSchema as Rt, COMPOSER_RUNNER_ID as S, resolveHubAddressRoles as Sa, isKeychainStoredField as Sc, logLevelAtMost as Si, appendTrace as Sn, weekdayOfLocalDate as So, deviceStateCapability as Sr, RECORD_DELETE_BATCH as Ss, KeychainResetRecordSchema as St, CREDENTIAL_TOKEN_AUDIENCE as T, resolveMutate as Ta, isSecretFieldView as Tc, mayWriteToLocation as Ti, backupCapability as Tn, zoneOnlySite as To, enumerateInferenceDevices as Tr, REDACTED_SECRET as Ts, MIGRATION_API_V1_METHODS as Tt, DEVICE_NONCE_TTL_MS as U, sharedColorModes as Ua, secretTreeFromPaths as Uc, occurrenceOn as Ui, climateControlCapability as Un, createStatefulExpressionMemory as Uo, formatMinutes as Ur, asJsonObject as Us, REMOTE_MEDIA_COMMANDS as Ut, DEVICE_HISTORY_ENERGY_KEY as V, sharedActuatorFeatures as Va, resolveSecretMarkers as Vc, objectInputDeclaresAddonId as Vi, checkRoleAddress as Vn, compositionSliceKey as Vo, foldSnapshotByFunction as Vr, WELL_KNOWN_TAB_MAP as Vs, QuantityUnitError as Vt, DEVICE_SAN_CREDENTIAL_PREFIX as W, shortHostname as Wa, secretTreeFromSchema as Wc, orderMigrations as Wi, collectDeviceTemplates as Wn, disarmRoseMemory as Wo, gbToBytes as Wr, asNumber as Ws, ROOT_BUCKET_KEY as Wt, DataStoreDatabaseSchema as X, storageAdminCapability as Xa, userError as Xc, pickAppLinkHub as Xi, compositionFieldKey as Xn, isForwardInputRef as Xo, internalActionId as Xr, collectSecretConfigKeys as Xs, STORAGE_LOCATION_MODES as Xt, DEVICE_TOMBSTONE_RETENTION_MS as Y, stableIdMapOf as Ya, transformSecretWrite as Yc, petFountainWaterItem as Yi, composerCapability as Yn, integrateReading as Yo, integrationInstancesCapability as Yr, buildSecretRef as Ys, STORAGE_ACCESS_FALLBACK as Yt, DeclaredDevices as Z, storageCapability as Za, vocabActionIdFor as Zc, planComposition as Zi, compositionSourceRefs as Zn, isHistoryHelper as Zo, interpolate as Zr, collectSecretLeaves as Zs, STREAM_PROFILE_META as Zt, CAMERA_SWITCH_ORDER as _, resolveAppConnections as _a, isCommand as _c, localNetworkCapability as _i, addonSettingsCapability as _n, validateSchedulerInput as _o, deviceExtensionCapability as _r, InvalidRecordError as _s, HvacModeSchema as _t, AGENT_MDNS_SERVICE_TYPE as a, projectDeviceRow as aa, defineCustomActions as ac, isInternalActionId as ai, EventCategory as al, StorageLocationTypeSchema as an, switchStateOfMode as ao, createDeviceExtensionProvider as ar, wattMillisecondsToKwh as as, FAN_CAPTURE_FIELDS as at, CATALOG_LANGS as b, resolveCoreBlockFiles as ba, isEvent as bc, lockDoorLinkOfComposition as bi, alertEpisodePayload as bn, vectorIndexDimConflictError as bo, deviceRemovalHookCapability as br, RECORD_BATCH_MAX as bs, KEYCHAIN_RESET_TRIGGER_ACTOR as bt, ActionError as c, readStoredRemoteConfig as ca, emitDownForOwnedCaps as cc, isSameAddonId as ci, TemplateKindSchema as cn, timedRunLimitOf as co, databaseSnapshotCapability as cr, CALLER_STAMPED_CAPABILITIES as cs, FanDirectionSchema as ct, ActionVariableSchema as d, reducePoints as da, expandCapMethods as dc, keychainAdminCapability as di, UserRecordSchema as dn, timedRunSeconds as do, decodeVectorBase64 as dr, DEVICE_STATUS_METHOD as ds, FieldClaimSchema as dt, powerSourceLinkOfComposition as ea, commandEffect as ec, isAppLinkBase as ei, DeviceFeature as el, ScopedTokenSchema as en, storageProviderCapability as eo, coreBlockComposition as er, openStatistic as es, DeviceTombstoneSchema as et, AlertSchema as f, remoteCapability as fa, formatSecretScope as fc, keychainCapability as fi, actionSourceCapability as fn, toTimings as fo, defineExtensionSlotProvider as fr, DeclarationRefusedError as fs, GroupCommandResultSchema as ft, BatteryStatusSchema as g, resolveActionVariables as ga, hydrateSchema as gc, localDateOf as gi, addonPagesCapability as gn, validateCustomAddress as go, deviceCredentialsCapability as gr, HISTORY_DEFAULT_MIN_INTERVAL_MS as gs, HUB_MDNS_TXT_KEYS as gt, BaseDevice as h, replacedFieldKeys as ha, historyUnitFor as hc, lifecycleJobSchema as hi, addonIdOfActionId as hn, validateComposition as ho, describeUnmet as hr, ForeignSecretMarkerError as hs, HUB_MDNS_SERVICE_TYPE as ht, ACTUATOR_TEMPLATE_IDS as i, processTimeZoneOr as ia, defineAddonMigrations as ic, isDefaultAppConnectionEndpoint as ii, featuresOfBoundCaps as il, StorageLocationModeSchema as in, switchCapability as io, coverCapability as ir, toExpressionValue as is, EMPTY_REMOTE_CONFIG as it, CoreBlockSchema as j, runFanOut as ja, nodeIdOfScopedKey as jc, migrationsCapability as ji, buildDeviceEnrollmentLink as jn, HISTORY_SLOW_MS as jo, evictionPolicyOfLocation as jr, RecordKindDeclarationSchema as js, NetworkTunnelStartedDataSchema as jt, ConsumableItemSchema as k, resolveStepArgs as ka, makeSecretMarker as kc, methodRefusal as ki, buildActionSteps as kn, DEFAULT_HISTORY_RETENTION as ko, evaluateStepCondition as kr, ReadinessTimeoutError as ks, MigrationLedgerEntrySchema as kt, ActionStepSchema as l, recordEntriesCapability as la, emitReadiness as lc, isVoidInput as li, TokenScopeSchema as ln, timedRunMaxIn as lo, declarationOwnerNodeId as lr, DATAPLANE_SECRET_HEADER as ls, FanPresetSchema as lt, BUILTIN_REMOTE_COMPONENTS as m, remoteSourceSteps as ma, historyItemFieldPath as mc, legacyModeOf as mi, actionsCapability as mn, userManagementCapability as mo, describeComposableCaps as mr, FilterRequiredError as ms, HISTORY_ITEM_CATALOG as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, problemsBlockSave as na, createEvent as nc, isCollectionArrayMethod as ni, DeviceType as nl, SsoBridgeClaimsSchema as nn, streamQualityLabel as no, coreBlockSourceKind as nr, planStatisticTier as ns, EMPTY_AUTOMATION_STATE as nt, AGENT_MDNS_TXT_KEYS as o, proposeRunningThreshold as oa, defineEntryKind as oc, isLocationEnabled as oi, StorageMigrationJobSchema as on, templateCapability as oo, customKeyOfRole as or, BaseAddon as os, FIRST_LEVEL_MACRO_CLASSES as ot, AutomationStateDocSchema as p, remoteLayoutComponentsCapability as pa, getDebugInterest as pc, legacyAutoLinkIds as pi, actionWaitTotalMs as pn, unmetRequirements as po, deriveBatteryPresence as pr, DeviceTransitionSchema as ps, HISTORY_CATALOG as pt, DEVICE_TEMPLATE_MAX_LENGTH as q, snapshotCapability as qa, toNodeId as qc, parseStreamParamsFormPatch as qi, compareVersions as qn, helperMembers as qo, groupTemplate as qr, assertValidDeclaration as qs, RemoteLayoutPayloadSchema as qt, ACTUATOR_METHODS as r, procedureAuthKey as ra, customAction as rc, isCredentialTokenPayload as ri, errMsg as rl, StorageCleanupJobSchema as rn, supportedRuntimes as ro, coreBlocksCapability as rr, statisticCadenceMs as rs, EMPTY_REMOTE_ASSUMED_STATE as rt, ALL_CAPABILITY_DEFINITIONS as s, ptzAutotrackCapability as sa, defineRecordKinds as sc, isObjectInput as si, SwitchStatusSchema as sn, timedRunCapability as so, dataStoreProviderCapability as sr, BatchTooLargeError as ss, FanControlStatusSchema as st, ACTION_RUN_MAX_MS as t, preconditionOf as ta, commandOrigin as tc, isArrayOutputSchema as ti, DeviceRole as tl, ServerNameSchema as tn, streamCatalogCapability as to, coreBlockIdFromAddonId as tr, planResetTier as ts, DiscoveryProposalBodySchema as tt, ActionTargetResolver as u, recordsCapability as ua, entryBody as uc, kebabToCamel as ui, UNATTRIBUTED_BUCKET_KEY as un, timedRunQuickRun as uo, declaredSeriesKind as ur, DEVICE_SETTINGS_CONTRIBUTION_METHODS as us, FieldClaimModeSchema as ut, CAMSTACK_APP_LINK_ORIGIN as v, resolveBucketMs as va, isDebugChannelName as vc, locationIconKey as vi, addonWidgetsCapability as vn, valveCapability as vo, deviceHistoryCapability as vr, NoCallerError as vs, IDLE_ACTION_STATUS as vt, CORE_BLOCK_ADDON_PREFIX as w, resolveMethodAuth as wa, isSecretClear as wc, mayReadLocation as wi, authProviderCapability as wn, withLocationMode as wo, deviceTransitionsCapability as wr, RECORD_SWEEP_INTERVAL_MS as ws, METHOD_ACCESS_MAP as wt, COMPOSED_ITEM_FIXED_FIELDS as x, resolveHeroLayout as xa, isInstanceEnabled as xc, logDestinationCapability as xi, alertsCapability as xn, vectorStoreCapability as xo, deviceRunsCapability as xr, RECORD_BATCH_MAX_BYTES as xs, KeychainAuditEntrySchema as xt, CAP_NAMES_WITH_STATUS as y, resolveCoreBlockEntry as ya, isDeviceConfigCap as yc, lockControlCapability as yi, alertEpisodeId as yn, vectorDimFromBase64 as yo, deviceManagerCapability as yr, PlaintextSecretError as ys, INTERNAL_ACTION_PREFIX as yt, DERIVED_CAMERA_SILENCED_CAP_NAMES as z, seedInstanceOnce as za, recordSecretRef as zc, normalizeStepTargets as zi, catalogueIssues as zn, compositionFeatureEnabled as zo, filesystemBrowseCapability as zr, UnindexedFilterError as zs, PreferenceNamespaceSchema as zt };