@camstack/server 1.2.868 → 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 (91) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/api/trpc/generated-cap-routers.js +64 -0
  3. package/package.json +19 -9
  4. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  5. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  6. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  7. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  8. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  9. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  10. package/system/dist/builtins/autotrack/index.js +1 -1
  11. package/system/dist/builtins/autotrack/index.mjs +1 -1
  12. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  13. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  14. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  15. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  16. package/system/dist/builtins/camera-grid/index.js +1 -1
  17. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  18. package/system/dist/builtins/composer/composer.addon.js +4 -4
  19. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  20. package/system/dist/builtins/console-logging/index.js +1 -1
  21. package/system/dist/builtins/console-logging/index.mjs +1 -1
  22. package/system/dist/builtins/core-blocks/core-blocks.addon.js +3 -3
  23. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
  24. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  25. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  26. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  27. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  28. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  29. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  30. package/system/dist/builtins/keychain/index.js +4 -4
  31. package/system/dist/builtins/keychain/index.mjs +4 -4
  32. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  33. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  34. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  35. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  36. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  37. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  38. package/system/dist/builtins/loki-logging/index.js +1 -1
  39. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  40. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  41. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  42. package/system/dist/builtins/platform-probe/index.js +1 -1
  43. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  44. package/system/dist/builtins/record-entries/index.js +1 -1
  45. package/system/dist/builtins/record-entries/index.mjs +1 -1
  46. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  47. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  48. package/system/dist/builtins/snapshot/index.js +1 -1
  49. package/system/dist/builtins/snapshot/index.mjs +1 -1
  50. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  51. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  52. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  53. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  54. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  55. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  56. package/system/dist/builtins/storage-orchestrator/drain-ratchet.d.ts +8 -0
  57. package/system/dist/builtins/storage-orchestrator/storage-drain-event-monitor.d.ts +63 -0
  58. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +14 -0
  59. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +152 -2
  60. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +152 -2
  61. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  62. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  63. package/system/dist/builtins/winston-logging/index.js +1 -1
  64. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  65. package/system/dist/{capture-engine-CZAoDA8f.js → capture-engine-Bwhwpy3T.js} +1 -1
  66. package/system/dist/{capture-engine-BLvsM_9n.mjs → capture-engine-hLbiQm2r.mjs} +1 -1
  67. package/system/dist/{composition-sources-C-JTlA-Z.mjs → composition-sources-CXd5ydxk.mjs} +1 -1
  68. package/system/dist/{composition-sources-cHTw-yaK.js → composition-sources-DqGVEx12.js} +1 -1
  69. package/system/dist/{constants-z053G1cz.mjs → constants-BxOTlPMv.mjs} +1 -1
  70. package/system/dist/{constants-Ja04pgXN.js → constants-hVovxKZz.js} +1 -1
  71. package/system/dist/{device-ca-CBH-uKco.js → device-ca-1vqFIP_t.js} +1 -1
  72. package/system/dist/{device-ca-CenGkhrx.mjs → device-ca-B-yM5jiy.mjs} +1 -1
  73. package/system/dist/{dist-DxpO7T7_.mjs → dist-D1LOSOS0.mjs} +360 -13
  74. package/system/dist/{dist-4s3KGwmo.js → dist-uTbt3Yxy.js} +360 -13
  75. package/system/dist/file-host-worker.js +1 -1
  76. package/system/dist/file-host-worker.mjs +1 -1
  77. package/system/dist/{hub-identity-DBlEsrOj.mjs → hub-identity-Dx3Jbhnp.mjs} +1 -1
  78. package/system/dist/{hub-identity-L6pLf8b7.js → hub-identity-TBo0Xrxk.js} +1 -1
  79. package/system/dist/{hub-mdns-ciao-Kd4Vk9zo.mjs → hub-mdns-ciao-Br5Vlcf0.mjs} +2 -2
  80. package/system/dist/{hub-mdns-ciao-UkoNqaH4.js → hub-mdns-ciao-C0xzb8jM.js} +2 -2
  81. package/system/dist/index.js +8 -8
  82. package/system/dist/index.mjs +8 -8
  83. package/system/dist/{legacy-integration-rows-door-BZknuVEL.mjs → legacy-integration-rows-door-CqsM5HcW.mjs} +1 -1
  84. package/system/dist/{legacy-integration-rows-door-7TugpMtZ.js → legacy-integration-rows-door-c8pHSqwA.js} +1 -1
  85. package/system/dist/{rename-composition-block-C0sgZZyJ.mjs → rename-composition-block-Bbu4W1mg.mjs} +1 -1
  86. package/system/dist/{rename-composition-block-B_E0FaEf.js → rename-composition-block-DNgRnLHV.js} +1 -1
  87. package/system/dist/{restore-archive-QZmJfXLn.js → restore-archive-D48JPP0d.js} +1 -1
  88. package/system/dist/{restore-archive-CyGsqv6W.mjs → restore-archive-DcS4GDfw.mjs} +1 -1
  89. package/system/dist/{wal-maintenance-CJaRdr0b.mjs → wal-maintenance-BoxO0tlN.mjs} +0 -0
  90. package/system/dist/{wal-maintenance-DvcEWip3.js → wal-maintenance-D3s8jnax.js} +0 -0
  91. package/system/package.json +1 -1
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-4s3KGwmo.js");
6
+ const require_dist = require("../../dist-uTbt3Yxy.js");
7
7
  const require_safe_buffer$1 = require("../../safe-buffer-D3aoa-7X.js");
