@camstack/server 1.2.907 → 1.2.909

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 +13 -0
  2. package/package.json +7 -11
  3. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  4. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  5. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  6. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  7. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  8. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  9. package/system/dist/builtins/autotrack/index.js +1 -1
  10. package/system/dist/builtins/autotrack/index.mjs +1 -1
  11. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  12. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  13. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  14. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  15. package/system/dist/builtins/camera-grid/index.js +1 -1
  16. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  17. package/system/dist/builtins/composer/composer-plan.d.ts +4 -2
  18. package/system/dist/builtins/composer/composer.addon.js +59 -9
  19. package/system/dist/builtins/composer/composer.addon.mjs +59 -9
  20. package/system/dist/builtins/composer/composer.d.ts +11 -0
  21. package/system/dist/builtins/console-logging/index.js +1 -1
  22. package/system/dist/builtins/console-logging/index.mjs +1 -1
  23. package/system/dist/builtins/core-blocks/composition-api.d.ts +6 -0
  24. package/system/dist/builtins/core-blocks/core-blocks.addon.js +46 -8
  25. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +46 -8
  26. package/system/dist/builtins/core-blocks/sync-composed-device-name.d.ts +2 -7
  27. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  28. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  29. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  30. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  31. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  32. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  33. package/system/dist/builtins/keychain/index.js +4 -4
  34. package/system/dist/builtins/keychain/index.mjs +4 -4
  35. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  36. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  37. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  38. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  39. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  40. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  41. package/system/dist/builtins/loki-logging/index.js +1 -1
  42. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  43. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  44. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  45. package/system/dist/builtins/platform-probe/index.js +1 -1
  46. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  47. package/system/dist/builtins/record-entries/index.js +1 -1
  48. package/system/dist/builtins/record-entries/index.mjs +1 -1
  49. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  50. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  51. package/system/dist/builtins/snapshot/index.js +1 -1
  52. package/system/dist/builtins/snapshot/index.mjs +1 -1
  53. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  54. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  55. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  56. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  57. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  58. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  59. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  60. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  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-3jGJgvox.js → capture-engine-C6IjgNU4.js} +1 -1
  66. package/system/dist/{capture-engine-jugDy5BG.mjs → capture-engine-CE9QyWYX.mjs} +1 -1
  67. package/system/dist/{composition-sources-LuK-xWUU.mjs → composition-sources-CsPiXLpf.mjs} +1 -1
  68. package/system/dist/{composition-sources-Dr0YIlWN.js → composition-sources-YIJB6QG7.js} +1 -1
  69. package/system/dist/{constants-BIYUk5fi.mjs → constants-D1n14R3Y.mjs} +1 -1
  70. package/system/dist/{constants-CPmCqjv8.js → constants-D6sXdBUu.js} +1 -1
  71. package/system/dist/{device-ca-BqS0gsPe.js → device-ca-BTbsR2J2.js} +1 -1
  72. package/system/dist/{device-ca-D_ytnQmS.mjs → device-ca-DahOgcXb.mjs} +1 -1
  73. package/system/dist/{dist-B4rY3X9J.mjs → dist-DxW5ebV-.mjs} +1 -1
  74. package/system/dist/{dist-DPjg9Hh3.js → dist-_gUzcZPn.js} +6 -0
  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-BZQN0Gcw.js → hub-identity-CDhT1yT0.js} +1 -1
  78. package/system/dist/{hub-identity-CSAQVJ4m.mjs → hub-identity-DpzA5fuQ.mjs} +1 -1
  79. package/system/dist/{hub-mdns-ciao-D-JLpnKV.js → hub-mdns-ciao-BWDuSepO.js} +2 -2
  80. package/system/dist/{hub-mdns-ciao-C3_ne7jS.mjs → hub-mdns-ciao-C6nswov4.mjs} +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-DJdcdcxz.mjs → legacy-integration-rows-door-lCNawQ-w.mjs} +1 -1
  84. package/system/dist/{legacy-integration-rows-door-CX3Mts79.js → legacy-integration-rows-door-vKSv01GH.js} +1 -1
  85. package/system/dist/{rename-composition-block-rKP1rFcJ.mjs → rename-composition-block-ONfuFbfd.mjs} +1 -1
  86. package/system/dist/{rename-composition-block-BgpakWEs.js → rename-composition-block-ozGMTnI_.js} +1 -1
  87. package/system/dist/{restore-archive-C0AzyMjl.js → restore-archive-CUVoxsCu.js} +1 -1
  88. package/system/dist/{restore-archive-Bm2osxR8.mjs → restore-archive-DWTsdq1K.mjs} +1 -1
  89. package/system/dist/{wal-maintenance-D-bBx5IB.mjs → wal-maintenance-B6pvtESa.mjs} +0 -0
  90. package/system/dist/{wal-maintenance-DeKZHUmZ.js → wal-maintenance-Cgpar8TL.js} +0 -0
  91. package/system/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.2.909] - 2026-11-19
