@camstack/server 1.2.802 → 1.2.804

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 (92) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/api/trpc/generated-cap-routers.js +18 -0
  3. package/package.json +7 -10
  4. package/system/dist/{agent-https-CzMpclQr.js → agent-https-BFvIRgIa.js} +1 -1
  5. package/system/dist/{agent-https-CfPGbJ21.mjs → agent-https-Bp70et-W.mjs} +1 -1
  6. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  7. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  8. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  9. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  10. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  11. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  12. package/system/dist/builtins/autotrack/index.js +1 -1
  13. package/system/dist/builtins/autotrack/index.mjs +1 -1
  14. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  15. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  16. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  17. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  18. package/system/dist/builtins/camera-grid/index.js +1 -1
  19. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  20. package/system/dist/builtins/composer/composed-device.d.ts +5 -0
  21. package/system/dist/builtins/composer/composer.addon.js +42 -6
  22. package/system/dist/builtins/composer/composer.addon.mjs +42 -6
  23. package/system/dist/builtins/composer/composer.d.ts +13 -0
  24. package/system/dist/builtins/console-logging/index.js +1 -1
  25. package/system/dist/builtins/console-logging/index.mjs +1 -1
  26. package/system/dist/builtins/core-blocks/core-blocks.addon.js +65 -6
  27. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +65 -6
  28. package/system/dist/builtins/core-blocks/timed-run/timed-run-service.d.ts +17 -0
  29. package/system/dist/builtins/core-blocks/timed-run/timed-run-wiring.d.ts +6 -0
  30. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  31. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  32. package/system/dist/builtins/device-manager/device-config-contribution.d.ts +1 -0
  33. package/system/dist/builtins/device-manager/device-manager.addon.js +47 -2
  34. package/system/dist/builtins/device-manager/device-manager.addon.mjs +47 -2
  35. package/system/dist/builtins/device-manager/timed-run-config-schema.d.ts +18 -0
  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 +4 -4
  39. package/system/dist/builtins/keychain/index.mjs +4 -4
  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 +2 -2
  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 +1 -1
  47. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  48. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  49. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  50. package/system/dist/builtins/platform-probe/index.js +1 -1
  51. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  52. package/system/dist/builtins/record-entries/index.js +1 -1
  53. package/system/dist/builtins/record-entries/index.mjs +1 -1
  54. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  55. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  56. package/system/dist/builtins/snapshot/index.js +1 -1
  57. package/system/dist/builtins/snapshot/index.mjs +1 -1
  58. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  59. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  60. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  61. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  62. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  63. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  64. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  65. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  66. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  67. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  68. package/system/dist/builtins/winston-logging/index.js +1 -1
  69. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  70. package/system/dist/{capture-engine-CJxojquW.mjs → capture-engine-CQBSd3V1.mjs} +1 -1
  71. package/system/dist/{capture-engine-Us8Ocffb.js → capture-engine-Sh4zAKR0.js} +1 -1
  72. package/system/dist/{composition-sources-DcsjjTIu.mjs → composition-sources-BxSmsp0_.mjs} +1 -1
  73. package/system/dist/{composition-sources-D2z7D7bY.js → composition-sources-rAsv2tZD.js} +1 -1
  74. package/system/dist/{constants-BOMAH5bO.js → constants-BCQCUHl9.js} +1 -1
  75. package/system/dist/{constants-DVqHyOzQ.mjs → constants-BfgfqUFH.mjs} +1 -1
  76. package/system/dist/{device-ca-NlhUUsex.js → device-ca-BgCwLzMX.js} +1 -1
  77. package/system/dist/{device-ca-zAWpen18.mjs → device-ca-D7JZLEAn.mjs} +1 -1
  78. package/system/dist/{dist-BccX5DOW.js → dist-BpIvMLVc.js} +595 -374
  79. package/system/dist/{dist-DYrP8WdD.mjs → dist-Bvw9utDk.mjs} +572 -375
  80. package/system/dist/file-host-worker.js +1 -1
  81. package/system/dist/file-host-worker.mjs +1 -1
  82. package/system/dist/{hub-mdns-ciao-DpRlDWJY.js → hub-mdns-ciao-DZwGhLx-.js} +2 -2
  83. package/system/dist/{hub-mdns-ciao-BleXDm2r.mjs → hub-mdns-ciao-qefBaLZn.mjs} +2 -2
  84. package/system/dist/index.js +16 -10
  85. package/system/dist/index.mjs +16 -10
  86. package/system/dist/{legacy-integration-rows-door-BUyPyv8f.mjs → legacy-integration-rows-door-DCfOpaG3.mjs} +1 -1
  87. package/system/dist/{legacy-integration-rows-door-D2ZrX431.js → legacy-integration-rows-door-gqcsQX0L.js} +1 -1
  88. package/system/dist/{restore-archive-B1PE_1S2.mjs → restore-archive-BS6gi0i-.mjs} +1 -1
  89. package/system/dist/{restore-archive-DMUCmY3H.js → restore-archive-BtgtMV29.js} +1 -1
  90. package/system/dist/{wal-maintenance-CmNAtKgj.js → wal-maintenance-CyyJs8fh.js} +0 -0
  91. package/system/dist/{wal-maintenance-Ce71BVDk.mjs → wal-maintenance-DBCFpkyy.mjs} +0 -0
  92. package/system/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.804] - 2026-11-08