8
8
  const require_x509_es = require("../../x509.es-WtnRNyYS.js");
9
- const require_hub_identity = require("../../hub-identity-L6pLf8b7.js");
10
- const require_constants$8 = require("../../constants-Ja04pgXN.js");
9
+ const require_hub_identity = require("../../hub-identity-TBo0Xrxk.js");
10
+ const require_constants$8 = require("../../constants-hVovxKZz.js");
11
11
  const require_src$1 = require("../../src-CnAqG6EF.js");
12
12
  let zod = require("zod");
13
13
  let node_crypto = require("node:crypto");
@@ -1,9 +1,9 @@
1
1
  import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, r as __exportAll, t as __commonJSMin } from "../../chunk-CNf5ZN-e.mjs";
2
- import { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-DxpO7T7_.mjs";
2
+ import { Ic as defineCustomActions, Il as errMsg, Is as BaseAddon, Pc as customAction, cn as ServerNameSchema, go as shortHostname, qc as hydrateSchema } from "../../dist-D1LOSOS0.mjs";
3
3
  import { t as require_safe_buffer } from "../../safe-buffer-B1OjL1I9.mjs";
4
4
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension } from "../../x509.es-BRiJgOvu.mjs";
5
- import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-DBlEsrOj.mjs";
6
- import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-z053G1cz.mjs";
5
+ import { B as AGENT_HTTPS_NAMES_COLLECTION, G as systemConfigRecordKinds, H as AgentHttpsNames, I as isLocalOnlyHostname, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, m as isPrivateAddress, r as isAnnouncedHubId } from "../../hub-identity-Dx3Jbhnp.mjs";
6
+ import { a as MESH_CA_KEY_REF, c as SERVER_AUTH_OID, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY, r as MESH_CA_COMMON_NAME, s as MESH_CA_VALIDITY_DAYS, t as CLIENT_AUTH_OID } from "../../constants-BxOTlPMv.mjs";
7
7
  import { t as require_src } from "../../src-hG4grMU4.mjs";
8
8
  import { z } from "zod";
9
9
  import { X509Certificate, createHash, createPrivateKey, randomBytes, randomInt, sign, timingSafeEqual, verify, webcrypto } from "node:crypto";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  const require_chunk = require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-4s3KGwmo.js");
