@camstack/server 1.2.790 → 1.2.791
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 +7 -0
- package/dist/api/trpc/device-config-secret-redaction.js +14 -1
- package/dist/api/trpc/generated-cap-routers.js +24 -0
- package/dist/api/trpc/localized-schema-paths.js +1 -0
- package/dist/core/addon/addon-settings-provider.js +57 -0
- package/package.json +16 -23
- package/system/dist/addon-runner.js +22 -0
- package/system/dist/addon-runner.mjs +22 -0
- package/system/dist/{agent-https-ByceQLwr.mjs → agent-https-BmVaVskH.mjs} +1 -1
- package/system/dist/{agent-https-BmXXKQAA.js → agent-https-DOs15BCJ.js} +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/autotrack.addon.d.ts +7 -7
- package/system/dist/builtins/autotrack/index.js +15 -8
- package/system/dist/builtins/autotrack/index.mjs +15 -8
- 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 +3 -3
- package/system/dist/builtins/composer/composer.addon.mjs +3 -3
- 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 +3 -3
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +3 -3
- package/system/dist/builtins/device-history/device-history.addon.js +2 -2
- package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
- package/system/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +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 +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.d.ts +4 -10
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +16 -9
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +16 -9
- 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-BHj1fNYC.js → capture-engine-BVpkq9Mv.js} +1 -1
- package/system/dist/{capture-engine-D9n4KDaN.mjs → capture-engine-D-oUDtX5.mjs} +1 -1
- package/system/dist/{composition-sources-wI4qWTz2.mjs → composition-sources-Br7JhpbD.mjs} +1 -1
- package/system/dist/{composition-sources-BGgIuuvd.js → composition-sources-DKCbVA67.js} +1 -1
- package/system/dist/{constants-DHqkxbYk.mjs → constants-Bl0Qxbek.mjs} +1 -1
- package/system/dist/{constants-DNdriMRD.js → constants-CJVY-mUq.js} +1 -1
- package/system/dist/{device-ca-gr5eE3h5.mjs → device-ca-BeDGy8NK.mjs} +1 -1
- package/system/dist/{device-ca-C2RzT1VT.js → device-ca-i8EbKp3q.js} +1 -1
- package/system/dist/{dist-BUoL5bbr.mjs → dist-CPUbgRkb.mjs} +280 -8
- package/system/dist/{dist-DV0V3JiE.js → dist-Ddkk4Dqq.js} +280 -8
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-DoSb8dwB.mjs → hub-mdns-ciao-DgF4SifE.mjs} +2 -2
- package/system/dist/{hub-mdns-ciao-Be5PGXW6.js → hub-mdns-ciao-lHRHbXqV.js} +2 -2
- package/system/dist/index.js +8 -8
- package/system/dist/index.mjs +8 -8
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +1 -1
- package/system/dist/{legacy-integration-rows-door-DRC0xn6k.mjs → legacy-integration-rows-door-9JSt493H.mjs} +1 -1
- package/system/dist/{legacy-integration-rows-door-D5s8oM7e.js → legacy-integration-rows-door-n9GIUxgq.js} +1 -1
- package/system/dist/{restore-archive-Dh4gfCRY.js → restore-archive-BDvLSZtj.js} +1 -1
- package/system/dist/{restore-archive-DH3P9j-V.mjs → restore-archive-Dh3XnCR1.mjs} +1 -1
- package/system/dist/{wal-maintenance-BWfH3Lov.mjs → wal-maintenance-BQJAmAwS.mjs} +0 -0
- package/system/dist/{wal-maintenance-DgN_WD5T.js → wal-maintenance-CWlz_qRq.js} +0 -0
- package/system/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.2.791] - 2026-11-07
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- The addon-settings capability answers scoped settings reads and writes for in-process and forked addons.
|
|
15
|
+
- A non-admin cannot read secrets through the scoped settings read, and its schema text is localized like the global one
|
|
16
|
+
|
|
10
17
|
## [1.2.790] - 2026-11-07
|
|
11
18
|
|
|
12
19
|
### Changed
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
* pattern as `scope-access.ts` and `share-view-access.ts`).
|
|
41
41
|
*/
|
|
42
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
-
exports.NON_ADMIN_CONFIG_REDACTED_METHODS = exports.REDACTED_SECRET = void 0;
|
|
43
|
+
exports.NON_ADMIN_CONFIG_REDACTED_METHODS = exports.NON_ADMIN_SECRET_FREE_BY_CONTRACT = exports.REDACTED_SECRET = void 0;
|
|
44
44
|
exports.isSecretConfigKey = isSecretConfigKey;
|
|
45
45
|
exports.redactDeviceInfoSecrets = redactDeviceInfoSecrets;
|
|
46
46
|
exports.redactDeviceInfoRecordSecrets = redactDeviceInfoRecordSecrets;
|
|
@@ -463,6 +463,18 @@ function maskUrlCredentialsDeep(data) {
|
|
|
463
463
|
out[key] = maskUrlCredentialsDeep(value);
|
|
464
464
|
return out;
|
|
465
465
|
}
|
|
466
|
+
/**
|
|
467
|
+
* Non-admin reads that return settings VALUES yet are deliberately NOT in
|
|
468
|
+
* {@link NON_ADMIN_CONFIG_REDACTED_METHODS}: their payload is secret-free by contract, so a
|
|
469
|
+
* redactor would only guess at it.
|
|
470
|
+
*
|
|
471
|
+
* `addonSettings.readScopedValues` answers a flat `key -> effective value` map built with
|
|
472
|
+
* `inlineSecretsAsViews`: a secret field is its `set` view (`{ set: boolean }`), never the value
|
|
473
|
+
* (`base-addon-scoped-value-api.spec.ts` pins it). Adding a method here needs the same proof.
|
|
474
|
+
*/
|
|
475
|
+
exports.NON_ADMIN_SECRET_FREE_BY_CONTRACT = new Set([
|
|
476
|
+
'addonSettings.readScopedValues',
|
|
477
|
+
]);
|
|
466
478
|
/**
|
|
467
479
|
* Every device-manager read whose response carries a device `config` blob, and
|
|
468
480
|
* the projection that cuts it.
|
|
@@ -483,6 +495,7 @@ function maskUrlCredentialsDeep(data) {
|
|
|
483
495
|
exports.NON_ADMIN_CONFIG_REDACTED_METHODS = new Map([
|
|
484
496
|
// ── Addon settings forms (D634) — hydrated with the STORED secret ──
|
|
485
497
|
['addonSettings.getGlobalSettings', redactSettingsForm],
|
|
498
|
+
['addonSettings.getScopedSettings', redactSettingsForm],
|
|
486
499
|
['addonSettings.getIntegrationSettings', redactSettingsForm],
|
|
487
500
|
['addonSettings.getIntegrationFormSchema', redactSettingsForm],
|
|
488
501
|
['addonSettings.getDeviceSettings', redactSettingsForm],
|
|
@@ -656,6 +656,30 @@ function createCapRouter_addonSettings(getProvider, _createRemoteProxy) {
|
|
|
656
656
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
657
657
|
return p.updateGlobalSettings(input);
|
|
658
658
|
}),
|
|
659
|
+
getScopedSettings: trpc_middleware_js_1.protectedProcedure
|
|
660
|
+
.input(types_10.addonSettingsCapability.methods.getScopedSettings.input.loose())
|
|
661
|
+
.output(types_10.addonSettingsCapability.methods.getScopedSettings.output)
|
|
662
|
+
.query(async ({ input, ctx }) => {
|
|
663
|
+
const p = requireCapProvider('addon-settings', () => getProvider(ctx));
|
|
664
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
665
|
+
return p.getScopedSettings(input);
|
|
666
|
+
}),
|
|
667
|
+
updateScopedSettings: trpc_middleware_js_1.adminProcedure
|
|
668
|
+
.input(types_10.addonSettingsCapability.methods.updateScopedSettings.input.loose())
|
|
669
|
+
.output(types_10.addonSettingsCapability.methods.updateScopedSettings.output)
|
|
670
|
+
.mutation(async ({ input, ctx }) => {
|
|
671
|
+
const p = requireCapProvider('addon-settings', () => getProvider(ctx));
|
|
672
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
673
|
+
return p.updateScopedSettings(input);
|
|
674
|
+
}),
|
|
675
|
+
readScopedValues: trpc_middleware_js_1.protectedProcedure
|
|
676
|
+
.input(types_10.addonSettingsCapability.methods.readScopedValues.input.loose())
|
|
677
|
+
.output(types_10.addonSettingsCapability.methods.readScopedValues.output)
|
|
678
|
+
.query(async ({ input, ctx }) => {
|
|
679
|
+
const p = requireCapProvider('addon-settings', () => getProvider(ctx));
|
|
680
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument
|
|
681
|
+
return p.readScopedValues(input);
|
|
682
|
+
}),
|
|
659
683
|
getIntegrationSettings: trpc_middleware_js_1.protectedProcedure
|
|
660
684
|
.input(types_10.addonSettingsCapability.methods.getIntegrationSettings.input.loose())
|
|
661
685
|
.output(types_10.addonSettingsCapability.methods.getIntegrationSettings.output)
|
|
@@ -13,6 +13,7 @@ exports.LOCALIZED_SCHEMA_PATHS = void 0;
|
|
|
13
13
|
*/
|
|
14
14
|
exports.LOCALIZED_SCHEMA_PATHS = new Set([
|
|
15
15
|
'addonSettings.getGlobalSettings',
|
|
16
|
+
'addonSettings.getScopedSettings',
|
|
16
17
|
'addonSettings.getIntegrationSettings',
|
|
17
18
|
'addonSettings.getIntegrationFormSchema',
|
|
18
19
|
'addonSettings.getDeviceSettings',
|
|
@@ -12,6 +12,7 @@ exports.createAddonSettingsProvider = createAddonSettingsProvider;
|
|
|
12
12
|
* panels went empty after the UDS migration; that path is gone.
|
|
13
13
|
*/
|
|
14
14
|
const zod_1 = require("zod");
|
|
15
|
+
const ScopedValuesAnswer = zod_1.z.record(zod_1.z.string(), zod_1.z.unknown());
|
|
15
16
|
const DeclaredKeysAnswer = zod_1.z.object({ keys: zod_1.z.array(zod_1.z.string()) });
|
|
16
17
|
const UnsetKeysAnswer = zod_1.z.object({
|
|
17
18
|
removed: zod_1.z.array(zod_1.z.string()),
|
|
@@ -104,6 +105,62 @@ function createAddonSettingsProvider(deps) {
|
|
|
104
105
|
}
|
|
105
106
|
return forkedUpdate(input.addonId, 'updateGlobalSettings', { patch: input.patch, ...(input.nodeId ? { nodeId: input.nodeId } : {}) }, input.nodeId);
|
|
106
107
|
},
|
|
108
|
+
async getScopedSettings(input) {
|
|
109
|
+
if (gateway.isInProcess(input.addonId, input.nodeId)) {
|
|
110
|
+
const addon = getAddon(input.addonId);
|
|
111
|
+
if (!addon || typeof addon.getScopedSettings !== 'function')
|
|
112
|
+
return null;
|
|
113
|
+
const result = await addon.getScopedSettings(input.scope, input.cap, input.nodeId);
|
|
114
|
+
return result ? reshapeForOutput(result) : null;
|
|
115
|
+
}
|
|
116
|
+
return forkedGet(input.addonId, 'getScopedSettings', {
|
|
117
|
+
scope: input.scope,
|
|
118
|
+
cap: input.cap,
|
|
119
|
+
...(input.nodeId ? { nodeId: input.nodeId } : {}),
|
|
120
|
+
}, input.nodeId);
|
|
121
|
+
},
|
|
122
|
+
async updateScopedSettings(input) {
|
|
123
|
+
if (gateway.isInProcess(input.addonId, input.nodeId)) {
|
|
124
|
+
const addon = getAddon(input.addonId);
|
|
125
|
+
if (!addon || typeof addon.updateScopedSettings !== 'function') {
|
|
126
|
+
throw new Error(`Addon "${input.addonId}" does not implement updateScopedSettings`);
|
|
127
|
+
}
|
|
128
|
+
await addon.updateScopedSettings(input.scope, input.cap, input.patch, input.nodeId);
|
|
129
|
+
return { success: true };
|
|
130
|
+
}
|
|
131
|
+
return forkedUpdate(input.addonId, 'updateScopedSettings', {
|
|
132
|
+
scope: input.scope,
|
|
133
|
+
cap: input.cap,
|
|
134
|
+
patch: input.patch,
|
|
135
|
+
...(input.nodeId ? { nodeId: input.nodeId } : {}),
|
|
136
|
+
}, input.nodeId);
|
|
137
|
+
},
|
|
138
|
+
async readScopedValues(input) {
|
|
139
|
+
try {
|
|
140
|
+
if (gateway.isInProcess(input.addonId, input.nodeId)) {
|
|
141
|
+
const addon = getAddon(input.addonId);
|
|
142
|
+
if (!addon || typeof addon.readScopedValues !== 'function')
|
|
143
|
+
return null;
|
|
144
|
+
return (await addon.readScopedValues(input.scope, input.cap, input.nodeId)) ?? null;
|
|
145
|
+
}
|
|
146
|
+
const raw = await gateway.callForked(input.addonId, {
|
|
147
|
+
target: 'settings',
|
|
148
|
+
method: 'readScopedValues',
|
|
149
|
+
args: {
|
|
150
|
+
scope: input.scope,
|
|
151
|
+
cap: input.cap,
|
|
152
|
+
...(input.nodeId ? { nodeId: input.nodeId } : {}),
|
|
153
|
+
},
|
|
154
|
+
}, input.nodeId);
|
|
155
|
+
const parsed = ScopedValuesAnswer.safeParse(raw);
|
|
156
|
+
return parsed.success ? parsed.data : null;
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
if (isServiceNotFoundError(err))
|
|
160
|
+
return null;
|
|
161
|
+
throw err;
|
|
162
|
+
}
|
|
163
|
+
},
|
|
107
164
|
async getIntegrationSettings(input) {
|
|
108
165
|
if (gateway.isInProcess(input.addonId, input.nodeId)) {
|
|
109
166
|
const addon = getAddon(input.addonId);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.791",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -66,21 +66,14 @@
|
|
|
66
66
|
],
|
|
67
67
|
"requires": {
|
|
68
68
|
"addons": {
|
|
69
|
-
"@camstack/addon-admin-ui": ">=1.2.
|
|
70
|
-
"@camstack/addon-agent-ui": ">=1.2.
|
|
71
|
-
"@camstack/addon-
|
|
72
|
-
"@camstack/addon-
|
|
73
|
-
"@camstack/addon-export-
|
|
74
|
-
"@camstack/addon-
|
|
75
|
-
"@camstack/addon-
|
|
76
|
-
"@camstack/addon-
|
|
77
|
-
"@camstack/addon-import-alexa": ">=0.2.195",
|
|
78
|
-
"@camstack/addon-notifiers": ">=1.2.633",
|
|
79
|
-
"@camstack/addon-post-analysis": ">=1.2.677",
|
|
80
|
-
"@camstack/addon-provider-homeassistant": ">=1.2.670",
|
|
81
|
-
"@camstack/addon-remote-storage": ">=1.2.146",
|
|
82
|
-
"@camstack/addon-tailscale": ">=1.2.153",
|
|
83
|
-
"@camstack/addon-waste-collections": ">=0.1.37"
|
|
69
|
+
"@camstack/addon-admin-ui": ">=1.2.603",
|
|
70
|
+
"@camstack/addon-agent-ui": ">=1.2.338",
|
|
71
|
+
"@camstack/addon-decoder-nodeav": ">=1.2.148",
|
|
72
|
+
"@camstack/addon-export-alexa": ">=1.2.188",
|
|
73
|
+
"@camstack/addon-export-hap": ">=1.2.197",
|
|
74
|
+
"@camstack/addon-pipeline": ">=1.2.645",
|
|
75
|
+
"@camstack/addon-post-analysis": ">=1.2.678",
|
|
76
|
+
"@camstack/addon-provider-homeassistant": ">=1.2.671"
|
|
84
77
|
},
|
|
85
78
|
"wrapper": {
|
|
86
79
|
"desktop": ">=0.0.1",
|
|
@@ -89,19 +82,19 @@
|
|
|
89
82
|
}
|
|
90
83
|
},
|
|
91
84
|
"dependencies": {
|
|
92
|
-
"@camstack/addon-admin-ui": "1.2.
|
|
93
|
-
"@camstack/addon-agent-ui": "1.2.
|
|
85
|
+
"@camstack/addon-admin-ui": "1.2.603",
|
|
86
|
+
"@camstack/addon-agent-ui": "1.2.338",
|
|
94
87
|
"@camstack/addon-auth": "1.2.178",
|
|
95
88
|
"@camstack/addon-benchmark": "1.2.312",
|
|
96
|
-
"@camstack/addon-decoder-nodeav": "1.2.
|
|
89
|
+
"@camstack/addon-decoder-nodeav": "1.2.148",
|
|
97
90
|
"@camstack/addon-notifiers": "1.2.633",
|
|
98
|
-
"@camstack/addon-pipeline": "1.2.
|
|
91
|
+
"@camstack/addon-pipeline": "1.2.645",
|
|
99
92
|
"@camstack/addon-pipeline-orchestrator": "1.2.664",
|
|
100
|
-
"@camstack/addon-post-analysis": "1.2.
|
|
93
|
+
"@camstack/addon-post-analysis": "1.2.678",
|
|
101
94
|
"@camstack/develop": "0.1.48",
|
|
102
95
|
"@camstack/sdk": "1.2.156",
|
|
103
|
-
"@camstack/types": "1.2.
|
|
104
|
-
"@camstack/ui-library": "1.2.
|
|
96
|
+
"@camstack/types": "1.2.516",
|
|
97
|
+
"@camstack/ui-library": "1.2.396",
|
|
105
98
|
"@fastify/compress": "^9.0.0",
|
|
106
99
|
"@fastify/cookie": "^11.0.2",
|
|
107
100
|
"@fastify/cors": "^11.2.0",
|
|
@@ -11442,6 +11442,14 @@ function toSerializableRoute(route) {
|
|
|
11442
11442
|
...typeof rateLimit === "string" ? { rateLimit } : {}
|
|
11443
11443
|
};
|
|
11444
11444
|
}
|
|
11445
|
+
/** A scoped-settings call names its scope and capability; a call without them is a bug. */
|
|
11446
|
+
function requireScopedTarget(addonId, method, args) {
|
|
11447
|
+
if (args.scope === void 0 || args.cap === void 0) throw new Error(`child-addon-call: addon "${addonId}" ${method} needs scope and cap`);
|
|
11448
|
+
return {
|
|
11449
|
+
scope: args.scope,
|
|
11450
|
+
cap: args.cap
|
|
11451
|
+
};
|
|
11452
|
+
}
|
|
11445
11453
|
/**
|
|
11446
11454
|
* Dispatch a `target: 'settings'` addon-call to the loaded addon instance.
|
|
11447
11455
|
* Mirrors the (removed) `<addonId>.settings.<method>` Moleculer action. The
|
|
@@ -11457,6 +11465,20 @@ async function dispatchSettings(addon, addonId, method, args) {
|
|
|
11457
11465
|
if (typeof addon.updateGlobalSettingsAsOperator === "function") await addon.updateGlobalSettingsAsOperator(args.patch ?? {}, args.nodeId);
|
|
11458
11466
|
else await addon.updateGlobalSettings(args.patch ?? {}, args.nodeId);
|
|
11459
11467
|
return { success: true };
|
|
11468
|
+
case "getScopedSettings": {
|
|
11469
|
+
const { scope, cap } = requireScopedTarget(addonId, method, args);
|
|
11470
|
+
return typeof addon.getScopedSettings === "function" ? await addon.getScopedSettings(scope, cap, args.nodeId) ?? null : null;
|
|
11471
|
+
}
|
|
11472
|
+
case "updateScopedSettings": {
|
|
11473
|
+
const { scope, cap } = requireScopedTarget(addonId, method, args);
|
|
11474
|
+
if (typeof addon.updateScopedSettings !== "function") throw new Error(`child-addon-call: addon "${addonId}" does not implement updateScopedSettings`);
|
|
11475
|
+
await addon.updateScopedSettings(scope, cap, args.patch ?? {}, args.nodeId);
|
|
11476
|
+
return { success: true };
|
|
11477
|
+
}
|
|
11478
|
+
case "readScopedValues": {
|
|
11479
|
+
const { scope, cap } = requireScopedTarget(addonId, method, args);
|
|
11480
|
+
return typeof addon.readScopedValues === "function" ? await addon.readScopedValues(scope, cap, args.nodeId) ?? null : null;
|
|
11481
|
+
}
|
|
11460
11482
|
case "getIntegrationSettings": return typeof addon.getIntegrationSettings === "function" ? await addon.getIntegrationSettings(args.nodeId) ?? null : null;
|
|
11461
11483
|
case "getIntegrationFormSchema": return typeof addon.getIntegrationFormSchema === "function" && args.instance !== void 0 ? await addon.getIntegrationFormSchema(args.instance, args.nodeId) ?? null : typeof addon.getGlobalSettings === "function" ? await addon.getGlobalSettings(void 0, void 0, args.nodeId) ?? null : null;
|
|
11462
11484
|
case "getDeviceSettings": return typeof addon.getDeviceSettings === "function" && typeof args.deviceId === "number" ? await addon.getDeviceSettings(args.deviceId) ?? null : null;
|
|
@@ -11387,6 +11387,14 @@ function toSerializableRoute(route) {
|
|
|
11387
11387
|
...typeof rateLimit === "string" ? { rateLimit } : {}
|
|
11388
11388
|
};
|
|
11389
11389
|
}
|
|
11390
|
+
/** A scoped-settings call names its scope and capability; a call without them is a bug. */
|
|
11391
|
+
function requireScopedTarget(addonId, method, args) {
|
|
11392
|
+
if (args.scope === void 0 || args.cap === void 0) throw new Error(`child-addon-call: addon "${addonId}" ${method} needs scope and cap`);
|
|
11393
|
+
return {
|
|
11394
|
+
scope: args.scope,
|
|
11395
|
+
cap: args.cap
|
|
11396
|
+
};
|
|
11397
|
+
}
|
|
11390
11398
|
/**
|
|
11391
11399
|
* Dispatch a `target: 'settings'` addon-call to the loaded addon instance.
|
|
11392
11400
|
* Mirrors the (removed) `<addonId>.settings.<method>` Moleculer action. The
|
|
@@ -11402,6 +11410,20 @@ async function dispatchSettings(addon, addonId, method, args) {
|
|
|
11402
11410
|
if (typeof addon.updateGlobalSettingsAsOperator === "function") await addon.updateGlobalSettingsAsOperator(args.patch ?? {}, args.nodeId);
|
|
11403
11411
|
else await addon.updateGlobalSettings(args.patch ?? {}, args.nodeId);
|
|
11404
11412
|
return { success: true };
|
|
11413
|
+
case "getScopedSettings": {
|
|
11414
|
+
const { scope, cap } = requireScopedTarget(addonId, method, args);
|
|
11415
|
+
return typeof addon.getScopedSettings === "function" ? await addon.getScopedSettings(scope, cap, args.nodeId) ?? null : null;
|
|
11416
|
+
}
|
|
11417
|
+
case "updateScopedSettings": {
|
|
11418
|
+
const { scope, cap } = requireScopedTarget(addonId, method, args);
|
|
11419
|
+
if (typeof addon.updateScopedSettings !== "function") throw new Error(`child-addon-call: addon "${addonId}" does not implement updateScopedSettings`);
|
|
11420
|
+
await addon.updateScopedSettings(scope, cap, args.patch ?? {}, args.nodeId);
|
|
11421
|
+
return { success: true };
|
|
11422
|
+
}
|
|
11423
|
+
case "readScopedValues": {
|
|
11424
|
+
const { scope, cap } = requireScopedTarget(addonId, method, args);
|
|
11425
|
+
return typeof addon.readScopedValues === "function" ? await addon.readScopedValues(scope, cap, args.nodeId) ?? null : null;
|
|
11426
|
+
}
|
|
11405
11427
|
case "getIntegrationSettings": return typeof addon.getIntegrationSettings === "function" ? await addon.getIntegrationSettings(args.nodeId) ?? null : null;
|
|
11406
11428
|
case "getIntegrationFormSchema": return typeof addon.getIntegrationFormSchema === "function" && args.instance !== void 0 ? await addon.getIntegrationFormSchema(args.instance, args.nodeId) ?? null : typeof addon.getGlobalSettings === "function" ? await addon.getGlobalSettings(void 0, void 0, args.nodeId) ?? null : null;
|
|
11407
11429
|
case "getDeviceSettings": return typeof addon.getDeviceSettings === "function" && typeof args.deviceId === "number" ? await addon.getDeviceSettings(args.deviceId) ?? null : null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Is as defineRecordKinds } from "./dist-
|
|
1
|
+
import { Is as defineRecordKinds } from "./dist-CPUbgRkb.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";
|
|
@@ -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-Ddkk4Dqq.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");
|
|
@@ -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-Ddkk4Dqq.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 { Bo as BaseAddon, Oc as errMsg, hn as addonPagesCapability, kc as EventCategory } from "../../dist-
|
|
1
|
+
import { Bo as BaseAddon, Oc as errMsg, hn as addonPagesCapability, kc as EventCategory } from "../../dist-CPUbgRkb.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-Ddkk4Dqq.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 { Bo as BaseAddon, Oc as errMsg, _n as addonWidgetsCapability, kc as EventCategory } from "../../dist-
|
|
1
|
+
import { Bo as BaseAddon, Oc as errMsg, _n as addonWidgetsCapability, kc as EventCategory } from "../../dist-CPUbgRkb.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-Ddkk4Dqq.js");
|
|
7
7
|
const require_read_all_rows$1 = require("../../read-all-rows-CVoO1ONM.js");
|
|
8
8
|
let node_fs = require("node:fs");
|
|
9
9
|
node_fs = require_chunk.__toESM(node_fs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bo as BaseAddon, Gr as isAlertEpisodeSeverity, Is as defineRecordKinds, Oc as errMsg$1, Wr as isAlertEpisodeOpen, bn as alertsCapability, f as AlertSchema, js as createEvent$1, kc as EventCategory$1, vn as alertEpisodeId, w as CORE_BLOCK_ADDON_PREFIX, yn as alertEpisodePayload } from "../../dist-
|
|
1
|
+
import { Bo as BaseAddon, Gr as isAlertEpisodeSeverity, Is as defineRecordKinds, Oc as errMsg$1, Wr as isAlertEpisodeOpen, bn as alertsCapability, f as AlertSchema, js as createEvent$1, kc as EventCategory$1, vn as alertEpisodeId, w as CORE_BLOCK_ADDON_PREFIX, yn as alertEpisodePayload } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { t as require_read_all_rows } from "../../read-all-rows-TaPqdWNF.mjs";
|
|
3
3
|
import * as fs$1 from "node:fs";
|
|
4
4
|
import * as path$1 from "node:path";
|
|
@@ -36,11 +36,9 @@
|
|
|
36
36
|
*/
|
|
37
37
|
import type { AddonInitResult } from "@camstack/types";
|
|
38
38
|
import { BaseAddon } from "@camstack/types";
|
|
39
|
-
|
|
40
|
-
export
|
|
41
|
-
readonly
|
|
42
|
-
}
|
|
43
|
-
export declare class AutotrackAddon extends BaseAddon<AutotrackConfig> {
|
|
39
|
+
import { type AutotrackCameraRecord } from "./autotrack-cameras.js";
|
|
40
|
+
export declare class AutotrackAddon extends BaseAddon<Record<string, never>> {
|
|
41
|
+
private readonly camerasState;
|
|
44
42
|
private records;
|
|
45
43
|
private readonly sessions;
|
|
46
44
|
/** Cameras whose `ptz-autotrack` binding names THIS addon, last time we read. */
|
|
@@ -62,10 +60,12 @@ export declare class AutotrackAddon extends BaseAddon<AutotrackConfig> {
|
|
|
62
60
|
private mirrorTimer;
|
|
63
61
|
private watchdogTimer;
|
|
64
62
|
constructor();
|
|
63
|
+
/** Load the per-camera records the store holds. */
|
|
64
|
+
protected loadRecords(): Promise<void>;
|
|
65
|
+
protected persistRecords(): Promise<void>;
|
|
65
66
|
protected onInitialize(): Promise<AddonInitResult>;
|
|
66
67
|
protected onShutdown(): Promise<void>;
|
|
67
|
-
protected
|
|
68
|
-
private recordOf;
|
|
68
|
+
protected recordOf(deviceId: number): AutotrackCameraRecord;
|
|
69
69
|
private statusOf;
|
|
70
70
|
private patchCamera;
|
|
71
71
|
private serialiseRecords;
|
|
@@ -3,7 +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-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
|
+
let zod = require("zod");
|
|
7
8
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
8
9
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
9
10
|
deadZoneFraction: .5,
|
|
@@ -741,10 +742,13 @@ function round3(value) {
|
|
|
741
742
|
}
|
|
742
743
|
//#endregion
|
|
743
744
|
//#region src/builtins/autotrack/autotrack.addon.ts
|
|
745
|
+
/** Persisted shape (store key `cameras`): one entry per camera the operator has touched. */
|
|
746
|
+
var CamerasStateSchema = zod.z.record(zod.z.string(), zod.z.unknown());
|
|
744
747
|
/** How often the silence watchdog runs. Small relative to the disappear delay
|
|
745
748
|
* it enforces — the delay is the budget, this is only the resolution. */
|
|
746
749
|
var WATCHDOG_INTERVAL_MS = 5e3;
|
|
747
750
|
var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
751
|
+
camerasState = this.state("cameras", CamerasStateSchema, {});
|
|
748
752
|
records = {};
|
|
749
753
|
sessions = /* @__PURE__ */ new Map();
|
|
750
754
|
/** Cameras whose `ptz-autotrack` binding names THIS addon, last time we read. */
|
|
@@ -766,10 +770,17 @@ var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
|
766
770
|
mirrorTimer = null;
|
|
767
771
|
watchdogTimer = null;
|
|
768
772
|
constructor() {
|
|
769
|
-
super({
|
|
773
|
+
super({});
|
|
774
|
+
}
|
|
775
|
+
/** Load the per-camera records the store holds. */
|
|
776
|
+
async loadRecords() {
|
|
777
|
+
this.records = parseCameraRecords(await this.camerasState.get());
|
|
778
|
+
}
|
|
779
|
+
async persistRecords() {
|
|
780
|
+
await this.camerasState.set(this.serialiseRecords());
|
|
770
781
|
}
|
|
771
782
|
async onInitialize() {
|
|
772
|
-
this.
|
|
783
|
+
await this.loadRecords();
|
|
773
784
|
this.unsubscribeFrames = this.ctx.eventBus.subscribe({ category: require_dist.EventCategory.PipelineAnalyticsFrameTracked }, (event) => {
|
|
774
785
|
if (!require_dist.isEvent(event, require_dist.EventCategory.PipelineAnalyticsFrameTracked)) return;
|
|
775
786
|
const session = this.sessions.get(event.data.deviceId);
|
|
@@ -833,10 +844,6 @@ var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
|
833
844
|
for (const session of this.sessions.values()) session.loop.logSummary();
|
|
834
845
|
this.sessions.clear();
|
|
835
846
|
}
|
|
836
|
-
async onConfigChanged() {
|
|
837
|
-
this.records = parseCameraRecords(this.config.cameras);
|
|
838
|
-
await this.reconcileSessions();
|
|
839
|
-
}
|
|
840
847
|
recordOf(deviceId) {
|
|
841
848
|
return this.records[deviceId] ?? DEFAULT_CAMERA_RECORD;
|
|
842
849
|
}
|
|
@@ -847,7 +854,7 @@ var AutotrackAddon = class extends require_dist.BaseAddon {
|
|
|
847
854
|
const before = this.recordOf(deviceId).enabled;
|
|
848
855
|
this.records = withCameraPatch(this.records, deviceId, patch);
|
|
849
856
|
if (before !== this.recordOf(deviceId).enabled) this.lastChangedAt.set(deviceId, Date.now());
|
|
850
|
-
await this.
|
|
857
|
+
await this.persistRecords();
|
|
851
858
|
await this.refreshEverything();
|
|
852
859
|
}
|
|
853
860
|
serialiseRecords() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Bo as BaseAddon, Oc as errMsg, Qi as ptzAutotrackCapability, Tn as bareAddonId, kc as EventCategory, qs as isEvent, rt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-
|
|
1
|
+
import { Bo as BaseAddon, Oc as errMsg, Qi as ptzAutotrackCapability, Tn as bareAddonId, kc as EventCategory, qs as isEvent, rt as FIRST_LEVEL_MACRO_CLASSES } from "../../dist-CPUbgRkb.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
//#region src/builtins/autotrack/autotrack-config.ts
|
|
3
4
|
var DEFAULT_AUTOTRACK_LOOP_CONFIG = {
|
|
4
5
|
deadZoneFraction: .5,
|
|
@@ -736,10 +737,13 @@ function round3(value) {
|
|
|
736
737
|
}
|
|
737
738
|
//#endregion
|
|
738
739
|
//#region src/builtins/autotrack/autotrack.addon.ts
|
|
740
|
+
/** Persisted shape (store key `cameras`): one entry per camera the operator has touched. */
|
|
741
|
+
var CamerasStateSchema = z.record(z.string(), z.unknown());
|
|
739
742
|
/** How often the silence watchdog runs. Small relative to the disappear delay
|
|
740
743
|
* it enforces — the delay is the budget, this is only the resolution. */
|
|
741
744
|
var WATCHDOG_INTERVAL_MS = 5e3;
|
|
742
745
|
var AutotrackAddon = class extends BaseAddon {
|
|
746
|
+
camerasState = this.state("cameras", CamerasStateSchema, {});
|
|
743
747
|
records = {};
|
|
744
748
|
sessions = /* @__PURE__ */ new Map();
|
|
745
749
|
/** Cameras whose `ptz-autotrack` binding names THIS addon, last time we read. */
|
|
@@ -761,10 +765,17 @@ var AutotrackAddon = class extends BaseAddon {
|
|
|
761
765
|
mirrorTimer = null;
|
|
762
766
|
watchdogTimer = null;
|
|
763
767
|
constructor() {
|
|
764
|
-
super({
|
|
768
|
+
super({});
|
|
769
|
+
}
|
|
770
|
+
/** Load the per-camera records the store holds. */
|
|
771
|
+
async loadRecords() {
|
|
772
|
+
this.records = parseCameraRecords(await this.camerasState.get());
|
|
773
|
+
}
|
|
774
|
+
async persistRecords() {
|
|
775
|
+
await this.camerasState.set(this.serialiseRecords());
|
|
765
776
|
}
|
|
766
777
|
async onInitialize() {
|
|
767
|
-
this.
|
|
778
|
+
await this.loadRecords();
|
|
768
779
|
this.unsubscribeFrames = this.ctx.eventBus.subscribe({ category: EventCategory.PipelineAnalyticsFrameTracked }, (event) => {
|
|
769
780
|
if (!isEvent(event, EventCategory.PipelineAnalyticsFrameTracked)) return;
|
|
770
781
|
const session = this.sessions.get(event.data.deviceId);
|
|
@@ -828,10 +839,6 @@ var AutotrackAddon = class extends BaseAddon {
|
|
|
828
839
|
for (const session of this.sessions.values()) session.loop.logSummary();
|
|
829
840
|
this.sessions.clear();
|
|
830
841
|
}
|
|
831
|
-
async onConfigChanged() {
|
|
832
|
-
this.records = parseCameraRecords(this.config.cameras);
|
|
833
|
-
await this.reconcileSessions();
|
|
834
|
-
}
|
|
835
842
|
recordOf(deviceId) {
|
|
836
843
|
return this.records[deviceId] ?? DEFAULT_CAMERA_RECORD;
|
|
837
844
|
}
|
|
@@ -842,7 +849,7 @@ var AutotrackAddon = class extends BaseAddon {
|
|
|
842
849
|
const before = this.recordOf(deviceId).enabled;
|
|
843
850
|
this.records = withCameraPatch(this.records, deviceId, patch);
|
|
844
851
|
if (before !== this.recordOf(deviceId).enabled) this.lastChangedAt.set(deviceId, Date.now());
|
|
845
|
-
await this.
|
|
852
|
+
await this.persistRecords();
|
|
846
853
|
await this.refreshEverything();
|
|
847
854
|
}
|
|
848
855
|
serialiseRecords() {
|
|
@@ -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-Ddkk4Dqq.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-BDvLSZtj.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 { Bo as BaseAddon, Ia as storageOccupancyCapability, _i as mayWriteToLocation, ac as nodePin, bc as toNodeId, kc as EventCategory, wn as backupCapability } from "../../dist-
|
|
1
|
+
import { Bo as BaseAddon, Ia as storageOccupancyCapability, _i as mayWriteToLocation, ac as nodePin, bc as toNodeId, kc as EventCategory, wn as backupCapability } from "../../dist-CPUbgRkb.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-Dh3XnCR1.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-Ddkk4Dqq.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 { Bo as BaseAddon, E as CalendarPreferencesSchema, Is as defineRecordKinds, Nn as calendarsCapability } from "../../dist-
|
|
1
|
+
import { Bo as BaseAddon, E as CalendarPreferencesSchema, Is as defineRecordKinds, Nn as calendarsCapability } from "../../dist-CPUbgRkb.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-Ddkk4Dqq.js");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
let _camstack_types_node = require("@camstack/types/node");
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Bo as BaseAddon, Dc as DeviceType, Ei as motionCapability, J as DeclaredDevices, Oc as errMsg, Pn as cameraGridLayoutCapability, Ra as streamCatalogCapability, Tc as DeviceFeature, Tn as bareAddonId, Tt as MOTION_CLOSE_AFTER_MS, Ws as hydrateSchema, bi as memoizePinnedFfmpeg, h as BaseDevice, ho as buildFfmpegArgs, ja as snapshotCapability, js as createEvent, kc as EventCategory, or as declarationOwnerNodeId, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-
|
|
1
|
+
import { Bo as BaseAddon, Dc as DeviceType, Ei as motionCapability, J as DeclaredDevices, Oc as errMsg, Pn as cameraGridLayoutCapability, Ra as streamCatalogCapability, Tc as DeviceFeature, Tn as bareAddonId, Tt as MOTION_CLOSE_AFTER_MS, Ws as hydrateSchema, bi as memoizePinnedFfmpeg, h as BaseDevice, ho as buildFfmpegArgs, ja as snapshotCapability, js as createEvent, kc as EventCategory, or as declarationOwnerNodeId, z as DERIVED_CAMERA_SILENCED_CAP_NAMES } from "../../dist-CPUbgRkb.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { FfmpegProcess } from "@camstack/types/node";
|
|
4
4
|
import { promises } from "node:fs";
|
|
@@ -3,9 +3,9 @@ Object.defineProperties(exports, {
|
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
5
|
require("../../chunk-Cek0wNdY.js");
|
|
6
|
-
const require_dist = require("../../dist-
|
|
7
|
-
const require_composition_sources = require("../../composition-sources-
|
|
8
|
-
const require_capture_engine = require("../../capture-engine-
|
|
6
|
+
const require_dist = require("../../dist-Ddkk4Dqq.js");
|
|
7
|
+
const require_composition_sources = require("../../composition-sources-DKCbVA67.js");
|
|
8
|
+
const require_capture_engine = require("../../capture-engine-BVpkq9Mv.js");
|
|
9
9
|
const require_retention = require("../../retention-BNONb5X_.js");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
//#region src/builtins/composer/actuator-invoke.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Ao as isForwardInputRef, Ar as fanControlCapability, Bi as petFountainCapability, Bn as climateControlCapability, Bo as BaseAddon, Br as groupTemplate, Co as createStatefulExpressionMemory, Da as sharedColorModes, Dc as DeviceType, Dn as brightnessCapability, Ea as sharedActuatorMethods, Ei as motionCapability, Eo as evaluateStatistic, Fo as planResetTier, Gn as composerCapability, Hn as colorCapability, Io as planStatisticTier, J as DeclaredDevices, Jn as consumablesCapability, Kn as compositionFieldKey, Lo as statisticCadenceMs, Mo as nextLocalMidnight, No as openReset, Nr as featureForwards, Oc as errMsg, Oo as historyRetentionFromSettings, Or as expressionContainsBuiltinCall, Po as openStatistic, Pt as PetFountainStatusSchema, Qa as valveCapability, Ri as parseColorInput, Ro as toExpressionValue, So as compositionSourceKey, Ta as sharedActuatorFeatures, To as evaluateDerivative, Ui as planComposition, Va as switchCapability, Vi as petFountainWaterItem, Xi as processTimeZoneOr, Xs as isReadingQuantity, _a as runFanOut, _o as composedDeviceRef, at as FanDirectionSchema, bo as compositionItemFieldPath, di as lockControlCapability, do as HISTORY_SLOW_MS, er as coverCapability, fo as HOUR_MS, go as cloneStatefulExpressionMemory, h as BaseDevice, i as ACTUATOR_TEMPLATE_IDS, jo as isHistoryHelper, jr as fanOutTargets, js as createEvent, k as ConsumableItemSchema, kc as EventCategory, kn as buildCapabilityLookup, ko as integrateReading, lo as DEFAULT_HISTORY_RETENTION, lt as GroupCommandResultSchema, mo as MINUTE_MS, mt as HvacModeSchema, ni as kebabToCamel, oo as COMPOSER_ADDON_ID, pa as resolveMutate, r as ACTUATOR_METHODS, s as ALL_CAPABILITY_DEFINITIONS, sr as declaredSeriesKind, uo as HISTORY_FAST_MS, vi as mediaPlayerCapability, vo as composedDeviceStableId, wo as disarmRoseMemory, wr as evaluateCompositionField, x as COMPOSED_ITEM_FIXED_FIELDS, xi as methodRefusal, xo as compositionSliceKey, yi as mediaPlayerFeaturesOfRoles, yo as compositionFeatureEnabled, zr as groupCommandsCapability } 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 { Ao as isForwardInputRef, Ar as fanControlCapability, Bi as petFountainCapability, Bn as climateControlCapability, Bo as BaseAddon, Br as groupTemplate, Co as createStatefulExpressionMemory, Da as sharedColorModes, Dc as DeviceType, Dn as brightnessCapability, Ea as sharedActuatorMethods, Ei as motionCapability, Eo as evaluateStatistic, Fo as planResetTier, Gn as composerCapability, Hn as colorCapability, Io as planStatisticTier, J as DeclaredDevices, Jn as consumablesCapability, Kn as compositionFieldKey, Lo as statisticCadenceMs, Mo as nextLocalMidnight, No as openReset, Nr as featureForwards, Oc as errMsg, Oo as historyRetentionFromSettings, Or as expressionContainsBuiltinCall, Po as openStatistic, Pt as PetFountainStatusSchema, Qa as valveCapability, Ri as parseColorInput, Ro as toExpressionValue, So as compositionSourceKey, Ta as sharedActuatorFeatures, To as evaluateDerivative, Ui as planComposition, Va as switchCapability, Vi as petFountainWaterItem, Xi as processTimeZoneOr, Xs as isReadingQuantity, _a as runFanOut, _o as composedDeviceRef, at as FanDirectionSchema, bo as compositionItemFieldPath, di as lockControlCapability, do as HISTORY_SLOW_MS, er as coverCapability, fo as HOUR_MS, go as cloneStatefulExpressionMemory, h as BaseDevice, i as ACTUATOR_TEMPLATE_IDS, jo as isHistoryHelper, jr as fanOutTargets, js as createEvent, k as ConsumableItemSchema, kc as EventCategory, kn as buildCapabilityLookup, ko as integrateReading, lo as DEFAULT_HISTORY_RETENTION, lt as GroupCommandResultSchema, mo as MINUTE_MS, mt as HvacModeSchema, ni as kebabToCamel, oo as COMPOSER_ADDON_ID, pa as resolveMutate, r as ACTUATOR_METHODS, s as ALL_CAPABILITY_DEFINITIONS, sr as declaredSeriesKind, uo as HISTORY_FAST_MS, vi as mediaPlayerCapability, vo as composedDeviceStableId, wo as disarmRoseMemory, wr as evaluateCompositionField, x as COMPOSED_ITEM_FIXED_FIELDS, xi as methodRefusal, xo as compositionSliceKey, yi as mediaPlayerFeaturesOfRoles, yo as compositionFeatureEnabled, zr as groupCommandsCapability } from "../../dist-CPUbgRkb.mjs";
|
|
2
|
+
import { i as parseDeviceStateChanged, n as normalizedNativeOwner, r as isRecord$4 } from "../../composition-sources-Br7JhpbD.mjs";
|
|
3
|
+
import { i as capSeriesKey } from "../../capture-engine-D-oUDtX5.mjs";
|
|
4
4
|
import { i as DAY_MS, t as DEFAULT_RETENTION } from "../../retention-B9l9TnGE.mjs";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
//#region src/builtins/composer/actuator-invoke.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-Ddkk4Dqq.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 = {
|