@camstack/server 1.2.752 → 1.2.753
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 +10 -0
- package/dist/api/trpc/generated-cap-routers.js +10 -0
- package/dist/core/moleculer/moleculer.service.js +13 -1
- package/package.json +11 -8
- package/system/dist/{agent-https-Oc0Go3Gs.js → agent-https-B0bjQVfy.js} +1 -1
- package/system/dist/{agent-https-DoGV9jKg.mjs → agent-https-cxghRfum.mjs} +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/system/dist/builtins/alerts/alerts.addon.js +1 -1
- package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/system/dist/builtins/autotrack/index.js +1 -1
- package/system/dist/builtins/autotrack/index.mjs +1 -1
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
- package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
- package/system/dist/builtins/calendars/calendars.addon.js +1 -1
- package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
- package/system/dist/builtins/camera-grid/index.js +1 -1
- package/system/dist/builtins/camera-grid/index.mjs +1 -1
- package/system/dist/builtins/composer/composer.addon.js +18 -22
- package/system/dist/builtins/composer/composer.addon.mjs +17 -21
- 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/composition-api.d.ts +4 -1
- package/system/dist/builtins/core-blocks/core-blocks.addon.js +232 -15
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +232 -15
- package/system/dist/builtins/core-blocks/running-proposal.d.ts +32 -0
- package/system/dist/builtins/device-history/device-history.addon.js +24 -23
- package/system/dist/builtins/device-history/device-history.addon.mjs +3 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +3 -3
- package/system/dist/builtins/keychain/index.mjs +3 -3
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +2 -2
- package/system/dist/builtins/local-network/local-network.addon.mjs +2 -2
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +5 -1
- package/system/dist/builtins/snapshot/index.mjs +5 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/index.js +1 -1
- package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +2 -2
- package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +2 -2
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
- package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/system-config/system-config.addon.js +3 -3
- package/system/dist/builtins/system-config/system-config.addon.mjs +284 -284
- package/system/dist/builtins/winston-logging/index.js +1 -1
- package/system/dist/builtins/winston-logging/index.mjs +1 -1
- package/system/dist/{retention-C-lijsmN.mjs → capture-engine-CfJdhMTH.mjs} +2 -246
- package/system/dist/{retention-WjI-Op7G.js → capture-engine-eRAebXP1.js} +1 -305
- package/system/dist/{composition-sources-Bxahhz4f.js → composition-sources-BvDYLpw_.js} +1 -1
- package/system/dist/{composition-sources-CzRiSzCV.mjs → composition-sources-ChtkMq1Q.mjs} +1 -1
- package/system/dist/{constants-uI6uXyjP.mjs → constants-CYNsr0lM.mjs} +1 -1
- package/system/dist/{constants-0rC5QY6i.js → constants-DkC9-VOa.js} +1 -1
- package/system/dist/{device-ca-CL_Arugd.js → device-ca-BxInMpK2.js} +1 -1
- package/system/dist/{device-ca-D7TyMlsS.mjs → device-ca-CQg3PTnE.mjs} +1 -1
- package/system/dist/{dist-Iq3vrBOE.mjs → dist-C5eIFTMo.mjs} +752 -554
- package/system/dist/{dist-CYnRCUzN.js → dist-DFWnAzAY.js} +775 -553
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-CNLYSVyJ.js → hub-mdns-ciao-BQDdPkPO.js} +2 -2
- package/system/dist/{hub-mdns-ciao-CvMKderb.mjs → hub-mdns-ciao-DW_g42El.mjs} +2 -2
- package/system/dist/index.js +9 -8
- package/system/dist/index.mjs +9 -8
- package/system/dist/kernel/transport/parent-unowned-call.d.ts +10 -0
- package/system/dist/{restore-archive-vzWYLf6p.mjs → restore-archive-CFGGJCfV.mjs} +82 -82
- package/system/dist/{restore-archive-Dw04PiG5.js → restore-archive-DRjYgh6D.js} +1 -1
- package/system/dist/retention-B9l9TnGE.mjs +245 -0
- package/system/dist/retention-BNONb5X_.js +304 -0
- package/system/dist/{wal-maintenance-DQXiTaph.js → wal-maintenance-D0zSmIwJ.js} +0 -0
- package/system/dist/{wal-maintenance-BzTHorT2.mjs → wal-maintenance-xYk-FpJW.mjs} +0 -0
- package/system/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.753] - 2026-11-03
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- The running-threshold proposal is reachable as a core-blocks query (admin, view access)
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- An in-process addon's call to a system-only capability method no longer routes to the camera's driver by its device id
|
|
19
|
+
|
|
10
20
|
## [1.2.752] - 2026-11-03
|
|
11
21
|
|
|
12
22
|
### Changed
|
|
@@ -2480,6 +2480,16 @@ function createCapRouter_coreBlocks(getProvider, createRemoteProxy) {
|
|
|
2480
2480
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
2481
2481
|
return p.validateComposition(methodInput);
|
|
2482
2482
|
}),
|
|
2483
|
+
proposeRunningThreshold: trpc_middleware_js_1.adminProcedure
|
|
2484
|
+
.input(types_40.coreBlocksCapability.methods.proposeRunningThreshold.input.loose())
|
|
2485
|
+
.output(types_40.coreBlocksCapability.methods.proposeRunningThreshold.output)
|
|
2486
|
+
.query(async ({ input, ctx }) => {
|
|
2487
|
+
const parsedInput = ctx.req !== undefined ? (0, types_3.withoutCallerStamp)(input) : input;
|
|
2488
|
+
const { nodeId, ...methodInput } = parsedInput;
|
|
2489
|
+
const p = resolveProvider('core-blocks', nodeId, () => getProvider(ctx), createRemoteProxy);
|
|
2490
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
2491
|
+
return p.proposeRunningThreshold(methodInput);
|
|
2492
|
+
}),
|
|
2483
2493
|
reportAutomationRun: trpc_middleware_js_1.adminProcedure
|
|
2484
2494
|
.input(types_40.coreBlocksCapability.methods.reportAutomationRun.input.loose())
|
|
2485
2495
|
.output(types_40.coreBlocksCapability.methods.reportAutomationRun.output)
|
|
@@ -324,6 +324,9 @@ class MoleculerService {
|
|
|
324
324
|
// handler retries the hub-local route then throws a precise error rather
|
|
325
325
|
// than the unroutable broker fallback (`switch.switch.getStatus`).
|
|
326
326
|
isDeviceNativeCap: (capName) => this.capabilityService.getRegistry()?.getDefinition(capName)?.deviceNative === true,
|
|
327
|
+
// A `systemMethod()` routes to the cap's system/wrapper provider, never
|
|
328
|
+
// the device-native owner its `deviceId` argument would select.
|
|
329
|
+
isSystemOnlyMethod: (capName, method) => this.isSystemOnlyMethod(capName, method),
|
|
327
330
|
// `native: true` route — a forked WRAPPER asking for the per-device
|
|
328
331
|
// native behind its own cap name (the snapshot wrapper, once it moved
|
|
329
332
|
// out of hub-main). `getNativeProvider` is the single authority that
|
|
@@ -835,6 +838,11 @@ class MoleculerService {
|
|
|
835
838
|
},
|
|
836
839
|
};
|
|
837
840
|
}
|
|
841
|
+
/** True when `(capName, method)` is declared with `systemMethod()`. */
|
|
842
|
+
isSystemOnlyMethod(capName, method) {
|
|
843
|
+
const def = this.capabilityService.getRegistry()?.getDefinition(capName);
|
|
844
|
+
return def?.methods[method]?.systemOnly === true;
|
|
845
|
+
}
|
|
838
846
|
/**
|
|
839
847
|
* Call a capability method on a specific node.
|
|
840
848
|
*
|
|
@@ -876,7 +884,11 @@ class MoleculerService {
|
|
|
876
884
|
// resolve through the resolver's deviceId-aware snapshot instead of falling back to
|
|
877
885
|
// the legacy callFn store. The deviceId hint is a number extracted from the method args.
|
|
878
886
|
const rawDeviceId = params !== null && typeof params === 'object' ? Reflect.get(params, 'deviceId') : undefined;
|
|
879
|
-
|
|
887
|
+
// A `systemMethod()` names its device in the args only — it routes to the
|
|
888
|
+
// cap's system/wrapper provider, not to the device-native owner.
|
|
889
|
+
const routeDeviceId = typeof rawDeviceId === 'number' && !this.isSystemOnlyMethod(capabilityName, methodName)
|
|
890
|
+
? rawDeviceId
|
|
891
|
+
: undefined;
|
|
880
892
|
try {
|
|
881
893
|
const route = resolver.resolveCapRoute(capabilityName, { nodeId, deviceId: routeDeviceId });
|
|
882
894
|
return await resolver.dispatch(route, methodName, params);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.753",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,7 +66,10 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.570",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.320",
|
|
71
|
+
"@camstack/addon-pipeline-orchestrator": ">=1.2.657",
|
|
72
|
+
"@camstack/addon-post-analysis": ">=1.2.667"
|
|
70
73
|
},
|
|
71
74
|
"wrapper": {
|
|
72
75
|
"desktop": ">=0.0.1",
|
|
@@ -75,19 +78,19 @@
|
|
|
75
78
|
}
|
|
76
79
|
},
|
|
77
80
|
"dependencies": {
|
|
78
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
79
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
81
|
+
"@camstack/addon-admin-ui": "1.2.570",
|
|
82
|
+
"@camstack/addon-agent-ui": "1.2.320",
|
|
80
83
|
"@camstack/addon-auth": "1.2.175",
|
|
81
84
|
"@camstack/addon-benchmark": "1.2.311",
|
|
82
85
|
"@camstack/addon-decoder-nodeav": "1.2.145",
|
|
83
86
|
"@camstack/addon-notifiers": "1.2.628",
|
|
84
87
|
"@camstack/addon-pipeline": "1.2.639",
|
|
85
|
-
"@camstack/addon-pipeline-orchestrator": "1.2.
|
|
86
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
88
|
+
"@camstack/addon-pipeline-orchestrator": "1.2.657",
|
|
89
|
+
"@camstack/addon-post-analysis": "1.2.667",
|
|
87
90
|
"@camstack/develop": "0.1.44",
|
|
88
91
|
"@camstack/sdk": "1.2.155",
|
|
89
|
-
"@camstack/types": "1.2.
|
|
90
|
-
"@camstack/ui-library": "1.2.
|
|
92
|
+
"@camstack/types": "1.2.488",
|
|
93
|
+
"@camstack/ui-library": "1.2.378",
|
|
91
94
|
"@fastify/compress": "^9.0.0",
|
|
92
95
|
"@fastify/cookie": "^11.0.2",
|
|
93
96
|
"@fastify/cors": "^11.2.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DFWnAzAY.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
4
|
let zod = require("zod");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ys as defineRecordKinds } from "./dist-C5eIFTMo.mjs";
|
|
2
2
|
import { C as backdatedNotBefore, S as withUtcTimeEncoding, _ as NameConstraints, a as KeyUsageFlags, c as Pkcs10CertificateRequest, d as SubjectKeyIdentifierExtension, f as X509Certificate$1, g as GeneralSubtrees, h as GeneralSubtree, i as Extension, l as Pkcs10CertificateRequestGenerator, m as cryptoProvider, n as BasicConstraintsExtension, o as KeyUsagesExtension, p as X509CertificateGenerator, r as ExtendedKeyUsageExtension, s as PemConverter, t as AuthorityKeyIdentifierExtension, u as SubjectAlternativeNameExtension, v as GeneralName, x as AsnConvert } from "./x509.es-BRiJgOvu.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
import { X509Certificate, createHash, createPrivateKey, randomBytes, webcrypto } from "node:crypto";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cn as addonPagesCapability, dc as EventCategory, uc as errMsg, wo as BaseAddon } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let node_crypto = require("node:crypto");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dc as EventCategory, uc as errMsg, un as addonWidgetsCapability, wo as BaseAddon } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
import { t as settleSourcesWithTimeout } from "../../settle-sources-CDtNC8ub.mjs";
|
|
3
3
|
import { createHash, randomUUID } from "node:crypto";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
9
9
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fr as isAlertEpisodeSeverity, Pr as isAlertEpisodeOpen, d as AlertSchema, dc as EventCategory, dn as alertEpisodeId, fn as alertEpisodePayload, ms as createEvent, pn as alertsCapability, uc as errMsg, wo as BaseAddon, ys as defineRecordKinds } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
//#region src/builtins/alerts/alert-episode-policy.ts
|
|
4
4
|
/**
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
7
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
8
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
9
|
deadZoneFraction: .5,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { As as isEvent, Ri as ptzAutotrackCapability, dc as EventCategory, tt as FIRST_LEVEL_MACRO_CLASSES, uc as errMsg, vn as bareAddonId, wo as BaseAddon } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
3
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
4
|
deadZoneFraction: .5,
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
const require_chunk = require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.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-DRjYgh6D.js");
|
|
9
9
|
let node_crypto = require("node:crypto");
|
|
10
10
|
let node_fs_promises = require("node:fs/promises");
|
|
11
11
|
node_fs_promises = require_chunk.__toESM(node_fs_promises);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Sa as storageOccupancyCapability, Vs as nodePin, _n as backupCapability, dc as EventCategory, nc as toNodeId, si as mayWriteToLocation, wo as BaseAddon } from "../../dist-C5eIFTMo.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-CFGGJCfV.mjs";
|
|
4
4
|
import { randomUUID } from "node:crypto";
|
|
5
5
|
import * as fsp from "node:fs/promises";
|
|
6
6
|
import * as path$1 from "node:path";
|
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
7
|
const require_settle_sources = require("../../settle-sources-Bhsy57y-.js");
|
|
8
8
|
let zod = require("zod");
|
|
9
9
|
//#region src/builtins/calendars/calendar-color.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { En as calendarsCapability, T as CalendarPreferencesSchema, wo as BaseAddon, ys as defineRecordKinds } from "../../dist-C5eIFTMo.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-DFWnAzAY.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_path = require("node:path");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $a as buildFfmpegArgs, Dn as cameraGridLayoutCapability, Ds as hydrateSchema, K as DeclaredDevices, L as DERIVED_CAMERA_SILENCED_CAP_NAMES, St as MOTION_CLOSE_AFTER_MS, Zn as declarationOwnerNodeId, _a as snapshotCapability, dc as EventCategory, hi as motionCapability, lc as DeviceType, m as BaseDevice, ms as createEvent, sc as DeviceFeature, uc as errMsg, ui as memoizePinnedFfmpeg, vn as bareAddonId, wa as streamCatalogCapability, wo as BaseAddon } from "../../dist-C5eIFTMo.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -3,9 +3,10 @@ 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
|
|
6
|
+
const require_dist = require("../../dist-DFWnAzAY.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-BvDYLpw_.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-eRAebXP1.js");
|
|
9
|
+
const require_retention = require("../../retention-BNONb5X_.js");
|
|
9
10
|
let zod = require("zod");
|
|
10
11
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
11
12
|
/**
|
|
@@ -3719,7 +3720,7 @@ var HistoryHelpers = class {
|
|
|
3719
3720
|
try {
|
|
3720
3721
|
result = await this.ports.query({
|
|
3721
3722
|
deviceId,
|
|
3722
|
-
key:
|
|
3723
|
+
key: require_capture_engine.capSeriesKey(helper.source.cap, helper.source.fieldPath),
|
|
3723
3724
|
from: range.from,
|
|
3724
3725
|
to: range.to,
|
|
3725
3726
|
resolution: tierPlan.tier,
|
|
@@ -3984,7 +3985,7 @@ function mergePulseDecisions(decisions) {
|
|
|
3984
3985
|
*/
|
|
3985
3986
|
var ROSE_CALL = String.raw`rose\(\s*([A-Za-z_][A-Za-z0-9_]*)\s*,\s*([A-Za-z_][A-Za-z0-9_]*)`;
|
|
3986
3987
|
function historySeriesKey(cap, fieldPath) {
|
|
3987
|
-
return
|
|
3988
|
+
return require_capture_engine.capSeriesKey(cap, fieldPath);
|
|
3988
3989
|
}
|
|
3989
3990
|
async function resolvePulseSeeds(input) {
|
|
3990
3991
|
try {
|
|
@@ -4691,6 +4692,17 @@ var Composer = class {
|
|
|
4691
4692
|
});
|
|
4692
4693
|
continue;
|
|
4693
4694
|
}
|
|
4695
|
+
if (targetSeed === void 0 && p.target.kind === "new" && device !== null && p.block.enabled && p.fields.length > 0) try {
|
|
4696
|
+
targetSeed = await readExistingTargetSeeds(device.id, p.fields.map((field) => field.cap), this.deps.readExistingTargetCap);
|
|
4697
|
+
} catch (err) {
|
|
4698
|
+
this.deps.logger.warn("composed device slice could not be read — the runtime starts without a restored seed", {
|
|
4699
|
+
tags: { deviceId: device.id },
|
|
4700
|
+
meta: {
|
|
4701
|
+
blockId: p.block.id,
|
|
4702
|
+
error: require_dist.errMsg(err)
|
|
4703
|
+
}
|
|
4704
|
+
});
|
|
4705
|
+
}
|
|
4694
4706
|
const heldFields = this.heldFieldsFor(p, previous);
|
|
4695
4707
|
if (previous === void 0 || restart.has(p.block.id) || previous.planned.block.updatedAt !== p.block.updatedAt) for (const key of operatorResetKeys(p)) reset.add(key);
|
|
4696
4708
|
const writer = writerFor(this.deps, p, device, (deviceId, cap, owner, event) => {
|
|
@@ -6053,7 +6065,7 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6053
6065
|
maxPoints: input.maxPoints
|
|
6054
6066
|
}),
|
|
6055
6067
|
readHistoryRetention: async () => {
|
|
6056
|
-
return
|
|
6068
|
+
return require_dist.historyRetentionFromSettings(await api.addonSettingsRaw.getGlobal.query({ addonId: "device-history" }));
|
|
6057
6069
|
},
|
|
6058
6070
|
readSourceQuantity: async (deviceId) => {
|
|
6059
6071
|
const quantity = (await api.deviceManager.getDevice.query({ deviceId }))?.sourceInfo?.quantity;
|
|
@@ -6272,22 +6284,6 @@ var ComposerAddon = class extends require_dist.BaseAddon {
|
|
|
6272
6284
|
return this.composer;
|
|
6273
6285
|
}
|
|
6274
6286
|
};
|
|
6275
|
-
/** `dayDays` of 0 keeps the daily tier forever (device-history). A missing number is the default. */
|
|
6276
|
-
function historyRetentionOf(raw) {
|
|
6277
|
-
return {
|
|
6278
|
-
rawMs: positiveDays(raw["rawDays"], require_dist.DEFAULT_HISTORY_RETENTION.rawMs),
|
|
6279
|
-
fiveMinuteMs: positiveDays(raw["fiveMinuteDays"], require_dist.DEFAULT_HISTORY_RETENTION.fiveMinuteMs),
|
|
6280
|
-
hourMs: positiveDays(raw["hourDays"], require_dist.DEFAULT_HISTORY_RETENTION.hourMs),
|
|
6281
|
-
dayMs: positiveDaysOrForever(raw["dayDays"])
|
|
6282
|
-
};
|
|
6283
|
-
}
|
|
6284
|
-
function positiveDays(value, fallbackMs) {
|
|
6285
|
-
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value * require_dist.DAY_MS : fallbackMs;
|
|
6286
|
-
}
|
|
6287
|
-
function positiveDaysOrForever(value) {
|
|
6288
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) return null;
|
|
6289
|
-
return value * require_dist.DAY_MS;
|
|
6290
|
-
}
|
|
6291
6287
|
//#endregion
|
|
6292
6288
|
exports.ComposerAddon = ComposerAddon;
|
|
6293
6289
|
exports.default = ComposerAddon;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { $
|
|
2
|
-
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-
|
|
3
|
-
import { i as
|
|
1
|
+
import { $i as resolveMutate, Ai as planComposition, Ar as groupTemplate, Cr as featureForwards, Da as switchCapability, Di as parseColorInput, Fn as colorCapability, Gn as coverCapability, Ia as valveCapability, Ja as HISTORY_FAST_MS, K as DeclaredDevices, Kr as kebabToCamel, Ln as composerCapability, Ms as isReadingQuantity, Nn as climateControlCapability, Qa as MINUTE_MS, Qn as declaredSeriesKind, Rn as compositionFieldKey, Sn as buildCapabilityLookup, So as toExpressionValue, Wa as COMPOSER_ADDON_ID, Xa as HOUR_MS, Ya as HISTORY_SLOW_MS, _o as openReset, ao as compositionSliceKey, b as COMPOSED_ITEM_FIXED_FIELDS, bn as brightnessCapability, bo as planStatisticTier, br as fanControlCapability, ci as mediaPlayerCapability, co as disarmRoseMemory, da as sharedActuatorFeatures, dc as EventCategory, di as methodRefusal, eo as cloneStatefulExpressionMemory, fa as sharedActuatorMethods, fo as historyRetentionFromSettings, ft as HvacModeSchema, go as nextLocalMidnight, hi as motionCapability, ho as isHistoryHelper, io as compositionItemFieldPath, kr as groupCommandsCapability, lc as DeviceType, li as mediaPlayerFeaturesOfRoles, lo as evaluateDerivative, m as BaseDevice, mo as isForwardInputRef, mr as evaluateCompositionField, ms as createEvent, n as ACTUATOR_METHODS, no as composedDeviceStableId, o as ALL_CAPABILITY_DEFINITIONS, oo as compositionSourceKey, pa as sharedColorModes, po as integrateReading, qa as DEFAULT_HISTORY_RETENTION, r as ACTUATOR_TEMPLATE_IDS, ra as runFanOut, ro as compositionFeatureEnabled, rt as FanDirectionSchema, so as createStatefulExpressionMemory, st as GroupCommandResultSchema, ti as lockControlCapability, to as composedDeviceRef, uc as errMsg, uo as evaluateStatistic, vo as openStatistic, vr as expressionContainsBuiltinCall, wo as BaseAddon, xo as statisticCadenceMs, xr as fanOutTargets, yo as planResetTier } from "../../dist-C5eIFTMo.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-ChtkMq1Q.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-CfJdhMTH.mjs";
|
|
4
|
+
import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-B9l9TnGE.mjs";
|
|
4
5
|
import { z } from "zod";
|
|
5
6
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
6
7
|
/**
|
|
@@ -4069,7 +4070,7 @@ async function decidePair(input, pair, owned, nativeStamp) {
|
|
|
4069
4070
|
async function historyOf(input, deviceId, pair) {
|
|
4070
4071
|
if (!recordsField(input.lookupCap, pair.cap, pair.activeField)) return { kind: "absent" };
|
|
4071
4072
|
const now = input.now();
|
|
4072
|
-
const fromMs = now - DEFAULT_RETENTION.rawDays * DAY_MS
|
|
4073
|
+
const fromMs = now - DEFAULT_RETENTION.rawDays * DAY_MS;
|
|
4073
4074
|
try {
|
|
4074
4075
|
const answer = await input.readPulseHistory(deviceId, pair.cap, pair.activeField, fromMs, now);
|
|
4075
4076
|
if (answer.kind === "unread") return { kind: "unread" };
|
|
@@ -4686,6 +4687,17 @@ var Composer = class {
|
|
|
4686
4687
|
});
|
|
4687
4688
|
continue;
|
|
4688
4689
|
}
|
|
4690
|
+
if (targetSeed === void 0 && p.target.kind === "new" && device !== null && p.block.enabled && p.fields.length > 0) try {
|
|
4691
|
+
targetSeed = await readExistingTargetSeeds(device.id, p.fields.map((field) => field.cap), this.deps.readExistingTargetCap);
|
|
4692
|
+
} catch (err) {
|
|
4693
|
+
this.deps.logger.warn("composed device slice could not be read — the runtime starts without a restored seed", {
|
|
4694
|
+
tags: { deviceId: device.id },
|
|
4695
|
+
meta: {
|
|
4696
|
+
blockId: p.block.id,
|
|
4697
|
+
error: errMsg(err)
|
|
4698
|
+
}
|
|
4699
|
+
});
|
|
4700
|
+
}
|
|
4689
4701
|
const heldFields = this.heldFieldsFor(p, previous);
|
|
4690
4702
|
if (previous === void 0 || restart.has(p.block.id) || previous.planned.block.updatedAt !== p.block.updatedAt) for (const key of operatorResetKeys(p)) reset.add(key);
|
|
4691
4703
|
const writer = writerFor(this.deps, p, device, (deviceId, cap, owner, event) => {
|
|
@@ -6048,7 +6060,7 @@ var ComposerAddon = class extends BaseAddon {
|
|
|
6048
6060
|
maxPoints: input.maxPoints
|
|
6049
6061
|
}),
|
|
6050
6062
|
readHistoryRetention: async () => {
|
|
6051
|
-
return
|
|
6063
|
+
return historyRetentionFromSettings(await api.addonSettingsRaw.getGlobal.query({ addonId: "device-history" }));
|
|
6052
6064
|
},
|
|
6053
6065
|
readSourceQuantity: async (deviceId) => {
|
|
6054
6066
|
const quantity = (await api.deviceManager.getDevice.query({ deviceId }))?.sourceInfo?.quantity;
|
|
@@ -6267,21 +6279,5 @@ var ComposerAddon = class extends BaseAddon {
|
|
|
6267
6279
|
return this.composer;
|
|
6268
6280
|
}
|
|
6269
6281
|
};
|
|
6270
|
-
/** `dayDays` of 0 keeps the daily tier forever (device-history). A missing number is the default. */
|
|
6271
|
-
function historyRetentionOf(raw) {
|
|
6272
|
-
return {
|
|
6273
|
-
rawMs: positiveDays(raw["rawDays"], DEFAULT_HISTORY_RETENTION.rawMs),
|
|
6274
|
-
fiveMinuteMs: positiveDays(raw["fiveMinuteDays"], DEFAULT_HISTORY_RETENTION.fiveMinuteMs),
|
|
6275
|
-
hourMs: positiveDays(raw["hourDays"], DEFAULT_HISTORY_RETENTION.hourMs),
|
|
6276
|
-
dayMs: positiveDaysOrForever(raw["dayDays"])
|
|
6277
|
-
};
|
|
6278
|
-
}
|
|
6279
|
-
function positiveDays(value, fallbackMs) {
|
|
6280
|
-
return typeof value === "number" && Number.isFinite(value) && value > 0 ? value * DAY_MS : fallbackMs;
|
|
6281
|
-
}
|
|
6282
|
-
function positiveDaysOrForever(value) {
|
|
6283
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) return null;
|
|
6284
|
-
return value * DAY_MS;
|
|
6285
|
-
}
|
|
6286
6282
|
//#endregion
|
|
6287
6283
|
export { ComposerAddon, ComposerAddon as default };
|
|
@@ -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-DFWnAzAY.js");
|
|
7
7
|
const require_formatter = require("../../formatter-xbxeV4GD.js");
|
|
8
8
|
//#region src/builtins/console-logging/console-destination.ts
|
|
9
9
|
var LEVEL_RANK = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ri as logDestinationCapability, wo as BaseAddon } from "../../dist-C5eIFTMo.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 = {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import { type CapabilityDefinition, type CapabilityLookup, type CompositionBlockPatch, type CompositionBlockState, type CompositionSourceRef, type CoreBlock, type ICoreBlocksProvider, type IScopedLogger, type UnreleasedClaim } from "@camstack/types";
|
|
16
16
|
import type { NamedCompositionInput } from "./core-block-store.js";
|
|
17
17
|
import type { CompositionDescriptions } from "./composition-sources.js";
|
|
18
|
+
import { type RunningProposalPorts } from "./running-proposal.js";
|
|
18
19
|
export interface CompositionStoreView {
|
|
19
20
|
/** False until the table has been READ; a verdict against an empty peer set would hide a cycle. */
|
|
20
21
|
isLoaded(): boolean;
|
|
@@ -36,11 +37,13 @@ export interface CompositionApiDeps {
|
|
|
36
37
|
* and is in the list.
|
|
37
38
|
*/
|
|
38
39
|
readonly convergeForClaims: () => Promise<readonly UnreleasedClaim[]>;
|
|
40
|
+
/** The history reads behind `proposeRunningThreshold`. */
|
|
41
|
+
readonly runningProposal: RunningProposalPorts;
|
|
39
42
|
readonly logger: IScopedLogger;
|
|
40
43
|
/** Every capability definition — the listing is derived from them, never from the registry's live state. */
|
|
41
44
|
readonly capabilityDefinitions: readonly CapabilityDefinition[];
|
|
42
45
|
}
|
|
43
|
-
export type CompositionApi = Pick<ICoreBlocksProvider, "createComposition" | "updateComposition" | "getComposition" | "listCompositions" | "validateComposition" | "getCustomization" | "listComposableCaps">;
|
|
46
|
+
export type CompositionApi = Pick<ICoreBlocksProvider, "createComposition" | "updateComposition" | "getComposition" | "listCompositions" | "validateComposition" | "getCustomization" | "listComposableCaps" | "proposeRunningThreshold">;
|
|
44
47
|
/**
|
|
45
48
|
* Every write runs validate-then-persist on ONE chain. Validation awaits a
|
|
46
49
|
* source read before the save lands; two unserialized saves (A reads B, B
|