@camstack/server 1.2.907 → 1.2.908
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.
- package/CHANGELOG.md +7 -0
- package/package.json +9 -9
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer-plan.d.ts +4 -2
- package/system/dist/builtins/composer/composer.addon.js +59 -9
- package/system/dist/builtins/composer/composer.addon.mjs +59 -9
- package/system/dist/builtins/composer/composer.d.ts +11 -0
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/composition-api.d.ts +6 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +46 -8
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +46 -8
- package/system/dist/builtins/core-blocks/sync-composed-device-name.d.ts +2 -7
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-3jGJgvox.js → capture-engine-C6IjgNU4.js} +1 -1
- package/system/dist/{capture-engine-jugDy5BG.mjs → capture-engine-CE9QyWYX.mjs} +1 -1
- package/system/dist/{composition-sources-LuK-xWUU.mjs → composition-sources-CsPiXLpf.mjs} +1 -1
- package/system/dist/{composition-sources-Dr0YIlWN.js → composition-sources-YIJB6QG7.js} +1 -1
- package/system/dist/{constants-BIYUk5fi.mjs → constants-D1n14R3Y.mjs} +1 -1
- package/system/dist/{constants-CPmCqjv8.js → constants-D6sXdBUu.js} +1 -1
- package/system/dist/{device-ca-BqS0gsPe.js → device-ca-BTbsR2J2.js} +1 -1
- package/system/dist/{device-ca-D_ytnQmS.mjs → device-ca-DahOgcXb.mjs} +1 -1
- package/system/dist/{dist-B4rY3X9J.mjs → dist-DxW5ebV-.mjs} +1 -1
- package/system/dist/{dist-DPjg9Hh3.js → dist-_gUzcZPn.js} +6 -0
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-BZQN0Gcw.js → hub-identity-CDhT1yT0.js} +1 -1
- package/system/dist/{hub-identity-CSAQVJ4m.mjs → hub-identity-DpzA5fuQ.mjs} +1 -1
- package/system/dist/{hub-mdns-ciao-D-JLpnKV.js → hub-mdns-ciao-BWDuSepO.js} +2 -2
- package/system/dist/{hub-mdns-ciao-C3_ne7jS.mjs → hub-mdns-ciao-C6nswov4.mjs} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-DJdcdcxz.mjs → legacy-integration-rows-door-lCNawQ-w.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-CX3Mts79.js → legacy-integration-rows-door-vKSv01GH.js} +1 -1
- package/system/dist/{rename-composition-block-rKP1rFcJ.mjs → rename-composition-block-ONfuFbfd.mjs} +1 -1
- package/system/dist/{rename-composition-block-BgpakWEs.js → rename-composition-block-ozGMTnI_.js} +1 -1
- package/system/dist/{restore-archive-Bm2osxR8.mjs → restore-archive-CPjH6E6T.mjs} +82 -82
- package/system/dist/{restore-archive-C0AzyMjl.js → restore-archive-CUVoxsCu.js} +1 -1
- package/system/dist/{wal-maintenance-D-bBx5IB.mjs → wal-maintenance-B6pvtESa.mjs} +0 -0
- package/system/dist/{wal-maintenance-DeKZHUmZ.js → wal-maintenance-Cgpar8TL.js} +0 -0
- package/system/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.908] - 2026-11-19
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- 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
|
|
15
|
+
- 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
|
|
16
|
+
|
|
10
17
|
## [1.2.907] - 2026-11-19
|
|
11
18
|
|
|
12
19
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.908",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,13 +66,13 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-
|
|
71
|
-
"@camstack/addon-provider-
|
|
72
|
-
"@camstack/addon-provider-
|
|
73
|
-
"@camstack/addon-provider-
|
|
74
|
-
"@camstack/addon-provider-
|
|
75
|
-
"@camstack/addon-provider-
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.706",
|
|
70
|
+
"@camstack/addon-provider-bosch": ">=0.1.60",
|
|
71
|
+
"@camstack/addon-provider-dreame": ">=0.2.181",
|
|
72
|
+
"@camstack/addon-provider-homeassistant": ">=1.2.695",
|
|
73
|
+
"@camstack/addon-provider-homematic": ">=1.2.208",
|
|
74
|
+
"@camstack/addon-provider-reolink": ">=1.2.246",
|
|
75
|
+
"@camstack/addon-provider-vesync": ">=0.2.170"
|
|
76
76
|
},
|
|
77
77
|
"wrapper": {
|
|
78
78
|
"desktop": ">=0.0.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
84
|
+
"@camstack/addon-admin-ui": "1.2.706",
|
|
85
85
|
"@camstack/addon-agent-ui": "1.2.413",
|
|
86
86
|
"@camstack/addon-auth": "1.2.182",
|
|
87
87
|
"@camstack/addon-benchmark": "1.2.313",
|
|
@@ -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-
|
|
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 {
|
|
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-
|
|
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,
|
|
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-
|
|
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 {
|
|
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-
|
|
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 {
|
|
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-
|
|
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-
|
|
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 {
|
|
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-
|
|
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-CPjH6E6T.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-
|
|
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 {
|
|
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-
|
|
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,
|
|
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,
|
|
14
|
-
*
|
|
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-
|
|
7
|
-
const require_capture_engine = require("../../capture-engine-
|
|
8
|
-
const require_composition_sources = require("../../composition-sources-
|
|
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-
|
|
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,
|
|
1803
|
-
*
|
|
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(() =>
|
|
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
|
|
2
|
-
import { i as capSeriesKey, m as parseConfirmedStateChanged, p as isRecord$4 } from "../../capture-engine-
|
|
3
|
-
import { n as normalizedNativeOwner } from "../../composition-sources-
|
|
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-
|
|
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,
|
|
1798
|
-
*
|
|
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(() =>
|
|
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-
|
|
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 {
|
|
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
|
/**
|