@camstack/server 1.2.867 → 1.2.869

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 (95) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/api/trpc/generated-cap-routers.js +64 -0
  3. package/package.json +20 -9
  4. package/system/dist/addon-utils.mjs +1 -1
  5. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +4 -4
  7. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +5 -5
  9. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
  11. package/system/dist/builtins/autotrack/index.js +1 -1
  12. package/system/dist/builtins/autotrack/index.mjs +1 -1
  13. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  14. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +5 -5
  15. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  16. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  17. package/system/dist/builtins/camera-grid/index.js +1 -1
  18. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  19. package/system/dist/builtins/composer/composer.addon.js +4 -4
  20. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  21. package/system/dist/builtins/console-logging/index.js +1 -1
  22. package/system/dist/builtins/console-logging/index.mjs +1 -1
  23. package/system/dist/builtins/core-blocks/core-blocks.addon.js +29 -63
  24. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +29 -63
  25. package/system/dist/builtins/core-blocks/remote-service.d.ts +11 -8
  26. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  27. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  28. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  29. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  30. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  31. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  32. package/system/dist/builtins/keychain/index.js +4 -4
  33. package/system/dist/builtins/keychain/index.mjs +4 -4
  34. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  35. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  36. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  37. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  38. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  39. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  40. package/system/dist/builtins/loki-logging/index.js +1 -1
  41. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  42. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  43. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  44. package/system/dist/builtins/platform-probe/index.js +1 -1
  45. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  46. package/system/dist/builtins/record-entries/index.js +1 -1
  47. package/system/dist/builtins/record-entries/index.mjs +1 -1
  48. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  49. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  50. package/system/dist/builtins/snapshot/index.js +1 -1
  51. package/system/dist/builtins/snapshot/index.mjs +1 -1
  52. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  53. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  54. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  55. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  56. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  57. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  58. package/system/dist/builtins/storage-orchestrator/drain-ratchet.d.ts +8 -0
  59. package/system/dist/builtins/storage-orchestrator/storage-drain-event-monitor.d.ts +63 -0
  60. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +14 -0
  61. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +152 -2
  62. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +152 -2
  63. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  64. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  65. package/system/dist/builtins/winston-logging/index.js +1 -1
  66. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  67. package/system/dist/{capture-engine-BCB1OMc_.js → capture-engine-Bwhwpy3T.js} +1 -1
  68. package/system/dist/{capture-engine-5g4lu_OQ.mjs → capture-engine-hLbiQm2r.mjs} +1 -1
  69. package/system/dist/{composition-sources-VkBsGWZh.mjs → composition-sources-CXd5ydxk.mjs} +1 -1
  70. package/system/dist/{composition-sources-1yTVou3a.js → composition-sources-DqGVEx12.js} +1 -1
  71. package/system/dist/{constants-D1lf-y38.mjs → constants-BxOTlPMv.mjs} +1 -1
  72. package/system/dist/{constants-r86Qr7xE.js → constants-hVovxKZz.js} +1 -1
  73. package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  74. package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
  75. package/system/dist/{device-ca-Bs_oj8y_.js → device-ca-1vqFIP_t.js} +1 -1
  76. package/system/dist/{device-ca-aWcNrAeB.mjs → device-ca-B-yM5jiy.mjs} +1 -1
  77. package/system/dist/{dist-BeM3jcMe.mjs → dist-D1LOSOS0.mjs} +364 -14
  78. package/system/dist/{dist-CtlwobAt.js → dist-uTbt3Yxy.js} +364 -14
  79. package/system/dist/file-host-worker.js +1 -1
  80. package/system/dist/file-host-worker.mjs +1 -1
  81. package/system/dist/{hub-identity-CoyjSGzP.mjs → hub-identity-Dx3Jbhnp.mjs} +10 -10
  82. package/system/dist/{hub-identity-C_3WvvUh.js → hub-identity-TBo0Xrxk.js} +1 -1
  83. package/system/dist/{hub-mdns-ciao-MJdhRgSK.mjs → hub-mdns-ciao-Br5Vlcf0.mjs} +2 -2
  84. package/system/dist/{hub-mdns-ciao-DrpNoAbD.js → hub-mdns-ciao-C0xzb8jM.js} +2 -2
  85. package/system/dist/index.js +8 -8
  86. package/system/dist/index.mjs +217 -217
  87. package/system/dist/{legacy-integration-rows-door-DwD_6A21.mjs → legacy-integration-rows-door-CqsM5HcW.mjs} +1 -1
  88. package/system/dist/{legacy-integration-rows-door-DknPUCvT.js → legacy-integration-rows-door-c8pHSqwA.js} +1 -1
  89. package/system/dist/{rename-composition-block-B7ZEwdvM.mjs → rename-composition-block-Bbu4W1mg.mjs} +1 -1
  90. package/system/dist/{rename-composition-block-VNSmpCSW.js → rename-composition-block-DNgRnLHV.js} +1 -1
  91. package/system/dist/{restore-archive-CizGJ-13.js → restore-archive-D48JPP0d.js} +1 -1
  92. package/system/dist/{restore-archive-3-Gd66TK.mjs → restore-archive-DcS4GDfw.mjs} +94 -94
  93. package/system/dist/{wal-maintenance-CMKws6du.mjs → wal-maintenance-BoxO0tlN.mjs} +0 -0
  94. package/system/dist/{wal-maintenance-cI0DBU7k.js → wal-maintenance-D3s8jnax.js} +0 -0
  95. package/system/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { z } from "zod";