11
+
12
+ ### Changed
13
+
14
+ - Rebuilt against updated dependencies.
15
+
16
+ ## [1.2.803] - 2026-11-07
17
+
18
+ ### Changed
19
+
20
+ - A timed-run device exposes its quick-run duration and lets an admin set it
21
+
10
22
  ## [1.2.802] - 2026-11-07
11
23
 
12
24
  ### Changed
@@ -13043,6 +13043,24 @@ function createCapRouter_timedRun(getProvider, createRemoteProxy) {
13043
13043
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13044
13044
  return p.getStatus(methodInput);
13045
13045
  }),
13046
+ getOptions: trpc_middleware_js_1.protectedProcedure
13047
+ .input(types_153.timedRunCapability.methods.getOptions.input.loose())
13048
+ .output(types_153.timedRunCapability.methods.getOptions.output)
13049
+ .query(async ({ input, ctx }) => {
13050
+ const { nodeId, ...methodInput } = input;
13051
+ const p = resolveProvider('timed-run', nodeId, () => getProvider(ctx), createRemoteProxy);
13052
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13053
+ return p.getOptions(methodInput);
13054
+ }),
13055
+ setSettings: trpc_middleware_js_1.adminProcedure
13056
+ .input(types_153.timedRunCapability.methods.setSettings.input.loose())
13057
+ .output(types_153.timedRunCapability.methods.setSettings.output)
13058
+ .mutation(async ({ input, ctx }) => {
13059
+ const { nodeId, ...methodInput } = input;
13060
+ const p = resolveProvider('timed-run', nodeId, () => getProvider(ctx), createRemoteProxy);
13061
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
13062
+ return p.setSettings(methodInput);
13063
+ }),
13046
13064
  runFor: trpc_middleware_js_1.protectedProcedure
13047
13065
  .input(types_153.timedRunCapability.methods.runFor.input.loose())
13048
13066
  .output(types_153.timedRunCapability.methods.runFor.output)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.802",
3
+ "version": "1.2.804",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -66,10 +66,7 @@
66
66
  ],
67
67
  "requires": {
68
68
  "addons": {
69
- "@camstack/addon-admin-ui": ">=1.2.611",
70
- "@camstack/addon-agent-ui": ">=1.2.340",
71
- "@camstack/addon-post-analysis": ">=1.2.684",
72
- "@camstack/addon-waste-collections": ">=0.1.39"
69
+ "@camstack/addon-admin-ui": ">=1.2.613"
73
70
  },
74
71
  "wrapper": {
75
72
  "desktop": ">=0.0.1",
@@ -78,19 +75,19 @@
78
75
  }
79
76
  },