11
+
12
+ ### Changed
13
+
14
+ - Rebuilt against updated dependencies.
15
+
16
+ ## [1.2.908] - 2026-11-19
17
+
18
+ ### Changed
19
+
20
+ - A block on a device whose provider has not registered yet after a hub restart now waits and starts on its own instead of staying failed
21
+ - A composed device has one name, the device's: the block list and editor show it, a rename from either side writes it, and a drifted block is realigned at boot
22
+
10
23
  ## [1.2.907] - 2026-11-19
11
24
 
12
25
  ### Changed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/server",
3
- "version": "1.2.907",
3
+ "version": "1.2.909",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -66,13 +66,9 @@
66
66
  ],
67
67
  "requires": {
68
68
  "addons": {
69
- "@camstack/addon-admin-ui": ">=1.2.705",
70
- "@camstack/addon-pipeline": ">=1.2.669",
71
- "@camstack/addon-provider-enpal": ">=0.1.27",
72
- "@camstack/addon-provider-gree": ">=0.2.164",
73
- "@camstack/addon-provider-rademacher": ">=0.2.168",
74
- "@camstack/addon-provider-unifi": ">=0.2.173",
75
- "@camstack/addon-provider-unraid": ">=0.2.175"
69
+ "@camstack/addon-admin-ui": ">=1.2.707",
70
+ "@camstack/addon-agent-ui": ">=1.2.414",
71
+ "@camstack/addon-provider-reolink": ">=1.2.247"
76
72
  },
77
73
  "wrapper": {
78
74
  "desktop": ">=0.0.1",
@@ -81,8 +77,8 @@
81
77
  }
82
78
  },
83
79
  "dependencies": {
84
- "@camstack/addon-admin-ui": "1.2.705",
85
- "@camstack/addon-agent-ui": "1.2.413",
80
+ "@camstack/addon-admin-ui": "1.2.707",
81
+ "@camstack/addon-agent-ui": "1.2.414",
86
82
  "@camstack/addon-auth": "1.2.182",
87
83
  "@camstack/addon-benchmark": "1.2.313",
88
84
  "@camstack/addon-decoder-nodeav": "1.2.149",
@@ -93,7 +89,7 @@
93
89
  "@camstack/develop": "0.1.54",
94
90
  "@camstack/sdk": "1.2.159",
95
91
  "@camstack/types": "1.2.600",
96
- "@camstack/ui-library": "1.2.474",
92
+ "@camstack/ui-library": "1.2.475",
97
93
  "@fastify/compress": "^9.0.0",
98
94
  "@fastify/cookie": "^11.0.2",
99
95
  "@fastify/cors": "^11.2.0",
@@ -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-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.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 { Eu as errMsg, Ou as EventCategory, Rn as addonPagesCapability, Sc as BaseAddon } from "../../dist-B4rY3X9J.mjs";
1
+ import { Cc as BaseAddon, Du as errMsg, Rn as addonPagesCapability, ku as EventCategory } from "../../dist-DxW5ebV-.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-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.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 { Bn as addonWidgetsCapability, Eu as errMsg, Ou as EventCategory, Sc as BaseAddon } from "../../dist-B4rY3X9J.mjs";
1
+ import { Bn as addonWidgetsCapability, Cc as BaseAddon, Du as errMsg, ku as EventCategory } from "../../dist-DxW5ebV-.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-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
8
  const require_log_redactor = require("../../log-redactor-BhIEMaG9.js");
9
9
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { E as CORE_BLOCK_ADDON_PREFIX, Eu as errMsg, Hn as alertEpisodePayload, Ou as EventCategory, Ri as isAlertEpisodeOpen, Sc as BaseAddon, Un as alertsCapability, Vn as alertEpisodeId, p as AlertSchema, wl as defineRecordKinds, yl as createEvent, zi as isAlertEpisodeSeverity } from "../../dist-B4rY3X9J.mjs";
1
+ import { Bi as isAlertEpisodeSeverity, Cc as BaseAddon, Du as errMsg, E as CORE_BLOCK_ADDON_PREFIX, Hn as alertEpisodePayload, Tl as defineRecordKinds, Un as alertsCapability, Vn as alertEpisodeId, bl as createEvent, ku as EventCategory, p as AlertSchema, zi as isAlertEpisodeOpen } from "../../dist-DxW5ebV-.mjs";
2
2
  import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
3
3
  import { a as redactLogText } from "../../log-redactor-XLDrPzOi.mjs";
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
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.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 { Eu as errMsg, Ou as EventCategory, Sc as BaseAddon, Yn as bareAddonId, ht as FIRST_LEVEL_MACRO_CLASSES, ro as ptzAutotrackCapability, zl as isEvent } from "../../dist-B4rY3X9J.mjs";
1
+ import { Bl as isEvent, Cc as BaseAddon, Du as errMsg, Yn as bareAddonId, ht as FIRST_LEVEL_MACRO_CLASSES, io as ptzAutotrackCapability, ku as EventCategory } from "../../dist-DxW5ebV-.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-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.js");
7
7
  const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