2
2
  import "node:crypto";
3
- //#region ../types/dist/event-category-Dv-Gcv1f.mjs
3
+ //#region ../types/dist/event-category-Dhcd0TRH.mjs
4
4
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
5
5
  EventCategory["SystemBoot"] = "system.boot";
6
6
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -274,6 +274,18 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
274
274
  EventCategory["StorageLocationCritical"] = "storage.location.critical";
275
275
  /** Recovery from low/critical on a storage location. */
276
276
  EventCategory["StorageLocationOk"] = "storage.location.ok";
277
+ /**
278
+ * A `drain` location's regular progress ping (#538) — location id + name,
279
+ * bytes remaining, the observed cede rate and the estimated empty date, or
280
+ * `null` fields when the occupancy read that sweep failed (D393: never
281
+ * folded to 0). Cadence is the named constant
282
+ * `DRAIN_PROGRESS_EVENT_INTERVAL_MS` (15 min) plus once on drain start — no
283
+ * operator knob. Telemetry (D8): a lost tick is a stale progress bar the
284
+ * next sweep corrects.
285
+ */
286
+ EventCategory["StorageDrainProgress"] = "storage.drain.progress";
287
+ /** Fires once when a draining location reaches zero evictable bytes. */
288
+ EventCategory["StorageDrainComplete"] = "storage.drain.complete";
277
289
  EventCategory["RecordingSegmentWritten"] = "recording.segment.written";
278
290
  EventCategory["RecordingPolicyFallback"] = "recording.policy.fallback";
279
291
  EventCategory["RecordingRetentionCompleted"] = "recording.retention.completed";
@@ -1259,7 +1271,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1259
1271
  */
1260
1272
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1261
1273
  //#endregion