80
77
  "dependencies": {
81
- "@camstack/addon-admin-ui": "1.2.611",
82
- "@camstack/addon-agent-ui": "1.2.340",
78
+ "@camstack/addon-admin-ui": "1.2.613",
79
+ "@camstack/addon-agent-ui": "1.2.341",
83
80
  "@camstack/addon-auth": "1.2.178",
84
81
  "@camstack/addon-benchmark": "1.2.312",
85
82
  "@camstack/addon-decoder-nodeav": "1.2.148",
86
83
  "@camstack/addon-notifiers": "1.2.633",
87
84
  "@camstack/addon-pipeline": "1.2.647",
88
- "@camstack/addon-pipeline-orchestrator": "1.2.667",
85
+ "@camstack/addon-pipeline-orchestrator": "1.2.668",
89
86
  "@camstack/addon-post-analysis": "1.2.684",
90
87
  "@camstack/develop": "0.1.49",
91
88
  "@camstack/sdk": "1.2.156",
92
- "@camstack/types": "1.2.521",
93
- "@camstack/ui-library": "1.2.399",
89
+ "@camstack/types": "1.2.523",
90
+ "@camstack/ui-library": "1.2.400",
94
91
  "@fastify/compress": "^9.0.0",
95
92
  "@fastify/cookie": "^11.0.2",
96
93
  "@fastify/cors": "^11.2.0",
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require("./chunk-Cek0wNdY.js");
2
- const require_dist = require("./dist-BccX5DOW.js");
2
+ const require_dist = require("./dist-BpIvMLVc.js");
3
3
  const require_x509_es = require("./x509.es-WtnRNyYS.js");
4
4
  let zod = require("zod");
5
5
  let node_crypto = require("node:crypto");
@@ -1,4 +1,4 @@
1
- import { Is as defineRecordKinds } from "./dist-DYrP8WdD.mjs";
1
+ import { zs as defineRecordKinds } from "./dist-Bvw9utDk.mjs";
2
2
  import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
3
3
  import { z } from "zod";
4
4
  import { X509Certificate, createHash, createPrivateKey, randomBytes, 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-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { Bo as BaseAddon, Oc as errMsg, hn as addonPagesCapability, kc as EventCategory } from "../../dist-DYrP8WdD.mjs";
1
+ import { Nc as EventCategory, Uo as BaseAddon, hn as addonPagesCapability, jc as errMsg } from "../../dist-Bvw9utDk.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as fs$1 from "node:fs";
@@ -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-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let node_crypto = require("node:crypto");
9
9
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { Bo as BaseAddon, Oc as errMsg, _n as addonWidgetsCapability, kc as EventCategory } from "../../dist-DYrP8WdD.mjs";
1
+ import { Nc as EventCategory, Uo as BaseAddon, _n as addonWidgetsCapability, jc as errMsg } from "../../dist-Bvw9utDk.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { createHash, randomUUID } from "node:crypto";
4
4
  import * as fs$1 from "node:fs";
@@ -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-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  let node_fs = require("node:fs");
9
9
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,4 +1,4 @@
1
- import { Bo as BaseAddon, Gr as isAlertEpisodeSeverity, Is as defineRecordKinds, Oc as errMsg$1, Wr as isAlertEpisodeOpen, bn as alertsCapability, f as AlertSchema, js as createEvent$1, kc as EventCategory$1, vn as alertEpisodeId, w as CORE_BLOCK_ADDON_PREFIX, yn as alertEpisodePayload } from "../../dist-DYrP8WdD.mjs";
1
+ import { Gr as isAlertEpisodeSeverity, Nc as EventCategory$1, Ps as createEvent$1, Uo as BaseAddon, Wr as isAlertEpisodeOpen, bn as alertsCapability, f as AlertSchema, jc as errMsg$1, vn as alertEpisodeId, w as CORE_BLOCK_ADDON_PREFIX, yn as alertEpisodePayload, zs as defineRecordKinds } from "../../dist-Bvw9utDk.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  import * as fs$1 from "node:fs";
4
4
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  let zod = require("zod");
8
8
  //#region src/builtins/autotrack/autotrack-config.ts
9
9
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
@@ -1,4 +1,4 @@
1
- import { Bo as BaseAddon, Oc as errMsg, Qi as ptzAutotrackCapability, Tn as bareAddonId, kc as EventCategory, qs as isEvent, rt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-DYrP8WdD.mjs";
1
+ import { Nc as EventCategory, Qi as ptzAutotrackCapability, Tn as bareAddonId, Uo as BaseAddon, Xs as isEvent, jc as errMsg, rt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-Bvw9utDk.mjs";
2
2
  import { z } from "zod";
3
3
  //#region src/builtins/autotrack/autotrack-config.ts
4
4
  var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
@@ -3,9 +3,9 @@ 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-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_restore_archive = require("../../restore-archive-DMUCmY3H.js");
8
+ const require_restore_archive = require("../../restore-archive-BtgtMV29.js");
9
9
  let node_crypto = require("node:crypto");
10
10
  let node_fs = require("node:fs");
11
11
  node_fs = require_chunk.__toESM(node_fs);
@@ -1,6 +1,6 @@
1
- import { Bo as BaseAddon, Ia as storageOccupancyCapability, _i as mayWriteToLocation, ac as nodePin, bc as toNodeId, kc as EventCategory, wn as backupCapability } from "../../dist-DYrP8WdD.mjs";
1
+ import { Cc as toNodeId, Ia as storageOccupancyCapability, Nc as EventCategory, Uo as BaseAddon, _i as mayWriteToLocation, cc as nodePin, wn as backupCapability } from "../../dist-Bvw9utDk.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
- import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-B1PE_1S2.mjs";
3
+ import { _ as backupRecordStoresOf, a as BackupSnapshotRefusedError, d as ENCRYPTED_BACKUP_SUFFIX, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, i as BackupCancelledError, l as BackupKeyFormatError, m as parseBackupSecretKey, n as precheckRestoreKey, o as DEFAULT_BACKUP_DATABASES, p as parseBackupPublicKey, r as prepareRestoreArchive, s as SystemBackupService } from "../../restore-archive-BS6gi0i-.mjs";
4
4
  import { randomUUID } from "node:crypto";
5
5
  import * as fs$1 from "node:fs";
6
6
  import * as path$1 from "node:path";
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
8
8
  let zod = require("zod");
9
9
  //#region src/builtins/calendars/calendar-color.ts
@@ -1,4 +1,4 @@
1
- import { Bo as BaseAddon, E as CalendarPreferencesSchema, Is as defineRecordKinds, Nn as calendarsCapability } from "../../dist-DYrP8WdD.mjs";
1
+ import { E as CalendarPreferencesSchema, Nn as calendarsCapability, Uo as BaseAddon, zs as defineRecordKinds } from "../../dist-Bvw9utDk.mjs";
2
2
  import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
3
3
  import { z } from "zod";
4
4
  //#region src/builtins/calendars/calendar-color.ts
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  let zod = require("zod");
8
8
  let node_crypto = require("node:crypto");
9
9
  let _camstack_types_node = require("@camstack/types/node");
@@ -1,4 +1,4 @@
1
- import { Bo as BaseAddon, Dc as DeviceType, Ei as motionCapability, Fs as defineEntryKind, J as DeclaredDevices, Js as isInstanceEnabled, Oc as errMsg, Pn as cameraGridLayoutCapability, Ra as streamCatalogCapability, Tc as DeviceFeature, Tn as bareAddonId, Tt as MOTION_CLOSE_AFTER_MS, Vr as integrationInstancesCapability, Ws as hydrateSchema, bi as memoizePinnedFfmpeg, h as BaseDevice, ho as buildFfmpegArgs, ja as snapshotCapability, js as createEvent, kc as EventCategory, ls as RecordIntegrationInstances, or as declarationOwnerNodeId, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-DYrP8WdD.mjs";
1
+ import { Ac as DeviceType, Ei as motionCapability, J as DeclaredDevices, Nc as EventCategory, Oc as DeviceFeature, Pn as cameraGridLayoutCapability, Ps as createEvent, Ra as streamCatalogCapability, Rs as defineEntryKind, Tn as bareAddonId, Tt as MOTION_CLOSE_AFTER_MS, Uo as BaseAddon, Vr as integrationInstancesCapability, Zs as isInstanceEnabled, bi as memoizePinnedFfmpeg, fs as RecordIntegrationInstances, h as BaseDevice, ja as snapshotCapability, jc as errMsg, or as declarationOwnerNodeId, qs as hydrateSchema, vo as buildFfmpegArgs, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-Bvw9utDk.mjs";
2
2
  import { z } from "zod";
3
3
  import { createHash } from "node:crypto";
4
4
  import { FfmpegProcess } from "@camstack/types/node";
@@ -7,15 +7,20 @@ export interface ComposedDeviceHandle extends ComposedWriteTarget {
7
7
  readonly name: string;
8
8
  /** Copies a source reading's quantity onto this device (D944). Optional so test doubles stay small. */
9
9
  adoptQuantity?(quantity: ReadingQuantity): Promise<void>;
10
+ /** Publishes the features the device's bound caps stand for (`featuresOfBoundCaps`). Optional so test doubles stay small. */
11
+ syncBoundFeatures?(features: readonly DeviceFeature[]): void;
10
12
  }
11
13
  export declare class ComposedDevice extends BaseDevice<typeof COMPOSED_DEVICE_CONFIG_SCHEMA> implements ComposedDeviceHandle {
12
14
  private sharedFeatures;
15
+ /** Features of caps bound on the device by others (a wrapper): derived from its bindings, never listed here. */
16
+ private boundFeatures;
13
17
  private extraCaps;
14
18
  /** Whether this device's tank is also a `water` consumable (derived, never bound). */
15
19
  private readonly derivesWater;
16
20
  /** The `consumables` items the composition last wrote — the derived water item is added to these. */
17
21
  private composedItems;
18
22
  get features(): readonly DeviceFeature[];
23
+ syncBoundFeatures(features: readonly DeviceFeature[]): void;
19
24
  constructor(ctx: DeviceContext, type: DeviceType, caps: readonly CapabilityDefinition[]);
20
25
  /**
21
26
  * The methods of a BUILT cap are commands (D967): each one is dispatched under
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BccX5DOW.js");
7
- const require_composition_sources = require("../../composition-sources-D2z7D7bY.js");
8
- const require_capture_engine = require("../../capture-engine-Us8Ocffb.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
+ const require_composition_sources = require("../../composition-sources-rAsv2tZD.js");
8
+ const require_capture_engine = require("../../capture-engine-Sh4zAKR0.js");
9
9
  const require_retention = require("../../retention-BNONb5X_.js");
10
10
  let zod = require("zod");
11
11
  //#region src/builtins/composer/actuator-invoke.ts
@@ -159,13 +159,20 @@ function sliceBoolean(slice, field) {
159
159
  }
160
160
  var ComposedDevice = class extends require_dist.BaseDevice {
161
161
  sharedFeatures = [];
162
+ /** Features of caps bound on the device by others (a wrapper): derived from its bindings, never listed here. */
163
+ boundFeatures = [];
162
164
  extraCaps = /* @__PURE__ */ new Set();
163
165
  /** Whether this device's tank is also a `water` consumable (derived, never bound). */
164
166
  derivesWater;
165
167
  /** The `consumables` items the composition last wrote — the derived water item is added to these. */
166
168
  composedItems = [];
167
169
  get features() {
168
- return this.sharedFeatures;
170
+ return [...new Set([...this.sharedFeatures, ...this.boundFeatures])];
171
+ }
172
+ syncBoundFeatures(features) {
173
+ if (features.length === this.boundFeatures.length && features.every((feature) => this.boundFeatures.includes(feature))) return;
174
+ this.boundFeatures = [...features];
175
+ this.refreshFeatures();
169
176
  }
170
177
  constructor(ctx, type, caps) {
171
178
  super(ctx, COMPOSED_DEVICE_CONFIG_SCHEMA, { type });
@@ -1803,7 +1810,8 @@ function planUnreadable(block, rows) {
1803
1810
  }
1804
1811
  /** `target` is the block's own `new` target, narrowed by the caller: this path never sees an existing one (M-5). */
1805
1812
  function planNew(block, target, lookupCap, rows) {
1806
- const plan = require_dist.planComposition(block.composition, lookupCap);
1813
+ const composition = require_dist.withDefaultRunning(block.composition, block.id);
1814
+ const plan = require_dist.planComposition(composition, lookupCap);
1807
1815
  const planned = { kind: "new" };
1808
1816
  if (plan.problems.length > 0) {
1809
1817
  const stableId = require_dist.composedDeviceStableId(block.id);
@@ -1817,7 +1825,7 @@ function planNew(block, target, lookupCap, rows) {
1817
1825
  target: planned
1818
1826
  };
1819
1827
  }
1820
- const caps = block.composition.features.flatMap((f) => {
1828
+ const caps = composition.features.flatMap((f) => {
1821
1829
  if (!require_dist.compositionFeatureEnabled(f)) return [];
1822
1830
  const def = lookupCap(f.cap);
1823
1831
  return def === null ? [] : [def];
@@ -4481,6 +4489,22 @@ var Composer = class {
4481
4489
  this.grafts.onBindingsChanged(data);
4482
4490
  this.dispatch(await this.deps.tracker.onBindingsChanged(data.deviceId, data.capName, data.reason));
4483
4491
  await this.chained(() => this.actuators?.onMemberBindings(data.deviceId));
4492
+ await this.syncBoundFeatures([...this.live.keys()].filter((blockId) => this.composed.idOf(require_dist.composedDeviceStableId(blockId)) === data.deviceId));
4493
+ }
4494
+ /**
4495
+ * A composed device carries the features its BOUND caps stand for — the same
4496
+ * flags a driver sets on a regular device. A cap bound later by a wrapper
4497
+ * (`timed-run`) reaches it here; a read that fails changes nothing (D49).
4498
+ */
4499
+ async syncBoundFeatures(blockIds) {
4500
+ const read = this.deps.boundCapNames;
4501
+ if (read === void 0) return;
4502
+ for (const blockId of blockIds) {
4503
+ const device = this.composed.get(require_dist.composedDeviceStableId(blockId));
4504
+ if (device === null || device.syncBoundFeatures === void 0) continue;
4505
+ const caps = await read(device.id);
4506
+ if (caps !== null) device.syncBoundFeatures(require_dist.featuresOfBoundCaps(caps));
4507
+ }
4484
4508
  }
4485
4509
  shutdown() {
4486
4510
  for (const entry of this.live.values()) entry.runtime?.stop();
@@ -4618,6 +4642,7 @@ var Composer = class {
4618
4642
  await this.syncSources(rebuilt);
4619
4643
  this.forwards?.sync(forwardBlocksOf(input.blocks));
4620
4644
  await this.syncExtensionFeatures(forwardBlocksOf(input.blocks));
4645
+ await this.syncBoundFeatures(input.blocks.map((block) => block.id));
4621
4646
  await this.actuators?.sync(input.blocks.flatMap((block) => {
4622
4647
  const helper = block.composition.helper;
4623
4648
  if (helper !== void 0 && helper.kind !== "group") return [];
@@ -6155,6 +6180,17 @@ var ComposerAddon = class extends require_dist.BaseAddon {
6155
6180
  ...args
6156
6181
  });
6157
6182
  },
6183
+ boundCapNames: async (deviceId) => {
6184
+ try {
6185
+ return (await api.deviceManager.getBindings.query({ deviceId })).entries.map((entry) => entry.capName);
6186
+ } catch (err) {
6187
+ this.ctx.logger.warn("composer: the bindings of a composed device could not be read", {
6188
+ tags: { deviceId },
6189
+ meta: { error: require_dist.errMsg(err) }
6190
+ });
6191
+ return null;
6192
+ }
6193
+ },
6158
6194
  extensionFeatures: async (deviceId) => {
6159
6195
  try {
6160
6196
  return require_dist.mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
@@ -1,6 +1,6 @@
1
- import { Ao as isForwardInputRef, Ar as fanControlCapability, Bi as petFountainCapability, Bn as climateControlCapability, Bo as BaseAddon, Br as groupTemplate, Co as createStatefulExpressionMemory, Da as sharedColorModes, Dc as DeviceType, Dn as brightnessCapability, Ea as sharedActuatorMethods, Ei as motionCapability, Eo as evaluateStatistic, Fo as planResetTier, Gn as composerCapability, Hn as colorCapability, Io as planStatisticTier, J as DeclaredDevices, Jn as consumablesCapability, Kn as compositionFieldKey, Lo as statisticCadenceMs, Mo as nextLocalMidnight, No as openReset, Nr as featureForwards, Oc as errMsg, Oo as historyRetentionFromSettings, Or as expressionContainsBuiltinCall, Po as openStatistic, Pt as PetFountainStatusSchema, Qa as valveCapability, Ri as parseColorInput, Ro as toExpressionValue, So as compositionSourceKey, Ta as sharedActuatorFeatures, To as evaluateDerivative, Ui as planComposition, Va as switchCapability, Vi as petFountainWaterItem, Xi as processTimeZoneOr, Xs as isReadingQuantity, _a as runFanOut, _o as composedDeviceRef, at as FanDirectionSchema, bo as compositionItemFieldPath, di as lockControlCapability, do as HISTORY_SLOW_MS, er as coverCapability, fo as HOUR_MS, go as cloneStatefulExpressionMemory, h as BaseDevice, i as ACTUATOR_TEMPLATE_IDS, jo as isHistoryHelper, jr as fanOutTargets, js as createEvent, k as ConsumableItemSchema, kc as EventCategory, kn as buildCapabilityLookup, ko as integrateReading, lo as DEFAULT_HISTORY_RETENTION, lt as GroupCommandResultSchema, mo as MINUTE_MS, mt as HvacModeSchema, ni as kebabToCamel, oo as COMPOSER_ADDON_ID, pa as resolveMutate, r as ACTUATOR_METHODS, s as ALL_CAPABILITY_DEFINITIONS, sr as declaredSeriesKind, uo as HISTORY_FAST_MS, vi as mediaPlayerCapability, vo as composedDeviceStableId, wo as disarmRoseMemory, wr as evaluateCompositionField, x as COMPOSED_ITEM_FIXED_FIELDS, xi as methodRefusal, xo as compositionSliceKey, yi as mediaPlayerFeaturesOfRoles, yo as compositionFeatureEnabled, zr as groupCommandsCapability } from "../../dist-DYrP8WdD.mjs";
2
- import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-DcsjjTIu.mjs";
3
- import { i as capSeriesKey } from "../../capture-engine-CJxojquW.mjs";
1
+ import { $s as isReadingQuantity, Ac as DeviceType, Ar as fanControlCapability, Bi as petFountainCapability, Bn as climateControlCapability, Bo as statisticCadenceMs, Br as groupTemplate, Co as compositionItemFieldPath, Da as sharedColorModes, Dn as brightnessCapability, Do as disarmRoseMemory, Ea as sharedActuatorMethods, Ei as motionCapability, Eo as createStatefulExpressionMemory, Fo as nextLocalMidnight, Gn as composerCapability, Hn as colorCapability, Io as openReset, J as DeclaredDevices, Jn as consumablesCapability, Kn as compositionFieldKey, Lo as openStatistic, Mc as featuresOfBoundCaps, Mo as integrateReading, Nc as EventCategory, No as isForwardInputRef, Nr as featureForwards, Oo as evaluateDerivative, Or as expressionContainsBuiltinCall, Po as isHistoryHelper, Ps as createEvent, Pt as PetFountainStatusSchema, Ri as parseColorInput, Ro as planResetTier, So as compositionFeatureEnabled, Ta as sharedActuatorFeatures, To as compositionSourceKey, Ui as planComposition, Uo as BaseAddon, Va as switchCapability, Vi as petFountainWaterItem, Vo as toExpressionValue, Xi as processTimeZoneOr, _a as runFanOut, _o as MINUTE_MS, at as FanDirectionSchema, bo as composedDeviceRef, di as lockControlCapability, eo as valveCapability, er as coverCapability, fo as DEFAULT_HISTORY_RETENTION, h as BaseDevice, ho as HOUR_MS, i as ACTUATOR_TEMPLATE_IDS, jc as errMsg, jo as historyRetentionFromSettings, jr as fanOutTargets, k as ConsumableItemSchema, kn as buildCapabilityLookup, ko as evaluateStatistic, lo as COMPOSER_ADDON_ID, lt as GroupCommandResultSchema, mo as HISTORY_SLOW_MS, mt as HvacModeSchema, ni as kebabToCamel, oo as withDefaultRunning, pa as resolveMutate, po as HISTORY_FAST_MS, r as ACTUATOR_METHODS, s as ALL_CAPABILITY_DEFINITIONS, sr as declaredSeriesKind, vi as mediaPlayerCapability, wo as compositionSliceKey, wr as evaluateCompositionField, x as COMPOSED_ITEM_FIXED_FIELDS, xi as methodRefusal, xo as composedDeviceStableId, yi as mediaPlayerFeaturesOfRoles, yo as cloneStatefulExpressionMemory, zo as planStatisticTier, zr as groupCommandsCapability } from "../../dist-Bvw9utDk.mjs";
2
+ import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-BxSmsp0_.mjs";
3
+ import { i as capSeriesKey } from "../../capture-engine-CQBSd3V1.mjs";
4
4
  import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-B9l9TnGE.mjs";
5
5
  import { z } from "zod";
6
6
  //#region src/builtins/composer/actuator-invoke.ts
@@ -154,13 +154,20 @@ function sliceBoolean(slice, field) {
154
154
  }
155
155
  var ComposedDevice = class extends BaseDevice {
156
156
  sharedFeatures = [];
157
+ /** Features of caps bound on the device by others (a wrapper): derived from its bindings, never listed here. */
158
+ boundFeatures = [];
157
159
  extraCaps = /* @__PURE__ */ new Set();
158
160
  /** Whether this device's tank is also a `water` consumable (derived, never bound). */
159
161
  derivesWater;
160
162
  /** The `consumables` items the composition last wrote — the derived water item is added to these. */
161
163
  composedItems = [];
162
164
  get features() {
163
- return this.sharedFeatures;
165
+ return [...new Set([...this.sharedFeatures, ...this.boundFeatures])];
166
+ }
167
+ syncBoundFeatures(features) {
168
+ if (features.length === this.boundFeatures.length && features.every((feature) => this.boundFeatures.includes(feature))) return;
169
+ this.boundFeatures = [...features];
170
+ this.refreshFeatures();
164
171
  }
165
172
  constructor(ctx, type, caps) {
166
173
  super(ctx, COMPOSED_DEVICE_CONFIG_SCHEMA, { type });
@@ -1798,7 +1805,8 @@ function planUnreadable(block, rows) {
1798
1805
  }
1799
1806
  /** `target` is the block's own `new` target, narrowed by the caller: this path never sees an existing one (M-5). */
1800
1807
  function planNew(block, target, lookupCap, rows) {
1801
- const plan = planComposition(block.composition, lookupCap);
1808
+ const composition = withDefaultRunning(block.composition, block.id);
1809
+ const plan = planComposition(composition, lookupCap);
1802
1810
  const planned = { kind: "new" };
1803
1811
  if (plan.problems.length > 0) {
1804
1812
  const stableId = composedDeviceStableId(block.id);
@@ -1812,7 +1820,7 @@ function planNew(block, target, lookupCap, rows) {
1812
1820
  target: planned
1813
1821
  };
1814
1822
  }
1815
- const caps = block.composition.features.flatMap((f) => {
1823
+ const caps = composition.features.flatMap((f) => {
1816
1824
  if (!compositionFeatureEnabled(f)) return [];
1817
1825
  const def = lookupCap(f.cap);
1818
1826
  return def === null ? [] : [def];
@@ -4476,6 +4484,22 @@ var Composer = class {
4476
4484
  this.grafts.onBindingsChanged(data);
4477
4485
  this.dispatch(await this.deps.tracker.onBindingsChanged(data.deviceId, data.capName, data.reason));
4478
4486
  await this.chained(() => this.actuators?.onMemberBindings(data.deviceId));
4487
+ await this.syncBoundFeatures([...this.live.keys()].filter((blockId) => this.composed.idOf(composedDeviceStableId(blockId)) === data.deviceId));
4488
+ }
4489
+ /**
4490
+ * A composed device carries the features its BOUND caps stand for — the same
4491
+ * flags a driver sets on a regular device. A cap bound later by a wrapper
4492
+ * (`timed-run`) reaches it here; a read that fails changes nothing (D49).
4493
+ */
4494
+ async syncBoundFeatures(blockIds) {
4495
+ const read = this.deps.boundCapNames;
4496
+ if (read === void 0) return;
4497
+ for (const blockId of blockIds) {
4498
+ const device = this.composed.get(composedDeviceStableId(blockId));
4499
+ if (device === null || device.syncBoundFeatures === void 0) continue;
4500
+ const caps = await read(device.id);
4501
+ if (caps !== null) device.syncBoundFeatures(featuresOfBoundCaps(caps));
4502
+ }
4479
4503
  }
4480
4504
  shutdown() {
4481
4505
  for (const entry of this.live.values()) entry.runtime?.stop();
@@ -4613,6 +4637,7 @@ var Composer = class {
4613
4637
  await this.syncSources(rebuilt);
4614
4638
  this.forwards?.sync(forwardBlocksOf(input.blocks));
4615
4639
  await this.syncExtensionFeatures(forwardBlocksOf(input.blocks));
4640
+ await this.syncBoundFeatures(input.blocks.map((block) => block.id));
4616
4641
  await this.actuators?.sync(input.blocks.flatMap((block) => {
4617
4642
  const helper = block.composition.helper;
4618
4643
  if (helper !== void 0 && helper.kind !== "group") return [];
@@ -6150,6 +6175,17 @@ var ComposerAddon = class extends BaseAddon {
6150
6175
  ...args
6151
6176
  });
6152
6177
  },
6178
+ boundCapNames: async (deviceId) => {
6179
+ try {
6180
+ return (await api.deviceManager.getBindings.query({ deviceId })).entries.map((entry) => entry.capName);
6181
+ } catch (err) {
6182
+ this.ctx.logger.warn("composer: the bindings of a composed device could not be read", {
6183
+ tags: { deviceId },
6184
+ meta: { error: errMsg(err) }
6185
+ });
6186
+ return null;
6187
+ }
6188
+ },
6153
6189
  extensionFeatures: async (deviceId) => {
6154
6190
  try {
6155
6191
  return mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
@@ -128,6 +128,13 @@ export interface ComposerDeps {
128
128
  * Absent in tests that predate the `extension` command.
129
129
  */
130
130
  readonly extensionFeatures?: (deviceId: number) => Promise<readonly DeviceFeature[] | null>;
131
+ /**
132
+ * Every cap bound on a device, whoever serves it (a wrapper included), or null
133
+ * when it could not be read (the device keeps its features, D49). A composed
134
+ * device's features are the ones these caps stand for (`featuresOfBoundCaps`).
135
+ * Absent in tests that predate it.
136
+ */
137
+ readonly boundCapNames?: (deviceId: number) => Promise<readonly string[] | null>;
131
138
  }
132
139
  /** The configured zone, else the process zone when usable, else `UTC` (an empty `TZ` reads `Etc/Unknown`). */
133
140
  export declare function resolveComposerTimeZone(configured: string | undefined, logger: IScopedLogger): string;
@@ -171,6 +178,12 @@ export declare class Composer {
171
178
  onNativeChanged(data: NativeShadowChangedData): Promise<void>;
172
179
  onDeviceUnregistered(deviceId: number): Promise<void>;
173
180
  onBindingsChanged(data: DeviceBindingsChangedData): Promise<void>;
181
+ /**
182
+ * A composed device carries the features its BOUND caps stand for — the same
183
+ * flags a driver sets on a regular device. A cap bound later by a wrapper
184
+ * (`timed-run`) reaches it here; a read that fails changes nothing (D49).
185
+ */
186
+ private syncBoundFeatures;
174
187
  shutdown(): void;
175
188
  /**
176
189
  * A media player served by the `remote` extension reports nothing, so its
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-BccX5DOW.js");
6
+ const require_dist = require("../../dist-BpIvMLVc.js");
7
7
  const require_formatter = require("../../formatter-xbxeV4GD.js");
8
8
  //#region src/builtins/console-logging/console-destination.ts
9
9
  var LEVEL_RANK = {
@@ -1,4 +1,4 @@
1
- import { Bo as BaseAddon, pi as logDestinationCapability } from "../../dist-DYrP8WdD.mjs";
1
+ import { Uo as BaseAddon, pi as logDestinationCapability } from "../../dist-Bvw9utDk.mjs";
2
2
  import { t as formatLogLine } from "../../formatter-DkYZ4LXp.mjs";
3
3
  //#region src/builtins/console-logging/console-destination.ts
4
4
  var LEVEL_RANK = {