@camstack/server 1.2.741 → 1.2.743

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 (97) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/api/core/cap-providers.js +167 -43
  3. package/dist/api/core/integration-role.js +20 -0
  4. package/dist/api/trpc/generated-cap-mounts.js +18 -1
  5. package/dist/api/trpc/generated-cap-routers.js +2427 -2381
  6. package/package.json +10 -14
  7. package/system/dist/addon-utils.mjs +1 -1
  8. package/system/dist/{agent-https-BtTMjLgk.mjs → agent-https-BXFwvxco.mjs} +1 -1
  9. package/system/dist/{agent-https-CNf7_i1z.js → agent-https-CTLbLv1Z.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 +4 -4
  15. package/system/dist/builtins/alerts/alerts.addon.mjs +4 -4
  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 +4 -4
  23. package/system/dist/builtins/camera-grid/index.mjs +4 -4
  24. package/system/dist/builtins/composer/composer.addon.js +3 -3
  25. package/system/dist/builtins/composer/composer.addon.mjs +3 -3
  26. package/system/dist/builtins/console-logging/index.js +1 -1
  27. package/system/dist/builtins/console-logging/index.mjs +1 -1
  28. package/system/dist/builtins/core-blocks/core-blocks.addon.js +193 -3
  29. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +193 -3
  30. package/system/dist/builtins/core-blocks/migrations/index.d.ts +5 -0
  31. package/system/dist/builtins/core-blocks/migrations/pump-cycle-split.d.ts +43 -0
  32. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  33. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  34. package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
  35. package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
  36. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  37. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  38. package/system/dist/builtins/keychain/index.js +3 -3
  39. package/system/dist/builtins/keychain/index.mjs +3 -3
  40. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  41. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  42. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  43. package/system/dist/builtins/local-auth/local-auth.addon.mjs +5 -5
  44. package/system/dist/builtins/local-network/local-network.addon.js +2 -2
  45. package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
  46. package/system/dist/builtins/loki-logging/index.js +30 -27
  47. package/system/dist/builtins/loki-logging/index.mjs +30 -27
  48. package/system/dist/builtins/loki-logging/loki-logging.addon.d.ts +7 -0
  49. package/system/dist/builtins/loki-logging/migrations/index.d.ts +7 -0
  50. package/system/dist/builtins/loki-logging/retire-enabled-flag.d.ts +8 -23
  51. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  52. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
  53. package/system/dist/builtins/platform-probe/index.js +1 -1
  54. package/system/dist/builtins/platform-probe/index.mjs +10 -10
  55. package/system/dist/builtins/record-entries/index.js +1 -1
  56. package/system/dist/builtins/record-entries/index.mjs +1 -1
  57. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  58. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  59. package/system/dist/builtins/snapshot/index.js +1 -1
  60. package/system/dist/builtins/snapshot/index.mjs +1 -1
  61. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  62. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +20 -20
  63. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  64. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  65. package/system/dist/builtins/sqlite-storage/integration-registry.d.ts +2 -2
  66. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
  67. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
  68. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  69. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  70. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  71. package/system/dist/builtins/system-config/system-config.addon.mjs +115 -115
  72. package/system/dist/builtins/winston-logging/index.js +1 -1
  73. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  74. package/system/dist/{composition-sources-DUmnnLrw.mjs → composition-sources-BsdQWUId.mjs} +1 -1
  75. package/system/dist/{composition-sources-D9GBwT5d.js → composition-sources-T2lA4x2c.js} +1 -1
  76. package/system/dist/{constants-BkiDA8Cf.mjs → constants-3SpeBQ9e.mjs} +1 -1
  77. package/system/dist/{constants-Cy5svHxz.js → constants-BrhaiRkm.js} +1 -1
  78. package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
  79. package/system/dist/{custom-action-registry-BIJZBObd.mjs → custom-action-registry-oHl1xltx.mjs} +37 -37
  80. package/system/dist/{device-ca-CxlqxrvG.js → device-ca-BCeNjQxi.js} +1 -1
  81. package/system/dist/{device-ca-Cxu7j6aY.mjs → device-ca-Dp9VZmay.mjs} +1 -1
  82. package/system/dist/{dist-C5sQPOZX.mjs → dist-CYQNDx7D.mjs} +317 -133
  83. package/system/dist/{dist-Cyc4oyGh.js → dist-hoy7lFFU.js} +322 -132
  84. package/system/dist/file-host-worker.js +1 -1
  85. package/system/dist/file-host-worker.mjs +1 -1
  86. package/system/dist/{hub-mdns-ciao-CTPWSgwo.mjs → hub-mdns-ciao-Bmgiu2PS.mjs} +2 -2
  87. package/system/dist/{hub-mdns-ciao-YxQ97aHW.js → hub-mdns-ciao-Btg3hLbv.js} +2 -2
  88. package/system/dist/index.js +14 -9
  89. package/system/dist/index.mjs +225 -220
  90. package/system/dist/migrations/hub/2026-11-02-integration-addon-id-bare.d.ts +3 -0
  91. package/system/dist/{restore-archive-08Uthry1.mjs → restore-archive-Da6R2OpB.mjs} +94 -94
  92. package/system/dist/{restore-archive-b5rBXY1e.js → restore-archive-NPXKTdgW.js} +1 -1
  93. package/system/dist/{retention-i8aZ6vE5.mjs → retention-BnRv1V1H.mjs} +1 -1
  94. package/system/dist/{retention-DWCHp91p.js → retention-YUgpamYA.js} +1 -1
  95. package/system/dist/{wal-maintenance-DNE7RTcS.js → wal-maintenance-B0jahuQG.js} +0 -0
  96. package/system/dist/{wal-maintenance-CEi8PqMh.mjs → wal-maintenance-pDyTGZ-n.mjs} +0 -0
  97. package/system/package.json +1 -1
@@ -1165,7 +1165,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1165
1165
  return DeviceRole;
1166
1166
  }({});
