@camstack/server 1.2.841 → 1.2.843

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 (99) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/oauth2/oauth2-routes.js +50 -6
  3. package/dist/core/addon/addon-registry.service.js +4 -0
  4. package/dist/core/addon/addon-route-request.js +18 -0
  5. package/dist/main.js +8 -5
  6. package/package.json +9 -18
  7. package/system/dist/addon-routes/addon-route-registry.d.ts +27 -1
  8. package/system/dist/addon-runner.js +3 -1
  9. package/system/dist/addon-runner.mjs +3 -1
  10. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  11. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  12. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  13. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  14. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  15. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  16. package/system/dist/builtins/autotrack/index.js +1 -1
  17. package/system/dist/builtins/autotrack/index.mjs +1 -1
  18. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  19. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  20. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  21. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  22. package/system/dist/builtins/camera-grid/index.js +1 -1
  23. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  24. package/system/dist/builtins/composer/composer.addon.js +4 -4
  25. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  26. package/system/dist/builtins/console-logging/index.js +1 -1
  27. package/system/dist/builtins/console-logging/index.mjs +1 -1
  28. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  29. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  30. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  31. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  32. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  33. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  34. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  35. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  36. package/system/dist/builtins/keychain/index.js +4 -4
  37. package/system/dist/builtins/keychain/index.mjs +4 -4
  38. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  39. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  40. package/system/dist/builtins/local-auth/local-auth.addon.js +21 -7
  41. package/system/dist/builtins/local-auth/local-auth.addon.mjs +21 -7
  42. package/system/dist/builtins/local-auth/oauth-grants.d.ts +9 -1
  43. package/system/dist/builtins/local-auth/oauth-session-manager.d.ts +8 -0
  44. package/system/dist/builtins/local-auth/record-kinds.d.ts +2 -0
  45. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  46. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  47. package/system/dist/builtins/loki-logging/index.js +1 -1
  48. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  49. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  50. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  51. package/system/dist/builtins/platform-probe/index.js +1 -1
  52. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  53. package/system/dist/builtins/record-entries/index.js +1 -1
  54. package/system/dist/builtins/record-entries/index.mjs +1 -1
  55. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  56. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  57. package/system/dist/builtins/snapshot/index.js +1 -1
  58. package/system/dist/builtins/snapshot/index.mjs +1 -1
  59. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  60. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  61. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  63. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  64. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  65. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  66. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  67. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  68. package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
  69. package/system/dist/builtins/winston-logging/index.js +1 -1
  70. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  71. package/system/dist/{capture-engine-CGU4rnN-.js → capture-engine-BT9BCK3T.js} +1 -1
  72. package/system/dist/{capture-engine-CLrh3FG0.mjs → capture-engine-DIevRhU_.mjs} +1 -1
  73. package/system/dist/{composition-sources-bhWIz4Rp.js → composition-sources-BANqJW1j.js} +1 -1
  74. package/system/dist/{composition-sources-CoLbBru1.mjs → composition-sources-ByiNqtqC.mjs} +1 -1
  75. package/system/dist/{constants-DZwpZY5J.js → constants-6l3U2agy.js} +1 -1
  76. package/system/dist/{constants-CfAS4Qm6.mjs → constants-B7ZCfRiI.mjs} +1 -1
  77. package/system/dist/{device-ca-ksS811fC.js → device-ca-B6x-SNd5.js} +1 -1
  78. package/system/dist/{device-ca-CAbEBLyf.mjs → device-ca-BRzIzcHo.mjs} +1 -1
  79. package/system/dist/{dist-ByiDJLen.mjs → dist-CIih-HqD.mjs} +712 -84
  80. package/system/dist/{dist-DlRUArVs.js → dist-WNMdvnXD.js} +717 -83
  81. package/system/dist/file-host-worker.js +1 -1
  82. package/system/dist/file-host-worker.mjs +1 -1
  83. package/system/dist/{hub-identity-Bh28ooQx.mjs → hub-identity-0E4bXr1T.mjs} +1 -1
  84. package/system/dist/{hub-identity-C-1NeWlr.js → hub-identity-DNHQmALh.js} +1 -1
  85. package/system/dist/{hub-mdns-ciao-OWO6Bw-X.mjs → hub-mdns-ciao-0pnoEm4s.mjs} +2 -2
  86. package/system/dist/{hub-mdns-ciao-CL-Z9yMs.js → hub-mdns-ciao-CbIiNR-t.js} +2 -2
  87. package/system/dist/index.d.ts +1 -1
  88. package/system/dist/index.js +55 -9
  89. package/system/dist/index.mjs +54 -10
  90. package/system/dist/kernel/moleculer/child-addon-call-dispatch.d.ts +1 -0
  91. package/system/dist/{legacy-integration-rows-door-Be_QKUlY.mjs → legacy-integration-rows-door-BQKvWTO6.mjs} +1 -1
  92. package/system/dist/{legacy-integration-rows-door-CDPH26e8.js → legacy-integration-rows-door-Bb04BZ2c.js} +1 -1
  93. package/system/dist/{rename-composition-block-Bs5KT3Gn.js → rename-composition-block-CQAUtljP.js} +1 -1
  94. package/system/dist/{rename-composition-block-CncvFIHl.mjs → rename-composition-block-DF8RskLi.mjs} +1 -1
  95. package/system/dist/{restore-archive-CHUKcl3T.js → restore-archive-B2HPMYjR.js} +1 -1
  96. package/system/dist/{restore-archive-DX7kK3LQ.mjs → restore-archive-D1N1Ef6G.mjs} +82 -82
  97. package/system/dist/{wal-maintenance-Fibm7rsM.mjs → wal-maintenance-BgZyg4QK.mjs} +0 -0
  98. package/system/dist/{wal-maintenance-GNE9Oqdu.js → wal-maintenance-CCaPLd9x.js} +0 -0
  99. package/system/package.json +1 -1
@@ -1243,7 +1243,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1243
1243
  */
1244
1244
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1245
1245
  //#endregion
1246
- //#region ../types/dist/sleep-Bn346wCJ.mjs
1246
+ //#region ../types/dist/sleep-D0roI_CZ.mjs
1247
1247
  /**
1248
1248
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1249
1249
  * window to float samples (D455).
@@ -12508,6 +12508,10 @@ Object.freeze({
12508
12508
  "path": "lastEvent.eventType",
12509
12509
  "valueType": "string"
12510
12510
  },
12511
+ {
12512
+ "path": "lastEvent.sourceId",
12513
+ "valueType": "string"
12514
+ },
12511
12515
  {
12512
12516
  "path": "lastEvent.timestamp",
12513
12517
  "valueType": "number"
@@ -17259,6 +17263,21 @@ function describeUnmet(unmet) {
17259
17263
  }
17260
17264
  }
17261
17265
  /**
17266
+ * The integration instance of an addon, as it appears in an address or on an
17267
+ * OAuth link (planning#415, D1046).
17268
+ *
17269
+ * The DEFAULT instance has two spellings on the wire and one in the code: a
17270
+ * path with no instance segment and a link with no instance both mean it, and
17271
+ * its id is the addon id. {@link oauthLinkServesInstance} is the one
17272
+ * comparison a per-instance route is meant to call, so nobody compares
17273
+ * `undefined` with an id. The Alexa export's routes are its first caller.
17274
+ */
17275
+ /** An instance id as it may appear in a path or a query: no separator, no escape, bounded. */
17276
+ var ADDON_INSTANCE_ID_RE = /^[A-Za-z0-9._-]{1,64}$/;
17277
+ function isAddonInstanceId(value) {
17278
+ return ADDON_INSTANCE_ID_RE.test(value);
17279
+ }
17280
+ /**
17262
17281
  * notification-output — canonical, capability-gated notification delivery.
17263
17282
  *
17264
17283
  * Apprise-derived model (see
@@ -43177,6 +43196,41 @@ function anySubjectMatches(subjects, observed) {
43177
43196
  reason: subjects.length === 1 ? lastReason : `none of [${subjects.map(describeSubject).join(", ")}] matches (${observed.className || "unknown"})`
43178
43197
  };
43179
43198
  }
43199
+ var EventVocabularyKindSchema = z.enum([
43200
+ "press",
43201
+ "long-press",
43202
+ "long-press-start",
43203
+ "release",
43204
+ "repeat",
43205
+ "double-press",
43206
+ "other"
43207
+ ]);
43208
+ /** The part of the device an event comes from: a button, a channel. */
43209
+ var EventVocabularySourceSchema = z.object({
43210
+ id: z.string().min(1),
43211
+ label: z.string().min(1)
43212
+ });
43213
+ /** One scalar field of an event's `data`, by dotted path. */
43214
+ var EventVocabularyFieldSchema = z.object({
43215
+ path: z.string().min(1),
43216
+ kind: z.enum([
43217
+ "string",
43218
+ "number",
43219
+ "boolean",
43220
+ "enum"
43221
+ ]),
43222
+ enumValues: z.array(z.string()).optional(),
43223
+ label: z.string().min(1).optional()
43224
+ });
43225
+ var EventVocabularyEntrySchema = z.object({
43226
+ /** The native token, verbatim. */
43227
+ id: z.string().min(1),
43228
+ source: EventVocabularySourceSchema.optional(),
43229
+ label: z.string().min(1),
43230
+ description: z.string().optional(),
43231
+ kind: EventVocabularyKindSchema.optional(),
43232
+ payload: z.array(EventVocabularyFieldSchema).optional()
43233
+ });
43180
43234
  /**
43181
43235
  * Where the sun is, from a latitude and a longitude — the one solar
43182
43236
  * calculation in the repo. Compact NOAA sunrise equation (accurate to about a
@@ -43645,6 +43699,33 @@ var ScheduleLeafSchema = z.object({
43645
43699
  /** @deprecated legacy cron — new schedules use `at`. */
43646
43700
  cron: z.string().min(1).max(120).optional()
43647
43701
  }).refine((leaf) => leaf.at === void 0 !== (leaf.cron === void 0), { message: "a schedule names exactly one of `at` (a time spec) and `cron` (legacy)" }).refine((leaf) => leaf.days === void 0 || leaf.at !== void 0, { message: "`days` goes with `at`; a cron expression carries its own days" });
