@camstack/server 1.2.896 → 1.2.898
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 +17 -23
- package/system/dist/addon-runner.js +103 -12
- package/system/dist/addon-runner.mjs +103 -12
- 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 +14 -11
- package/system/dist/builtins/composer/composer.addon.mjs +11 -8
- 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 +170 -14
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +169 -13
- package/system/dist/builtins/core-blocks/migrations/automation-confirmed-view.d.ts +23 -0
- package/system/dist/builtins/core-blocks/migrations/index.d.ts +1 -0
- package/system/dist/builtins/core-blocks/migrations/pump-cycle-split.d.ts +1 -0
- package/system/dist/builtins/device-history/device-history.addon.js +10 -9
- package/system/dist/builtins/device-history/device-history.addon.mjs +10 -9
- package/system/dist/builtins/device-manager/command-holds-wiring.d.ts +22 -0
- package/system/dist/builtins/device-manager/command-holds.d.ts +75 -0
- package/system/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +383 -27
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +380 -28
- package/system/dist/builtins/device-manager/device-state-mirror.d.ts +35 -9
- 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/shared/device-state-changed.d.ts +8 -0
- 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 +3 -3
- 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-BgIjQWh6.js → capture-engine-BWS0KTbm.js} +48 -1
- package/system/dist/{capture-engine-DPn6JaPc.mjs → capture-engine-DBQDaDxJ.mjs} +37 -2
- package/system/dist/{composition-sources-Bec_hQMM.js → composition-sources-CDOW1dnY.js} +1 -32
- package/system/dist/{composition-sources-B0rdPm85.mjs → composition-sources-CGUWmf-T.mjs} +2 -21
- package/system/dist/{constants-DsQsO8PD.mjs → constants-BmrLkwZs.mjs} +1 -1
- package/system/dist/{constants-CsYMak6g.js → constants-BwrRoq-j.js} +1 -1
- package/system/dist/{device-ca-BuDqRFZd.mjs → device-ca-BGgZXEto.mjs} +1 -1
- package/system/dist/{device-ca-BeK8EI_7.js → device-ca-DiuwWyZY.js} +1 -1
- package/system/dist/{dist-CHC8tlB1.js → dist-CCd8IeIU.js} +705 -54
- package/system/dist/{dist-DiknL6UU.mjs → dist-D7t8wLTF.mjs} +694 -55
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-Dt-mbtkY.mjs → hub-identity-BohJeqdO.mjs} +1 -1
- package/system/dist/{hub-identity-BM26oLpK.js → hub-identity-G_ZdyPpc.js} +1 -1
- package/system/dist/{hub-mdns-ciao-BDgSHCPM.js → hub-mdns-ciao-CKD4EgkG.js} +2 -2
- package/system/dist/{hub-mdns-ciao-CHq7b1FX.mjs → hub-mdns-ciao-D5RxSMrH.mjs} +2 -2
- package/system/dist/index.js +45 -13
- package/system/dist/index.mjs +46 -14
- package/system/dist/kernel/command-hold-overrides.d.ts +42 -0
- package/system/dist/kernel/moleculer/child-cap-descriptors.d.ts +3 -0
- package/system/dist/kernel/moleculer/device-cap-proxy.d.ts +2 -1
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +6 -1
- package/system/dist/{legacy-integration-rows-door-BYJa0xPI.js → legacy-integration-rows-door-BgCl68ek.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-1WauJNCy.mjs → legacy-integration-rows-door-Rm9JmIsl.mjs} +1 -1
- package/system/dist/{rename-composition-block-fMaUic9d.js → rename-composition-block-2Z2ED7Og.js} +1 -1
- package/system/dist/{rename-composition-block-BOoAElGp.mjs → rename-composition-block-DNO3mNEO.mjs} +1 -1
- package/system/dist/{restore-archive-DNLe1z5A.mjs → restore-archive-2L5TymvF.mjs} +1 -1
- package/system/dist/{restore-archive-CeZV08vh.js → restore-archive-CZkQO8t3.js} +1 -1
- package/system/dist/{wal-maintenance-CekT_qH6.mjs → wal-maintenance-BMYe_n18.mjs} +0 -0
- package/system/dist/{wal-maintenance-CmCCUKZO.js → wal-maintenance-YjDJ73Qd.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.898] - 2026-11-18
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Rebuilt against updated dependencies.
|
|
15
|
+
|
|
16
|
+
## [1.2.897] - 2026-11-17
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Rebuilt against updated dependencies.
|
|
21
|
+
|
|
10
22
|
## [1.2.896] - 2026-11-17
|
|
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.898",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,21 +66,15 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-
|
|
70
|
-
"@camstack/addon-
|
|
71
|
-
"@camstack/addon-
|
|
72
|
-
"@camstack/addon-
|
|
73
|
-
"@camstack/addon-
|
|
74
|
-
"@camstack/addon-
|
|
75
|
-
"@camstack/addon-
|
|
76
|
-
"@camstack/addon-provider-
|
|
77
|
-
"@camstack/addon-provider-
|
|
78
|
-
"@camstack/addon-provider-petkit": ">=0.2.171",
|
|
79
|
-
"@camstack/addon-provider-tuya": ">=0.2.161",
|
|
80
|
-
"@camstack/addon-provider-unifi": ">=0.2.168",
|
|
81
|
-
"@camstack/addon-provider-unraid": ">=0.2.171",
|
|
82
|
-
"@camstack/addon-provider-vesync": ">=0.2.164",
|
|
83
|
-
"@camstack/addon-provider-wyze": ">=0.2.174"
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.697",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.407",
|
|
71
|
+
"@camstack/addon-export-alexa": ">=1.2.202",
|
|
72
|
+
"@camstack/addon-export-hap": ">=1.2.207",
|
|
73
|
+
"@camstack/addon-pipeline": ">=1.2.661",
|
|
74
|
+
"@camstack/addon-pipeline-orchestrator": ">=1.2.701",
|
|
75
|
+
"@camstack/addon-post-analysis": ">=1.2.715",
|
|
76
|
+
"@camstack/addon-provider-homeassistant": ">=1.2.694",
|
|
77
|
+
"@camstack/addon-provider-vesync": ">=0.2.166"
|
|
84
78
|
},
|
|
85
79
|
"wrapper": {
|
|
86
80
|
"desktop": ">=0.0.1",
|
|
@@ -89,19 +83,19 @@
|
|
|
89
83
|
}
|
|
90
84
|
},
|
|
91
85
|
"dependencies": {
|
|
92
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
93
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
86
|
+
"@camstack/addon-admin-ui": "1.2.697",
|
|
87
|
+
"@camstack/addon-agent-ui": "1.2.407",
|
|
94
88
|
"@camstack/addon-auth": "1.2.182",
|
|
95
89
|
"@camstack/addon-benchmark": "1.2.313",
|
|
96
90
|
"@camstack/addon-decoder-nodeav": "1.2.149",
|
|
97
91
|
"@camstack/addon-notifiers": "1.2.639",
|
|
98
|
-
"@camstack/addon-pipeline": "1.2.
|
|
99
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
100
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
92
|
+
"@camstack/addon-pipeline": "1.2.661",
|
|
93
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.701",
|
|
94
|
+
"@camstack/addon-post-analysis": "1.2.715",
|
|
101
95
|
"@camstack/develop": "0.1.54",
|
|
102
96
|
"@camstack/sdk": "1.2.159",
|
|
103
|
-
"@camstack/types": "1.2.
|
|
104
|
-
"@camstack/ui-library": "1.2.
|
|
97
|
+
"@camstack/types": "1.2.592",
|
|
98
|
+
"@camstack/ui-library": "1.2.468",
|
|
105
99
|
"@fastify/compress": "^9.0.0",
|
|
106
100
|
"@fastify/cookie": "^11.0.2",
|
|
107
101
|
"@fastify/cors": "^11.2.0",
|
|
@@ -5939,6 +5939,51 @@ function createChildrenBatchLoader(opts) {
|
|
|
5939
5939
|
} };
|
|
5940
5940
|
}
|
|
5941
5941
|
//#endregion
|
|
5942
|
+
//#region src/kernel/command-hold-overrides.ts
|
|
5943
|
+
/** The source key of an in-process registration. */
|
|
5944
|
+
var IN_PROCESS_HOLD_SOURCE = "in-process";
|
|
5945
|
+
function keyOf(deviceId, capName) {
|
|
5946
|
+
return `${deviceId}|${capName}`;
|
|
5947
|
+
}
|
|
5948
|
+
var CommandHoldOverrideRegistry = class {
|
|
5949
|
+
bySource = /* @__PURE__ */ new Map();
|
|
5950
|
+
/** Record (or replace) one device cap's options from `source`. */
|
|
5951
|
+
set(source, entry) {
|
|
5952
|
+
const perSource = this.bySource.get(source) ?? /* @__PURE__ */ new Map();
|
|
5953
|
+
perSource.set(keyOf(entry.deviceId, entry.capName), entry.commands);
|
|
5954
|
+
this.bySource.set(source, perSource);
|
|
5955
|
+
}
|
|
5956
|
+
/** Forget one device cap's options from `source`. */
|
|
5957
|
+
delete(source, deviceId, capName) {
|
|
5958
|
+
const perSource = this.bySource.get(source);
|
|
5959
|
+
if (perSource === void 0) return;
|
|
5960
|
+
perSource.delete(keyOf(deviceId, capName));
|
|
5961
|
+
if (perSource.size === 0) this.bySource.delete(source);
|
|
5962
|
+
}
|
|
5963
|
+
/** Replace everything `source` reported with `entries` (an empty list forgets the source). */
|
|
5964
|
+
replaceSource(source, entries) {
|
|
5965
|
+
if (entries.length === 0) {
|
|
5966
|
+
this.bySource.delete(source);
|
|
5967
|
+
return;
|
|
5968
|
+
}
|
|
5969
|
+
this.bySource.set(source, new Map(entries.map((e) => [keyOf(e.deviceId, e.capName), e.commands])));
|
|
5970
|
+
}
|
|
5971
|
+
/** The options for a device cap, from whichever source registered it; `undefined` = default. */
|
|
5972
|
+
get(deviceId, capName) {
|
|
5973
|
+
const key = keyOf(deviceId, capName);
|
|
5974
|
+
for (const perSource of this.bySource.values()) {
|
|
5975
|
+
const found = perSource.get(key);
|
|
5976
|
+
if (found !== void 0) return found;
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
};
|
|
5980
|
+
var registry;
|
|
5981
|
+
/** The process-wide registry. */
|
|
5982
|
+
function getCommandHoldOverrideRegistry() {
|
|
5983
|
+
registry ??= new CommandHoldOverrideRegistry();
|
|
5984
|
+
return registry;
|
|
5985
|
+
}
|
|
5986
|
+
//#endregion
|
|
5942
5987
|
//#region src/kernel/moleculer/accessory-prune-gate.ts
|
|
5943
5988
|
function isSpecList(answer) {
|
|
5944
5989
|
return Array.isArray(answer);
|
|
@@ -6096,7 +6141,21 @@ var workerNativeCaps = /* @__PURE__ */ new Map();
|
|
|
6096
6141
|
* the pull-based discovery sweep.
|
|
6097
6142
|
*/
|
|
6098
6143
|
var workerNativeCapAddonIds = /* @__PURE__ */ new Map();
|
|
6144
|
+
/**
|
|
6145
|
+
* The command-hold options a provider stated at registration (D1061).
|
|
6146
|
+
* capName → deviceId → options. Carried on the child's cap descriptors so the
|
|
6147
|
+
* hub's hold reads them; absent = the core default.
|
|
6148
|
+
*/
|
|
6149
|
+
var workerNativeCapHolds = /* @__PURE__ */ new Map();
|
|
6099
6150
|
var mountedNativeCapServices = /* @__PURE__ */ new Set();
|
|
6151
|
+
/** A provider's hold options as plain data, or `undefined` when it stated none. */
|
|
6152
|
+
function commandHoldsOf(options) {
|
|
6153
|
+
const commands = options?.commands;
|
|
6154
|
+
if (commands === void 0) return void 0;
|
|
6155
|
+
const out = {};
|
|
6156
|
+
for (const [method, option] of Object.entries(commands)) if (option !== void 0) out[method] = option;
|
|
6157
|
+
return Object.keys(out).length === 0 ? void 0 : out;
|
|
6158
|
+
}
|
|
6100
6159
|
/**
|
|
6101
6160
|
* Optional change listener fired whenever the worker native-cap set mutates
|
|
6102
6161
|
* (a `registerNativeCap` adds a (cap, device) pair, or a device is cleared).
|
|
@@ -6205,7 +6264,19 @@ function getWorkerNativeCapSnapshot() {
|
|
|
6205
6264
|
});
|
|
6206
6265
|
}
|
|
6207
6266
|
}
|
|
6208
|
-
return [...grouped.values()]
|
|
6267
|
+
return [...grouped.values()].map((entry) => {
|
|
6268
|
+
const holds = workerNativeCapHolds.get(entry.capName);
|
|
6269
|
+
if (holds === void 0) return entry;
|
|
6270
|
+
const forEntry = /* @__PURE__ */ new Map();
|
|
6271
|
+
for (const deviceId of entry.deviceIds) {
|
|
6272
|
+
const options = holds.get(deviceId);
|
|
6273
|
+
if (options !== void 0) forEntry.set(deviceId, options);
|
|
6274
|
+
}
|
|
6275
|
+
return forEntry.size === 0 ? entry : {
|
|
6276
|
+
...entry,
|
|
6277
|
+
commandHolds: forEntry
|
|
6278
|
+
};
|
|
6279
|
+
});
|
|
6209
6280
|
}
|
|
6210
6281
|
function getWorkerNativeCapsForDevice(deviceId) {
|
|
6211
6282
|
const caps = [];
|
|
@@ -6363,7 +6434,8 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6363
6434
|
get devices() {
|
|
6364
6435
|
return selfApi;
|
|
6365
6436
|
},
|
|
6366
|
-
registerNativeCap(cap, provider) {
|
|
6437
|
+
registerNativeCap(cap, provider, options) {
|
|
6438
|
+
const commandHolds = commandHoldsOf(options);
|
|
6367
6439
|
if (cap.runtimeState && runtimeStateRef) try {
|
|
6368
6440
|
runtimeStateRef.installCapSchema(cap.name, cap.runtimeState);
|
|
6369
6441
|
} catch (err) {
|
|
@@ -6396,8 +6468,15 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6396
6468
|
readSlice: () => runtimeStateRef?.getCapState("switch"),
|
|
6397
6469
|
logger: opts.logger
|
|
6398
6470
|
});
|
|
6399
|
-
if (opts.capabilityRegistry)
|
|
6400
|
-
|
|
6471
|
+
if (opts.capabilityRegistry) {
|
|
6472
|
+
opts.capabilityRegistry.registerNativeProvider(cap.name, id, addonId, finalProvider);
|
|
6473
|
+
if (commandHolds !== void 0) getCommandHoldOverrideRegistry().set(IN_PROCESS_HOLD_SOURCE, {
|
|
6474
|
+
deviceId: id,
|
|
6475
|
+
capName: cap.name,
|
|
6476
|
+
commands: commandHolds
|
|
6477
|
+
});
|
|
6478
|
+
else getCommandHoldOverrideRegistry().delete(IN_PROCESS_HOLD_SOURCE, id, cap.name);
|
|
6479
|
+
} else if (opts.broker || opts.udsMode) {
|
|
6401
6480
|
let perCap = workerNativeCaps.get(cap.name);
|
|
6402
6481
|
if (!perCap) {
|
|
6403
6482
|
perCap = /* @__PURE__ */ new Map();
|
|
@@ -6410,6 +6489,11 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6410
6489
|
workerNativeCapAddonIds.set(cap.name, perAddonId);
|
|
6411
6490
|
}
|
|
6412
6491
|
perAddonId.set(id, addonId);
|
|
6492
|
+
if (commandHolds !== void 0) {
|
|
6493
|
+
const perHolds = workerNativeCapHolds.get(cap.name) ?? /* @__PURE__ */ new Map();
|
|
6494
|
+
perHolds.set(id, commandHolds);
|
|
6495
|
+
workerNativeCapHolds.set(cap.name, perHolds);
|
|
6496
|
+
} else workerNativeCapHolds.get(cap.name)?.delete(id);
|
|
6413
6497
|
if (opts.broker) mountNativeCapService(opts.broker, addonId, cap);
|
|
6414
6498
|
onWorkerNativeCapsChanged?.();
|
|
6415
6499
|
} else throw new Error(`DeviceContext.registerNativeCap('${cap.name}') called on '${stableId}' but none of capabilityRegistry / broker / udsMode was provided.`);
|
|
@@ -6463,10 +6547,13 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6463
6547
|
},
|
|
6464
6548
|
meta: { capName }
|
|
6465
6549
|
});
|
|
6466
|
-
else if (opts.capabilityRegistry)
|
|
6467
|
-
|
|
6550
|
+
else if (opts.capabilityRegistry) {
|
|
6551
|
+
opts.capabilityRegistry.unregisterNativeProvider(capName, id);
|
|
6552
|
+
getCommandHoldOverrideRegistry().delete(IN_PROCESS_HOLD_SOURCE, id, capName);
|
|
6553
|
+
} else {
|
|
6468
6554
|
workerNativeCaps.get(capName)?.delete(id);
|
|
6469
6555
|
workerNativeCapAddonIds.get(capName)?.delete(id);
|
|
6556
|
+
workerNativeCapHolds.get(capName)?.delete(id);
|
|
6470
6557
|
onWorkerNativeCapsChanged?.();
|
|
6471
6558
|
}
|
|
6472
6559
|
eventBus.emit({
|
|
@@ -11734,12 +11821,16 @@ function buildChildCapDescriptors(manifest, nativeCapSnapshot) {
|
|
|
11734
11821
|
});
|
|
11735
11822
|
}
|
|
11736
11823
|
}
|
|
11737
|
-
for (const { capName, addonId, deviceIds } of nativeCapSnapshot) for (const deviceId of deviceIds)
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11742
|
-
|
|
11824
|
+
for (const { capName, addonId, deviceIds, commandHolds } of nativeCapSnapshot) for (const deviceId of deviceIds) {
|
|
11825
|
+
const holds = commandHolds?.get(deviceId);
|
|
11826
|
+
descriptors.push({
|
|
11827
|
+
capName,
|
|
11828
|
+
mode: "collection",
|
|
11829
|
+
deviceId,
|
|
11830
|
+
addonId,
|
|
11831
|
+
...holds !== void 0 ? { commandHolds: holds } : {}
|
|
11832
|
+
});
|
|
11833
|
+
}
|
|
11743
11834
|
return descriptors;
|
|
11744
11835
|
}
|
|
11745
11836
|
//#endregion
|
|
@@ -5884,6 +5884,51 @@ function createChildrenBatchLoader(opts) {
|
|
|
5884
5884
|
} };
|
|
5885
5885
|
}
|
|
5886
5886
|
//#endregion
|
|
5887
|
+
//#region src/kernel/command-hold-overrides.ts
|
|
5888
|
+
/** The source key of an in-process registration. */
|
|
5889
|
+
var IN_PROCESS_HOLD_SOURCE = "in-process";
|
|
5890
|
+
function keyOf(deviceId, capName) {
|
|
5891
|
+
return `${deviceId}|${capName}`;
|
|
5892
|
+
}
|
|
5893
|
+
var CommandHoldOverrideRegistry = class {
|
|
5894
|
+
bySource = /* @__PURE__ */ new Map();
|
|
5895
|
+
/** Record (or replace) one device cap's options from `source`. */
|
|
5896
|
+
set(source, entry) {
|
|
5897
|
+
const perSource = this.bySource.get(source) ?? /* @__PURE__ */ new Map();
|
|
5898
|
+
perSource.set(keyOf(entry.deviceId, entry.capName), entry.commands);
|
|
5899
|
+
this.bySource.set(source, perSource);
|
|
5900
|
+
}
|
|
5901
|
+
/** Forget one device cap's options from `source`. */
|
|
5902
|
+
delete(source, deviceId, capName) {
|
|
5903
|
+
const perSource = this.bySource.get(source);
|
|
5904
|
+
if (perSource === void 0) return;
|
|
5905
|
+
perSource.delete(keyOf(deviceId, capName));
|
|
5906
|
+
if (perSource.size === 0) this.bySource.delete(source);
|
|
5907
|
+
}
|
|
5908
|
+
/** Replace everything `source` reported with `entries` (an empty list forgets the source). */
|
|
5909
|
+
replaceSource(source, entries) {
|
|
5910
|
+
if (entries.length === 0) {
|
|
5911
|
+
this.bySource.delete(source);
|
|
5912
|
+
return;
|
|
5913
|
+
}
|
|
5914
|
+
this.bySource.set(source, new Map(entries.map((e) => [keyOf(e.deviceId, e.capName), e.commands])));
|
|
5915
|
+
}
|
|
5916
|
+
/** The options for a device cap, from whichever source registered it; `undefined` = default. */
|
|
5917
|
+
get(deviceId, capName) {
|
|
5918
|
+
const key = keyOf(deviceId, capName);
|
|
5919
|
+
for (const perSource of this.bySource.values()) {
|
|
5920
|
+
const found = perSource.get(key);
|
|
5921
|
+
if (found !== void 0) return found;
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
};
|
|
5925
|
+
var registry;
|
|
5926
|
+
/** The process-wide registry. */
|
|
5927
|
+
function getCommandHoldOverrideRegistry() {
|
|
5928
|
+
registry ??= new CommandHoldOverrideRegistry();
|
|
5929
|
+
return registry;
|
|
5930
|
+
}
|
|
5931
|
+
//#endregion
|
|
5887
5932
|
//#region src/kernel/moleculer/accessory-prune-gate.ts
|
|
5888
5933
|
function isSpecList(answer) {
|
|
5889
5934
|
return Array.isArray(answer);
|
|
@@ -6041,7 +6086,21 @@ var workerNativeCaps = /* @__PURE__ */ new Map();
|
|
|
6041
6086
|
* the pull-based discovery sweep.
|
|
6042
6087
|
*/
|
|
6043
6088
|
var workerNativeCapAddonIds = /* @__PURE__ */ new Map();
|
|
6089
|
+
/**
|
|
6090
|
+
* The command-hold options a provider stated at registration (D1061).
|
|
6091
|
+
* capName → deviceId → options. Carried on the child's cap descriptors so the
|
|
6092
|
+
* hub's hold reads them; absent = the core default.
|
|
6093
|
+
*/
|
|
6094
|
+
var workerNativeCapHolds = /* @__PURE__ */ new Map();
|
|
6044
6095
|
var mountedNativeCapServices = /* @__PURE__ */ new Set();
|
|
6096
|
+
/** A provider's hold options as plain data, or `undefined` when it stated none. */
|
|
6097
|
+
function commandHoldsOf(options) {
|
|
6098
|
+
const commands = options?.commands;
|
|
6099
|
+
if (commands === void 0) return void 0;
|
|
6100
|
+
const out = {};
|
|
6101
|
+
for (const [method, option] of Object.entries(commands)) if (option !== void 0) out[method] = option;
|
|
6102
|
+
return Object.keys(out).length === 0 ? void 0 : out;
|
|
6103
|
+
}
|
|
6045
6104
|
/**
|
|
6046
6105
|
* Optional change listener fired whenever the worker native-cap set mutates
|
|
6047
6106
|
* (a `registerNativeCap` adds a (cap, device) pair, or a device is cleared).
|
|
@@ -6150,7 +6209,19 @@ function getWorkerNativeCapSnapshot() {
|
|
|
6150
6209
|
});
|
|
6151
6210
|
}
|
|
6152
6211
|
}
|
|
6153
|
-
return [...grouped.values()]
|
|
6212
|
+
return [...grouped.values()].map((entry) => {
|
|
6213
|
+
const holds = workerNativeCapHolds.get(entry.capName);
|
|
6214
|
+
if (holds === void 0) return entry;
|
|
6215
|
+
const forEntry = /* @__PURE__ */ new Map();
|
|
6216
|
+
for (const deviceId of entry.deviceIds) {
|
|
6217
|
+
const options = holds.get(deviceId);
|
|
6218
|
+
if (options !== void 0) forEntry.set(deviceId, options);
|
|
6219
|
+
}
|
|
6220
|
+
return forEntry.size === 0 ? entry : {
|
|
6221
|
+
...entry,
|
|
6222
|
+
commandHolds: forEntry
|
|
6223
|
+
};
|
|
6224
|
+
});
|
|
6154
6225
|
}
|
|
6155
6226
|
function getWorkerNativeCapsForDevice(deviceId) {
|
|
6156
6227
|
const caps = [];
|
|
@@ -6308,7 +6379,8 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6308
6379
|
get devices() {
|
|
6309
6380
|
return selfApi;
|
|
6310
6381
|
},
|
|
6311
|
-
registerNativeCap(cap, provider) {
|
|
6382
|
+
registerNativeCap(cap, provider, options) {
|
|
6383
|
+
const commandHolds = commandHoldsOf(options);
|
|
6312
6384
|
if (cap.runtimeState && runtimeStateRef) try {
|
|
6313
6385
|
runtimeStateRef.installCapSchema(cap.name, cap.runtimeState);
|
|
6314
6386
|
} catch (err) {
|
|
@@ -6341,8 +6413,15 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6341
6413
|
readSlice: () => runtimeStateRef?.getCapState("switch"),
|
|
6342
6414
|
logger: opts.logger
|
|
6343
6415
|
});
|
|
6344
|
-
if (opts.capabilityRegistry)
|
|
6345
|
-
|
|
6416
|
+
if (opts.capabilityRegistry) {
|
|
6417
|
+
opts.capabilityRegistry.registerNativeProvider(cap.name, id, addonId, finalProvider);
|
|
6418
|
+
if (commandHolds !== void 0) getCommandHoldOverrideRegistry().set(IN_PROCESS_HOLD_SOURCE, {
|
|
6419
|
+
deviceId: id,
|
|
6420
|
+
capName: cap.name,
|
|
6421
|
+
commands: commandHolds
|
|
6422
|
+
});
|
|
6423
|
+
else getCommandHoldOverrideRegistry().delete(IN_PROCESS_HOLD_SOURCE, id, cap.name);
|
|
6424
|
+
} else if (opts.broker || opts.udsMode) {
|
|
6346
6425
|
let perCap = workerNativeCaps.get(cap.name);
|
|
6347
6426
|
if (!perCap) {
|
|
6348
6427
|
perCap = /* @__PURE__ */ new Map();
|
|
@@ -6355,6 +6434,11 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6355
6434
|
workerNativeCapAddonIds.set(cap.name, perAddonId);
|
|
6356
6435
|
}
|
|
6357
6436
|
perAddonId.set(id, addonId);
|
|
6437
|
+
if (commandHolds !== void 0) {
|
|
6438
|
+
const perHolds = workerNativeCapHolds.get(cap.name) ?? /* @__PURE__ */ new Map();
|
|
6439
|
+
perHolds.set(id, commandHolds);
|
|
6440
|
+
workerNativeCapHolds.set(cap.name, perHolds);
|
|
6441
|
+
} else workerNativeCapHolds.get(cap.name)?.delete(id);
|
|
6358
6442
|
if (opts.broker) mountNativeCapService(opts.broker, addonId, cap);
|
|
6359
6443
|
onWorkerNativeCapsChanged?.();
|
|
6360
6444
|
} else throw new Error(`DeviceContext.registerNativeCap('${cap.name}') called on '${stableId}' but none of capabilityRegistry / broker / udsMode was provided.`);
|
|
@@ -6408,10 +6492,13 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
6408
6492
|
},
|
|
6409
6493
|
meta: { capName }
|
|
6410
6494
|
});
|
|
6411
|
-
else if (opts.capabilityRegistry)
|
|
6412
|
-
|
|
6495
|
+
else if (opts.capabilityRegistry) {
|
|
6496
|
+
opts.capabilityRegistry.unregisterNativeProvider(capName, id);
|
|
6497
|
+
getCommandHoldOverrideRegistry().delete(IN_PROCESS_HOLD_SOURCE, id, capName);
|
|
6498
|
+
} else {
|
|
6413
6499
|
workerNativeCaps.get(capName)?.delete(id);
|
|
6414
6500
|
workerNativeCapAddonIds.get(capName)?.delete(id);
|
|
6501
|
+
workerNativeCapHolds.get(capName)?.delete(id);
|
|
6415
6502
|
onWorkerNativeCapsChanged?.();
|
|
6416
6503
|
}
|
|
6417
6504
|
eventBus.emit({
|
|
@@ -11679,12 +11766,16 @@ function buildChildCapDescriptors(manifest, nativeCapSnapshot) {
|
|
|
11679
11766
|
});
|
|
11680
11767
|
}
|
|
11681
11768
|
}
|
|
11682
|
-
for (const { capName, addonId, deviceIds } of nativeCapSnapshot) for (const deviceId of deviceIds)
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11769
|
+
for (const { capName, addonId, deviceIds, commandHolds } of nativeCapSnapshot) for (const deviceId of deviceIds) {
|
|
11770
|
+
const holds = commandHolds?.get(deviceId);
|
|
11771
|
+
descriptors.push({
|
|
11772
|
+
capName,
|
|
11773
|
+
mode: "collection",
|
|
11774
|
+
deviceId,
|
|
11775
|
+
addonId,
|
|
11776
|
+
...holds !== void 0 ? { commandHolds: holds } : {}
|
|
11777
|
+
});
|
|
11778
|
+
}
|
|
11688
11779
|
return descriptors;
|
|
11689
11780
|
}
|
|
11690
11781
|
//#endregion
|
|
@@ -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-CCd8IeIU.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 { Pn as addonPagesCapability, _u as EventCategory, hc as BaseAddon, hu as errMsg } from "../../dist-D7t8wLTF.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-CCd8IeIU.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 { In as addonWidgetsCapability, _u as EventCategory, hc as BaseAddon, hu as errMsg } from "../../dist-D7t8wLTF.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-CCd8IeIU.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 { E as CORE_BLOCK_ADDON_PREFIX, Ln as alertEpisodeId, Mi as isAlertEpisodeSeverity, Rn as alertEpisodePayload, _l as defineRecordKinds, _u as EventCategory, fl as createEvent, hc as BaseAddon, hu as errMsg, ji as isAlertEpisodeOpen, p as AlertSchema, zn as alertsCapability } from "../../dist-D7t8wLTF.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-CCd8IeIU.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 { Al as isEvent, Gn as bareAddonId, Ya as ptzAutotrackCapability, _u as EventCategory, hc as BaseAddon, hu as errMsg, mt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-D7t8wLTF.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-CCd8IeIU.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-CZkQO8t3.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 { Hl as nodePin, Qo as storageOccupancyCapability, Wn as backupCapability, _u as EventCategory, hc as BaseAddon, iu as toNodeId, ua as mayWriteToLocation } from "../../dist-D7t8wLTF.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-2L5TymvF.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-CCd8IeIU.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 { O as CalendarPreferencesSchema, _l as defineRecordKinds, er as calendarsCapability, hc as BaseAddon } from "../../dist-D7t8wLTF.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-CCd8IeIU.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 {
|
|
1
|
+
import { As as COMPOSER_ADDON_ID, B as DERIVED_CAMERA_SILENCED_CAP_NAMES, El as hydrateSchema, Gn as bareAddonId, Ko as snapshotCapability, Lo as selectEngineHostedBlocks, Lt as MOTION_CLOSE_AFTER_MS, Qi as legacySweepDone, Tt as HostedWithdrawalGate, _u as EventCategory, ba as motionCapability, es as streamCatalogCapability, fl as createEvent, fu as DeviceFeature, hc as BaseAddon, hu as errMsg, jr as declarationOwnerNodeId, mr as compileHelper, pa as memoizePinnedFfmpeg, rs as sweepLegacyEngineRows, tr as cameraGridLayoutCapability, v as BaseDevice, wi as hostEngineDevice, zs as buildFfmpegArgs } from "../../dist-D7t8wLTF.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { promises } from "node:fs";
|
|
@@ -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
|
|
8
|
-
const
|
|
6
|
+
const require_dist = require("../../dist-CCd8IeIU.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-BWS0KTbm.js");
|
|
8
|
+
const require_composition_sources = require("../../composition-sources-CDOW1dnY.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-2Z2ED7Og.js");
|
|
11
11
|
let zod = require("zod");
|
|
12
12
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
13
13
|
/**
|
|
@@ -5409,7 +5409,7 @@ function entriesOf(request) {
|
|
|
5409
5409
|
}))];
|
|
5410
5410
|
}
|
|
5411
5411
|
function valueAtPath(slice, path) {
|
|
5412
|
-
return path.split(".").reduce((node, segment) =>
|
|
5412
|
+
return path.split(".").reduce((node, segment) => require_capture_engine.isRecord(node) ? node[segment] : void 0, slice);
|
|
5413
5413
|
}
|
|
5414
5414
|
function onlineOf(slice) {
|
|
5415
5415
|
const online = slice["online"];
|
|
@@ -6076,12 +6076,12 @@ var DECLARED_INTEGRATION_NAME_UNUSED = "Blocks";
|
|
|
6076
6076
|
var PULSE_HISTORY_MAX_POINTS = 5e3;
|
|
6077
6077
|
/** The owner-only shadow payload is not in the typed catalog: narrowed at the boundary, like `device.state-changed`. */
|
|
6078
6078
|
function parseNativeShadowChanged(data) {
|
|
6079
|
-
if (!
|
|
6079
|
+
if (!require_capture_engine.isRecord(data)) return null;
|
|
6080
6080
|
const deviceId = data["deviceId"];
|
|
6081
6081
|
const capName = data["capName"];
|
|
6082
6082
|
const native = data["native"];
|
|
6083
6083
|
if (typeof deviceId !== "number" || typeof capName !== "string") return null;
|
|
6084
|
-
if (!
|
|
6084
|
+
if (!require_capture_engine.isRecord(native)) return null;
|
|
6085
6085
|
return {
|
|
6086
6086
|
deviceId,
|
|
6087
6087
|
capName,
|
|
@@ -6143,7 +6143,8 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6143
6143
|
capName
|
|
6144
6144
|
}) : await api.deviceState.getCapSlice.query({
|
|
6145
6145
|
deviceId,
|
|
6146
|
-
capName
|
|
6146
|
+
capName,
|
|
6147
|
+
confirmed: true
|
|
6147
6148
|
});
|
|
6148
6149
|
return slice === null || slice === void 0 ? { kind: "none" } : {
|
|
6149
6150
|
kind: "slice",
|
|
@@ -6182,7 +6183,8 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6182
6183
|
logger: logger.child("graft")
|
|
6183
6184
|
}, lookupCap, async (deviceId, capName) => await api.deviceState.getCapSlice.query({
|
|
6184
6185
|
deviceId,
|
|
6185
|
-
capName
|
|
6186
|
+
capName,
|
|
6187
|
+
confirmed: true
|
|
6186
6188
|
}) ?? null);
|
|
6187
6189
|
this.composer = new Composer({
|
|
6188
6190
|
logger: logger.child("composer"),
|
|
@@ -6220,7 +6222,8 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6220
6222
|
events: this.ctx.eventBus,
|
|
6221
6223
|
readExistingTargetCap: async (deviceId, capName) => await api.deviceState.getCapSlice.query({
|
|
6222
6224
|
deviceId,
|
|
6223
|
-
capName
|
|
6225
|
+
capName,
|
|
6226
|
+
confirmed: true
|
|
6224
6227
|
}) ?? null,
|
|
6225
6228
|
readPulseHistory: async (deviceId, cap, fieldPath, fromMs, toMs) => {
|
|
6226
6229
|
try {
|
|
@@ -6441,7 +6444,7 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6441
6444
|
}, call)
|
|
6442
6445
|
});
|
|
6443
6446
|
this.subscribe({ category: require_dist.EventCategory.DeviceStateChanged }, (event) => {
|
|
6444
|
-
const data =
|
|
6447
|
+
const data = require_capture_engine.parseConfirmedStateChanged(event.data);
|
|
6445
6448
|
if (data !== null) this.composer?.onStateChanged(data).catch((err) => {
|
|
6446
6449
|
this.logEventFailure("device.state-changed", data.deviceId, err);
|
|
6447
6450
|
});
|