@camstack/server 1.2.723 → 1.2.725
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 +12 -0
- package/package.json +7 -14
- package/system/dist/addon-runner.js +69 -57
- package/system/dist/addon-runner.mjs +69 -57
- package/system/dist/{agent-https-DslXCDRW.js → agent-https-CzkxjkB5.js} +1 -1
- package/system/dist/{agent-https-BMbnmX5u.mjs → agent-https-DuZMpe3P.mjs} +1 -1
- 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.addon.js +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- 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/core-blocks.addon.js +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/core-blocks/power-source-service.d.ts +1 -1
- 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 +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- 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 +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- 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 +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- 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 +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- 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/{composition-sources-C14epb_m.js → composition-sources-B5uJfQqd.js} +1 -1
- package/system/dist/{composition-sources-EXNuxmGQ.mjs → composition-sources-DKx0-ndC.mjs} +1 -1
- package/system/dist/{constants-DIGWBiNC.mjs → constants-HoyXps3n.mjs} +1 -1
- package/system/dist/{constants-M7NtSiRo.js → constants-n9Ip2uKi.js} +1 -1
- package/system/dist/{device-ca-DZlvNBWU.mjs → device-ca-BiQeJXfU.mjs} +1 -1
- package/system/dist/{device-ca-3vmBP1i0.js → device-ca-Cw3JZPXq.js} +1 -1
- package/system/dist/{dist-DcMqHB_N.mjs → dist-D35rKdpn.mjs} +220 -176
- package/system/dist/{dist-M9yHiIY7.js → dist-DngPUHs2.js} +220 -176
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-Czz2ssit.mjs → hub-mdns-ciao-C4upkgCX.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-CpCKuQnK.js → hub-mdns-ciao-CChO-G09.js} +2 -2
- package/system/dist/index.js +76 -64
- package/system/dist/index.mjs +76 -64
- package/system/dist/{restore-archive-B-SaKSVW.mjs → restore-archive-Dr_FY9P0.mjs} +82 -82
- package/system/dist/{restore-archive-Cy7jGqiD.js → restore-archive-Lb1DCZll.js} +1 -1
- package/system/dist/{retention-Dqm_EiVq.mjs → retention-CwKSqRi5.mjs} +1 -1
- package/system/dist/{retention-Ufa2fci-.js → retention-IAzprg-c.js} +1 -1
- package/system/dist/{wal-maintenance-Bnb2QzYG.mjs → wal-maintenance-D49HVxcB.mjs} +0 -0
- package/system/dist/{wal-maintenance-BmugbgS7.js → wal-maintenance-DMP7fhqn.js} +0 -0
- 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.725] - 2026-11-01
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Rebuilt against updated dependencies.
|
|
15
|
+
|
|
16
|
+
## [1.2.724] - 2026-11-01
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Pin werift to 0.22.9 in the server closure so a newer peer range cannot hoist a version the shipped patch does not apply to (fixes refused server updates)
|
|
21
|
+
|
|
10
22
|
## [1.2.723] - 2026-11-01
|
|
11
23
|
|
|
12
24
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.725",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,16 +66,8 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-
|
|
71
|
-
"@camstack/addon-benchmark": ">=1.2.306",
|
|
72
|
-
"@camstack/addon-import-alexa": ">=0.2.175",
|
|
73
|
-
"@camstack/addon-model-studio": ">=1.1.337",
|
|
74
|
-
"@camstack/addon-osd-manager": ">=0.1.310",
|
|
75
|
-
"@camstack/addon-post-analysis": ">=1.2.658",
|
|
76
|
-
"@camstack/addon-provider-homematic": ">=1.2.176",
|
|
77
|
-
"@camstack/addon-provider-velux": ">=0.2.154",
|
|
78
|
-
"@camstack/addon-training": ">=0.1.123"
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.545",
|
|
70
|
+
"@camstack/addon-provider-mqtt-ha": ">=0.1.33"
|
|
79
71
|
},
|
|
80
72
|
"wrapper": {
|
|
81
73
|
"desktop": ">=0.0.1",
|
|
@@ -84,7 +76,7 @@
|
|
|
84
76
|
}
|
|
85
77
|
},
|
|
86
78
|
"dependencies": {
|
|
87
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
79
|
+
"@camstack/addon-admin-ui": "1.2.545",
|
|
88
80
|
"@camstack/addon-agent-ui": "1.2.308",
|
|
89
81
|
"@camstack/addon-auth": "1.2.175",
|
|
90
82
|
"@camstack/addon-benchmark": "1.2.306",
|
|
@@ -95,7 +87,7 @@
|
|
|
95
87
|
"@camstack/addon-post-analysis": "1.2.658",
|
|
96
88
|
"@camstack/develop": "0.1.43",
|
|
97
89
|
"@camstack/sdk": "1.2.155",
|
|
98
|
-
"@camstack/types": "1.2.
|
|
90
|
+
"@camstack/types": "1.2.465",
|
|
99
91
|
"@camstack/ui-library": "1.2.366",
|
|
100
92
|
"@fastify/compress": "^9.0.0",
|
|
101
93
|
"@fastify/cookie": "^11.0.2",
|
|
@@ -113,7 +105,7 @@
|
|
|
113
105
|
"js-yaml": "^4",
|
|
114
106
|
"jsonwebtoken": "^9.0.0",
|
|
115
107
|
"moleculer": "0.15.0",
|
|
116
|
-
"node-av": "
|
|
108
|
+
"node-av": "~6.1.0",
|
|
117
109
|
"node-pty": "^1.0.0",
|
|
118
110
|
"otplib": "13.4.1",
|
|
119
111
|
"sharp": "^0.35.2",
|
|
@@ -123,6 +115,7 @@
|
|
|
123
115
|
"systeminformation": "^5.0.0",
|
|
124
116
|
"tar": "7.5.16",
|
|
125
117
|
"undici": "^7.28.0",
|
|
118
|
+
"werift": "0.22.9",
|
|
126
119
|
"winston": "^3.19.0",
|
|
127
120
|
"winston-daily-rotate-file": "^5.0.0",
|
|
128
121
|
"ws": "^8.20.0",
|
|
@@ -6203,6 +6203,62 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6203
6203
|
probeRetryTimers.delete(deviceId);
|
|
6204
6204
|
}
|
|
6205
6205
|
};
|
|
6206
|
+
/**
|
|
6207
|
+
* The in-memory half of a teardown, children first. `runLifecycle` is false
|
|
6208
|
+
* when the hub already ran each device's `removeDevice()` through its
|
|
6209
|
+
* `device-ops` provider (the cascading remove): only the local registry,
|
|
6210
|
+
* native caps and rebuild factories are left to drop, never a second
|
|
6211
|
+
* lifecycle call.
|
|
6212
|
+
*/
|
|
6213
|
+
const teardownLocal = async (deviceId, runLifecycle) => {
|
|
6214
|
+
const device = registry.getById(deviceId);
|
|
6215
|
+
cancelProbeRetry(deviceId);
|
|
6216
|
+
if (!device) return;
|
|
6217
|
+
const children = registry.getChildren(deviceId);
|
|
6218
|
+
for (const child of children) await teardownLocal(child.id, runLifecycle);
|
|
6219
|
+
const capsToUnregister = opts.capabilityRegistry ? [...opts.capabilityRegistry.getNativeCapsForDevice(deviceId)] : [...getWorkerNativeCapsForDevice(deviceId)];
|
|
6220
|
+
opts.capabilityRegistry?.unregisterAllNativeForDevice(deviceId);
|
|
6221
|
+
if (!opts.capabilityRegistry) clearWorkerNativeCapsForDevice(deviceId);
|
|
6222
|
+
for (const capName of capsToUnregister) {
|
|
6223
|
+
eventBus.emit({
|
|
6224
|
+
id: (0, node_crypto.randomUUID)(),
|
|
6225
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
6226
|
+
source: {
|
|
6227
|
+
type: "device",
|
|
6228
|
+
id: deviceId
|
|
6229
|
+
},
|
|
6230
|
+
category: _camstack_types_addon.EventCategory.DeviceBindingsChanged,
|
|
6231
|
+
data: {
|
|
6232
|
+
deviceId,
|
|
6233
|
+
capName,
|
|
6234
|
+
reason: "native-unregistered",
|
|
6235
|
+
addonId,
|
|
6236
|
+
nodeId
|
|
6237
|
+
}
|
|
6238
|
+
});
|
|
6239
|
+
(0, _camstack_types_addon.emitReadiness)(eventBus, {
|
|
6240
|
+
capName,
|
|
6241
|
+
scope: {
|
|
6242
|
+
type: "device",
|
|
6243
|
+
deviceId
|
|
6244
|
+
},
|
|
6245
|
+
state: "down",
|
|
6246
|
+
generation: nativeCapReadinessGeneration,
|
|
6247
|
+
sourceNodeId: nodeId
|
|
6248
|
+
});
|
|
6249
|
+
}
|
|
6250
|
+
if (runLifecycle) await device.removeDevice().catch((err) => {
|
|
6251
|
+
opts.logger.warn("removeDevice() lifecycle threw during decommission", {
|
|
6252
|
+
tags: {
|
|
6253
|
+
deviceId,
|
|
6254
|
+
addonId
|
|
6255
|
+
},
|
|
6256
|
+
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
6257
|
+
});
|
|
6258
|
+
});
|
|
6259
|
+
if (!runLifecycle) deviceRebuildFactories.delete(deviceId);
|
|
6260
|
+
registry.remove(deviceId);
|
|
6261
|
+
};
|
|
6206
6262
|
const deviceApi = {
|
|
6207
6263
|
allocateDeviceId: async (stableId) => {
|
|
6208
6264
|
return (await callDeviceManager(api, "allocateDeviceId", {
|
|
@@ -6644,58 +6700,11 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6644
6700
|
/**
|
|
6645
6701
|
* In-memory teardown — fires `removeDevice()` lifecycle, drops
|
|
6646
6702
|
* native caps, removes from registry. Cascades through children.
|
|
6647
|
-
* Does NOT touch persisted state. Used
|
|
6648
|
-
*
|
|
6703
|
+
* Does NOT touch persisted state. Used by `remove()` (after the hub
|
|
6704
|
+
* cascade) and by addon shutdown
|
|
6649
6705
|
* paths that want the next boot to rehydrate the same devices.
|
|
6650
6706
|
*/
|
|
6651
|
-
decommission:
|
|
6652
|
-
const device = registry.getById(deviceId);
|
|
6653
|
-
cancelProbeRetry(deviceId);
|
|
6654
|
-
if (!device) return;
|
|
6655
|
-
const children = registry.getChildren(deviceId);
|
|
6656
|
-
for (const child of children) await deviceApi.decommission(child.id);
|
|
6657
|
-
const capsToUnregister = opts.capabilityRegistry ? [...opts.capabilityRegistry.getNativeCapsForDevice(deviceId)] : [...getWorkerNativeCapsForDevice(deviceId)];
|
|
6658
|
-
opts.capabilityRegistry?.unregisterAllNativeForDevice(deviceId);
|
|
6659
|
-
if (!opts.capabilityRegistry) clearWorkerNativeCapsForDevice(deviceId);
|
|
6660
|
-
for (const capName of capsToUnregister) {
|
|
6661
|
-
eventBus.emit({
|
|
6662
|
-
id: (0, node_crypto.randomUUID)(),
|
|
6663
|
-
timestamp: /* @__PURE__ */ new Date(),
|
|
6664
|
-
source: {
|
|
6665
|
-
type: "device",
|
|
6666
|
-
id: deviceId
|
|
6667
|
-
},
|
|
6668
|
-
category: _camstack_types_addon.EventCategory.DeviceBindingsChanged,
|
|
6669
|
-
data: {
|
|
6670
|
-
deviceId,
|
|
6671
|
-
capName,
|
|
6672
|
-
reason: "native-unregistered",
|
|
6673
|
-
addonId,
|
|
6674
|
-
nodeId
|
|
6675
|
-
}
|
|
6676
|
-
});
|
|
6677
|
-
(0, _camstack_types_addon.emitReadiness)(eventBus, {
|
|
6678
|
-
capName,
|
|
6679
|
-
scope: {
|
|
6680
|
-
type: "device",
|
|
6681
|
-
deviceId
|
|
6682
|
-
},
|
|
6683
|
-
state: "down",
|
|
6684
|
-
generation: nativeCapReadinessGeneration,
|
|
6685
|
-
sourceNodeId: nodeId
|
|
6686
|
-
});
|
|
6687
|
-
}
|
|
6688
|
-
await device.removeDevice().catch((err) => {
|
|
6689
|
-
opts.logger.warn("removeDevice() lifecycle threw during decommission", {
|
|
6690
|
-
tags: {
|
|
6691
|
-
deviceId,
|
|
6692
|
-
addonId
|
|
6693
|
-
},
|
|
6694
|
-
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
6695
|
-
});
|
|
6696
|
-
});
|
|
6697
|
-
registry.remove(deviceId);
|
|
6698
|
-
},
|
|
6707
|
+
decommission: (deviceId) => teardownLocal(deviceId, true),
|
|
6699
6708
|
applyDerivedSpec: async (deviceId, derived) => {
|
|
6700
6709
|
if (derived.type !== void 0) await callDeviceManager(api, "setType", {
|
|
6701
6710
|
deviceId,
|
|
@@ -6738,14 +6747,17 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6738
6747
|
await deviceApi.decommission(deviceId);
|
|
6739
6748
|
await deviceApi.register(construct());
|
|
6740
6749
|
},
|
|
6750
|
+
/**
|
|
6751
|
+
* Remove a device AND its whole subtree, once. The hub's public `remove`
|
|
6752
|
+
* is the one cascade (children, live teardown through each device's
|
|
6753
|
+
* `device-ops`, rows, tombstones, removal hooks, events); this worker then
|
|
6754
|
+
* drops what only it holds — the registry entries and native caps — without
|
|
6755
|
+
* a second `removeDevice()` lifecycle. A persisted-only orphan is the same
|
|
6756
|
+
* call: the hub clears its rows and there is nothing local to drop.
|
|
6757
|
+
*/
|
|
6741
6758
|
remove: async (deviceId) => {
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
await callDeviceManager(api, "removeDevice", { deviceId });
|
|
6745
|
-
return;
|
|
6746
|
-
}
|
|
6747
|
-
await deviceApi.decommission(deviceId);
|
|
6748
|
-
await callDeviceManager(api, "removeDevice", { deviceId });
|
|
6759
|
+
await callDeviceManager(api, "remove", { deviceId });
|
|
6760
|
+
await teardownLocal(deviceId, false);
|
|
6749
6761
|
},
|
|
6750
6762
|
getAll: async () => {
|
|
6751
6763
|
return registry.getAllForAddon(addonId);
|
|
@@ -6148,6 +6148,62 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6148
6148
|
probeRetryTimers.delete(deviceId);
|
|
6149
6149
|
}
|
|
6150
6150
|
};
|
|
6151
|
+
/**
|
|
6152
|
+
* The in-memory half of a teardown, children first. `runLifecycle` is false
|
|
6153
|
+
* when the hub already ran each device's `removeDevice()` through its
|
|
6154
|
+
* `device-ops` provider (the cascading remove): only the local registry,
|
|
6155
|
+
* native caps and rebuild factories are left to drop, never a second
|
|
6156
|
+
* lifecycle call.
|
|
6157
|
+
*/
|
|
6158
|
+
const teardownLocal = async (deviceId, runLifecycle) => {
|
|
6159
|
+
const device = registry.getById(deviceId);
|
|
6160
|
+
cancelProbeRetry(deviceId);
|
|
6161
|
+
if (!device) return;
|
|
6162
|
+
const children = registry.getChildren(deviceId);
|
|
6163
|
+
for (const child of children) await teardownLocal(child.id, runLifecycle);
|
|
6164
|
+
const capsToUnregister = opts.capabilityRegistry ? [...opts.capabilityRegistry.getNativeCapsForDevice(deviceId)] : [...getWorkerNativeCapsForDevice(deviceId)];
|
|
6165
|
+
opts.capabilityRegistry?.unregisterAllNativeForDevice(deviceId);
|
|
6166
|
+
if (!opts.capabilityRegistry) clearWorkerNativeCapsForDevice(deviceId);
|
|
6167
|
+
for (const capName of capsToUnregister) {
|
|
6168
|
+
eventBus.emit({
|
|
6169
|
+
id: randomUUID(),
|
|
6170
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
6171
|
+
source: {
|
|
6172
|
+
type: "device",
|
|
6173
|
+
id: deviceId
|
|
6174
|
+
},
|
|
6175
|
+
category: EventCategory.DeviceBindingsChanged,
|
|
6176
|
+
data: {
|
|
6177
|
+
deviceId,
|
|
6178
|
+
capName,
|
|
6179
|
+
reason: "native-unregistered",
|
|
6180
|
+
addonId,
|
|
6181
|
+
nodeId
|
|
6182
|
+
}
|
|
6183
|
+
});
|
|
6184
|
+
emitReadiness(eventBus, {
|
|
6185
|
+
capName,
|
|
6186
|
+
scope: {
|
|
6187
|
+
type: "device",
|
|
6188
|
+
deviceId
|
|
6189
|
+
},
|
|
6190
|
+
state: "down",
|
|
6191
|
+
generation: nativeCapReadinessGeneration,
|
|
6192
|
+
sourceNodeId: nodeId
|
|
6193
|
+
});
|
|
6194
|
+
}
|
|
6195
|
+
if (runLifecycle) await device.removeDevice().catch((err) => {
|
|
6196
|
+
opts.logger.warn("removeDevice() lifecycle threw during decommission", {
|
|
6197
|
+
tags: {
|
|
6198
|
+
deviceId,
|
|
6199
|
+
addonId
|
|
6200
|
+
},
|
|
6201
|
+
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
6202
|
+
});
|
|
6203
|
+
});
|
|
6204
|
+
if (!runLifecycle) deviceRebuildFactories.delete(deviceId);
|
|
6205
|
+
registry.remove(deviceId);
|
|
6206
|
+
};
|
|
6151
6207
|
const deviceApi = {
|
|
6152
6208
|
allocateDeviceId: async (stableId) => {
|
|
6153
6209
|
return (await callDeviceManager(api, "allocateDeviceId", {
|
|
@@ -6589,58 +6645,11 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6589
6645
|
/**
|
|
6590
6646
|
* In-memory teardown — fires `removeDevice()` lifecycle, drops
|
|
6591
6647
|
* native caps, removes from registry. Cascades through children.
|
|
6592
|
-
* Does NOT touch persisted state. Used
|
|
6593
|
-
*
|
|
6648
|
+
* Does NOT touch persisted state. Used by `remove()` (after the hub
|
|
6649
|
+
* cascade) and by addon shutdown
|
|
6594
6650
|
* paths that want the next boot to rehydrate the same devices.
|
|
6595
6651
|
*/
|
|
6596
|
-
decommission:
|
|
6597
|
-
const device = registry.getById(deviceId);
|
|
6598
|
-
cancelProbeRetry(deviceId);
|
|
6599
|
-
if (!device) return;
|
|
6600
|
-
const children = registry.getChildren(deviceId);
|
|
6601
|
-
for (const child of children) await deviceApi.decommission(child.id);
|
|
6602
|
-
const capsToUnregister = opts.capabilityRegistry ? [...opts.capabilityRegistry.getNativeCapsForDevice(deviceId)] : [...getWorkerNativeCapsForDevice(deviceId)];
|
|
6603
|
-
opts.capabilityRegistry?.unregisterAllNativeForDevice(deviceId);
|
|
6604
|
-
if (!opts.capabilityRegistry) clearWorkerNativeCapsForDevice(deviceId);
|
|
6605
|
-
for (const capName of capsToUnregister) {
|
|
6606
|
-
eventBus.emit({
|
|
6607
|
-
id: randomUUID(),
|
|
6608
|
-
timestamp: /* @__PURE__ */ new Date(),
|
|
6609
|
-
source: {
|
|
6610
|
-
type: "device",
|
|
6611
|
-
id: deviceId
|
|
6612
|
-
},
|
|
6613
|
-
category: EventCategory.DeviceBindingsChanged,
|
|
6614
|
-
data: {
|
|
6615
|
-
deviceId,
|
|
6616
|
-
capName,
|
|
6617
|
-
reason: "native-unregistered",
|
|
6618
|
-
addonId,
|
|
6619
|
-
nodeId
|
|
6620
|
-
}
|
|
6621
|
-
});
|
|
6622
|
-
emitReadiness(eventBus, {
|
|
6623
|
-
capName,
|
|
6624
|
-
scope: {
|
|
6625
|
-
type: "device",
|
|
6626
|
-
deviceId
|
|
6627
|
-
},
|
|
6628
|
-
state: "down",
|
|
6629
|
-
generation: nativeCapReadinessGeneration,
|
|
6630
|
-
sourceNodeId: nodeId
|
|
6631
|
-
});
|
|
6632
|
-
}
|
|
6633
|
-
await device.removeDevice().catch((err) => {
|
|
6634
|
-
opts.logger.warn("removeDevice() lifecycle threw during decommission", {
|
|
6635
|
-
tags: {
|
|
6636
|
-
deviceId,
|
|
6637
|
-
addonId
|
|
6638
|
-
},
|
|
6639
|
-
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
6640
|
-
});
|
|
6641
|
-
});
|
|
6642
|
-
registry.remove(deviceId);
|
|
6643
|
-
},
|
|
6652
|
+
decommission: (deviceId) => teardownLocal(deviceId, true),
|
|
6644
6653
|
applyDerivedSpec: async (deviceId, derived) => {
|
|
6645
6654
|
if (derived.type !== void 0) await callDeviceManager(api, "setType", {
|
|
6646
6655
|
deviceId,
|
|
@@ -6683,14 +6692,17 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6683
6692
|
await deviceApi.decommission(deviceId);
|
|
6684
6693
|
await deviceApi.register(construct());
|
|
6685
6694
|
},
|
|
6695
|
+
/**
|
|
6696
|
+
* Remove a device AND its whole subtree, once. The hub's public `remove`
|
|
6697
|
+
* is the one cascade (children, live teardown through each device's
|
|
6698
|
+
* `device-ops`, rows, tombstones, removal hooks, events); this worker then
|
|
6699
|
+
* drops what only it holds — the registry entries and native caps — without
|
|
6700
|
+
* a second `removeDevice()` lifecycle. A persisted-only orphan is the same
|
|
6701
|
+
* call: the hub clears its rows and there is nothing local to drop.
|
|
6702
|
+
*/
|
|
6686
6703
|
remove: async (deviceId) => {
|
|
6687
|
-
|
|
6688
|
-
|
|
6689
|
-
await callDeviceManager(api, "removeDevice", { deviceId });
|
|
6690
|
-
return;
|
|
6691
|
-
}
|
|
6692
|
-
await deviceApi.decommission(deviceId);
|
|
6693
|
-
await callDeviceManager(api, "removeDevice", { deviceId });
|
|
6704
|
+
await callDeviceManager(api, "remove", { deviceId });
|
|
6705
|
+
await teardownLocal(deviceId, false);
|
|
6694
6706
|
},
|
|
6695
6707
|
getAll: async () => {
|
|
6696
6708
|
return registry.getAllForAddon(addonId);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DngPUHs2.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 { Go as defineRecordKinds } from "./dist-
|
|
1
|
+
import { Go as defineRecordKinds } from "./dist-D35rKdpn.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-
|
|
6
|
+
const require_dist = require("../../dist-DngPUHs2.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ms as EventCategory, Qa as BaseAddon, Xt as addonPagesCapability, js as errMsg } from "../../dist-
|
|
1
|
+
import { Ms as EventCategory, Qa as BaseAddon, Xt as addonPagesCapability, js as errMsg } from "../../dist-D35rKdpn.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
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
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DngPUHs2.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ms as EventCategory, Qa as BaseAddon, Qt as addonWidgetsCapability, js as errMsg } from "../../dist-
|
|
1
|
+
import { Ms as EventCategory, Qa as BaseAddon, Qt as addonWidgetsCapability, js as errMsg } from "../../dist-D35rKdpn.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
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-
|
|
6
|
+
const require_dist = require("../../dist-DngPUHs2.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $t as alertEpisodeId, Go as defineRecordKinds, Ho as createEvent, Ms as EventCategory, Qa as BaseAddon, d as AlertSchema, en as alertEpisodePayload, js as errMsg, tn as alertsCapability, vr as isAlertEpisodeOpen, yr as isAlertEpisodeSeverity } from "../../dist-
|
|
1
|
+
import { $t as alertEpisodeId, Go as defineRecordKinds, Ho as createEvent, Ms as EventCategory, Qa as BaseAddon, d as AlertSchema, en as alertEpisodePayload, js as errMsg, tn as alertsCapability, vr as isAlertEpisodeOpen, yr as isAlertEpisodeSeverity } from "../../dist-D35rKdpn.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
4
4
|
/**
|
|
@@ -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-DngPUHs2.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ms as EventCategory, Qa as BaseAddon, Z as FIRST_LEVEL_MACRO_CLASSES, es as isEvent, js as errMsg, on as bareAddonId, yi as ptzAutotrackCapability } from "../../dist-
|
|
1
|
+
import { Ms as EventCategory, Qa as BaseAddon, Z as FIRST_LEVEL_MACRO_CLASSES, es as isEvent, js as errMsg, on as bareAddonId, yi as ptzAutotrackCapability } from "../../dist-D35rKdpn.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -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-DngPUHs2.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-Lb1DCZll.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Cs as toNodeId, Ms as EventCategory, Qa as BaseAddon, Wr as mayWriteToLocation, an as backupCapability, ls as nodePin, na as storageOccupancyCapability } from "../../dist-
|
|
1
|
+
import { Cs as toNodeId, Ms as EventCategory, Qa as BaseAddon, Wr as mayWriteToLocation, an as backupCapability, ls as nodePin, na as storageOccupancyCapability } from "../../dist-D35rKdpn.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-Dr_FY9P0.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fsp from "node:fs/promises";
|
|
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-DngPUHs2.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 { Go as defineRecordKinds, Qa as BaseAddon, T as CalendarPreferencesSchema, mn as calendarsCapability } from "../../dist-
|
|
1
|
+
import { Go as defineRecordKinds, Qa as BaseAddon, T as CalendarPreferencesSchema, mn as calendarsCapability } from "../../dist-D35rKdpn.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-DngPUHs2.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { As as DeviceType, G as DeclaredDevices, Ho as createEvent, I as DERIVED_CAMERA_SILENCED_CAP_NAMES, Kr as memoizePinnedFfmpeg, Ms as EventCategory, Oa as buildFfmpegArgs, Os as DeviceFeature, Qa as BaseAddon, Qo as hydrateSchema, Rn as declarationOwnerNodeId, Zi as snapshotCapability, Zr as motionCapability, gt as MOTION_CLOSE_AFTER_MS, hn as cameraGridLayoutCapability, ia as streamCatalogCapability, js as errMsg, m as BaseDevice } from "../../dist-
|
|
1
|
+
import { As as DeviceType, G as DeclaredDevices, Ho as createEvent, I as DERIVED_CAMERA_SILENCED_CAP_NAMES, Kr as memoizePinnedFfmpeg, Ms as EventCategory, Oa as buildFfmpegArgs, Os as DeviceFeature, Qa as BaseAddon, Qo as hydrateSchema, Rn as declarationOwnerNodeId, Zi as snapshotCapability, Zr as motionCapability, gt as MOTION_CLOSE_AFTER_MS, hn as cameraGridLayoutCapability, ia as streamCatalogCapability, js as errMsg, m as BaseDevice } from "../../dist-D35rKdpn.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -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-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
8
|
-
const require_retention = require("../../retention-
|
|
6
|
+
const require_dist = require("../../dist-DngPUHs2.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-B5uJfQqd.js");
|
|
8
|
+
const require_retention = require("../../retention-IAzprg-c.js");
|
|
9
9
|
let zod = require("zod");
|
|
10
10
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
11
11
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Aa as composedDeviceRef, As as DeviceType, Ca as DEFAULT_HISTORY_RETENTION, Cn as colorCapability, Da as MINUTE_MS, Ea as HOUR_MS, Fa as compositionSourceKey, G as DeclaredDevices, Ga as openReset, Gi as sharedActuatorFeatures, Gr as mediaPlayerCapability, Ha as isForwardInputRef, Ho as createEvent, Ia as createStatefulExpressionMemory, Ja as planStatisticTier, Ka as openStatistic, Ki as sharedActuatorMethods, La as disarmRoseMemory, Li as runFanOut, Ma as compositionFeatureEnabled, Mn as coverCapability, Ms as EventCategory, Na as compositionItemFieldPath, Pa as compositionSliceKey, Pi as resolveMutate, Q as FanDirectionSchema, Qa as BaseAddon, Ra as evaluateDerivative, Rr as lockControlCapability, Sa as DAY_MS, Ta as HISTORY_SLOW_MS, Tn as compositionFieldKey, Ua as isHistoryHelper, Va as integrateReading, Wa as nextLocalMidnight, Xa as toExpressionValue, Ya as statisticCadenceMs, Zr as motionCapability, b as COMPOSED_ITEM_FIXED_FIELDS, cn as brightnessCapability, cr as featureForwards, er as evaluateCompositionField, fi as planComposition, hr as groupTemplate, ir as expressionContainsBuiltinCall, ja as composedDeviceStableId, js as errMsg, ka as cloneStatefulExpressionMemory, kr as kebabToCamel, li as parseColorInput, m as BaseDevice, mr as groupCommandsCapability, n as ACTUATOR_METHODS, ns as isReadingQuantity, o as ALL_CAPABILITY_DEFINITIONS, or as fanControlCapability, ot as HvacModeSchema, pa as valveCapability, qa as planResetTier, qi as sharedColorModes, qr as methodRefusal, r as ACTUATOR_TEMPLATE_IDS, sa as switchCapability, sr as fanOutTargets, tt as GroupCommandResultSchema, un as buildCapabilityLookup, wa as HISTORY_FAST_MS, wn as composerCapability, xa as COMPOSER_ADDON_ID, xn as climateControlCapability, za as evaluateStatistic, zn as declaredSeriesKind } from "../../dist-
|
|
2
|
-
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-
|
|
3
|
-
import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-
|
|
1
|
+
import { Aa as composedDeviceRef, As as DeviceType, Ca as DEFAULT_HISTORY_RETENTION, Cn as colorCapability, Da as MINUTE_MS, Ea as HOUR_MS, Fa as compositionSourceKey, G as DeclaredDevices, Ga as openReset, Gi as sharedActuatorFeatures, Gr as mediaPlayerCapability, Ha as isForwardInputRef, Ho as createEvent, Ia as createStatefulExpressionMemory, Ja as planStatisticTier, Ka as openStatistic, Ki as sharedActuatorMethods, La as disarmRoseMemory, Li as runFanOut, Ma as compositionFeatureEnabled, Mn as coverCapability, Ms as EventCategory, Na as compositionItemFieldPath, Pa as compositionSliceKey, Pi as resolveMutate, Q as FanDirectionSchema, Qa as BaseAddon, Ra as evaluateDerivative, Rr as lockControlCapability, Sa as DAY_MS, Ta as HISTORY_SLOW_MS, Tn as compositionFieldKey, Ua as isHistoryHelper, Va as integrateReading, Wa as nextLocalMidnight, Xa as toExpressionValue, Ya as statisticCadenceMs, Zr as motionCapability, b as COMPOSED_ITEM_FIXED_FIELDS, cn as brightnessCapability, cr as featureForwards, er as evaluateCompositionField, fi as planComposition, hr as groupTemplate, ir as expressionContainsBuiltinCall, ja as composedDeviceStableId, js as errMsg, ka as cloneStatefulExpressionMemory, kr as kebabToCamel, li as parseColorInput, m as BaseDevice, mr as groupCommandsCapability, n as ACTUATOR_METHODS, ns as isReadingQuantity, o as ALL_CAPABILITY_DEFINITIONS, or as fanControlCapability, ot as HvacModeSchema, pa as valveCapability, qa as planResetTier, qi as sharedColorModes, qr as methodRefusal, r as ACTUATOR_TEMPLATE_IDS, sa as switchCapability, sr as fanOutTargets, tt as GroupCommandResultSchema, un as buildCapabilityLookup, wa as HISTORY_FAST_MS, wn as composerCapability, xa as COMPOSER_ADDON_ID, xn as climateControlCapability, za as evaluateStatistic, zn as declaredSeriesKind } from "../../dist-D35rKdpn.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-DKx0-ndC.mjs";
|
|
3
|
+
import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-CwKSqRi5.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
6
6
|
/**
|
|
@@ -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-DngPUHs2.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 { Br as logDestinationCapability, Qa as BaseAddon } from "../../dist-
|
|
1
|
+
import { Br as logDestinationCapability, Qa as BaseAddon } from "../../dist-D35rKdpn.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 = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("../../dist-
|
|
3
|
+
const require_dist = require("../../dist-DngPUHs2.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-B5uJfQqd.js");
|
|
6
6
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
7
7
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
8
8
|
let zod = require("zod");
|
|
@@ -4419,7 +4419,7 @@ var PowerSourceService = class {
|
|
|
4419
4419
|
/** The stored link of the device `deviceId`, read from the customizations now. */
|
|
4420
4420
|
async linkOf(deviceId) {
|
|
4421
4421
|
for (const block of this.deps.blocks()) {
|
|
4422
|
-
const link = require_dist.powerSourceLinkOfComposition(require_dist.coreBlockComposition(block));
|
|
4422
|
+
const link = require_dist.powerSourceLinkOfComposition(require_dist.coreBlockComposition(block), block.id);
|
|
4423
4423
|
if (link === null) continue;
|
|
4424
4424
|
const device = await this.deps.devices.find(link.device).catch(() => null);
|
|
4425
4425
|
if (device !== null && device.id === deviceId) return link;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $r as normalizeActionUnits, Aa as composedDeviceRef, Ai as resolveCoreBlockFiles, An as coreBlockSourceKind, As as DeviceType, At as RemoteConfigSchema, Ba as helperMembers, Bi as schedulersCapability, Bo as collectSecretMarkerRefs, C as CORE_BLOCK_ADDON_PREFIX, Ci as remoteCapability, D as ConditionMirror, Dn as coreBlockAddonId, Ei as resolveActionVariables, En as compositionSourceRefs, F as DEFAULT_HOLD_OVERRIDE, Fa as compositionSourceKey, Fn as customRole, Fr as localDateOf, Ft as SchedulerSchema, G as DeclaredDevices, Go as defineRecordKinds, Ii as resolveStepArgs, J as EMPTY_AUTOMATION_STATE, Jt as actionsCapability, Ms as EventCategory, O as CoreBlockSchema, On as coreBlockComposition, Pn as customKeyOfRole, Pt as SchedulerError, Qa as BaseAddon, Qo as hydrateSchema, Qr as nextOccurrence, Ri as runSteps, S as CORE_BLOCKS_ADDON_ID, Sn as collectWhenMirrorSources, Ti as replacedFieldKeys, Tr as isInternalActionId, Ts as transformSecretWrite, Tt as QuantityUnitError, Un as describeComposableCaps, Ut as TemplateKindSchema, X as EMPTY_REMOTE_CONFIG, Y as EMPTY_REMOTE_ASSUMED_STATE, Yi as siteFor, Yt as addonIdOfActionId, _a as vocabActionIdFor, _i as problemsBlockSave, _n as capUnitResolver, _t as MediaPlayerStatusSchema, ba as zoneOnlySite, bn as checkTemplatePayload, c as ActionStepSchema, ca as templateCapability, ct as INTERNAL_ACTION_PREFIX, ei as normalizeCapStep, f as AutomationStateDocSchema, fa as validateSchedulerInput, fi as planComposition, gr as internalActionId, hi as powerSourceLinkOfComposition, is as isSecretMarker, jn as coreBlocksCapability, js as errMsg, jt as RunningStateStatusSchema, ki as resolveCoreBlockEntry, kn as coreBlockIdFromAddonId, kr as kebabToCamel, kt as RemoteAssumedStateSchema, l as ActionTargetResolver, ln as buildActionSteps, mi as powerSourceCapability, ni as normalizeStepTargets, nn as appendTrace, o as ALL_CAPABILITY_DEFINITIONS, oi as occurrenceOn, os as isSecretRefOwnedBy, p as BUILTIN_REMOTE_COMPONENTS, qt as actionEffect, s as ActionError, st as IDLE_ACTION_STATUS, t as ACTION_TARGET_INVALIDATION_EVENTS, ti as normalizeCoreBlockWrite, tr as evaluateWhenTree, u as ActionVariableSchema, ua as validateComposition, un as buildCapabilityLookup, va as weekdayOfLocalDate, vs as resolveSecretMarkers, wi as remoteLayoutComponentsCapability, x as COMPOSER_RUNNER_ID, xs as secretTreeFromSchema, zr as lockDoorLinkOfComposition } from "../../dist-
|
|
1
|
+
import { $r as normalizeActionUnits, Aa as composedDeviceRef, Ai as resolveCoreBlockFiles, An as coreBlockSourceKind, As as DeviceType, At as RemoteConfigSchema, Ba as helperMembers, Bi as schedulersCapability, Bo as collectSecretMarkerRefs, C as CORE_BLOCK_ADDON_PREFIX, Ci as remoteCapability, D as ConditionMirror, Dn as coreBlockAddonId, Ei as resolveActionVariables, En as compositionSourceRefs, F as DEFAULT_HOLD_OVERRIDE, Fa as compositionSourceKey, Fn as customRole, Fr as localDateOf, Ft as SchedulerSchema, G as DeclaredDevices, Go as defineRecordKinds, Ii as resolveStepArgs, J as EMPTY_AUTOMATION_STATE, Jt as actionsCapability, Ms as EventCategory, O as CoreBlockSchema, On as coreBlockComposition, Pn as customKeyOfRole, Pt as SchedulerError, Qa as BaseAddon, Qo as hydrateSchema, Qr as nextOccurrence, Ri as runSteps, S as CORE_BLOCKS_ADDON_ID, Sn as collectWhenMirrorSources, Ti as replacedFieldKeys, Tr as isInternalActionId, Ts as transformSecretWrite, Tt as QuantityUnitError, Un as describeComposableCaps, Ut as TemplateKindSchema, X as EMPTY_REMOTE_CONFIG, Y as EMPTY_REMOTE_ASSUMED_STATE, Yi as siteFor, Yt as addonIdOfActionId, _a as vocabActionIdFor, _i as problemsBlockSave, _n as capUnitResolver, _t as MediaPlayerStatusSchema, ba as zoneOnlySite, bn as checkTemplatePayload, c as ActionStepSchema, ca as templateCapability, ct as INTERNAL_ACTION_PREFIX, ei as normalizeCapStep, f as AutomationStateDocSchema, fa as validateSchedulerInput, fi as planComposition, gr as internalActionId, hi as powerSourceLinkOfComposition, is as isSecretMarker, jn as coreBlocksCapability, js as errMsg, jt as RunningStateStatusSchema, ki as resolveCoreBlockEntry, kn as coreBlockIdFromAddonId, kr as kebabToCamel, kt as RemoteAssumedStateSchema, l as ActionTargetResolver, ln as buildActionSteps, mi as powerSourceCapability, ni as normalizeStepTargets, nn as appendTrace, o as ALL_CAPABILITY_DEFINITIONS, oi as occurrenceOn, os as isSecretRefOwnedBy, p as BUILTIN_REMOTE_COMPONENTS, qt as actionEffect, s as ActionError, st as IDLE_ACTION_STATUS, t as ACTION_TARGET_INVALIDATION_EVENTS, ti as normalizeCoreBlockWrite, tr as evaluateWhenTree, u as ActionVariableSchema, ua as validateComposition, un as buildCapabilityLookup, va as weekdayOfLocalDate, vs as resolveSecretMarkers, wi as remoteLayoutComponentsCapability, x as COMPOSER_RUNNER_ID, xs as secretTreeFromSchema, zr as lockDoorLinkOfComposition } from "../../dist-D35rKdpn.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-
|
|
3
|
+
import { i as parseDeviceStateChanged, t as describeCompositionSources } from "../../composition-sources-DKx0-ndC.mjs";
|
|
4
4
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
5
5
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
6
6
|
import { createRequire } from "node:module";
|
|
@@ -4414,7 +4414,7 @@ var PowerSourceService = class {
|
|
|
4414
4414
|
/** The stored link of the device `deviceId`, read from the customizations now. */
|
|
4415
4415
|
async linkOf(deviceId) {
|
|
4416
4416
|
for (const block of this.deps.blocks()) {
|
|
4417
|
-
const link = powerSourceLinkOfComposition(coreBlockComposition(block));
|
|
4417
|
+
const link = powerSourceLinkOfComposition(coreBlockComposition(block), block.id);
|
|
4418
4418
|
if (link === null) continue;
|
|
4419
4419
|
const device = await this.deps.devices.find(link.device).catch(() => null);
|
|
4420
4420
|
if (device !== null && device.id === deviceId) return link;
|
|
@@ -36,7 +36,7 @@ export interface PowerSourceScheduler {
|
|
|
36
36
|
}
|
|
37
37
|
export declare const timeoutScheduler: PowerSourceScheduler;
|
|
38
38
|
export interface PowerSourceServiceDeps {
|
|
39
|
-
readonly blocks: () => readonly Pick<CoreBlock, "source">[];
|
|
39
|
+
readonly blocks: () => readonly Pick<CoreBlock, "id" | "source">[];
|
|
40
40
|
readonly devices: PowerSourceDevices;
|
|
41
41
|
readonly scheduler: PowerSourceScheduler;
|
|
42
42
|
readonly logger: IScopedLogger;
|