8
- const require_restore_archive = require("../../restore-archive-C0AzyMjl.js");
8
+ const require_restore_archive = require("../../restore-archive-CUVoxsCu.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 { Jn as backupCapability, Ou as EventCategory, Sc as BaseAddon, Zl as nodePin, _a as mayWriteToLocation, hu as toNodeId, os as storageOccupancyCapability } from "../../dist-B4rY3X9J.mjs";
1
+ import { Cc as BaseAddon, Jn as backupCapability, Ql as nodePin, gu as toNodeId, ku as EventCategory, ss as storageOccupancyCapability, va as mayWriteToLocation } from "../../dist-DxW5ebV-.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-Bm2osxR8.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-DWTsdq1K.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-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.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 { O as CalendarPreferencesSchema, Sc as BaseAddon, ir as calendarsCapability, wl as defineRecordKinds } from "../../dist-B4rY3X9J.mjs";
1
+ import { Cc as BaseAddon, O as CalendarPreferencesSchema, Tl as defineRecordKinds, ir as calendarsCapability } from "../../dist-DxW5ebV-.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-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.js");
7
7
  let zod = require("zod");
8
8
  let _camstack_types_node = require("@camstack/types/node");
9
9
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { B as DERIVED_CAMERA_SILENCED_CAP_NAMES, Bt as MOTION_CLOSE_AFTER_MS, Cu as DeviceFeature, Et as HostedWithdrawalGate, Eu as errMsg, Fl as hydrateSchema, Go as selectEngineHostedBlocks, Ir as declarationOwnerNodeId, Ks as buildFfmpegArgs, Ls as COMPOSER_ADDON_ID, Oa as motionCapability, Ou as EventCategory, Sc as BaseAddon, Yn as bareAddonId, aa as legacySweepDone, ar as cameraGridLayoutCapability, ba as memoizePinnedFfmpeg, cs as streamCatalogCapability, es as snapshotCapability, ki as hostEngineDevice, us as sweepLegacyEngineRows, v as BaseDevice, yl as createEvent, yr as compileHelper } from "../../dist-B4rY3X9J.mjs";
1
+ import { Ai as hostEngineDevice, B as DERIVED_CAMERA_SILENCED_CAP_NAMES, Bt as MOTION_CLOSE_AFTER_MS, Cc as BaseAddon, Du as errMsg, Et as HostedWithdrawalGate, Il as hydrateSchema, Ko as selectEngineHostedBlocks, Lr as declarationOwnerNodeId, Rs as COMPOSER_ADDON_ID, Yn as bareAddonId, ar as cameraGridLayoutCapability, bl as createEvent, br as compileHelper, ds as sweepLegacyEngineRows, ka as motionCapability, ku as EventCategory, ls as streamCatalogCapability, oa as legacySweepDone, qs as buildFfmpegArgs, ts as snapshotCapability, v as BaseDevice, wu as DeviceFeature, xa as memoizePinnedFfmpeg } from "../../dist-DxW5ebV-.mjs";
2
2
  import { z } from "zod";
3
3
  import { FfmpegProcess } from "@camstack/types/node";
4
4
  import { promises } from "node:fs";
@@ -10,8 +10,10 @@
10
10
  * per plan change, and planned against that description. A settled plan is
11
11
  * kept until the OPERATOR acts (edit, restart): a bindings change alone never
12
12
  * re-plans (Task 10 rule 2, D659). While the claims index is unseeded or the
13
- * target is unresolved or undescribed, the block WAITS by name and claims
14
- * nothing (D49). A target gone on two agreeing index reads is `gone`.
13
+ * target is unresolved or undescribed, or does not bind yet a cap the
14
+ * composition needs the provider to serve, the block WAITS by name and claims
15
+ * nothing (D49) — and re-reads the registry on every apply while it waits.
16
+ * A target gone on two agreeing index reads is `gone`.
15
17
  * - An unreadable row names no target: whatever it holds is held (D49).
16
18
  */
17
19
  import { type CapabilityLookup, type ComposerBlock, type ComposerUnreadableBlock, type CompositionExistingTarget, type CompositionEventPlan, type CompositionFeaturePlan, type CompositionFieldPlan, type CompositionNewTarget, type CompositionSourceRef, type DeviceDeclaration, type DeviceType, type IScopedLogger, type LogTags } from "@camstack/types";
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  require("../../chunk-Cek0wNdY.js");
6
- const require_dist = require("../../dist-DPjg9Hh3.js");
7
- const require_capture_engine = require("../../capture-engine-3jGJgvox.js");
8
- const require_composition_sources = require("../../composition-sources-Dr0YIlWN.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.js");
7
+ const require_capture_engine = require("../../capture-engine-C6IjgNU4.js");
8
+ const require_composition_sources = require("../../composition-sources-YIJB6QG7.js");
9
9
  const require_retention = require("../../retention-BcOSL6b9.js");