1167
1167
  //#endregion
1168
- //#region ../types/dist/sleep-QsoHs66J.mjs
1168
+ //#region ../types/dist/sleep-hmSP-eJt.mjs
1169
1169
  /**
1170
1170
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1171
1171
  * window to float samples (D455).
@@ -6069,6 +6069,7 @@ var CAP_NAMES = Object.freeze([
6069
6069
  "backup",
6070
6070
  "battery",
6071
6071
  "binary",
6072
+ "board-key-source",
6072
6073
  "brightness",
6073
6074
  "broker",
6074
6075
  "button",
@@ -6190,6 +6191,7 @@ var CAP_NAMES = Object.freeze([
6190
6191
  "privacy-mask",
6191
6192
  "ptz",
6192
6193
  "ptz-autotrack",
6194
+ "pump-cycle",
6193
6195
  "reboot",
6194
6196
  "record-entries",
6195
6197
  "recording",
@@ -7482,18 +7484,6 @@ Object.freeze({
7482
7484
  "path": "pumpRunning",
7483
7485
  "valueType": "boolean"
7484
7486
  },
7485
- {
7486
- "path": "pumpIntervalEnabled",
7487
- "valueType": "boolean"
7488
- },
7489
- {
7490
- "path": "pumpOnTime",
7491
- "valueType": "number"
7492
- },
7493
- {
7494
- "path": "pumpOffTime",
7495
- "valueType": "number"
7496
- },
7497
7487
  {
7498
7488
  "path": "lastDrink",
7499
7489
  "valueType": "number"
@@ -7617,6 +7607,20 @@ Object.freeze({
7617
7607
  "valueType": "number"
7618
7608
  }
7619
7609
  ],
7610
+ "pump-cycle": [
7611
+ {
7612
+ "path": "enabled",
7613
+ "valueType": "boolean"
7614
+ },
7615
+ {
7616
+ "path": "onTime",
7617
+ "valueType": "number"
7618
+ },
7619
+ {
7620
+ "path": "offTime",
7621
+ "valueType": "number"
7622
+ }
7623
+ ],
7620
7624
  "recording-archive": [
7621
7625
  {
7622
7626
  "path": "deviceId",
@@ -18154,24 +18158,52 @@ var APPLIANCE_CAP_VOCABULARY = {
18154
18158
  args: { on: false }
18155
18159
  },
18156
18160
  {
18157
- id: "petFountain.intervalOn",
18158
- method: "setPumpInterval",
18161
+ id: "petFountain.resetDailyConsumption",
18162
+ method: "resetDailyConsumption",
18163
+ label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
18164
+ phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
18165
+ icon: "rotate-ccw"
18166
+ }
18167
+ ],
18168
+ state: [{
18169
+ kind: "boolean",
18170
+ field: "empty",
18171
+ label: t("Tank empty", "Serbatoio vuoto"),
18172
+ whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
18173
+ whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
18174
+ icon: "droplet"
18175
+ }, {
18176
+ kind: "numeric",
18177
+ field: "waterLevel",
18178
+ quantity: t("the water level", "il livello dell’acqua"),
18179
+ label: t("Water level", "Livello dell’acqua"),
18180
+ unit: "%",
18181
+ icon: "droplets"
18182
+ }]
18183
+ },
18184
+ "pump-cycle": {
18185
+ scope: "device",
18186
+ noun: t("Pump cycle", "Ciclo della pompa"),
18187
+ actions: [
18188
+ {
18189
+ id: "pumpCycle.on",
18190
+ method: "setEnabled",
18159
18191
  label: t("Pump cycle on", "Ciclo pompa attivo"),
18160
18192
  phrase: t("Run the pump of {device} on its on/off cycle", "Fai lavorare la pompa di {device} a ciclo acceso/spento"),
18161
18193
  icon: "timer",
18162
18194
  args: { on: true }
18163
18195
  },
18164
18196
  {
18165
- id: "petFountain.intervalOff",
18166
- method: "setPumpInterval",
18197
+ id: "pumpCycle.off",
18198
+ method: "setEnabled",
18167
18199
  label: t("Pump cycle off", "Ciclo pompa spento"),
18168
18200
  phrase: t("Run the pump of {device} continuously", "Fai lavorare la pompa di {device} in continuo"),
18169
18201
  icon: "timer-off",
18170
18202
  args: { on: false }
18171
18203
  },
18172
18204
  {
18173
- id: "petFountain.pumpOnMinutes",
18174
- method: "setPumpOnMinutes",
18205
+ id: "pumpCycle.onMinutes",
18206
+ method: "setOnMinutes",
18175
18207
  label: t("Set pump run time", "Imposta il tempo di lavoro della pompa"),
18176
18208
  phrase: t("Set the pump of {device} to run {minutes} minutes per cycle", "Imposta la pompa di {device} a lavorare {minutes} minuti per ciclo"),
18177
18209
  icon: "timer",
@@ -18187,8 +18219,8 @@ var APPLIANCE_CAP_VOCABULARY = {
18187
18219
  }]
18188
18220
  },
18189
18221
  {
18190
- id: "petFountain.pumpOffMinutes",
18191
- method: "setPumpOffMinutes",
18222
+ id: "pumpCycle.offMinutes",
18223
+ method: "setOffMinutes",
18192
18224
  label: t("Set pump rest time", "Imposta il tempo di riposo della pompa"),
18193
18225
  phrase: t("Set the pump of {device} to rest {minutes} minutes per cycle", "Imposta la pompa di {device} a riposare {minutes} minuti per ciclo"),
18194
18226
  icon: "timer-off",
@@ -18202,29 +18234,15 @@ var APPLIANCE_CAP_VOCABULARY = {
18202
18234
  unit: "min"
18203
18235
  }
18204
18236
  }]
18205
- },
18206
- {
18207
- id: "petFountain.resetDailyConsumption",
18208
- method: "resetDailyConsumption",
18209
- label: t("Clear daily consumption", "Azzera il consumo giornaliero"),
18210
- phrase: t("Clear the daily water consumption of {device}", "Azzera il consumo giornaliero di acqua di {device}"),
18211
- icon: "rotate-ccw"
18212
18237
  }
18213
18238
  ],
18214
18239
  state: [{
18215
18240
  kind: "boolean",
18216
- field: "empty",
18217
- label: t("Tank empty", "Serbatoio vuoto"),
18218
- whenTrue: t("When the tank of {device} is empty", "Quando il serbatoio di {device} è vuoto"),
18219
- whenFalse: t("When the tank of {device} is refilled", "Quando il serbatoio di {device} viene riempito"),
18220
- icon: "droplet"
18221
- }, {
18222
- kind: "numeric",
18223
- field: "waterLevel",
18224
- quantity: t("the water level", "il livello dell’acqua"),
18225
- label: t("Water level", "Livello dell’acqua"),
18226
- unit: "%",
18227
- icon: "droplets"
18241
+ field: "enabled",
18242
+ label: t("Pump cycle", "Ciclo pompa"),
18243
+ whenTrue: t("When {device} starts running its pump on a cycle", "Quando {device} inizia a far lavorare la pompa a ciclo"),
18244
+ whenFalse: t("When {device} runs its pump continuously", "Quando {device} fa lavorare la pompa in continuo"),
18245
+ icon: "timer"
18228
18246
  }]
18229
18247
  },
18230
18248
  "media-player": {
@@ -20117,6 +20135,7 @@ var SYSTEM_CAP_VOCABULARY = {
20117
20135
  "audio-analyzer": system(PIPELINE),
20118
20136
  "audio-codec": system(INTERNAL),
20119
20137
  "auth-provider": system(IDENTITY),
20138
+ "board-key-source": system(INTERNAL),
20120
20139
  backup: system("system backups — run and restored from the Backups page"),
20121
20140
  broker: system("message-broker connections — configured, not actuated"),
20122
20141
  "calendar-source": system(INTERNAL),
@@ -47500,6 +47519,63 @@ var binaryCapability = {
47500
47519
  volatileStateFields: ["lastChangedAt"]
47501
47520
  };
47502
47521
  /**
47522
+ * Why a board key could not be read. Typed so a caller reports the cause and
47523
+ * never treats "could not read" as "has no key" (D49).
47524
+ */
47525
+ var BoardKeyFailureReasonSchema = zod.z.enum([
47526
+ "unknown-source",
47527
+ "not-admin",
47528
+ "no-builder",
47529
+ "no-ingress-url",
47530
+ "unreachable",
47531
+ "unknown-board",
47532
+ "no-encryption-key",
47533
+ "unreadable-config"
47534
+ ]);
47535
+ var BoardKeySourceSchema = zod.z.object({
47536
+ sourceId: zod.z.string(),
47537
+ name: zod.z.string()
47538
+ });
47539
+ var BoardKeyBoardSchema = zod.z.object({
47540
+ /** The builder's file name, e.g. `kitchen.yaml`: the handle `getBoardKey` takes. */
47541
+ configuration: zod.z.string(),
47542
+ /** The node name the builder gives the board. */
47543
+ name: zod.z.string(),
47544
+ /** The address the builder knows the board by, when it has one. */
47545
+ address: zod.z.string().nullable()
47546
+ });
47547
+ var BoardKeyFailureSchema = zod.z.object({
47548
+ ok: zod.z.literal(false),
47549
+ reason: BoardKeyFailureReasonSchema,
47550
+ detail: zod.z.string().optional()
47551
+ });
47552
+ var ListBoardsResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
47553
+ ok: zod.z.literal(true),
47554
+ boards: zod.z.array(BoardKeyBoardSchema).readonly()
47555
+ }), BoardKeyFailureSchema]);
47556
+ var GetBoardKeyResultSchema = zod.z.discriminatedUnion("ok", [zod.z.object({
47557
+ ok: zod.z.literal(true),
47558
+ key: zod.z.string()
47559
+ }), BoardKeyFailureSchema]);
47560
+ /**
47561
+ * Where a device board's API encryption key can be read from (the ESPHome
47562
+ * builder that runs beside a Home Assistant). Admin only: `getBoardKey`
47563
+ * returns a credential, and nothing else the source holds ever crosses.
47564
+ */
47565
+ var boardKeySourceCapability = {
47566
+ name: "board-key-source",
47567
+ scope: "system",
47568
+ mode: "collection",
47569
+ methods: {
47570
+ listSources: method(zod.z.void(), zod.z.array(BoardKeySourceSchema).readonly(), { auth: "admin" }),
47571
+ listBoards: method(zod.z.object({ sourceId: zod.z.string().min(1) }), ListBoardsResultSchema, { auth: "admin" }),
47572
+ getBoardKey: method(zod.z.object({
47573
+ sourceId: zod.z.string().min(1),
47574
+ configuration: zod.z.string().min(1)
47575
+ }), GetBoardKeyResultSchema, { auth: "admin" })
47576
+ }
47577
+ };
47578
+ /**
47503
47579
  * Dimmable-light brightness control. Co-exists with `switch` on the
47504
47580
  * same device — the switch toggles on/off, this cap sets the level
47505
47581
  * applied when the light is on. Drivers map their per-vendor dim
@@ -52672,7 +52748,7 @@ async function runFanOut(calls, invoke) {
52672
52748
  }
52673
52749
  /**
52674
52750
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
52675
- * 43 caps with series (81 series), 36 caps answered `'none'`.
52751
+ * 43 caps with series (81 series), 37 caps answered `'none'`.
52676
52752
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
52677
52753
  */