43702
+ /**
43703
+ * One payload predicate of a `device-fired` row: the value at `path` inside
43704
+ * the fire's `data` (dotted) equals `equals`. Compared strictly, no coercion.
43705
+ */
43706
+ var DeviceFiredMatchSchema = z.object({
43707
+ path: z.string().min(1).max(120),
43708
+ equals: z.union([
43709
+ z.string(),
43710
+ z.number(),
43711
+ z.boolean()
43712
+ ])
43713
+ });
43714
+ /**
43715
+ * "fires": one device of the `event-emitter` capability reported an event
43716
+ * (D1045). Every list is an OR, the lists together an AND; an absent list does
43717
+ * not narrow. `eventIds` are the device's own tokens, `sourceIds` the parts of
43718
+ * the device (a button), `kinds` the shared press kinds of its vocabulary.
43719
+ */
43720
+ var DeviceFiredLeafSchema = z.object({
43721
+ kind: z.literal("device-fired"),
43722
+ ...eventLeafId,
43723
+ deviceId: z.number().int().nonnegative(),
43724
+ eventIds: z.array(z.string().min(1)).min(1).max(64).optional(),
43725
+ sourceIds: z.array(z.string().min(1)).min(1).max(64).optional(),
43726
+ kinds: z.array(EventVocabularyKindSchema).min(1).optional(),
43727
+ match: z.array(DeviceFiredMatchSchema).min(1).max(8).optional()
43728
+ });
43648
43729
  var ManualLeafSchema = z.object({
43649
43730
  kind: z.literal("manual"),
43650
43731
  ...eventLeafId
@@ -43786,6 +43867,7 @@ var AutomationWhenSchema = z.lazy(() => z.discriminatedUnion("kind", [
43786
43867
  }),
43787
43868
  DeviceBecomesLeafSchema,
43788
43869
  DeviceEventLeafSchema,
43870
+ DeviceFiredLeafSchema,
43789
43871
  ScheduleLeafSchema,
43790
43872
  ManualLeafSchema,
43791
43873
  IntervalLeafSchema,
@@ -43800,6 +43882,7 @@ var AutomationWhenSchema = z.lazy(() => z.discriminatedUnion("kind", [
43800
43882
  var EVENT_KINDS = new Set([
43801
43883
  "device-becomes",
43802
43884
  "device-event",
43885
+ "device-fired",
43803
43886
  "schedule",
43804
43887
  "manual",
43805
43888
  "interval",
@@ -43884,6 +43967,7 @@ function hasEmptyContainer(node) {
43884
43967
  var LEAF_WORDS = {
43885
43968
  "device-becomes": "a device value that becomes",
43886
43969
  "device-event": "a device event",
43970
+ "device-fired": "a device firing an event",
43887
43971
  schedule: "a schedule",
43888
43972
  manual: "a manual run",
43889
43973
  interval: "an interval",
@@ -44149,9 +44233,12 @@ function convertLegacyWhen(half) {
44149
44233
  * every caller — automations, Actions, and the notification centre, which runs
44150
44234
  * only Actions (planning#473).
44151
44235
  */
44236
+ /** The longest one `wait` step lasts. It is cut by a restart of the run and does not survive a hub restart. */
44237
+ var WAIT_MAX_SECONDS = 3600;
44238
+ var WAIT_TOO_LONG = `a wait is at most one hour (${WAIT_MAX_SECONDS} s)`;
44152
44239
  var AutomationWaitStepSchema = z.object({
44153
44240
  kind: z.literal("wait"),
44154
- seconds: z.number().min(0).max(300)
44241
+ seconds: z.number().min(0).max(WAIT_MAX_SECONDS, WAIT_TOO_LONG)
44155
44242
  });
44156
44243
  /** The legacy `deviceId` of a cap step: still READ, never written (D983). */
44157
44244
  var LegacyStepDeviceSchema = z.union([
@@ -44281,20 +44368,210 @@ var ActionStepSchema = z.discriminatedUnion("kind", [GuardedWaitStepSchema, Guar
44281
44368
  path: ["if"]
44282
44369
  });
44283
44370
  });
44371
+ /**
44372
+ * Flow control of an AUTOMATION's list (#500). A standalone list (an action, a
44373
+ * scheduler point, a preset) stays `wait` and `cap`: it has no run of its own
44374
+ * to end and no variable bag to write.
44375
+ */
44376
+ var continueOnErrorShape = {
44377
+ /** A failure of this step is traced `failed-continued` and the next step runs. */
44378
+ continueOnError: z.literal(true).optional() };
44379
+ /** An automation's cap step: the shared guarded cap step, plus `continueOnError`. */
44380
+ var AutomationGuardedCapStepSchema = AutomationCapStepBaseSchema.extend({
44381
+ ...stepGuardShape,
44382
+ ...continueOnErrorShape
44383
+ }).refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44384
+ message: "a cap step needs a target",
44385
+ path: ["target"]
44386
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44387
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
44388
+ path: ["actionId"]
44389
+ }).refine((step) => step.else === void 0 || step.if !== void 0, elseNeedsIf);
44390
+ /** End the run here, on purpose. `reason` may carry `{{vars.x}}` slots. */
44391
+ var AutomationStopStepSchema = z.object({
44392
+ kind: z.literal("stop"),
44393
+ reason: z.string().min(1, "a stop needs a reason: it is what the run trace shows").max(200),
44394
+ /** `ok`: the run ends as a success. `failed`: it ends as a failure, with the reason. */
44395
+ outcome: z.enum(["ok", "failed"]),
44396
+ /** Stop only when this reads true; false or unknown does not stop. */
44397
+ if: AutomationWhenSchema.optional()
44398
+ });
44399
+ var SET_VAR_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]{0,39}$/;
44400
+ /** Names the run itself writes and reads (`leaf` is what `triggered-by` judges): a step may not overwrite them. */
44401
+ var RESERVED_RUN_VARS = [
44402
+ "kind",
44403
+ "leaf",
44404
+ "at"
44405
+ ];
44406
+ /**
44407
+ * Write variables into the run's bag, for the steps after it. SUBSTITUTION
44408
+ * only, never evaluation: a text value may carry `{{vars.x}}` slots.
44409
+ */
44410
+ var AutomationSetStepSchema = z.object({
44411
+ kind: z.literal("set"),
44412
+ vars: z.record(z.string(), z.union([
44413
+ z.string().max(500),
44414
+ z.number(),
44415
+ z.boolean()
44416
+ ])).refine((vars) => Object.keys(vars).every((name) => SET_VAR_NAME_RE.test(name)), { message: "a variable name is letters, digits and _, not starting with a digit (max 40)" }).refine((vars) => Object.keys(vars).length >= 1, { message: "set needs at least one variable" }).refine((vars) => Object.keys(vars).length <= 20, { message: `set holds at most 20 variables` }).refine((vars) => Object.keys(vars).every((name) => !RESERVED_RUN_VARS.includes(name)), { message: `the names ${RESERVED_RUN_VARS.join(", ")} belong to the run and cannot be set` }),
44417
+ /** Set only when this reads true; false or unknown leaves the bag as it is. */
44418
+ if: AutomationWhenSchema.optional()
44419
+ });
44420
+ var AutomationRunActionStepSchema = z.object({
44421
+ kind: z.literal("action"),
44422
+ /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
44423
+ actionId: z.string().min(1),
44424
+ /** Values for the action's declared variables; the others take their default. */
44425
+ variables: z.record(z.string(), z.union([
44426
+ z.string(),
44427
+ z.number(),
44428
+ z.boolean()
44429
+ ])).optional(),
44430
+ ...continueOnErrorShape
44431
+ });
44432
+ /**
44433
+ * A step INSIDE a branch of a `choose`: a flow step with no condition of its
44434
+ * own (the branch is the condition) and no block inside it. Strict, so an `if`
44435
+ * written on such a step is refused rather than dropped.
44436
+ */
44437
+ /** The longest a `wait-until` may wait: six hours. */
44438
+ var WAIT_UNTIL_TIMEOUT_MAX_S = 21600;
44439
+ /**
44440
+ * Pause the run until a condition is true (#500). The timeout is mandatory: a
44441
+ * run never waits without an end. `onTimeout` says what a wait that ran out
44442
+ * does: `continue` goes on to the next step, `stop` ends the run as a failure.
44443
+ * A condition that cannot be read is not "true": the wait goes on (D49).
44444
+ */
44445
+ var AutomationWaitUntilStepSchema = z.object({
44446
+ kind: z.literal("wait-until"),
44447
+ when: AutomationWhenSchema,
44448
+ timeoutS: z.number().int().min(1, "a wait needs a timeout of at least one second").max(WAIT_UNTIL_TIMEOUT_MAX_S, `a wait for a condition is at most six hours (${WAIT_UNTIL_TIMEOUT_MAX_S} s)`),
44449
+ onTimeout: z.enum(["continue", "stop"])
44450
+ }).strict();
44451
+ /** The step kinds that hold steps of their own, or pause on a condition: they nest two levels at most. */
44452
+ var BLOCK_STEP_KINDS = [
44453
+ "choose",
44454
+ "repeat",
44455
+ "parallel",
44456
+ "wait-until"
44457
+ ];
44458
+ var NEST_TOO_DEEP = `steps nest two levels at most: a step inside a nested choose or repeat can be a plain step only`;
44459
+ function kindOf(input) {
44460
+ return typeof input === "object" && input !== null ? Reflect.get(input, "kind") : void 0;
44461
+ }
44462
+ /** Where the nesting ends, a block step is refused in words rather than as an unknown kind. */
44463
+ function nestTooDeep(issue) {
44464
+ const kind = kindOf(issue.input);
44465
+ return typeof kind === "string" && BLOCK_STEP_KINDS.includes(kind) ? NEST_TOO_DEEP : void 0;
44466
+ }
44467
+ var plainStepSchemas = [
44468
+ AutomationWaitStepSchema.strict(),
44469
+ AutomationCapStepBaseSchema.extend(continueOnErrorShape).strict().refine((step) => step.target !== void 0 || step.deviceId !== void 0, {
44470
+ message: "a cap step needs a target",
44471
+ path: ["target"]
44472
+ }).refine((step) => step.target?.kind !== "domain" || step.actionId !== void 0, {
44473
+ message: "a domain target needs the vocabulary action it applies to (actionId)",
44474
+ path: ["actionId"]
44475
+ }),
44476
+ AutomationStopStepSchema.omit({ if: true }).strict(),
44477
+ AutomationSetStepSchema.omit({ if: true }).strict(),
44478
+ AutomationRunActionStepSchema.strict()
44479
+ ];
44480
+ /**
44481
+ * A plain step: a flow step with no condition of its own and no step inside
44482
+ * it. The second (last) level of nesting holds these only.
44483
+ */
44484
+ var AutomationBranchStepSchema = z.discriminatedUnion("kind", plainStepSchemas, { error: nestTooDeep });
44485
+ /** A step that can run beside others: it writes no variable and does not end the run. */
44486
+ var AutomationParallelMemberSchema = AutomationBranchStepSchema.refine((step) => step.kind === "cap" || step.kind === "action" || step.kind === "wait", "a parallel holds device commands, actions and waits only: a set or a stop beside other steps has no order");
44487
+ /**
44488
+ * Several steps at once (#500): all are started together and all are awaited.
44489
+ * A failure fails the run once the others finished, as in a sequence; a member
44490
+ * marked "continue if this fails" does not.
44491
+ */
44492
+ var AutomationParallelStepSchema = z.object({
44493
+ kind: z.literal("parallel"),
44494
+ steps: z.array(AutomationParallelMemberSchema).min(2, "a parallel needs at least two steps").max(5, `a parallel takes at most 5 steps`)
44495
+ }).strict();
44496
+ var REPEAT_NEEDS_MAX = "a repeat on a condition needs a maximum number of iterations";
44497
+ /** A loop on a condition: the bound is mandatory, so a run never loops without an end. */
44498
+ var repeatConditionShape = {
44499
+ when: AutomationWhenSchema,
44500
+ maxIterations: z.number({ error: REPEAT_NEEDS_MAX }).int().min(1, REPEAT_NEEDS_MAX).max(50, `a repeat on a condition runs at most 50 times`),
44501
+ /** A pause between two iterations, never after the last. */
44502
+ waitS: z.number().int().min(1).max(WAIT_MAX_SECONDS, WAIT_TOO_LONG).optional()
44503
+ };
44504
+ /** What decides how many times a `repeat` runs. */
44505
+ var AutomationRepeatLoopSchema = z.discriminatedUnion("by", [
44506
+ z.object({
44507
+ by: z.literal("count"),
44508
+ count: z.number().int().min(1).max(20, `a repeat runs at most 20 times`)
44509
+ }).strict(),
44510
+ z.object({
44511
+ by: z.literal("while"),
44512
+ ...repeatConditionShape
44513
+ }).strict(),
44514
+ z.object({
44515
+ by: z.literal("until"),
44516
+ ...repeatConditionShape
44517
+ }).strict(),
44518
+ z.object({
44519
+ by: z.literal("forEach"),
44520
+ target: z.object({
44521
+ kind: z.literal("devices"),
44522
+ ids: z.array(z.number().int()).min(1, "a repeat over devices needs at least one device").max(50, `a repeat over devices takes at most 50 devices`)
44523
+ }).strict()
44524
+ }).strict()
44525
+ ]);
44526
+ /**
44527
+ * The same steps several times (#500). Every form is bounded at save, so a
44528
+ * run cannot loop without an end. A failure or a `stop` in the steps ends the
44529
+ * loop and the run, as in a sequence.
44530
+ */
44531
+ function repeatSchemaOf(step) {
44532
+ return z.object({
44533
+ kind: z.literal("repeat"),
44534
+ loop: AutomationRepeatLoopSchema,
44535
+ steps: z.array(step).min(1, "a repeat needs at least one step").max(10, `a repeat takes at most 10 steps`)
44536
+ }).strict();
44537
+ }
44538
+ /**
44539
+ * One step, several ways (#500): the branches are read in order and the FIRST
44540
+ * whose condition is true runs; `else` runs when every branch is false. A
44541
+ * branch that cannot be read ends the choice: nothing runs, not the branches
44542
+ * after it and not the else (D49). The #472 `if` / `else` of a wait or cap
44543
+ * step is the one-branch case and stays as it is stored.
44544
+ */
44545
+ function chooseSchemaOf(step) {
44546
+ const steps = z.array(step).max(10);
44547
+ return z.object({
44548
+ kind: z.literal("choose"),
44549
+ branches: z.array(z.object({
44550
+ if: AutomationWhenSchema,
44551
+ steps: steps.min(1, "a branch needs at least one step")
44552
+ })).min(1, "a choose needs at least one branch").max(6, `a choose takes at most 6 branches`),
44553
+ else: steps.optional()
44554
+ });
44555
+ }
44556
+ var AutomationBodyStepSchema = z.discriminatedUnion("kind", [
44557
+ ...plainStepSchemas,
44558
+ AutomationWaitUntilStepSchema,
44559
+ AutomationParallelStepSchema,
44560
+ chooseSchemaOf(AutomationBranchStepSchema),
44561
+ repeatSchemaOf(AutomationBranchStepSchema)
44562
+ ]);
44563
+ var AutomationRepeatStepSchema = repeatSchemaOf(AutomationBodyStepSchema);
44564
+ var AutomationChooseStepSchema = chooseSchemaOf(AutomationBodyStepSchema);
44284
44565
  var AutomationActionSchema = z.discriminatedUnion("kind", [
44285
44566
  GuardedWaitStepSchema,
44286
- GuardedCapStepSchema,
44287
- z.object({
44288
- kind: z.literal("action"),
44289
- /** An entry of the `actions` surface (`internal:<uuid>` or `<addonId>:<localId>`). */
44290
- actionId: z.string().min(1),
44291
- /** Values for the action's declared variables; the others take their default. */
44292
- variables: z.record(z.string(), z.union([
44293
- z.string(),
44294
- z.number(),
44295
- z.boolean()
44296
- ])).optional()
44297
- }),
44567
+ AutomationGuardedCapStepSchema,
44568
+ AutomationStopStepSchema,
44569
+ AutomationSetStepSchema,
44570
+ AutomationChooseStepSchema,
44571
+ AutomationWaitUntilStepSchema,
44572
+ AutomationParallelStepSchema,
44573
+ AutomationRepeatStepSchema,
44574
+ AutomationRunActionStepSchema,
44298
44575
  z.object({
44299
44576
  kind: z.literal("code"),
44300
44577
  /** Compiled into the automation's OWN block by esbuild — not a third
@@ -44357,11 +44634,6 @@ function convertLegacyRecipe(legacy) {
44357
44634
  ...rest
44358
44635
  };
44359
44636
  }
44360
- /**
44361
- * Where recipes are PARSED (the core-blocks cap, the MCP tool, the literal a
44362
- * saved block carries): the new shape as it is, or the old shape converted to
44363
- * it. The output type is always the new one.
44364
- */
44365
44637
  var AutomationRecipeSchema = z.union([CurrentAutomationRecipeSchema, LegacyAutomationRecipeSchema.transform(convertLegacyRecipe)]);
44366
44638
  /**
44367
44639
  * A daily window as a STATE: is this instant inside it, and when does that
@@ -45032,6 +45304,16 @@ var BECOMES_DESCRIPTIONS = {
45032
45304
  from: "the value before the change, empty when it is not known",
45033
45305
  to: "the value it changed to"
45034
45306
  };
45307
+ /**
45308
+ * A fire's payload is offered too, as `data.<path>` (`{{vars.data.channel}}`):
45309
+ * those names depend on the device, so they are not in this list.
45310
+ */
45311
+ var FIRED_DESCRIPTIONS = {
45312
+ deviceId: "the device that fired",
45313
+ eventType: "the event, as the device names it",
45314
+ sourceId: "the part of the device that fired (a button), empty when it names none",
45315
+ eventKind: "the kind of press (press, long-press …), empty when the device declares none"
45316
+ };
45035
45317
  function describe$1(descriptions) {
45036
45318
  return Object.entries(descriptions).map(([name, description]) => ({
45037
45319
  name,
@@ -45040,12 +45322,74 @@ function describe$1(descriptions) {
45040
45322
  }
45041
45323
  describe$1(DETECTION_DESCRIPTIONS);
45042
45324
  describe$1(STATIONARY_DESCRIPTIONS);
45325
+ describe$1(FIRED_DESCRIPTIONS).map((v) => v.name === "deviceId" ? {
45326
+ ...v,
45327
+ hintKey: "firedDeviceId"
45328
+ } : v);
45043
45329
  describe$1(BECOMES_DESCRIPTIONS).map((v) => v.name === "deviceId" ? {
45044
45330
  ...v,
45045
45331
  hintKey: "becomesDeviceId"
45046
45332
  } : v);
45047
45333
  new Set(Object.values(COCO_TO_MACRO.mapping));
45048
45334
  /**
45335
+ * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
45336
+ * device. Carries the device's EXACT declared event vocabulary verbatim
45337
+ * (NO normalization). Two shapes:
45338
+ * - structured source (HA `event.*` entity) → `vocabulary` is the fixed
45339
+ * declared set (e.g. press_short, press_long, …).
45340
+ * - generic/legacy source (HA bus events, e.g. zha_event) → `vocabulary`
45341
+ * is [] (open) and `lastEvent.data` carries the complex payload.
45342
+ * `vocabulary` (D1044) names each event for a person and types it for a
45343
+ * rule; `eventTypes` is its list of native tokens, kept for older readers.
45344
+ * A fire names the part of the device it came from in `sourceId` when the
45345
+ * vocabulary declares sources (a remote's buttons).
45346
+ * `seq` is monotonic so two identical events still produce distinct slice writes.
45347
+ */
45348
+ var EventFireSchema = z.object({
45349
+ deviceId: z.number(),
45350
+ eventType: z.string(),
45351
+ sourceId: z.string().optional(),
45352
+ data: z.record(z.string(), z.unknown()).nullable(),
45353
+ timestamp: z.number().meta(readingMeta("none")),
45354
+ seq: z.number().meta(readingMeta("count"))
45355
+ });
45356
+ var EventEmitterStatusSchema = z.object({
45357
+ eventTypes: z.array(z.string()),
45358
+ /**
45359
+ * Required of a provider by the type. A status written before the field
45360
+ * existed still parses, as an empty vocabulary: read it through
45361
+ * `readEventVocabulary`, which then answers with the plain tokens.
45362
+ */
45363
+ vocabulary: z.array(EventVocabularyEntrySchema).default([]),
45364
+ lastEvent: EventFireSchema.nullable(),
45365
+ eventCountSinceStart: z.number().meta(readingMeta("count"))
45366
+ });
45367
+ var eventEmitterCapability = {
45368
+ name: "event-emitter",
45369
+ scope: "device",
45370
+ deviceNative: true,
45371
+ mode: "singleton",
45372
+ deviceTypes: [DeviceType.EventEmitter],
45373
+ methods: {},
45374
+ events: { onEvent: { data: EventFireSchema } },
45375
+ status: {
45376
+ schema: EventEmitterStatusSchema,
45377
+ kind: "push"
45378
+ },
45379
+ runtimeState: EventEmitterStatusSchema,
45380
+ /**
45381
+ * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
45382
+ *
45383
+ * See `RuntimeStateDurability`. Enforced by
45384
+ * `scripts/check-runtime-state-durability.ts`.
45385
+ */
45386
+ durability: "session",
45387
+ /**
45388
+ * History (D850): none — `eventCountSinceStart` resets with the addon; events live in ledgers.
45389
+ */
45390
+ history: "none"
45391
+ };
45392
+ /**
45049
45393
  * Save-time check of a `when` tree against the SITE: a `time-is` window
45050
45394
  * bounded by a sun event needs the site location, and any window needs a known
45051
45395
  * time zone. Refused before the save with a typed reason — at run time the
@@ -45125,12 +45469,16 @@ var HoldOverrideSchema = z.discriminatedUnion("mode", [z.object({ mode: z.litera
45125
45469
  var DEFAULT_HOLD_OVERRIDE = { mode: "respect" };
45126
45470
  /** A missed edge up to this late still runs. */
45127
45471
  var DEFAULT_MAX_LATE_MS = 10 * 6e4;
45472
+ var SchedulerStepSchema = ActionStepSchema.refine((step) => step.kind !== "wait" || step.seconds <= 300, {
45473
+ message: `a scheduler point waits at most five minutes (300 s); put a longer wait in an action`,
45474
+ path: ["seconds"]
45475
+ });
45128
45476
  var SchedulerPointSchema = z.object({
45129
45477
  id: z.string().min(1).max(64),
45130
45478
  at: SchedulerTimeSpecSchema,
45131
45479
  mode: SchedulerPointModeSchema,
45132
45480
  /** The actions of an `edge` or `hold`; a `release` has none. */
45133
- steps: z.array(ActionStepSchema).max(20).default([]),
45481
+ steps: z.array(SchedulerStepSchema).max(20).default([]),
45134
45482
  /** Checked when the point runs (an edge) or is applied (a hold). */
45135
45483
  conditions: SchedulerStateTreeSchema.optional(),
45136
45484
  /** Hold only; absent means `respect`. */
@@ -45432,6 +45780,7 @@ var AutomationConditionTraceNodeSchema = z.object({
45432
45780
  "triggered-by",
45433
45781
  "device-becomes",
45434
45782
  "device-event",
45783
+ "device-fired",
45435
45784
  "schedule",
45436
45785
  "interval",
45437
45786
  "manual",
@@ -45502,18 +45851,46 @@ var StepTraceBaseSchema = z.object({
45502
45851
  ]).optional(),
45503
45852
  /** Why the condition read what it read, in the evaluator's own words. */
45504
45853
  conditionReason: z.string().optional(),
45505
- /** `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. */
45854
+ /** `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. `failed-continued`: it failed and was marked to be passed over (#500). */
45506
45855
  outcome: z.enum([
45507
45856
  "ok",
45508
45857
  "error",
45509
45858
  "not-run",
45510
45859
  "empty",
45511
- "skipped"
45860
+ "skipped",
45861
+ "failed-continued",
45862
+ "timed-out"
45512
45863
  ]),
45513
45864
  message: z.string().optional()
45514
45865
  });
45866
+ /** What a block step adds to its row: which list ran, what each branch read, how many rounds. */
45867
+ var blockTraceShape = {
45868
+ /** A `choose` step (#500): the list that ran, `branches.<n>` or `else`. Absent when none did. */
45869
+ branch: z.string().optional(),
45870
+ /** A `choose` step: what each branch read, in order, up to the one that decided. */
45871
+ branchChecks: z.array(z.object({
45872
+ condition: z.enum([
45873
+ "true",
45874
+ "false",
45875
+ "unknown"
45876
+ ]),
45877
+ conditionReason: z.string().optional()
45878
+ })).optional(),
45879
+ /** A `repeat` step (#500): how many times its steps ran. */
45880
+ iterations: z.number().int().optional()
45881
+ };
45882
+ /** A step one level down: it may be a block step itself, whose own steps are plain rows (the nesting ends there). */
45883
+ var NestedStepTraceSchema = StepTraceBaseSchema.extend({
45884
+ ...blockTraceShape,
45885
+ steps: z.array(StepTraceBaseSchema).optional()
45886
+ });
45515
45887
  /** A step trace; the `else` steps that ran are one level of the same shape (the nesting is bounded at one). */
45516
- var AutomationStepTraceSchema = StepTraceBaseSchema.extend({ else: z.array(StepTraceBaseSchema).optional() });
45888
+ var AutomationStepTraceSchema = StepTraceBaseSchema.extend({
45889
+ else: z.array(StepTraceBaseSchema).optional(),
45890
+ ...blockTraceShape,
45891
+ /** A `choose` step: the steps of the list that ran. A `parallel`: its members. A `repeat`: the LAST iteration. */
45892
+ steps: z.array(NestedStepTraceSchema).optional()
45893
+ });
45517
45894
  var AutomationRunTraceSchema = z.object({
45518
45895
  runId: z.string().min(1),
45519
45896
  startedAt: z.number(),
@@ -45882,6 +46259,46 @@ async function evaluateStepCondition(when, fetchers, now = Date.now, history, si
45882
46259
  reason: first ?? "the condition does not hold"
45883
46260
  };
45884
46261
  }
46262
+ /**
46263
+ * Read the branches in order and stop at the first that decides: `true` runs
46264
+ * it, `unknown` ends the choice with nothing run (D49). All `false` runs the
46265
+ * else list, when there is one.
46266
+ */
46267
+ async function readChoose(choose) {
46268
+ const checks = [];
46269
+ for (const [index, branch] of choose.branches.entries()) {
46270
+ const verdict = await readGuard(branch.guard);
46271
+ checks.push({
46272
+ condition: verdict.result,
46273
+ conditionReason: verdict.reason
46274
+ });
46275
+ if (verdict.result === "true") return {
46276
+ checks,
46277
+ decision: {
46278
+ kind: "run",
46279
+ branch: `branches.${index}`,
46280
+ steps: branch.steps
46281
+ }
46282
+ };
46283
+ if (verdict.result === "unknown") return {
46284
+ checks,
46285
+ decision: {
46286
+ kind: "unknown",
46287
+ index,
46288
+ reason: verdict.reason
46289
+ }
46290
+ };
46291
+ }
46292
+ const otherwise = choose.otherwise ?? [];
46293
+ return {
46294
+ checks,
46295
+ decision: otherwise.length === 0 ? { kind: "none" } : {
46296
+ kind: "run",
46297
+ branch: "else",
46298
+ steps: otherwise
46299
+ }
46300
+ };
46301
+ }
45885
46302
  function errorMessage(err) {
45886
46303
  return err instanceof Error ? err.message : String(err);
45887
46304
  }
@@ -45896,17 +46313,105 @@ async function readGuard(guard) {
45896
46313
  };
45897
46314
  }
45898
46315
  }
46316
+ /** A loop condition that throws ends the loop as unreadable, never a crash of the run. */
46317
+ async function readRepeatCheck(check, iteration) {
46318
+ if (check === void 0) return { go: true };
46319
+ try {
46320
+ return await check(iteration);
46321
+ } catch (err) {
46322
+ return {
46323
+ go: false,
46324
+ reason: `the condition could not be read: ${errorMessage(err)}`,
46325
+ unknown: true
46326
+ };
46327
+ }
46328
+ }
46329
+ /** Run a loop's steps until its count, its condition, its bound, a failure, a stop or an abort ends it. */
46330
+ async function runRepeat(repeat, options, path) {
46331
+ let iterations = 0;
46332
+ let last;
46333
+ for (;;) {
46334
+ if (options.isAborted()) return {
46335
+ iterations,
46336
+ last,
46337
+ timedOut: false
46338
+ };
46339
+ const before = await readRepeatCheck(repeat.before, iterations);
46340
+ if (!before.go) return {
46341
+ iterations,
46342
+ last,
46343
+ ended: before.reason,
46344
+ timedOut: false,
46345
+ ...before.unknown === true ? { unknown: before.reason } : {}
46346
+ };
46347
+ if (iterations >= repeat.limit) return repeat.limitIsTimeout ? {
46348
+ iterations,
46349
+ last,
46350
+ ended: `stopped at ${repeat.limit} iterations`,
46351
+ timedOut: true
46352
+ } : {
46353
+ iterations,
46354
+ last,
46355
+ ended: "",
46356
+ timedOut: false
46357
+ };
46358
+ last = await runSteps(repeat.steps, {
46359
+ ...options,
46360
+ pathPrefix: `${path}.steps`,
46361
+ indexOffset: 0
46362
+ });
46363
+ iterations += 1;
46364
+ if (last.failed || last.aborted || last.stopped !== void 0) return {
46365
+ iterations,
46366
+ last,
46367
+ timedOut: false
46368
+ };
46369
+ const after = await readRepeatCheck(repeat.after, iterations - 1);
46370
+ if (!after.go) return {
46371
+ iterations,
46372
+ last,
46373
+ ended: after.reason,
46374
+ timedOut: false,
46375
+ ...after.unknown === true ? { unknown: after.reason } : {}
46376
+ };
46377
+ if (repeat.between !== void 0 && iterations < repeat.limit) await repeat.between();
46378
+ }
46379
+ }
45899
46380
  /** The else level of a trace is one level deep: a nested trace carries no `else` of its own. */
45900
46381
  function withoutElse(trace) {
45901
46382
  const { else: _else, ...rest } = trace;
45902
46383
  return rest;
45903
46384
  }
46385
+ /** A plain row: the last level of a trace carries no list of its own. */
46386
+ function plainRow(trace) {
46387
+ const { else: _else, steps: _steps, ...rest } = trace;
46388
+ return rest;
46389
+ }
46390
+ /** A row one level down: it keeps its own steps as plain rows, and no `else`. */
46391
+ function withoutNested(trace) {
46392
+ const { else: _else, steps, ...rest } = trace;
46393
+ return steps === void 0 ? rest : {
46394
+ ...rest,
46395
+ steps: steps.map(plainRow)
46396
+ };
46397
+ }
45904
46398
  async function runSteps(steps, options) {
45905
46399
  const traces = [];
45906
46400
  let failed = false;
45907
46401
  let aborted = false;
45908
- for (const [index, step] of steps.entries()) {
46402
+ let stopped;
46403
+ for (const [position, step] of steps.entries()) {
46404
+ const index = position + (options.indexOffset ?? 0);
45909
46405
  const path = `${options.pathPrefix}.${index}`;
46406
+ if (stopped !== void 0) {
46407
+ traces.push({
46408
+ ...step.meta,
46409
+ path,
46410
+ outcome: "not-run",
46411
+ message: `stopped at ${stopped.path}: ${stopped.reason}`
46412
+ });
46413
+ continue;
46414
+ }
45910
46415
  if (failed || aborted || options.isAborted()) {
45911
46416
  if (!failed) aborted = true;
45912
46417
  traces.push({
@@ -45918,6 +46423,96 @@ async function runSteps(steps, options) {
45918
46423
  continue;
45919
46424
  }
45920
46425
  const startedAt = options.now();
46426
+ if (step.parallel !== void 0) {
46427
+ const members = await Promise.all(step.parallel.map((member, at) => runSteps([member], {
46428
+ ...options,
46429
+ pathPrefix: `${path}.steps`,
46430
+ indexOffset: at
46431
+ })));
46432
+ const anyFailed = members.some((m) => m.failed);
46433
+ if (anyFailed) failed = true;
46434
+ else if (members.some((m) => m.aborted)) aborted = true;
46435
+ traces.push({
46436
+ ...step.meta,
46437
+ path,
46438
+ startedAt,
46439
+ endedAt: options.now(),
46440
+ outcome: anyFailed ? "error" : "ok",
46441
+ ...anyFailed ? { message: "a parallel step failed" } : {},
46442
+ steps: members.flatMap((m) => m.steps.map(withoutNested))
46443
+ });
46444
+ continue;
46445
+ }
46446
+ if (step.repeat !== void 0) {
46447
+ const loop = await runRepeat(step.repeat, options, path);
46448
+ const sub = loop.last;
46449
+ if (loop.unknown !== void 0) options.onGuardUnknown?.({
46450
+ index,
46451
+ path: `${path}.loop.when`,
46452
+ reason: loop.unknown,
46453
+ deviceId: step.meta.deviceId
46454
+ });
46455
+ const bodyFailed = loop.ended === void 0 && sub?.failed === true;
46456
+ if (bodyFailed) failed = true;
46457
+ else if (loop.ended === void 0 && sub?.stopped !== void 0) stopped = sub.stopped;
46458
+ else if (loop.ended === void 0) aborted = true;
46459
+ const times = `ran ${loop.iterations} times`;
46460
+ const message = bodyFailed ? `a step failed in iteration ${loop.iterations}` : loop.ended === void 0 ? times : loop.timedOut ? loop.ended : loop.ended === "" ? times : `${times}: ${loop.ended}`;
46461
+ traces.push({
46462
+ ...step.meta,
46463
+ path,
46464
+ startedAt,
46465
+ endedAt: options.now(),
46466
+ outcome: bodyFailed ? "error" : loop.timedOut ? "timed-out" : "ok",
46467
+ message,
46468
+ iterations: loop.iterations,
46469
+ ...sub === void 0 ? {} : { steps: sub.steps.map(withoutNested) }
46470
+ });
46471
+ continue;
46472
+ }
46473
+ if (step.choose !== void 0) {
46474
+ const reading = await readChoose(step.choose);
46475
+ const base = {
46476
+ ...step.meta,
46477
+ path,
46478
+ startedAt,
46479
+ branchChecks: [...reading.checks]
46480
+ };
46481
+ const { decision } = reading;
46482
+ if (decision.kind !== "run") {
46483
+ if (decision.kind === "unknown") options.onGuardUnknown?.({
46484
+ index,
46485
+ path: `${path}.branches.${decision.index}.if`,
46486
+ reason: decision.reason,
46487
+ deviceId: step.meta.deviceId
46488
+ });
46489
+ traces.push({
46490
+ ...base,
46491
+ endedAt: options.now(),
46492
+ outcome: "skipped",
46493
+ message: decision.kind === "unknown" ? `not run: branch ${decision.index + 1} could not be read (${decision.reason})` : "not run: no branch is true"
46494
+ });
46495
+ continue;
46496
+ }
46497
+ const listPath = decision.branch === "else" ? `${path}.else` : `${path}.${decision.branch}.steps`;
46498
+ const sub = await runSteps(decision.steps, {
46499
+ ...options,
46500
+ pathPrefix: listPath,
46501
+ indexOffset: 0
46502
+ });
46503
+ if (sub.failed) failed = true;
46504
+ else if (sub.aborted) aborted = true;
46505
+ if (sub.stopped !== void 0) stopped = sub.stopped;
46506
+ traces.push({
46507
+ ...base,
46508
+ endedAt: options.now(),
46509
+ outcome: sub.failed ? "error" : "ok",
46510
+ ...sub.failed ? { message: "a step of the branch failed" } : {},
46511
+ branch: decision.branch,
46512
+ steps: sub.steps.map(withoutNested)
46513
+ });
46514
+ continue;
46515
+ }
45921
46516
  let guardTrace = {};
45922
46517
  if (step.guard !== void 0) {
45923
46518
  const verdict = await readGuard(step.guard);
@@ -45947,10 +46542,12 @@ async function runSteps(steps, options) {
45947
46542
  }
45948
46543
  const sub = await runSteps(branch, {
45949
46544
  ...options,
45950
- pathPrefix: `${path}.else`
46545
+ pathPrefix: `${path}.else`,
46546
+ indexOffset: 0
45951
46547
  });
45952
46548
  if (sub.failed) failed = true;
45953
46549
  else if (sub.aborted) aborted = true;
46550
+ if (sub.stopped !== void 0) stopped = sub.stopped;
45954
46551
  traces.push({
45955
46552
  ...step.meta,
45956
46553
  ...guardTrace,
@@ -45968,6 +46565,7 @@ async function runSteps(steps, options) {
45968
46565
  let sent;
45969
46566
  const perDevice = [];
45970
46567
  let emptyReason;
46568
+ let timedOutReason;
45971
46569
  let templateNotes = [];
45972
46570
  const scope = {
45973
46571
  setDeviceId: (id) => {
@@ -45984,6 +46582,16 @@ async function runSteps(steps, options) {
45984
46582
  },
45985
46583
  setTemplateNotes: (notes) => {
45986
46584
  templateNotes = notes.slice(0, 20);
46585
+ },
46586
+ stop: (reason, outcome) => {
46587
+ stopped = {
46588
+ reason,
46589
+ outcome,
46590
+ path
46591
+ };
46592
+ },
46593
+ markTimedOut: (reason) => {
46594
+ timedOutReason = reason;
45987
46595
  }
45988
46596
  };
45989
46597
  const templatesTrace = () => templateNotes.length === 0 ? {} : { templates: [...templateNotes] };
@@ -45991,6 +46599,29 @@ async function runSteps(steps, options) {
45991
46599
  const devicesTrace = () => perDevice.length === 0 ? {} : { devices: perDevice.slice(0, 200) };
45992
46600
  try {
45993
46601
  await step.run(scope);
46602
+ const stop = (() => stopped)();
46603
+ if (stop !== void 0) {
46604
+ const message = `stopped: ${stop.reason}`;
46605
+ if (stop.outcome === "failed") {
46606
+ failed = true;
46607
+ options.onFailure({
46608
+ index,
46609
+ path,
46610
+ message,
46611
+ deviceId
46612
+ });
46613
+ }
46614
+ traces.push({
46615
+ ...step.meta,
46616
+ ...guardTrace,
46617
+ path,
46618
+ startedAt,
46619
+ endedAt: options.now(),
46620
+ outcome: stop.outcome === "failed" ? "error" : "ok",
46621
+ message
46622
+ });
46623
+ continue;
46624
+ }
45994
46625
  traces.push({
45995
46626
  ...step.meta,
45996
46627
  ...deviceId === void 0 || perDevice.length > 1 ? {} : { deviceId },
@@ -46001,18 +46632,27 @@ async function runSteps(steps, options) {
46001
46632
  path,
46002
46633
  startedAt,
46003
46634
  endedAt: options.now(),
46004
- outcome: emptyReason === void 0 ? "ok" : "empty",
46005
- ...emptyReason === void 0 ? {} : { message: emptyReason }
46635
+ outcome: timedOutReason !== void 0 ? "timed-out" : emptyReason === void 0 ? "ok" : "empty",
46636
+ ...timedOutReason !== void 0 ? { message: timedOutReason } : emptyReason === void 0 ? {} : { message: emptyReason }
46006
46637
  });
46007
46638
  } catch (err) {
46008
- failed = true;
46009
46639
  const message = errorMessage(err);
46010
- options.onFailure({
46640
+ const continued = step.continueOnError === true;
46641
+ if (continued) options.onContinuedFailure?.({
46011
46642
  index,
46012
46643
  path,
46013
46644
  message,
46014
46645
  deviceId
46015
46646
  });
46647
+ else {
46648
+ failed = true;
46649
+ options.onFailure({
46650
+ index,
46651
+ path,
46652
+ message,
46653
+ deviceId
46654
+ });
46655
+ }
46016
46656
  traces.push({
46017
46657
  ...step.meta,
46018
46658
  ...deviceId === void 0 || perDevice.length > 1 ? {} : { deviceId },
@@ -46023,7 +46663,7 @@ async function runSteps(steps, options) {
46023
46663
  path,
46024
46664
  startedAt,
46025
46665
  endedAt: options.now(),
46026
- outcome: "error",
46666
+ outcome: continued ? "failed-continued" : "error",
46027
46667
  message
46028
46668
  });
46029
46669
  }
@@ -46031,7 +46671,8 @@ async function runSteps(steps, options) {
46031
46671
  return {
46032
46672
  steps: traces,
46033
46673
  failed,
46034
- aborted: aborted && !failed
46674
+ aborted: aborted && !failed,
46675
+ ...stopped === void 0 ? {} : { stopped }
46035
46676
  };
46036
46677
  }
46037
46678
  function isVarRef(value) {
@@ -46039,7 +46680,8 @@ function isVarRef(value) {
46039
46680
  const keys = Object.keys(value);
46040
46681
  return keys.length === 1 && keys[0] === "$var" && typeof Reflect.get(value, "$var") === "string";
46041
46682
  }
46042
- var TEMPLATE_RE = /\{\{\s*vars\.([A-Za-z_][A-Za-z0-9_]*)\s*\}\}/g;
46683
+ /** `{{vars.name}}`, or a dotted name (`{{vars.data.channel}}`): the bag is flat, the dots are part of the key. */
46684
+ var TEMPLATE_RE = /\{\{\s*vars\.([A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*)\s*\}\}/g;
46043
46685
  /**
46044
46686
  * Substitute a step's args from the run's variables. SUBSTITUTION only, never
46045
46687
  * evaluation:
@@ -46089,7 +46731,7 @@ function newSlotNonce() {
46089
46731
  return Math.random().toString(36).slice(2, 12);
46090
46732
  }
46091
46733
  function slotPattern(nonce) {
46092
- return new RegExp(`${VAR_SLOT_OPEN}${nonce}:([A-Za-z_][A-Za-z0-9_]*)${VAR_SLOT_CLOSE}`, "g");
46734
+ return new RegExp(`${VAR_SLOT_OPEN}${nonce}:([A-Za-z_][A-Za-z0-9_.]*)${VAR_SLOT_CLOSE}`, "g");
46093
46735
  }
46094
46736
  /** True when a string, once its `{{vars.x}}` slots are set aside, still carries template markup. */
46095
46737
  function carriesDeviceTemplate(text) {
@@ -46803,7 +47445,9 @@ var AddonHttpRouteSchema = z.object({
46803
47445
  ]).optional(),
46804
47446
  description: z.string().optional(),
46805
47447
  /** The hub limits this route per client address before the handler runs. */
46806
- rateLimit: z.enum(["auth"]).optional()
47448
+ rateLimit: z.enum(["auth"]).optional(),
47449
+ /** Served once per integration instance; the handler reads `instanceId`. */
47450
+ perInstance: z.boolean().optional()
46807
47451
  });
46808
47452
  /**
46809
47453
  * Cross-process route invocation envelope. The hub captures the
@@ -46820,6 +47464,8 @@ var InvokeRequestSchema = z.object({
46820
47464
  query: z.record(z.string(), z.string()),
46821
47465
  body: z.unknown(),
46822
47466
  headers: z.record(z.string(), z.string()),
47467
+ /** The instance the hub resolved for a `perInstance` route. */
47468
+ instanceId: z.string().optional(),
46823
47469
  user: z.object({
46824
47470
  id: z.string(),
46825
47471
  username: z.string(),
@@ -63785,53 +64431,6 @@ var enumSensorCapability = {
63785
64431
  * whether persisting is worth a SQLite commit. */
63786
64432
  volatileStateFields: ["lastFetchedAt", "timestamp"]
63787
64433
  };
63788
- /**
63789
- * Generic stateless event emitter. Installed on a `DeviceType.EventEmitter`
63790
- * device. Carries the device's EXACT declared event vocabulary verbatim
63791
- * (NO normalization). Two shapes:
63792
- * - structured source (HA `event.*` entity) → `eventTypes` is the fixed
63793
- * declared vocabulary (e.g. ['press_short','press_long',...]).
63794
- * - generic/legacy source (HA bus events, e.g. zha_event) → `eventTypes`
63795
- * is [] (open) and `lastEvent.data` carries the complex payload.
63796
- * `seq` is monotonic so two identical events still produce distinct slice writes.
63797
- */
63798
- var EventFireSchema = z.object({
63799
- deviceId: z.number(),
63800
- eventType: z.string(),
63801
- data: z.record(z.string(), z.unknown()).nullable(),
63802
- timestamp: z.number().meta(readingMeta("none")),
63803
- seq: z.number().meta(readingMeta("count"))
63804
- });
63805
- var EventEmitterStatusSchema = z.object({
63806
- eventTypes: z.array(z.string()),
63807
- lastEvent: EventFireSchema.nullable(),
63808
- eventCountSinceStart: z.number().meta(readingMeta("count"))
63809
- });
63810
- var eventEmitterCapability = {
63811
- name: "event-emitter",
63812
- scope: "device",
63813
- deviceNative: true,
63814
- mode: "singleton",
63815
- deviceTypes: [DeviceType.EventEmitter],
63816
- methods: {},
63817
- events: { onEvent: { data: EventFireSchema } },
63818
- status: {
63819
- schema: EventEmitterStatusSchema,
63820
- kind: "push"
63821
- },
63822
- runtimeState: EventEmitterStatusSchema,
63823
- /**
63824
- * Runtime-state durability: **session** — `eventCountSinceStart` names its own scope.
63825
- *
63826
- * See `RuntimeStateDurability`. Enforced by
63827
- * `scripts/check-runtime-state-durability.ts`.
63828
- */
63829
- durability: "session",
63830
- /**
63831
- * History (D850): none — `eventCountSinceStart` resets with the addon; events live in ledgers.
63832
- */
63833
- history: "none"
63834
- };
63835
64434
  var IdentitySchema = z.object({
63836
64435
  id: z.string(),
63837
64436
  name: z.string(),
@@ -82632,7 +83231,18 @@ var OauthIntegrationDescriptorSchema = z.object({
82632
83231
  * The value is baked into the authorization code at `/authorize` and travels
82633
83232
  * on the tokens, so editing this field changes FUTURE links only.
82634
83233
  */
82635
- refreshTokenTtlSec: z.union([z.number().int().positive(), z.literal("never")]).optional()
83234
+ refreshTokenTtlSec: z.union([z.number().int().positive(), z.literal("never")]).optional(),
83235
+ /**
83236
+ * The integration instances an account can be linked to (planning#415),
83237
+ * beside the default one. `/api/oauth2/authorize?instance=<id>` is accepted
83238
+ * only for an id listed here; with no `instance=` the link is made to the
83239
+ * default instance, which is never listed and always accepted — it is the
83240
+ * address third parties already hold. Omit for a single-instance integration.
83241
+ */
83242
+ instances: z.array(z.object({
83243
+ id: z.string(),
83244
+ displayName: z.string()
83245
+ })).optional()
82636
83246
  });
82637
83247
  var oauthIntegrationCapability = {
82638
83248
  name: "oauth-integration",
@@ -91358,6 +91968,13 @@ var SsoBridgeClaimsSchema = z.object({
91358
91968
  /** OAuth authorization-code binding — set only on `oauth-code` tokens. */
91359
91969
  redirectUri: z.string().optional(),
91360
91970
  integrationId: z.string().optional(),
91971
+ /**
91972
+ * The integration INSTANCE an OAuth link was made for (planning#415). Set on
91973
+ * `oauth-code`, `oauth-access` and `oauth-refresh` tokens of a link made
91974
+ * with `instance=`; absent on a link to the default instance. A cloud relay
91975
+ * reads it off the access token to route; the hub answers from the session.
91976
+ */
91977
+ instanceId: z.string().optional(),
91361
91978
  /** JWT ID — unique per issued code; consumed-set enforces single-use. */
91362
91979
  jti: z.string().optional(),
91363
91980
  /** PKCE S256 challenge — set only on `oauth-code` tokens issued to a public
@@ -94329,6 +94946,8 @@ var OauthSessionSummarySchema = z.object({
94329
94946
  userId: z.string(),
94330
94947
  username: z.string(),
94331
94948
  integrationId: z.string(),
94949
+ /** The instance the link was made for; `null` = the default instance. */
94950
+ instanceId: z.string().nullable().optional(),
94332
94951
  scopes: z.array(TokenScopeSchema),
94333
94952
  createdAt: z.number(),
94334
94953
  lastUsedAt: z.number(),
@@ -94457,6 +95076,9 @@ var userManagementCapability = {
94457
95076
  }),
94458
95077
  oauthIssueCode: method(z.object({
94459
95078
  integrationId: z.string(),
95079
+ /** The integration instance the link is for. Omit for the default
95080
+ * instance — never pass the addon id to mean it. */
95081
+ instanceId: z.string().optional(),
94460
95082
  userId: z.string(),
94461
95083
  username: z.string(),
94462
95084
  scopes: z.array(TokenScopeSchema),
@@ -94498,7 +95120,13 @@ var userManagementCapability = {
94498
95120
  oauthVerifyAccessToken: method(z.object({ token: z.string() }), z.object({
94499
95121
  userId: z.string(),
94500
95122
  username: z.string(),
94501
- scopes: z.array(TokenScopeSchema)
95123
+ scopes: z.array(TokenScopeSchema),
95124
+ /** The instance the link was made for, read from the SESSION.
95125
+ * Absent = the default instance. `oauthLinkServesInstance` is the
95126
+ * helper a per-instance route calls to compare it with the instance
95127
+ * of its path; no route declares `perInstance` yet (the Alexa
95128
+ * per-instance route, T3, is the first consumer). */
95129
+ instanceId: z.string().optional()
94502
95130
  }).nullable(), { access: "view" }),
94503
95131
  listExternalIdentities: method(z.object({ userId: z.string() }), z.array(ExternalIdentitySchema), { auth: "admin" }),
94504
95132
  /** The user an identity is linked to, or `null`. */
@@ -120155,4 +120783,4 @@ z.object({
120155
120783
  commands: z.record(z.string(), z.unknown())
120156
120784
  });
120157
120785
  //#endregion
120158
- export { DeclaredDevices as $, settingsStoreCapability as $a, readinessKey as $c, objectInputDeclaresRequiredDeviceId as $i, compareVersions as $n, compositionFeatureEnabled as $o, generateDeviceAlias as $r, TransactRefusedError as $s, STORAGE_ACCESS_FALLBACK as $t, ConsumableItemSchema as A, resolveAppConnections as Aa, historyUnitFor as Ac, lockDoorLinkOfComposition as Ai, bareAddonId as An, validateCustomAddress as Ao, deviceStatusCapability as Ar, ForeignSecretMarkerError as As, MINUTES_PER_DAY as At, DEVICE_ENROLLMENT_TTL_MS as B, resolveRemoteSource as Ba, isSecretFieldView as Bc, metricsProviderCapability as Bi, cameraGridLayoutCapability as Bn, COMPOSER_ADDON_ID as Bo, expressionContainsBuiltinCall as Br, REDACTED_SECRET as Bs, PetFountainStatusSchema as Bt, COMPOSER_RUNNER_ID as C, recordsCapability as Ca, emitDownForOwnedCaps as Cc, legacyAutoLinkIds as Ci, alertEpisodeId as Cn, timedRunMaxIn as Co, deviceCredentialsCapability as Cr, CALLER_STAMPED_CAPABILITIES as Cs, INTERNAL_ACTION_PREFIX as Ct, CalendarPreferencesSchema as D, remoteSourceSteps as Da, formatSecretScope as Dc, localNetworkCapability as Di, armRemovalReconcile as Dn, unmetRequirements as Do, deviceRemovalHookCapability as Dr, DeclarationRefusedError as Ds, LOG_LEVEL_RANK as Dt, CREDENTIAL_TOKEN_AUDIENCE as E, remoteLayoutComponentsCapability as Ea, expandCapMethods as Ec, localDateOf as Ei, appendTrace as En, toTimings as Eo, deviceManagerCapability as Er, DEVICE_STATUS_METHOD as Es, KeychainResetRecordSchema as Et, DATABASE_SNAPSHOT_TIMEOUT_MS as F, resolveHubAddressRoles as Fa, isEvent as Fc, mayWriteToLocation as Fi, buildDeviceEnrollmentLink as Fn, vectorStoreCapability as Fo, evaluateCompositionField as Fr, RECORD_BATCH_MAX as Fs, NetworkTunnelStartedDataSchema as Ft, DEVICE_SAN_USER_PREFIX as G, runSteps as Ga, mapSecretLeaves as Gc, nextOccurrence as Gi, catalogueIssues as Gn, HISTORY_SLOW_MS as Go, fanPresetsCapability as Gr, RecordIntegrationInstances as Gs, QuantityUnitError as Gt, DEVICE_ID_FIELD as H, resolveStepArgs as Ha, isSecretMarkerLike as Hc, modeForSwitch as Hi, canonicalStoredDeviceType as Hn, DAY_MS as Ho, fanAxisPath as Hr, RUNTIME_DEFAULTS as Hs, PreferenceDeviceIdSchema as Ht, DATA_STORE_DATABASES as I, resolveLocationMode as Ia, isInstanceEnabled as Ic, mediaPlayerCapability as Ii, buildDeviceSignatureMessage as In, weekdayOfLocalDate as Io, evaluateStepCondition as Ir, RECORD_BATCH_MAX_BYTES as Is, PET_FOUNTAIN_WATER_KEY as It, DEVICE_TEMPLATE_MAX_OUTPUT as J, schedulersCapability as Ja, normalizeNodeId as Jc, normalizeCapStep as Ji, checkTemplatePayload as Jn, MINUTE_MS as Jo, findChannelSource as Jr, RecordTooLargeError as Js, ROOT_BUCKET_KEY as Jt, DEVICE_TEMPLATE_FILTERS as K, runtimeFieldUnit as Ka, nodeIdOfScopedKey as Kc, nextTimeBoundaryInMs as Ki, checkDeviceAlias as Kn, HOUR_MS as Ko, featureForwards as Kr, RecordKindDeclarationSchema as Ks, RECORDING_SOURCE_CAMSTACK_ADDON as Kt, DAY_NAMES as L, resolveMethodAuth as La, isKeychainStoredField as Lc, mediaPlayerFeaturesOfRoles as Li, buildHeroModel as Ln, withDefaultRunning as Lo, evaluateWhenTree as Lr, RECORD_DELETE_BATCH as Ls, PREFERENCES_MAX_VALUE_BYTES as Lt, CredentialTokenClaimsSchema as M, resolveCoreBlockEntry as Ma, isCommand as Mc, logLevelAtMost as Mi, brightnessCapability as Mn, valveCapability as Mo, enumerateInferenceDevices as Mr, InvalidRecordError as Ms, MediaPlayerStatusSchema as Mt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as N, resolveCoreBlockFiles as Na, isDebugChannelName as Nc, looseSchema as Ni, buildActionSteps as Nn, vectorDimFromBase64 as No, enumerateItemArrayFields as Nr, NoCallerError as Ns, MigrationLedgerEntrySchema as Nt, CatalogFileSchema as O, replacedFieldKeys as Oa, getDebugInterest as Oc, locationIconKey as Oi, authProviderCapability as On, userManagementCapability as Oo, deviceRunsCapability as Or, DeviceTransitionSchema as Os, METHOD_ACCESS_MAP as Ot, DATABASE_SNAPSHOT_SUFFIX as P, resolveHeroLayout as Pa, isDeviceConfigCap as Pc, mayReadLocation as Pi, buildCapabilityLookup as Pn, vectorIndexDimConflictError as Po, enumerateSchemaFields as Pr, PlaintextSecretError as Ps, MigrationMetaSchema as Pt, DataStoreDatabaseSchema as Q, seedInstanceOnce as Qa, parseSecretRef as Qc, objectInputDeclaresAddonId as Qi, colorCapability as Qn, composedDeviceStableId as Qo, gbToBytes as Qr, StoredRecordKindDeclarationSchema as Qs, RunningStateStatusSchema as Qt, DEFAULT_HOLD_OVERRIDE as R, resolveMutate as Ra, isReadingQuantity as Rc, memoizePinnedFfmpeg as Ri, buildStreamParamsConfigSchema as Rn, withLocationMode as Ro, evictionPolicyOfLocation as Rr, RECORD_SECRET_COLLECTION_PREFIX as Rs, PROPOSAL_MIN_SPAN_MS as Rt, COMPOSED_ITEM_FIXED_FIELDS as S, recordEntriesCapability as Sa, defineRecordKinds as Sc, keychainCapability as Si, addonWidgetsCapability as Sn, timedRunLimitOf as So, describeUnmet as Sr, BatchTooLargeError as Ss, IDLE_ACTION_STATUS as St, CORE_BLOCK_ADDON_PREFIX as T, remoteCapability as Ta, entryBody as Tc, lifecycleJobSchema as Ti, alertsCapability as Tn, timedRunSeconds as To, deviceHistoryCapability as Tr, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Ts, KeychainAuditEntrySchema as Tt, DEVICE_NONCE_TTL_MS as U, resolveTemplateRef as Ua, isSecretRefOwnedBy as Uc, modeMayWrite as Ui, capAppliesToDeviceKind as Un, DEFAULT_HISTORY_RETENTION as Uo, fanControlCapability as Ur, ReadinessRegistry as Us, PreferenceNamespaceSchema as Ut, DEVICE_HISTORY_ENERGY_KEY as V, resolveRunnerId as Va, isSecretMarker as Vc, migrationsCapability as Vi, canonicalIconKey as Vn, CompositionSchema as Vo, extractNestedAddonId as Vr, REMOVE_LEAF as Vs, PowerSourceInfoSchema as Vt, DEVICE_SAN_CREDENTIAL_PREFIX as W, runFanOut as Wa, makeSecretMarker as Wc, motionCapability as Wi, capUnitResolver as Wn, HISTORY_FAST_MS as Wo, fanOutTargets as Wr, ReadinessTimeoutError as Ws, PreferenceValueSchema as Wt, DEVICE_TEMPLATE_VALUES_CAP as X, scopesAllowDeviceCap as Xa, parseJsonObject as Xc, normalizeStepTargets as Xi, collectDeviceTemplates as Xn, cloneStatefulExpressionMemory as Xo, formatDeviceRevoker as Xr, RevConflictError as Xs, RemoteAssumedStateSchema as Xt, DEVICE_TEMPLATE_THIS_ALIAS as Y, scopesAllowAddon as Ya, normalizeSecretOwner as Yc, normalizeCoreBlockWrite as Yi, climateControlCapability as Yn, buildFfmpegArgs as Yo, foldSnapshotByFunction as Yr, RecordUniqueViolationError as Ys, RecordingStatusSchema as Yt, DEVICE_TOMBSTONE_RETENTION_MS as Z, scoreRuntimes as Za, parseJsonUnknown as Zc, normalizeUnit as Zi, collectWhenMirrorSources as Zn, composedDeviceRef as Zo, formatMinutes as Zr, SECRET_CLEAR as Zs, RemoteLayoutPayloadSchema as Zt, BatteryStatusSchema as _, projectDeviceRow as _a, createEvent as _c, isObjectInput as _i, DeviceRole as _l, actionWaitTotalMs as _n, supportedRuntimes as _o, declaredSeriesKind as _r, planStatisticTier as _s, HISTORY_CATALOG as _t, AGENT_MDNS_SERVICE_TYPE as a, petFountainCapability as aa, asNumber as ac, internalActionId as ai, secretTreeFromPaths as al, ServerNameSchema as an, siteFor as ao, consumablesCapability as ar, evaluateDerivative as as, EMPTY_REMOTE_ASSUMED_STATE as at, CAP_NAMES_WITH_STATUS as b, readStoredRemoteConfig as ba, defineCustomActions as bc, kebabToCamel as bi, featuresOfBoundCaps as bl, addonPagesCapability as bn, templateCapability as bo, deriveBatteryPresence as br, wattMillisecondsToKwh as bs, HUB_MDNS_TXT_KEYS as bt, ActionError as c, planComposition as ca, assertValidDeclaration as cc, isAlertEpisodeSeverity as ci, sleep as cl, StorageCleanupJobSchema as cn, splitTranslationRef as co, coreBlockIdFromAddonId as cr, historyRetentionFromSettings as cs, FAN_OSCILLATION_AXES as ct, ActionTargetResolver as d, powerSourceCapability as da, collectSecretConfigKeys as dc, isCollectionArrayMethod as di, transformSecretWrite as dl, StorageMigrationJobSchema as dn, storageCapability as do, coverCapability as dr, isForwardInputRef as ds, FanControlStatusSchema as dt, occurrenceOn as ea, UnindexedFilterError as ec, groupCommandsCapability as ei, recordSecretRef as el, STORAGE_LOCATION_MODES as en, settleDeviceFeatures as eo, compileScalarOverride as er, compositionItemFieldPath as es, DeviceRunSchema as et, ActionVariableSchema as f, powerSourceLinkOfComposition as fa, collectSecretLeaves as fc, isCredentialTokenPayload as fi, userError as fl, TemplateKindSchema as fn, storageMigrationCapability as fo, createDeviceExtensionProvider as fr, isHistoryHelper as fs, FanDirectionSchema as ft, BaseDevice as g, processTimeZoneOr as ga, commandOrigin as gc, isLocationEnabled as gi, DeviceFeature as gl, actionSourceCapability as gn, streamQualityLabel as go, declarationOwnerNodeId as gr, planResetTier as gs, GroupCommandResultSchema as gt, BUILTIN_REMOTE_COMPONENTS as h, procedureAuthKey as ha, commandEffect as hc, isKernelDerivedFeature as hi, COMPOSED_DEVICE_STABLE_ID_PREFIX as hl, UserRecordSchema as hn, streamCatalogCapability as ho, databaseSnapshotCapability as hr, openStatistic as hs, FieldClaimSchema as ht, ACTUATOR_TEMPLATE_IDS as i, parseStreamParamsFormPatch as ia, asJsonObject as ic, integrationInstancesCapability as ii, scopeKey as il, ScopedTokenSchema as in, shortHostname as io, compositionUnionReads as ir, disarmRoseMemory as is, EMPTY_AUTOMATION_STATE as it, CoreBlockSchema as j, resolveBucketMs as ja, hydrateSchema as jc, logDestinationCapability as ji, batteryCapability as jn, validateSchedulerInput as jo, deviceTransitionsCapability as jr, HISTORY_DEFAULT_MIN_INTERVAL_MS as js, MOTION_CLOSE_AFTER_MS as jt, ConditionMirror as k, resolveActionVariables as ka, historyItemFieldPath as kc, lockControlCapability as ki, backupCapability as kn, validateComposition as ko, deviceStateCapability as kr, FilterRequiredError as ks, MIGRATION_API_V1_METHODS as kt, ActionMinDelaySecSchema as l, platformProbeCapability as la, auditedFields as lc, isAppLinkBase as li, toNodeId as ll, StorageLocationModeSchema as ln, stableIdMapOf as lo, coreBlockSourceKind as lr, implementedMethodsOf as ls, FAN_OSCILLATION_AXIS_SETTABLE as lt, AutomationStateDocSchema as m, problemsBlockSave as ma, collectZodSecretPaths as mc, isInternalActionId as mi, withoutCallerStamp as ml, UNATTRIBUTED_BUCKET_KEY as mn, storageProviderCapability as mo, dataStoreProviderCapability as mr, openReset as ms, FieldClaimModeSchema as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, parseAcceleratorFactsJson as na, WELL_KNOWN_TAB_MAP as nc, hasTimeLeaves as ni, resolveSecretMarkers as nl, SchedulerError as nn, sharedActuatorMethods as no, compositionFieldKey as nr, compositionSourceKey as ns, DeviceTombstoneSchema as nt, AGENT_MDNS_TXT_KEYS as o, petFountainWaterItem as oa, asString$1 as oc, interpolate as oi, secretTreeFromSchema as ol, SetOscillationAxisInputSchema as on, siteZoneKey as oo, coreBlockAddonId as or, evaluateStatistic as os, EMPTY_REMOTE_CONFIG as ot, AlertSchema as p, preconditionOf as pa, collectSecretMarkerRefs as pc, isDefaultAppConnectionEndpoint as pi, vocabActionIdFor as pl, TokenScopeSchema as pn, storageOccupancyCapability as po, customKeyOfRole as pr, nextLocalMidnight as ps, FanPresetSchema as pt, DEVICE_TEMPLATE_MAX_LENGTH as q, runtimeStatePolicyFor as qa, nodePin as qc, normalizeActionUnits as qi, checkRoleAddress as qn, HelperMemberSchema as qo, filesystemBrowseCapability as qr, RecordNotFoundError as qs, REMOTE_MEDIA_COMMANDS as qt, ACTUATOR_METHODS as r, parseColorInput as ra, actionEffect as rc, heroLayoutCapability as ri, ruleFireOfClaim as rl, SchedulerSchema as rn, sharedColorModes as ro, compositionSourceRefs as rr, createStatefulExpressionMemory as rs, DiscoveryProposalBodySchema as rt, ALL_CAPABILITY_DEFINITIONS as s, pickAppLinkHub as sa, assertTransactScope as sc, isAlertEpisodeOpen as si, secretViewsOf as sl, SsoBridgeClaimsSchema as sn, snapshotCapability as so, coreBlockComposition as sr, helperMembers as ss, FAN_CAPTURE_FIELDS as st, ACTION_RUN_MAX_MS as t, orderMigrations as ta, UnknownRecordKindError as tc, groupTemplate as ti, resolveCapMount as tl, STREAM_PROFILE_META as tn, sharedActuatorFeatures as to, composerCapability as tr, compositionSliceKey as ts, DeviceStatusSchema as tt, ActionStepSchema as u, powerSourceActuatorConflicts as ua, buildSecretRef as uc, isArrayOutputSchema as ui, toSecretFieldView as ul, StorageLocationTypeSchema as un, storageAdminCapability as uo, coreBlocksCapability as ur, integrateReading as us, FIRST_LEVEL_MACRO_CLASSES as ut, CAMERA_SWITCH_ORDER as v, proposeRunningThreshold as va, customAction as vc, isSameAddonId as vi, DeviceType as vl, actionsCapability as vn, switchCapability as vo, decodeVectorBase64 as vr, statisticCadenceMs as vs, HISTORY_ITEM_CATALOG as vt, CORE_BLOCKS_ADDON_ID as w, reducePoints as wa, emitReadiness as wc, legacyModeOf as wi, alertEpisodePayload as wn, timedRunQuickRun as wo, deviceExtensionCapability as wr, DATAPLANE_SECRET_HEADER as ws, KEYCHAIN_RESET_TRIGGER_ACTOR as wt, CATALOG_LANGS as x, reconcileReportedFeatures as xa, defineEntryKind as xc, keychainAdminCapability as xi, EventCategory as xl, addonSettingsCapability as xn, timedRunCapability as xo, describeComposableCaps as xr, BaseAddon as xs, HvacModeSchema as xt, CAMSTACK_APP_LINK_ORIGIN as y, ptzAutotrackCapability as ya, defineAddonMigrations as yc, isVoidInput as yi, errMsg as yl, addonIdOfActionId as yn, switchStateOfMode as yo, defineExtensionSlotProvider as yr, toExpressionValue as ys, HUB_MDNS_SERVICE_TYPE as yt, DERIVED_CAMERA_SILENCED_CAP_NAMES as z, resolveNotificationTapAddress as za, isSecretClear as zc, methodRefusal as zi, calendarsCapability as zn, zoneOnlySite as zo, expandContainer as zr, RECORD_SWEEP_INTERVAL_MS as zs, PackageRequiresSchema as zt };
120786
+ export { DeclaredDevices as $, seedInstanceOnce as $a, parseSecretRef as $c, objectInputDeclaresAddonId as $i, compareVersions as $n, composedDeviceStableId as $o, generateDeviceAlias as $r, StoredRecordKindDeclarationSchema as $s, STORAGE_ACCESS_FALLBACK as $t, ConsumableItemSchema as A, resolveActionVariables as Aa, historyItemFieldPath as Ac, lockControlCapability as Ai, bareAddonId as An, validateComposition as Ao, deviceStatusCapability as Ar, FilterRequiredError as As, MINUTES_PER_DAY as At, DEVICE_ENROLLMENT_TTL_MS as B, resolveNotificationTapAddress as Ba, isSecretClear as Bc, methodRefusal as Bi, cameraGridLayoutCapability as Bn, zoneOnlySite as Bo, expressionContainsBuiltinCall as Br, RECORD_SWEEP_INTERVAL_MS as Bs, PetFountainStatusSchema as Bt, COMPOSER_RUNNER_ID as C, recordEntriesCapability as Ca, defineRecordKinds as Cc, keychainCapability as Ci, alertEpisodeId as Cn, timedRunLimitOf as Co, deviceCredentialsCapability as Cr, BatchTooLargeError as Cs, INTERNAL_ACTION_PREFIX as Ct, CalendarPreferencesSchema as D, remoteLayoutComponentsCapability as Da, expandCapMethods as Dc, localDateOf as Di, armRemovalReconcile as Dn, toTimings as Do, deviceRemovalHookCapability as Dr, DEVICE_STATUS_METHOD as Ds, LOG_LEVEL_RANK as Dt, CREDENTIAL_TOKEN_AUDIENCE as E, remoteCapability as Ea, entryBody as Ec, lifecycleJobSchema as Ei, appendTrace as En, timedRunSeconds as Eo, deviceManagerCapability as Er, DEVICE_SETTINGS_CONTRIBUTION_METHODS as Es, KeychainResetRecordSchema as Et, DATABASE_SNAPSHOT_TIMEOUT_MS as F, resolveHeroLayout as Fa, isDeviceConfigCap as Fc, mayReadLocation as Fi, buildDeviceEnrollmentLink as Fn, vectorIndexDimConflictError as Fo, evaluateCompositionField as Fr, PlaintextSecretError as Fs, NetworkTunnelStartedDataSchema as Ft, DEVICE_SAN_USER_PREFIX as G, runFanOut as Ga, makeSecretMarker as Gc, motionCapability as Gi, catalogueIssues as Gn, HISTORY_FAST_MS as Go, fanPresetsCapability as Gr, ReadinessTimeoutError as Gs, QuantityUnitError as Gt, DEVICE_ID_FIELD as H, resolveRunnerId as Ha, isSecretMarker as Hc, migrationsCapability as Hi, canonicalStoredDeviceType as Hn, CompositionSchema as Ho, fanAxisPath as Hr, REMOVE_LEAF as Hs, PreferenceDeviceIdSchema as Ht, DATA_STORE_DATABASES as I, resolveHubAddressRoles as Ia, isEvent as Ic, mayWriteToLocation as Ii, buildDeviceSignatureMessage as In, vectorStoreCapability as Io, evaluateStepCondition as Ir, RECORD_BATCH_MAX as Is, PET_FOUNTAIN_WATER_KEY as It, DEVICE_TEMPLATE_MAX_OUTPUT as J, runtimeStatePolicyFor as Ja, nodePin as Jc, normalizeActionUnits as Ji, checkTemplatePayload as Jn, HelperMemberSchema as Jo, findChannelSource as Jr, RecordNotFoundError as Js, ROOT_BUCKET_KEY as Jt, DEVICE_TEMPLATE_FILTERS as K, runSteps as Ka, mapSecretLeaves as Kc, nextOccurrence as Ki, checkDeviceAlias as Kn, HISTORY_SLOW_MS as Ko, featureForwards as Kr, RecordIntegrationInstances as Ks, RECORDING_SOURCE_CAMSTACK_ADDON as Kt, DAY_NAMES as L, resolveLocationMode as La, isInstanceEnabled as Lc, mediaPlayerCapability as Li, buildHeroModel as Ln, weekdayOfLocalDate as Lo, evaluateWhenTree as Lr, RECORD_BATCH_MAX_BYTES as Ls, PREFERENCES_MAX_VALUE_BYTES as Lt, CredentialTokenClaimsSchema as M, resolveBucketMs as Ma, hydrateSchema as Mc, logDestinationCapability as Mi, brightnessCapability as Mn, validateSchedulerInput as Mo, enumerateInferenceDevices as Mr, HISTORY_DEFAULT_MIN_INTERVAL_MS as Ms, MediaPlayerStatusSchema as Mt, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as N, resolveCoreBlockEntry as Na, isCommand as Nc, logLevelAtMost as Ni, buildActionSteps as Nn, valveCapability as No, enumerateItemArrayFields as Nr, InvalidRecordError as Ns, MigrationLedgerEntrySchema as Nt, CatalogFileSchema as O, remoteSourceSteps as Oa, formatSecretScope as Oc, localNetworkCapability as Oi, authProviderCapability as On, unmetRequirements as Oo, deviceRunsCapability as Or, DeclarationRefusedError as Os, METHOD_ACCESS_MAP as Ot, DATABASE_SNAPSHOT_SUFFIX as P, resolveCoreBlockFiles as Pa, isDebugChannelName as Pc, looseSchema as Pi, buildCapabilityLookup as Pn, vectorDimFromBase64 as Po, enumerateSchemaFields as Pr, NoCallerError as Ps, MigrationMetaSchema as Pt, DataStoreDatabaseSchema as Q, scoreRuntimes as Qa, parseJsonUnknown as Qc, normalizeUnit as Qi, colorCapability as Qn, composedDeviceRef as Qo, gbToBytes as Qr, SECRET_CLEAR as Qs, RunningStateStatusSchema as Qt, DEFAULT_HOLD_OVERRIDE as R, resolveMethodAuth as Ra, isKeychainStoredField as Rc, mediaPlayerFeaturesOfRoles as Ri, buildStreamParamsConfigSchema as Rn, withDefaultRunning as Ro, evictionPolicyOfLocation as Rr, RECORD_DELETE_BATCH as Rs, PROPOSAL_MIN_SPAN_MS as Rt, COMPOSED_ITEM_FIXED_FIELDS as S, reconcileReportedFeatures as Sa, defineEntryKind as Sc, keychainAdminCapability as Si, EventCategory as Sl, addonWidgetsCapability as Sn, timedRunCapability as So, describeUnmet as Sr, BaseAddon as Ss, IDLE_ACTION_STATUS as St, CORE_BLOCK_ADDON_PREFIX as T, reducePoints as Ta, emitReadiness as Tc, legacyModeOf as Ti, alertsCapability as Tn, timedRunQuickRun as To, deviceHistoryCapability as Tr, DATAPLANE_SECRET_HEADER as Ts, KeychainAuditEntrySchema as Tt, DEVICE_NONCE_TTL_MS as U, resolveStepArgs as Ua, isSecretMarkerLike as Uc, modeForSwitch as Ui, capAppliesToDeviceKind as Un, DAY_MS as Uo, fanControlCapability as Ur, RUNTIME_DEFAULTS as Us, PreferenceNamespaceSchema as Ut, DEVICE_HISTORY_ENERGY_KEY as V, resolveRemoteSource as Va, isSecretFieldView as Vc, metricsProviderCapability as Vi, canonicalIconKey as Vn, COMPOSER_ADDON_ID as Vo, extractNestedAddonId as Vr, REDACTED_SECRET as Vs, PowerSourceInfoSchema as Vt, DEVICE_SAN_CREDENTIAL_PREFIX as W, resolveTemplateRef as Wa, isSecretRefOwnedBy as Wc, modeMayWrite as Wi, capUnitResolver as Wn, DEFAULT_HISTORY_RETENTION as Wo, fanOutTargets as Wr, ReadinessRegistry as Ws, PreferenceValueSchema as Wt, DEVICE_TEMPLATE_VALUES_CAP as X, scopesAllowAddon as Xa, normalizeSecretOwner as Xc, normalizeCoreBlockWrite as Xi, collectDeviceTemplates as Xn, buildFfmpegArgs as Xo, formatDeviceRevoker as Xr, RecordUniqueViolationError as Xs, RemoteAssumedStateSchema as Xt, DEVICE_TEMPLATE_THIS_ALIAS as Y, schedulersCapability as Ya, normalizeNodeId as Yc, normalizeCapStep as Yi, climateControlCapability as Yn, MINUTE_MS as Yo, foldSnapshotByFunction as Yr, RecordTooLargeError as Ys, RecordingStatusSchema as Yt, DEVICE_TOMBSTONE_RETENTION_MS as Z, scopesAllowDeviceCap as Za, parseJsonObject as Zc, normalizeStepTargets as Zi, collectWhenMirrorSources as Zn, cloneStatefulExpressionMemory as Zo, formatMinutes as Zr, RevConflictError as Zs, RemoteLayoutPayloadSchema as Zt, BatteryStatusSchema as _, processTimeZoneOr as _a, commandOrigin as _c, isLocationEnabled as _i, DeviceFeature as _l, actionWaitTotalMs as _n, streamQualityLabel as _o, declaredSeriesKind as _r, planResetTier as _s, HISTORY_CATALOG as _t, AGENT_MDNS_SERVICE_TYPE as a, parseStreamParamsFormPatch as aa, asJsonObject as ac, internalActionId as ai, scopeKey as al, ServerNameSchema as an, shortHostname as ao, consumablesCapability as ar, disarmRoseMemory as as, EMPTY_REMOTE_ASSUMED_STATE as at, CAP_NAMES_WITH_STATUS as b, ptzAutotrackCapability as ba, defineAddonMigrations as bc, isVoidInput as bi, errMsg as bl, addonPagesCapability as bn, switchStateOfMode as bo, deriveBatteryPresence as br, toExpressionValue as bs, HUB_MDNS_TXT_KEYS as bt, ActionError as c, pickAppLinkHub as ca, assertTransactScope as cc, isAlertEpisodeOpen as ci, secretViewsOf as cl, StorageCleanupJobSchema as cn, snapshotCapability as co, coreBlockIdFromAddonId as cr, helperMembers as cs, FAN_OSCILLATION_AXES as ct, ActionTargetResolver as d, powerSourceActuatorConflicts as da, buildSecretRef as dc, isArrayOutputSchema as di, toSecretFieldView as dl, StorageMigrationJobSchema as dn, storageAdminCapability as do, coverCapability as dr, integrateReading as ds, FanControlStatusSchema as dt, objectInputDeclaresRequiredDeviceId as ea, TransactRefusedError as ec, groupCommandsCapability as ei, readinessKey as el, STORAGE_LOCATION_MODES as en, settingsStoreCapability as eo, compileScalarOverride as er, compositionFeatureEnabled as es, DeviceRunSchema as et, ActionVariableSchema as f, powerSourceCapability as fa, collectSecretConfigKeys as fc, isCollectionArrayMethod as fi, transformSecretWrite as fl, TemplateKindSchema as fn, storageCapability as fo, createDeviceExtensionProvider as fr, isForwardInputRef as fs, FanDirectionSchema as ft, BaseDevice as g, procedureAuthKey as ga, commandEffect as gc, isKernelDerivedFeature as gi, COMPOSED_DEVICE_STABLE_ID_PREFIX as gl, actionSourceCapability as gn, streamCatalogCapability as go, declarationOwnerNodeId as gr, openStatistic as gs, GroupCommandResultSchema as gt, BUILTIN_REMOTE_COMPONENTS as h, problemsBlockSave as ha, collectZodSecretPaths as hc, isInternalActionId as hi, withoutCallerStamp as hl, UserRecordSchema as hn, storageProviderCapability as ho, databaseSnapshotCapability as hr, openReset as hs, FieldClaimSchema as ht, ACTUATOR_TEMPLATE_IDS as i, parseColorInput as ia, actionEffect as ic, integrationInstancesCapability as ii, ruleFireOfClaim as il, ScopedTokenSchema as in, sharedColorModes as io, compositionUnionReads as ir, createStatefulExpressionMemory as is, EMPTY_AUTOMATION_STATE as it, CoreBlockSchema as j, resolveAppConnections as ja, historyUnitFor as jc, lockDoorLinkOfComposition as ji, batteryCapability as jn, validateCustomAddress as jo, deviceTransitionsCapability as jr, ForeignSecretMarkerError as js, MOTION_CLOSE_AFTER_MS as jt, ConditionMirror as k, replacedFieldKeys as ka, getDebugInterest as kc, locationIconKey as ki, backupCapability as kn, userManagementCapability as ko, deviceStateCapability as kr, DeviceTransitionSchema as ks, MIGRATION_API_V1_METHODS as kt, ActionMinDelaySecSchema as l, planComposition as la, assertValidDeclaration as lc, isAlertEpisodeSeverity as li, sleep as ll, StorageLocationModeSchema as ln, splitTranslationRef as lo, coreBlockSourceKind as lr, historyRetentionFromSettings as ls, FAN_OSCILLATION_AXIS_SETTABLE as lt, AutomationStateDocSchema as m, preconditionOf as ma, collectSecretMarkerRefs as mc, isDefaultAppConnectionEndpoint as mi, vocabActionIdFor as ml, UNATTRIBUTED_BUCKET_KEY as mn, storageOccupancyCapability as mo, dataStoreProviderCapability as mr, nextLocalMidnight as ms, FieldClaimModeSchema as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, orderMigrations as na, UnknownRecordKindError as nc, hasTimeLeaves as ni, resolveCapMount as nl, SchedulerError as nn, sharedActuatorFeatures as no, compositionFieldKey as nr, compositionSliceKey as ns, DeviceTombstoneSchema as nt, AGENT_MDNS_TXT_KEYS as o, petFountainCapability as oa, asNumber as oc, interpolate as oi, secretTreeFromPaths as ol, SetOscillationAxisInputSchema as on, siteFor as oo, coreBlockAddonId as or, evaluateDerivative as os, EMPTY_REMOTE_CONFIG as ot, AlertSchema as p, powerSourceLinkOfComposition as pa, collectSecretLeaves as pc, isCredentialTokenPayload as pi, userError as pl, TokenScopeSchema as pn, storageMigrationCapability as po, customKeyOfRole as pr, isHistoryHelper as ps, FanPresetSchema as pt, DEVICE_TEMPLATE_MAX_LENGTH as q, runtimeFieldUnit as qa, nodeIdOfScopedKey as qc, nextTimeBoundaryInMs as qi, checkRoleAddress as qn, HOUR_MS as qo, filesystemBrowseCapability as qr, RecordKindDeclarationSchema as qs, REMOTE_MEDIA_COMMANDS as qt, ACTUATOR_METHODS as r, parseAcceleratorFactsJson as ra, WELL_KNOWN_TAB_MAP as rc, heroLayoutCapability as ri, resolveSecretMarkers as rl, SchedulerSchema as rn, sharedActuatorMethods as ro, compositionSourceRefs as rr, compositionSourceKey as rs, DiscoveryProposalBodySchema as rt, ALL_CAPABILITY_DEFINITIONS as s, petFountainWaterItem as sa, asString$1 as sc, isAddonInstanceId as si, secretTreeFromSchema as sl, SsoBridgeClaimsSchema as sn, siteZoneKey as so, coreBlockComposition as sr, evaluateStatistic as ss, FAN_CAPTURE_FIELDS as st, ACTION_RUN_MAX_MS as t, occurrenceOn as ta, UnindexedFilterError as tc, groupTemplate as ti, recordSecretRef as tl, STREAM_PROFILE_META as tn, settleDeviceFeatures as to, composerCapability as tr, compositionItemFieldPath as ts, DeviceStatusSchema as tt, ActionStepSchema as u, platformProbeCapability as ua, auditedFields as uc, isAppLinkBase as ui, toNodeId as ul, StorageLocationTypeSchema as un, stableIdMapOf as uo, coreBlocksCapability as ur, implementedMethodsOf as us, FIRST_LEVEL_MACRO_CLASSES as ut, CAMERA_SWITCH_ORDER as v, projectDeviceRow as va, createEvent as vc, isObjectInput as vi, DeviceRole as vl, actionsCapability as vn, supportedRuntimes as vo, decodeVectorBase64 as vr, planStatisticTier as vs, HISTORY_ITEM_CATALOG as vt, CORE_BLOCKS_ADDON_ID as w, recordsCapability as wa, emitDownForOwnedCaps as wc, legacyAutoLinkIds as wi, alertEpisodePayload as wn, timedRunMaxIn as wo, deviceExtensionCapability as wr, CALLER_STAMPED_CAPABILITIES as ws, KEYCHAIN_RESET_TRIGGER_ACTOR as wt, CATALOG_LANGS as x, readStoredRemoteConfig as xa, defineCustomActions as xc, kebabToCamel as xi, featuresOfBoundCaps as xl, addonSettingsCapability as xn, templateCapability as xo, describeComposableCaps as xr, wattMillisecondsToKwh as xs, HvacModeSchema as xt, CAMSTACK_APP_LINK_ORIGIN as y, proposeRunningThreshold as ya, customAction as yc, isSameAddonId as yi, DeviceType as yl, addonIdOfActionId as yn, switchCapability as yo, defineExtensionSlotProvider as yr, statisticCadenceMs as ys, HUB_MDNS_SERVICE_TYPE as yt, DERIVED_CAMERA_SILENCED_CAP_NAMES as z, resolveMutate as za, isReadingQuantity as zc, memoizePinnedFfmpeg as zi, calendarsCapability as zn, withLocationMode as zo, expandContainer as zr, RECORD_SECRET_COLLECTION_PREFIX as zs, PackageRequiresSchema as zt };