10
- const require_rename_composition_block = require("../../rename-composition-block-BgpakWEs.js");
10
+ const require_rename_composition_block = require("../../rename-composition-block-ozGMTnI_.js");
11
11
  let zod = require("zod");
12
12
  //#region src/builtins/composer/actuator-invoke.ts
13
13
  /**
@@ -1799,8 +1799,10 @@ var WithdrawalGate = class {
1799
1799
  * per plan change, and planned against that description. A settled plan is
1800
1800
  * kept until the OPERATOR acts (edit, restart): a bindings change alone never
1801
1801
  * re-plans (Task 10 rule 2, D659). While the claims index is unseeded or the
1802
- * target is unresolved or undescribed, the block WAITS by name and claims
1803
- * nothing (D49). A target gone on two agreeing index reads is `gone`.
1802
+ * target is unresolved or undescribed, or does not bind yet a cap the
1803
+ * composition needs the provider to serve, the block WAITS by name and claims
1804
+ * nothing (D49) — and re-reads the registry on every apply while it waits.
1805
+ * A target gone on two agreeing index reads is `gone`.
1804
1806
  * - An unreadable row names no target: whatever it holds is held (D49).
1805
1807
  */
1806
1808
  /** The shape of a placeholder: no caps, so no plan to take a shape from. */
@@ -1911,9 +1913,11 @@ async function planExisting(input) {
1911
1913
  gone: `${resolution.reason} — two index reads agreed`
1912
1914
  }
1913
1915
  };
1914
- const description = await input.targets.describe(ref, resolution.deviceId, resolution.type, operatorAction);
1916
+ const description = await input.targets.describe(ref, resolution.deviceId, resolution.type, operatorAction || prior?.kind === "existing" && prior.waiting !== null);
1915
1917
  if (description === null) return waitingPlan(block, ref, resolution.deviceId, `the target device \`${key}\` could not be described (its bindings did not read) — nothing is claimed until it is; retried on the next apply`);
1916
1918
  const plan = require_dist.planComposition(block.composition, input.lookupCap, description);