52678
52754
  var HISTORY_CATALOG = {
@@ -59150,7 +59226,7 @@ var DishwasherStatusSchema = zod.z.object({
59150
59226
  /** Ms epoch of the last value received from the appliance; 0 = never. */
59151
59227
  lastFetchedAt: zod.z.number()
59152
59228
  });
59153
- var DeviceIdSchema$1 = zod.z.number().int().nonnegative();
59229
+ var DeviceIdSchema$2 = zod.z.number().int().nonnegative();
59154
59230
  /** A value a program option or setting can take. */
59155
59231
  var DishwasherValueSchema = zod.z.union([
59156
59232
  zod.z.boolean(),
@@ -59225,77 +59301,77 @@ var dishwasherCapability = {
59225
59301
  * option feature keys; each is checked against the program's constraints.
59226
59302
  */
59227
59303
  start: method(zod.z.object({
59228
- deviceId: DeviceIdSchema$1,
59304
+ deviceId: DeviceIdSchema$2,
59229
59305
  program: zod.z.string().min(1).optional(),
59230
59306
  options: zod.z.record(zod.z.string(), DishwasherValueSchema).optional()
59231
59307
  }), zod.z.void(), {
59232
59308
  kind: "mutation",
59233
59309
  auth: "protected"
59234
59310
  }),
59235
- pause: method(zod.z.object({ deviceId: DeviceIdSchema$1 }), zod.z.void(), {
59311
+ pause: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), zod.z.void(), {
59236
59312
  kind: "mutation",
59237
59313
  auth: "protected"
59238
59314
  }),
59239
- resume: method(zod.z.object({ deviceId: DeviceIdSchema$1 }), zod.z.void(), {
59315
+ resume: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), zod.z.void(), {
59240
59316
  kind: "mutation",
59241
59317
  auth: "protected"
59242
59318
  }),
59243
- stop: method(zod.z.object({ deviceId: DeviceIdSchema$1 }), zod.z.void(), {
59319
+ stop: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), zod.z.void(), {
59244
59320
  kind: "mutation",
59245
59321
  auth: "protected"
59246
59322
  }),
59247
59323
  /** Select (not start) a program; refused when the appliance does not offer it. */
59248
59324
  setProgram: method(zod.z.object({
59249
- deviceId: DeviceIdSchema$1,
59325
+ deviceId: DeviceIdSchema$2,
59250
59326
  program: zod.z.string().min(1)
59251
59327
  }), zod.z.void(), {
59252
59328
  kind: "mutation",
59253
59329
  auth: "protected"
59254
59330
  }),
59255
59331
  setPower: method(zod.z.object({
59256
- deviceId: DeviceIdSchema$1,
59332
+ deviceId: DeviceIdSchema$2,
59257
59333
  on: zod.z.boolean()
59258
59334
  }), zod.z.void(), {
59259
59335
  kind: "mutation",
59260
59336
  auth: "protected"
59261
59337
  }),
59262
59338
  setHalfLoad: method(zod.z.object({
59263
- deviceId: DeviceIdSchema$1,
59339
+ deviceId: DeviceIdSchema$2,
59264
59340
  on: zod.z.boolean()
59265
59341
  }), zod.z.void(), {
59266
59342
  kind: "mutation",
59267
59343
  auth: "protected"
59268
59344
  }),
59269
59345
  setHygienePlus: method(zod.z.object({
59270
- deviceId: DeviceIdSchema$1,
59346
+ deviceId: DeviceIdSchema$2,
59271
59347
  on: zod.z.boolean()
59272
59348
  }), zod.z.void(), {
59273
59349
  kind: "mutation",
59274
59350
  auth: "protected"
59275
59351
  }),
59276
59352
  setExtraDry: method(zod.z.object({
59277
- deviceId: DeviceIdSchema$1,
59353
+ deviceId: DeviceIdSchema$2,
59278
59354
  on: zod.z.boolean()
59279
59355
  }), zod.z.void(), {
59280
59356
  kind: "mutation",
59281
59357
  auth: "protected"
59282
59358
  }),
59283
59359
  setIntensiveZone: method(zod.z.object({
59284
- deviceId: DeviceIdSchema$1,
59360
+ deviceId: DeviceIdSchema$2,
59285
59361
  on: zod.z.boolean()
59286
59362
  }), zod.z.void(), {
59287
59363
  kind: "mutation",
59288
59364
  auth: "protected"
59289
59365
  }),
59290
59366
  setVarioSpeedPlus: method(zod.z.object({
59291
- deviceId: DeviceIdSchema$1,
59367
+ deviceId: DeviceIdSchema$2,
59292
59368
  on: zod.z.boolean()
59293
59369
  }), zod.z.void(), {
59294
59370
  kind: "mutation",
59295
59371
  auth: "protected"
59296
59372
  }),
59297
59373
  setChildLock: method(zod.z.object({
59298
- deviceId: DeviceIdSchema$1,
59374
+ deviceId: DeviceIdSchema$2,
59299
59375
  on: zod.z.boolean()
59300
59376
  }), zod.z.void(), {
59301
59377
  kind: "mutation",
@@ -59307,7 +59383,7 @@ var dishwasherCapability = {
59307
59383
  * its declared range / members.
59308
59384
  */
59309
59385
  setOption: method(zod.z.object({
59310
- deviceId: DeviceIdSchema$1,
59386
+ deviceId: DeviceIdSchema$2,
59311
59387
  key: zod.z.string().min(1),
59312
59388
  value: DishwasherValueSchema
59313
59389
  }), zod.z.void(), {
@@ -59315,7 +59391,7 @@ var dishwasherCapability = {
59315
59391
  auth: "protected"
59316
59392
  }),
59317
59393
  /** What this appliance can do, from its own description — the UI is derived from it. */
59318
- getOptions: method(zod.z.object({ deviceId: DeviceIdSchema$1 }), DishwasherOptionsSchema, { auth: "protected" })
59394
+ getOptions: method(zod.z.object({ deviceId: DeviceIdSchema$2 }), DishwasherOptionsSchema, { auth: "protected" })
59319
59395
  },
59320
59396
  status: {
59321
59397
  schema: DishwasherStatusSchema,
@@ -75524,6 +75600,21 @@ var NcTemplateVarKindSchema = zod.z.enum([
75524
75600
  "sound",
75525
75601
  "system"
75526
75602
  ]);
75603
+ /**
75604
+ * The default title/body a rule of one SITUATION is delivered with when the
75605
+ * operator wrote no template — served so an editor can pre-fill it (and the
75606
+ * operator can rebuild it from placeholders) instead of starting from a blank
75607
+ * box that, once saved, silently replaces it. `id` names the situation inside
75608
+ * a rule `kind`: `appliance-cycle` is a `sensor` rule whose device is an
75609
+ * appliance finishing a cycle. Texts are raw templates (`{{var}}` intact), in
75610
+ * the hub's current language and with its overrides applied.
75611
+ */
75612
+ var NcTemplateDefaultSchema = zod.z.object({
75613
+ id: zod.z.enum(["appliance-cycle"]),
75614
+ kind: NcRuleKindSchema,
75615
+ title: zod.z.string(),
75616
+ body: zod.z.string()
75617
+ });
75527
75618
  /** Which producer renders a template: an ordinary rule, a timelapse, a digest. */
75528
75619
  var NcTemplateFamilySchema = zod.z.enum([
75529
75620
  "rule",
@@ -76486,7 +76577,11 @@ var notificationRulesCapability = {
76486
76577
  taxonomy: NcTaxonomySchema.optional()
76487
76578
  })),
76488
76579
  /** The declared `{{var}}` vocabulary; editors filter it with `templateVarsFor`. */
76489
- getTemplateCatalog: method(zod.z.object({}), zod.z.object({ vars: zod.z.array(NcTemplateVarDescriptorSchema) })),
76580
+ getTemplateCatalog: method(zod.z.object({}), zod.z.object({
76581
+ vars: zod.z.array(NcTemplateVarDescriptorSchema),
76582
+ /** Per-situation default texts; absent on a hub that predates them. */
76583
+ defaults: zod.z.array(NcTemplateDefaultSchema)
76584
+ })),
76490
76585
  /**
76491
76586
  * Render a template with example values, through the hub's text catalog.
76492
76587
  * Pure: sends nothing. A MUTATION only for transport — a 2.5k-char draft in
@@ -77637,7 +77732,7 @@ var petFeederCapability = {
77637
77732
  /**
77638
77733
  * Pet water-fountain cap. Models the telemetry and the control surface of a
77639
77734
  * circulating drinking fountain: how much water is in the tank, how much the
77640
- * pet drank, whether the pump runs and on what duty cycle.
77735
+ * pet drank, whether the pump runs.
77641
77736
  *
77642
77737
  * It has no native vendor provider of its own: a fountain reaches CamStack as
77643
77738
  * a container of loose entities (a pump switch, two number boxes, a "filter
@@ -77653,8 +77748,10 @@ var petFeederCapability = {
77653
77748
  * never here. Every reading may be `null`: a source that is offline or does
77654
77749
  * not report is unknown, never zero.
77655
77750
  *
77656
- * The filter is not a field of this cap: it is an item of the `consumables`
77657
- * cap on the same device (kind `wear`), reset by the same forward mechanism.
77751
+ * The pump's on/off duty cycle is model-specific and lives in the optional
77752
+ * `pump-cycle` cap. The filter, the cleaning and the water change are not
77753
+ * fields of this cap: they are items of the `consumables` cap on the same
77754
+ * device (kind `wear`), reset by the same forward mechanism.
77658
77755
  */
77659
77756
  var PetFountainStatusSchema = zod.z.object({
77660
77757
  /** Water in the tank, 0..100 (%). Null while the source has not reported. */
@@ -77665,27 +77762,20 @@ var PetFountainStatusSchema = zod.z.object({
77665
77762
  empty: zod.z.boolean().nullable(),
77666
77763
  /** True while the pump is running. Null while unknown. */
77667
77764
  pumpRunning: zod.z.boolean().nullable(),
77668
- /** True when the pump works on an on/off duty cycle rather than continuously. */
77669
- pumpIntervalEnabled: zod.z.boolean().nullable(),
77670
- /** How long the pump runs per cycle, in seconds. */
77671
- pumpOnTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
77672
- /** How long the pump rests per cycle, in seconds. */
77673
- pumpOffTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
77674
77765
  /** Water drunk in the last drink, in litres. */
77675
77766
  lastDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
77676
77767
  /** Water drunk in the current hour, in litres. */
77677
77768
  currentHourDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
77678
77769
  /** Water drunk over the last 24 hours (rolling), in litres. */
77679
77770
  last24hDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
77680
- /** Water drunk since local midnight, in litres. */
77771
+ /** Water drunk since local midnight, in litres. Null when the fountain has no such sensor. */
77681
77772
  todayDrink: zod.z.number().min(0).nullable().meta(readingMeta("volume")),
77682
77773
  /** Decoded fault message. Null means healthy; a non-null string is an active fault. */
77683
77774
  error: zod.z.string().nullable(),
77684
77775
  /** Ms epoch when the slice was last refreshed. */
77685
77776
  lastFetchedAt: zod.z.number()
77686
77777
  });
77687
- var DeviceIdSchema = zod.z.number().int().nonnegative();
77688
- var MinutesSchema = zod.z.number().int().min(0);
77778
+ var DeviceIdSchema$1 = zod.z.number().int().nonnegative();
77689
77779
  var petFountainCapability = {
77690
77780
  name: "pet-fountain",
77691
77781
  scope: "device",
@@ -77695,38 +77785,14 @@ var petFountainCapability = {
77695
77785
  methods: {
77696
77786
  /** Start or stop the pump. */
77697
77787
  setPump: method(zod.z.object({
77698
- deviceId: DeviceIdSchema,
77699
- on: zod.z.boolean()
77700
- }), zod.z.void(), {
77701
- kind: "mutation",
77702
- auth: "protected"
77703
- }),
77704
- /** Switch the on/off duty cycle on or off (off = the pump runs continuously). */
77705
- setPumpInterval: method(zod.z.object({
77706
- deviceId: DeviceIdSchema,
77788
+ deviceId: DeviceIdSchema$1,
77707
77789
  on: zod.z.boolean()
77708
77790
  }), zod.z.void(), {
77709
77791
  kind: "mutation",
77710
77792
  auth: "protected"
77711
77793
  }),
77712
- /** Set how many minutes the pump runs per cycle. */
77713
- setPumpOnMinutes: method(zod.z.object({
77714
- deviceId: DeviceIdSchema,
77715
- minutes: MinutesSchema
77716
- }), zod.z.void(), {
77717
- kind: "mutation",
77718
- auth: "protected"
77719
- }),
77720
- /** Set how many minutes the pump rests per cycle. */
77721
- setPumpOffMinutes: method(zod.z.object({
77722
- deviceId: DeviceIdSchema,
77723
- minutes: MinutesSchema
77724
- }), zod.z.void(), {
77725
- kind: "mutation",
77726
- auth: "protected"
77727
- }),
77728
77794
  /** Clear the rolling daily consumption counters on the device. */
77729
- resetDailyConsumption: method(zod.z.object({ deviceId: DeviceIdSchema }), zod.z.void(), {
77795
+ resetDailyConsumption: method(zod.z.object({ deviceId: DeviceIdSchema$1 }), zod.z.void(), {
77730
77796
  kind: "mutation",
77731
77797
  auth: "protected"
77732
77798
  })
@@ -80726,6 +80792,79 @@ var ptzAutotrackCapability = {
80726
80792
  history: "none"
80727
80793
  };
80728
80794
  /**
80795
+ * The on/off duty cycle of a pet fountain's pump. Some models run the pump
80796
+ * continuously and have nothing to configure; others can alternate a run time
80797
+ * and a rest time. That is model-specific, so it is its own optional cap on the
80798
+ * fountain device: a fountain without cycle entities simply never composes it
80799
+ * (planning#366), and the `pet-fountain` cap stays the model-independent core.
80800
+ *
80801
+ * Like `pet-fountain` it has no native vendor provider: an operator BUILDS the
80802
+ * cycle from loose entities (a cycle switch and two number boxes) and every
80803
+ * method is a forward to one source entity (D659, D967). Durations are stored
80804
+ * in SECONDS (D944); a number box that cannot be read back leaves them `null`
80805
+ * — unknown, never zero (D393).
80806
+ */
80807
+ var PumpCycleStatusSchema = zod.z.object({
80808
+ /** True when the pump works on the on/off cycle, false when it runs continuously. Null while unknown. */
80809
+ enabled: zod.z.boolean().nullable(),
80810
+ /** How long the pump runs per cycle, in seconds. Null while unknown. */
80811
+ onTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
80812
+ /** How long the pump rests per cycle, in seconds. Null while unknown. */
80813
+ offTime: zod.z.number().min(0).nullable().meta(readingMeta("duration")),
80814
+ /** Ms epoch when the slice was last refreshed. */
80815
+ lastFetchedAt: zod.z.number()
80816
+ });
80817
+ var DeviceIdSchema = zod.z.number().int().nonnegative();
80818
+ var MinutesSchema = zod.z.number().int().min(0);
80819
+ var pumpCycleCapability = {
80820
+ name: "pump-cycle",
80821
+ scope: "device",
80822
+ deviceNative: true,
80823
+ mode: "singleton",
80824
+ deviceTypes: [DeviceType.PetFountain],
80825
+ methods: {
80826
+ /** Switch the on/off duty cycle on or off (off = the pump runs continuously). */
80827
+ setEnabled: method(zod.z.object({
80828
+ deviceId: DeviceIdSchema,
80829
+ on: zod.z.boolean()
80830
+ }), zod.z.void(), {
80831
+ kind: "mutation",
80832
+ auth: "protected"
80833
+ }),
80834
+ /** Set how many minutes the pump runs per cycle. */
80835
+ setOnMinutes: method(zod.z.object({
80836
+ deviceId: DeviceIdSchema,
80837
+ minutes: MinutesSchema
80838
+ }), zod.z.void(), {
80839
+ kind: "mutation",
80840
+ auth: "protected"
80841
+ }),
80842
+ /** Set how many minutes the pump rests per cycle. */
80843
+ setOffMinutes: method(zod.z.object({
80844
+ deviceId: DeviceIdSchema,
80845
+ minutes: MinutesSchema
80846
+ }), zod.z.void(), {
80847
+ kind: "mutation",
80848
+ auth: "protected"
80849
+ })
80850
+ },
80851
+ status: {
80852
+ schema: PumpCycleStatusSchema,
80853
+ kind: "push"
80854
+ },
80855
+ /** Runtime-state slice — mirrored by the kernel; the hero card reads it whole. */
80856
+ runtimeState: PumpCycleStatusSchema,
80857
+ /**
80858
+ * Runtime-state durability: **session** — live appliance state re-published on connect.
80859
+ *
80860
+ * See `RuntimeStateDurability`. Enforced by
80861
+ * `scripts/check-runtime-state-durability.ts`.
80862
+ */
80863
+ durability: "session",
80864
+ /** History (D850): a duty-cycle setting is not a series worth recording. */
80865
+ history: "none"
80866
+ };
80867
+ /**
80729
80868
  * reboot — device-scoped capability for "soft" device reboots (firmware
80730
80869
  * reboot via vendor protocol; cameras, NVRs, doorbells). Surfaces a
80731
80870
  * single mutation so the UI can offer a confirm-and-reboot button for
@@ -91204,6 +91343,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
91204
91343
  backupCapability,
91205
91344
  batteryCapability,
91206
91345
  binaryCapability,
91346
+ boardKeySourceCapability,
91207
91347
  brightnessCapability,
91208
91348
  brokerCapability,
91209
91349
  buttonCapability,
@@ -91325,6 +91465,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
91325
91465
  privacyMaskCapability,
91326
91466
  ptzCapability,
91327
91467
  ptzAutotrackCapability,
91468
+ pumpCycleCapability,
91328
91469
  rebootCapability,
91329
91470
  recordEntriesCapability,
91330
91471
  recordingCapability,
@@ -93062,6 +93203,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
93062
93203
  pressureSensor: pressureSensorCapability,
93063
93204
  privacyMask: privacyMaskCapability,
93064
93205
  ptzAutotrack: ptzAutotrackCapability,
93206
+ pumpCycle: pumpCycleCapability,
93065
93207
  recordingOnboard: recordingOnboardCapability,
93066
93208
  recordingSignal: recordingSignalCapability,
93067
93209
  runningState: runningStateCapability,
@@ -95032,6 +95174,27 @@ var METHOD_ACCESS_MAP = Object.freeze({
95032
95174
  access: "view",
95033
95175
  role: "viewer"
95034
95176
  },
95177
+ "boardKeySource.getBoardKey": {
95178
+ capName: "board-key-source",
95179
+ capScope: "system",
95180
+ addonId: null,
95181
+ access: "view",
95182
+ role: "admin"
95183
+ },
95184
+ "boardKeySource.listBoards": {
95185
+ capName: "board-key-source",
95186
+ capScope: "system",
95187
+ addonId: null,
95188
+ access: "view",
95189
+ role: "admin"
95190
+ },
95191
+ "boardKeySource.listSources": {
95192
+ capName: "board-key-source",
95193
+ capScope: "system",
95194
+ addonId: null,
95195
+ access: "view",
95196
+ role: "admin"
95197
+ },
95035
95198
  "brightness.getStatus": {
95036
95199
  capName: "brightness",
95037
95200
  capScope: "device",
@@ -99855,27 +100018,6 @@ var METHOD_ACCESS_MAP = Object.freeze({
99855
100018
  access: "create",
99856
100019
  role: "viewer"
99857
100020
  },
99858
- "petFountain.setPumpInterval": {
99859
- capName: "pet-fountain",
99860
- capScope: "device",
99861
- addonId: null,
99862
- access: "create",
99863
- role: "viewer"
99864
- },
99865
- "petFountain.setPumpOffMinutes": {
99866
- capName: "pet-fountain",
99867
- capScope: "device",
99868
- addonId: null,
99869
- access: "create",
99870
- role: "viewer"
99871
- },
99872
- "petFountain.setPumpOnMinutes": {
99873
- capName: "pet-fountain",
99874
- capScope: "device",
99875
- addonId: null,
99876
- access: "create",
99877
- role: "viewer"
99878
- },
99879
100021
  "pipelineAnalytics.addRetrainFrameFromRecording": {
99880
100022
  capName: "pipeline-analytics",
99881
100023
  capScope: "device",
@@ -101654,6 +101796,34 @@ var METHOD_ACCESS_MAP = Object.freeze({
101654
101796
  access: "create",
101655
101797
  role: "admin"
101656
101798
  },
101799
+ "pumpCycle.getStatus": {
101800
+ capName: "pump-cycle",
101801
+ capScope: "device",
101802
+ addonId: null,
101803
+ access: "view",
101804
+ role: "viewer"
101805
+ },
101806
+ "pumpCycle.setEnabled": {
101807
+ capName: "pump-cycle",
101808
+ capScope: "device",
101809
+ addonId: null,
101810
+ access: "create",
101811
+ role: "viewer"
101812
+ },
101813
+ "pumpCycle.setOffMinutes": {
101814
+ capName: "pump-cycle",
101815
+ capScope: "device",
101816
+ addonId: null,
101817
+ access: "create",
101818
+ role: "viewer"
101819
+ },
101820
+ "pumpCycle.setOnMinutes": {
101821
+ capName: "pump-cycle",
101822
+ capScope: "device",
101823
+ addonId: null,
101824
+ access: "create",
101825
+ role: "viewer"
101826
+ },
101657
101827
  "reboot.reboot": {
101658
101828
  capName: "reboot",
101659
101829
  capScope: "device",
@@ -104697,6 +104867,7 @@ var CAP_NAMES_WITH_STATUS = [
104697
104867
  "privacy-mask",
104698
104868
  "ptz",
104699
104869
  "ptz-autotrack",
104870
+ "pump-cycle",
104700
104871
  "recording-archive",
104701
104872
  "recording-onboard",
104702
104873
  "recording-signal",
@@ -106287,21 +106458,6 @@ Object.freeze({
106287
106458
  form: "single",
106288
106459
  optional: false
106289
106460
  }],
106290
- "petFountain.setPumpInterval": [{
106291
- name: "deviceId",
106292
- form: "single",
106293
- optional: false
106294
- }],
106295
- "petFountain.setPumpOffMinutes": [{
106296
- name: "deviceId",
106297
- form: "single",
106298
- optional: false
106299
- }],
106300
- "petFountain.setPumpOnMinutes": [{
106301
- name: "deviceId",
106302
- form: "single",
106303
- optional: false
106304
- }],
106305
106461
  "pipelineAnalytics.addRetrainFrameFromRecording": [{
106306
106462
  name: "deviceId",
106307
106463
  form: "single",
@@ -106937,6 +107093,26 @@ Object.freeze({
106937
107093
  form: "single",
106938
107094
  optional: false
106939
107095
  }],
107096
+ "pumpCycle.getStatus": [{
107097
+ name: "deviceId",
107098
+ form: "single",
107099
+ optional: false
107100
+ }],
107101
+ "pumpCycle.setEnabled": [{
107102
+ name: "deviceId",
107103
+ form: "single",
107104
+ optional: false
107105
+ }],
107106
+ "pumpCycle.setOffMinutes": [{
107107
+ name: "deviceId",
107108
+ form: "single",
107109
+ optional: false
107110
+ }],
107111
+ "pumpCycle.setOnMinutes": [{
107112
+ name: "deviceId",
107113
+ form: "single",
107114
+ optional: false
107115
+ }],
106940
107116
  "reboot.reboot": [{
106941
107117
  name: "deviceId",
106942
107118
  form: "single",
@@ -107687,7 +107863,7 @@ Object.freeze({
107687
107863
  });
107688
107864
  /**
107689
107865
  * Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
107690
- * `runtimeState`. 80 caps: 39 `restored`, 41 `session`.
107866
+ * `runtimeState`. 81 caps: 39 `restored`, 42 `session`.
107691
107867
  *
107692
107868
  * A cap absent from this map has no runtime-state slice at all. A cap PRESENT
107693
107869
  * with `durability: 'session'` has one and has decided not to keep it.
@@ -107925,6 +108101,10 @@ var RUNTIME_STATE_POLICY = {
107925
108101
  durability: "session",
107926
108102
  volatileFields: []
107927
108103
  },
108104
+ "pump-cycle": {
108105
+ durability: "session",
108106
+ volatileFields: []
108107
+ },
107928
108108
  "recording-onboard": {
107929
108109
  durability: "restored",
107930
108110
  volatileFields: ["lastFetchedAt"]
@@ -109539,6 +109719,10 @@ var ADDON_ID_PREFIX = "addon:";
109539
109719
  function bareAddonId(id) {
109540
109720
  return id.startsWith(ADDON_ID_PREFIX) ? id.slice(6) : id;
109541
109721
  }
109722
+ /** True when both ids name the same addon, prefixed or not. */
109723
+ function isSameAddonId(a, b) {
109724
+ return bareAddonId(a) === bareAddonId(b);
109725
+ }
109542
109726
  String.raw`(?<=^|["'(\s>,\[{])`;
109543
109727
  var MB = 1024 * 1024;
109544
109728
  1024 * MB, 3072 * MB;
@@ -111647,6 +111831,12 @@ Object.defineProperty(exports, "isReadingQuantity", {
111647
111831
  return isReadingQuantity;
111648
111832
  }
111649
111833
  });
111834
+ Object.defineProperty(exports, "isSameAddonId", {
111835
+ enumerable: true,
111836
+ get: function() {
111837
+ return isSameAddonId;
111838
+ }
111839
+ });
111650
111840
  Object.defineProperty(exports, "isSecretClear", {
111651
111841
  enumerable: true,
111652
111842
  get: function() {