@camstack/server 1.2.802 → 1.2.804
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-routers.js +18 -0
- package/package.json +7 -10
- package/system/dist/{agent-https-CzMpclQr.js → agent-https-BFvIRgIa.js} +1 -1
- package/system/dist/{agent-https-CfPGbJ21.mjs → agent-https-Bp70et-W.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/composed-device.d.ts +5 -0
- package/system/dist/builtins/composer/composer.addon.js +42 -6
- package/system/dist/builtins/composer/composer.addon.mjs +42 -6
- package/system/dist/builtins/composer/composer.d.ts +13 -0
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +65 -6
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +65 -6
- package/system/dist/builtins/core-blocks/timed-run/timed-run-service.d.ts +17 -0
- package/system/dist/builtins/core-blocks/timed-run/timed-run-wiring.d.ts +6 -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-config-contribution.d.ts +1 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +47 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +47 -2
- package/system/dist/builtins/device-manager/timed-run-config-schema.d.ts +18 -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 +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-CJxojquW.mjs → capture-engine-CQBSd3V1.mjs} +1 -1
- package/system/dist/{capture-engine-Us8Ocffb.js → capture-engine-Sh4zAKR0.js} +1 -1
- package/system/dist/{composition-sources-DcsjjTIu.mjs → composition-sources-BxSmsp0_.mjs} +1 -1
- package/system/dist/{composition-sources-D2z7D7bY.js → composition-sources-rAsv2tZD.js} +1 -1
- package/system/dist/{constants-BOMAH5bO.js → constants-BCQCUHl9.js} +1 -1
- package/system/dist/{constants-DVqHyOzQ.mjs → constants-BfgfqUFH.mjs} +1 -1
- package/system/dist/{device-ca-NlhUUsex.js → device-ca-BgCwLzMX.js} +1 -1
- package/system/dist/{device-ca-zAWpen18.mjs → device-ca-D7JZLEAn.mjs} +1 -1
- package/system/dist/{dist-BccX5DOW.js → dist-BpIvMLVc.js} +595 -374
- package/system/dist/{dist-DYrP8WdD.mjs → dist-Bvw9utDk.mjs} +572 -375
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-DpRlDWJY.js → hub-mdns-ciao-DZwGhLx-.js} +2 -2
- package/system/dist/{hub-mdns-ciao-BleXDm2r.mjs → hub-mdns-ciao-qefBaLZn.mjs} +2 -2
- package/system/dist/index.js +16 -10
- package/system/dist/index.mjs +16 -10
- package/system/dist/{legacy-integration-rows-door-BUyPyv8f.mjs → legacy-integration-rows-door-DCfOpaG3.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-D2ZrX431.js → legacy-integration-rows-door-gqcsQX0L.js} +1 -1
- package/system/dist/{restore-archive-B1PE_1S2.mjs → restore-archive-BS6gi0i-.mjs} +1 -1
- package/system/dist/{restore-archive-DMUCmY3H.js → restore-archive-BtgtMV29.js} +1 -1
- package/system/dist/{wal-maintenance-CmNAtKgj.js → wal-maintenance-CyyJs8fh.js} +0 -0
- package/system/dist/{wal-maintenance-Ce71BVDk.mjs → wal-maintenance-DBCFpkyy.mjs} +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.804] - 2026-11-08
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Rebuilt against updated dependencies.
|
|
15
|
+
|
|
16
|
+
## [1.2.803] - 2026-11-07
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- A timed-run device exposes its quick-run duration and lets an admin set it
|
|
21
|
+
|
|
10
22
|
## [1.2.802] - 2026-11-07
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -13043,6 +13043,24 @@ function createCapRouter_timedRun(getProvider, createRemoteProxy) {
|
|
|
13043
13043
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
13044
13044
|
return p.getStatus(methodInput);
|
|
13045
13045
|
}),
|
|
13046
|
+
getOptions: trpc_middleware_js_1.protectedProcedure
|
|
13047
|
+
.input(types_153.timedRunCapability.methods.getOptions.input.loose())
|
|
13048
|
+
.output(types_153.timedRunCapability.methods.getOptions.output)
|
|
13049
|
+
.query(async ({ input, ctx }) => {
|
|
13050
|
+
const { nodeId, ...methodInput } = input;
|
|
13051
|
+
const p = resolveProvider('timed-run', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
13052
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
13053
|
+
return p.getOptions(methodInput);
|
|
13054
|
+
}),
|
|
13055
|
+
setSettings: trpc_middleware_js_1.adminProcedure
|
|
13056
|
+
.input(types_153.timedRunCapability.methods.setSettings.input.loose())
|
|
13057
|
+
.output(types_153.timedRunCapability.methods.setSettings.output)
|
|
13058
|
+
.mutation(async ({ input, ctx }) => {
|
|
13059
|
+
const { nodeId, ...methodInput } = input;
|
|
13060
|
+
const p = resolveProvider('timed-run', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
13061
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
13062
|
+
return p.setSettings(methodInput);
|
|
13063
|
+
}),
|
|
13046
13064
|
runFor: trpc_middleware_js_1.protectedProcedure
|
|
13047
13065
|
.input(types_153.timedRunCapability.methods.runFor.input.loose())
|
|
13048
13066
|
.output(types_153.timedRunCapability.methods.runFor.output)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.804",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,10 +66,7 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-agent-ui": ">=1.2.340",
|
|
71
|
-
"@camstack/addon-post-analysis": ">=1.2.684",
|
|
72
|
-
"@camstack/addon-waste-collections": ">=0.1.39"
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.613"
|
|
73
70
|
},
|
|
74
71
|
"wrapper": {
|
|
75
72
|
"desktop": ">=0.0.1",
|
|
@@ -78,19 +75,19 @@
|
|
|
78
75
|
}
|
|
79
76
|
},
|
|
80
77
|
"dependencies": {
|
|
81
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
82
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
78
|
+
"@camstack/addon-admin-ui": "1.2.613",
|
|
79
|
+
"@camstack/addon-agent-ui": "1.2.341",
|
|
83
80
|
"@camstack/addon-auth": "1.2.178",
|
|
84
81
|
"@camstack/addon-benchmark": "1.2.312",
|
|
85
82
|
"@camstack/addon-decoder-nodeav": "1.2.148",
|
|
86
83
|
"@camstack/addon-notifiers": "1.2.633",
|
|
87
84
|
"@camstack/addon-pipeline": "1.2.647",
|
|
88
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
85
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.668",
|
|
89
86
|
"@camstack/addon-post-analysis": "1.2.684",
|
|
90
87
|
"@camstack/develop": "0.1.49",
|
|
91
88
|
"@camstack/sdk": "1.2.156",
|
|
92
|
-
"@camstack/types": "1.2.
|
|
93
|
-
"@camstack/ui-library": "1.2.
|
|
89
|
+
"@camstack/types": "1.2.523",
|
|
90
|
+
"@camstack/ui-library": "1.2.400",
|
|
94
91
|
"@fastify/compress": "^9.0.0",
|
|
95
92
|
"@fastify/cookie": "^11.0.2",
|
|
96
93
|
"@fastify/cors": "^11.2.0",
|
|
@@ -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-BpIvMLVc.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 {
|
|
1
|
+
import { zs as defineRecordKinds } from "./dist-Bvw9utDk.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-BpIvMLVc.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 { Nc as EventCategory, Uo as BaseAddon, hn as addonPagesCapability, jc as errMsg } from "../../dist-Bvw9utDk.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-BpIvMLVc.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 { Nc as EventCategory, Uo as BaseAddon, _n as addonWidgetsCapability, jc as errMsg } from "../../dist-Bvw9utDk.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-BpIvMLVc.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Gr as isAlertEpisodeSeverity, Nc as EventCategory$1, Ps as createEvent$1, Uo as BaseAddon, Wr as isAlertEpisodeOpen, bn as alertsCapability, f as AlertSchema, jc as errMsg$1, vn as alertEpisodeId, w as CORE_BLOCK_ADDON_PREFIX, yn as alertEpisodePayload, zs as defineRecordKinds } from "../../dist-Bvw9utDk.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
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-BpIvMLVc.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 { Nc as EventCategory, Qi as ptzAutotrackCapability, Tn as bareAddonId, Uo as BaseAddon, Xs as isEvent, jc as errMsg, rt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-Bvw9utDk.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-BpIvMLVc.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-BtgtMV29.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs = require("node:fs");
|
|
11
11
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Cc as toNodeId, Ia as storageOccupancyCapability, Nc as EventCategory, Uo as BaseAddon, _i as mayWriteToLocation, cc as nodePin, wn as backupCapability } from "../../dist-Bvw9utDk.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-BS6gi0i-.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-BpIvMLVc.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, Nn as calendarsCapability, Uo as BaseAddon, zs as defineRecordKinds } from "../../dist-Bvw9utDk.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-BpIvMLVc.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 { Ac as DeviceType, Ei as motionCapability, J as DeclaredDevices, Nc as EventCategory, Oc as DeviceFeature, Pn as cameraGridLayoutCapability, Ps as createEvent, Ra as streamCatalogCapability, Rs as defineEntryKind, Tn as bareAddonId, Tt as MOTION_CLOSE_AFTER_MS, Uo as BaseAddon, Vr as integrationInstancesCapability, Zs as isInstanceEnabled, bi as memoizePinnedFfmpeg, fs as RecordIntegrationInstances, h as BaseDevice, ja as snapshotCapability, jc as errMsg, or as declarationOwnerNodeId, qs as hydrateSchema, vo as buildFfmpegArgs, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-Bvw9utDk.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
@@ -7,15 +7,20 @@ export interface ComposedDeviceHandle extends ComposedWriteTarget {
|
|
|
7
7
|
readonly name: string;
|
|
8
8
|
/** Copies a source reading's quantity onto this device (D944). Optional so test doubles stay small. */
|
|
9
9
|
adoptQuantity?(quantity: ReadingQuantity): Promise<void>;
|
|
10
|
+
/** Publishes the features the device's bound caps stand for (`featuresOfBoundCaps`). Optional so test doubles stay small. */
|
|
11
|
+
syncBoundFeatures?(features: readonly DeviceFeature[]): void;
|
|
10
12
|
}
|
|
11
13
|
export declare class ComposedDevice extends BaseDevice<typeof COMPOSED_DEVICE_CONFIG_SCHEMA> implements ComposedDeviceHandle {
|
|
12
14
|
private sharedFeatures;
|
|
15
|
+
/** Features of caps bound on the device by others (a wrapper): derived from its bindings, never listed here. */
|
|
16
|
+
private boundFeatures;
|
|
13
17
|
private extraCaps;
|
|
14
18
|
/** Whether this device's tank is also a `water` consumable (derived, never bound). */
|
|
15
19
|
private readonly derivesWater;
|
|
16
20
|
/** The `consumables` items the composition last wrote — the derived water item is added to these. */
|
|
17
21
|
private composedItems;
|
|
18
22
|
get features(): readonly DeviceFeature[];
|
|
23
|
+
syncBoundFeatures(features: readonly DeviceFeature[]): void;
|
|
19
24
|
constructor(ctx: DeviceContext, type: DeviceType, caps: readonly CapabilityDefinition[]);
|
|
20
25
|
/**
|
|
21
26
|
* The methods of a BUILT cap are commands (D967): each one is dispatched under
|
|
@@ -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-BpIvMLVc.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-rAsv2tZD.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-Sh4zAKR0.js");
|
|
9
9
|
const require_retention = require("../../retention-BNONb5X_.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
@@ -159,13 +159,20 @@ function sliceBoolean(slice, field) {
|
|
|
159
159
|
}
|
|
160
160
|
var ComposedDevice = class extends require_dist.BaseDevice {
|
|
161
161
|
sharedFeatures = [];
|
|
162
|
+
/** Features of caps bound on the device by others (a wrapper): derived from its bindings, never listed here. */
|
|
163
|
+
boundFeatures = [];
|
|
162
164
|
extraCaps = /* @__PURE__ */ new Set();
|
|
163
165
|
/** Whether this device's tank is also a `water` consumable (derived, never bound). */
|
|
164
166
|
derivesWater;
|
|
165
167
|
/** The `consumables` items the composition last wrote — the derived water item is added to these. */
|
|
166
168
|
composedItems = [];
|
|
167
169
|
get features() {
|
|
168
|
-
return this.sharedFeatures;
|
|
170
|
+
return [...new Set([...this.sharedFeatures, ...this.boundFeatures])];
|
|
171
|
+
}
|
|
172
|
+
syncBoundFeatures(features) {
|
|
173
|
+
if (features.length === this.boundFeatures.length && features.every((feature) => this.boundFeatures.includes(feature))) return;
|
|
174
|
+
this.boundFeatures = [...features];
|
|
175
|
+
this.refreshFeatures();
|
|
169
176
|
}
|
|
170
177
|
constructor(ctx, type, caps) {
|
|
171
178
|
super(ctx, COMPOSED_DEVICE_CONFIG_SCHEMA, { type });
|
|
@@ -1803,7 +1810,8 @@ function planUnreadable(block, rows) {
|
|
|
1803
1810
|
}
|
|
1804
1811
|
/** `target` is the block's own `new` target, narrowed by the caller: this path never sees an existing one (M-5). */
|
|
1805
1812
|
function planNew(block, target, lookupCap, rows) {
|
|
1806
|
-
const
|
|
1813
|
+
const composition = require_dist.withDefaultRunning(block.composition, block.id);
|
|
1814
|
+
const plan = require_dist.planComposition(composition, lookupCap);
|
|
1807
1815
|
const planned = { kind: "new" };
|
|
1808
1816
|
if (plan.problems.length > 0) {
|
|
1809
1817
|
const stableId = require_dist.composedDeviceStableId(block.id);
|
|
@@ -1817,7 +1825,7 @@ function planNew(block, target, lookupCap, rows) {
|
|
|
1817
1825
|
target: planned
|
|
1818
1826
|
};
|
|
1819
1827
|
}
|
|
1820
|
-
const caps =
|
|
1828
|
+
const caps = composition.features.flatMap((f) => {
|
|
1821
1829
|
if (!require_dist.compositionFeatureEnabled(f)) return [];
|
|
1822
1830
|
const def = lookupCap(f.cap);
|
|
1823
1831
|
return def === null ? [] : [def];
|
|
@@ -4481,6 +4489,22 @@ var Composer = class {
|
|
|
4481
4489
|
this.grafts.onBindingsChanged(data);
|
|
4482
4490
|
this.dispatch(await this.deps.tracker.onBindingsChanged(data.deviceId, data.capName, data.reason));
|
|
4483
4491
|
await this.chained(() => this.actuators?.onMemberBindings(data.deviceId));
|
|
4492
|
+
await this.syncBoundFeatures([...this.live.keys()].filter((blockId) => this.composed.idOf(require_dist.composedDeviceStableId(blockId)) === data.deviceId));
|
|
4493
|
+
}
|
|
4494
|
+
/**
|
|
4495
|
+
* A composed device carries the features its BOUND caps stand for — the same
|
|
4496
|
+
* flags a driver sets on a regular device. A cap bound later by a wrapper
|
|
4497
|
+
* (`timed-run`) reaches it here; a read that fails changes nothing (D49).
|
|
4498
|
+
*/
|
|
4499
|
+
async syncBoundFeatures(blockIds) {
|
|
4500
|
+
const read = this.deps.boundCapNames;
|
|
4501
|
+
if (read === void 0) return;
|
|
4502
|
+
for (const blockId of blockIds) {
|
|
4503
|
+
const device = this.composed.get(require_dist.composedDeviceStableId(blockId));
|
|
4504
|
+
if (device === null || device.syncBoundFeatures === void 0) continue;
|
|
4505
|
+
const caps = await read(device.id);
|
|
4506
|
+
if (caps !== null) device.syncBoundFeatures(require_dist.featuresOfBoundCaps(caps));
|
|
4507
|
+
}
|
|
4484
4508
|
}
|
|
4485
4509
|
shutdown() {
|
|
4486
4510
|
for (const entry of this.live.values()) entry.runtime?.stop();
|
|
@@ -4618,6 +4642,7 @@ var Composer = class {
|
|
|
4618
4642
|
await this.syncSources(rebuilt);
|
|
4619
4643
|
this.forwards?.sync(forwardBlocksOf(input.blocks));
|
|
4620
4644
|
await this.syncExtensionFeatures(forwardBlocksOf(input.blocks));
|
|
4645
|
+
await this.syncBoundFeatures(input.blocks.map((block) => block.id));
|
|
4621
4646
|
await this.actuators?.sync(input.blocks.flatMap((block) => {
|
|
4622
4647
|
const helper = block.composition.helper;
|
|
4623
4648
|
if (helper !== void 0 && helper.kind !== "group") return [];
|
|
@@ -6155,6 +6180,17 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6155
6180
|
...args
|
|
6156
6181
|
});
|
|
6157
6182
|
},
|
|
6183
|
+
boundCapNames: async (deviceId) => {
|
|
6184
|
+
try {
|
|
6185
|
+
return (await api.deviceManager.getBindings.query({ deviceId })).entries.map((entry) => entry.capName);
|
|
6186
|
+
} catch (err) {
|
|
6187
|
+
this.ctx.logger.warn("composer: the bindings of a composed device could not be read", {
|
|
6188
|
+
tags: { deviceId },
|
|
6189
|
+
meta: { error: require_dist.errMsg(err) }
|
|
6190
|
+
});
|
|
6191
|
+
return null;
|
|
6192
|
+
}
|
|
6193
|
+
},
|
|
6158
6194
|
extensionFeatures: async (deviceId) => {
|
|
6159
6195
|
try {
|
|
6160
6196
|
return require_dist.mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
|
|
@@ -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 { $s as isReadingQuantity, Ac as DeviceType, Ar as fanControlCapability, Bi as petFountainCapability, Bn as climateControlCapability, Bo as statisticCadenceMs, Br as groupTemplate, Co as compositionItemFieldPath, Da as sharedColorModes, Dn as brightnessCapability, Do as disarmRoseMemory, Ea as sharedActuatorMethods, Ei as motionCapability, Eo as createStatefulExpressionMemory, Fo as nextLocalMidnight, Gn as composerCapability, Hn as colorCapability, Io as openReset, J as DeclaredDevices, Jn as consumablesCapability, Kn as compositionFieldKey, Lo as openStatistic, Mc as featuresOfBoundCaps, Mo as integrateReading, Nc as EventCategory, No as isForwardInputRef, Nr as featureForwards, Oo as evaluateDerivative, Or as expressionContainsBuiltinCall, Po as isHistoryHelper, Ps as createEvent, Pt as PetFountainStatusSchema, Ri as parseColorInput, Ro as planResetTier, So as compositionFeatureEnabled, Ta as sharedActuatorFeatures, To as compositionSourceKey, Ui as planComposition, Uo as BaseAddon, Va as switchCapability, Vi as petFountainWaterItem, Vo as toExpressionValue, Xi as processTimeZoneOr, _a as runFanOut, _o as MINUTE_MS, at as FanDirectionSchema, bo as composedDeviceRef, di as lockControlCapability, eo as valveCapability, er as coverCapability, fo as DEFAULT_HISTORY_RETENTION, h as BaseDevice, ho as HOUR_MS, i as ACTUATOR_TEMPLATE_IDS, jc as errMsg, jo as historyRetentionFromSettings, jr as fanOutTargets, k as ConsumableItemSchema, kn as buildCapabilityLookup, ko as evaluateStatistic, lo as COMPOSER_ADDON_ID, lt as GroupCommandResultSchema, mo as HISTORY_SLOW_MS, mt as HvacModeSchema, ni as kebabToCamel, oo as withDefaultRunning, pa as resolveMutate, po as HISTORY_FAST_MS, r as ACTUATOR_METHODS, s as ALL_CAPABILITY_DEFINITIONS, sr as declaredSeriesKind, vi as mediaPlayerCapability, wo as compositionSliceKey, wr as evaluateCompositionField, x as COMPOSED_ITEM_FIXED_FIELDS, xi as methodRefusal, xo as composedDeviceStableId, yi as mediaPlayerFeaturesOfRoles, yo as cloneStatefulExpressionMemory, zo as planStatisticTier, zr as groupCommandsCapability } from "../../dist-Bvw9utDk.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-BxSmsp0_.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-CQBSd3V1.mjs";
|
|
4
4
|
import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-B9l9TnGE.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
@@ -154,13 +154,20 @@ function sliceBoolean(slice, field) {
|
|
|
154
154
|
}
|
|
155
155
|
var ComposedDevice = class extends BaseDevice {
|
|
156
156
|
sharedFeatures = [];
|
|
157
|
+
/** Features of caps bound on the device by others (a wrapper): derived from its bindings, never listed here. */
|
|
158
|
+
boundFeatures = [];
|
|
157
159
|
extraCaps = /* @__PURE__ */ new Set();
|
|
158
160
|
/** Whether this device's tank is also a `water` consumable (derived, never bound). */
|
|
159
161
|
derivesWater;
|
|
160
162
|
/** The `consumables` items the composition last wrote — the derived water item is added to these. */
|
|
161
163
|
composedItems = [];
|
|
162
164
|
get features() {
|
|
163
|
-
return this.sharedFeatures;
|
|
165
|
+
return [...new Set([...this.sharedFeatures, ...this.boundFeatures])];
|
|
166
|
+
}
|
|
167
|
+
syncBoundFeatures(features) {
|
|
168
|
+
if (features.length === this.boundFeatures.length && features.every((feature) => this.boundFeatures.includes(feature))) return;
|
|
169
|
+
this.boundFeatures = [...features];
|
|
170
|
+
this.refreshFeatures();
|
|
164
171
|
}
|
|
165
172
|
constructor(ctx, type, caps) {
|
|
166
173
|
super(ctx, COMPOSED_DEVICE_CONFIG_SCHEMA, { type });
|
|
@@ -1798,7 +1805,8 @@ function planUnreadable(block, rows) {
|
|
|
1798
1805
|
}
|
|
1799
1806
|
/** `target` is the block's own `new` target, narrowed by the caller: this path never sees an existing one (M-5). */
|
|
1800
1807
|
function planNew(block, target, lookupCap, rows) {
|
|
1801
|
-
const
|
|
1808
|
+
const composition = withDefaultRunning(block.composition, block.id);
|
|
1809
|
+
const plan = planComposition(composition, lookupCap);
|
|
1802
1810
|
const planned = { kind: "new" };
|
|
1803
1811
|
if (plan.problems.length > 0) {
|
|
1804
1812
|
const stableId = composedDeviceStableId(block.id);
|
|
@@ -1812,7 +1820,7 @@ function planNew(block, target, lookupCap, rows) {
|
|
|
1812
1820
|
target: planned
|
|
1813
1821
|
};
|
|
1814
1822
|
}
|
|
1815
|
-
const caps =
|
|
1823
|
+
const caps = composition.features.flatMap((f) => {
|
|
1816
1824
|
if (!compositionFeatureEnabled(f)) return [];
|
|
1817
1825
|
const def = lookupCap(f.cap);
|
|
1818
1826
|
return def === null ? [] : [def];
|
|
@@ -4476,6 +4484,22 @@ var Composer = class {
|
|
|
4476
4484
|
this.grafts.onBindingsChanged(data);
|
|
4477
4485
|
this.dispatch(await this.deps.tracker.onBindingsChanged(data.deviceId, data.capName, data.reason));
|
|
4478
4486
|
await this.chained(() => this.actuators?.onMemberBindings(data.deviceId));
|
|
4487
|
+
await this.syncBoundFeatures([...this.live.keys()].filter((blockId) => this.composed.idOf(composedDeviceStableId(blockId)) === data.deviceId));
|
|
4488
|
+
}
|
|
4489
|
+
/**
|
|
4490
|
+
* A composed device carries the features its BOUND caps stand for — the same
|
|
4491
|
+
* flags a driver sets on a regular device. A cap bound later by a wrapper
|
|
4492
|
+
* (`timed-run`) reaches it here; a read that fails changes nothing (D49).
|
|
4493
|
+
*/
|
|
4494
|
+
async syncBoundFeatures(blockIds) {
|
|
4495
|
+
const read = this.deps.boundCapNames;
|
|
4496
|
+
if (read === void 0) return;
|
|
4497
|
+
for (const blockId of blockIds) {
|
|
4498
|
+
const device = this.composed.get(composedDeviceStableId(blockId));
|
|
4499
|
+
if (device === null || device.syncBoundFeatures === void 0) continue;
|
|
4500
|
+
const caps = await read(device.id);
|
|
4501
|
+
if (caps !== null) device.syncBoundFeatures(featuresOfBoundCaps(caps));
|
|
4502
|
+
}
|
|
4479
4503
|
}
|
|
4480
4504
|
shutdown() {
|
|
4481
4505
|
for (const entry of this.live.values()) entry.runtime?.stop();
|
|
@@ -4613,6 +4637,7 @@ var Composer = class {
|
|
|
4613
4637
|
await this.syncSources(rebuilt);
|
|
4614
4638
|
this.forwards?.sync(forwardBlocksOf(input.blocks));
|
|
4615
4639
|
await this.syncExtensionFeatures(forwardBlocksOf(input.blocks));
|
|
4640
|
+
await this.syncBoundFeatures(input.blocks.map((block) => block.id));
|
|
4616
4641
|
await this.actuators?.sync(input.blocks.flatMap((block) => {
|
|
4617
4642
|
const helper = block.composition.helper;
|
|
4618
4643
|
if (helper !== void 0 && helper.kind !== "group") return [];
|
|
@@ -6150,6 +6175,17 @@ var ComposerAddon = class extends BaseAddon {
|
|
|
6150
6175
|
...args
|
|
6151
6176
|
});
|
|
6152
6177
|
},
|
|
6178
|
+
boundCapNames: async (deviceId) => {
|
|
6179
|
+
try {
|
|
6180
|
+
return (await api.deviceManager.getBindings.query({ deviceId })).entries.map((entry) => entry.capName);
|
|
6181
|
+
} catch (err) {
|
|
6182
|
+
this.ctx.logger.warn("composer: the bindings of a composed device could not be read", {
|
|
6183
|
+
tags: { deviceId },
|
|
6184
|
+
meta: { error: errMsg(err) }
|
|
6185
|
+
});
|
|
6186
|
+
return null;
|
|
6187
|
+
}
|
|
6188
|
+
},
|
|
6153
6189
|
extensionFeatures: async (deviceId) => {
|
|
6154
6190
|
try {
|
|
6155
6191
|
return mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
|
|
@@ -128,6 +128,13 @@ export interface ComposerDeps {
|
|
|
128
128
|
* Absent in tests that predate the `extension` command.
|
|
129
129
|
*/
|
|
130
130
|
readonly extensionFeatures?: (deviceId: number) => Promise<readonly DeviceFeature[] | null>;
|
|
131
|
+
/**
|
|
132
|
+
* Every cap bound on a device, whoever serves it (a wrapper included), or null
|
|
133
|
+
* when it could not be read (the device keeps its features, D49). A composed
|
|
134
|
+
* device's features are the ones these caps stand for (`featuresOfBoundCaps`).
|
|
135
|
+
* Absent in tests that predate it.
|
|
136
|
+
*/
|
|
137
|
+
readonly boundCapNames?: (deviceId: number) => Promise<readonly string[] | null>;
|
|
131
138
|
}
|
|
132
139
|
/** The configured zone, else the process zone when usable, else `UTC` (an empty `TZ` reads `Etc/Unknown`). */
|
|
133
140
|
export declare function resolveComposerTimeZone(configured: string | undefined, logger: IScopedLogger): string;
|
|
@@ -171,6 +178,12 @@ export declare class Composer {
|
|
|
171
178
|
onNativeChanged(data: NativeShadowChangedData): Promise<void>;
|
|
172
179
|
onDeviceUnregistered(deviceId: number): Promise<void>;
|
|
173
180
|
onBindingsChanged(data: DeviceBindingsChangedData): Promise<void>;
|
|
181
|
+
/**
|
|
182
|
+
* A composed device carries the features its BOUND caps stand for — the same
|
|
183
|
+
* flags a driver sets on a regular device. A cap bound later by a wrapper
|
|
184
|
+
* (`timed-run`) reaches it here; a read that fails changes nothing (D49).
|
|
185
|
+
*/
|
|
186
|
+
private syncBoundFeatures;
|
|
174
187
|
shutdown(): void;
|
|
175
188
|
/**
|
|
176
189
|
* A media player served by the `remote` extension reports nothing, so its
|
|
@@ -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-BpIvMLVc.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 { Uo as BaseAddon, pi as logDestinationCapability } from "../../dist-Bvw9utDk.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 = {
|