1919
+ const pending = unboundNativeCaps(block.composition, input.lookupCap, description, plan);
1920
+ if (pending.length > 0) return waitingPlan(block, ref, resolution.deviceId, `the target device \`${key}\` has not bound ${pending.map((cap) => `\`${cap}\``).join(", ")} yet — its provider has not registered it; re-evaluated when its bindings change`);
1917
1921
  return {
1918
1922
  ...NO_PLAN,
1919
1923
  block,
@@ -1927,6 +1931,28 @@ async function planExisting(input) {
1927
1931
  }
1928
1932
  };
1929
1933
  }
1934
+ /** Stands in for a provider that has not registered yet, when asking "would this plan if it had". */
1935
+ var PRESUMED_NATIVE_OWNER = "pending-provider";
1936
+ /**
1937
+ * The commanded caps a plan is refused for only because the target does not
1938
+ * bind them yet. A composer never builds a cap with methods on an existing
1939
+ * device, so the native is the one thing that can make it plan: when the plan
1940
+ * is clean once those caps are presumed native, the block WAITS for them (a
1941
+ * hub restart registers the bindings after the blocks first validate), and
1942
+ * any other problem keeps it failed.
1943
+ */
1944
+ function unboundNativeCaps(composition, lookupCap, description, plan) {
1945
+ if (plan.problems.length === 0) return [];
1946
+ const unbound = [...new Set(composition.features.flatMap((feature) => {
1947
+ const def = lookupCap(feature.cap);
1948
+ return require_dist.compositionFeatureEnabled(feature) && def !== null && require_dist.commandedMethods(def).length > 0 && !description.nativeCaps.has(feature.cap) ? [feature.cap] : [];
1949
+ }))];
1950
+ if (unbound.length === 0) return [];
1951
+ return require_dist.planComposition(composition, lookupCap, {
1952
+ ...description,
1953
+ nativeCaps: new Map([...description.nativeCaps, ...unbound.map((cap) => [cap, PRESUMED_NATIVE_OWNER])])
1954
+ }).problems.length === 0 ? unbound : [];
1955
+ }
1930
1956
  function waitingPlan(block, ref, deviceId, waiting) {
1931
1957
  return {
1932
1958
  ...NO_PLAN,
@@ -4445,6 +4471,8 @@ var Composer = class {
4445
4471
  claimSeed;
4446
4472
  /** Applies never interleave: each one reads and replaces the whole live set. */
4447
4473
  applyChain = Promise.resolve();
4474
+ /** The newest set the supervisor sent: what a binding event re-applies for a waiting block. */
4475
+ lastInput = null;
4448
4476
  /**
4449
4477
  * Block names an editor rename still owes the device row. In memory only:
4450
4478
  * a restart has no entry, and the row's name wins (see `composedNameAuthority`).
@@ -4492,7 +4520,28 @@ var Composer = class {
4492
4520
  });
4493
4521
  }
4494
4522
  apply(input) {
4495
- return this.chained(() => this.applyNow(input));
4523
+ return this.chained(() => {
4524
+ this.lastInput = input;
4525
+ return this.applyNow(input);
4526
+ });
4527
+ }
4528
+ /**
4529
+ * The bindings of a device a block WAITS on changed: apply the set the
4530
+ * supervisor last sent once more, so the block plans on the event itself
4531
+ * rather than on the supervisor's next pass. Never operator actions: a
4532
+ * restart or a retirement is the supervisor's, and runs once. A dropped
4533
+ * event is covered by the waiting block re-reading the registry on every
4534
+ * apply (D8, D49) — there is no timer here.
4535
+ */
4536
+ async replanWaitingOn(deviceId) {
4537
+ const last = this.lastInput;
4538
+ if (last === null) return;
4539
+ if (![...this.live.values()].some((entry) => entry.planned.target.kind === "existing" && entry.planned.target.deviceId === deviceId && entry.planned.target.waiting !== null)) return;
4540
+ await this.applyNow({
4541
+ ...last,
4542
+ restartBlockIds: [],
4543
+ retiredBlockIds: []
4544
+ });
4496
4545
  }
4497
4546
  getStates(blockIds) {
4498
4547
  return blockIds.flatMap((blockId) => {
@@ -4526,6 +4575,7 @@ var Composer = class {
4526
4575
  this.grafts.onBindingsChanged(data);
4527
4576
  this.dispatch(await this.deps.tracker.onBindingsChanged(data.deviceId, data.capName, data.reason));
4528
4577
  await this.chained(() => this.actuators?.onMemberBindings(data.deviceId));
4578
+ await this.chained(() => this.replanWaitingOn(data.deviceId));
4529
4579
  await this.syncBoundFeatures([...this.live.keys()].filter((blockId) => this.composed.idOf(require_dist.composedDeviceStableId(blockId)) === data.deviceId));
4530
4580
  }
4531
4581
  /**
@@ -4896,7 +4946,7 @@ var Composer = class {
4896
4946
  return heldFieldsOf(previous.runtime.state().fields, `the composition no longer plans — the field keeps its last value on the device: ${p.problems.join("; ")}`);
4897
4947
  }
4898
4948
  async applyName(device, blockId, name, remembered) {
4899
- if (device.userNamed === true && device.name !== name) {
4949
+ if ((device.userNamed === true || remembered === null) && device.name !== name) {
4900
4950
  if (composedNameAuthority(device.name, name, remembered) === "device") {
4901
4951
  this.nameOwed.delete(blockId);
4902
4952
  this.deps.logger.info("composed device keeps the name the operator gave it", {
@@ -1,8 +1,8 @@
1
- import { $s as compositionFeatureEnabled, Ba as parseColorInput, Bs as DEFAULT_HISTORY_RETENTION, C as COMPOSED_ITEM_FIXED_FIELDS, Ca as methodRefusal, Ds as valveCapability, Dt as HvacModeSchema, Du as featuresOfBoundCaps, Ei as groupTemplate, Eu as errMsg, Fo as runFanOut, Ga as planComposition, Gs as MINUTE_MS, Ha as petFountainCapability, Hl as isReadingQuantity, Hs as HISTORY_SLOW_MS, Jo as sharedActuatorFeatures, Lr as declaredSeriesKind, Ls as COMPOSER_ADDON_ID, Ms as withDefaultRunning, Oa as motionCapability, Ou as EventCategory, Qn as buildCapabilityLookup, Qs as composedDeviceStableId, Qt as PetFountainStatusSchema, Sc as BaseAddon, Sr as compositionFieldKey, Ti as groupCommandsCapability, Tr as consumablesCapability, Tu as DeviceType, Ua as petFountainWaterItem, Us as HOUR_MS, Vs as HISTORY_FAST_MS, Xn as brightnessCapability, Xo as sharedColorModes, Xs as cloneStatefulExpressionMemory, Yo as sharedActuatorMethods, Zs as composedDeviceRef, _c as planResetTier, _t as FanDirectionSchema, ac as evaluateDerivative, bc as toExpressionValue, cc as historyRetentionFromSettings, dc as isEngineHostedHelper, ds as switchCapability, ea as kebabToCamel, ec as compositionItemFieldPath, eo as processTimeZoneOr, fc as isForwardInputRef, gc as openStatistic, gi as featureForwards, gr as colorCapability, hc as openReset, i as ACTUATOR_TEMPLATE_IDS, ic as disarmRoseMemory, ii as evaluateCompositionField, j as ConsumableItemSchema, jr as coverCapability, ko as resolveMutate, li as expressionContainsBuiltinCall, mc as nextLocalMidnight, mi as fanOutTargets, nc as compositionSourceKey, oc as evaluateStatistic, pc as isHistoryHelper, pi as fanControlCapability, pr as climateControlCapability, r as ACTUATOR_METHODS, rc as createStatefulExpressionMemory, s as ALL_CAPABILITY_DEFINITIONS, tc as compositionSliceKey, tt as DeclaredDevices, ua as lockControlCapability, uc as integrateReading, v as BaseDevice, va as mediaPlayerCapability, vc as planStatisticTier, xr as composerCapability, xt as GroupCommandResultSchema, ya as mediaPlayerFeaturesOfRoles, yc as statisticCadenceMs, yl as createEvent } from "../../dist-B4rY3X9J.mjs";
2
- import { i as capSeriesKey, m as parseConfirmedStateChanged, p as isRecord$4 } from "../../capture-engine-jugDy5BG.mjs";
3
- import { n as normalizedNativeOwner } from "../../composition-sources-LuK-xWUU.mjs";
1
+ import { $s as composedDeviceStableId, Ao as resolveMutate, C as COMPOSED_ITEM_FIXED_FIELDS, Cc as BaseAddon, Cr as compositionFieldKey, Di as groupTemplate, Dt as HvacModeSchema, Du as errMsg, Ei as groupCommandsCapability, Er as consumablesCapability, Eu as DeviceType, Hs as HISTORY_FAST_MS, Io as runFanOut, Ka as planComposition, Ks as MINUTE_MS, Mr as coverCapability, Ns as withDefaultRunning, Os as valveCapability, Ou as featuresOfBoundCaps, Qn as buildCapabilityLookup, Qs as composedDeviceRef, Qt as PetFountainStatusSchema, Rr as declaredSeriesKind, Rs as COMPOSER_ADDON_ID, Sr as composerCapability, Ua as petFountainCapability, Ul as isReadingQuantity, Us as HISTORY_SLOW_MS, Va as parseColorInput, Vs as DEFAULT_HISTORY_RETENTION, Wa as petFountainWaterItem, Ws as HOUR_MS, Xn as brightnessCapability, Xo as sharedActuatorMethods, Yo as sharedActuatorFeatures, Zo as sharedColorModes, Zs as cloneStatefulExpressionMemory, _c as openStatistic, _i as featureForwards, _t as FanDirectionSchema, ac as disarmRoseMemory, ai as evaluateCompositionField, ba as mediaPlayerFeaturesOfRoles, bc as statisticCadenceMs, bl as createEvent, da as lockControlCapability, dc as integrateReading, ec as compositionFeatureEnabled, fc as isEngineHostedHelper, fs as switchCapability, gc as openReset, gr as colorCapability, hc as nextLocalMidnight, hi as fanOutTargets, i as ACTUATOR_TEMPLATE_IDS, ic as createStatefulExpressionMemory, j as ConsumableItemSchema, ka as motionCapability, ku as EventCategory, lc as historyRetentionFromSettings, mc as isHistoryHelper, mi as fanControlCapability, nc as compositionSliceKey, oc as evaluateDerivative, pc as isForwardInputRef, pr as climateControlCapability, r as ACTUATOR_METHODS, rc as compositionSourceKey, s as ALL_CAPABILITY_DEFINITIONS, sc as evaluateStatistic, ta as kebabToCamel, tc as compositionItemFieldPath, to as processTimeZoneOr, tt as DeclaredDevices, ui as expressionContainsBuiltinCall, v as BaseDevice, vc as planResetTier, vr as commandedMethods, wa as methodRefusal, xc as toExpressionValue, xt as GroupCommandResultSchema, ya as mediaPlayerCapability, yc as planStatisticTier } from "../../dist-DxW5ebV-.mjs";
2
+ import { i as capSeriesKey, m as parseConfirmedStateChanged, p as isRecord$4 } from "../../capture-engine-CE9QyWYX.mjs";
3
+ import { n as normalizedNativeOwner } from "../../composition-sources-CsPiXLpf.mjs";
4
4
  import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-CUOVI1p7.mjs";
5
- import { n as renameCompositionBlock } from "../../rename-composition-block-rKP1rFcJ.mjs";
5
+ import { n as renameCompositionBlock } from "../../rename-composition-block-ONfuFbfd.mjs";
6
6
  import { z } from "zod";
7
7
  //#region src/builtins/composer/actuator-invoke.ts
8
8
  /**
@@ -1794,8 +1794,10 @@ var WithdrawalGate = class {
1794
1794
  * per plan change, and planned against that description. A settled plan is
1795
1795
  * kept until the OPERATOR acts (edit, restart): a bindings change alone never
1796
1796
  * re-plans (Task 10 rule 2, D659). While the claims index is unseeded or the
1797
- * target is unresolved or undescribed, the block WAITS by name and claims
1798
- * nothing (D49). A target gone on two agreeing index reads is `gone`.
1797
+ * target is unresolved or undescribed, or does not bind yet a cap the
1798
+ * composition needs the provider to serve, the block WAITS by name and claims
1799
+ * nothing (D49) — and re-reads the registry on every apply while it waits.
1800
+ * A target gone on two agreeing index reads is `gone`.
1799
1801
  * - An unreadable row names no target: whatever it holds is held (D49).
1800
1802
  */
1801
1803
  /** The shape of a placeholder: no caps, so no plan to take a shape from. */
@@ -1906,9 +1908,11 @@ async function planExisting(input) {
1906
1908
  gone: `${resolution.reason} — two index reads agreed`
1907
1909
  }
1908
1910
  };
1909
- const description = await input.targets.describe(ref, resolution.deviceId, resolution.type, operatorAction);
1911
+ const description = await input.targets.describe(ref, resolution.deviceId, resolution.type, operatorAction || prior?.kind === "existing" && prior.waiting !== null);
1910
1912
  if (description === null) return waitingPlan(block, ref, resolution.deviceId, `the target device \`${key}\` could not be described (its bindings did not read) — nothing is claimed until it is; retried on the next apply`);
