@camstack/server 1.2.847 → 1.2.849
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 +16 -0
- package/dist/api/trpc/generated-cap-routers.js +9 -0
- package/dist/core/addon/instance-lifecycle.js +10 -6
- package/package.json +13 -9
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +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.d.ts +0 -25
- package/system/dist/builtins/device-manager/device-manager.addon.js +62 -4
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +62 -4
- package/system/dist/builtins/device-manager/transitions/transitions-wiring.d.ts +6 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +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 +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +1 -1
- package/system/dist/builtins/snapshot/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{capture-engine-BSDgRisG.mjs → capture-engine-CgCljSbM.mjs} +1 -1
- package/system/dist/{capture-engine-B0oRy06v.js → capture-engine-QQtJ9iXs.js} +1 -1
- package/system/dist/{composition-sources-SR0LOiwV.js → composition-sources-DxDmYFCD.js} +1 -1
- package/system/dist/{composition-sources-ujH0OBVn.mjs → composition-sources-pEPr0Ucn.mjs} +1 -1
- package/system/dist/{constants-B7eUjmLy.mjs → constants-CNZ_oxrp.mjs} +1 -1
- package/system/dist/{constants-Bu2PpZxT.js → constants-Df49f3b4.js} +1 -1
- package/system/dist/{device-ca-Ddx0w66k.mjs → device-ca-Bl-6F9mv.mjs} +1 -1
- package/system/dist/{device-ca-DQVQodun.js → device-ca-BzUtH2U5.js} +1 -1
- package/system/dist/{dist-C2g-bkW3.js → dist-DKsFOzpr.js} +329 -29
- package/system/dist/{dist-Btw-kJec.mjs → dist-zkNb0bBi.mjs} +329 -29
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-BGQRouDQ.mjs → hub-identity-BrGlipuh.mjs} +1 -1
- package/system/dist/{hub-identity-DiXO_HL1.js → hub-identity-Dv4V44gP.js} +1 -1
- package/system/dist/{hub-mdns-ciao-BR2Zdm6h.js → hub-mdns-ciao-DcWSdIki.js} +2 -2
- package/system/dist/{hub-mdns-ciao-DGGKuLGZ.mjs → hub-mdns-ciao-Dzht7PBY.mjs} +2 -2
- package/system/dist/index.js +50 -2507
- package/system/dist/index.mjs +50 -2507
- package/system/dist/kernel/bootstrap-config.d.ts +1 -2
- package/system/dist/kernel/capability-registry.d.ts +6 -2
- package/system/dist/{legacy-integration-rows-door-OnrCmUJI.js → legacy-integration-rows-door-CISh8s7H.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-50Uc78LM.mjs → legacy-integration-rows-door-CL6R8xaY.mjs} +1 -1
- package/system/dist/migrations/hub/2026-11-12-drop-retired-storage-leftovers.d.ts +16 -0
- package/system/dist/{rename-composition-block-CjVxHVX1.js → rename-composition-block-DFi7GTKn.js} +1 -1
- package/system/dist/{rename-composition-block-kGqHAdUc.mjs → rename-composition-block-DM_koTq7.mjs} +1 -1
- package/system/dist/{restore-archive-Cxhhx7mC.mjs → restore-archive-D_3y4vj-.mjs} +1 -1
- package/system/dist/{restore-archive-DQZdAca-.js → restore-archive-Daw2fB9X.js} +1 -1
- package/system/dist/{wal-maintenance-DoZE1qG9.mjs → wal-maintenance-BPohUtyD.mjs} +0 -0
- package/system/dist/{wal-maintenance-C4WfHqw5.js → wal-maintenance-GyMlkYI_.js} +0 -0
- package/system/package.json +1 -1
- package/system/dist/kernel/legacy-config-yaml.d.ts +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.849] - 2026-11-12
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Addon migrations run in phases: a step whose predecessor belongs to a later phase of the same addon is deferred, never blocks the addon
|
|
15
|
+
- A cap with no status block keeps its own getStatus: a device whose power source is grafted by customize answers its power source status again, and a settled device command is announced on the event bus.
|
|
16
|
+
|
|
17
|
+
## [1.2.848] - 2026-11-12
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- 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
|
|
22
|
+
- A remote sends a stored native IR code verbatim to a transmitter that replays its format
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
|
|
10
26
|
## [1.2.847] - 2026-11-12
|
|
11
27
|
|
|
12
28
|
### 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.849",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,9 +66,13 @@
|
|
|
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-post-analysis": ">=1.2.
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.652",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.372",
|
|
71
|
+
"@camstack/addon-post-analysis": ">=1.2.698",
|
|
72
|
+
"@camstack/addon-provider-enpal": ">=0.1.18",
|
|
73
|
+
"@camstack/addon-provider-mqtt-ha": ">=0.1.48",
|
|
74
|
+
"@camstack/addon-provider-velux": ">=0.2.169",
|
|
75
|
+
"@camstack/addon-provider-vesync": ">=0.2.158"
|
|
72
76
|
},
|
|
73
77
|
"wrapper": {
|
|
74
78
|
"desktop": ">=0.0.1",
|
|
@@ -77,19 +81,19 @@
|
|
|
77
81
|
}
|
|
78
82
|
},
|
|
79
83
|
"dependencies": {
|
|
80
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
81
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
84
|
+
"@camstack/addon-admin-ui": "1.2.652",
|
|
85
|
+
"@camstack/addon-agent-ui": "1.2.372",
|
|
82
86
|
"@camstack/addon-auth": "1.2.182",
|
|
83
87
|
"@camstack/addon-benchmark": "1.2.313",
|
|
84
88
|
"@camstack/addon-decoder-nodeav": "1.2.149",
|
|
85
89
|
"@camstack/addon-notifiers": "1.2.637",
|
|
86
90
|
"@camstack/addon-pipeline": "1.2.651",
|
|
87
91
|
"@camstack/addon-pipeline-orchestrator": "1.2.681",
|
|
88
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
92
|
+
"@camstack/addon-post-analysis": "1.2.698",
|
|
89
93
|
"@camstack/develop": "0.1.52",
|
|
90
94
|
"@camstack/sdk": "1.2.157",
|
|
91
|
-
"@camstack/types": "1.2.
|
|
92
|
-
"@camstack/ui-library": "1.2.
|
|
95
|
+
"@camstack/types": "1.2.556",
|
|
96
|
+
"@camstack/ui-library": "1.2.432",
|
|
93
97
|
"@fastify/compress": "^9.0.0",
|
|
94
98
|
"@fastify/cookie": "^11.0.2",
|
|
95
99
|
"@fastify/cors": "^11.2.0",
|
|
@@ -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-DKsFOzpr.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { 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-zkNb0bBi.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DKsFOzpr.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { 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-zkNb0bBi.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DKsFOzpr.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
const require_log_redactor = require("../../log-redactor-BhIEMaG9.js");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { 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-zkNb0bBi.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import { a as redactLogText } from "../../log-redactor-XLDrPzOi.mjs";
|
|
4
4
|
import * as fs$1 from "node:fs";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DKsFOzpr.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-zkNb0bBi.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-DKsFOzpr.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-Daw2fB9X.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs = require("node:fs");
|
|
11
11
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { 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-zkNb0bBi.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-D_3y4vj-.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fs$1 from "node:fs";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DKsFOzpr.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-zkNb0bBi.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-DKsFOzpr.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-zkNb0bBi.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-DKsFOzpr.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-DxDmYFCD.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-QQtJ9iXs.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-DFi7GTKn.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-zkNb0bBi.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-pEPr0Ucn.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-CgCljSbM.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-DM_koTq7.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-DKsFOzpr.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-zkNb0bBi.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-DKsFOzpr.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-DxDmYFCD.js");
|
|
6
|
+
const require_capture_engine = require("../../capture-engine-QQtJ9iXs.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-zkNb0bBi.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-pEPr0Ucn.mjs";
|
|
4
|
+
import { i as capSeriesKey } from "../../capture-engine-CgCljSbM.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
|
/**
|
|
@@ -3,8 +3,8 @@ 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_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-DKsFOzpr.js");
|
|
7
|
+
const require_capture_engine = require("../../capture-engine-QQtJ9iXs.js");
|
|
8
8
|
const require_retention = require("../../retention-BcOSL6b9.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Cc as defineRecordKinds, Dn as armRemovalReconcile, Dr as deviceRemovalHookCapability, Ns as InvalidRecordError, Or as deviceRunsCapability, Sl as EventCategory, Ss as BaseAddon, Tc as emitReadiness, Tr as deviceHistoryCapability, V as DEVICE_HISTORY_ENERGY_KEY, Ys as RecordTooLargeError, _t as HISTORY_CATALOG, et as DeviceRunSchema, jc as historyUnitFor, jr as deviceTransitionsCapability, ks as DeviceTransitionSchema, vt as HISTORY_ITEM_CATALOG, xs as wattMillisecondsToKwh, yl as DeviceType, zc as isReadingQuantity } from "../../dist-
|
|
2
|
-
import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-
|
|
1
|
+
import { Cc as defineRecordKinds, Dn as armRemovalReconcile, Dr as deviceRemovalHookCapability, Ns as InvalidRecordError, Or as deviceRunsCapability, Sl as EventCategory, Ss as BaseAddon, Tc as emitReadiness, Tr as deviceHistoryCapability, V as DEVICE_HISTORY_ENERGY_KEY, Ys as RecordTooLargeError, _t as HISTORY_CATALOG, et as DeviceRunSchema, jc as historyUnitFor, jr as deviceTransitionsCapability, ks as DeviceTransitionSchema, vt as HISTORY_ITEM_CATALOG, xs as wattMillisecondsToKwh, yl as DeviceType, zc as isReadingQuantity } from "../../dist-zkNb0bBi.mjs";
|
|
2
|
+
import { a as catalogMetrics, c as DeviceDirectory, d as identityOf, f as subjectIdOf, i as capSeriesKey, l as isRealDeviceType, n as CaptureEngine, o as readPath, r as capItemSeriesKey, s as readUnit, t as CAP_KEY_PREFIX, u as SeriesRegistry } from "../../capture-engine-CgCljSbM.mjs";
|
|
3
3
|
import { a as FIVE_MINUTES_MS, c as bucketEndOf, i as DAY_MS, l as bucketStartOf, n as RetentionJob, o as HOUR_MS, r as DepartureTracker, s as ROLLUP_GRACE_MS, t as DEFAULT_RETENTION, u as floorTo } from "../../retention-CUOVI1p7.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
//#region src/builtins/device-history/capture/point-writer.ts
|
|
@@ -1,28 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Device Manager addon — hub-side singleton that unifies device persistence,
|
|
3
|
-
* live registry queries, and all management operations into a single
|
|
4
|
-
* tRPC-routable capability.
|
|
5
|
-
*
|
|
6
|
-
* Persistence strategy: all device data is stored via `ctx.settings`, the same
|
|
7
|
-
* settings API every other addon uses. No raw SQLite access.
|
|
8
|
-
*
|
|
9
|
-
* Addon store layout:
|
|
10
|
-
* deviceIndex → Record<addonId, stableId[]> (which devices exist per addon)
|
|
11
|
-
* deviceMeta → Record<numericId, DeviceMeta> (keyed by numeric device id;
|
|
12
|
-
* addonId + stableId are FIELDS on the record)
|
|
13
|
-
*
|
|
14
|
-
* Device store (per-device config):
|
|
15
|
-
* readDeviceStore(numericDeviceId) → config blob
|
|
16
|
-
* writeDeviceStore(numericDeviceId, patch)
|
|
17
|
-
*
|
|
18
|
-
* Live registry: resolved from the kernel capability registry after Phase 2.
|
|
19
|
-
* This gives direct access to in-memory IDevice instances registered by provider addons.
|
|
20
|
-
* The DeviceManagerAddon is the single owner of the live device operations API.
|
|
21
|
-
*
|
|
22
|
-
* Replaces:
|
|
23
|
-
* - `device-persistence` capability (absorbed here)
|
|
24
|
-
* - live operations previously served by `device-management.router.ts`
|
|
25
|
-
*/
|
|
26
1
|
import type { DeviceBindingEntry } from "@camstack/types";
|
|
27
2
|
import { BaseAddon, ProviderRegistration } from "@camstack/types";
|
|
28
3
|
import { mergeAggregates } from "./device-aggregation-merge.js";
|