@camstack/server 1.2.826 → 1.2.828

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 (109) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/api/trpc/generated-cap-routers.js +257 -40
  3. package/dist/core/addon/addon-registry.service.js +3 -0
  4. package/package.json +10 -12
  5. package/system/dist/addon-runner.js +19 -2
  6. package/system/dist/addon-runner.mjs +19 -2
  7. package/system/dist/addon-utils.mjs +1 -1
  8. package/system/dist/{agent-https-BBO2OtNH.mjs → agent-https-BSxTUzKT.mjs} +1 -1
  9. package/system/dist/{agent-https-B2nqARmj.js → agent-https-BlLVD9hG.js} +1 -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 +4 -4
  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 +5 -5
  14. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  15. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  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 +5 -5
  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 +17 -6
  25. package/system/dist/builtins/composer/composer.addon.mjs +17 -6
  26. package/system/dist/builtins/composer/graft-host.d.ts +2 -0
  27. package/system/dist/builtins/console-logging/index.js +1 -1
  28. package/system/dist/builtins/console-logging/index.mjs +1 -1
  29. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  30. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  31. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  32. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  33. package/system/dist/builtins/device-manager/device-bindings-store.d.ts +7 -4
  34. package/system/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
  35. package/system/dist/builtins/device-manager/device-manager.addon.js +269 -25
  36. package/system/dist/builtins/device-manager/device-manager.addon.mjs +269 -25
  37. package/system/dist/builtins/device-manager/device-meta-actions.d.ts +11 -1
  38. package/system/dist/builtins/device-manager/device-projection.d.ts +7 -0
  39. package/system/dist/builtins/device-manager/device-template/mirror-resolver.d.ts +2 -0
  40. package/system/dist/builtins/device-manager/device-template/template-filters.d.ts +13 -0
  41. package/system/dist/builtins/device-manager/device-template/template-host.d.ts +11 -3
  42. package/system/dist/builtins/device-manager/device-template-actions.d.ts +1 -0
  43. package/system/dist/builtins/device-manager/feature-deriver.d.ts +61 -0
  44. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  45. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  46. package/system/dist/builtins/keychain/index.js +4 -4
  47. package/system/dist/builtins/keychain/index.mjs +4 -4
  48. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  49. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  50. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  51. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  52. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  53. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  54. package/system/dist/builtins/loki-logging/index.js +1 -1
  55. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  56. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  57. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  58. package/system/dist/builtins/platform-probe/index.js +1 -1
  59. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  60. package/system/dist/builtins/record-entries/index.js +1 -1
  61. package/system/dist/builtins/record-entries/index.mjs +1 -1
  62. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  63. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  64. package/system/dist/builtins/snapshot/index.js +1 -1
  65. package/system/dist/builtins/snapshot/index.mjs +1 -1
  66. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  67. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  68. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  69. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  70. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  71. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  72. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  73. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  74. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  75. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  76. package/system/dist/builtins/winston-logging/index.js +1 -1
  77. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  78. package/system/dist/{capture-engine-DP4HbT3W.js → capture-engine-1A7HAX3x.js} +1 -1
  79. package/system/dist/{capture-engine-C-rHYVFq.mjs → capture-engine-B0yQx6hA.mjs} +1 -1
  80. package/system/dist/{composition-sources-CM9c_jAj.js → composition-sources-BzM19ASO.js} +1 -1
  81. package/system/dist/{composition-sources-CL9JFN4y.mjs → composition-sources-CyJ0d6Sc.mjs} +1 -1
  82. package/system/dist/{constants-DzGFnCKZ.mjs → constants-B_FLEjP_.mjs} +1 -1
  83. package/system/dist/{constants-jk7JccZ0.js → constants-DSO4ZEO3.js} +1 -1
  84. package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  85. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  86. package/system/dist/{device-ca-DZ_OQiCc.mjs → device-ca-CveuNCHp.mjs} +1 -1
  87. package/system/dist/{device-ca-B7_R5WJh.js → device-ca-DLTDsonl.js} +1 -1
  88. package/system/dist/device-template-worker.js +61 -1
  89. package/system/dist/device-template-worker.mjs +61 -1
  90. package/system/dist/{dist-BgRMQHuL.mjs → dist-CIyyHwVx.mjs} +373 -175
  91. package/system/dist/{dist-BpTL3uNe.js → dist-DhbzVygm.js} +408 -174
  92. package/system/dist/file-host-worker.js +1 -1
  93. package/system/dist/file-host-worker.mjs +1 -1
  94. package/system/dist/{hub-mdns-ciao-DIcBingB.mjs → hub-mdns-ciao-CQdCUsrI.mjs} +2 -2
  95. package/system/dist/{hub-mdns-ciao-DPUaYAD3.js → hub-mdns-ciao-C_ITDs0-.js} +2 -2
  96. package/system/dist/index.js +26 -9
  97. package/system/dist/index.mjs +238 -221
  98. package/system/dist/kernel/moleculer/migration-api-facade.d.ts +3 -1
  99. package/system/dist/{legacy-integration-rows-door-DYNePgj4.js → legacy-integration-rows-door-D_tfRhsx.js} +1 -1
  100. package/system/dist/{legacy-integration-rows-door-1GnkpMgH.mjs → legacy-integration-rows-door-tX6Qktxd.mjs} +1 -1
  101. package/system/dist/{rename-composition-block-Cp0_nwAI.mjs → rename-composition-block-COaMxshT.mjs} +1 -1
  102. package/system/dist/{rename-composition-block-Dn2z4fnA.js → rename-composition-block-DNhbAonr.js} +1 -1
  103. package/system/dist/{restore-archive-DasubaYH.mjs → restore-archive-BMqp_hMT.mjs} +94 -94
  104. package/system/dist/{restore-archive-BGa5pdp9.js → restore-archive-Dbzuv5hK.js} +1 -1
  105. package/system/dist/{template-protocol-CTP4eAo_.js → template-protocol-DRZ4cm95.js} +4 -1
  106. package/system/dist/{template-protocol-BmMM5VBf.mjs → template-protocol-D_6uVHKs.mjs} +4 -1
  107. package/system/dist/{wal-maintenance-GWFxnSnE.js → wal-maintenance-CWODOTsa.js} +0 -0
  108. package/system/dist/{wal-maintenance-BLWLlVfF.mjs → wal-maintenance-ITsLGvFA.mjs} +0 -0
  109. 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/composed-stable-id-DLcPInGv.mjs
806
+ //#region ../types/dist/composed-stable-id-jnvhwGoH.mjs
807
807
  /**
808
808
  import { errMsg } from '@camstack/types'
809
809
  * Extract a human-readable message from an unknown error value.
@@ -1091,6 +1091,10 @@ var DeviceFeature = /* @__PURE__ */ function(DeviceFeature) {
1091
1091
  /** Robot mower exposes targeted mowing (all-area / zones / edges /
1092
1092
  * spots) — gates the Mow action + map selectors. */
1093
1093
  DeviceFeature["MowerHasTargetedMowing"] = "mower-has-targeted-mowing";
1094
+ /** The device has a drive/navigation surface (`navigation` cap): a robot camera. */
1095
+ DeviceFeature["Navigation"] = "navigation";
1096
+ /** The device has a network-link reading (`network-link` cap). */
1097
+ DeviceFeature["NetworkLink"] = "network-link";
1094
1098
  return DeviceFeature;
1095
1099
  }({});
1096
1100
  /**
@@ -1221,7 +1225,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1221
1225
  */
1222
1226
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1223
1227
  //#endregion
