@camstack/server 1.2.746 → 1.2.748
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 +63 -0
- package/package.json +10 -10
- package/system/dist/{agent-https-CeiGBOLL.js → agent-https-DsAdFC8n.js} +1 -1
- package/system/dist/{agent-https-p__QCKx2.mjs → agent-https-XIAiPgNs.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +75 -11
- package/system/dist/builtins/composer/composer.addon.mjs +75 -11
- package/system/dist/builtins/composer/composer.d.ts +13 -1
- package/system/dist/builtins/composer/forward-commands.d.ts +11 -0
- package/system/dist/builtins/console-logging/index.js +1 -1
- package/system/dist/builtins/console-logging/index.mjs +1 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +161 -85
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +161 -85
- package/system/dist/builtins/core-blocks/remote-call-redirect.d.ts +9 -3
- package/system/dist/builtins/core-blocks/remote-service.d.ts +32 -6
- package/system/dist/builtins/core-blocks/remote-wiring.d.ts +8 -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.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.d.ts +8 -0
- package/system/dist/builtins/local-network/local-network.addon.js +99 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +99 -2
- package/system/dist/builtins/local-network/migrations/hub-node-fields.d.ts +30 -0
- package/system/dist/builtins/local-network/migrations/index.d.ts +8 -0
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{composition-sources-MLdAmm_H.mjs → composition-sources-DKJiErim.mjs} +1 -1
- package/system/dist/{composition-sources-C9lrcs0U.js → composition-sources-DUF2KY-Q.js} +1 -1
- package/system/dist/{constants-DCW5J_Df.mjs → constants-D3cOCDWZ.mjs} +1 -1
- package/system/dist/{constants-DNhyMkdx.js → constants-Smr-sgQk.js} +1 -1
- package/system/dist/{device-ca-Cp0tBm4M.mjs → device-ca-Bjql3lRF.mjs} +1 -1
- package/system/dist/{device-ca-AYCsUsY8.js → device-ca-qPLV2_YM.js} +1 -1
- package/system/dist/{dist-CMxM4-FW.mjs → dist-BFiMX6mZ.mjs} +452 -221
- package/system/dist/{dist-B1ZljzFe.js → dist-CrwALoYk.js} +469 -220
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CbnDQ6lH.mjs → hub-mdns-ciao-B6JK5wYQ.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Xf67S6hV.js → hub-mdns-ciao-DBYj4N_8.js} +2 -2
- package/system/dist/index.js +7 -7
- package/system/dist/index.mjs +7 -7
- package/system/dist/{restore-archive-DLTNZsfo.js → restore-archive-DKZiYRbs.js} +1 -1
- package/system/dist/{restore-archive-CMJvv4hx.mjs → restore-archive-HEmBtC17.mjs} +82 -82
- package/system/dist/{retention-DggVaaFh.mjs → retention-CDhx9ofQ.mjs} +1 -1
- package/system/dist/{retention-tfu-EBh4.js → retention-DUTatu4f.js} +1 -1
- package/system/dist/{wal-maintenance-B5qz1TlP.js → wal-maintenance-BlfNMW7r.js} +0 -0
- package/system/dist/{wal-maintenance-Ch9XhjjA.mjs → wal-maintenance-C59YCSjx.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.748] - 2026-11-03
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Rebuilt against updated dependencies.
|
|
15
|
+
|
|
16
|
+
## [1.2.747] - 2026-11-03
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- The media-player routes include power and volume/channel steps
|
|
21
|
+
|
|
10
22
|
## [1.2.746] - 2026-11-02
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -6543,6 +6543,60 @@ function createCapRouter_mediaPlayer(getProvider, createRemoteProxy) {
|
|
|
6543
6543
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6544
6544
|
return p.getStatus(methodInput);
|
|
6545
6545
|
}),
|
|
6546
|
+
turnOn: trpc_middleware_js_1.protectedProcedure
|
|
6547
|
+
.input(types_86.mediaPlayerCapability.methods.turnOn.input.loose())
|
|
6548
|
+
.output(types_86.mediaPlayerCapability.methods.turnOn.output)
|
|
6549
|
+
.mutation(async ({ input, ctx }) => {
|
|
6550
|
+
const { nodeId, ...methodInput } = input;
|
|
6551
|
+
const p = resolveProvider('media-player', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6552
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6553
|
+
return p.turnOn(methodInput);
|
|
6554
|
+
}),
|
|
6555
|
+
turnOff: trpc_middleware_js_1.protectedProcedure
|
|
6556
|
+
.input(types_86.mediaPlayerCapability.methods.turnOff.input.loose())
|
|
6557
|
+
.output(types_86.mediaPlayerCapability.methods.turnOff.output)
|
|
6558
|
+
.mutation(async ({ input, ctx }) => {
|
|
6559
|
+
const { nodeId, ...methodInput } = input;
|
|
6560
|
+
const p = resolveProvider('media-player', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6561
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6562
|
+
return p.turnOff(methodInput);
|
|
6563
|
+
}),
|
|
6564
|
+
volumeUp: trpc_middleware_js_1.protectedProcedure
|
|
6565
|
+
.input(types_86.mediaPlayerCapability.methods.volumeUp.input.loose())
|
|
6566
|
+
.output(types_86.mediaPlayerCapability.methods.volumeUp.output)
|
|
6567
|
+
.mutation(async ({ input, ctx }) => {
|
|
6568
|
+
const { nodeId, ...methodInput } = input;
|
|
6569
|
+
const p = resolveProvider('media-player', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6570
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6571
|
+
return p.volumeUp(methodInput);
|
|
6572
|
+
}),
|
|
6573
|
+
volumeDown: trpc_middleware_js_1.protectedProcedure
|
|
6574
|
+
.input(types_86.mediaPlayerCapability.methods.volumeDown.input.loose())
|
|
6575
|
+
.output(types_86.mediaPlayerCapability.methods.volumeDown.output)
|
|
6576
|
+
.mutation(async ({ input, ctx }) => {
|
|
6577
|
+
const { nodeId, ...methodInput } = input;
|
|
6578
|
+
const p = resolveProvider('media-player', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6579
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6580
|
+
return p.volumeDown(methodInput);
|
|
6581
|
+
}),
|
|
6582
|
+
channelUp: trpc_middleware_js_1.protectedProcedure
|
|
6583
|
+
.input(types_86.mediaPlayerCapability.methods.channelUp.input.loose())
|
|
6584
|
+
.output(types_86.mediaPlayerCapability.methods.channelUp.output)
|
|
6585
|
+
.mutation(async ({ input, ctx }) => {
|
|
6586
|
+
const { nodeId, ...methodInput } = input;
|
|
6587
|
+
const p = resolveProvider('media-player', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6588
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6589
|
+
return p.channelUp(methodInput);
|
|
6590
|
+
}),
|
|
6591
|
+
channelDown: trpc_middleware_js_1.protectedProcedure
|
|
6592
|
+
.input(types_86.mediaPlayerCapability.methods.channelDown.input.loose())
|
|
6593
|
+
.output(types_86.mediaPlayerCapability.methods.channelDown.output)
|
|
6594
|
+
.mutation(async ({ input, ctx }) => {
|
|
6595
|
+
const { nodeId, ...methodInput } = input;
|
|
6596
|
+
const p = resolveProvider('media-player', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
6597
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
6598
|
+
return p.channelDown(methodInput);
|
|
6599
|
+
}),
|
|
6546
6600
|
play: trpc_middleware_js_1.protectedProcedure
|
|
6547
6601
|
.input(types_86.mediaPlayerCapability.methods.play.input.loose())
|
|
6548
6602
|
.output(types_86.mediaPlayerCapability.methods.play.output)
|
|
@@ -11331,6 +11385,15 @@ function createCapRouter_remote(getProvider, createRemoteProxy) {
|
|
|
11331
11385
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
11332
11386
|
return p.sendCommand(methodInput);
|
|
11333
11387
|
}),
|
|
11388
|
+
getAssumedStatus: trpc_middleware_js_1.protectedProcedure
|
|
11389
|
+
.input(types_131.remoteCapability.methods.getAssumedStatus.input.loose())
|
|
11390
|
+
.output(types_131.remoteCapability.methods.getAssumedStatus.output)
|
|
11391
|
+
.query(async ({ input, ctx }) => {
|
|
11392
|
+
const { nodeId, ...methodInput } = input;
|
|
11393
|
+
const p = resolveProvider('remote', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
11394
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
11395
|
+
return p.getAssumedStatus(methodInput);
|
|
11396
|
+
}),
|
|
11334
11397
|
sendMediaCommand: trpc_middleware_js_1.protectedProcedure
|
|
11335
11398
|
.input(types_131.remoteCapability.methods.sendMediaCommand.input.loose())
|
|
11336
11399
|
.output(types_131.remoteCapability.methods.sendMediaCommand.output)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.748",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-
|
|
71
|
-
"@camstack/addon-provider-
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.566",
|
|
70
|
+
"@camstack/addon-export-alexa": ">=1.2.181",
|
|
71
|
+
"@camstack/addon-provider-mqtt-ha": ">=0.1.35"
|
|
72
72
|
},
|
|
73
73
|
"wrapper": {
|
|
74
74
|
"desktop": ">=0.0.1",
|
|
@@ -77,19 +77,19 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
81
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
80
|
+
"@camstack/addon-admin-ui": "1.2.566",
|
|
81
|
+
"@camstack/addon-agent-ui": "1.2.318",
|
|
82
82
|
"@camstack/addon-auth": "1.2.175",
|
|
83
83
|
"@camstack/addon-benchmark": "1.2.311",
|
|
84
84
|
"@camstack/addon-decoder-nodeav": "1.2.145",
|
|
85
85
|
"@camstack/addon-notifiers": "1.2.628",
|
|
86
|
-
"@camstack/addon-pipeline": "1.2.
|
|
87
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
86
|
+
"@camstack/addon-pipeline": "1.2.639",
|
|
87
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.654",
|
|
88
88
|
"@camstack/addon-post-analysis": "1.2.666",
|
|
89
89
|
"@camstack/develop": "0.1.44",
|
|
90
90
|
"@camstack/sdk": "1.2.155",
|
|
91
|
-
"@camstack/types": "1.2.
|
|
92
|
-
"@camstack/ui-library": "1.2.
|
|
91
|
+
"@camstack/types": "1.2.486",
|
|
92
|
+
"@camstack/ui-library": "1.2.376",
|
|
93
93
|
"@fastify/compress": "^9.0.0",
|
|
94
94
|
"@fastify/cookie": "^11.0.2",
|
|
95
95
|
"@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-CrwALoYk.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 { ps as defineRecordKinds } from "./dist-BFiMX6mZ.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-CrwALoYk.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ac as EventCategory, ic as errMsg, sn as addonPagesCapability, vo as BaseAddon } from "../../dist-BFiMX6mZ.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CrwALoYk.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ac as EventCategory, ic as errMsg, ln as addonWidgetsCapability, vo as BaseAddon } from "../../dist-BFiMX6mZ.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CrwALoYk.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Mr as isAlertEpisodeOpen, Nr as isAlertEpisodeSeverity, ac as EventCategory, cs as createEvent, d as AlertSchema, dn as alertEpisodePayload, fn as alertsCapability, ic as errMsg, ps as defineRecordKinds, un as alertEpisodeId, vo as BaseAddon } from "../../dist-BFiMX6mZ.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
4
4
|
/**
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CrwALoYk.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fi as ptzAutotrackCapability, _n as bareAddonId, ac as EventCategory, ic as errMsg, tt as FIRST_LEVEL_MACRO_CLASSES, vo as BaseAddon, ws as isEvent } from "../../dist-BFiMX6mZ.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CrwALoYk.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-DKZiYRbs.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fs as nodePin, Xs as toNodeId, ac as EventCategory, ai as mayWriteToLocation, gn as backupCapability, vo as BaseAddon, ya as storageOccupancyCapability } from "../../dist-BFiMX6mZ.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-HEmBtC17.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fsp from "node:fs/promises";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-CrwALoYk.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 { T as CalendarPreferencesSchema, Tn as calendarsCapability, ps as defineRecordKinds, vo as BaseAddon } from "../../dist-BFiMX6mZ.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-CrwALoYk.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { En as cameraGridLayoutCapability, Ja as buildFfmpegArgs, K as DeclaredDevices, L as DERIVED_CAMERA_SILENCED_CAP_NAMES, St as MOTION_CLOSE_AFTER_MS, Yn as declarationOwnerNodeId, _n as bareAddonId, ac as EventCategory, ci as memoizePinnedFfmpeg, cs as createEvent, ic as errMsg, m as BaseDevice, ma as snapshotCapability, pi as motionCapability, rc as DeviceType, tc as DeviceFeature, vo as BaseAddon, xa as streamCatalogCapability, xs as hydrateSchema } from "../../dist-BFiMX6mZ.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
8
|
-
const require_retention = require("../../retention-
|
|
6
|
+
const require_dist = require("../../dist-CrwALoYk.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-DUF2KY-Q.js");
|
|
8
|
+
const require_retention = require("../../retention-DUTatu4f.js");
|
|
9
9
|
let zod = require("zod");
|
|
10
10
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
11
11
|
/**
|
|
@@ -257,6 +257,12 @@ var ComposedDevice = class extends require_dist.BaseDevice {
|
|
|
257
257
|
play: () => call("media-player", "play", {}),
|
|
258
258
|
pause: () => call("media-player", "pause", {}),
|
|
259
259
|
setVolume: (input) => call("media-player", "setVolume", { volumeLevel: input.volumeLevel }),
|
|
260
|
+
turnOn: () => call("media-player", "turnOn", {}),
|
|
261
|
+
turnOff: () => call("media-player", "turnOff", {}),
|
|
262
|
+
volumeUp: (input) => call("media-player", "volumeUp", { steps: input.steps }),
|
|
263
|
+
volumeDown: (input) => call("media-player", "volumeDown", { steps: input.steps }),
|
|
264
|
+
channelUp: (input) => call("media-player", "channelUp", { steps: input.steps }),
|
|
265
|
+
channelDown: (input) => call("media-player", "channelDown", { steps: input.steps }),
|
|
260
266
|
stop: () => call("media-player", "stop", {}),
|
|
261
267
|
next: () => call("media-player", "next", {}),
|
|
262
268
|
previous: () => call("media-player", "previous", {}),
|
|
@@ -929,6 +935,21 @@ var ForwardRefusedError = class extends Error {
|
|
|
929
935
|
this.name = "ForwardRefusedError";
|
|
930
936
|
}
|
|
931
937
|
};
|
|
938
|
+
/**
|
|
939
|
+
* A method the `remote` extension serves was not taken by it: its role is not
|
|
940
|
+
* bound (D967 amendment). The redirect runs a BOUND role before a call ever
|
|
941
|
+
* reaches the native, so reaching it means nothing is bound — a typed answer,
|
|
942
|
+
* never a silent no-op.
|
|
943
|
+
*/
|
|
944
|
+
var MediaPlayerUnsupportedError = class extends Error {
|
|
945
|
+
method;
|
|
946
|
+
code = "media-player.unsupported";
|
|
947
|
+
constructor(method) {
|
|
948
|
+
super(`media-player.unsupported: \`${method}\` has no bound button on this device's remote`);
|
|
949
|
+
this.method = method;
|
|
950
|
+
this.name = "MediaPlayerUnsupportedError";
|
|
951
|
+
}
|
|
952
|
+
};
|
|
932
953
|
function methodKey(cap, method) {
|
|
933
954
|
return `${cap}.${method}`;
|
|
934
955
|
}
|
|
@@ -961,16 +982,21 @@ var ForwardCommands = class {
|
|
|
961
982
|
if (deviceId === null) continue;
|
|
962
983
|
const byMethod = /* @__PURE__ */ new Map();
|
|
963
984
|
const resets = /* @__PURE__ */ new Map();
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
985
|
+
const extensions = /* @__PURE__ */ new Set();
|
|
986
|
+
for (const feature of block.features) {
|
|
987
|
+
for (const [method, target] of Object.entries(feature.commands ?? {})) if (target.kind === "extension") extensions.add(methodKey(feature.cap, method));
|
|
988
|
+
for (const forward of require_dist.featureForwards(feature, 0)) {
|
|
989
|
+
if (forward.itemKey === void 0) {
|
|
990
|
+
byMethod.set(methodKey(feature.cap, forward.method), forward.command);
|
|
991
|
+
continue;
|
|
992
|
+
}
|
|
993
|
+
const items = resets.get(feature.cap) ?? /* @__PURE__ */ new Map();
|
|
994
|
+
items.set(forward.itemKey, forward.command);
|
|
995
|
+
resets.set(feature.cap, items);
|
|
968
996
|
}
|
|
969
|
-
const items = resets.get(feature.cap) ?? /* @__PURE__ */ new Map();
|
|
970
|
-
items.set(forward.itemKey, forward.command);
|
|
971
|
-
resets.set(feature.cap, items);
|
|
972
997
|
}
|
|
973
|
-
if (byMethod.size > 0 || resets.size > 0) next.set(deviceId, {
|
|
998
|
+
if (byMethod.size > 0 || resets.size > 0 || extensions.size > 0) next.set(deviceId, {
|
|
999
|
+
extensions,
|
|
974
1000
|
byMethod,
|
|
975
1001
|
resets
|
|
976
1002
|
});
|
|
@@ -983,6 +1009,16 @@ var ForwardCommands = class {
|
|
|
983
1009
|
}
|
|
984
1010
|
async command(input) {
|
|
985
1011
|
const forwards = this.devices.get(input.groupDeviceId);
|
|
1012
|
+
if (forwards?.extensions.has(methodKey(input.cap, input.method)) === true) {
|
|
1013
|
+
this.deps.logger.warn("media-player command not taken by the remote — its role is not bound", {
|
|
1014
|
+
tags: { deviceId: input.groupDeviceId },
|
|
1015
|
+
meta: {
|
|
1016
|
+
cap: input.cap,
|
|
1017
|
+
method: input.method
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
throw new MediaPlayerUnsupportedError(input.method);
|
|
1021
|
+
}
|
|
986
1022
|
const command = forwards === void 0 ? void 0 : this.commandFor(forwards, input);
|
|
987
1023
|
if (command === void 0) {
|
|
988
1024
|
this.deps.logger.warn("forward command dropped — this method has no command", {
|
|
@@ -4395,6 +4431,22 @@ var Composer = class {
|
|
|
4395
4431
|
this.actuators?.shutdown();
|
|
4396
4432
|
this.history?.stop();
|
|
4397
4433
|
}
|
|
4434
|
+
/**
|
|
4435
|
+
* A media player served by the `remote` extension reports nothing, so its
|
|
4436
|
+
* features are what its remote binds (`mediaPlayerFeaturesOfRoles`), pushed
|
|
4437
|
+
* through `syncShared`. A read that fails changes nothing (D49).
|
|
4438
|
+
*/
|
|
4439
|
+
async syncExtensionFeatures(blocks) {
|
|
4440
|
+
const read = this.deps.extensionFeatures;
|
|
4441
|
+
if (read === void 0) return;
|
|
4442
|
+
for (const block of blocks) {
|
|
4443
|
+
const served = block.features.some((feature) => Object.values(feature.commands ?? {}).some((target) => target.kind === "extension"));
|
|
4444
|
+
const device = this.composed.get(require_dist.composedDeviceStableId(block.id));
|
|
4445
|
+
if (!served || device === null || !isActuatorGroupDevice(device)) continue;
|
|
4446
|
+
const features = await read(device.id);
|
|
4447
|
+
if (features !== null) device.syncShared([], features);
|
|
4448
|
+
}
|
|
4449
|
+
}
|
|
4398
4450
|
attachForwards(deps) {
|
|
4399
4451
|
const callCapMethod = deps.callCapMethod;
|
|
4400
4452
|
if (callCapMethod === void 0) return null;
|
|
@@ -4509,6 +4561,7 @@ var Composer = class {
|
|
|
4509
4561
|
const unreleasedClaims = await this.releaseConfirmed(releasing);
|
|
4510
4562
|
await this.syncSources(rebuilt);
|
|
4511
4563
|
this.forwards?.sync(forwardBlocksOf(input.blocks));
|
|
4564
|
+
await this.syncExtensionFeatures(forwardBlocksOf(input.blocks));
|
|
4512
4565
|
await this.actuators?.sync(input.blocks.flatMap((block) => {
|
|
4513
4566
|
const helper = block.composition.helper;
|
|
4514
4567
|
if (helper !== void 0 && helper.kind !== "group") return [];
|
|
@@ -6035,6 +6088,17 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6035
6088
|
...args
|
|
6036
6089
|
});
|
|
6037
6090
|
},
|
|
6091
|
+
extensionFeatures: async (deviceId) => {
|
|
6092
|
+
try {
|
|
6093
|
+
return require_dist.mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
|
|
6094
|
+
} catch (err) {
|
|
6095
|
+
this.ctx.logger.warn("composer: the remote of a media player could not be read", {
|
|
6096
|
+
tags: { deviceId },
|
|
6097
|
+
meta: { error: require_dist.errMsg(err) }
|
|
6098
|
+
});
|
|
6099
|
+
return null;
|
|
6100
|
+
}
|
|
6101
|
+
},
|
|
6038
6102
|
invokeActuator: (call) => invokeActuatorCall({
|
|
6039
6103
|
switchSetState: async (deviceId, on) => {
|
|
6040
6104
|
await api.switch.setState.mutate({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $a as
|
|
2
|
-
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-
|
|
3
|
-
import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-
|
|
1
|
+
import { $a as compositionItemFieldPath, $r as lockControlCapability, Dr as groupCommandsCapability, Es as isReadingQuantity, Fn as composerCapability, Ga as HISTORY_SLOW_MS, Ha as DAY_MS, In as compositionFieldKey, K as DeclaredDevices, Ka as HOUR_MS, Mn as climateControlCapability, Na as valveCapability, Oi as planComposition, Or as groupTemplate, Pn as colorCapability, Qa as compositionFeatureEnabled, Ti as parseColorInput, Ua as DEFAULT_HISTORY_RETENTION, Un as coverCapability, Va as COMPOSER_ADDON_ID, Wa as HISTORY_FAST_MS, Wr as kebabToCamel, Xa as composedDeviceRef, Xi as resolveMutate, Xn as declaredSeriesKind, Ya as cloneStatefulExpressionMemory, Za as composedDeviceStableId, ac as EventCategory, ao as evaluateStatistic, b as COMPOSED_ITEM_FIXED_FIELDS, ca as sharedActuatorFeatures, co as isForwardInputRef, cs as createEvent, do as openReset, ea as runFanOut, eo as compositionSliceKey, fo as openStatistic, fr as evaluateCompositionField, ft as HvacModeSchema, go as toExpressionValue, gr as expressionContainsBuiltinCall, ho as statisticCadenceMs, ic as errMsg, io as evaluateDerivative, la as sharedActuatorMethods, li as methodRefusal, lo as isHistoryHelper, m as BaseDevice, mo as planStatisticTier, n as ACTUATOR_METHODS, no as createStatefulExpressionMemory, o as ALL_CAPABILITY_DEFINITIONS, oi as mediaPlayerCapability, pi as motionCapability, po as planResetTier, qa as MINUTE_MS, r as ACTUATOR_TEMPLATE_IDS, rc as DeviceType, ro as disarmRoseMemory, rt as FanDirectionSchema, si as mediaPlayerFeaturesOfRoles, so as integrateReading, st as GroupCommandResultSchema, to as compositionSourceKey, ua as sharedColorModes, uo as nextLocalMidnight, vo as BaseAddon, vr as fanControlCapability, wa as switchCapability, xn as buildCapabilityLookup, xr as featureForwards, yn as brightnessCapability, yr as fanOutTargets } from "../../dist-BFiMX6mZ.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-DKJiErim.mjs";
|
|
3
|
+
import { i as DAY_MS$1, m as capSeriesKey, t as DEFAULT_RETENTION } from "../../retention-CDhx9ofQ.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
6
6
|
/**
|
|
@@ -252,6 +252,12 @@ var ComposedDevice = class extends BaseDevice {
|
|
|
252
252
|
play: () => call("media-player", "play", {}),
|
|
253
253
|
pause: () => call("media-player", "pause", {}),
|
|
254
254
|
setVolume: (input) => call("media-player", "setVolume", { volumeLevel: input.volumeLevel }),
|
|
255
|
+
turnOn: () => call("media-player", "turnOn", {}),
|
|
256
|
+
turnOff: () => call("media-player", "turnOff", {}),
|
|
257
|
+
volumeUp: (input) => call("media-player", "volumeUp", { steps: input.steps }),
|
|
258
|
+
volumeDown: (input) => call("media-player", "volumeDown", { steps: input.steps }),
|
|
259
|
+
channelUp: (input) => call("media-player", "channelUp", { steps: input.steps }),
|
|
260
|
+
channelDown: (input) => call("media-player", "channelDown", { steps: input.steps }),
|
|
255
261
|
stop: () => call("media-player", "stop", {}),
|
|
256
262
|
next: () => call("media-player", "next", {}),
|
|
257
263
|
previous: () => call("media-player", "previous", {}),
|
|
@@ -924,6 +930,21 @@ var ForwardRefusedError = class extends Error {
|
|
|
924
930
|
this.name = "ForwardRefusedError";
|
|
925
931
|
}
|
|
926
932
|
};
|
|
933
|
+
/**
|
|
934
|
+
* A method the `remote` extension serves was not taken by it: its role is not
|
|
935
|
+
* bound (D967 amendment). The redirect runs a BOUND role before a call ever
|
|
936
|
+
* reaches the native, so reaching it means nothing is bound — a typed answer,
|
|
937
|
+
* never a silent no-op.
|
|
938
|
+
*/
|
|
939
|
+
var MediaPlayerUnsupportedError = class extends Error {
|
|
940
|
+
method;
|
|
941
|
+
code = "media-player.unsupported";
|
|
942
|
+
constructor(method) {
|
|
943
|
+
super(`media-player.unsupported: \`${method}\` has no bound button on this device's remote`);
|
|
944
|
+
this.method = method;
|
|
945
|
+
this.name = "MediaPlayerUnsupportedError";
|
|
946
|
+
}
|
|
947
|
+
};
|
|
927
948
|
function methodKey(cap, method) {
|
|
928
949
|
return `${cap}.${method}`;
|
|
929
950
|
}
|
|
@@ -956,16 +977,21 @@ var ForwardCommands = class {
|
|
|
956
977
|
if (deviceId === null) continue;
|
|
957
978
|
const byMethod = /* @__PURE__ */ new Map();
|
|
958
979
|
const resets = /* @__PURE__ */ new Map();
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
980
|
+
const extensions = /* @__PURE__ */ new Set();
|
|
981
|
+
for (const feature of block.features) {
|
|
982
|
+
for (const [method, target] of Object.entries(feature.commands ?? {})) if (target.kind === "extension") extensions.add(methodKey(feature.cap, method));
|
|
983
|
+
for (const forward of featureForwards(feature, 0)) {
|
|
984
|
+
if (forward.itemKey === void 0) {
|
|
985
|
+
byMethod.set(methodKey(feature.cap, forward.method), forward.command);
|
|
986
|
+
continue;
|
|
987
|
+
}
|
|
988
|
+
const items = resets.get(feature.cap) ?? /* @__PURE__ */ new Map();
|
|
989
|
+
items.set(forward.itemKey, forward.command);
|
|
990
|
+
resets.set(feature.cap, items);
|
|
963
991
|
}
|
|
964
|
-
const items = resets.get(feature.cap) ?? /* @__PURE__ */ new Map();
|
|
965
|
-
items.set(forward.itemKey, forward.command);
|
|
966
|
-
resets.set(feature.cap, items);
|
|
967
992
|
}
|
|
968
|
-
if (byMethod.size > 0 || resets.size > 0) next.set(deviceId, {
|
|
993
|
+
if (byMethod.size > 0 || resets.size > 0 || extensions.size > 0) next.set(deviceId, {
|
|
994
|
+
extensions,
|
|
969
995
|
byMethod,
|
|
970
996
|
resets
|
|
971
997
|
});
|
|
@@ -978,6 +1004,16 @@ var ForwardCommands = class {
|
|
|
978
1004
|
}
|
|
979
1005
|
async command(input) {
|
|
980
1006
|
const forwards = this.devices.get(input.groupDeviceId);
|
|
1007
|
+
if (forwards?.extensions.has(methodKey(input.cap, input.method)) === true) {
|
|
1008
|
+
this.deps.logger.warn("media-player command not taken by the remote — its role is not bound", {
|
|
1009
|
+
tags: { deviceId: input.groupDeviceId },
|
|
1010
|
+
meta: {
|
|
1011
|
+
cap: input.cap,
|
|
1012
|
+
method: input.method
|
|
1013
|
+
}
|
|
1014
|
+
});
|
|
1015
|
+
throw new MediaPlayerUnsupportedError(input.method);
|
|
1016
|
+
}
|
|
981
1017
|
const command = forwards === void 0 ? void 0 : this.commandFor(forwards, input);
|
|
982
1018
|
if (command === void 0) {
|
|
983
1019
|
this.deps.logger.warn("forward command dropped — this method has no command", {
|
|
@@ -4390,6 +4426,22 @@ var Composer = class {
|
|
|
4390
4426
|
this.actuators?.shutdown();
|
|
4391
4427
|
this.history?.stop();
|
|
4392
4428
|
}
|
|
4429
|
+
/**
|
|
4430
|
+
* A media player served by the `remote` extension reports nothing, so its
|
|
4431
|
+
* features are what its remote binds (`mediaPlayerFeaturesOfRoles`), pushed
|
|
4432
|
+
* through `syncShared`. A read that fails changes nothing (D49).
|
|
4433
|
+
*/
|
|
4434
|
+
async syncExtensionFeatures(blocks) {
|
|
4435
|
+
const read = this.deps.extensionFeatures;
|
|
4436
|
+
if (read === void 0) return;
|
|
4437
|
+
for (const block of blocks) {
|
|
4438
|
+
const served = block.features.some((feature) => Object.values(feature.commands ?? {}).some((target) => target.kind === "extension"));
|
|
4439
|
+
const device = this.composed.get(composedDeviceStableId(block.id));
|
|
4440
|
+
if (!served || device === null || !isActuatorGroupDevice(device)) continue;
|
|
4441
|
+
const features = await read(device.id);
|
|
4442
|
+
if (features !== null) device.syncShared([], features);
|
|
4443
|
+
}
|
|
4444
|
+
}
|
|
4393
4445
|
attachForwards(deps) {
|
|
4394
4446
|
const callCapMethod = deps.callCapMethod;
|
|
4395
4447
|
if (callCapMethod === void 0) return null;
|
|
@@ -4504,6 +4556,7 @@ var Composer = class {
|
|
|
4504
4556
|
const unreleasedClaims = await this.releaseConfirmed(releasing);
|
|
4505
4557
|
await this.syncSources(rebuilt);
|
|
4506
4558
|
this.forwards?.sync(forwardBlocksOf(input.blocks));
|
|
4559
|
+
await this.syncExtensionFeatures(forwardBlocksOf(input.blocks));
|
|
4507
4560
|
await this.actuators?.sync(input.blocks.flatMap((block) => {
|
|
4508
4561
|
const helper = block.composition.helper;
|
|
4509
4562
|
if (helper !== void 0 && helper.kind !== "group") return [];
|
|
@@ -6030,6 +6083,17 @@ var ComposerAddon = class extends BaseAddon {
|
|
|
6030
6083
|
...args
|
|
6031
6084
|
});
|
|
6032
6085
|
},
|
|
6086
|
+
extensionFeatures: async (deviceId) => {
|
|
6087
|
+
try {
|
|
6088
|
+
return mediaPlayerFeaturesOfRoles((await api.remote.listCommands.query({ deviceId })).commands.map((c) => c.role));
|
|
6089
|
+
} catch (err) {
|
|
6090
|
+
this.ctx.logger.warn("composer: the remote of a media player could not be read", {
|
|
6091
|
+
tags: { deviceId },
|
|
6092
|
+
meta: { error: errMsg(err) }
|
|
6093
|
+
});
|
|
6094
|
+
return null;
|
|
6095
|
+
}
|
|
6096
|
+
},
|
|
6033
6097
|
invokeActuator: (call) => invokeActuatorCall({
|
|
6034
6098
|
switchSetState: async (deviceId, on) => {
|
|
6035
6099
|
await api.switch.setState.mutate({
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
* (where a runtime writes and how it reads) and `composer-live-set.ts` (the
|
|
48
48
|
* pure reads of the live set: tracked sources, reset keys, wanted claims).
|
|
49
49
|
*/
|
|
50
|
-
import { type CapabilityLookup, type ComposerApplyInput, type ComposerApplyResult, type FanOutCall, type CompositionBlockState, type DeviceHistoryQueryResult, type HistoryRetention, type ReadingQuantity, type IScopedLogger } from "@camstack/types";
|
|
50
|
+
import { type CapabilityLookup, type ComposerApplyInput, type ComposerApplyResult, type FanOutCall, type CompositionBlockState, type DeviceFeature, type DeviceHistoryQueryResult, type HistoryRetention, type ReadingQuantity, type IScopedLogger } from "@camstack/types";
|
|
51
51
|
import type { DeviceStateChangedData } from "../shared/device-state-changed.js";
|
|
52
52
|
import { type ActuatorMemberLookup } from "./actuator-groups.js";
|
|
53
53
|
import { type ComposerDeclare, type ComposerDevicePorts } from "./composed-device-set.js";
|
|
@@ -122,6 +122,12 @@ export interface ComposerDeps {
|
|
|
122
122
|
* device refuses its commands by name.
|
|
123
123
|
*/
|
|
124
124
|
readonly callCapMethod?: ForwardCommandsDeps["callCapMethod"];
|
|
125
|
+
/**
|
|
126
|
+
* The media-player features the bound roles of a device's remote stand for, or
|
|
127
|
+
* null when they could not be read (the device keeps the ones it has, D49).
|
|
128
|
+
* Absent in tests that predate the `extension` command.
|
|
129
|
+
*/
|
|
130
|
+
readonly extensionFeatures?: (deviceId: number) => Promise<readonly DeviceFeature[] | null>;
|
|
125
131
|
}
|
|
126
132
|
export declare class Composer {
|
|
127
133
|
private readonly deps;
|
|
@@ -164,6 +170,12 @@ export declare class Composer {
|
|
|
164
170
|
onDeviceUnregistered(deviceId: number): Promise<void>;
|
|
165
171
|
onBindingsChanged(data: DeviceBindingsChangedData): Promise<void>;
|
|
166
172
|
shutdown(): void;
|
|
173
|
+
/**
|
|
174
|
+
* A media player served by the `remote` extension reports nothing, so its
|
|
175
|
+
* features are what its remote binds (`mediaPlayerFeaturesOfRoles`), pushed
|
|
176
|
+
* through `syncShared`. A read that fails changes nothing (D49).
|
|
177
|
+
*/
|
|
178
|
+
private syncExtensionFeatures;
|
|
167
179
|
private attachForwards;
|
|
168
180
|
/**
|
|
169
181
|
* The dispatch path of a composed device's commands. A forward-only
|