@camstack/server 1.2.820 → 1.2.822
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/dist/api/trpc/generated-cap-mounts.js +3 -1
- package/dist/api/trpc/generated-cap-routers.js +1863 -1697
- package/package.json +10 -24
- package/system/dist/{agent-https-XHjvcSEq.mjs → agent-https-C4yxMErF.mjs} +1 -1
- package/system/dist/{agent-https-CbysxRlV.js → agent-https-SGBI0xP8.js} +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/actions-service.d.ts +16 -0
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +158 -9
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +158 -9
- package/system/dist/builtins/core-blocks/device-template-door.d.ts +25 -0
- package/system/dist/builtins/core-blocks/fan-presets-service.d.ts +5 -0
- package/system/dist/builtins/core-blocks/hero-layout-service.d.ts +2 -0
- package/system/dist/builtins/core-blocks/scheduler/scheduler-engine.d.ts +5 -0
- package/system/dist/builtins/core-blocks/step-condition-door.d.ts +19 -0
- 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.d.ts +7 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +655 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +653 -1
- package/system/dist/builtins/device-manager/device-template/template-host.d.ts +60 -0
- package/system/dist/builtins/device-manager/device-template-actions.d.ts +33 -0
- 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 +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 +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 +9 -9
- package/system/dist/builtins/system-config/system-config.addon.mjs +6 -6
- 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-CKtkENOg.js → capture-engine-6MVUyUry.js} +1 -1
- package/system/dist/{capture-engine-WSpdP-gE.mjs → capture-engine-BSjE-CQA.mjs} +1 -1
- package/system/dist/{composition-sources-6Qx72gmK.js → composition-sources-BBAOXZdC.js} +1 -1
- package/system/dist/{composition-sources-Dr6uwBGw.mjs → composition-sources-C8T9DRbZ.mjs} +1 -1
- package/system/dist/{constants-URzk8siY.mjs → constants-CReG6K4k.mjs} +1 -1
- package/system/dist/{constants-BchSDmTD.js → constants-v0g9--wN.js} +1 -1
- package/system/dist/{device-ca-kANxsBE5.js → device-ca-BFcBTfff.js} +1 -1
- package/system/dist/{device-ca-Bu1E5Vgr.mjs → device-ca-cX8qUs2s.mjs} +1 -1
- package/system/dist/device-template-worker.js +5 -7032
- package/system/dist/device-template-worker.mjs +1 -7026
- package/system/dist/{dist-R_mOSFtH.js → dist-C2czR9xK.js} +2077 -167
- package/system/dist/{dist-C0Df8iJl.mjs → dist-DjBZ1HhF.mjs} +2036 -168
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-pxgLcmqO.mjs → hub-mdns-ciao-Cnr8xiSd.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-2AZ3ucDO.js → hub-mdns-ciao-CpCleue0.js} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/{legacy-integration-rows-door-Cj58BS60.mjs → legacy-integration-rows-door-CGajkVPh.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-g4CeLJ9g.js → legacy-integration-rows-door-DhW6mPZj.js} +1 -1
- package/system/dist/{restore-archive-CAh7u-rY.js → restore-archive-BLab80kx.js} +7 -7
- package/system/dist/{restore-archive-Bd7fgVo8.mjs → restore-archive-eA7L58KT.mjs} +8 -8
- package/system/dist/template-protocol-BmMM5VBf.mjs +7033 -0
- package/system/dist/template-protocol-CTP4eAo_.js +7059 -0
- package/system/dist/{wal-maintenance-DMf2oEQ-.mjs → wal-maintenance-DeBxoOFh.mjs} +0 -0
- package/system/dist/{wal-maintenance--0liHBxL.js → wal-maintenance-DhnSF7K-.js} +0 -0
- package/system/package.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.822",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,24 +66,10 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-agent-ui": ">=1.2.
|
|
71
|
-
"@camstack/addon-
|
|
72
|
-
"@camstack/addon-
|
|
73
|
-
"@camstack/addon-import-alexa": ">=0.2.200",
|
|
74
|
-
"@camstack/addon-matter-broker": ">=0.2.165",
|
|
75
|
-
"@camstack/addon-mqtt-broker": ">=1.2.158",
|
|
76
|
-
"@camstack/addon-notifiers": ">=1.2.635",
|
|
77
|
-
"@camstack/addon-pipeline-orchestrator": ">=1.2.675",
|
|
78
|
-
"@camstack/addon-post-analysis": ">=1.2.688",
|
|
79
|
-
"@camstack/addon-provider-dreame": ">=0.2.173",
|
|
80
|
-
"@camstack/addon-provider-dreo": ">=0.2.163",
|
|
81
|
-
"@camstack/addon-provider-homeassistant": ">=1.2.676",
|
|
82
|
-
"@camstack/addon-provider-petkit": ">=0.2.168",
|
|
83
|
-
"@camstack/addon-provider-tuya": ">=0.2.158",
|
|
84
|
-
"@camstack/addon-provider-wyze": ">=0.2.172",
|
|
85
|
-
"@camstack/addon-smtp-nodemailer": ">=1.2.155",
|
|
86
|
-
"@camstack/addon-waste-collections": ">=0.1.42"
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.629",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.354",
|
|
71
|
+
"@camstack/addon-post-analysis": ">=1.2.689",
|
|
72
|
+
"@camstack/addon-provider-bosch": ">=0.1.46"
|
|
87
73
|
},
|
|
88
74
|
"wrapper": {
|
|
89
75
|
"desktop": ">=0.0.1",
|
|
@@ -92,19 +78,19 @@
|
|
|
92
78
|
}
|
|
93
79
|
},
|
|
94
80
|
"dependencies": {
|
|
95
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
96
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
81
|
+
"@camstack/addon-admin-ui": "1.2.629",
|
|
82
|
+
"@camstack/addon-agent-ui": "1.2.354",
|
|
97
83
|
"@camstack/addon-auth": "1.2.180",
|
|
98
84
|
"@camstack/addon-benchmark": "1.2.312",
|
|
99
85
|
"@camstack/addon-decoder-nodeav": "1.2.149",
|
|
100
86
|
"@camstack/addon-notifiers": "1.2.635",
|
|
101
87
|
"@camstack/addon-pipeline": "1.2.648",
|
|
102
88
|
"@camstack/addon-pipeline-orchestrator": "1.2.675",
|
|
103
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
89
|
+
"@camstack/addon-post-analysis": "1.2.689",
|
|
104
90
|
"@camstack/develop": "0.1.51",
|
|
105
91
|
"@camstack/sdk": "1.2.157",
|
|
106
|
-
"@camstack/types": "1.2.
|
|
107
|
-
"@camstack/ui-library": "1.2.
|
|
92
|
+
"@camstack/types": "1.2.536",
|
|
93
|
+
"@camstack/ui-library": "1.2.413",
|
|
108
94
|
"@fastify/compress": "^9.0.0",
|
|
109
95
|
"@fastify/cookie": "^11.0.2",
|
|
110
96
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sc as defineRecordKinds } from "./dist-DjBZ1HhF.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";
|
|
@@ -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-C2czR9xK.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");
|
|
@@ -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-C2czR9xK.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 { gn as addonPagesCapability, il as EventCategory, nl as errMsg, os as BaseAddon } from "../../dist-DjBZ1HhF.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-C2czR9xK.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 { il as EventCategory, nl as errMsg, os as BaseAddon, vn as addonWidgetsCapability } from "../../dist-DjBZ1HhF.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-C2czR9xK.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 { $r as isAlertEpisodeSeverity, Qr as isAlertEpisodeOpen, bn as alertEpisodePayload, f as AlertSchema, il as EventCategory, nc as createEvent, nl as errMsg, os as BaseAddon, sc as defineRecordKinds, w as CORE_BLOCK_ADDON_PREFIX, xn as alertsCapability, yn as alertEpisodeId } from "../../dist-DjBZ1HhF.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-C2czR9xK.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 { En as bareAddonId, bc as isEvent, il as EventCategory, nl as errMsg, os as BaseAddon, ot as FIRST_LEVEL_MACRO_CLASSES, sa as ptzAutotrackCapability } from "../../dist-DjBZ1HhF.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-C2czR9xK.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-BLab80kx.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 { $a as storageOccupancyCapability, Mc as nodePin, Ti as mayWriteToLocation, Tn as backupCapability, il as EventCategory, os as BaseAddon, qc as toNodeId } from "../../dist-DjBZ1HhF.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-eA7L58KT.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-C2czR9xK.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 { E as CalendarPreferencesSchema, Fn as calendarsCapability, os as BaseAddon, sc as defineRecordKinds } from "../../dist-DjBZ1HhF.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-C2czR9xK.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let _camstack_types_node = require("@camstack/types/node");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $
|
|
1
|
+
import { $c as DeviceFeature, As as RecordIntegrationInstances, Dt as MOTION_CLOSE_AFTER_MS, En as bareAddonId, Fo as buildFfmpegArgs, In as cameraGridLayoutCapability, Oi as memoizePinnedFfmpeg, Pi as motionCapability, Yr as integrationInstancesCapability, Z as DeclaredDevices, gc as hydrateSchema, h as BaseDevice, il as EventCategory, lr as declarationOwnerNodeId, nc as createEvent, nl as errMsg, oc as defineEntryKind, os as BaseAddon, qa as snapshotCapability, tl as DeviceType, to as streamCatalogCapability, xc as isInstanceEnabled, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-DjBZ1HhF.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
@@ -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_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-C2czR9xK.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-BBAOXZdC.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-6MVUyUry.js");
|
|
9
9
|
const require_retention = require("../../retention-BcOSL6b9.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-
|
|
3
|
-
import { i as capSeriesKey } from "../../capture-engine-
|
|
1
|
+
import { $o as openReset, An as buildCapabilityLookup, Ao as HISTORY_FAST_MS, Bo as compositionItemFieldPath, Cc as isReadingQuantity, Co as withDefaultRunning, Di as mediaPlayerFeaturesOfRoles, Ei as mediaPlayerCapability, Eo as COMPOSER_ADDON_ID, Fr as fanControlCapability, Go as evaluateDerivative, Ha as sharedActuatorMethods, Ho as compositionSourceKey, Io as cloneStatefulExpressionMemory, Ir as fanOutTargets, It as PetFountainStatusSchema, Ji as petFountainCapability, Jo as historyRetentionFromSettings, Ki as parseColorInput, Kn as colorCapability, Ko as evaluateStatistic, Kr as groupCommandsCapability, Lo as composedDeviceRef, Mo as HOUR_MS, Nr as expressionContainsBuiltinCall, On as brightnessCapability, Or as evaluateCompositionField, Pi as motionCapability, Po as MINUTE_MS, Qn as consumablesCapability, Qo as nextLocalMidnight, Ro as composedDeviceStableId, Rr as featureForwards, Ta as resolveMutate, Ua as sharedColorModes, Un as climateControlCapability, Uo as createStatefulExpressionMemory, Va as sharedActuatorFeatures, Vo as compositionSliceKey, Wo as disarmRoseMemory, Xn as compositionFieldKey, Xo as isForwardInputRef, Yi as petFountainWaterItem, Yn as composerCapability, Yo as integrateReading, Z as DeclaredDevices, Zi as planComposition, Zo as isHistoryHelper, _t as HvacModeSchema, ct as FanDirectionSchema, es as openStatistic, ft as GroupCommandResultSchema, h as BaseDevice, i as ACTUATOR_TEMPLATE_IDS, ia as processTimeZoneOr, il as EventCategory, io as switchCapability, ir as coverCapability, is as toExpressionValue, ja as runFanOut, jo as HISTORY_SLOW_MS, k as ConsumableItemSchema, ki as methodRefusal, ko as DEFAULT_HISTORY_RETENTION, nc as createEvent, nl as errMsg, ns as planStatisticTier, os as BaseAddon, qr as groupTemplate, r as ACTUATOR_METHODS, rl as featuresOfBoundCaps, rs as statisticCadenceMs, s as ALL_CAPABILITY_DEFINITIONS, tl as DeviceType, ts as planResetTier, ui as kebabToCamel, ur as declaredSeriesKind, vo as valveCapability, x as COMPOSED_ITEM_FIXED_FIELDS, yi as lockControlCapability, zo as compositionFeatureEnabled } from "../../dist-DjBZ1HhF.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-C8T9DRbZ.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-BSjE-CQA.mjs";
|
|
4
4
|
import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-CUOVI1p7.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/builtins/composer/actuator-invoke.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-C2czR9xK.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 { os as BaseAddon, xi as logDestinationCapability } from "../../dist-DjBZ1HhF.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,5 +1,7 @@
|
|
|
1
1
|
import { type ActionEntry, type ActionLinks, type ActionRunChanged, type ActionRunResult, type ActionVariableValue, type AutomationRunTrace, type DeviceDirectory, type CapCall, type IActionsProvider, type IScopedLogger, type UnitResolver, type UnitWarning } from "@camstack/types";
|
|
2
2
|
import type { ActionsStore } from "./actions-store.js";
|
|
3
|
+
import { type DeviceTemplateDoor } from "./device-template-door.js";
|
|
4
|
+
import { type StepConditionDoor } from "./step-condition-door.js";
|
|
3
5
|
import { type RunsLedger } from "./runs-ledger.js";
|
|
4
6
|
/** The `action-source` providers, reached through `ctx.api`. */
|
|
5
7
|
export interface ActionSources {
|
|
@@ -31,6 +33,10 @@ export interface ActionsServiceDeps {
|
|
|
31
33
|
readonly maxRunMs?: number;
|
|
32
34
|
/** How long a stopped run is given to wind down before its call is answered anyway. */
|
|
33
35
|
readonly stopGraceMs?: number;
|
|
36
|
+
/** The device template renderer (D1021); absent where there is none, and a templated step then fails. */
|
|
37
|
+
readonly templates?: DeviceTemplateDoor;
|
|
38
|
+
/** Reads a conditional step's `if` (#472). */
|
|
39
|
+
readonly conditions?: StepConditionDoor;
|
|
34
40
|
}
|
|
35
41
|
type RunInput = Parameters<IActionsProvider["run"]>[0];
|
|
36
42
|
type GetInput = Parameters<IActionsProvider["get"]>[0];
|
|
@@ -45,6 +51,8 @@ export declare class ActionsService implements IActionsProvider {
|
|
|
45
51
|
private readonly newRunId;
|
|
46
52
|
private readonly units;
|
|
47
53
|
private readonly targets;
|
|
54
|
+
private readonly templates;
|
|
55
|
+
private readonly conditions;
|
|
48
56
|
private readonly running;
|
|
49
57
|
private readonly maxRunMs;
|
|
50
58
|
private readonly stopGraceMs;
|
|
@@ -78,6 +86,14 @@ export declare class ActionsService implements IActionsProvider {
|
|
|
78
86
|
* camera has to link the action. Refused with `not-linked`, and logged.
|
|
79
87
|
*/
|
|
80
88
|
private authorize;
|
|
89
|
+
/**
|
|
90
|
+
* The devices a run's templates may read. An admin (or an in-process block)
|
|
91
|
+
* reads any (`undefined`); a non-admin only the camera the scope gate proved
|
|
92
|
+
* it may see — fail-closed, because the gate proves nothing about any other.
|
|
93
|
+
*/
|
|
94
|
+
private readableDevices;
|
|
95
|
+
/** A non-admin run is refused up front when a template names a device outside `readable`. */
|
|
96
|
+
private checkTemplateScope;
|
|
81
97
|
run(input: RunInput): Promise<ActionRunResult>;
|
|
82
98
|
private triggerOf;
|
|
83
99
|
/** Never rejects: a run's failure is its outcome. */
|
|
@@ -1,9 +1,9 @@
|
|
|
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-C2czR9xK.js");
|
|
4
4
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
5
|
-
const require_composition_sources = require("../../composition-sources-
|
|
6
|
-
const require_capture_engine = require("../../capture-engine-
|
|
5
|
+
const require_composition_sources = require("../../composition-sources-BBAOXZdC.js");
|
|
6
|
+
const require_capture_engine = require("../../capture-engine-6MVUyUry.js");
|
|
7
7
|
const require_prefix_range = require("../../prefix-range-D_KueXbQ.js");
|
|
8
8
|
const require_prefix_walk = require("../../prefix-walk-Dv6MLZlM.js");
|
|
9
9
|
let zod = require("zod");
|
|
@@ -2786,6 +2786,75 @@ var ADDON_MIGRATIONS = [
|
|
|
2786
2786
|
}
|
|
2787
2787
|
];
|
|
2788
2788
|
//#endregion
|
|
2789
|
+
//#region src/builtins/core-blocks/device-template-door.ts
|
|
2790
|
+
function templateDoorOver(api) {
|
|
2791
|
+
const need = () => {
|
|
2792
|
+
const current = api();
|
|
2793
|
+
if (current === void 0) throw new Error("no ctx.api on this node — templates cannot be rendered");
|
|
2794
|
+
return current;
|
|
2795
|
+
};
|
|
2796
|
+
return {
|
|
2797
|
+
render: async (templates, allowedDeviceIds) => {
|
|
2798
|
+
return (await need().deviceManager.renderDeviceTemplates.query({
|
|
2799
|
+
templates: [...templates],
|
|
2800
|
+
...allowedDeviceIds === void 0 ? {} : { allowedDeviceIds: [...allowedDeviceIds] }
|
|
2801
|
+
})).results;
|
|
2802
|
+
},
|
|
2803
|
+
check: async (templates, allowedDeviceIds) => {
|
|
2804
|
+
return (await need().deviceManager.checkDeviceTemplates.query({
|
|
2805
|
+
templates: [...templates],
|
|
2806
|
+
...allowedDeviceIds === void 0 ? {} : { allowedDeviceIds: [...allowedDeviceIds] }
|
|
2807
|
+
})).results;
|
|
2808
|
+
}
|
|
2809
|
+
};
|
|
2810
|
+
}
|
|
2811
|
+
/** The renderer a step run is given, bound to the devices its caller may read (`undefined` = all). */
|
|
2812
|
+
function stepRenderer(door, allowedDeviceIds) {
|
|
2813
|
+
if (door === void 0) return void 0;
|
|
2814
|
+
return (templates) => door.render(templates, allowedDeviceIds);
|
|
2815
|
+
}
|
|
2816
|
+
//#endregion
|
|
2817
|
+
//#region src/builtins/core-blocks/step-condition-door.ts
|
|
2818
|
+
/**
|
|
2819
|
+
* The core-blocks side of a conditional step (#472): a step's `if` is read on a
|
|
2820
|
+
* mirror filled over `ctx.api` (`deviceState.getCapSlice`), the same state
|
|
2821
|
+
* every other consumer of the ONE `when` tree reads. A run on behalf of a
|
|
2822
|
+
* non-admin may only branch on devices that caller can see — a branch is an
|
|
2823
|
+
* answer, and an out-of-scope answer is a leak — so a tree naming any other
|
|
2824
|
+
* device (or a stable id, which cannot be proven) reads `unknown`: neither side
|
|
2825
|
+
* runs, and the trace says why.
|
|
2826
|
+
*/
|
|
2827
|
+
function conditionDoorOver(api) {
|
|
2828
|
+
return (readable) => async (when) => {
|
|
2829
|
+
const current = api();
|
|
2830
|
+
if (current === void 0) return {
|
|
2831
|
+
result: "unknown",
|
|
2832
|
+
reason: "this node has no ctx.api to read state through"
|
|
2833
|
+
};
|
|
2834
|
+
if (readable !== void 0) {
|
|
2835
|
+
if (require_dist.collectWhenMirrorSources(when).filter((source) => source.kind === "stable" || !readable.includes(source.deviceId)).length > 0) return {
|
|
2836
|
+
result: "unknown",
|
|
2837
|
+
reason: "the condition reads a device this caller was not proven to see"
|
|
2838
|
+
};
|
|
2839
|
+
}
|
|
2840
|
+
return require_dist.evaluateStepCondition(when, {
|
|
2841
|
+
fetchSlice: (deviceId, cap) => current.deviceState.getCapSlice.query({
|
|
2842
|
+
deviceId,
|
|
2843
|
+
capName: cap
|
|
2844
|
+
}),
|
|
2845
|
+
fetchStableIds: async () => require_dist.stableIdMapOf(await current.deviceManager.listAll.query({}))
|
|
2846
|
+
});
|
|
2847
|
+
};
|
|
2848
|
+
}
|
|
2849
|
+
/** The evaluator a step run is given; `undefined` when the consumer has no door. */
|
|
2850
|
+
function stepConditionEvaluator(door, readable) {
|
|
2851
|
+
return door === void 0 ? void 0 : door(readable);
|
|
2852
|
+
}
|
|
2853
|
+
/** The `evaluateCondition` dep of a step run, or nothing (a guarded step then reads `unknown`). */
|
|
2854
|
+
function conditionDeps(evaluator) {
|
|
2855
|
+
return evaluator === void 0 ? {} : { evaluateCondition: evaluator };
|
|
2856
|
+
}
|
|
2857
|
+
//#endregion
|
|
2789
2858
|
//#region src/builtins/core-blocks/runs-ledger.ts
|
|
2790
2859
|
/**
|
|
2791
2860
|
* The hub's runs ledger: what each automation block and each Action run DID.
|
|
@@ -2989,6 +3058,8 @@ var ActionsService = class {
|
|
|
2989
3058
|
newRunId;
|
|
2990
3059
|
units;
|
|
2991
3060
|
targets;
|
|
3061
|
+
templates;
|
|
3062
|
+
conditions;
|
|
2992
3063
|
running = /* @__PURE__ */ new Map();
|
|
2993
3064
|
maxRunMs;
|
|
2994
3065
|
stopGraceMs;
|
|
@@ -3005,6 +3076,8 @@ var ActionsService = class {
|
|
|
3005
3076
|
this.stopGraceMs = deps.stopGraceMs ?? STOP_GRACE_MS;
|
|
3006
3077
|
this.units = deps.units ?? require_dist.capUnitResolver(require_dist.ALL_CAPABILITY_DEFINITIONS);
|
|
3007
3078
|
this.targets = new require_dist.ActionTargetResolver(deps.directory, deps.logger);
|
|
3079
|
+
this.templates = deps.templates;
|
|
3080
|
+
this.conditions = deps.conditions;
|
|
3008
3081
|
}
|
|
3009
3082
|
/** One-shot at boot: stored steps written before D983 are rewritten to the target shape. */
|
|
3010
3083
|
async migrateTargets() {
|
|
@@ -3086,12 +3159,37 @@ var ActionsService = class {
|
|
|
3086
3159
|
});
|
|
3087
3160
|
throw new require_dist.ActionError("not-linked", reason);
|
|
3088
3161
|
}
|
|
3162
|
+
/**
|
|
3163
|
+
* The devices a run's templates may read. An admin (or an in-process block)
|
|
3164
|
+
* reads any (`undefined`); a non-admin only the camera the scope gate proved
|
|
3165
|
+
* it may see — fail-closed, because the gate proves nothing about any other.
|
|
3166
|
+
*/
|
|
3167
|
+
readableDevices(input) {
|
|
3168
|
+
if (input.caller === void 0 || input.caller.isAdmin) return void 0;
|
|
3169
|
+
return input.deviceId === void 0 ? [] : [input.deviceId];
|
|
3170
|
+
}
|
|
3171
|
+
/** A non-admin run is refused up front when a template names a device outside `readable`. */
|
|
3172
|
+
async checkTemplateScope(entry, readable, deviceId) {
|
|
3173
|
+
if (readable === void 0 || entry.source !== "internal" || this.templates === void 0) return;
|
|
3174
|
+
const templates = require_dist.collectDeviceTemplates(entry.steps ?? []);
|
|
3175
|
+
if (templates.length === 0) return;
|
|
3176
|
+
const outside = (await this.templates.check(templates, readable)).flatMap((c) => c.ok ? c.aliases.filter((a) => !a.allowed) : []);
|
|
3177
|
+
if (outside.length === 0) return;
|
|
3178
|
+
const reason = `a template names ${[...new Set(outside.map((a) => a.alias))].join(", ")}, which this caller was not proven to see`;
|
|
3179
|
+
this.logger.warn(`action run refused — ${reason}`, {
|
|
3180
|
+
...deviceId === void 0 ? {} : { tags: { deviceId } },
|
|
3181
|
+
meta: { actionId: entry.id }
|
|
3182
|
+
});
|
|
3183
|
+
throw new require_dist.ActionError("template-scope", reason);
|
|
3184
|
+
}
|
|
3089
3185
|
async run(input) {
|
|
3090
3186
|
await this.authorize(input.caller, input.actionId, input.deviceId, "run");
|
|
3091
3187
|
const entry = await this.find(input.actionId);
|
|
3092
3188
|
if (entry === null) throw new require_dist.ActionError("not-found", `no action "${input.actionId}"`);
|
|
3093
3189
|
const resolved = require_dist.resolveActionVariables(entry.variables, input.variables);
|
|
3094
3190
|
if (!resolved.ok) throw new require_dist.ActionError("invalid-variables", resolved.error);
|
|
3191
|
+
const readable = this.readableDevices(input);
|
|
3192
|
+
await this.checkTemplateScope(entry, readable, input.deviceId);
|
|
3095
3193
|
const runId = this.newRunId();
|
|
3096
3194
|
const startedAt = this.now();
|
|
3097
3195
|
const trigger = this.triggerOf(input, resolved.values);
|
|
@@ -3136,7 +3234,7 @@ var ActionsService = class {
|
|
|
3136
3234
|
lastRunAt: startedAt,
|
|
3137
3235
|
lastError: null
|
|
3138
3236
|
});
|
|
3139
|
-
const done = this.execute(entry, resolved.values, runId, startedAt, trigger, token);
|
|
3237
|
+
const done = this.execute(entry, resolved.values, runId, startedAt, trigger, token, readable);
|
|
3140
3238
|
if (input.wait === true) return done;
|
|
3141
3239
|
return {
|
|
3142
3240
|
runId,
|
|
@@ -3157,13 +3255,13 @@ var ActionsService = class {
|
|
|
3157
3255
|
};
|
|
3158
3256
|
}
|
|
3159
3257
|
/** Never rejects: a run's failure is its outcome. */
|
|
3160
|
-
async execute(entry, values, runId, startedAt, trigger, token) {
|
|
3258
|
+
async execute(entry, values, runId, startedAt, trigger, token, readable) {
|
|
3161
3259
|
let outcome = "failed";
|
|
3162
3260
|
let steps = [];
|
|
3163
3261
|
let message;
|
|
3164
3262
|
const deadline = this.armDeadline(entry.id, runId, token);
|
|
3165
3263
|
try {
|
|
3166
|
-
const running = require_dist.runSteps(this.runnableFor(entry, values, token, runId), {
|
|
3264
|
+
const running = require_dist.runSteps(this.runnableFor(entry, values, token, runId, readable), {
|
|
3167
3265
|
pathPrefix: "steps",
|
|
3168
3266
|
isAborted: () => token.aborted,
|
|
3169
3267
|
abortReason: "the run was stopped",
|
|
@@ -3178,6 +3276,17 @@ var ActionsService = class {
|
|
|
3178
3276
|
error: failure.message
|
|
3179
3277
|
}
|
|
3180
3278
|
});
|
|
3279
|
+
},
|
|
3280
|
+
onGuardUnknown: (skipped) => {
|
|
3281
|
+
this.logger.warn("action step skipped — its condition could not be read", {
|
|
3282
|
+
...skipped.deviceId === void 0 ? {} : { tags: { deviceId: skipped.deviceId } },
|
|
3283
|
+
meta: {
|
|
3284
|
+
actionId: entry.id,
|
|
3285
|
+
runId,
|
|
3286
|
+
step: skipped.index,
|
|
3287
|
+
reason: skipped.reason
|
|
3288
|
+
}
|
|
3289
|
+
});
|
|
3181
3290
|
}
|
|
3182
3291
|
});
|
|
3183
3292
|
const result = await Promise.race([running, deadline.expired]);
|
|
@@ -3267,7 +3376,7 @@ var ActionsService = class {
|
|
|
3267
3376
|
}
|
|
3268
3377
|
};
|
|
3269
3378
|
}
|
|
3270
|
-
runnableFor(entry, values, token, runId) {
|
|
3379
|
+
runnableFor(entry, values, token, runId, readable) {
|
|
3271
3380
|
if (entry.source === "internal") return require_dist.buildActionSteps(entry.steps ?? [], values, {
|
|
3272
3381
|
invokeCap: (call) => this.invokeCap({
|
|
3273
3382
|
...call,
|
|
@@ -3280,6 +3389,8 @@ var ActionsService = class {
|
|
|
3280
3389
|
sleep: (ms) => token.sleep(ms),
|
|
3281
3390
|
resolveTarget: (target, actionId, vars, origin) => this.targets.resolve(target, actionId, vars, origin),
|
|
3282
3391
|
owner: entry.id,
|
|
3392
|
+
renderTemplates: stepRenderer(this.templates, readable),
|
|
3393
|
+
...conditionDeps(stepConditionEvaluator(this.conditions, readable)),
|
|
3283
3394
|
onMissingVar: (name) => this.logger.warn("action template referenced a variable that was never set", { meta: {
|
|
3284
3395
|
actionId: entry.id,
|
|
3285
3396
|
variable: name
|
|
@@ -3759,6 +3870,8 @@ function buildActionsRuntime(deps) {
|
|
|
3759
3870
|
sources: sourcesOver(deps.api),
|
|
3760
3871
|
directory: deps.directory ?? directoryOver(deps.api),
|
|
3761
3872
|
invokeCap: invokeCapOver(deps.api),
|
|
3873
|
+
templates: templateDoorOver(deps.api),
|
|
3874
|
+
conditions: conditionDoorOver(deps.api),
|
|
3762
3875
|
emit: (event) => deps.eventBus.emit({
|
|
3763
3876
|
id: (0, node_crypto.randomUUID)(),
|
|
3764
3877
|
timestamp: /* @__PURE__ */ new Date(),
|
|
@@ -5259,6 +5372,8 @@ var SchedulerEngine = class {
|
|
|
5259
5372
|
}),
|
|
5260
5373
|
resolveTarget: (target, actionId, v, origin) => this.deps.targets.resolve(target, actionId, v, origin),
|
|
5261
5374
|
owner: `scheduler:${scheduler.id}`,
|
|
5375
|
+
renderTemplates: stepRenderer(this.deps.templates),
|
|
5376
|
+
...conditionDeps(stepConditionEvaluator(this.deps.conditions)),
|
|
5262
5377
|
onMissingVar: () => void 0
|
|
5263
5378
|
}), {
|
|
5264
5379
|
pathPrefix: "steps",
|
|
@@ -5274,6 +5389,16 @@ var SchedulerEngine = class {
|
|
|
5274
5389
|
error: failure.message
|
|
5275
5390
|
}
|
|
5276
5391
|
});
|
|
5392
|
+
},
|
|
5393
|
+
onGuardUnknown: (skipped) => {
|
|
5394
|
+
this.deps.logger.warn("scheduler edge step skipped — its condition could not be read", {
|
|
5395
|
+
...skipped.deviceId === void 0 ? {} : { tags: { deviceId: skipped.deviceId } },
|
|
5396
|
+
meta: {
|
|
5397
|
+
...vars,
|
|
5398
|
+
step: skipped.index,
|
|
5399
|
+
reason: skipped.reason
|
|
5400
|
+
}
|
|
5401
|
+
});
|
|
5277
5402
|
}
|
|
5278
5403
|
});
|
|
5279
5404
|
steps = result.steps;
|
|
@@ -5709,6 +5834,8 @@ function buildSchedulersRuntime(deps) {
|
|
|
5709
5834
|
store,
|
|
5710
5835
|
host,
|
|
5711
5836
|
targets,
|
|
5837
|
+
templates: templateDoorOver(deps.api),
|
|
5838
|
+
conditions: conditionDoorOver(deps.api),
|
|
5712
5839
|
logger: deps.logger.child("engine"),
|
|
5713
5840
|
record: (schedulerId, trace) => deps.ledger.report(schedulerOwner(schedulerId), {
|
|
5714
5841
|
trace,
|
|
@@ -5826,7 +5953,8 @@ var HeroLayoutService = class {
|
|
|
5826
5953
|
type: device.type,
|
|
5827
5954
|
role: device.role,
|
|
5828
5955
|
name: device.name,
|
|
5829
|
-
online: device.online
|
|
5956
|
+
online: device.online,
|
|
5957
|
+
integration: device.integration ?? null
|
|
5830
5958
|
},
|
|
5831
5959
|
caps: [...bound.filter((cap) => cap !== REMOTE_CAP), REMOTE_CAP],
|
|
5832
5960
|
features: device.features,
|
|
@@ -7378,6 +7506,8 @@ var FanPresetsService = class {
|
|
|
7378
7506
|
sleep: (ms) => new Promise((resolve) => setTimeout(resolve, ms)),
|
|
7379
7507
|
resolveTarget: async (target) => ({ deviceIds: target.kind === "devices" ? target.ids : [] }),
|
|
7380
7508
|
owner: `fan-preset:${deviceId}/${presetId}`,
|
|
7509
|
+
renderTemplates: stepRenderer(this.deps.templates, [deviceId]),
|
|
7510
|
+
...conditionDeps(stepConditionEvaluator(this.deps.conditions, [deviceId])),
|
|
7381
7511
|
onMissingVar: () => void 0
|
|
7382
7512
|
}), {
|
|
7383
7513
|
pathPrefix: "steps",
|
|
@@ -7394,6 +7524,17 @@ var FanPresetsService = class {
|
|
|
7394
7524
|
error: failure.message
|
|
7395
7525
|
}
|
|
7396
7526
|
});
|
|
7527
|
+
},
|
|
7528
|
+
onGuardUnknown: (skipped) => {
|
|
7529
|
+
this.deps.logger.warn("fan preset step skipped — its condition could not be read", {
|
|
7530
|
+
tags: { deviceId: skipped.deviceId ?? deviceId },
|
|
7531
|
+
meta: {
|
|
7532
|
+
fanDeviceId: deviceId,
|
|
7533
|
+
presetId,
|
|
7534
|
+
step: skipped.index,
|
|
7535
|
+
reason: skipped.reason
|
|
7536
|
+
}
|
|
7537
|
+
});
|
|
7397
7538
|
}
|
|
7398
7539
|
});
|
|
7399
7540
|
const steps = result.steps.map((trace, index) => ({
|
|
@@ -7735,6 +7876,8 @@ function buildFanPresetsRuntime(deps) {
|
|
|
7735
7876
|
devices,
|
|
7736
7877
|
readings: fanPresetsReadingsOver(deps.api, deps.logger.child("fan-presets")),
|
|
7737
7878
|
invoke: invokeCapOver(deps.api),
|
|
7879
|
+
templates: templateDoorOver(deps.api),
|
|
7880
|
+
conditions: conditionDoorOver(deps.api),
|
|
7738
7881
|
logger: deps.logger.child("fan-presets")
|
|
7739
7882
|
});
|
|
7740
7883
|
return {
|
|
@@ -8723,7 +8866,8 @@ var CoreBlocksAddon = class extends require_dist.BaseAddon {
|
|
|
8723
8866
|
role: found.role ?? null,
|
|
8724
8867
|
name: found.name,
|
|
8725
8868
|
online: found.online,
|
|
8726
|
-
features: found.features
|
|
8869
|
+
features: found.features,
|
|
8870
|
+
integration: manufacturerOf(found.metadata)
|
|
8727
8871
|
};
|
|
8728
8872
|
},
|
|
8729
8873
|
caps: async (deviceId) => (await requireApi().deviceManager.getBindings.query({ deviceId })).entries.map((e) => e.capName),
|
|
@@ -9373,6 +9517,11 @@ async function loadTranspiler(logger) {
|
|
|
9373
9517
|
return null;
|
|
9374
9518
|
}
|
|
9375
9519
|
}
|
|
9520
|
+
/** The manufacturer a driver recorded in the device's identity blob, or `null`. */
|
|
9521
|
+
function manufacturerOf(metadata) {
|
|
9522
|
+
const value = metadata?.["manufacturer"];
|
|
9523
|
+
return typeof value === "string" && value.trim() !== "" ? value : null;
|
|
9524
|
+
}
|
|
9376
9525
|
//#endregion
|
|
9377
9526
|
exports.BLOCK_ADDON_PREFIX = BLOCK_ADDON_PREFIX;
|
|
9378
9527
|
exports.BlockSettingsStore = BlockSettingsStore;
|