1262
- //#region ../types/dist/sleep-B5XPl2YP.mjs
1274
+ //#region ../types/dist/sleep-DEd_klYQ.mjs
1263
1275
  /**
1264
1276
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1265
1277
  * window to float samples (D455).
@@ -9410,6 +9422,76 @@ var CAP_VOCABULARY_BY_NAME = {
9410
9422
  en: "Control",
9411
9423
  it: "Controllo"
9412
9424
  },
9425
+ actions: [
9426
+ {
9427
+ id: "select.next",
9428
+ method: "next",
9429
+ label: {
9430
+ en: "Next option",
9431
+ it: "Opzione successiva"
9432
+ },
9433
+ phrase: {
9434
+ en: "Select the next option on {device}",
9435
+ it: "Seleziona l’opzione successiva su {device}"
9436
+ },
9437
+ icon: "skip-forward",
9438
+ openArgs: [{
9439
+ key: "cycle",
9440
+ label: {
9441
+ en: "Wrap to the first option",
9442
+ it: "Ricomincia dalla prima opzione"
9443
+ },
9444
+ offer: { kind: "boolean" }
9445
+ }]
9446
+ },
9447
+ {
9448
+ id: "select.previous",
9449
+ method: "previous",
9450
+ label: {
9451
+ en: "Previous option",
9452
+ it: "Opzione precedente"
9453
+ },
9454
+ phrase: {
9455
+ en: "Select the previous option on {device}",
9456
+ it: "Seleziona l’opzione precedente su {device}"
9457
+ },
9458
+ icon: "skip-back",
9459
+ openArgs: [{
9460
+ key: "cycle",
9461
+ label: {
9462
+ en: "Wrap to the last option",
9463
+ it: "Ricomincia dall’ultima opzione"
9464
+ },
9465
+ offer: { kind: "boolean" }
9466
+ }]
9467
+ },
9468
+ {
9469
+ id: "select.first",
9470
+ method: "first",
9471
+ label: {
9472
+ en: "First option",
9473
+ it: "Prima opzione"
9474
+ },
9475
+ phrase: {
9476
+ en: "Select the first option on {device}",
9477
+ it: "Seleziona la prima opzione su {device}"
9478
+ },
9479
+ icon: "chevron-first"
9480
+ },
9481
+ {
9482
+ id: "select.last",
9483
+ method: "last",
9484
+ label: {
9485
+ en: "Last option",
9486
+ it: "Ultima opzione"
9487
+ },
9488
+ phrase: {
9489
+ en: "Select the last option on {device}",
9490
+ it: "Seleziona l’ultima opzione su {device}"
9491
+ },
9492
+ icon: "chevron-last"
9493
+ }
9494
+ ],
9413
9495
  notOperatorFacing: { setValue: "the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework" },
9414
9496
  state: [{
9415
9497
  kind: "value",
@@ -16223,6 +16305,18 @@ Object.freeze({
16223
16305
  "dry"
16224
16306
  ]
16225
16307
  },
16308
+ {
16309
+ "path": "action",
16310
+ "valueType": "enum",
16311
+ "enumValues": [
16312
+ "heating",
16313
+ "cooling",
16314
+ "drying",
16315
+ "fan",
16316
+ "idle",
16317
+ "off"
16318
+ ]
16319
+ },
16226
16320
  {
16227
16321
  "path": "fanMode",
16228
16322
  "valueType": "string"
@@ -59288,9 +59382,26 @@ var HvacModeSchema = z.enum([
59288
59382
  "fan_only",
59289
59383
  "dry"
59290
59384
  ]);
59385
+ /**
59386
+ * What the device is DOING right now, as opposed to the mode it is set to
59387
+ * (`mode: 'heat'` with the valve shut is `idle`). Optional and nullable: a
59388
+ * device that does not say leaves it absent or null, and a consumer reads that
59389
+ * as "unknown", never as `idle` (D393).
59390
+ */
59391
+ var ClimateActionSchema = z.enum([
59392
+ "heating",
59393
+ "cooling",
59394
+ "drying",
59395
+ "fan",
59396
+ "idle",
59397
+ "off"
59398
+ ]);
59291
59399
  var ClimateControlStatusSchema = z.object({
59292
59400
  /** Active HVAC mode. */
59293
59401
  mode: HvacModeSchema,
59402
+ /** What the device is doing now (`heating` while the valve is open, `idle`
59403
+ * at setpoint). Absent or null = the device does not say; never a guess (D393). */
59404
+ action: ClimateActionSchema.nullable().optional(),
59294
59405
  /** Available HVAC modes the device accepts. Subset of HvacMode. */
59295
59406
  availableModes: z.array(HvacModeSchema),
59296
59407
  /** Active fan mode (`auto` / `low` / `medium` / `high` / `on` / `off`
@@ -59344,6 +59455,40 @@ var ClimateControlStatusSchema = z.object({
59344
59455
  /** Ms epoch when the slice was last updated (push or command). */
59345
59456
  lastFetchedAt: z.number()
59346
59457
  });
