@camstack/server 1.2.867 → 1.2.869
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 +14 -0
- package/dist/api/trpc/generated-cap-routers.js +64 -0
- package/package.json +20 -9
- 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 +29 -63
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +29 -63
- package/system/dist/builtins/core-blocks/remote-service.d.ts +11 -8
- 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/drain-ratchet.d.ts +8 -0
- package/system/dist/builtins/storage-orchestrator/storage-drain-event-monitor.d.ts +63 -0
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +14 -0
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +152 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +152 -2
- 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-BCB1OMc_.js → capture-engine-Bwhwpy3T.js} +1 -1
- package/system/dist/{capture-engine-5g4lu_OQ.mjs → capture-engine-hLbiQm2r.mjs} +1 -1
- package/system/dist/{composition-sources-VkBsGWZh.mjs → composition-sources-CXd5ydxk.mjs} +1 -1
- package/system/dist/{composition-sources-1yTVou3a.js → composition-sources-DqGVEx12.js} +1 -1
- package/system/dist/{constants-D1lf-y38.mjs → constants-BxOTlPMv.mjs} +1 -1
- package/system/dist/{constants-r86Qr7xE.js → constants-hVovxKZz.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-Bs_oj8y_.js → device-ca-1vqFIP_t.js} +1 -1
- package/system/dist/{device-ca-aWcNrAeB.mjs → device-ca-B-yM5jiy.mjs} +1 -1
- package/system/dist/{dist-BeM3jcMe.mjs → dist-D1LOSOS0.mjs} +364 -14
- package/system/dist/{dist-CtlwobAt.js → dist-uTbt3Yxy.js} +364 -14
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-CoyjSGzP.mjs → hub-identity-Dx3Jbhnp.mjs} +10 -10
- package/system/dist/{hub-identity-C_3WvvUh.js → hub-identity-TBo0Xrxk.js} +1 -1
- package/system/dist/{hub-mdns-ciao-MJdhRgSK.mjs → hub-mdns-ciao-Br5Vlcf0.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-DrpNoAbD.js → hub-mdns-ciao-C0xzb8jM.js} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +217 -217
- package/system/dist/{legacy-integration-rows-door-DwD_6A21.mjs → legacy-integration-rows-door-CqsM5HcW.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-DknPUCvT.js → legacy-integration-rows-door-c8pHSqwA.js} +1 -1
- package/system/dist/{rename-composition-block-B7ZEwdvM.mjs → rename-composition-block-Bbu4W1mg.mjs} +1 -1
- package/system/dist/{rename-composition-block-VNSmpCSW.js → rename-composition-block-DNgRnLHV.js} +1 -1
- package/system/dist/{restore-archive-CizGJ-13.js → restore-archive-D48JPP0d.js} +1 -1
- package/system/dist/{restore-archive-3-Gd66TK.mjs → restore-archive-DcS4GDfw.mjs} +94 -94
- package/system/dist/{wal-maintenance-CMKws6du.mjs → wal-maintenance-BoxO0tlN.mjs} +0 -0
- package/system/dist/{wal-maintenance-cI0DBU7k.js → wal-maintenance-D3s8jnax.js} +0 -0
- package/system/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.869] - 2026-11-14
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- control cap gains next/previous/first/last for select controls
|
|
15
|
+
|
|
16
|
+
## [1.2.868] - 2026-11-14
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Remote: an infrared TV card no longer shows a stale source; a source is shown only when the device reports it, and picking one is a one-shot choice.
|
|
21
|
+
|
|
10
22
|
## [1.2.867] - 2026-11-14
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
13
25
|
|
|
14
26
|
- Rebuilt against updated dependencies.
|
|
27
|
+
### Changed
|
|
28
|
+
|
|
15
29
|
|
|
16
30
|
## [1.2.866] - 2026-11-14
|
|
17
31
|
|
|
@@ -2255,6 +2255,70 @@ function createCapRouter_control(getProvider, createRemoteProxy) {
|
|
|
2255
2255
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
2256
2256
|
return p.setValue(methodInput);
|
|
2257
2257
|
}),
|
|
2258
|
+
next: trpc_middleware_js_1.protectedProcedure
|
|
2259
|
+
.input(types_39.controlCapability.methods.next.input.loose())
|
|
2260
|
+
.output(types_39.controlCapability.methods.next.output)
|
|
2261
|
+
.mutation(async ({ input, ctx }) => {
|
|
2262
|
+
const { nodeId, ...methodInput } = input;
|
|
2263
|
+
const p = resolveProvider('control', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
2264
|
+
const fn = p.next;
|
|
2265
|
+
if (typeof fn !== 'function') {
|
|
2266
|
+
throw new server_1.TRPCError({
|
|
2267
|
+
code: 'NOT_IMPLEMENTED',
|
|
2268
|
+
message: 'Capability "control" provider does not implement "next"',
|
|
2269
|
+
});
|
|
2270
|
+
}
|
|
2271
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
2272
|
+
return fn.call(p, methodInput);
|
|
2273
|
+
}),
|
|
2274
|
+
previous: trpc_middleware_js_1.protectedProcedure
|
|
2275
|
+
.input(types_39.controlCapability.methods.previous.input.loose())
|
|
2276
|
+
.output(types_39.controlCapability.methods.previous.output)
|
|
2277
|
+
.mutation(async ({ input, ctx }) => {
|
|
2278
|
+
const { nodeId, ...methodInput } = input;
|
|
2279
|
+
const p = resolveProvider('control', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
2280
|
+
const fn = p.previous;
|
|
2281
|
+
if (typeof fn !== 'function') {
|
|
2282
|
+
throw new server_1.TRPCError({
|
|
2283
|
+
code: 'NOT_IMPLEMENTED',
|
|
2284
|
+
message: 'Capability "control" provider does not implement "previous"',
|
|
2285
|
+
});
|
|
2286
|
+
}
|
|
2287
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
2288
|
+
return fn.call(p, methodInput);
|
|
2289
|
+
}),
|
|
2290
|
+
first: trpc_middleware_js_1.protectedProcedure
|
|
2291
|
+
.input(types_39.controlCapability.methods.first.input.loose())
|
|
2292
|
+
.output(types_39.controlCapability.methods.first.output)
|
|
2293
|
+
.mutation(async ({ input, ctx }) => {
|
|
2294
|
+
const { nodeId, ...methodInput } = input;
|
|
2295
|
+
const p = resolveProvider('control', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
2296
|
+
const fn = p.first;
|
|
2297
|
+
if (typeof fn !== 'function') {
|
|
2298
|
+
throw new server_1.TRPCError({
|
|
2299
|
+
code: 'NOT_IMPLEMENTED',
|
|
2300
|
+
message: 'Capability "control" provider does not implement "first"',
|
|
2301
|
+
});
|
|
2302
|
+
}
|
|
2303
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
2304
|
+
return fn.call(p, methodInput);
|
|
2305
|
+
}),
|
|
2306
|
+
last: trpc_middleware_js_1.protectedProcedure
|
|
2307
|
+
.input(types_39.controlCapability.methods.last.input.loose())
|
|
2308
|
+
.output(types_39.controlCapability.methods.last.output)
|
|
2309
|
+
.mutation(async ({ input, ctx }) => {
|
|
2310
|
+
const { nodeId, ...methodInput } = input;
|
|
2311
|
+
const p = resolveProvider('control', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
2312
|
+
const fn = p.last;
|
|
2313
|
+
if (typeof fn !== 'function') {
|
|
2314
|
+
throw new server_1.TRPCError({
|
|
2315
|
+
code: 'NOT_IMPLEMENTED',
|
|
2316
|
+
message: 'Capability "control" provider does not implement "last"',
|
|
2317
|
+
});
|
|
2318
|
+
}
|
|
2319
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
2320
|
+
return fn.call(p, methodInput);
|
|
2321
|
+
}),
|
|
2258
2322
|
});
|
|
2259
2323
|
}
|
|
2260
2324
|
function createCapRouter_coreBlocks(getProvider, createRemoteProxy) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.869",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,8 +66,19 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-agent-ui": ">=1.2.
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.670",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.385",
|
|
71
|
+
"@camstack/addon-google-services": ">=0.2.51",
|
|
72
|
+
"@camstack/addon-post-analysis": ">=1.2.704",
|
|
73
|
+
"@camstack/addon-provider-amcrest": ">=0.2.172",
|
|
74
|
+
"@camstack/addon-provider-dreame": ">=0.2.175",
|
|
75
|
+
"@camstack/addon-provider-esphome": ">=0.1.22",
|
|
76
|
+
"@camstack/addon-provider-gree": ">=0.2.159",
|
|
77
|
+
"@camstack/addon-provider-hikvision": ">=1.2.187",
|
|
78
|
+
"@camstack/addon-provider-homeassistant": ">=1.2.687",
|
|
79
|
+
"@camstack/addon-provider-homematic": ">=1.2.201",
|
|
80
|
+
"@camstack/addon-provider-onvif": ">=1.2.159",
|
|
81
|
+
"@camstack/addon-provider-tuya": ">=0.2.160"
|
|
71
82
|
},
|
|
72
83
|
"wrapper": {
|
|
73
84
|
"desktop": ">=0.0.1",
|
|
@@ -76,19 +87,19 @@
|
|
|
76
87
|
}
|
|
77
88
|
},
|
|
78
89
|
"dependencies": {
|
|
79
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
80
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
90
|
+
"@camstack/addon-admin-ui": "1.2.670",
|
|
91
|
+
"@camstack/addon-agent-ui": "1.2.385",
|
|
81
92
|
"@camstack/addon-auth": "1.2.182",
|
|
82
93
|
"@camstack/addon-benchmark": "1.2.313",
|
|
83
94
|
"@camstack/addon-decoder-nodeav": "1.2.149",
|
|
84
95
|
"@camstack/addon-notifiers": "1.2.639",
|
|
85
96
|
"@camstack/addon-pipeline": "1.2.651",
|
|
86
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
87
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
97
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.688",
|
|
98
|
+
"@camstack/addon-post-analysis": "1.2.704",
|
|
88
99
|
"@camstack/develop": "0.1.53",
|
|
89
100
|
"@camstack/sdk": "1.2.157",
|
|
90
|
-
"@camstack/types": "1.2.
|
|
91
|
-
"@camstack/ui-library": "1.2.
|
|
101
|
+
"@camstack/types": "1.2.568",
|
|
102
|
+
"@camstack/ui-library": "1.2.445",
|
|
92
103
|
"@fastify/compress": "^9.0.0",
|
|
93
104
|
"@fastify/cookie": "^11.0.2",
|
|
94
105
|
"@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-uTbt3Yxy.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 { Cn as addonPagesCapability, Il as errMsg, Is as BaseAddon, Rl as EventCategory } from "../../dist-
|
|
1
|
+
import { Cn as addonPagesCapability, Il as errMsg, Is as BaseAddon, Rl as EventCategory } from "../../dist-D1LOSOS0.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-uTbt3Yxy.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 { Il as errMsg, Is as BaseAddon, Rl as EventCategory, Tn as addonWidgetsCapability } from "../../dist-
|
|
1
|
+
import { Il as errMsg, Is as BaseAddon, Rl as EventCategory, Tn as addonWidgetsCapability } from "../../dist-D1LOSOS0.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-uTbt3Yxy.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 { D as CORE_BLOCK_ADDON_PREFIX, Dn as alertEpisodePayload, En as alertEpisodeId, Il as errMsg, Is as BaseAddon, Nc as createEvent, On as alertsCapability, Rc as defineRecordKinds, Rl as EventCategory, _i as isAlertEpisodeSeverity, gi as isAlertEpisodeOpen, p as AlertSchema } from "../../dist-
|
|
1
|
+
import { D as CORE_BLOCK_ADDON_PREFIX, Dn as alertEpisodePayload, En as alertEpisodeId, Il as errMsg, Is as BaseAddon, Nc as createEvent, On as alertsCapability, Rc as defineRecordKinds, Rl as EventCategory, _i as isAlertEpisodeSeverity, gi as isAlertEpisodeOpen, p as AlertSchema } from "../../dist-D1LOSOS0.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-uTbt3Yxy.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 { Il as errMsg, Is as BaseAddon, Oa as ptzAutotrackCapability, Pn as bareAddonId, Rl as EventCategory, Zc as isEvent, pt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-
|
|
1
|
+
import { Il as errMsg, Is as BaseAddon, Oa as ptzAutotrackCapability, Pn as bareAddonId, Rl as EventCategory, Zc as isEvent, pt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-D1LOSOS0.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-uTbt3Yxy.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-D48JPP0d.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 { Gi as mayWriteToLocation, Is as BaseAddon, Nn as backupCapability, Rl as EventCategory, Tl as toNodeId, To as storageOccupancyCapability, ll as nodePin } from "../../dist-
|
|
1
|
+
import { Gi as mayWriteToLocation, Is as BaseAddon, Nn as backupCapability, Rl as EventCategory, Tl as toNodeId, To as storageOccupancyCapability, ll as nodePin } from "../../dist-D1LOSOS0.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-DcS4GDfw.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-uTbt3Yxy.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 { Is as BaseAddon, Rc as defineRecordKinds, Wn as calendarsCapability, k as CalendarPreferencesSchema } from "../../dist-
|
|
1
|
+
import { Is as BaseAddon, Rc as defineRecordKinds, Wn as calendarsCapability, k as CalendarPreferencesSchema } from "../../dist-D1LOSOS0.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-uTbt3Yxy.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 { Do as streamCatalogCapability, Fl as DeviceType, Gn as cameraGridLayoutCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Lc as defineEntryKind, Nc as createEvent, Nl as DeviceFeature, Pn as bareAddonId, Pt as MOTION_CLOSE_AFTER_MS, Qc as isInstanceEnabled, Rl as EventCategory, V as DERIVED_CAMERA_SILENCED_CAP_NAMES, br as declarationOwnerNodeId, ea as motionCapability, fi as integrationInstancesCapability, oc as RecordIntegrationInstances, qc as hydrateSchema, ss as buildFfmpegArgs, tt as DeclaredDevices, v as BaseDevice, yo as snapshotCapability } from "../../dist-
|
|
1
|
+
import { Do as streamCatalogCapability, Fl as DeviceType, Gn as cameraGridLayoutCapability, Il as errMsg, Is as BaseAddon, Ji as memoizePinnedFfmpeg, Lc as defineEntryKind, Nc as createEvent, Nl as DeviceFeature, Pn as bareAddonId, Pt as MOTION_CLOSE_AFTER_MS, Qc as isInstanceEnabled, Rl as EventCategory, V as DERIVED_CAMERA_SILENCED_CAP_NAMES, br as declarationOwnerNodeId, ea as motionCapability, fi as integrationInstancesCapability, oc as RecordIntegrationInstances, qc as hydrateSchema, ss as buildFfmpegArgs, tt as DeclaredDevices, v as BaseDevice, yo as snapshotCapability } from "../../dist-D1LOSOS0.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-uTbt3Yxy.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-DqGVEx12.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-Bwhwpy3T.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-DNgRnLHV.js");
|
|
11
11
|
let zod = require("zod");
|
|
12
12
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
13
13
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $n as climateControlCapability, Ai as kebabToCamel, Ao as switchCapability, As as openStatistic, Br as evaluateCompositionField, Cs as historyRetentionFromSettings, Ds as isHistoryHelper, Es as isForwardInputRef, Fl as DeviceType, Gr as expressionContainsBuiltinCall, Il as errMsg, In as brightnessCapability, Is as BaseAddon, Ki as mediaPlayerCapability, Ll as featuresOfBoundCaps, M as ConsumableItemSchema, Ms as planStatisticTier, Nc as createEvent, Ns as statisticCadenceMs, Os as nextLocalMidnight, Ps as toExpressionValue, Qo as COMPOSER_ADDON_ID, Qr as featureForwards, Rl as EventCategory, Rn as buildCapabilityLookup, Ta as processTimeZoneOr, Ts as integrateReading, Ut as PetFountainStatusSchema, Wo as valveCapability, Xa as resolveMutate, Xr as fanOutTargets, Yi as methodRefusal, Yo as withDefaultRunning, Yr as fanControlCapability, _s as compositionSourceKey, ar as composerCapability, bs as evaluateDerivative, ci as groupTemplate, da as parseColorInput, ds as cloneStatefulExpressionMemory, ea as motionCapability, el as isReadingQuantity, fs as composedDeviceRef, ga as planComposition, gs as compositionSliceKey, ho as sharedColorModes, hr as coverCapability, hs as compositionItemFieldPath, ht as FanDirectionSchema, i as ACTUATOR_TEMPLATE_IDS, is as HOUR_MS, js as planResetTier, ks as openReset, lr as consumablesCapability, ma as petFountainWaterItem, mo as sharedActuatorMethods, ms as compositionFeatureEnabled, no as runFanOut, nr as colorCapability, ns as HISTORY_FAST_MS, or as compositionFieldKey, os as MINUTE_MS, pa as petFountainCapability, po as sharedActuatorFeatures, ps as composedDeviceStableId, qi as mediaPlayerFeaturesOfRoles, r as ACTUATOR_METHODS, rs as HISTORY_SLOW_MS, s as ALL_CAPABILITY_DEFINITIONS, si as groupCommandsCapability, ts as DEFAULT_HISTORY_RETENTION, tt as DeclaredDevices, v as BaseDevice, vs as createStatefulExpressionMemory, w as COMPOSED_ITEM_FIXED_FIELDS, wt as HvacModeSchema, xr as declaredSeriesKind, xs as evaluateStatistic, ys as disarmRoseMemory, yt as GroupCommandResultSchema, zi as lockControlCapability } 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 { $n as climateControlCapability, Ai as kebabToCamel, Ao as switchCapability, As as openStatistic, Br as evaluateCompositionField, Cs as historyRetentionFromSettings, Ds as isHistoryHelper, Es as isForwardInputRef, Fl as DeviceType, Gr as expressionContainsBuiltinCall, Il as errMsg, In as brightnessCapability, Is as BaseAddon, Ki as mediaPlayerCapability, Ll as featuresOfBoundCaps, M as ConsumableItemSchema, Ms as planStatisticTier, Nc as createEvent, Ns as statisticCadenceMs, Os as nextLocalMidnight, Ps as toExpressionValue, Qo as COMPOSER_ADDON_ID, Qr as featureForwards, Rl as EventCategory, Rn as buildCapabilityLookup, Ta as processTimeZoneOr, Ts as integrateReading, Ut as PetFountainStatusSchema, Wo as valveCapability, Xa as resolveMutate, Xr as fanOutTargets, Yi as methodRefusal, Yo as withDefaultRunning, Yr as fanControlCapability, _s as compositionSourceKey, ar as composerCapability, bs as evaluateDerivative, ci as groupTemplate, da as parseColorInput, ds as cloneStatefulExpressionMemory, ea as motionCapability, el as isReadingQuantity, fs as composedDeviceRef, ga as planComposition, gs as compositionSliceKey, ho as sharedColorModes, hr as coverCapability, hs as compositionItemFieldPath, ht as FanDirectionSchema, i as ACTUATOR_TEMPLATE_IDS, is as HOUR_MS, js as planResetTier, ks as openReset, lr as consumablesCapability, ma as petFountainWaterItem, mo as sharedActuatorMethods, ms as compositionFeatureEnabled, no as runFanOut, nr as colorCapability, ns as HISTORY_FAST_MS, or as compositionFieldKey, os as MINUTE_MS, pa as petFountainCapability, po as sharedActuatorFeatures, ps as composedDeviceStableId, qi as mediaPlayerFeaturesOfRoles, r as ACTUATOR_METHODS, rs as HISTORY_SLOW_MS, s as ALL_CAPABILITY_DEFINITIONS, si as groupCommandsCapability, ts as DEFAULT_HISTORY_RETENTION, tt as DeclaredDevices, v as BaseDevice, vs as createStatefulExpressionMemory, w as COMPOSED_ITEM_FIXED_FIELDS, wt as HvacModeSchema, xr as declaredSeriesKind, xs as evaluateStatistic, ys as disarmRoseMemory, yt as GroupCommandResultSchema, zi as lockControlCapability } from "../../dist-D1LOSOS0.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-CXd5ydxk.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-hLbiQm2r.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-Bbu4W1mg.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-uTbt3Yxy.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 { Is as BaseAddon, Vi as logDestinationCapability } from "../../dist-
|
|
1
|
+
import { Is as BaseAddon, Vi as logDestinationCapability } from "../../dist-D1LOSOS0.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-uTbt3Yxy.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-DqGVEx12.js");
|
|
6
|
+
const require_capture_engine = require("../../capture-engine-Bwhwpy3T.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");
|
|
@@ -6669,9 +6669,10 @@ function remoteCallRedirect(deps) {
|
|
|
6669
6669
|
* steps in order under the device's lock (no other press interleaves),
|
|
6670
6670
|
* `stepDelayMs` apart; a refusal is typed (`unknown-source`,
|
|
6671
6671
|
* `unbound-step`, `undeclared-channel`) and a failed step stops the
|
|
6672
|
-
* sequence and names itself. The source last sent is
|
|
6673
|
-
*
|
|
6674
|
-
*
|
|
6672
|
+
* sequence and names itself. The source last sent is NEVER a state: an
|
|
6673
|
+
* infrared set cannot report its input and its own remote changes it
|
|
6674
|
+
* unseen, so the status names a source only when a native source READS it
|
|
6675
|
+
* (the picker then offers momentary choices, like a mute key).
|
|
6675
6676
|
* - **Precedence** (`sendMediaCommand`): a media-player command takes the
|
|
6676
6677
|
* remote when its role is bound, else answers `not-routed` so the native
|
|
6677
6678
|
* cap runs. The dispatch redirect asks this for every caller.
|
|
@@ -6824,22 +6825,20 @@ var RemoteService = class {
|
|
|
6824
6825
|
await Promise.all(affected.map((tv) => this.refreshSlice(tv)));
|
|
6825
6826
|
}
|
|
6826
6827
|
/**
|
|
6827
|
-
* What the remote ASSUMES (the last power
|
|
6828
|
-
*
|
|
6828
|
+
* What the remote ASSUMES (the last power it sent), or null when it knows
|
|
6829
|
+
* none. A mute and a source are never assumed: without a reading they have no
|
|
6830
|
+
* state. No plug, no running-state: that is `assumedStatus`.
|
|
6829
6831
|
*/
|
|
6830
6832
|
getAssumedStatus = async ({ deviceId }) => {
|
|
6831
6833
|
const kept = await this.readAssumed(deviceId);
|
|
6832
|
-
if (kept.power === null
|
|
6834
|
+
if (kept.power === null) return null;
|
|
6833
6835
|
const config = await this.deps.store.read(deviceId);
|
|
6834
|
-
const assumedFields = [];
|
|
6835
|
-
if (kept.power !== null) assumedFields.push("state");
|
|
6836
|
-
if (kept.source !== null) assumedFields.push("source");
|
|
6837
6836
|
return this.buildStatus({
|
|
6838
|
-
state: kept.power
|
|
6839
|
-
assumedFields,
|
|
6837
|
+
state: kept.power.state,
|
|
6838
|
+
assumedFields: ["state"],
|
|
6840
6839
|
muted: null,
|
|
6841
|
-
source:
|
|
6842
|
-
changedAt:
|
|
6840
|
+
source: "",
|
|
6841
|
+
changedAt: kept.power.at,
|
|
6843
6842
|
sources: config.sources
|
|
6844
6843
|
});
|
|
6845
6844
|
};
|
|
@@ -6847,29 +6846,26 @@ var RemoteService = class {
|
|
|
6847
6846
|
* The device's state as the remote knows it, or null when it knows no power
|
|
6848
6847
|
* state. Power truth, in order: a `running-state` reading; the linked plug
|
|
6849
6848
|
* (off is `off`, a reading; on is `standby` until a power command was sent,
|
|
6850
|
-
* then what the remote sent); the remote's own assumption. Mute
|
|
6851
|
-
* the native reading only; the remote never assumes
|
|
6849
|
+
* then what the remote sent); the remote's own assumption. Mute and source
|
|
6850
|
+
* come from the native reading only; the remote never assumes either.
|
|
6852
6851
|
*/
|
|
6853
6852
|
async assumedStatus(deviceId) {
|
|
6854
6853
|
return this.statusOf(deviceId, true);
|
|
6855
6854
|
}
|
|
6856
6855
|
/** `forget`: whether a plug that is off drops the kept power guess (a read's side effect). */
|
|
6857
6856
|
async statusOf(deviceId, forget) {
|
|
6858
|
-
const kept = await this.readAssumed(deviceId);
|
|
6859
6857
|
const truth = await this.powerTruth(deviceId, forget);
|
|
6860
6858
|
if (truth === null) return null;
|
|
6861
6859
|
const assumedFields = truth.assumed ? ["state"] : [];
|
|
6862
6860
|
const state = truth.state;
|
|
6863
|
-
const
|
|
6864
|
-
const source = state === "off" ? null : kept.source ?? null;
|
|
6865
|
-
if (source !== null) assumedFields.push("source");
|
|
6861
|
+
const source = state === "off" ? "" : await this.currentSource(deviceId);
|
|
6866
6862
|
const config = await this.deps.store.read(deviceId);
|
|
6867
6863
|
return this.buildStatus({
|
|
6868
6864
|
state,
|
|
6869
6865
|
assumedFields,
|
|
6870
6866
|
muted: null,
|
|
6871
|
-
source
|
|
6872
|
-
changedAt:
|
|
6867
|
+
source,
|
|
6868
|
+
changedAt: truth.at,
|
|
6873
6869
|
sources: config.sources
|
|
6874
6870
|
});
|
|
6875
6871
|
}
|
|
@@ -6935,10 +6931,9 @@ var RemoteService = class {
|
|
|
6935
6931
|
const plug = await this.deps.plugOn(deviceId);
|
|
6936
6932
|
const kept = await this.readAssumed(deviceId);
|
|
6937
6933
|
if (plug === false) {
|
|
6938
|
-
if (forget &&
|
|
6934
|
+
if (forget && kept.power !== null) await this.deps.assumptions.write(deviceId, {
|
|
6939
6935
|
...kept,
|
|
6940
|
-
power: null
|
|
6941
|
-
source: null
|
|
6936
|
+
power: null
|
|
6942
6937
|
});
|
|
6943
6938
|
return {
|
|
6944
6939
|
state: "off",
|
|
@@ -6959,6 +6954,11 @@ var RemoteService = class {
|
|
|
6959
6954
|
};
|
|
6960
6955
|
return null;
|
|
6961
6956
|
}
|
|
6957
|
+
/** The input as a native source READS it, else '': a send is never a reading. */
|
|
6958
|
+
async currentSource(deviceId) {
|
|
6959
|
+
const reported = await this.deps.reportedStatus(deviceId);
|
|
6960
|
+
return reported !== null ? reported.source : "";
|
|
6961
|
+
}
|
|
6962
6962
|
/** The mute as a native source READS it, else unknown: a send is never a reading. */
|
|
6963
6963
|
async currentMute(deviceId) {
|
|
6964
6964
|
const reported = await this.deps.reportedStatus(deviceId);
|
|
@@ -7108,7 +7108,6 @@ var RemoteService = class {
|
|
|
7108
7108
|
role
|
|
7109
7109
|
}
|
|
7110
7110
|
});
|
|
7111
|
-
if (at > 0) await this.forgetSource(deviceId);
|
|
7112
7111
|
return {
|
|
7113
7112
|
status: "refused",
|
|
7114
7113
|
reason: "press-timeout",
|
|
@@ -7121,7 +7120,6 @@ var RemoteService = class {
|
|
|
7121
7120
|
}
|
|
7122
7121
|
const result = await this.runRole(deviceId, config, role, 1);
|
|
7123
7122
|
if (result.status === "refused") {
|
|
7124
|
-
if (at > 0) await this.forgetSource(deviceId);
|
|
7125
7123
|
this.deps.logger.warn("remote: a step of the source failed, the sequence stopped", {
|
|
7126
7124
|
tags: { deviceId },
|
|
7127
7125
|
meta: {
|
|
@@ -7141,14 +7139,6 @@ var RemoteService = class {
|
|
|
7141
7139
|
};
|
|
7142
7140
|
}
|
|
7143
7141
|
}
|
|
7144
|
-
const kept = await this.readAssumed(deviceId);
|
|
7145
|
-
await this.deps.assumptions.write(deviceId, {
|
|
7146
|
-
...kept,
|
|
7147
|
-
source: {
|
|
7148
|
-
name: source.name,
|
|
7149
|
-
at: this.now()
|
|
7150
|
-
}
|
|
7151
|
-
});
|
|
7152
7142
|
await this.refreshSlice(deviceId);
|
|
7153
7143
|
return {
|
|
7154
7144
|
status: "sent",
|
|
@@ -7194,14 +7184,6 @@ var RemoteService = class {
|
|
|
7194
7184
|
detail: errorText$2(err)
|
|
7195
7185
|
};
|
|
7196
7186
|
}
|
|
7197
|
-
const kept = await this.readAssumed(deviceId);
|
|
7198
|
-
await this.deps.assumptions.write(deviceId, {
|
|
7199
|
-
...kept,
|
|
7200
|
-
source: {
|
|
7201
|
-
name: source.name,
|
|
7202
|
-
at: this.now()
|
|
7203
|
-
}
|
|
7204
|
-
});
|
|
7205
7187
|
await this.refreshSlice(deviceId);
|
|
7206
7188
|
return {
|
|
7207
7189
|
status: "sent",
|
|
@@ -7223,13 +7205,6 @@ var RemoteService = class {
|
|
|
7223
7205
|
settings
|
|
7224
7206
|
};
|
|
7225
7207
|
}
|
|
7226
|
-
async forgetSource(deviceId) {
|
|
7227
|
-
const kept = await this.readAssumed(deviceId);
|
|
7228
|
-
if (kept.source !== null) await this.deps.assumptions.write(deviceId, {
|
|
7229
|
-
...kept,
|
|
7230
|
-
source: null
|
|
7231
|
-
});
|
|
7232
|
-
}
|
|
7233
7208
|
async runRole(deviceId, config, role, repeat) {
|
|
7234
7209
|
const explicit = config.bindings["power_on"] !== void 0 && config.bindings["power_off"] !== void 0;
|
|
7235
7210
|
if (role === "power" && config.bindings["power"] === void 0 && explicit) {
|
|
@@ -7302,8 +7277,7 @@ var RemoteService = class {
|
|
|
7302
7277
|
power: {
|
|
7303
7278
|
state: wantsState,
|
|
7304
7279
|
at: this.now()
|
|
7305
|
-
}
|
|
7306
|
-
source: wantsState === "off" ? null : kept.source
|
|
7280
|
+
}
|
|
7307
7281
|
});
|
|
7308
7282
|
return;
|
|
7309
7283
|
}
|
|
@@ -7316,15 +7290,7 @@ var RemoteService = class {
|
|
|
7316
7290
|
power: {
|
|
7317
7291
|
state: next,
|
|
7318
7292
|
at: this.now()
|
|
7319
|
-
}
|
|
7320
|
-
source: next === "off" ? null : kept.source
|
|
7321
|
-
});
|
|
7322
|
-
return;
|
|
7323
|
-
}
|
|
7324
|
-
if (role === "channel_up" || role === "channel_down") {
|
|
7325
|
-
if (kept.source !== null) await this.deps.assumptions.write(deviceId, {
|
|
7326
|
-
...kept,
|
|
7327
|
-
source: null
|
|
7293
|
+
}
|
|
7328
7294
|
});
|
|
7329
7295
|
return;
|
|
7330
7296
|
}
|