@camstack/server 1.2.846 → 1.2.848
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 +13 -0
- package/dist/api/trpc/generated-cap-routers.js +9 -0
- package/dist/core/addon/instance-lifecycle.js +10 -6
- package/package.json +10 -20
- package/system/dist/addon-utils.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 +4 -4
- 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 +5 -5
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +3 -3
- 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 +5 -5
- 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 +4 -4
- package/system/dist/builtins/composer/composer.addon.mjs +4 -4
- 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 +36 -8
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +36 -8
- package/system/dist/builtins/core-blocks/remote-service.d.ts +5 -1
- package/system/dist/builtins/core-blocks/remote-wiring.d.ts +3 -1
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
- 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 +5 -5
- package/system/dist/builtins/local-network/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +10 -10
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +10 -10
- 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 +20 -20
- 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 +115 -115
- 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-5Dc1kESK.mjs → capture-engine-BDgAg1_L.mjs} +1 -1
- package/system/dist/{capture-engine-CAe07XOa.js → capture-engine-CLow73VK.js} +1 -1
- package/system/dist/{composition-sources--rfbIp5Q.mjs → composition-sources-PCla-eR3.mjs} +1 -1
- package/system/dist/{composition-sources-DnPdeEpc.js → composition-sources-Xb2YACrP.js} +1 -1
- package/system/dist/{constants-BCHaKB-z.mjs → constants-Cjv1STtI.mjs} +1 -1
- package/system/dist/{constants-CSzJdfTh.js → constants-Crx9nPwX.js} +1 -1
- package/system/dist/{coral-accelerators-BW3OcrLD.mjs → coral-accelerators-DBlgWB8k.mjs} +6 -6
- package/system/dist/{custom-action-registry-N7flBDwT.mjs → custom-action-registry-B9zFBNVa.mjs} +37 -37
- package/system/dist/{device-ca-wE8cQltR.mjs → device-ca-D5bhkYRx.mjs} +1 -1
- package/system/dist/{device-ca-DtTxpBwM.js → device-ca-jaJY-9dh.js} +1 -1
- package/system/dist/{dist-fVo218pz.mjs → dist-CUB8zpv-.mjs} +246 -17
- package/system/dist/{dist-qTxCMNU_.js → dist-D9G24tL4.js} +246 -17
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-DG_5XGOq.mjs → hub-identity-0lAqqUXZ.mjs} +10 -10
- package/system/dist/{hub-identity-B3Mwwm1k.js → hub-identity-D6Yzg92a.js} +1 -1
- package/system/dist/{hub-mdns-ciao-DeJIUTtf.js → hub-mdns-ciao-0vZomp05.js} +2 -2
- package/system/dist/{hub-mdns-ciao-BgfvtyNE.mjs → hub-mdns-ciao-dT75vFJK.mjs} +2 -2
- package/system/dist/index.js +22 -10
- package/system/dist/index.mjs +233 -221
- package/system/dist/{legacy-integration-rows-door-CXQJPQdS.mjs → legacy-integration-rows-door-CkwpRASZ.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-BERb1HaB.js → legacy-integration-rows-door-V0HNtga9.js} +1 -1
- package/system/dist/{rename-composition-block-BldkznZq.mjs → rename-composition-block-CKO6KFN4.mjs} +1 -1
- package/system/dist/{rename-composition-block-DulTUVAf.js → rename-composition-block-CmNS12Yh.js} +1 -1
- package/system/dist/{restore-archive-myv6HETV.mjs → restore-archive-Cp8P5gxb.mjs} +94 -94
- package/system/dist/{restore-archive-D8KARE3l.js → restore-archive-DRyTaAb5.js} +1 -1
- package/system/dist/{wal-maintenance-C_RAwz8s.mjs → wal-maintenance-CyW12mpW.mjs} +0 -0
- package/system/dist/{wal-maintenance-DmpBLvE9.js → wal-maintenance-EJcAHbIL.js} +0 -0
- package/system/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.848] - 2026-11-12
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- A kind that declares its own role (an Alexa Echo target) is no longer treated as bringing devices because the addon's manifest says so; creating Echo targets works again
|
|
15
|
+
- A remote sends a stored native IR code verbatim to a transmitter that replays its format
|
|
16
|
+
|
|
17
|
+
## [1.2.847] - 2026-11-12
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Rebuilt against updated dependencies.
|
|
22
|
+
|
|
10
23
|
## [1.2.846] - 2026-11-12
|
|
11
24
|
|
|
12
25
|
### Changed
|
|
@@ -5925,6 +5925,15 @@ function createCapRouter_irTransmitter(getProvider, createRemoteProxy) {
|
|
|
5925
5925
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5926
5926
|
return p.send(methodInput);
|
|
5927
5927
|
}),
|
|
5928
|
+
learn: trpc_middleware_js_1.protectedProcedure
|
|
5929
|
+
.input(types_76.irTransmitterCapability.methods.learn.input.loose())
|
|
5930
|
+
.output(types_76.irTransmitterCapability.methods.learn.output)
|
|
5931
|
+
.mutation(async ({ input, ctx }) => {
|
|
5932
|
+
const { nodeId, ...methodInput } = input;
|
|
5933
|
+
const p = resolveProvider('ir-transmitter', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
5934
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
5935
|
+
return p.learn(methodInput);
|
|
5936
|
+
}),
|
|
5928
5937
|
getInfo: trpc_middleware_js_1.protectedProcedure
|
|
5929
5938
|
.input(types_76.irTransmitterCapability.methods.getInfo.input.loose())
|
|
5930
5939
|
.output(types_76.irTransmitterCapability.methods.getInfo.output)
|
|
@@ -344,19 +344,23 @@ async function deleteRegisteredInstance(deps, instances, integration) {
|
|
|
344
344
|
});
|
|
345
345
|
}
|
|
346
346
|
/**
|
|
347
|
-
* Whether instances of `kind` of `provider` bring devices
|
|
348
|
-
*
|
|
347
|
+
* Whether instances of `kind` of `provider` bring devices. A kind that declares its own role
|
|
348
|
+
* decides; otherwise the manifest's `integrationRole`, then the provider's role. No `kind` means
|
|
349
|
+
* the default kind, then the addon-wide rule. (An addon-wide manifest role once made a services
|
|
350
|
+
* kind — the Alexa account — demand a hub-minted id.)
|
|
349
351
|
*/
|
|
350
352
|
async function bringsDevicesOf(deps, addonId, provider, kind) {
|
|
351
|
-
const declared = deps.manifestRole(addonId);
|
|
352
|
-
if (declared !== undefined)
|
|
353
|
-
return (0, integration_role_1.bringsDevices)(declared);
|
|
354
353
|
const described = await provider.describe();
|
|
355
354
|
// A call without `kind` is the provider's default kind (`described.kind`) when that names a declared kind.
|
|
356
355
|
const wanted = kind ?? described.kind;
|
|
357
356
|
const own = (described.kinds ?? []).find((k) => k.id === wanted);
|
|
357
|
+
if (own?.role !== undefined)
|
|
358
|
+
return (0, integration_role_1.bringsDevices)(own.role);
|
|
359
|
+
const declared = deps.manifestRole(addonId);
|
|
360
|
+
if (declared !== undefined)
|
|
361
|
+
return (0, integration_role_1.bringsDevices)(declared);
|
|
358
362
|
if (own !== undefined)
|
|
359
|
-
return (0, integration_role_1.bringsDevices)(
|
|
363
|
+
return (0, integration_role_1.bringsDevices)(described.role);
|
|
360
364
|
return (0, integration_role_1.bringsDevices)((0, integration_role_1.describedRoleOf)(described) ?? described.role);
|
|
361
365
|
}
|
|
362
366
|
/** A builtin the hub itself declared (`DeclaredDevices` marks it `fixed`); its switch is the registry flag. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.848",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,20 +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-mqtt-
|
|
73
|
-
"@camstack/addon-provider-bosch": ">=0.1.54",
|
|
74
|
-
"@camstack/addon-provider-ecowitt": ">=0.2.164",
|
|
75
|
-
"@camstack/addon-provider-enpal": ">=0.1.17",
|
|
76
|
-
"@camstack/addon-provider-homematic": ">=1.2.192",
|
|
77
|
-
"@camstack/addon-provider-rademacher": ">=0.2.166",
|
|
78
|
-
"@camstack/addon-provider-reolink": ">=1.2.240",
|
|
79
|
-
"@camstack/addon-provider-unifi": ">=0.2.163",
|
|
80
|
-
"@camstack/addon-provider-unraid": ">=0.2.165",
|
|
81
|
-
"@camstack/addon-provider-velux": ">=0.2.168",
|
|
82
|
-
"@camstack/addon-provider-vesync": ">=0.2.157"
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.651",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.371",
|
|
71
|
+
"@camstack/addon-provider-esphome": ">=0.1.20",
|
|
72
|
+
"@camstack/addon-provider-mqtt-ha": ">=0.1.47"
|
|
83
73
|
},
|
|
84
74
|
"wrapper": {
|
|
85
75
|
"desktop": ">=0.0.1",
|
|
@@ -88,19 +78,19 @@
|
|
|
88
78
|
}
|
|
89
79
|
},
|
|
90
80
|
"dependencies": {
|
|
91
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
92
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
81
|
+
"@camstack/addon-admin-ui": "1.2.651",
|
|
82
|
+
"@camstack/addon-agent-ui": "1.2.371",
|
|
93
83
|
"@camstack/addon-auth": "1.2.182",
|
|
94
84
|
"@camstack/addon-benchmark": "1.2.313",
|
|
95
85
|
"@camstack/addon-decoder-nodeav": "1.2.149",
|
|
96
86
|
"@camstack/addon-notifiers": "1.2.637",
|
|
97
87
|
"@camstack/addon-pipeline": "1.2.651",
|
|
98
88
|
"@camstack/addon-pipeline-orchestrator": "1.2.681",
|
|
99
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
89
|
+
"@camstack/addon-post-analysis": "1.2.697",
|
|
100
90
|
"@camstack/develop": "0.1.52",
|
|
101
91
|
"@camstack/sdk": "1.2.157",
|
|
102
|
-
"@camstack/types": "1.2.
|
|
103
|
-
"@camstack/ui-library": "1.2.
|
|
92
|
+
"@camstack/types": "1.2.555",
|
|
93
|
+
"@camstack/ui-library": "1.2.431",
|
|
104
94
|
"@fastify/compress": "^9.0.0",
|
|
105
95
|
"@fastify/cookie": "^11.0.2",
|
|
106
96
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as readCurrentCommandOrigin } from "./cap-call-scope-Bic6Ekfw.mjs";
|
|
2
|
-
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-
|
|
2
|
+
import { C as isModelDownloaded, S as isModelDownloadHttpError, _ as downloadFile, a as startEventLoopStallMonitor, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, p as ModelDownloadHttpError, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
|
|
3
3
|
import { i as renderCourtesyOverlayJpeg, n as courtesyCacheKey, r as renderCourtesyJpeg, t as COURTESY_DEFAULT_WIDTH } from "./snapshot-courtesy-CyFs1M3I.mjs";
|
|
4
4
|
export { COURTESY_DEFAULT_WIDTH, CustomActionRegistry, ModelDownloadHttpError, ModelDownloadService, STALL_REPORT_MS, STALL_TICK_MS, adoptModelRevisions, attributeStall, collectModelFiles, contentTypeFor, courtesyCacheKey, createFileDataPlaneHandler, deleteModelFromDisk, downloadFile, ensureModel, getModelFilePath, isModelDownloadHttpError, isModelDownloaded, parseRangeHeader, readCurrentCommandOrigin, renderCourtesyJpeg, renderCourtesyOverlayJpeg, resolveFormatRevision, startEventLoopStallMonitor };
|
|
@@ -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-D9G24tL4.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,7 +1,7 @@
|
|
|
1
|
-
import { Sl as EventCategory, Ss as BaseAddon, bl as errMsg, bn as addonPagesCapability } from "../../dist-
|
|
1
|
+
import { Sl as EventCategory, Ss as BaseAddon, bl as errMsg, bn as addonPagesCapability } from "../../dist-CUB8zpv-.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
-
import * as fs from "node:fs";
|
|
4
|
+
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
//#region src/builtins/addon-pages-aggregator/dedupe-pages.ts
|
|
7
7
|
/** Stable identity for an addon page, independent of which node reported it. */
|
|
@@ -211,11 +211,11 @@ var AddonPagesAggregatorAddon = class extends BaseAddon {
|
|
|
211
211
|
const bundlePath = this.resolveBundlePath(addonId, bundle);
|
|
212
212
|
if (bundlePath === null) return `/api/addon-pages/${addonId}/${bundle}?v=${Math.floor(Date.now())}`;
|
|
213
213
|
try {
|
|
214
|
-
const stat = fs.statSync(bundlePath);
|
|
214
|
+
const stat = fs$1.statSync(bundlePath);
|
|
215
215
|
const cacheKey = `${bundlePath}:${stat.size}:${stat.mtimeMs}`;
|
|
216
216
|
let v = this.bundleHashCache.get(cacheKey);
|
|
217
217
|
if (v === void 0) {
|
|
218
|
-
v = createHash("sha1").update(fs.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
218
|
+
v = createHash("sha1").update(fs$1.readFileSync(bundlePath)).digest("hex").slice(0, 12);
|
|
219
219
|
this.bundleHashCache.set(cacheKey, v);
|
|
220
220
|
}
|
|
221
221
|
return `/api/addon-pages/${addonId}/${bundle}?v=${v}`;
|
|
@@ -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-D9G24tL4.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,7 +1,7 @@
|
|
|
1
|
-
import { Sl as EventCategory, Sn as addonWidgetsCapability, Ss as BaseAddon, bl as errMsg } from "../../dist-
|
|
1
|
+
import { Sl as EventCategory, Sn as addonWidgetsCapability, Ss as BaseAddon, bl as errMsg } from "../../dist-CUB8zpv-.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
|
-
import * as fs from "node:fs";
|
|
4
|
+
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
//#region src/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.ts
|
|
7
7
|
/**
|
|
@@ -204,9 +204,9 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
204
204
|
if (entryPath === null) return String(Math.floor(Date.now()));
|
|
205
205
|
try {
|
|
206
206
|
const dir = path$1.dirname(entryPath);
|
|
207
|
-
const files = fs.readdirSync(dir).filter((f) => fs.statSync(path$1.join(dir, f)).isFile()).sort();
|
|
207
|
+
const files = fs$1.readdirSync(dir).filter((f) => fs$1.statSync(path$1.join(dir, f)).isFile()).sort();
|
|
208
208
|
const cacheKey = `${dir}#${files.map((f) => {
|
|
209
|
-
const s = fs.statSync(path$1.join(dir, f));
|
|
209
|
+
const s = fs$1.statSync(path$1.join(dir, f));
|
|
210
210
|
return `${f}:${s.size}:${s.mtimeMs}`;
|
|
211
211
|
}).join("|")}`;
|
|
212
212
|
const cached = this.bundleHashCache.get(cacheKey);
|
|
@@ -214,7 +214,7 @@ var AddonWidgetsAggregatorAddon = class extends BaseAddon {
|
|
|
214
214
|
const hash = createHash("sha1");
|
|
215
215
|
for (const f of files) {
|
|
216
216
|
hash.update(f);
|
|
217
|
-
hash.update(fs.readFileSync(path$1.join(dir, f)));
|
|
217
|
+
hash.update(fs$1.readFileSync(path$1.join(dir, f)));
|
|
218
218
|
}
|
|
219
219
|
const digest = hash.digest("hex").slice(0, 12);
|
|
220
220
|
this.bundleHashCache.set(cacheKey, digest);
|
|
@@ -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-D9G24tL4.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,7 +1,7 @@
|
|
|
1
|
-
import { Cc as defineRecordKinds, Cn as alertEpisodeId, Sl as EventCategory, Ss as BaseAddon, T as CORE_BLOCK_ADDON_PREFIX, Tn as alertsCapability, bl as errMsg, ci as isAlertEpisodeOpen, li as isAlertEpisodeSeverity, p as AlertSchema, vc as createEvent, wn as alertEpisodePayload } from "../../dist-
|
|
1
|
+
import { Cc as defineRecordKinds, Cn as alertEpisodeId, Sl as EventCategory, Ss as BaseAddon, T as CORE_BLOCK_ADDON_PREFIX, Tn as alertsCapability, bl as errMsg, ci as isAlertEpisodeOpen, li as isAlertEpisodeSeverity, p as AlertSchema, vc as createEvent, wn as alertEpisodePayload } from "../../dist-CUB8zpv-.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
|
-
import * as fs from "node:fs";
|
|
4
|
+
import * as fs$1 from "node:fs";
|
|
5
5
|
import * as path$1 from "node:path";
|
|
6
6
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
7
7
|
/**
|
|
@@ -148,7 +148,7 @@ function lastCauseAfterChunk(previous, chunk) {
|
|
|
148
148
|
function readRunnerDisplayName(addonDirs, runnerId) {
|
|
149
149
|
const names = [];
|
|
150
150
|
for (const dir of addonDirs) try {
|
|
151
|
-
const raw = JSON.parse(fs.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
151
|
+
const raw = JSON.parse(fs$1.readFileSync(path$1.join(dir, "package.json"), "utf-8"));
|
|
152
152
|
const camstack = typeof raw === "object" && raw !== null ? Reflect.get(raw, "camstack") : null;
|
|
153
153
|
const addons = typeof camstack === "object" && camstack !== null ? Reflect.get(camstack, "addons") : null;
|
|
154
154
|
if (!Array.isArray(addons)) continue;
|
|
@@ -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-D9G24tL4.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 { An as bareAddonId, Ic as isEvent, Sl as EventCategory, Ss as BaseAddon, ba as ptzAutotrackCapability, bl as errMsg, ut as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-
|
|
1
|
+
import { An as bareAddonId, Ic as isEvent, Sl as EventCategory, Ss as BaseAddon, ba as ptzAutotrackCapability, bl as errMsg, ut as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-CUB8zpv-.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-D9G24tL4.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-DRyTaAb5.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,8 +1,8 @@
|
|
|
1
|
-
import { Ii as mayWriteToLocation, Jc as nodePin, Sl as EventCategory, Ss as BaseAddon, kn as backupCapability, mo as storageOccupancyCapability, ul as toNodeId } from "../../dist-
|
|
1
|
+
import { Ii as mayWriteToLocation, Jc as nodePin, Sl as EventCategory, Ss as BaseAddon, kn as backupCapability, mo as storageOccupancyCapability, ul as toNodeId } from "../../dist-CUB8zpv-.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-Cp8P5gxb.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
|
-
import * as fs from "node:fs";
|
|
5
|
+
import * as fs$1 from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
7
7
|
import * as fsp from "node:fs/promises";
|
|
8
8
|
//#region src/builtins/backup-orchestrator/backup-databases.ts
|
|
@@ -1018,7 +1018,7 @@ async function downloadArchiveToCache(input) {
|
|
|
1018
1018
|
location: input.locationId,
|
|
1019
1019
|
relativePath: input.filename
|
|
1020
1020
|
});
|
|
1021
|
-
const writeStream = fs.createWriteStream(input.cachePath);
|
|
1021
|
+
const writeStream = fs$1.createWriteStream(input.cachePath);
|
|
1022
1022
|
let offset = 0;
|
|
1023
1023
|
try {
|
|
1024
1024
|
while (offset < sizeBytes) {
|
|
@@ -2502,7 +2502,7 @@ var BackupOrchestratorAddon = class extends BaseAddon {
|
|
|
2502
2502
|
});
|
|
2503
2503
|
try {
|
|
2504
2504
|
let offset = 0;
|
|
2505
|
-
const stream = fs.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2505
|
+
const stream = fs$1.createReadStream(input.cachePath, { highWaterMark: UPLOAD_CHUNK_BYTES });
|
|
2506
2506
|
for await (const rawChunk of stream) {
|
|
2507
2507
|
if (input.signal?.aborted) {
|
|
2508
2508
|
stream.destroy();
|
|
@@ -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-D9G24tL4.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 { Cc as defineRecordKinds, D as CalendarPreferencesSchema, Ss as BaseAddon, zn as calendarsCapability } from "../../dist-
|
|
1
|
+
import { Cc as defineRecordKinds, D as CalendarPreferencesSchema, Ss as BaseAddon, zn as calendarsCapability } from "../../dist-CUB8zpv-.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-D9G24tL4.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 { $ as DeclaredDevices, An as bareAddonId, Bn as cameraGridLayoutCapability, Gi as motionCapability, Ks as RecordIntegrationInstances, Lc as isInstanceEnabled, Mc as hydrateSchema, Sc as defineEntryKind, Sl as EventCategory, Ss as BaseAddon, Xo as buildFfmpegArgs, _l as DeviceFeature, bl as errMsg, co as snapshotCapability, g as BaseDevice, go as streamCatalogCapability, gr as declarationOwnerNodeId, ii as integrationInstancesCapability, jt as MOTION_CLOSE_AFTER_MS, vc as createEvent, yl as DeviceType, z as DERIVED_CAMERA_SILENCED_CAP_NAMES, zi as memoizePinnedFfmpeg } from "../../dist-
|
|
1
|
+
import { $ as DeclaredDevices, An as bareAddonId, Bn as cameraGridLayoutCapability, Gi as motionCapability, Ks as RecordIntegrationInstances, Lc as isInstanceEnabled, Mc as hydrateSchema, Sc as defineEntryKind, Sl as EventCategory, Ss as BaseAddon, Xo as buildFfmpegArgs, _l as DeviceFeature, bl as errMsg, co as snapshotCapability, g as BaseDevice, go as streamCatalogCapability, gr as declarationOwnerNodeId, ii as integrationInstancesCapability, jt as MOTION_CLOSE_AFTER_MS, vc as createEvent, yl as DeviceType, z as DERIVED_CAMERA_SILENCED_CAP_NAMES, zi as memoizePinnedFfmpeg } from "../../dist-CUB8zpv-.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
@@ -3,11 +3,11 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
8
|
-
const require_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-D9G24tL4.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-Xb2YACrP.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-CLow73VK.js");
|
|
9
9
|
const require_retention = require("../../retention-BcOSL6b9.js");
|
|
10
|
-
const require_rename_composition_block = require("../../rename-composition-block-
|
|
10
|
+
const require_rename_composition_block = require("../../rename-composition-block-CmNS12Yh.js");
|
|
11
11
|
let zod = require("zod");
|
|
12
12
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
13
13
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as DeclaredDevices, $o as composedDeviceStableId, A as ConsumableItemSchema, Ai as lockControlCapability, Bi as methodRefusal, Br as expressionContainsBuiltinCall, Bt as PetFountainStatusSchema, Fr as evaluateCompositionField, Ga as runFanOut, Gi as motionCapability, Go as HISTORY_FAST_MS, Ko as HISTORY_SLOW_MS, Kr as featureForwards, Li as mediaPlayerCapability, Mn as brightnessCapability, No as valveCapability, Pn as buildCapabilityLookup, Qn as colorCapability, Qo as composedDeviceRef, Ri as mediaPlayerFeaturesOfRoles, Ro as withDefaultRunning, S as COMPOSED_ITEM_FIXED_FIELDS, Sl as EventCategory, Ss as BaseAddon, Ur as fanControlCapability, Vo as COMPOSER_ADDON_ID, Wo as DEFAULT_HISTORY_RETENTION, Wr as fanOutTargets, Yn as climateControlCapability, Yo as MINUTE_MS, Zo as cloneStatefulExpressionMemory, _a as processTimeZoneOr, _r as declaredSeriesKind, _s as planResetTier, ar as consumablesCapability, as as disarmRoseMemory, bl as errMsg, bs as toExpressionValue, dr as coverCapability, ds as integrateReading, ei as groupCommandsCapability, es as compositionFeatureEnabled, fs as isForwardInputRef, ft as FanDirectionSchema, g as BaseDevice, gs as openStatistic, gt as GroupCommandResultSchema, hs as openReset, i as ACTUATOR_TEMPLATE_IDS, ia as parseColorInput, io as sharedColorModes, is as createStatefulExpressionMemory, la as planComposition, ls as historyRetentionFromSettings, ms as nextLocalMidnight, no as sharedActuatorFeatures, nr as compositionFieldKey, ns as compositionSliceKey, oa as petFountainCapability, os as evaluateDerivative, ps as isHistoryHelper, qo as HOUR_MS, r as ACTUATOR_METHODS, ro as sharedActuatorMethods, rs as compositionSourceKey, s as ALL_CAPABILITY_DEFINITIONS, sa as petFountainWaterItem, ss as evaluateStatistic, ti as groupTemplate, tr as composerCapability, ts as compositionItemFieldPath, vc as createEvent, vs as planStatisticTier, xi as kebabToCamel, xl as featuresOfBoundCaps, xt as HvacModeSchema, yl as DeviceType, yo as switchCapability, ys as statisticCadenceMs, za as resolveMutate, zc as isReadingQuantity } from "../../dist-
|
|
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 { $ as DeclaredDevices, $o as composedDeviceStableId, A as ConsumableItemSchema, Ai as lockControlCapability, Bi as methodRefusal, Br as expressionContainsBuiltinCall, Bt as PetFountainStatusSchema, Fr as evaluateCompositionField, Ga as runFanOut, Gi as motionCapability, Go as HISTORY_FAST_MS, Ko as HISTORY_SLOW_MS, Kr as featureForwards, Li as mediaPlayerCapability, Mn as brightnessCapability, No as valveCapability, Pn as buildCapabilityLookup, Qn as colorCapability, Qo as composedDeviceRef, Ri as mediaPlayerFeaturesOfRoles, Ro as withDefaultRunning, S as COMPOSED_ITEM_FIXED_FIELDS, Sl as EventCategory, Ss as BaseAddon, Ur as fanControlCapability, Vo as COMPOSER_ADDON_ID, Wo as DEFAULT_HISTORY_RETENTION, Wr as fanOutTargets, Yn as climateControlCapability, Yo as MINUTE_MS, Zo as cloneStatefulExpressionMemory, _a as processTimeZoneOr, _r as declaredSeriesKind, _s as planResetTier, ar as consumablesCapability, as as disarmRoseMemory, bl as errMsg, bs as toExpressionValue, dr as coverCapability, ds as integrateReading, ei as groupCommandsCapability, es as compositionFeatureEnabled, fs as isForwardInputRef, ft as FanDirectionSchema, g as BaseDevice, gs as openStatistic, gt as GroupCommandResultSchema, hs as openReset, i as ACTUATOR_TEMPLATE_IDS, ia as parseColorInput, io as sharedColorModes, is as createStatefulExpressionMemory, la as planComposition, ls as historyRetentionFromSettings, ms as nextLocalMidnight, no as sharedActuatorFeatures, nr as compositionFieldKey, ns as compositionSliceKey, oa as petFountainCapability, os as evaluateDerivative, ps as isHistoryHelper, qo as HOUR_MS, r as ACTUATOR_METHODS, ro as sharedActuatorMethods, rs as compositionSourceKey, s as ALL_CAPABILITY_DEFINITIONS, sa as petFountainWaterItem, ss as evaluateStatistic, ti as groupTemplate, tr as composerCapability, ts as compositionItemFieldPath, vc as createEvent, vs as planStatisticTier, xi as kebabToCamel, xl as featuresOfBoundCaps, xt as HvacModeSchema, yl as DeviceType, yo as switchCapability, ys as statisticCadenceMs, za as resolveMutate, zc as isReadingQuantity } from "../../dist-CUB8zpv-.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-PCla-eR3.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-BDgAg1_L.mjs";
|
|
4
4
|
import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-CUOVI1p7.mjs";
|
|
5
|
-
import { n as renameCompositionBlock } from "../../rename-composition-block-
|
|
5
|
+
import { n as renameCompositionBlock } from "../../rename-composition-block-CKO6KFN4.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
8
8
|
/**
|
|
@@ -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-D9G24tL4.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 { Mi as logDestinationCapability, Ss as BaseAddon } from "../../dist-
|
|
1
|
+
import { Mi as logDestinationCapability, Ss as BaseAddon } from "../../dist-CUB8zpv-.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,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-D9G24tL4.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-Xb2YACrP.js");
|
|
6
|
+
const require_capture_engine = require("../../capture-engine-CLow73VK.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
|
const require_cap_call_scope = require("../../cap-call-scope-8eiugfLl.js");
|
|
@@ -7106,16 +7106,13 @@ var RemoteService = class {
|
|
|
7106
7106
|
};
|
|
7107
7107
|
}
|
|
7108
7108
|
return this.withLock(deviceId, async () => {
|
|
7109
|
-
const
|
|
7109
|
+
const args = await this.irSendArgs(transmitterId, source.payload);
|
|
7110
7110
|
try {
|
|
7111
7111
|
await this.deps.invoke({
|
|
7112
7112
|
deviceId: transmitterId,
|
|
7113
7113
|
cap: IR_TRANSMITTER_CAP,
|
|
7114
7114
|
method: IR_SEND_METHOD,
|
|
7115
|
-
args
|
|
7116
|
-
timings,
|
|
7117
|
-
settings
|
|
7118
|
-
}
|
|
7115
|
+
args
|
|
7119
7116
|
});
|
|
7120
7117
|
} catch (err) {
|
|
7121
7118
|
this.deps.logger.warn("remote: the infrared source failed to send, nothing was assumed", {
|
|
@@ -7147,6 +7144,20 @@ var RemoteService = class {
|
|
|
7147
7144
|
};
|
|
7148
7145
|
});
|
|
7149
7146
|
}
|
|
7147
|
+
/** A native code goes verbatim to a transmitter that replays its format; anything else as a pulse train. */
|
|
7148
|
+
async irSendArgs(transmitterId, payload) {
|
|
7149
|
+
if (payload.kind === "native") {
|
|
7150
|
+
if ((await this.deps.nativeFormats(transmitterId)).includes(payload.format)) return { native: {
|
|
7151
|
+
format: payload.format,
|
|
7152
|
+
code: payload.code
|
|
7153
|
+
} };
|
|
7154
|
+
}
|
|
7155
|
+
const { timings, settings } = require_dist.toTimings(payload);
|
|
7156
|
+
return {
|
|
7157
|
+
timings,
|
|
7158
|
+
settings
|
|
7159
|
+
};
|
|
7160
|
+
}
|
|
7150
7161
|
async forgetSource(deviceId) {
|
|
7151
7162
|
const kept = await this.readAssumed(deviceId);
|
|
7152
7163
|
if (kept.source !== null) await this.deps.assumptions.write(deviceId, {
|
|
@@ -7506,6 +7517,22 @@ function plugOnOver(api, logger) {
|
|
|
7506
7517
|
}
|
|
7507
7518
|
};
|
|
7508
7519
|
}
|
|
7520
|
+
/** The native code formats a transmitter replays; empty when it does not answer. */
|
|
7521
|
+
function nativeFormatsOver(api, logger) {
|
|
7522
|
+
return async (transmitterId) => {
|
|
7523
|
+
const current = api();
|
|
7524
|
+
if (current === void 0) return [];
|
|
7525
|
+
try {
|
|
7526
|
+
return (await current.irTransmitter.getInfo.query({ deviceId: transmitterId })).formats;
|
|
7527
|
+
} catch (err) {
|
|
7528
|
+
logger.debug("remote: the transmitter did not report its formats, sending a pulse train", {
|
|
7529
|
+
tags: { deviceId: transmitterId },
|
|
7530
|
+
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
7531
|
+
});
|
|
7532
|
+
return [];
|
|
7533
|
+
}
|
|
7534
|
+
};
|
|
7535
|
+
}
|
|
7509
7536
|
/** The devices whose remote configuration points at a template. */
|
|
7510
7537
|
function templateUsageOver(settings, api) {
|
|
7511
7538
|
return { devicesUsing: async (templateId) => {
|
|
@@ -7633,6 +7660,7 @@ function buildRemoteRuntime(deps) {
|
|
|
7633
7660
|
},
|
|
7634
7661
|
reportedStatus: reportedStatusOver(deps.api, deps.logger.child("remote")),
|
|
7635
7662
|
runningState: runningStateOver(deps.api, deps.logger.child("remote")),
|
|
7663
|
+
nativeFormats: nativeFormatsOver(deps.api, deps.logger.child("remote")),
|
|
7636
7664
|
plugOn: plugOnOver(deps.api, deps.logger.child("remote")),
|
|
7637
7665
|
assumptions: remoteAssumptionStoreOver(deps.settings, deps.logger.child("remote")),
|
|
7638
7666
|
slice: remoteSliceWriterOver(deps.settings, deps.api),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { $ as DeclaredDevices, $a as seedInstanceOnce, $o as composedDeviceStableId, Aa as resolveActionVariables, Ao as validateComposition, Bo as zoneOnlySite, C as COMPOSER_RUNNER_ID, Cc as defineRecordKinds, Co as timedRunLimitOf, Ct as INTERNAL_ACTION_PREFIX, Da as remoteLayoutComponentsCapability, Di as localDateOf, Do as toTimings, Ea as remoteCapability, Ec as entryBody, En as appendTrace, Eo as timedRunSeconds, Fa as resolveHeroLayout, Gr as fanPresetsCapability, Gt as QuantityUnitError, Hc as isSecretMarker, Ho as CompositionSchema, Hr as fanAxisPath, Ir as evaluateStepCondition, Ji as normalizeActionUnits, Jn as checkTemplatePayload, Jo as HelperMemberSchema, Jr as findChannelSource, Ka as runSteps, Ki as nextOccurrence, Ks as RecordIntegrationInstances, Ln as buildHeroModel, Lo as weekdayOfLocalDate, Lr as evaluateWhenTree, Mc as hydrateSchema, Mo as validateSchedulerInput, Mt as MediaPlayerStatusSchema, Na as resolveCoreBlockEntry, Nn as buildActionSteps, Oa as remoteSourceSteps, Pa as resolveCoreBlockFiles, Pn as buildCapabilityLookup, Qo as composedDeviceRef, Qt as RunningStateStatusSchema, R as DEFAULT_HOLD_OVERRIDE, Sc as defineEntryKind, Sl as EventCategory$1, So as timedRunCapability, Ss as BaseAddon, St as IDLE_ACTION_STATUS, T as CORE_BLOCK_ADDON_PREFIX, To as timedRunQuickRun, Ua as resolveStepArgs, Uo as DAY_MS, Va as resolveRemoteSource, Vo as COMPOSER_ADDON_ID, Vt as PowerSourceInfoSchema, Wc as isSecretRefOwnedBy, Wn as capUnitResolver, Xi as normalizeCoreBlockWrite, Xn as collectDeviceTemplates, Xt as RemoteAssumedStateSchema, Ya as schedulersCapability, Yi as normalizeCapStep, Zi as normalizeStepTargets, Zn as collectWhenMirrorSources, Zt as RemoteLayoutPayloadSchema, _c as commandOrigin$1, _n as actionWaitTotalMs, ai as internalActionId, at as EMPTY_REMOTE_ASSUMED_STATE, bc as defineAddonMigrations, bl as errMsg$1, c as ActionError, cr as coreBlockIdFromAddonId, cs as helperMembers, ct as FAN_OSCILLATION_AXES, d as ActionTargetResolver, da as powerSourceActuatorConflicts, dt as FanControlStatusSchema, er as compileScalarOverride, es as compositionFeatureEnabled, f as ActionVariableSchema, fa as powerSourceCapability, fl as transformSecretWrite, fn as TemplateKindSchema, gn as actionSourceCapability, h as BUILTIN_REMOTE_COMPONENTS, ha as problemsBlockSave, hi as isInternalActionId, ic as actionEffect, ii as integrationInstancesCapability, il as ruleFireOfClaim, ir as compositionUnionReads, it as EMPTY_AUTOMATION_STATE, j as CoreBlockSchema, ji as lockDoorLinkOfComposition, k as ConditionMirror, ka as replacedFieldKeys, l as ActionMinDelaySecSchema, la as planComposition, lr as coreBlockSourceKind, ls as historyRetentionFromSettings, lt as FAN_OSCILLATION_AXIS_SETTABLE, m as AutomationStateDocSchema, mc as collectSecretMarkerRefs, ml as vocabActionIdFor, n as ACTION_TARGET_INVALIDATION_EVENTS, ni as hasTimeLeaves, nn as SchedulerError, on as SetOscillationAxisInputSchema, oo as siteFor, or as coreBlockAddonId, ot as EMPTY_REMOTE_CONFIG, pa as powerSourceLinkOfComposition, pr as customKeyOfRole, pt as FanPresetSchema, qi as nextTimeBoundaryInMs, qt as REMOTE_MEDIA_COMMANDS, ri as heroLayoutCapability, rl as resolveSecretMarkers, rn as SchedulerSchema, rr as compositionSourceRefs, rs as compositionSourceKey, s as ALL_CAPABILITY_DEFINITIONS, sl as secretTreeFromSchema, sr as coreBlockComposition, st as FAN_CAPTURE_FIELDS, ta as occurrenceOn, u as ActionStepSchema, uo as stableIdMapOf, ur as coreBlocksCapability, va as projectDeviceRow, vl as DeviceRole, vn as actionsCapability, w as CORE_BLOCKS_ADDON_ID, wo as timedRunMaxIn, xa as readStoredRemoteConfig, xi as kebabToCamel, xo as templateCapability, xr as describeComposableCaps, ya as proposeRunningThreshold, yl as DeviceType$1, yn as addonIdOfActionId } from "../../dist-
|
|
1
|
+
import { $ as DeclaredDevices, $a as seedInstanceOnce, $o as composedDeviceStableId, Aa as resolveActionVariables, Ao as validateComposition, Bo as zoneOnlySite, C as COMPOSER_RUNNER_ID, Cc as defineRecordKinds, Co as timedRunLimitOf, Ct as INTERNAL_ACTION_PREFIX, Da as remoteLayoutComponentsCapability, Di as localDateOf, Do as toTimings, Ea as remoteCapability, Ec as entryBody, En as appendTrace, Eo as timedRunSeconds, Fa as resolveHeroLayout, Gr as fanPresetsCapability, Gt as QuantityUnitError, Hc as isSecretMarker, Ho as CompositionSchema, Hr as fanAxisPath, Ir as evaluateStepCondition, Ji as normalizeActionUnits, Jn as checkTemplatePayload, Jo as HelperMemberSchema, Jr as findChannelSource, Ka as runSteps, Ki as nextOccurrence, Ks as RecordIntegrationInstances, Ln as buildHeroModel, Lo as weekdayOfLocalDate, Lr as evaluateWhenTree, Mc as hydrateSchema, Mo as validateSchedulerInput, Mt as MediaPlayerStatusSchema, Na as resolveCoreBlockEntry, Nn as buildActionSteps, Oa as remoteSourceSteps, Pa as resolveCoreBlockFiles, Pn as buildCapabilityLookup, Qo as composedDeviceRef, Qt as RunningStateStatusSchema, R as DEFAULT_HOLD_OVERRIDE, Sc as defineEntryKind, Sl as EventCategory$1, So as timedRunCapability, Ss as BaseAddon, St as IDLE_ACTION_STATUS, T as CORE_BLOCK_ADDON_PREFIX, To as timedRunQuickRun, Ua as resolveStepArgs, Uo as DAY_MS, Va as resolveRemoteSource, Vo as COMPOSER_ADDON_ID, Vt as PowerSourceInfoSchema, Wc as isSecretRefOwnedBy, Wn as capUnitResolver, Xi as normalizeCoreBlockWrite, Xn as collectDeviceTemplates, Xt as RemoteAssumedStateSchema, Ya as schedulersCapability, Yi as normalizeCapStep, Zi as normalizeStepTargets, Zn as collectWhenMirrorSources, Zt as RemoteLayoutPayloadSchema, _c as commandOrigin$1, _n as actionWaitTotalMs, ai as internalActionId, at as EMPTY_REMOTE_ASSUMED_STATE, bc as defineAddonMigrations, bl as errMsg$1, c as ActionError, cr as coreBlockIdFromAddonId, cs as helperMembers, ct as FAN_OSCILLATION_AXES, d as ActionTargetResolver, da as powerSourceActuatorConflicts, dt as FanControlStatusSchema, er as compileScalarOverride, es as compositionFeatureEnabled, f as ActionVariableSchema, fa as powerSourceCapability, fl as transformSecretWrite, fn as TemplateKindSchema, gn as actionSourceCapability, h as BUILTIN_REMOTE_COMPONENTS, ha as problemsBlockSave, hi as isInternalActionId, ic as actionEffect, ii as integrationInstancesCapability, il as ruleFireOfClaim, ir as compositionUnionReads, it as EMPTY_AUTOMATION_STATE, j as CoreBlockSchema, ji as lockDoorLinkOfComposition, k as ConditionMirror, ka as replacedFieldKeys, l as ActionMinDelaySecSchema, la as planComposition, lr as coreBlockSourceKind, ls as historyRetentionFromSettings, lt as FAN_OSCILLATION_AXIS_SETTABLE, m as AutomationStateDocSchema, mc as collectSecretMarkerRefs, ml as vocabActionIdFor, n as ACTION_TARGET_INVALIDATION_EVENTS, ni as hasTimeLeaves, nn as SchedulerError, on as SetOscillationAxisInputSchema, oo as siteFor, or as coreBlockAddonId, ot as EMPTY_REMOTE_CONFIG, pa as powerSourceLinkOfComposition, pr as customKeyOfRole, pt as FanPresetSchema, qi as nextTimeBoundaryInMs, qt as REMOTE_MEDIA_COMMANDS, ri as heroLayoutCapability, rl as resolveSecretMarkers, rn as SchedulerSchema, rr as compositionSourceRefs, rs as compositionSourceKey, s as ALL_CAPABILITY_DEFINITIONS, sl as secretTreeFromSchema, sr as coreBlockComposition, st as FAN_CAPTURE_FIELDS, ta as occurrenceOn, u as ActionStepSchema, uo as stableIdMapOf, ur as coreBlocksCapability, va as projectDeviceRow, vl as DeviceRole, vn as actionsCapability, w as CORE_BLOCKS_ADDON_ID, wo as timedRunMaxIn, xa as readStoredRemoteConfig, xi as kebabToCamel, xo as templateCapability, xr as describeComposableCaps, ya as proposeRunningThreshold, yl as DeviceType$1, yn as addonIdOfActionId } from "../../dist-CUB8zpv-.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
|
-
import { i as parseDeviceStateChanged, r as isRecord$1, t as describeCompositionSources } from "../../composition-sources
|
|
4
|
-
import { i as capSeriesKey } from "../../capture-engine-
|
|
3
|
+
import { i as parseDeviceStateChanged, r as isRecord$1, t as describeCompositionSources } from "../../composition-sources-PCla-eR3.mjs";
|
|
4
|
+
import { i as capSeriesKey } from "../../capture-engine-BDgAg1_L.mjs";
|
|
5
5
|
import { t as prefixRange } from "../../prefix-range-Dl0znowN.mjs";
|
|
6
6
|
import { n as unwrapStoredValue, t as loadPrefixed } from "../../prefix-walk-DAOBSyH1.mjs";
|
|
7
7
|
import { n as readCurrentCommandOrigin } from "../../cap-call-scope-Bic6Ekfw.mjs";
|
|
@@ -7100,16 +7100,13 @@ var RemoteService = class {
|
|
|
7100
7100
|
};
|
|
7101
7101
|
}
|
|
7102
7102
|
return this.withLock(deviceId, async () => {
|
|
7103
|
-
const
|
|
7103
|
+
const args = await this.irSendArgs(transmitterId, source.payload);
|
|
7104
7104
|
try {
|
|
7105
7105
|
await this.deps.invoke({
|
|
7106
7106
|
deviceId: transmitterId,
|
|
7107
7107
|
cap: IR_TRANSMITTER_CAP,
|
|
7108
7108
|
method: IR_SEND_METHOD,
|
|
7109
|
-
args
|
|
7110
|
-
timings,
|
|
7111
|
-
settings
|
|
7112
|
-
}
|
|
7109
|
+
args
|
|
7113
7110
|
});
|
|
7114
7111
|
} catch (err) {
|
|
7115
7112
|
this.deps.logger.warn("remote: the infrared source failed to send, nothing was assumed", {
|
|
@@ -7141,6 +7138,20 @@ var RemoteService = class {
|
|
|
7141
7138
|
};
|
|
7142
7139
|
});
|
|
7143
7140
|
}
|
|
7141
|
+
/** A native code goes verbatim to a transmitter that replays its format; anything else as a pulse train. */
|
|
7142
|
+
async irSendArgs(transmitterId, payload) {
|
|
7143
|
+
if (payload.kind === "native") {
|
|
7144
|
+
if ((await this.deps.nativeFormats(transmitterId)).includes(payload.format)) return { native: {
|
|
7145
|
+
format: payload.format,
|
|
7146
|
+
code: payload.code
|
|
7147
|
+
} };
|
|
7148
|
+
}
|
|
7149
|
+
const { timings, settings } = toTimings(payload);
|
|
7150
|
+
return {
|
|
7151
|
+
timings,
|
|
7152
|
+
settings
|
|
7153
|
+
};
|
|
7154
|
+
}
|
|
7144
7155
|
async forgetSource(deviceId) {
|
|
7145
7156
|
const kept = await this.readAssumed(deviceId);
|
|
7146
7157
|
if (kept.source !== null) await this.deps.assumptions.write(deviceId, {
|
|
@@ -7500,6 +7511,22 @@ function plugOnOver(api, logger) {
|
|
|
7500
7511
|
}
|
|
7501
7512
|
};
|
|
7502
7513
|
}
|
|
7514
|
+
/** The native code formats a transmitter replays; empty when it does not answer. */
|
|
7515
|
+
function nativeFormatsOver(api, logger) {
|
|
7516
|
+
return async (transmitterId) => {
|
|
7517
|
+
const current = api();
|
|
7518
|
+
if (current === void 0) return [];
|
|
7519
|
+
try {
|
|
7520
|
+
return (await current.irTransmitter.getInfo.query({ deviceId: transmitterId })).formats;
|
|
7521
|
+
} catch (err) {
|
|
7522
|
+
logger.debug("remote: the transmitter did not report its formats, sending a pulse train", {
|
|
7523
|
+
tags: { deviceId: transmitterId },
|
|
7524
|
+
meta: { error: err instanceof Error ? err.message : String(err) }
|
|
7525
|
+
});
|
|
7526
|
+
return [];
|
|
7527
|
+
}
|
|
7528
|
+
};
|
|
7529
|
+
}
|
|
7503
7530
|
/** The devices whose remote configuration points at a template. */
|
|
7504
7531
|
function templateUsageOver(settings, api) {
|
|
7505
7532
|
return { devicesUsing: async (templateId) => {
|
|
@@ -7627,6 +7654,7 @@ function buildRemoteRuntime(deps) {
|
|
|
7627
7654
|
},
|
|
7628
7655
|
reportedStatus: reportedStatusOver(deps.api, deps.logger.child("remote")),
|
|
7629
7656
|
runningState: runningStateOver(deps.api, deps.logger.child("remote")),
|
|
7657
|
+
nativeFormats: nativeFormatsOver(deps.api, deps.logger.child("remote")),
|
|
7630
7658
|
plugOn: plugOnOver(deps.api, deps.logger.child("remote")),
|
|
7631
7659
|
assumptions: remoteAssumptionStoreOver(deps.settings, deps.logger.child("remote")),
|
|
7632
7660
|
slice: remoteSliceWriterOver(deps.settings, deps.api),
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* remote when its role is bound, else answers `not-routed` so the native
|
|
34
34
|
* cap runs. The dispatch redirect asks this for every caller.
|
|
35
35
|
*/
|
|
36
|
-
import { type CapCall, type IRemoteProvider, type IScopedLogger, type MediaPlayerStatus, type RemoteAssumedState, type RemoteConfig } from "@camstack/types";
|
|
36
|
+
import { type CapCall, type IRemoteProvider, type IScopedLogger, type MediaPlayerStatus, type RemoteAssumedState, type RemoteConfig, type IrNativeFormat } from "@camstack/types";
|
|
37
37
|
/** Per-device remote configuration, kept in the device's settings store. */
|
|
38
38
|
export interface RemoteConfigStore {
|
|
39
39
|
read(deviceId: number): Promise<RemoteConfig>;
|
|
@@ -68,6 +68,8 @@ export interface RemoteServiceDeps {
|
|
|
68
68
|
plugDeviceOf(deviceId: number): Promise<number | null>;
|
|
69
69
|
/** Runs the action a role is bound to. Throws when the call fails. */
|
|
70
70
|
invoke(call: CapCall): Promise<void>;
|
|
71
|
+
/** The native code formats the transmitter replays verbatim; empty when unknown or unreachable. */
|
|
72
|
+
nativeFormats(transmitterId: number): Promise<readonly IrNativeFormat[]>;
|
|
71
73
|
templateExists(templateId: string): Promise<boolean>;
|
|
72
74
|
isMediaPlayer(deviceId: number): Promise<boolean>;
|
|
73
75
|
/** The native media-player slice, or null when no running source answers. */
|
|
@@ -184,6 +186,8 @@ export declare class RemoteService implements IRemoteProvider {
|
|
|
184
186
|
private runSource;
|
|
185
187
|
/** One train through the source's own transmitter; the source is remembered only after it landed. */
|
|
186
188
|
private runIrSource;
|
|
189
|
+
/** A native code goes verbatim to a transmitter that replays its format; anything else as a pulse train. */
|
|
190
|
+
private irSendArgs;
|
|
187
191
|
private forgetSource;
|
|
188
192
|
private runRole;
|
|
189
193
|
/**
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* finder, the native-state port — are read and specced without booting the
|
|
10
10
|
* addon.
|
|
11
11
|
*/
|
|
12
|
-
import { type AddonApi, type AddonContext, type IScopedLogger, type MediaPlayerStatus, type RecordsAccess } from "@camstack/types";
|
|
12
|
+
import { type IrNativeFormat, type AddonApi, type AddonContext, type IScopedLogger, type MediaPlayerStatus, type RecordsAccess } from "@camstack/types";
|
|
13
13
|
import { RemoteService, type RemoteAssumptionStore, type RemoteConfigStore, type RemoteSliceWriter } from "./remote-service.js";
|
|
14
14
|
import { TemplatesService, type TemplateUsage } from "./templates-service.js";
|
|
15
15
|
/** The key of the device's settings store that holds its remote configuration. */
|
|
@@ -47,6 +47,8 @@ export declare function runningStateOver(api: () => AddonApi | undefined, logger
|
|
|
47
47
|
* plug is linked, it errors, or the state is unknown (D393) — never "off".
|
|
48
48
|
*/
|
|
49
49
|
export declare function plugOnOver(api: () => AddonApi | undefined, logger: IScopedLogger): (deviceId: number) => Promise<boolean | null>;
|
|
50
|
+
/** The native code formats a transmitter replays; empty when it does not answer. */
|
|
51
|
+
export declare function nativeFormatsOver(api: () => AddonApi | undefined, logger: IScopedLogger): (transmitterId: number) => Promise<readonly IrNativeFormat[]>;
|
|
50
52
|
/** The devices whose remote configuration points at a template. */
|
|
51
53
|
export declare function templateUsageOver(settings: Pick<DeviceSettings, "listDeviceStoreIds" | "readDeviceStoreBatch">, api: () => AddonApi | undefined): TemplateUsage;
|
|
52
54
|
/**
|