1224
- //#region ../types/dist/sleep-VrfKAAGN.mjs
1228
+ //#region ../types/dist/sleep-Dz1P6--1.mjs
1225
1229
  /**
1226
1230
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1227
1231
  * window to float samples (D455).
@@ -13854,7 +13858,7 @@ function sleep(ms) {
13854
13858
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
13855
13859
  }
13856
13860
  //#endregion
13857
- //#region ../types/dist/composition-BFJq1Y88.mjs
13861
+ //#region ../types/dist/implemented-methods-OitwyO1Y.mjs
13858
13862
  var AUDIO_ENCODER_BY_CODEC = {
13859
13863
  opus: "libopus",
13860
13864
  aac: "aac",
@@ -16542,6 +16546,14 @@ function featureFieldEntries(feature, arrayPath = COMPOSITION_ITEM_ARRAY_PATH) {
16542
16546
  function featureSources(feature) {
16543
16547
  return featureFieldEntries(feature).map((e) => e.source);
16544
16548
  }
16549
+ /**
16550
+ * Which of a cap's methods a registered provider object serves. Sent with the
16551
+ * registration so the hub can tell "cap bound" from "cap bound AND this method
16552
+ * implemented". A method is implemented when the object has it as a function.
16553
+ */
16554
+ function implementedMethodsOf(methodNames, provider) {
16555
+ return methodNames.filter((name) => typeof Reflect.get(provider, name) === "function");
16556
+ }
16545
16557
  var NodeColorIdSchema = z.enum([
16546
16558
  "node-a",
16547
16559
  "node-b",
@@ -17434,8 +17446,31 @@ var TargetKindAttachmentsCapsSchema = z.object({
17434
17446
  max: z.number().int().nonnegative(),
17435
17447
  maxBytes: z.number().int().positive().optional()
17436
17448
  });
17449
+ /**
17450
+ * Which TEXT fields a kind delivers (#483). Alexa speaks a title and nothing
17451
+ * else; a push service shows both.
17452
+ *
17453
+ * `.optional()` on the caps block, never defaulted: absent = both, which is
17454
+ * what every kind declared before this field meant (D938's rule for a Zod
17455
+ * default on the addon cap path).
17456
+ */
17457
+ var TargetKindTextCapsSchema = z.object({
17458
+ title: z.boolean(),
17459
+ body: z.boolean()
17460
+ });
17461
+ z.enum([
17462
+ "title",
17463
+ "body",
17464
+ "attachments",
17465
+ "actions",
17466
+ "priority",
17467
+ "sound",
17468
+ "clickUrl"
17469
+ ]);
17437
17470
  /** The full capability block consulted before dispatch. */
17438
17471
  var TargetKindCapsSchema = z.object({
17472
+ /** Text fields this kind delivers (#483). Absent = title AND body. */
17473
+ text: TargetKindTextCapsSchema.optional(),
17439
17474
  attachments: TargetKindAttachmentsCapsSchema,
17440
17475
  /** Max action buttons (0 = none). */
17441
17476
  actions: z.number().int().nonnegative(),
@@ -51148,14 +51183,14 @@ var climateControlCapability = {
51148
51183
  kind: "mutation",
51149
51184
  auth: "protected"
51150
51185
  }),
51151
- setFanMode: method(z.object({
51186
+ setFanMode: optionalMethod(z.object({
51152
51187
  deviceId: z.number().int().nonnegative(),
51153
51188
  fanMode: z.string().min(1)
51154
51189
  }), z.void(), {
51155
51190
  kind: "mutation",
51156
51191
  auth: "protected"
51157
51192
  }),
51158
- setPreset: method(z.object({
51193
+ setPreset: optionalMethod(z.object({
51159
51194
  deviceId: z.number().int().nonnegative(),
51160
51195
  preset: z.string().min(1)
51161
51196
  }), z.void(), {
@@ -51169,7 +51204,7 @@ var climateControlCapability = {
51169
51204
  kind: "mutation",
51170
51205
  auth: "protected"
51171
51206
  }),
51172
- setTargetRange: method(z.object({
51207
+ setTargetRange: optionalMethod(z.object({
51173
51208
  deviceId: z.number().int().nonnegative(),
51174
51209
  targetLow: z.number(),
51175
51210
  targetHigh: z.number()
@@ -51177,21 +51212,21 @@ var climateControlCapability = {
51177
51212
  kind: "mutation",
51178
51213
  auth: "protected"
51179
51214
  }),
51180
- setTargetHumidity: method(z.object({
51215
+ setTargetHumidity: optionalMethod(z.object({
51181
51216
  deviceId: z.number().int().nonnegative(),
51182
51217
  targetHumidity: z.number().min(0).max(100)
51183
51218
  }), z.void(), {
51184
51219
  kind: "mutation",
51185
51220
  auth: "protected"
51186
51221
  }),
51187
- setSwingVertical: method(z.object({
51222
+ setSwingVertical: optionalMethod(z.object({
51188
51223
  deviceId: z.number().int().nonnegative(),
51189
51224
  on: z.boolean()
51190
51225
  }), z.void(), {
51191
51226
  kind: "mutation",
51192
51227
  auth: "protected"
51193
51228
  }),
51194
- setSwingHorizontal: method(z.object({
51229
+ setSwingHorizontal: optionalMethod(z.object({
51195
51230
  deviceId: z.number().int().nonnegative(),
51196
51231
  on: z.boolean()
51197
51232
  }), z.void(), {
@@ -52656,27 +52691,27 @@ var mediaPlayerCapability = {
52656
52691
  mode: "singleton",
52657
52692
  deviceTypes: [DeviceType.MediaPlayer],
52658
52693
  methods: {
52659
- turnOn: method(deviceOnly, z.void(), {
52694
+ turnOn: optionalMethod(deviceOnly, z.void(), {
52660
52695
  kind: "mutation",
52661
52696
  auth: "protected"
52662
52697
  }),
52663
- turnOff: method(deviceOnly, z.void(), {
52698
+ turnOff: optionalMethod(deviceOnly, z.void(), {
52664
52699
  kind: "mutation",
52665
52700
  auth: "protected"
52666
52701
  }),
52667
- volumeUp: method(stepInput, z.void(), {
52702
+ volumeUp: optionalMethod(stepInput, z.void(), {
52668
52703
  kind: "mutation",
52669
52704
  auth: "protected"
52670
52705
  }),
52671
- volumeDown: method(stepInput, z.void(), {
52706
+ volumeDown: optionalMethod(stepInput, z.void(), {
52672
52707
  kind: "mutation",
52673
52708
  auth: "protected"
52674
52709
  }),
52675
- channelUp: method(stepInput, z.void(), {
52710
+ channelUp: optionalMethod(stepInput, z.void(), {
52676
52711
  kind: "mutation",
52677
52712
  auth: "protected"
52678
52713
  }),
52679
- channelDown: method(stepInput, z.void(), {
52714
+ channelDown: optionalMethod(stepInput, z.void(), {
52680
52715
  kind: "mutation",
52681
52716
  auth: "protected"
52682
52717
  }),
@@ -52688,61 +52723,61 @@ var mediaPlayerCapability = {
52688
52723
  kind: "mutation",
52689
52724
  auth: "protected"
52690
52725
  }),
52691
- stop: method(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
52726
+ stop: optionalMethod(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
52692
52727
  kind: "mutation",
52693
52728
  auth: "protected"
52694
52729
  }),
52695
- next: method(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
52730
+ next: optionalMethod(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
52696
52731
  kind: "mutation",
52697
52732
  auth: "protected"
52698
52733
  }),
52699
- previous: method(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
52734
+ previous: optionalMethod(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
52700
52735
  kind: "mutation",
52701
52736
  auth: "protected"
52702
52737
  }),
52703
- seek: method(z.object({
52738
+ seek: optionalMethod(z.object({
52704
52739
  deviceId: z.number().int().nonnegative(),
52705
52740
  position: z.number().int().nonnegative()
52706
52741
  }), z.void(), {
52707
52742
  kind: "mutation",
52708
52743
  auth: "protected"
52709
52744
  }),
52710
- setVolume: method(z.object({
52745
+ setVolume: optionalMethod(z.object({
52711
52746
  deviceId: z.number().int().nonnegative(),
52712
52747
  volumeLevel: z.number().min(0).max(100)
52713
52748
  }), z.void(), {
52714
52749
  kind: "mutation",
52715
52750
  auth: "protected"
52716
52751
  }),
52717
- setMute: method(z.object({
52752
+ setMute: optionalMethod(z.object({
52718
52753
  deviceId: z.number().int().nonnegative(),
52719
52754
  muted: z.boolean()
52720
52755
  }), z.void(), {
52721
52756
  kind: "mutation",
52722
52757
  auth: "protected"
52723
52758
  }),
52724
- setShuffle: method(z.object({
52759
+ setShuffle: optionalMethod(z.object({
52725
52760
  deviceId: z.number().int().nonnegative(),
52726
52761
  shuffle: z.boolean()
52727
52762
  }), z.void(), {
52728
52763
  kind: "mutation",
52729
52764
  auth: "protected"
52730
52765
  }),
52731
- setRepeat: method(z.object({
52766
+ setRepeat: optionalMethod(z.object({
52732
52767
  deviceId: z.number().int().nonnegative(),
52733
52768
  repeat: MediaPlayerRepeatSchema
52734
52769
  }), z.void(), {
52735
52770
  kind: "mutation",
52736
52771
  auth: "protected"
52737
52772
  }),
52738
- selectSource: method(z.object({
52773
+ selectSource: optionalMethod(z.object({
52739
52774
  deviceId: z.number().int().nonnegative(),
52740
52775
  source: z.string().min(1)
52741
52776
  }), z.void(), {
52742
52777
  kind: "mutation",
52743
52778
  auth: "protected"
52744
52779
  }),
52745
- playMedia: method(z.object({
52780
+ playMedia: optionalMethod(z.object({
52746
52781
  deviceId: z.number().int().nonnegative(),
52747
52782
  /** Media identifier / URL. */
52748
52783
  mediaId: z.string().min(1),
@@ -56885,18 +56920,18 @@ var coverCapability = {
56885
56920
  kind: "mutation",
56886
56921
  auth: "protected"
56887
56922
  }),
56888
- stop: method(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
56923
+ stop: optionalMethod(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
56889
56924
  kind: "mutation",
56890
56925
  auth: "protected"
56891
56926
  }),
56892
- setPosition: method(z.object({
56927
+ setPosition: optionalMethod(z.object({
56893
56928
  deviceId: z.number().int().nonnegative(),
56894
56929
  position: z.number().min(0).max(100)
56895
56930
  }), z.void(), {
56896
56931
  kind: "mutation",
56897
56932
  auth: "protected"
56898
56933
  }),
56899
- setTiltPosition: method(z.object({
56934
+ setTiltPosition: optionalMethod(z.object({
56900
56935
  deviceId: z.number().int().nonnegative(),
56901
56936
  tiltPosition: z.number().min(0).max(100)
56902
56937
  }), z.void(), {
@@ -58240,7 +58275,8 @@ var RESERVED_ALIASES = new Set([
58240
58275
  "extends",
58241
58276
  "block",
58242
58277
  "macro",
58243
- "now"
58278
+ "now",
58279
+ "camera"
58244
58280
  ]);
58245
58281
  var DeviceAliasSchema = z.string().max(64).regex(DEVICE_ALIAS_PATTERN);
58246
58282
  function isReservedDeviceAlias(alias) {
@@ -58310,10 +58346,36 @@ function checkDeviceAlias(alias, isTaken) {
58310
58346
  var DEVICE_TEMPLATE_MAX_LENGTH = 4096;
58311
58347
  var DEVICE_TEMPLATE_MAX_OUTPUT = 4096;
58312
58348
  var DeviceTemplateSchema = z.string().min(1).max(DEVICE_TEMPLATE_MAX_LENGTH);
58349
+ /**
58350
+ * The device a caller renders FOR, as a template name: `{{ camera.temperature }}`.
58351
+ * It resolves only when the call names `thisDevice`, so a template stays copyable
58352
+ * between devices. It shadows a device whose own alias is `camera`.
58353
+ */
58354
+ var DEVICE_TEMPLATE_THIS_ALIAS = "camera";
58355
+ /** One value a caller hands the renderer for `thisDevice`. */
58356
+ var DeviceTemplateValueSchema = z.union([
58357
+ z.string(),
58358
+ z.number(),
58359
+ z.boolean()
58360
+ ]);
58361
+ /**
58362
+ * The device a render is FOR (`camera` in the text) and the values the caller
58363
+ * knows about it that no capability carries, for example `lastPerson` and
58364
+ * `lastPlate`. `values` read as `camera.<name>`; a name a capability also carries
58365
+ * is `ambiguous` and is written `camera.values.<name>`.
58366
+ */
58367
+ var DeviceTemplateThisDeviceSchema = z.object({
58368
+ deviceId: z.number().int(),
58369
+ values: z.record(z.string().min(1).max(64), DeviceTemplateValueSchema).optional()
58370
+ });
58371
+ /** The synthetic slice `thisDevice.values` is exposed under. */
58372
+ var DEVICE_TEMPLATE_VALUES_CAP = "values";
58313
58373
  /** The filters a template may use. Anything else is refused at parse time. */
58314
58374
  var DEVICE_TEMPLATE_FILTERS = [
58315
58375
  "unit",
58316
58376
  "round",
58377
+ "trunc",
58378
+ "onoff",
58317
58379
  "default",
58318
58380
  "since",
58319
58381
  "ago",
@@ -58337,7 +58399,8 @@ var DEVICE_TEMPLATE_FILTERS = [
58337
58399
  "sum",
58338
58400
  "string",
58339
58401
  "list",
58340
- "truncate"
58402
+ "truncate",
58403
+ "time"
58341
58404
  ];
58342
58405
  var DeviceTemplateRefusalSchema = z.object({
58343
58406
  reason: z.enum([
@@ -59067,7 +59130,9 @@ var DeviceBindingsForDeviceSchema = z.object({
59067
59130
  kind: z.enum(["native", "wrapped"]),
59068
59131
  providerAddonId: z.string(),
59069
59132
  providerNodeId: z.string(),
59070
- nativeAddonId: z.string()
59133
+ nativeAddonId: z.string(),
59134
+ /** The cap's methods the native provider implements; absent = all. */
59135
+ implementedMethods: z.array(z.string()).optional()
59071
59136
  }))
59072
59137
  });
59073
59138
  /**
@@ -59385,7 +59450,9 @@ var deviceManagerCapability = {
59385
59450
  */
59386
59451
  renderDeviceTemplates: method(z.object({
59387
59452
  templates: z.array(DeviceTemplateSchema).max(64),
59388
- allowedDeviceIds: z.array(z.number().int()).optional()
59453
+ allowedDeviceIds: z.array(z.number().int()).optional(),
59454
+ /** The device `camera` names in the texts, and the values the caller knows of it. */
59455
+ thisDevice: DeviceTemplateThisDeviceSchema.optional()
59389
59456
  }), z.object({ results: z.array(DeviceTemplateRenderSchema) }), { auth: "admin" }),
59390
59457
  /**
59391
59458
  * Vet templates without rendering them: the syntax refusal, or the devices
@@ -59394,14 +59461,19 @@ var deviceManagerCapability = {
59394
59461
  */
59395
59462
  checkDeviceTemplates: method(z.object({
59396
59463
  templates: z.array(z.string()).max(64),
59397
- allowedDeviceIds: z.array(z.number().int()).optional()
59464
+ allowedDeviceIds: z.array(z.number().int()).optional(),
59465
+ thisDevice: DeviceTemplateThisDeviceSchema.optional()
59398
59466
  }), z.object({ results: z.array(z.discriminatedUnion("ok", [z.object({
59399
59467
  ok: z.literal(true),
59400
59468
  aliases: z.array(z.object({
59401
59469
  alias: z.string(),
59402
59470
  deviceId: z.number().int().nullable(),
59403
- allowed: z.boolean()
59404
- }))
59471
+ allowed: z.boolean(),
59472
+ /** The fields the text reads on this alias, as written (`temperature`, `cap.field`). */
59473
+ reads: z.array(z.string())
59474
+ })),
59475
+ /** Whether the text reads the clock (`now`): it changes every minute. */
59476
+ readsClock: z.boolean()
59405
59477
  }), z.object({
59406
59478
  ok: z.literal(false),
59407
59479
  refusal: DeviceTemplateRefusalSchema
@@ -63099,28 +63171,28 @@ var fanControlCapability = {
63099
63171
  mode: "singleton",
63100
63172
  deviceTypes: [DeviceType.Fan],
63101
63173
  methods: {
63102
- setPercentage: method(z.object({
63174
+ setPercentage: optionalMethod(z.object({
63103
63175
  deviceId: z.number().int().nonnegative(),
63104
63176
  speed: z.number().min(0).max(100)
63105
63177
  }), z.void(), {
63106
63178
  kind: "mutation",
63107
63179
  auth: "protected"
63108
63180
  }),
63109
- setPreset: method(z.object({
63181
+ setPreset: optionalMethod(z.object({
63110
63182
  deviceId: z.number().int().nonnegative(),
63111
63183
  preset: z.string().min(1)
63112
63184
  }), z.void(), {
63113
63185
  kind: "mutation",
63114
63186
  auth: "protected"
63115
63187
  }),
63116
- setDirection: method(z.object({
63188
+ setDirection: optionalMethod(z.object({
63117
63189
  deviceId: z.number().int().nonnegative(),
63118
63190
  direction: FanDirectionSchema
63119
63191
  }), z.void(), {
63120
63192
  kind: "mutation",
63121
63193
  auth: "protected"
63122
63194
  }),
63123
- setOscillating: method(z.object({
63195
+ setOscillating: optionalMethod(z.object({
63124
63196
  deviceId: z.number().int().nonnegative(),
63125
63197
  oscillating: z.boolean()
63126
63198
  }), z.void(), {
@@ -68333,7 +68405,7 @@ var lockControlCapability = {
68333
68405
  kind: "mutation",
68334
68406
  auth: "protected"
68335
68407
  }),
68336
- open: method(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
68408
+ open: optionalMethod(z.object({ deviceId: z.number().int().nonnegative() }), z.void(), {
68337
68409
  kind: "mutation",
68338
68410
  auth: "protected"
68339
68411
  })
@@ -69844,6 +69916,16 @@ var MIGRATION_API_V1_METHODS = {
69844
69916
  output: z.object({ removed: z.array(z.string()) }),
69845
69917
  behaviours: ["settings.deleteKeys.removes-only-the-named-keys"]
69846
69918
  },
69919
+ "deviceSettings.listIds": {
69920
+ input: z.object({}),
69921
+ output: z.object({ deviceIds: z.array(z.number().int()) }),
69922
+ behaviours: ["deviceSettings.listIds.names-only-the-addons-own-devices"]
69923
+ },
69924
+ "deviceSettings.read": {
69925
+ input: z.object({ deviceIds: z.array(z.number().int()) }),
69926
+ output: z.object({ blobs: z.record(z.string(), Rows) }),
69927
+ behaviours: ["deviceSettings.read.returns-only-the-addons-own-blobs"]
69928
+ },
69847
69929
  "secrets.resolve": {
69848
69930
  input: z.object({ refs: z.array(z.string()) }),
69849
69931
  output: z.object({ values: z.record(z.string(), z.string().nullable()) }),
@@ -69890,6 +69972,11 @@ var MIGRATION_API_V1_METHODS = {
69890
69972
  }).nullable(),
69891
69973
  behaviours: ["devices.get.null-for-an-unknown-id", "devices.get.reports-link-and-config"]
69892
69974
  },
69975
+ "devices.aliases": {
69976
+ input: z.object({ deviceIds: z.array(z.number().int()) }),
69977
+ output: z.object({ aliases: z.record(z.string(), z.string()) }),
69978
+ behaviours: ["devices.aliases.answers-for-the-named-ids-only"]
69979
+ },
69893
69980
  "devices.setIntegrationId": {
69894
69981
  input: z.object({
69895
69982
  deviceId: z.number().int(),
@@ -79017,6 +79104,16 @@ var NcRuleTargetSchema = z.object({
79017
79104
  */
79018
79105
  params: z.record(z.string(), z.unknown()).optional()
79019
79106
  });
79107
+ var NcTargetOverrideSchema = z.object({
79108
+ template: z.object({
79109
+ title: z.string().max(500).optional(),
79110
+ body: z.string().max(2e3).optional()
79111
+ }).optional(),
79112
+ schedule: NcScheduleSchema.optional(),
79113
+ priority: z.number().int().min(1).max(5).optional()
79114
+ });
79115
+ /** Per-target settings keyed by target id (#487). */
79116
+ var NcTargetOverridesSchema = z.record(z.string(), NcTargetOverrideSchema);
79020
79117
  /**
79021
79118
  * WHAT THE NOTIFICATION'S PICTURE IS (D897) — the ONE media choice of a rule.
79022
79119
  *
@@ -79298,6 +79395,13 @@ var NcRuleInputSchema = z.object({
79298
79395
  * targets.
79299
79396
  */
79300
79397
  targetUsers: z.array(z.string()).optional(),
79398
+ /**
79399
+ * Per-target settings keyed by target id (#487): texts, schedule, priority.
79400
+ * Absent (and an absent entry) = the rule's own values. A patch that omits
79401
+ * the key keeps the stored map; a patch that names it REPLACES it whole —
79402
+ * `{}` empties it.
79403
+ */
79404
+ targetOverrides: NcTargetOverridesSchema.optional(),
79301
79405
  /** Absent = the kind's default picture (`resolveNcMediaImage`): the subject crop for a
79302
79406
  * detection, the clean scene for a sensor or a sound. Set explicitly on save (D897). */
79303
79407
  media: NcMediaPolicySchema.default({}),
@@ -81111,53 +81215,41 @@ setOverlay: method(z.object({
81111
81215
  }
81112
81216
  }] }
81113
81217
  };
81114
- z.enum([
81115
- "value",
81116
- "unit",
81117
- "full"
81118
- ]);
81119
- z.enum([
81120
- "value+unit",
81121
- "value",
81122
- "unit"
81123
- ]);
81124
81218
  /**
81125
- * How the operator reached the leaf device. `deviceId` is ALWAYS the
81126
- * OSD-supported leaf that is read; `containerId` is set when the pick
81127
- * went through a container (gateway) first.
81219
+ * `osd-manager` — the ORCHESTRATOR over the device-scope `osd` cap.
81220
+ *
81221
+ * The `osd` cap is the firmware contract: it probes a camera's overlay
81222
+ * SLOTS and writes literal text into one. It has no idea WHERE that text
81223
+ * comes from, and it must not — a driver that grew a "show the temperature
81224
+ * here" feature would grow it once per vendor.
81225
+ *
81226
+ * This cap owns the other half: a per-(camera, slot) BINDING that says
81227
+ * which value feeds the slot, how it is formatted, and under which
81228
+ * conditions it is shown at all. Named TEMPLATES combine many device
81229
+ * fields into one overlay string (plugin catalog OSD Manager parity).
81128
81230
  */
81129
- var OsdTemplatePickSchema = z.object({
81130
- containerId: z.number().int().optional(),
81131
- deviceId: z.number().int()
81132
- });
81133
81231
  /**
81134
- * One named binding inside a multi-device template: device path + unit
81135
- * selection + precision. The parser expands `{alias}`, `{alias.value}`,
81136
- * `{alias.unit}`, or `{alias.full}` from the same binding — there is no
81137
- * per-binding format lock.
81232
+ * The text of a named template: a device template (D1021) —
81233
+ * `{{ camera.temperature | round(1) }}`, `{{ now | time('HH:mm') }}`,
81234
+ * `{% if camera.motion %}MOTION{% endif %}` — rendered by the ONE hub renderer
81235
+ * (`device-manager.renderDeviceTemplates`), never by this addon.
81236
+ *
81237
+ * Two names belong to the render rather than to a device:
81238
+ * - `now` is the clock; `time('HH:mm')` prints it in the server's zone.
81239
+ * - `camera` is the camera the overlay is on, so one template serves every
81240
+ * camera. `camera.lastPerson` and `camera.lastPlate` are the most recent
81241
+ * recognition persisted for it (empty text until there is one, with
81242
+ * `| default('')`).
81138
81243
  */
81139
- var OsdTemplateBindingSchema = z.object({
81140
- /** Token stem in the parser, e.g. `t` → `{t}` / `{t.value}`. Unique within the template. */
81141
- alias: z.string().min(1).max(32).regex(/^[A-Za-z][A-Za-z0-9_-]*$/, "alias must start with a letter"),
81142
- pick: OsdTemplatePickSchema,
81143
- capName: z.string().min(1).max(64),
81144
- valuePath: z.string().min(1).max(64),
81145
- /** Convert TO this unit at render (`tryConvertUnit`). Absent = source unit. */
81146
- displayUnit: z.string().max(16).optional(),
81147
- maxDecimals: z.number().int().min(0).max(4).default(1),
81148
- /** Raw value → display text (same shape as slot binding). Empty string hides. */
81149
- valueMap: z.record(z.string(), z.string()).optional()
81150
- });
81244
+ var OSD_TEMPLATE_TEXT_MAX = 1024;
81151
81245
  /**
81152
- * A named template: bindings (alias → leaf field) + a parser that
81153
- * references `{alias}` / `{alias.value}` / `{alias.unit}` / `{alias.full}`.
81246
+ * A named template: the unit of reuse. A slot points at one by id; editing it
81247
+ * changes every slot that points at it, on every camera.
81154
81248
  */
81155
81249
  var OsdNamedTemplateSchema = z.object({
81156
81250
  id: z.string().min(1).max(64),
81157
81251
  name: z.string().min(1).max(64),
81158
- bindings: z.array(OsdTemplateBindingSchema).max(32).default([]),
81159
- /** Parser with alias placeholders, e.g. `{t.value} {t.unit} / {h}`. */
81160
- parser: z.string().max(256).default("")
81252
+ text: z.string().max(OSD_TEMPLATE_TEXT_MAX).default("")
81161
81253
  });
81162
81254
  /** Where a slot's value comes from. */
81163
81255
  var OsdSourceSchema = z.discriminatedUnion("kind", [
@@ -81166,26 +81258,6 @@ var OsdSourceSchema = z.discriminatedUnion("kind", [
81166
81258
  kind: z.literal("static"),
81167
81259
  text: z.string().max(64)
81168
81260
  }),
81169
- z.object({
81170
- kind: z.literal("clock"),
81171
- /** Token pattern: `YYYY MM DD HH mm ss`. Everything else is literal. */
81172
- pattern: z.string().min(1).max(32).default("HH:mm"),
81173
- /** IANA zone. Omitted = the server's zone. */
81174
- timezone: z.string().min(1).max(64).optional()
81175
- }),
81176
- z.object({
81177
- kind: z.literal("device-state"),
81178
- deviceId: z.number().int().optional(),
81179
- capName: z.string().min(1).max(64),
81180
- /** Dot path inside the slice, e.g. `detected`, `value`, `mode`. */
81181
- valuePath: z.string().min(1).max(64),
81182
- /** Convert TO this unit at render. Absent = no conversion. */
81183
- displayUnit: z.string().max(16).optional()
81184
- }),
81185
- z.object({
81186
- kind: z.literal("latest-recognition"),
81187
- recognition: z.enum(["person", "plate"])
81188
- }),
81189
81261
  z.object({
81190
81262
  kind: z.literal("template"),
81191
81263
  templateId: z.string().min(1).max(64)
@@ -81195,15 +81267,6 @@ var OsdSlotBindingSchema = z.object({
81195
81267
  /** Off = the manager stops driving this slot. It does NOT clear it. */
81196
81268
  enabled: z.boolean().default(true),
81197
81269
  source: OsdSourceSchema,
81198
- /** `${value}` and `${unit}` are substituted; every occurrence. */
81199
- template: z.string().max(96).default("${value}"),
81200
- /**
81201
- * Decimal places for a numeric value. `0` yields an integer — the
81202
- * documented workaround for firmwares that reject `.` in overlay text.
81203
- */
81204
- maxDecimals: z.number().int().min(0).max(4).default(1),
81205
- /** Raw value → display text, e.g. `{"true":"MOTION","false":""}`. */
81206
- valueMap: z.record(z.string(), z.string()).optional(),
81207
81270
  /** Time windows in which the slot is shown. Absent = always. */
81208
81271
  schedule: NcScheduleSchema.optional(),
81209
81272
  /**
@@ -81245,26 +81308,16 @@ var OsdRenderResultSchema = z.object({
81245
81308
  /** Why, whenever the outcome is not a plain write. Never silent. */
81246
81309
  reason: z.string().optional()
81247
81310
  });
81248
- var OsdSourceValueTypeEnum = z.enum([
81249
- "number",
81250
- "boolean",
81251
- "string",
81252
- "enum"
81253
- ]);
81254
81311
  /**
81255
- * One bindable value, derived from a cap's `runtimeState` schema — never
81256
- * hand-listed. The editor renders from this, so a cap that ships a new
81257
- * state field becomes bindable with no UI change.
81312
+ * A template rendered for one camera without being saved: what the editor
81313
+ * previews. `text` is what the overlay would carry; a refused render has a
81314
+ * `reason` and an empty text.
81258
81315
  */
81259
- var OsdSourceOptionSchema = z.object({
81260
- deviceId: z.number().int(),
81261
- deviceName: z.string(),
81262
- capName: z.string(),
81263
- valuePath: z.string(),
81264
- label: z.string(),
81265
- valueType: OsdSourceValueTypeEnum,
81266
- /** Present for `enum`; the editor offers these as `valueMap` keys. */
81267
- enumValues: z.array(z.string()).readonly().optional()
81316
+ var OsdTemplatePreviewSchema = z.object({
81317
+ ok: z.boolean(),
81318
+ text: z.string(),
81319
+ /** The refusal, or `ref: reason` per value that printed `—`. */
81320
+ notes: z.array(z.string())
81268
81321
  });
81269
81322
  var osdManagerCapability = {
81270
81323
  name: "osd-manager",
@@ -81281,12 +81334,6 @@ var osdManagerCapability = {
81281
81334
  slots: z.array(OsdSlotViewSchema)
81282
81335
  }), { auth: "admin" }),
81283
81336
  /**
81284
- * Every value bindable on this camera: its own state leaves first,
81285
- * then every other device's. Derived from the cap definitions, so it
81286
- * cannot drift from what the resolver can actually read.
81287
- */
81288
- getSourceCatalog: method(z.object({ deviceId: z.number().int() }), z.object({ sources: z.array(OsdSourceOptionSchema) }), { auth: "admin" }),
81289
- /**
81290
81337
  * The condition ids this gate can answer, alongside the FULL notification
81291
81338
  * condition catalog. Both, in one call, on purpose: an editor that showed
81292
81339
  * the catalog without the supported set would offer conditions that
@@ -81361,6 +81408,18 @@ var osdManagerCapability = {
81361
81408
  kind: "mutation",
81362
81409
  auth: "admin"
81363
81410
  }),
81411
+ /**
81412
+ * Render a template text for a camera without saving it, with the same
81413
+ * context a slot gets (`camera`, `now`, the recognitions). The editor's
81414
+ * preview; no side effects.
81415
+ */
81416
+ previewTemplate: method(z.object({
81417
+ deviceId: z.number().int(),
81418
+ text: z.string().max(OSD_TEMPLATE_TEXT_MAX)
81419
+ }), OsdTemplatePreviewSchema, {
81420
+ kind: "mutation",
81421
+ auth: "admin"
81422
+ }),
81364
81423
  /** Force a render pass over one camera now, instead of at the next tick. */
81365
81424
  renderDevice: method(z.object({ deviceId: z.number().int() }), z.object({ results: z.array(OsdRenderResultSchema) }), {
81366
81425
  kind: "mutation",
@@ -81376,7 +81435,7 @@ var osdManagerCapability = {
81376
81435
  kind: "mutation",
81377
81436
  auth: "admin"
81378
81437
  }),
81379
- /** Drop a named template. Bindings that still reference it render unreadable. */
81438
+ /** Drop a named template. Slots that still point at it render unreadable and keep their last text. */
81380
81439
  deleteTemplate: method(z.object({ templateId: z.string().min(1).max(64) }), z.object({ success: z.literal(true) }), {
81381
81440
  kind: "mutation",
81382
81441
  auth: "admin"
@@ -93344,7 +93403,7 @@ var valveCapability = {
93344
93403
  kind: "mutation",
93345
93404
  auth: "protected"
93346
93405
  }),
93347
- setPosition: method(z.object({
93406
+ setPosition: optionalMethod(z.object({
93348
93407
  deviceId: z.number().int().nonnegative(),
93349
93408
  position: z.number().min(0).max(100)
93350
93409
  }), z.void(), {
@@ -107955,13 +108014,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
107955
108014
  access: "create",
107956
108015
  role: "admin"
107957
108016
  },
107958
- "notificationRules.createSequence": {
107959
- capName: "notification-rules",
107960
- capScope: "system",
107961
- addonId: null,
107962
- access: "create",
107963
- role: "admin"
107964
- },
107965
108017
  "notificationRules.createSnooze": {
107966
108018
  capName: "notification-rules",
107967
108019
  capScope: "system",
@@ -107983,13 +108035,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
107983
108035
  access: "delete",
107984
108036
  role: "admin"
107985
108037
  },
107986
- "notificationRules.deleteSequence": {
107987
- capName: "notification-rules",
107988
- capScope: "system",
107989
- addonId: null,
107990
- access: "delete",
107991
- role: "admin"
107992
- },
107993
108038
  "notificationRules.getAlarmConfig": {
107994
108039
  capName: "notification-rules",
107995
108040
  capScope: "system",
@@ -108039,13 +108084,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
108039
108084
  access: "view",
108040
108085
  role: "admin"
108041
108086
  },
108042
- "notificationRules.getSequence": {
108043
- capName: "notification-rules",
108044
- capScope: "system",
108045
- addonId: null,
108046
- access: "view",
108047
- role: "admin"
108048
- },
108049
108087
  "notificationRules.getTemplateCatalog": {
108050
108088
  capName: "notification-rules",
108051
108089
  capScope: "system",
@@ -108067,13 +108105,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
108067
108105
  access: "view",
108068
108106
  role: "admin"
108069
108107
  },
108070
- "notificationRules.listSequences": {
108071
- capName: "notification-rules",
108072
- capScope: "system",
108073
- addonId: null,
108074
- access: "view",
108075
- role: "admin"
108076
- },
108077
108108
  "notificationRules.listSnoozes": {
108078
108109
  capName: "notification-rules",
108079
108110
  capScope: "system",
@@ -108144,13 +108175,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
108144
108175
  access: "create",
108145
108176
  role: "admin"
108146
108177
  },
108147
- "notificationRules.updateSequence": {
108148
- capName: "notification-rules",
108149
- capScope: "system",
108150
- addonId: null,
108151
- access: "create",
108152
- role: "admin"
108153
- },
108154
108178
  "notifier.cancel": {
108155
108179
  capName: "notifier",
108156
108180
  capScope: "device",
@@ -108235,21 +108259,21 @@ var METHOD_ACCESS_MAP = Object.freeze({
108235
108259
  access: "view",
108236
108260
  role: "admin"
108237
108261
  },
108238
- "osdManager.getSourceCatalog": {
108262
+ "osdManager.listTemplates": {
108239
108263
  capName: "osd-manager",
108240
108264
  capScope: "system",
108241
108265
  addonId: null,
108242
108266
  access: "view",
108243
108267
  role: "admin"
108244
108268
  },
108245
- "osdManager.listTemplates": {
108269
+ "osdManager.previewSlot": {
108246
108270
  capName: "osd-manager",
108247
108271
  capScope: "system",
108248
108272
  addonId: null,
108249
- access: "view",
108273
+ access: "create",
108250
108274
  role: "admin"
108251
108275
  },
108252
- "osdManager.previewSlot": {
108276
+ "osdManager.previewTemplate": {
108253
108277
  capName: "osd-manager",
108254
108278
  capScope: "system",
108255
108279
  addonId: null,
@@ -113039,6 +113063,180 @@ function projectAction(cap, action) {
113039
113063
  Object.entries(CAP_VOCABULARY_BY_NAME).flatMap(([cap, entry]) => entry.scope === "device" ? (entry.actions ?? []).map((a) => projectAction(cap, a)) : []);
113040
113064
  DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Heater, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
113041
113065
  DeviceFeature.BatteryOperated;
113066
+ function bound(cap, methods = [], authority = "reported") {
113067
+ return {
113068
+ kind: "cap",
113069
+ cap,
113070
+ methods,
113071
+ authority
113072
+ };
113073
+ }
113074
+ function derived(cap, methods = []) {
113075
+ return bound(cap, methods, "derived");
113076
+ }
113077
+ function reported(reason) {
113078
+ return {
113079
+ kind: "reported",
113080
+ reason
113081
+ };
113082
+ }
113083
+ var SLEEP_PENDING = "splits into a sleeping cap in a later phase of #459";
113084
+ var CAP_PENDING = "becomes a cap or is dropped in a later phase of #459";
113085
+ /** Exhaustive: a new `DeviceFeature` without a row does not compile. */
113086
+ var DEVICE_FEATURE_REQUIREMENTS = {
113087
+ [DeviceFeature.BatteryOperated]: reported(SLEEP_PENDING),
113088
+ [DeviceFeature.Rebootable]: derived("reboot", ["reboot"]),
113089
+ [DeviceFeature.Resyncable]: reported(CAP_PENDING),
113090
+ [DeviceFeature.NativeSnapshot]: reported(CAP_PENDING),
113091
+ [DeviceFeature.DoorbellButton]: derived("doorbell"),
113092
+ [DeviceFeature.TwoWayAudio]: derived("intercom", [
113093
+ "startTalkSession",
113094
+ "pushTalkAudio",
113095
+ "endTalkSession"
113096
+ ]),
113097
+ [DeviceFeature.PanTiltZoom]: derived("ptz"),
113098
+ [DeviceFeature.PtzAutotrack]: derived("ptz-autotrack"),
113099
+ [DeviceFeature.MotionTrigger]: derived("motion-trigger", ["setMotionTrigger"]),
113100
+ [DeviceFeature.TimedRun]: derived("timed-run", ["runFor"]),
113101
+ [DeviceFeature.Switch]: bound("switch", ["setState"]),
113102
+ [DeviceFeature.LightColorRgb]: reported(CAP_PENDING),
113103
+ [DeviceFeature.LightColorHsv]: reported(CAP_PENDING),
113104
+ [DeviceFeature.LightColorMired]: reported(CAP_PENDING),
113105
+ [DeviceFeature.ClimateDualSetpoint]: bound("climate-control", ["setTargetRange"]),
113106
+ [DeviceFeature.ClimateHumidity]: bound("climate-control", ["setTargetHumidity"]),
113107
+ [DeviceFeature.ClimateFanMode]: bound("climate-control", ["setFanMode"]),
113108
+ [DeviceFeature.ClimatePreset]: bound("climate-control", ["setPreset"]),
113109
+ [DeviceFeature.ClimateSwingVertical]: bound("climate-control", ["setSwingVertical"]),
113110
+ [DeviceFeature.ClimateSwingHorizontal]: bound("climate-control", ["setSwingHorizontal"]),
113111
+ [DeviceFeature.CoverPositionable]: bound("cover", ["setPosition"]),
113112
+ [DeviceFeature.CoverTilt]: bound("cover", ["setTiltPosition"]),
113113
+ [DeviceFeature.CoverStoppable]: bound("cover", ["stop"]),
113114
+ [DeviceFeature.ValvePositionable]: bound("valve", ["setPosition"]),
113115
+ [DeviceFeature.FanSpeed]: bound("fan-control", ["setPercentage"]),
113116
+ [DeviceFeature.FanPreset]: bound("fan-control", ["setPreset"]),
113117
+ [DeviceFeature.FanDirection]: bound("fan-control", ["setDirection"]),
113118
+ [DeviceFeature.FanOscillating]: bound("fan-control", ["setOscillating"]),
113119
+ [DeviceFeature.LockPinRequired]: reported(CAP_PENDING),
113120
+ [DeviceFeature.LockOpen]: bound("lock-control", ["open"]),
113121
+ [DeviceFeature.MediaPlayerSeek]: bound("media-player", ["seek"]),
113122
+ [DeviceFeature.MediaPlayerVolume]: bound("media-player", ["setVolume"]),
113123
+ [DeviceFeature.MediaPlayerMute]: bound("media-player", ["setMute"]),
113124
+ [DeviceFeature.MediaPlayerShuffle]: bound("media-player", ["setShuffle"]),
113125
+ [DeviceFeature.MediaPlayerRepeat]: bound("media-player", ["setRepeat"]),
113126
+ [DeviceFeature.MediaPlayerSelectSource]: bound("media-player", ["selectSource"]),
113127
+ [DeviceFeature.MediaPlayerPlayMedia]: bound("media-player", ["playMedia"]),
113128
+ [DeviceFeature.MediaPlayerNext]: bound("media-player", ["next"]),
113129
+ [DeviceFeature.MediaPlayerPrevious]: bound("media-player", ["previous"]),
113130
+ [DeviceFeature.MediaPlayerStop]: bound("media-player", ["stop"]),
113131
+ [DeviceFeature.MediaPlayerVolumeStep]: bound("media-player", ["volumeUp", "volumeDown"]),
113132
+ [DeviceFeature.MediaPlayerChannelStep]: bound("media-player", ["channelUp", "channelDown"]),
113133
+ [DeviceFeature.MediaPlayerPower]: bound("media-player", ["turnOn", "turnOff"]),
113134
+ [DeviceFeature.AlarmPinRequired]: reported(CAP_PENDING),
113135
+ [DeviceFeature.PresenceGps]: reported(CAP_PENDING),
113136
+ [DeviceFeature.NotifierImage]: reported(CAP_PENDING),
113137
+ [DeviceFeature.NotifierPriority]: reported(CAP_PENDING),
113138
+ [DeviceFeature.NotifierData]: reported(CAP_PENDING),
113139
+ [DeviceFeature.NotifierActions]: reported(CAP_PENDING),
113140
+ [DeviceFeature.NotifierRecipients]: reported(CAP_PENDING),
113141
+ [DeviceFeature.ScriptVariables]: reported(CAP_PENDING),
113142
+ [DeviceFeature.AutomationSkipCondition]: reported(CAP_PENDING),
113143
+ [DeviceFeature.VacuumHasMap]: reported(CAP_PENDING),
113144
+ [DeviceFeature.VacuumHasAi]: reported(CAP_PENDING),
113145
+ [DeviceFeature.MowerHasMap]: reported(CAP_PENDING),
113146
+ [DeviceFeature.MowerHasTargetedMowing]: reported(CAP_PENDING),
113147
+ [DeviceFeature.Navigation]: derived("navigation"),
113148
+ [DeviceFeature.NetworkLink]: derived("network-link")
113149
+ };
113150
+ var ALL_FEATURES = Object.values(DeviceFeature);
113151
+ function requirementOf(feature) {
113152
+ return DEVICE_FEATURE_REQUIREMENTS[feature];
113153
+ }
113154
+ /**
113155
+ * The provenance of every cap-backed feature, from one device's bindings. The
113156
+ * feature set the kernel persists and the "why is it missing" the device page
113157
+ * shows are the same computation.
113158
+ */
113159
+ function deriveFeatureProvenance(entries) {
113160
+ const out = [];
113161
+ for (const feature of ALL_FEATURES) {
113162
+ const req = requirementOf(feature);
113163
+ if (req.kind !== "cap") continue;
113164
+ const entry = entries.find((candidate) => candidate.capName === req.cap);
113165
+ if (entry === void 0) {
113166
+ out.push({
113167
+ feature,
113168
+ authority: req.authority,
113169
+ present: false,
113170
+ missing: {
113171
+ reason: "cap-not-bound",
113172
+ cap: req.cap
113173
+ }
113174
+ });
113175
+ continue;
113176
+ }
113177
+ const implemented = entry.implementedMethods;
113178
+ const lacking = implemented === void 0 ? [] : req.methods.filter((name) => !implemented.includes(name));
113179
+ if (lacking.length > 0) {
113180
+ out.push({
113181
+ feature,
113182
+ authority: req.authority,
113183
+ present: false,
113184
+ missing: {
113185
+ reason: "methods-not-implemented",
113186
+ cap: req.cap,
113187
+ methods: lacking
113188
+ }
113189
+ });
113190
+ continue;
113191
+ }
113192
+ out.push({
113193
+ feature,
113194
+ authority: req.authority,
113195
+ present: true,
113196
+ supplier: {
113197
+ cap: req.cap,
113198
+ providerAddonId: entry.providerAddonId,
113199
+ providerNodeId: entry.providerNodeId
113200
+ }
113201
+ });
113202
+ }
113203
+ return out;
113204
+ }
113205
+ function isDerivedAuthority(feature) {
113206
+ const req = requirementOf(feature);
113207
+ return req.kind === "cap" && req.authority === "derived";
113208
+ }
113209
+ var FEATURE_VALUES = new Set(ALL_FEATURES);
113210
+ function knownFeature(value) {
113211
+ return FEATURE_VALUES.has(value);
113212
+ }
113213
+ /** True when the kernel, not the driver, decides this feature. */
113214
+ function isKernelDerivedFeature(value) {
113215
+ return knownFeature(value) && isDerivedAuthority(value);
113216
+ }
113217
+ /**
113218
+ * The feature set to persist: the kernel's value for every `derived` feature,
113219
+ * plus the driver's own claim for the rest (`reported`). Unknown strings are
113220
+ * dropped.
113221
+ */
113222
+ function settleDeviceFeatures(entries, reportedByDriver) {
113223
+ const settled = /* @__PURE__ */ new Set();
113224
+ for (const item of deriveFeatureProvenance(entries)) if (item.present && item.authority === "derived") settled.add(item.feature);
113225
+ for (const value of reportedByDriver) if (knownFeature(value) && !isDerivedAuthority(value)) settled.add(value);
113226
+ return ALL_FEATURES.filter((feature) => settled.has(feature));
113227
+ }
113228
+ /**
113229
+ * What `registerDevice` stores. A driver re-registers after every probe with
113230
+ * its own idea of the features; the `derived` ones are the kernel's, so a
113231
+ * re-register keeps what the row already has for them. A first registration
113232
+ * (no row yet) takes the driver's list as a bootstrap until the kernel derives.
113233
+ */
113234
+ function reconcileReportedFeatures(stored, reported) {
113235
+ if (stored === void 0) return [...reported];
113236
+ const kept = stored.filter((value) => knownFeature(value) && isDerivedAuthority(value));
113237
+ const claimed = reported.filter((value) => !(knownFeature(value) && isDerivedAuthority(value)));
113238
+ return [...new Set([...claimed, ...kept])];
113239
+ }
113042
113240
  DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher;
113043
113241
  var HA_AS = "a power sensor (device_class power). Home Assistant has no laundry domain. running-state stays unexported until a null reading can be published as unavailable.";
113044
113242
  var HOMEKIT_REASON = "HomeKit has no laundry-appliance service. The export tab would pair an accessory with nothing on it: running-state is withheld until a null reading can be unavailable, and power is not a HomeKit service this export honours.";
@@ -114785,12 +114983,12 @@ Object.freeze({
114785
114983
  form: "single",
114786
114984
  optional: false
114787
114985
  }],
114788
- "osdManager.getSourceCatalog": [{
114986
+ "osdManager.previewSlot": [{
114789
114987
  name: "deviceId",
114790
114988
  form: "single",
114791
114989
  optional: false
114792
114990
  }],
114793
- "osdManager.previewSlot": [{
114991
+ "osdManager.previewTemplate": [{
114794
114992
  name: "deviceId",
114795
114993
  form: "single",
114796
114994
  optional: false
@@ -118456,4 +118654,4 @@ z.object({
118456
118654
  commands: z.record(z.string(), z.unknown())
118457
118655
  });
118458
118656
  //#endregion
118459
- export { DeviceRunSchema as $, storageMigrationCapability as $a, vocabActionIdFor as $c, platformProbeCapability as $i, consumablesCapability as $n, nextLocalMidnight as $o, isAlertEpisodeOpen as $r, collectSecretMarkerRefs as $s, SchedulerError as $t, ConsumableItemSchema as A, resolveStepArgs as Aa, makeSecretMarker as Ac, methodRefusal as Ai, buildActionSteps as An, DEFAULT_HISTORY_RETENTION as Ao, evaluateStepCondition as Ar, ReadinessTimeoutError as As, MigrationLedgerEntrySchema as At, DERIVED_CAMERA_SILENCED_CAP_NAMES as B, seedInstanceOnce as Ba, recordSecretRef as Bc, normalizeStepTargets as Bi, catalogueIssues as Bn, compositionFeatureEnabled as Bo, filesystemBrowseCapability as Br, UnindexedFilterError as Bs, PreferenceNamespaceSchema as Bt, COMPOSER_RUNNER_ID as C, resolveHubAddressRoles as Ca, isKeychainStoredField as Cc, logLevelAtMost as Ci, appendTrace as Cn, weekdayOfLocalDate as Co, deviceStateCapability as Cr, RECORD_DELETE_BATCH as Cs, KeychainResetRecordSchema as Ct, CalendarPreferencesSchema as D, resolveNotificationTapAddress as Da, isSecretMarker as Dc, mediaPlayerCapability as Di, bareAddonId as Dn, COMPOSER_ADDON_ID as Do, enumerateItemArrayFields as Dr, REMOVE_LEAF as Ds, MINUTES_PER_DAY as Dt, CREDENTIAL_TOKEN_AUDIENCE as E, resolveMutate as Ea, isSecretFieldView as Ec, mayWriteToLocation as Ei, backupCapability as En, zoneOnlySite as Eo, enumerateInferenceDevices as Er, REDACTED_SECRET as Es, MIGRATION_API_V1_METHODS as Et, DATABASE_SNAPSHOT_SUFFIX as F, runtimeStatePolicyFor as Fa, normalizeSecretOwner as Fc, motionCapability as Fi, buildStreamParamsConfigSchema as Fn, MINUTE_MS as Fo, extractNestedAddonId as Fr, RecordUniqueViolationError as Fs, PROPOSAL_MIN_SPAN_MS as Ft, DEVICE_SAN_CREDENTIAL_PREFIX as G, shortHostname as Ga, secretTreeFromPaths as Gc, orderMigrations as Gi, collectDeviceTemplates as Gn, disarmRoseMemory as Go, gbToBytes as Gr, asNumber as Gs, ROOT_BUCKET_KEY as Gt, DEVICE_HISTORY_ENERGY_KEY as H, sharedActuatorFeatures as Ha, resolveSecretMarkers as Hc, objectInputDeclaresAddonId as Hi, checkRoleAddress as Hn, compositionSliceKey as Ho, foldSnapshotByFunction as Hr, WELL_KNOWN_TAB_MAP as Hs, QuantityUnitError as Ht, DATABASE_SNAPSHOT_TIMEOUT_MS as I, schedulersCapability as Ia, parseJsonObject as Ic, nextOccurrence as Ii, calendarsCapability as In, buildFfmpegArgs as Io, fanControlCapability as Ir, RevConflictError as Is, PackageRequiresSchema as It, DEVICE_TEMPLATE_MAX_LENGTH as J, snapshotCapability as Ja, sleep as Jc, parseStreamParamsFormPatch as Ji, compareVersions as Jn, helperMembers as Jo, groupTemplate as Jr, assertValidDeclaration as Js, RemoteLayoutPayloadSchema as Jt, DEVICE_SAN_USER_PREFIX as K, siteFor as Ka, secretTreeFromSchema as Kc, parseAcceleratorFactsJson as Ki, collectWhenMirrorSources as Kn, evaluateDerivative as Ko, generateDeviceAlias as Kr, asString$1 as Ks, RecordingStatusSchema as Kt, DATA_STORE_DATABASES as L, scopesAllowAddon as La, parseJsonUnknown as Lc, normalizeActionUnits as Li, cameraGridLayoutCapability as Ln, cloneStatefulExpressionMemory as Lo, fanOutTargets as Lr, SECRET_CLEAR as Ls, PetFountainStatusSchema as Lt, CoreBlockSchema as M, runFanOut as Ma, nodeIdOfScopedKey as Mc, migrationsCapability as Mi, buildDeviceEnrollmentLink as Mn, HISTORY_SLOW_MS as Mo, evictionPolicyOfLocation as Mr, RecordKindDeclarationSchema as Ms, NetworkTunnelStartedDataSchema as Mt, CredentialTokenClaimsSchema as N, runSteps as Na, nodePin as Nc, modeForSwitch as Ni, buildDeviceSignatureMessage as Nn, HOUR_MS as No, expandContainer as Nr, RecordNotFoundError as Ns, PET_FOUNTAIN_WATER_KEY as Nt, CatalogFileSchema as O, resolveRemoteSource as Oa, isSecretMarkerLike as Oc, mediaPlayerFeaturesOfRoles as Oi, batteryCapability as On, CompositionSchema as Oo, enumerateSchemaFields as Or, RUNTIME_DEFAULTS as Os, MOTION_CLOSE_AFTER_MS as Ot, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as P, runtimeFieldUnit as Pa, normalizeNodeId as Pc, modeMayWrite as Pi, buildHeroModel as Pn, HelperMemberSchema as Po, expressionContainsBuiltinCall as Pr, RecordTooLargeError as Ps, PREFERENCES_MAX_VALUE_BYTES as Pt, DeclaredDevices as Q, storageCapability as Qa, userError as Qc, planComposition as Qi, compositionSourceRefs as Qn, isHistoryHelper as Qo, interpolate as Qr, collectSecretLeaves as Qs, STREAM_PROFILE_META as Qt, DAY_NAMES as R, scopesAllowDeviceCap as Ra, parseSecretRef as Rc, normalizeCapStep as Ri, canonicalIconKey as Rn, composedDeviceRef as Ro, fanPresetsCapability as Rr, StoredRecordKindDeclarationSchema as Rs, PowerSourceInfoSchema as Rt, COMPOSED_ITEM_FIXED_FIELDS as S, resolveHeroLayout as Sa, isInstanceEnabled as Sc, logDestinationCapability as Si, alertsCapability as Sn, vectorStoreCapability as So, deviceRunsCapability as Sr, RECORD_BATCH_MAX_BYTES as Ss, KeychainAuditEntrySchema as St, CORE_BLOCK_ADDON_PREFIX as T, resolveMethodAuth as Ta, isSecretClear as Tc, mayReadLocation as Ti, authProviderCapability as Tn, withLocationMode as To, deviceTransitionsCapability as Tr, RECORD_SWEEP_INTERVAL_MS as Ts, METHOD_ACCESS_MAP as Tt, DEVICE_ID_FIELD as U, sharedActuatorMethods as Ua, ruleFireOfClaim as Uc, objectInputDeclaresRequiredDeviceId as Ui, checkTemplatePayload as Un, compositionSourceKey as Uo, formatDeviceRevoker as Ur, actionEffect as Us, RECORDING_SOURCE_CAMSTACK_ADDON as Ut, DEVICE_ENROLLMENT_TTL_MS as V, settingsStoreCapability as Va, resolveCapMount as Vc, normalizeUnit as Vi, checkDeviceAlias as Vn, compositionItemFieldPath as Vo, findChannelSource as Vr, UnknownRecordKindError as Vs, PreferenceValueSchema as Vt, DEVICE_NONCE_TTL_MS as W, sharedColorModes as Wa, scopeKey as Wc, occurrenceOn as Wi, climateControlCapability as Wn, createStatefulExpressionMemory as Wo, formatMinutes as Wr, asJsonObject as Ws, REMOTE_MEDIA_COMMANDS as Wt, DEVICE_TOMBSTONE_RETENTION_MS as X, stableIdMapOf as Xa, toSecretFieldView as Xc, petFountainWaterItem as Xi, composerCapability as Xn, integrateReading as Xo, integrationInstancesCapability as Xr, buildSecretRef as Xs, STORAGE_ACCESS_FALLBACK as Xt, DEVICE_TEMPLATE_MAX_OUTPUT as Y, splitTranslationRef as Ya, toNodeId as Yc, petFountainCapability as Yi, compileScalarOverride as Yn, historyRetentionFromSettings as Yo, heroLayoutCapability as Yr, auditedFields as Ys, RunningStateStatusSchema as Yt, DataStoreDatabaseSchema as Z, storageAdminCapability as Za, transformSecretWrite as Zc, pickAppLinkHub as Zi, compositionFieldKey as Zn, isForwardInputRef as Zo, internalActionId as Zr, collectSecretConfigKeys as Zs, STORAGE_LOCATION_MODES as Zt, BatteryStatusSchema as _, resolveActionVariables as _a, hydrateSchema as _c, localDateOf as _i, addonPagesCapability as _n, validateCustomAddress as _o, deviceCredentialsCapability as _r, HISTORY_DEFAULT_MIN_INTERVAL_MS as _s, HUB_MDNS_TXT_KEYS as _t, AGENT_MDNS_SERVICE_TYPE as a, processTimeZoneOr as aa, defineAddonMigrations as ac, isDefaultAppConnectionEndpoint as ai, errMsg as al, StorageLocationModeSchema as an, switchCapability as ao, coverCapability as ar, toExpressionValue as as, EMPTY_REMOTE_CONFIG as at, CAP_NAMES_WITH_STATUS as b, resolveCoreBlockEntry as ba, isDeviceConfigCap as bc, lockControlCapability as bi, alertEpisodeId as bn, vectorDimFromBase64 as bo, deviceManagerCapability as br, PlaintextSecretError as bs, INTERNAL_ACTION_PREFIX as bt, ActionError as c, ptzAutotrackCapability as ca, defineRecordKinds as cc, isObjectInput as ci, SwitchStatusSchema as cn, timedRunCapability as co, dataStoreProviderCapability as cr, BatchTooLargeError as cs, FanControlStatusSchema as ct, ActionTargetResolver as d, recordsCapability as da, entryBody as dc, kebabToCamel as di, UNATTRIBUTED_BUCKET_KEY as dn, timedRunQuickRun as do, declaredSeriesKind as dr, DEVICE_SETTINGS_CONTRIBUTION_METHODS as ds, FieldClaimModeSchema as dt, powerSourceCapability as ea, collectZodSecretPaths as ec, isAlertEpisodeSeverity as ei, withoutCallerStamp as el, SchedulerSchema as en, storageOccupancyCapability as eo, coreBlockAddonId as er, openReset as es, DeviceStatusSchema as et, ActionVariableSchema as f, reducePoints as fa, expandCapMethods as fc, keychainAdminCapability as fi, UserRecordSchema as fn, timedRunSeconds as fo, decodeVectorBase64 as fr, DEVICE_STATUS_METHOD as fs, FieldClaimSchema as ft, BaseDevice as g, replacedFieldKeys as ga, historyUnitFor as gc, lifecycleJobSchema as gi, addonIdOfActionId as gn, validateComposition as go, describeUnmet as gr, ForeignSecretMarkerError as gs, HUB_MDNS_SERVICE_TYPE as gt, BUILTIN_REMOTE_COMPONENTS as h, remoteSourceSteps as ha, historyItemFieldPath as hc, legacyModeOf as hi, actionsCapability as hn, userManagementCapability as ho, describeComposableCaps as hr, FilterRequiredError as hs, HISTORY_ITEM_CATALOG as ht, ACTUATOR_TEMPLATE_IDS as i, procedureAuthKey as ia, customAction as ic, isCredentialTokenPayload as ii, DeviceType as il, StorageCleanupJobSchema as in, supportedRuntimes as io, coreBlocksCapability as ir, statisticCadenceMs as is, EMPTY_REMOTE_ASSUMED_STATE as it, ControlStatusSchema as j, resolveTemplateRef as ja, mapSecretLeaves as jc, metricsProviderCapability as ji, buildCapabilityLookup as jn, HISTORY_FAST_MS as jo, evaluateWhenTree as jr, RecordIntegrationInstances as js, MigrationMetaSchema as jt, ConditionMirror as k, resolveRunnerId as ka, isSecretRefOwnedBy as kc, memoizePinnedFfmpeg as ki, brightnessCapability as kn, DAY_MS as ko, evaluateCompositionField as kr, ReadinessRegistry as ks, MediaPlayerStatusSchema as kt, ActionMinDelaySecSchema as l, readStoredRemoteConfig as la, emitDownForOwnedCaps as lc, isSameAddonId as li, TemplateKindSchema as ln, timedRunLimitOf as lo, databaseSnapshotCapability as lr, CALLER_STAMPED_CAPABILITIES as ls, FanDirectionSchema as lt, AutomationStateDocSchema as m, remoteLayoutComponentsCapability as ma, getDebugInterest as mc, legacyAutoLinkIds as mi, actionWaitTotalMs as mn, unmetRequirements as mo, deriveBatteryPresence as mr, DeviceTransitionSchema as ms, HISTORY_CATALOG as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, preconditionOf as na, commandOrigin as nc, isArrayOutputSchema as ni, DeviceFeature as nl, ServerNameSchema as nn, streamCatalogCapability as no, coreBlockIdFromAddonId as nr, planResetTier as ns, DiscoveryProposalBodySchema as nt, AGENT_MDNS_TXT_KEYS as o, projectDeviceRow as oa, defineCustomActions as oc, isInternalActionId as oi, featuresOfBoundCaps as ol, StorageLocationTypeSchema as on, switchStateOfMode as oo, createDeviceExtensionProvider as or, wattMillisecondsToKwh as os, FAN_CAPTURE_FIELDS as ot, AlertSchema as p, remoteCapability as pa, formatSecretScope as pc, keychainCapability as pi, actionSourceCapability as pn, toTimings as po, defineExtensionSlotProvider as pr, DeclarationRefusedError as ps, GroupCommandResultSchema as pt, DEVICE_TEMPLATE_FILTERS as q, siteZoneKey as qa, secretViewsOf as qc, parseColorInput as qi, colorCapability as qn, evaluateStatistic as qo, groupCommandsCapability as qr, assertTransactScope as qs, RemoteAssumedStateSchema as qt, ACTUATOR_METHODS as r, problemsBlockSave as ra, createEvent as rc, isCollectionArrayMethod as ri, DeviceRole as rl, SsoBridgeClaimsSchema as rn, streamQualityLabel as ro, coreBlockSourceKind as rr, planStatisticTier as rs, EMPTY_AUTOMATION_STATE as rt, ALL_CAPABILITY_DEFINITIONS as s, proposeRunningThreshold as sa, defineEntryKind as sc, isLocationEnabled as si, EventCategory as sl, StorageMigrationJobSchema as sn, templateCapability as so, customKeyOfRole as sr, BaseAddon as ss, FIRST_LEVEL_MACRO_CLASSES as st, ACTION_RUN_MAX_MS as t, powerSourceLinkOfComposition as ta, commandEffect as tc, isAppLinkBase as ti, COMPOSED_DEVICE_STABLE_ID_PREFIX as tl, ScopedTokenSchema as tn, storageProviderCapability as to, coreBlockComposition as tr, openStatistic as ts, DeviceTombstoneSchema as tt, ActionStepSchema as u, recordEntriesCapability as ua, emitReadiness as uc, isVoidInput as ui, TokenScopeSchema as un, timedRunMaxIn as uo, declarationOwnerNodeId as ur, DATAPLANE_SECRET_HEADER as us, FanPresetSchema as ut, CAMERA_SWITCH_ORDER as v, resolveAppConnections as va, isCommand as vc, localNetworkCapability as vi, addonSettingsCapability as vn, validateSchedulerInput as vo, deviceExtensionCapability as vr, InvalidRecordError as vs, HvacModeSchema as vt, CORE_BLOCKS_ADDON_ID as w, resolveLocationMode as wa, isReadingQuantity as wc, looseSchema as wi, armRemovalReconcile as wn, withDefaultRunning as wo, deviceStatusCapability as wr, RECORD_SECRET_COLLECTION_PREFIX as ws, LOG_LEVEL_RANK as wt, CATALOG_LANGS as x, resolveCoreBlockFiles as xa, isEvent as xc, lockDoorLinkOfComposition as xi, alertEpisodePayload as xn, vectorIndexDimConflictError as xo, deviceRemovalHookCapability as xr, RECORD_BATCH_MAX as xs, KEYCHAIN_RESET_TRIGGER_ACTOR as xt, CAMSTACK_APP_LINK_ORIGIN as y, resolveBucketMs as ya, isDebugChannelName as yc, locationIconKey as yi, addonWidgetsCapability as yn, valveCapability as yo, deviceHistoryCapability as yr, NoCallerError as ys, IDLE_ACTION_STATUS as yt, DEFAULT_HOLD_OVERRIDE as z, scoreRuntimes as za, readinessKey as zc, normalizeCoreBlockWrite as zi, capUnitResolver as zn, composedDeviceStableId as zo, featureForwards as zr, TransactRefusedError as zs, PreferenceDeviceIdSchema as zt };
118657
+ export { DataStoreDatabaseSchema as $, snapshotCapability as $a, secretViewsOf as $c, petFountainWaterItem as $i, compositionFieldKey as $n, helperMembers as $o, internalActionId as $r, assertTransactScope as $s, STORAGE_LOCATION_MODES as $t, ConsumableItemSchema as A, resolveMutate as Aa, isReadingQuantity as Ac, mediaPlayerCapability as Ai, batteryCapability as An, withLocationMode as Ao, enumerateSchemaFields as Ar, RECORD_SECRET_COLLECTION_PREFIX as As, MOTION_CLOSE_AFTER_MS as At, DERIVED_CAMERA_SILENCED_CAP_NAMES as B, schedulersCapability as Ba, normalizeNodeId as Bc, normalizeActionUnits as Bi, canonicalIconKey as Bn, MINUTE_MS as Bo, fanPresetsCapability as Br, RecordTooLargeError as Bs, PowerSourceInfoSchema as Bt, COMPOSER_RUNNER_ID as C, resolveBucketMs as Ca, hydrateSchema as Cc, lockControlCapability as Ci, alertEpisodePayload as Cn, validateSchedulerInput as Co, deviceRemovalHookCapability as Cr, HISTORY_DEFAULT_MIN_INTERVAL_MS as Cs, KEYCHAIN_RESET_TRIGGER_ACTOR as Ct, CalendarPreferencesSchema as D, resolveHubAddressRoles as Da, isEvent as Dc, looseSchema as Di, authProviderCapability as Dn, vectorStoreCapability as Do, deviceTransitionsCapability as Dr, RECORD_BATCH_MAX as Ds, METHOD_ACCESS_MAP as Dt, CREDENTIAL_TOKEN_AUDIENCE as E, resolveHeroLayout as Ea, isDeviceConfigCap as Ec, logLevelAtMost as Ei, armRemovalReconcile as En, vectorIndexDimConflictError as Eo, deviceStatusCapability as Er, PlaintextSecretError as Es, LOG_LEVEL_RANK as Et, DATABASE_SNAPSHOT_SUFFIX as F, resolveTemplateRef as Fa, isSecretRefOwnedBy as Fc, migrationsCapability as Fi, buildDeviceSignatureMessage as Fn, DEFAULT_HISTORY_RETENTION as Fo, expandContainer as Fr, ReadinessRegistry as Fs, PET_FOUNTAIN_WATER_KEY as Ft, DEVICE_SAN_CREDENTIAL_PREFIX as G, settingsStoreCapability as Ga, readinessKey as Gc, objectInputDeclaresAddonId as Gi, checkTemplatePayload as Gn, compositionFeatureEnabled as Go, formatDeviceRevoker as Gr, TransactRefusedError as Gs, RECORDING_SOURCE_CAMSTACK_ADDON as Gt, DEVICE_HISTORY_ENERGY_KEY as H, scopesAllowDeviceCap as Ha, parseJsonObject as Hc, normalizeCoreBlockWrite as Hi, catalogueIssues as Hn, cloneStatefulExpressionMemory as Ho, filesystemBrowseCapability as Hr, RevConflictError as Hs, PreferenceNamespaceSchema as Ht, DATABASE_SNAPSHOT_TIMEOUT_MS as I, runFanOut as Ia, makeSecretMarker as Ic, modeForSwitch as Ii, buildHeroModel as In, HISTORY_FAST_MS as Io, expressionContainsBuiltinCall as Ir, ReadinessTimeoutError as Is, PREFERENCES_MAX_VALUE_BYTES as It, DEVICE_TEMPLATE_MAX_LENGTH as J, sharedActuatorMethods as Ja, resolveSecretMarkers as Jc, orderMigrations as Ji, collectWhenMirrorSources as Jn, compositionSourceKey as Jo, generateDeviceAlias as Jr, WELL_KNOWN_TAB_MAP as Js, RecordingStatusSchema as Jt, DEVICE_SAN_USER_PREFIX as K, settleDeviceFeatures as Ka, recordSecretRef as Kc, objectInputDeclaresRequiredDeviceId as Ki, climateControlCapability as Kn, compositionItemFieldPath as Ko, formatMinutes as Kr, UnindexedFilterError as Ks, REMOTE_MEDIA_COMMANDS as Kt, DATA_STORE_DATABASES as L, runSteps as La, mapSecretLeaves as Lc, modeMayWrite as Li, buildStreamParamsConfigSchema as Ln, HISTORY_SLOW_MS as Lo, extractNestedAddonId as Lr, RecordIntegrationInstances as Ls, PROPOSAL_MIN_SPAN_MS as Lt, CoreBlockSchema as M, resolveRemoteSource as Ma, isSecretFieldView as Mc, memoizePinnedFfmpeg as Mi, buildActionSteps as Mn, COMPOSER_ADDON_ID as Mo, evaluateStepCondition as Mr, REDACTED_SECRET as Ms, MigrationLedgerEntrySchema as Mt, CredentialTokenClaimsSchema as N, resolveRunnerId as Na, isSecretMarker as Nc, methodRefusal as Ni, buildCapabilityLookup as Nn, CompositionSchema as No, evaluateWhenTree as Nr, REMOVE_LEAF as Ns, MigrationMetaSchema as Nt, CatalogFileSchema as O, resolveLocationMode as Oa, isInstanceEnabled as Oc, mayReadLocation as Oi, backupCapability as On, weekdayOfLocalDate as Oo, enumerateInferenceDevices as Or, RECORD_BATCH_MAX_BYTES as Os, MIGRATION_API_V1_METHODS as Ot, DATABASE_SNAPSHOT_PARTIAL_SUFFIX as P, resolveStepArgs as Pa, isSecretMarkerLike as Pc, metricsProviderCapability as Pi, buildDeviceEnrollmentLink as Pn, DAY_MS as Po, evictionPolicyOfLocation as Pr, RUNTIME_DEFAULTS as Ps, NetworkTunnelStartedDataSchema as Pt, DEVICE_TOMBSTONE_RETENTION_MS as Q, siteZoneKey as Qa, secretTreeFromSchema as Qc, petFountainCapability as Qi, composerCapability as Qn, evaluateStatistic as Qo, integrationInstancesCapability as Qr, asString$1 as Qs, STORAGE_ACCESS_FALLBACK as Qt, DAY_NAMES as R, runtimeFieldUnit as Ra, nodeIdOfScopedKey as Rc, motionCapability as Ri, calendarsCapability as Rn, HOUR_MS as Ro, fanControlCapability as Rr, RecordKindDeclarationSchema as Rs, PackageRequiresSchema as Rt, COMPOSED_ITEM_FIXED_FIELDS as S, resolveAppConnections as Sa, historyUnitFor as Sc, locationIconKey as Si, alertEpisodeId as Sn, validateCustomAddress as So, deviceManagerCapability as Sr, ForeignSecretMarkerError as Ss, INTERNAL_ACTION_PREFIX as St, CORE_BLOCK_ADDON_PREFIX as T, resolveCoreBlockFiles as Ta, isDebugChannelName as Tc, logDestinationCapability as Ti, appendTrace as Tn, vectorDimFromBase64 as To, deviceStateCapability as Tr, NoCallerError as Ts, KeychainResetRecordSchema as Tt, DEVICE_ID_FIELD as U, scoreRuntimes as Ua, parseJsonUnknown as Uc, normalizeStepTargets as Ui, checkDeviceAlias as Un, composedDeviceRef as Uo, findChannelSource as Ur, SECRET_CLEAR as Us, PreferenceValueSchema as Ut, DEVICE_ENROLLMENT_TTL_MS as V, scopesAllowAddon as Va, normalizeSecretOwner as Vc, normalizeCapStep as Vi, capUnitResolver as Vn, buildFfmpegArgs as Vo, featureForwards as Vr, RecordUniqueViolationError as Vs, PreferenceDeviceIdSchema as Vt, DEVICE_NONCE_TTL_MS as W, seedInstanceOnce as Wa, parseSecretRef as Wc, normalizeUnit as Wi, checkRoleAddress as Wn, composedDeviceStableId as Wo, foldSnapshotByFunction as Wr, StoredRecordKindDeclarationSchema as Ws, QuantityUnitError as Wt, DEVICE_TEMPLATE_THIS_ALIAS as X, shortHostname as Xa, scopeKey as Xc, parseColorInput as Xi, compareVersions as Xn, disarmRoseMemory as Xo, groupTemplate as Xr, asJsonObject as Xs, RemoteLayoutPayloadSchema as Xt, DEVICE_TEMPLATE_MAX_OUTPUT as Y, sharedColorModes as Ya, ruleFireOfClaim as Yc, parseAcceleratorFactsJson as Yi, colorCapability as Yn, createStatefulExpressionMemory as Yo, groupCommandsCapability as Yr, actionEffect as Ys, RemoteAssumedStateSchema as Yt, DEVICE_TEMPLATE_VALUES_CAP as Z, siteFor as Za, secretTreeFromPaths as Zc, parseStreamParamsFormPatch as Zi, compileScalarOverride as Zn, evaluateDerivative as Zo, heroLayoutCapability as Zr, asNumber as Zs, RunningStateStatusSchema as Zt, BatteryStatusSchema as _, remoteCapability as _a, entryBody as _c, legacyAutoLinkIds as _i, actionsCapability as _n, timedRunSeconds as _o, describeComposableCaps as _r, DEVICE_SETTINGS_CONTRIBUTION_METHODS as _s, HISTORY_ITEM_CATALOG as _t, AGENT_MDNS_SERVICE_TYPE as a, preconditionOf as aa, collectSecretMarkerRefs as ac, isCollectionArrayMethod as ai, vocabActionIdFor as al, SsoBridgeClaimsSchema as an, storageOccupancyCapability as ao, coreBlockSourceKind as ar, nextLocalMidnight as as, EMPTY_AUTOMATION_STATE as at, CAP_NAMES_WITH_STATUS as b, replacedFieldKeys as ba, getDebugInterest as bc, localDateOf as bi, addonSettingsCapability as bn, userManagementCapability as bo, deviceExtensionCapability as br, DeviceTransitionSchema as bs, HvacModeSchema as bt, ActionError as c, processTimeZoneOr as ca, commandOrigin as cc, isInternalActionId as ci, DeviceFeature as cl, StorageLocationTypeSchema as cn, streamQualityLabel as co, createDeviceExtensionProvider as cr, planResetTier as cs, FAN_CAPTURE_FIELDS as ct, ActionTargetResolver as d, ptzAutotrackCapability as da, defineAddonMigrations as dc, isObjectInput as di, errMsg as dl, TemplateKindSchema as dn, switchStateOfMode as do, databaseSnapshotCapability as dr, toExpressionValue as ds, FanDirectionSchema as dt, pickAppLinkHub as ea, assertValidDeclaration as ec, interpolate as ei, sleep as el, STREAM_PROFILE_META as en, splitTranslationRef as eo, compositionSourceRefs as er, historyRetentionFromSettings as es, DeclaredDevices as et, ActionVariableSchema as f, readStoredRemoteConfig as fa, defineCustomActions as fc, isSameAddonId as fi, featuresOfBoundCaps as fl, TokenScopeSchema as fn, templateCapability as fo, declarationOwnerNodeId as fr, wattMillisecondsToKwh as fs, FanPresetSchema as ft, BaseDevice as g, reducePoints as ga, emitReadiness as gc, keychainCapability as gi, actionWaitTotalMs as gn, timedRunQuickRun as go, deriveBatteryPresence as gr, DATAPLANE_SECRET_HEADER as gs, HISTORY_CATALOG as gt, BUILTIN_REMOTE_COMPONENTS as h, recordsCapability as ha, emitDownForOwnedCaps as hc, keychainAdminCapability as hi, actionSourceCapability as hn, timedRunMaxIn as ho, defineExtensionSlotProvider as hr, CALLER_STAMPED_CAPABILITIES as hs, GroupCommandResultSchema as ht, ACTUATOR_TEMPLATE_IDS as i, powerSourceLinkOfComposition as ia, collectSecretLeaves as ic, isArrayOutputSchema as ii, userError as il, ServerNameSchema as in, storageMigrationCapability as io, coreBlockIdFromAddonId as ir, isHistoryHelper as is, DiscoveryProposalBodySchema as it, ControlStatusSchema as j, resolveNotificationTapAddress as ja, isSecretClear as jc, mediaPlayerFeaturesOfRoles as ji, brightnessCapability as jn, zoneOnlySite as jo, evaluateCompositionField as jr, RECORD_SWEEP_INTERVAL_MS as js, MediaPlayerStatusSchema as jt, ConditionMirror as k, resolveMethodAuth as ka, isKeychainStoredField as kc, mayWriteToLocation as ki, bareAddonId as kn, withDefaultRunning as ko, enumerateItemArrayFields as kr, RECORD_DELETE_BATCH as ks, MINUTES_PER_DAY as kt, ActionMinDelaySecSchema as l, projectDeviceRow as la, createEvent as lc, isKernelDerivedFeature as li, DeviceRole as ll, StorageMigrationJobSchema as ln, supportedRuntimes as lo, customKeyOfRole as lr, planStatisticTier as ls, FIRST_LEVEL_MACRO_CLASSES as lt, AutomationStateDocSchema as m, recordEntriesCapability as ma, defineRecordKinds as mc, kebabToCamel as mi, UserRecordSchema as mn, timedRunLimitOf as mo, decodeVectorBase64 as mr, BatchTooLargeError as ms, FieldClaimSchema as mt, ACTION_TARGET_INVALIDATION_EVENTS as n, platformProbeCapability as na, buildSecretRef as nc, isAlertEpisodeSeverity as ni, toSecretFieldView as nl, SchedulerSchema as nn, storageAdminCapability as no, coreBlockAddonId as nr, integrateReading as ns, DeviceStatusSchema as nt, AGENT_MDNS_TXT_KEYS as o, problemsBlockSave as oa, collectZodSecretPaths as oc, isCredentialTokenPayload as oi, withoutCallerStamp as ol, StorageCleanupJobSchema as on, storageProviderCapability as oo, coreBlocksCapability as or, openReset as os, EMPTY_REMOTE_ASSUMED_STATE as ot, AlertSchema as p, reconcileReportedFeatures as pa, defineEntryKind as pc, isVoidInput as pi, EventCategory as pl, UNATTRIBUTED_BUCKET_KEY as pn, timedRunCapability as po, declaredSeriesKind as pr, BaseAddon as ps, FieldClaimModeSchema as pt, DEVICE_TEMPLATE_FILTERS as q, sharedActuatorFeatures as qa, resolveCapMount as qc, occurrenceOn as qi, collectDeviceTemplates as qn, compositionSliceKey as qo, gbToBytes as qr, UnknownRecordKindError as qs, ROOT_BUCKET_KEY as qt, ACTUATOR_METHODS as r, powerSourceCapability as ra, collectSecretConfigKeys as rc, isAppLinkBase as ri, transformSecretWrite as rl, ScopedTokenSchema as rn, storageCapability as ro, coreBlockComposition as rr, isForwardInputRef as rs, DeviceTombstoneSchema as rt, ALL_CAPABILITY_DEFINITIONS as s, procedureAuthKey as sa, commandEffect as sc, isDefaultAppConnectionEndpoint as si, COMPOSED_DEVICE_STABLE_ID_PREFIX as sl, StorageLocationModeSchema as sn, streamCatalogCapability as so, coverCapability as sr, openStatistic as ss, EMPTY_REMOTE_CONFIG as st, ACTION_RUN_MAX_MS as t, planComposition as ta, auditedFields as tc, isAlertEpisodeOpen as ti, toNodeId as tl, SchedulerError as tn, stableIdMapOf as to, consumablesCapability as tr, implementedMethodsOf as ts, DeviceRunSchema as tt, ActionStepSchema as u, proposeRunningThreshold as ua, customAction as uc, isLocationEnabled as ui, DeviceType as ul, SwitchStatusSchema as un, switchCapability as uo, dataStoreProviderCapability as ur, statisticCadenceMs as us, FanControlStatusSchema as ut, CAMERA_SWITCH_ORDER as v, remoteLayoutComponentsCapability as va, expandCapMethods as vc, legacyModeOf as vi, addonIdOfActionId as vn, toTimings as vo, describeUnmet as vr, DEVICE_STATUS_METHOD as vs, HUB_MDNS_SERVICE_TYPE as vt, CORE_BLOCKS_ADDON_ID as w, resolveCoreBlockEntry as wa, isCommand as wc, lockDoorLinkOfComposition as wi, alertsCapability as wn, valveCapability as wo, deviceRunsCapability as wr, InvalidRecordError as ws, KeychainAuditEntrySchema as wt, CATALOG_LANGS as x, resolveActionVariables as xa, historyItemFieldPath as xc, localNetworkCapability as xi, addonWidgetsCapability as xn, validateComposition as xo, deviceHistoryCapability as xr, FilterRequiredError as xs, IDLE_ACTION_STATUS as xt, CAMSTACK_APP_LINK_ORIGIN as y, remoteSourceSteps as ya, formatSecretScope as yc, lifecycleJobSchema as yi, addonPagesCapability as yn, unmetRequirements as yo, deviceCredentialsCapability as yr, DeclarationRefusedError as ys, HUB_MDNS_TXT_KEYS as yt, DEFAULT_HOLD_OVERRIDE as z, runtimeStatePolicyFor as za, nodePin as zc, nextOccurrence as zi, cameraGridLayoutCapability as zn, HelperMemberSchema as zo, fanOutTargets as zr, RecordNotFoundError as zs, PetFountainStatusSchema as zt };