1911
1913
  const plan = planComposition(block.composition, input.lookupCap, description);
1914
+ const pending = unboundNativeCaps(block.composition, input.lookupCap, description, plan);
1915
+ if (pending.length > 0) return waitingPlan(block, ref, resolution.deviceId, `the target device \`${key}\` has not bound ${pending.map((cap) => `\`${cap}\``).join(", ")} yet — its provider has not registered it; re-evaluated when its bindings change`);
1912
1916
  return {
1913
1917
  ...NO_PLAN,
1914
1918
  block,
@@ -1922,6 +1926,28 @@ async function planExisting(input) {
1922
1926
  }
1923
1927
  };
1924
1928
  }
1929
+ /** Stands in for a provider that has not registered yet, when asking "would this plan if it had". */
1930
+ var PRESUMED_NATIVE_OWNER = "pending-provider";
1931
+ /**
1932
+ * The commanded caps a plan is refused for only because the target does not
1933
+ * bind them yet. A composer never builds a cap with methods on an existing
1934
+ * device, so the native is the one thing that can make it plan: when the plan
1935
+ * is clean once those caps are presumed native, the block WAITS for them (a
1936
+ * hub restart registers the bindings after the blocks first validate), and
1937
+ * any other problem keeps it failed.
1938
+ */
1939
+ function unboundNativeCaps(composition, lookupCap, description, plan) {
1940
+ if (plan.problems.length === 0) return [];
1941
+ const unbound = [...new Set(composition.features.flatMap((feature) => {
1942
+ const def = lookupCap(feature.cap);
1943
+ return compositionFeatureEnabled(feature) && def !== null && commandedMethods(def).length > 0 && !description.nativeCaps.has(feature.cap) ? [feature.cap] : [];
1944
+ }))];
1945
+ if (unbound.length === 0) return [];
1946
+ return planComposition(composition, lookupCap, {
1947
+ ...description,
1948
+ nativeCaps: new Map([...description.nativeCaps, ...unbound.map((cap) => [cap, PRESUMED_NATIVE_OWNER])])
1949
+ }).problems.length === 0 ? unbound : [];
1950
+ }
1925
1951
  function waitingPlan(block, ref, deviceId, waiting) {
1926
1952
  return {
1927
1953
  ...NO_PLAN,
@@ -4440,6 +4466,8 @@ var Composer = class {
4440
4466
  claimSeed;
4441
4467
  /** Applies never interleave: each one reads and replaces the whole live set. */
4442
4468
  applyChain = Promise.resolve();
4469
+ /** The newest set the supervisor sent: what a binding event re-applies for a waiting block. */
4470
+ lastInput = null;
4443
4471
  /**
4444
4472
  * Block names an editor rename still owes the device row. In memory only:
4445
4473
  * a restart has no entry, and the row's name wins (see `composedNameAuthority`).
@@ -4487,7 +4515,28 @@ var Composer = class {
4487
4515
  });
4488
4516
  }
4489
4517
  apply(input) {
4490
- return this.chained(() => this.applyNow(input));
4518
+ return this.chained(() => {
4519
+ this.lastInput = input;
4520
+ return this.applyNow(input);
4521
+ });
4522
+ }
4523
+ /**
4524
+ * The bindings of a device a block WAITS on changed: apply the set the
4525
+ * supervisor last sent once more, so the block plans on the event itself
4526
+ * rather than on the supervisor's next pass. Never operator actions: a
4527
+ * restart or a retirement is the supervisor's, and runs once. A dropped
4528
+ * event is covered by the waiting block re-reading the registry on every
4529
+ * apply (D8, D49) — there is no timer here.
4530
+ */
4531
+ async replanWaitingOn(deviceId) {
4532
+ const last = this.lastInput;
4533
+ if (last === null) return;
4534
+ if (![...this.live.values()].some((entry) => entry.planned.target.kind === "existing" && entry.planned.target.deviceId === deviceId && entry.planned.target.waiting !== null)) return;
4535
+ await this.applyNow({
4536
+ ...last,
4537
+ restartBlockIds: [],
4538
+ retiredBlockIds: []
4539
+ });
4491
4540
  }
4492
4541
  getStates(blockIds) {
4493
4542
  return blockIds.flatMap((blockId) => {
@@ -4521,6 +4570,7 @@ var Composer = class {
4521
4570
  this.grafts.onBindingsChanged(data);
4522
4571
  this.dispatch(await this.deps.tracker.onBindingsChanged(data.deviceId, data.capName, data.reason));
4523
4572
  await this.chained(() => this.actuators?.onMemberBindings(data.deviceId));
4573
+ await this.chained(() => this.replanWaitingOn(data.deviceId));
4524
4574
  await this.syncBoundFeatures([...this.live.keys()].filter((blockId) => this.composed.idOf(composedDeviceStableId(blockId)) === data.deviceId));
4525
4575
  }
4526
4576
  /**
@@ -4891,7 +4941,7 @@ var Composer = class {
4891
4941
  return heldFieldsOf(previous.runtime.state().fields, `the composition no longer plans — the field keeps its last value on the device: ${p.problems.join("; ")}`);
4892
4942
  }
4893
4943
  async applyName(device, blockId, name, remembered) {
4894
- if (device.userNamed === true && device.name !== name) {
4944
+ if ((device.userNamed === true || remembered === null) && device.name !== name) {
4895
4945
  if (composedNameAuthority(device.name, name, remembered) === "device") {
4896
4946
  this.nameOwed.delete(blockId);
4897
4947
  this.deps.logger.info("composed device keeps the name the operator gave it", {
@@ -170,6 +170,8 @@ export declare class Composer {
170
170
  private readonly claimSeed;
171
171
  /** Applies never interleave: each one reads and replaces the whole live set. */
172
172
  private applyChain;
173
+ /** The newest set the supervisor sent: what a binding event re-applies for a waiting block. */
174
+ private lastInput;
173
175
  /**
174
176
  * Block names an editor rename still owes the device row. In memory only:
175
177
  * a restart has no entry, and the row's name wins (see `composedNameAuthority`).
@@ -183,6 +185,15 @@ export declare class Composer {
183
185
  private unsynced;
184
186
  constructor(deps: ComposerDeps);
185
187
  apply(input: ComposerApplyInput): Promise<ComposerApplyResult>;
188
+ /**
189
+ * The bindings of a device a block WAITS on changed: apply the set the
190
+ * supervisor last sent once more, so the block plans on the event itself
191
+ * rather than on the supervisor's next pass. Never operator actions: a
192
+ * restart or a retirement is the supervisor's, and runs once. A dropped
193
+ * event is covered by the waiting block re-reading the registry on every
194
+ * apply (D8, D49) — there is no timer here.
195
+ */
196
+ private replanWaitingOn;
186
197
  getStates(blockIds: readonly string[]): readonly CompositionBlockState[];
187
198
  /** Runs on the tracker's one chain (R3): resolves once the change reached every runtime. */
188
199
  onStateChanged(data: DeviceStateChangedData): Promise<void>;
@@ -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-DPjg9Hh3.js");
6
+ const require_dist = require("../../dist-_gUzcZPn.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 { Sc as BaseAddon, fa as logDestinationCapability } from "../../dist-B4rY3X9J.mjs";
1
+ import { Cc as BaseAddon, pa as logDestinationCapability } from "../../dist-DxW5ebV-.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 = {
@@ -76,6 +76,12 @@ export interface CompositionApiDeps {
76
76
  * still lands, and the composer retries the device write on its next apply.
77
77
  */
78
78
  readonly writeComposedDeviceName?: (blockId: string, name: string) => Promise<void>;
79
+ /**
80
+ * The device manager owns a composed device's name (D1057); the block's stored
81
+ * name is a mirror. Reads show the row's name, by block id. A read that fails
82
+ * shows the mirror. Absent in tests that predate it.
83
+ */
84
+ readonly readComposedDeviceNames?: () => Promise<ReadonlyMap<string, string>>;
79
85
  /** Every capability definition — the listing is derived from them, never from the registry's live state. */
80
86
  readonly capabilityDefinitions: readonly CapabilityDefinition[];
81
87
  /**