6
+ const require_dist = require("../../dist-uTbt3Yxy.js");
7
7
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
8
  const require_log_file_read_protocol = require("../../log-file-read-protocol-DSV_vQRb.js");
9
9
  let node_path = require("node:path");
@@ -1,4 +1,4 @@
1
- import { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-DxpO7T7_.mjs";
1
+ import { Fc as defineAddonMigrations, Is as BaseAddon, Vi as logDestinationCapability, xa as preconditionOf } from "../../dist-D1LOSOS0.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
3
3
  import { a as LogFileIndexStore, i as serveRead, n as isFromReader, t as CancelBook } from "../../log-file-read-protocol-hTaAsYlX.mjs";
4
4
  import { createRequire } from "node:module";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-4s3KGwmo.js");
1
+ const require_dist = require("./dist-uTbt3Yxy.js");
2
2
  //#region src/builtins/device-history/store/series-registry.ts
3
3
  function subjectIdOf(subject) {
4
4
  return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
@@ -1,4 +1,4 @@
1
- import { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-DxpO7T7_.mjs";
1
+ import { Fl as DeviceType, Gc as historyItemFieldPath, Ks as HISTORY_DEFAULT_MIN_INTERVAL_MS } from "./dist-D1LOSOS0.mjs";
2
2
  //#region src/builtins/device-history/store/series-registry.ts
3
3
  function subjectIdOf(subject) {
4
4
  return subject.kind === "device" ? `d:${subject.deviceId}` : `n:${subject.nodeId}`;
@@ -1,4 +1,4 @@
1
- import { Il as errMsg, _s as compositionSourceKey } from "./dist-DxpO7T7_.mjs";
1
+ import { Il as errMsg, _s as compositionSourceKey } from "./dist-D1LOSOS0.mjs";
2
2
  //#region src/builtins/shared/device-state-changed.ts
3
3
  /** Structural narrowing helper for untrusted bus payloads. */
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-4s3KGwmo.js");
1
+ const require_dist = require("./dist-uTbt3Yxy.js");
2
2
  //#region src/builtins/shared/device-state-changed.ts
3
3
  /** Structural narrowing helper for untrusted bus payloads. */
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- import { Ec as buildSecretRef } from "./dist-DxpO7T7_.mjs";
1
+ import { Ec as buildSecretRef } from "./dist-D1LOSOS0.mjs";
2
2
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
3
3
  var MESH_CA_KEY_REF = buildSecretRef({
4
4
  owner: "system",
@@ -1,5 +1,5 @@
1
1
  /** `secret://system/global/meshCaKey` — EC P-256 PKCS#8 PEM of the hub mesh CA. */
2
- var MESH_CA_KEY_REF = require("./dist-4s3KGwmo.js").buildSecretRef({
2
+ var MESH_CA_KEY_REF = require("./dist-uTbt3Yxy.js").buildSecretRef({
3
3
  owner: "system",
4
4
  scope: { kind: "global" },
5
5
  fieldPath: "meshCaKey"
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-4s3KGwmo.js");
1
+ const require_dist = require("./dist-uTbt3Yxy.js");
2
2
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  //#region src/auth/jwt-signing-key.ts
@@ -1,4 +1,4 @@
1
- import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-DxpO7T7_.mjs";
1
+ import { Ec as buildSecretRef, K as DEVICE_SAN_CREDENTIAL_PREFIX, q as DEVICE_SAN_USER_PREFIX } from "./dist-D1LOSOS0.mjs";
2
2
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, a as KeyUsageFlags, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension } from "./x509.es-BRiJgOvu.mjs";
3
3
  import { X509Certificate, createPublicKey, randomBytes, verify, webcrypto } from "node:crypto";
4
4
  //#region src/auth/jwt-signing-key.ts
@@ -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",
@@ -118704,6 +118983,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
118704
118983
  access: "view",
118705
118984
  role: "viewer"
118706
118985
  },
118986
+ "control.first": {
118987
+ capName: "control",
118988
+ capScope: "device",
118989
+ addonId: null,
118990
+ access: "create",
118991
+ role: "viewer"
118992
+ },
118707
118993
  "control.getStatus": {
118708
118994
  capName: "control",
118709
118995
  capScope: "device",
@@ -118711,6 +118997,27 @@ var METHOD_ACCESS_MAP = Object.freeze({
118711
118997
  access: "view",
118712
118998
  role: "viewer"
118713
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
+ },
118714
119021
  "control.setValue": {
118715
119022
  capName: "control",
118716
119023
  capScope: "device",
@@ -128533,11 +128840,31 @@ Object.freeze({
128533
128840
  form: "single",
128534
128841
  optional: false
128535
128842
  }],
128843
+ "control.first": [{
128844
+ name: "deviceId",
128845
+ form: "single",
128846
+ optional: false
128847
+ }],
128536
128848
  "control.getStatus": [{
128537
128849
  name: "deviceId",
128538
128850
  form: "single",
128539
128851
  optional: false
128540
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
+ }],
128541
128868
  "control.setValue": [{
128542
128869
  name: "deviceId",
128543
128870
  form: "single",
@@ -131803,6 +132130,8 @@ new Map(Object.entries({
131803
132130
  "storage-location-low": "system",
131804
132131
  "storage-location-critical": "system",
131805
132132
  "storage-location-ok": "system",
132133
+ "storage-drain-progress": "system",
132134
+ "storage-drain-complete": "system",
131806
132135
  "alarm-triggered": "alarm",
131807
132136
  "alarm-armed": "alarm",
131808
132137
  "alarm-disarmed": "alarm",
@@ -131938,6 +132267,12 @@ var NC_SYSTEM_EVENT_KIND_GROUP_SPECS = [
131938
132267
  "storage-location-ok"
131939
132268
  ]
131940
132269
  },
132270
+ {
132271
+ id: "storage-drain",
132272
+ family: "system",
132273
+ label: "Storage drain progress",
132274
+ kinds: ["storage-drain-progress", "storage-drain-complete"]
132275
+ },
131941
132276
  {
131942
132277
  id: "alerts",
131943
132278
  family: "system",
@@ -132174,6 +132509,7 @@ var ALERT_EPISODE = [
132174
132509
  "alert-error",
132175
132510
  "alert-critical-resolved"
132176
132511
  ];
132512
+ var STORAGE_DRAIN = ["storage-drain-progress", "storage-drain-complete"];
132177
132513
  var DEVICE_ATTENTION = ["device-attention-required", "device-attention-resolved"];
132178
132514
  var UPDATES = [
132179
132515
  "addon-update-available",
@@ -132397,8 +132733,16 @@ var STATE_SUMMARY_VARS = [
132397
132733
  ([...RULE_TEXT], [...BATTERY, ...CONSUMABLE]),
132398
132734
  ([...RULE_TEXT], [...CONSUMABLE]),
132399
132735
  [...RULE_TEXT],
132400
- ([...RULE_TEXT], [...UPDATES, ...ALERT_EPISODE]),
132401
- ([...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
+ ]),
132402
132746
  [...RULE_TEXT],
132403
132747
  [...RULE_TEXT],
132404
132748
  [...RULE_TEXT],
@@ -132412,6 +132756,9 @@ var STATE_SUMMARY_VARS = [
132412
132756
  [...RULE_TEXT],
132413
132757
  [...RULE_TEXT],
132414
132758
  [...RULE_TEXT],
132759
+ ([...RULE_TEXT], [...STORAGE_DRAIN]),
132760
+ ([...RULE_TEXT], [...STORAGE_DRAIN]),
132761
+ [...RULE_TEXT],
132415
132762
  [...RULE_TEXT],
132416
132763
  [...RULE_TEXT],
132417
132764
  [...RULE_TEXT],