59458
+ /**
59459
+ * Linked room sensor (Customize): the OPERATOR may replace the thermostat's own
59460
+ * `currentTemp` / `currentHumidity` with a sensor in the room. Never linked on
59461
+ * its own (D356). Once linked it ALWAYS replaces the native value, a null
59462
+ * native included — the operator chose the better reading.
59463
+ */
59464
+ var CLIMATE_CUSTOMIZE_DEVICE_TYPES = [DeviceType.Climate];
59465
+ function roomSensorTarget(id, path) {
59466
+ return {
59467
+ id,
59468
+ cardinality: "scalar",
59469
+ vocabulary: {
59470
+ cap: "climate-control",
59471
+ stateField: path
59472
+ },
59473
+ deviceTypes: CLIMATE_CUSTOMIZE_DEVICE_TYPES,
59474
+ apply: "replace",
59475
+ path,
59476
+ sources: [{
59477
+ kind: "numeric",
59478
+ transforms: [{ kind: "identity" }]
59479
+ }],
59480
+ sourceReport: { status: "assignment-status" }
59481
+ };
59482
+ }
59483
+ var CLIMATE_CONTROL_TARGETS = [roomSensorTarget("room-temperature", "currentTemp"), roomSensorTarget("room-humidity", "currentHumidity")];
59484
+ var climateControlCustomize = {
59485
+ version: 1,
59486
+ overridable: CLIMATE_CONTROL_TARGETS.map((target) => ({
59487
+ path: target.path,
59488
+ by: target.id
59489
+ })),
59490
+ targets: CLIMATE_CONTROL_TARGETS
59491
+ };
59347
59492
  var climateControlCapability = {
59348
59493
  name: "climate-control",
59349
59494
  scope: "device",
@@ -59654,6 +59799,7 @@ var climateControlCapability = {
59654
59799
  * on every push without re-querying the provider.
59655
59800
  */
59656
59801
  runtimeState: ClimateControlStatusSchema,
59802
+ customize: climateControlCustomize,
59657
59803
  /**
59658
59804
  * Runtime-state durability: **session** — as `brightness`; `currentTemp` moves continuously and is re-published on connect.
59659
59805
  *
@@ -61048,20 +61194,95 @@ var ControlSetValueInputSchema = z.discriminatedUnion("kind", [
61048
61194
  value: z.string().min(1)
61049
61195
  })
61050
61196
  ]);
61197
+ /**
61198
+ * `next` / `previous` input (#544, operator scripts driving a selector).
61199
+ * `cycle` is a TOP-LEVEL default so a direct `ctx.api.control.next` call
61200
+ * (which skips the tRPC router's Zod parse) still gets `true` via
61201
+ * `CAP_INPUT_DEFAULTS` — matching HA's own `select_next` / `select_previous`
61202
+ * default.
61203
+ */
61204
+ var ControlStepInputSchema = z.object({
61205
+ deviceId: z.number().int().nonnegative(),
61206
+ cycle: z.boolean().default(true)
61207
+ });
61208
+ /** `first` / `last` input — no `cycle`, there is no boundary to stop at. */
61209
+ var ControlBoundaryInputSchema = z.object({ deviceId: z.number().int().nonnegative() });
61051
61210
  var controlCapability = {
61052
61211
  name: "control",
61053
61212
  scope: "device",
61054
61213
  deviceNative: true,
61055
61214
  mode: "singleton",
61056
61215
  deviceTypes: [DeviceType.Control],
61057
- methods: { setValue: method(z.object({
61058
- deviceId: z.number().int().nonnegative(),
61059
- control: ControlSetValueInputSchema
61060
- }), z.void(), {
61061
- kind: "mutation",
61062
- auth: "protected",
61063
- notOperatorFacing: "the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework"
61064
- }) },
61216
+ methods: {
61217
+ setValue: method(z.object({
61218
+ deviceId: z.number().int().nonnegative(),
61219
+ control: ControlSetValueInputSchema
61220
+ }), z.void(), {
61221
+ kind: "mutation",
61222
+ auth: "protected",
61223
+ notOperatorFacing: "the value shape depends on the control kind (numeric / select / text / datetime) read from status; a typed picker for it is a follow-up of the automations rework"
61224
+ }),
61225
+ /**
61226
+ * Select one step forward through `options` (#544). `providerOptional`
61227
+ * (hence `optionalMethod`): only a `kind: 'select'` provider implements
61228
+ * it — the stepping math is NOT re-derived per provider, it is the one
61229
+ * shared helper `selectNavigationMethods` (`control-select-navigation.ts`)
61230
+ * every select-kind driver spreads in.
61231
+ */
61232
+ next: optionalMethod(ControlStepInputSchema, z.void(), {
61233
+ kind: "mutation",
61234
+ auth: "protected",
61235
+ actions: [{
61236
+ id: "select.next",
61237
+ label: t("Next option", "Opzione successiva"),
61238
+ phrase: t("Select the next option on {device}", "Seleziona l’opzione successiva su {device}"),
61239
+ icon: "skip-forward",
61240
+ openArgs: [{
61241
+ key: "cycle",
61242
+ label: t("Wrap to the first option", "Ricomincia dalla prima opzione"),
61243
+ offer: { kind: "boolean" }
61244
+ }]
61245
+ }]
61246
+ }),
61247
+ /** Select one step backward through `options` (#544) — mirrors `next`. */
61248
+ previous: optionalMethod(ControlStepInputSchema, z.void(), {
61249
+ kind: "mutation",
61250
+ auth: "protected",
61251
+ actions: [{
61252
+ id: "select.previous",
61253
+ label: t("Previous option", "Opzione precedente"),
61254
+ phrase: t("Select the previous option on {device}", "Seleziona l’opzione precedente su {device}"),
61255
+ icon: "skip-back",
61256
+ openArgs: [{
61257
+ key: "cycle",
61258
+ label: t("Wrap to the last option", "Ricomincia dall’ultima opzione"),
61259
+ offer: { kind: "boolean" }
61260
+ }]
61261
+ }]
61262
+ }),
61263
+ /** Select the first entry of `options` (#544). */
61264
+ first: optionalMethod(ControlBoundaryInputSchema, z.void(), {
61265
+ kind: "mutation",
61266
+ auth: "protected",
61267
+ actions: [{
61268
+ id: "select.first",
61269
+ label: t("First option", "Prima opzione"),
61270
+ phrase: t("Select the first option on {device}", "Seleziona la prima opzione su {device}"),
61271
+ icon: "chevron-first"
61272
+ }]
61273
+ }),
61274
+ /** Select the last entry of `options` (#544). */
61275
+ last: optionalMethod(ControlBoundaryInputSchema, z.void(), {
61276
+ kind: "mutation",
61277
+ auth: "protected",
61278
+ actions: [{
61279
+ id: "select.last",
61280
+ label: t("Last option", "Ultima opzione"),
61281
+ phrase: t("Select the last option on {device}", "Seleziona l’ultima opzione su {device}"),
61282
+ icon: "chevron-last"
61283
+ }]
61284
+ })
61285
+ },
61065
61286
  status: {
61066
61287
  schema: ControlStatusSchema,
61067
61288
  kind: "push"
@@ -62063,7 +62284,7 @@ var mediaPlayerCapability = {
62063
62284
  };
62064
62285
  /**
62065
62286
  * Customize catalog, projected from every `*.cap.ts` `customize` block.
62066
- * 11 caps. Field keys are `runtimeState` paths. No Zod.
62287
+ * 12 caps. Field keys are `runtimeState` paths. No Zod.
62067
62288
  */
62068
62289
  var CAP_CUSTOMIZE_CATALOG = {
62069
62290
  "battery": {
@@ -62122,6 +62343,51 @@ var CAP_CUSTOMIZE_CATALOG = {
62122
62343
  ]
62123
62344
  }]
62124
62345
  },
62346
+ "climate-control": {
62347
+ version: 1,
62348
+ targets: [{
62349
+ id: "room-temperature",
62350
+ cardinality: "scalar",
62351
+ deviceTypes: [DeviceType.Climate],
62352
+ apply: "replace",
62353
+ vocabularyCap: "climate-control",
62354
+ vocabularyStateField: "currentTemp",
62355
+ sources: [{
62356
+ kind: "numeric",
62357
+ transformKinds: ["identity"],
62358
+ transforms: [{ kind: "identity" }]
62359
+ }],
62360
+ sourceReport: { status: "assignment-status" },
62361
+ advancedExpression: false,
62362
+ path: "currentTemp",
62363
+ valueKind: "number",
62364
+ nullable: true
62365
+ }, {
62366
+ id: "room-humidity",
62367
+ cardinality: "scalar",
62368
+ deviceTypes: [DeviceType.Climate],
62369
+ apply: "replace",
62370
+ vocabularyCap: "climate-control",
62371
+ vocabularyStateField: "currentHumidity",
62372
+ sources: [{
62373
+ kind: "numeric",
62374
+ transformKinds: ["identity"],
62375
+ transforms: [{ kind: "identity" }]
62376
+ }],
62377
+ sourceReport: { status: "assignment-status" },
62378
+ advancedExpression: false,
62379
+ path: "currentHumidity",
62380
+ valueKind: "number",
62381
+ nullable: true
62382
+ }],
62383
+ overridable: [{
62384
+ path: "currentTemp",
62385
+ by: "room-temperature"
62386
+ }, {
62387
+ path: "currentHumidity",
62388
+ by: "room-humidity"
62389
+ }]
62390
+ },
62125
62391
  "consumables": {
62126
62392
  version: 1,
62127
62393
  targets: [{
@@ -66249,6 +66515,17 @@ var RawSecretMigrationReportSchema = z.object({
66249
66515
  * so a block that throws or never returns is marked `failed` and visible
66250
66516
  * instead of taking the hub with it (D6). Every method here is admin-only, and
66251
66517
  * must stay so.
66518
+ *
66519
+ * **Calling a device cap from a block.** `ctx.api.<cap>.<method>.mutate(...)`
66520
+ * is the same call an addon makes — e.g. driving a `select` / `input_select`
66521
+ * device through `control` (#544, a UniFi-triggered script cycling a scene
66522
+ * selector):
66523
+ *
66524
+ * ```ts
66525
+ * await ctx.api.control.next.mutate({ deviceId, cycle: true })
66526
+ * await ctx.api.control.first.mutate({ deviceId })
66527
+ * const status = await ctx.api.control.getStatus.query({ deviceId })
66528
+ * ```
66252
66529
  */
66253
66530
  /**
66254
66531
  * Prefix for a block's generated addon id AND its runner id — one addon, one
@@ -90728,6 +91005,8 @@ var NcSystemEventKindSchema = z.enum([
90728
91005
  "storage-location-low",
90729
91006
  "storage-location-critical",
90730
91007
  "storage-location-ok",
91008
+ "storage-drain-progress",
91009
+ "storage-drain-complete",
90731
91010
  "addon-crash-loop",
90732
91011
  "addon-update-available",
90733
91012
  "server-update-available",
@@ -100841,7 +101120,10 @@ var RemoteAssumedStateSchema = z.object({
100841
101120
  value: z.boolean(),
100842
101121
  at: z.number()
100843
101122
  }).nullable(),
100844
- /** The declared source last sent; unknown after a power off or a channel step. */
101123
+ /**
101124
+ * Retired: a sent source is never a state (an infrared set cannot report its
101125
+ * input). Kept only so records written before parse; nothing writes or reads it.
101126
+ */
100845
101127
  source: z.object({
100846
101128
  name: z.string(),
100847
101129
  at: z.number()
@@ -118701,6 +118983,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
118701
118983
  access: "view",
118702
118984
  role: "viewer"
118703
118985
  },
118986
+ "control.first": {
118987
+ capName: "control",
118988
+ capScope: "device",
118989
+ addonId: null,
118990
+ access: "create",
118991
+ role: "viewer"
118992
+ },
118704
118993
  "control.getStatus": {
118705
118994
  capName: "control",
118706
118995
  capScope: "device",
@@ -118708,6 +118997,27 @@ var METHOD_ACCESS_MAP = Object.freeze({
118708
118997
  access: "view",
118709
118998
  role: "viewer"
118710
118999
  },
119000
+ "control.last": {
119001
+ capName: "control",
119002
+ capScope: "device",
119003
+ addonId: null,
119004
+ access: "create",
119005
+ role: "viewer"
119006
+ },
119007
+ "control.next": {
119008
+ capName: "control",
119009
+ capScope: "device",
119010
+ addonId: null,
119011
+ access: "create",
119012
+ role: "viewer"
119013
+ },
119014
+ "control.previous": {
119015
+ capName: "control",
119016
+ capScope: "device",
119017
+ addonId: null,
119018
+ access: "create",
119019
+ role: "viewer"
119020
+ },
118711
119021
  "control.setValue": {
118712
119022
  capName: "control",
118713
119023
  capScope: "device",
@@ -128530,11 +128840,31 @@ Object.freeze({
128530
128840
  form: "single",
128531
128841
  optional: false
128532
128842
  }],
128843
+ "control.first": [{
128844
+ name: "deviceId",
128845
+ form: "single",
128846
+ optional: false
128847
+ }],
128533
128848
  "control.getStatus": [{
128534
128849
  name: "deviceId",
128535
128850
  form: "single",
128536
128851
  optional: false
128537
128852
  }],
128853
+ "control.last": [{
128854
+ name: "deviceId",
128855
+ form: "single",
128856
+ optional: false
128857
+ }],
128858
+ "control.next": [{
128859
+ name: "deviceId",
128860
+ form: "single",
128861
+ optional: false
128862
+ }],
128863
+ "control.previous": [{
128864
+ name: "deviceId",
128865
+ form: "single",
128866
+ optional: false
128867
+ }],
128538
128868
  "control.setValue": [{
128539
128869
  name: "deviceId",
128540
128870
  form: "single",
@@ -131800,6 +132130,8 @@ new Map(Object.entries({
131800
132130
  "storage-location-low": "system",
131801
132131
  "storage-location-critical": "system",
131802
132132
  "storage-location-ok": "system",
132133
+ "storage-drain-progress": "system",
132134
+ "storage-drain-complete": "system",
131803
132135
  "alarm-triggered": "alarm",
131804
132136
  "alarm-armed": "alarm",
131805
132137
  "alarm-disarmed": "alarm",
@@ -131935,6 +132267,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
131935
132267
  "storage-location-ok"
131936
132268
  ]
131937
132269
  },
132270
+ {
132271
+ id: "storage-drain",
132272
+ family: "system",
132273
+ label: "Storage drain progress",
132274
+ kinds: ["storage-drain-progress", "storage-drain-complete"]
132275
+ },
131938
132276
  {
131939
132277
  id: "alerts",
131940
132278
  family: "system",
@@ -132171,6 +132509,7 @@ var ALERT_EPISODE = [
132171
132509
  "alert-error",
132172
132510
  "alert-critical-resolved"
132173
132511
  ];
132512
+ var STORAGE_DRAIN = ["storage-drain-progress", "storage-drain-complete"];
132174
132513
  var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
132175
132514
  var UPDATES = [
132176
132515
  "addon-update-available",
@@ -132394,8 +132733,16 @@ var STATE_SUMMARY_VARS = [
132394
132733
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
132395
132734
  ([...RULE_TEXT], [...CONSUMABLE]),
132396
132735
  [...RULE_TEXT],
132397
- ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
132398
- ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
132736
+ ([...RULE_TEXT], [
132737
+ ...UPDATES,
132738
+ ...STORAGE_DRAIN,
132739
+ ...ALERT_EPISODE
132740
+ ]),
132741
+ ([...RULE_TEXT], [
132742
+ ...UPDATES,
132743
+ ...STORAGE_DRAIN,
132744
+ ...ALERT_EPISODE
132745
+ ]),
132399
132746
  [...RULE_TEXT],
132400
132747
  [...RULE_TEXT],
132401
132748
  [...RULE_TEXT],
@@ -132409,6 +132756,9 @@ var STATE_SUMMARY_VARS = [
132409
132756
  [...RULE_TEXT],
132410
132757
  [...RULE_TEXT],
132411
132758
  [...RULE_TEXT],
132759
+ ([...RULE_TEXT], [...STORAGE_DRAIN]),
132760
+ ([...RULE_TEXT], [...STORAGE_DRAIN]),
132761
+ [...RULE_TEXT],
132412
132762
  [...RULE_TEXT],
132413
132763
  [...RULE_TEXT],
132414
132764
  [...RULE_TEXT],