@camstack/server 1.2.803 → 1.2.805
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/agent/main.js +1 -1
- package/dist/api/core/addon-settings.router.js +2 -2
- package/dist/api/trpc/device-config-secret-redaction.js +3 -5
- package/dist/api/trpc/generated-cap-routers.js +10 -24
- package/dist/api/trpc/localized-schema-paths.js +0 -2
- package/dist/core/addon/addon-registry.service.js +4 -4
- package/dist/core/addon/addon-settings-provider.js +2 -49
- package/package.json +34 -15
- package/system/dist/addon-runner.js +2 -9
- package/system/dist/addon-runner.mjs +2 -9
- package/system/dist/{agent-https-DtYiXPGm.js → agent-https-CuChFRA2.js} +1 -1
- package/system/dist/{agent-https-BRfJO9ZR.mjs → agent-https-DS4b0ucn.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/composed-device.d.ts +5 -0
- package/system/dist/builtins/composer/composer.addon.js +39 -4
- package/system/dist/builtins/composer/composer.addon.mjs +39 -4
- package/system/dist/builtins/composer/composer.d.ts +13 -0
- 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 +4 -5
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +4 -5
- 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-alias-actions.d.ts +45 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +958 -768
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +958 -768
- package/system/dist/builtins/device-manager/device-meta-types.d.ts +3 -0
- package/system/dist/builtins/device-manager/device-row-store.d.ts +8 -0
- package/system/dist/builtins/device-manager/device-template/mirror-resolver.d.ts +19 -0
- package/system/dist/builtins/device-manager/device-template/nunjucks-internals.d.ts +53 -0
- package/system/dist/builtins/device-manager/device-template/template-filters.d.ts +28 -0
- package/system/dist/builtins/device-manager/device-template/template-grammar.d.ts +43 -0
- package/system/dist/builtins/device-manager/device-template/template-protocol.d.ts +33 -0
- package/system/dist/builtins/device-manager/device-template/template-renderer.d.ts +54 -0
- package/system/dist/builtins/device-manager/device-template/template-worker.d.ts +1 -0
- 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.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/snapshot/index.js +2 -2
- package/system/dist/builtins/snapshot/index.mjs +2 -2
- package/system/dist/builtins/snapshot/snapshot.addon.d.ts +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/bootstrap-form-actions.d.ts +4 -4
- package/system/dist/builtins/system-config/system-config.addon.js +7 -7
- package/system/dist/builtins/system-config/system-config.addon.mjs +7 -7
- 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-BQ08XTnZ.js → capture-engine-Byc5Fkp0.js} +1 -1
- package/system/dist/{capture-engine-BFgeAHa9.mjs → capture-engine-CnVIcnyN.mjs} +1 -1
- package/system/dist/{composition-sources-DkOfzgpS.mjs → composition-sources-BhM6G9QT.mjs} +1 -1
- package/system/dist/{composition-sources-DNHNUvTr.js → composition-sources-BxK6ttP9.js} +1 -1
- package/system/dist/{constants-D5CG3Gvc.js → constants--xo6Q-KA.js} +1 -1
- package/system/dist/{constants-GCrIKhD_.mjs → constants-Bf1PEHRU.mjs} +1 -1
- package/system/dist/{device-ca-Dk2sx_18.mjs → device-ca-Do0-HV_h.mjs} +1 -1
- package/system/dist/{device-ca-DgZeLVC1.js → device-ca-Uq5KGFSq.js} +1 -1
- package/system/dist/device-template-worker.js +7289 -0
- package/system/dist/device-template-worker.mjs +7287 -0
- package/system/dist/{dist-D5nGm8Sd.js → dist-2SHQaxaS.js} +631 -618
- package/system/dist/{dist-ze-qVU7x.mjs → dist-CogtCQxu.mjs} +608 -619
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-mdns-ciao-D4g9qsNL.js → hub-mdns-ciao-DqPrLiYH.js} +2 -2
- package/system/dist/{hub-mdns-ciao-DD2QP3w5.mjs → hub-mdns-ciao-aFHCKrif.mjs} +2 -2
- package/system/dist/index.js +28 -48
- package/system/dist/index.mjs +28 -48
- package/system/dist/kernel/moleculer/addon-service-factory.d.ts +2 -3
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +2 -2
- package/system/dist/kernel/transport/parent-unowned-call.d.ts +1 -1
- package/system/dist/{legacy-integration-rows-door-MRr8Ncb_.js → legacy-integration-rows-door-Bz8rivxI.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-BvEFQrAa.mjs → legacy-integration-rows-door-CiuxDLoc.mjs} +1 -1
- package/system/dist/{restore-archive-aG7OlQNo.js → restore-archive-D-3wmHDq.js} +1 -1
- package/system/dist/{restore-archive-DBc5sNQS.mjs → restore-archive-PlBC2NwT.mjs} +1 -1
- package/system/dist/{wal-maintenance-C-ddHy-q.js → wal-maintenance-BTR55y--.js} +0 -0
- package/system/dist/{wal-maintenance-vQHsOLGg.mjs → wal-maintenance-jrhYTCn2.mjs} +0 -0
- package/system/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
2
|
+
const require_wal_maintenance = require("./wal-maintenance-BTR55y--.js");
|
|
3
3
|
let node_worker_threads = require("node:worker_threads");
|
|
4
4
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-
|
|
1
|
+
import { A as callRecords, C as isFileHostWorkerData, D as RecordsEngine, M as controlTargetOf, O as callControl, S as isFileHostRequest, a as WalMaintenance, b as collectTransferables, d as callMigrate, f as migrateTargetOf, j as callVector, k as callData, l as SqliteSettingsBackend, o as createVectorIndex, s as vectorProviderOf, u as HUB_MIGRATIONS, v as serializeError, w as trustInput } from "./wal-maintenance-jrhYTCn2.mjs";
|
|
2
2
|
import { parentPort, threadId, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/builtins/sqlite-storage/file-host-worker.ts
|
|
4
4
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-2SHQaxaS.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_agent_https = require("./agent-https-
|
|
4
|
+
const require_agent_https = require("./agent-https-CuChFRA2.js");
|
|
5
5
|
let node_crypto = require("node:crypto");
|
|
6
6
|
let _camstack_types_node = require("@camstack/types/node");
|
|
7
7
|
let node_fs = require("node:fs");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { o as __toESM } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { kc as userError } from "./dist-CogtCQxu.mjs";
|
|
3
3
|
import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
|
|
4
|
-
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-
|
|
4
|
+
import { D as reasonRequiresNewCa, E as evaluateExistingCert, F as readNameConstraints, N as permitsIdentity, _ as issueLeaf, b as collectCertIdentity, g as generateCa, j as isConstrainedCa, v as loadCa, y as localCaCommonName } from "./agent-https-DS4b0ucn.mjs";
|
|
5
5
|
import { X509Certificate, createPrivateKey } from "node:crypto";
|
|
6
6
|
import { writeOwnerOnlyFileSync } from "@camstack/types/node";
|
|
7
7
|
import { copyFileSync, existsSync, mkdirSync, readFileSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
package/system/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
4
|
-
const require_device_ca = require("./device-ca-
|
|
3
|
+
const require_dist = require("./dist-2SHQaxaS.js");
|
|
4
|
+
const require_device_ca = require("./device-ca-Uq5KGFSq.js");
|
|
5
5
|
const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
|
|
6
6
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
7
7
|
require("./builtins/alerts/index.js");
|
|
@@ -26,22 +26,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
|
|
|
26
26
|
const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
|
|
27
27
|
const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
|
|
28
28
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
29
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
30
|
-
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-
|
|
29
|
+
const require_wal_maintenance = require("./wal-maintenance-BTR55y--.js");
|
|
30
|
+
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-Bz8rivxI.js");
|
|
31
31
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
32
32
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
33
33
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
34
34
|
require("./builtins/storage-orchestrator/index.js");
|
|
35
|
-
const require_agent_https = require("./agent-https-
|
|
36
|
-
const require_constants = require("./constants-
|
|
35
|
+
const require_agent_https = require("./agent-https-CuChFRA2.js");
|
|
36
|
+
const require_constants = require("./constants--xo6Q-KA.js");
|
|
37
37
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
38
38
|
require("./builtins/system-config/index.js");
|
|
39
39
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
40
40
|
const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
|
|
41
|
-
const require_hub_mdns_ciao = require("./hub-mdns-ciao-
|
|
41
|
+
const require_hub_mdns_ciao = require("./hub-mdns-ciao-DqPrLiYH.js");
|
|
42
42
|
const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
|
|
43
43
|
const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
|
|
44
|
-
const require_restore_archive = require("./restore-archive-
|
|
44
|
+
const require_restore_archive = require("./restore-archive-D-3wmHDq.js");
|
|
45
45
|
const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
|
|
46
46
|
let zod = require("zod");
|
|
47
47
|
let node_crypto = require("node:crypto");
|
|
@@ -15734,9 +15734,8 @@ function normalizeCapability(cap) {
|
|
|
15734
15734
|
* 2. `methodResolver(capName)` from CapabilityRegistry definitions
|
|
15735
15735
|
* 3. Auto-discovery: enumerate own methods on the registered provider
|
|
15736
15736
|
*
|
|
15737
|
-
* Additionally, the
|
|
15738
|
-
* `
|
|
15739
|
-
* are auto-exposed under a
|
|
15737
|
+
* Additionally, the two device settings methods (`getDeviceSettings`,
|
|
15738
|
+
* `updateDeviceSettings`) are auto-exposed under a
|
|
15740
15739
|
* `settings.*` namespace if the addon implements them. This replaces the
|
|
15741
15740
|
* former `$addonHost` Moleculer service — the hub's `addon-settings`
|
|
15742
15741
|
* singleton provider calls `broker.call('<addonId>.settings.<method>')`.
|
|
@@ -15827,46 +15826,27 @@ function discoverProviderMethods(provider) {
|
|
|
15827
15826
|
}
|
|
15828
15827
|
return methods;
|
|
15829
15828
|
}
|
|
15830
|
-
/** The four two-level settings method names on ICamstackAddon. */
|
|
15831
|
-
var SETTINGS_GETTERS = ["getGlobalSettings", "getDeviceSettings"];
|
|
15832
|
-
var SETTINGS_UPDATERS = ["updateGlobalSettings", "updateDeviceSettings"];
|
|
15833
15829
|
/**
|
|
15834
|
-
* Add `settings.
|
|
15835
|
-
*
|
|
15836
|
-
*
|
|
15830
|
+
* Add `settings.getDeviceSettings` and `settings.updateDeviceSettings` to the actions map for an
|
|
15831
|
+
* addon that implements them. An addon has no settings of its own (D986): there is no addon-level
|
|
15832
|
+
* action here.
|
|
15837
15833
|
*
|
|
15838
|
-
*
|
|
15839
|
-
*
|
|
15834
|
+
* The getter returns `ConfigUISchemaWithValues | null`; the updater returns `{ success: true }`
|
|
15835
|
+
* or throws.
|
|
15840
15836
|
*/
|
|
15841
15837
|
function addSettingsActions(addon, actions) {
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
|
|
15845
|
-
|
|
15846
|
-
|
|
15847
|
-
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
|
|
15851
|
-
|
|
15852
|
-
|
|
15853
|
-
|
|
15854
|
-
}
|
|
15855
|
-
for (const methodName of SETTINGS_UPDATERS) {
|
|
15856
|
-
if (typeof addon[methodName] !== "function") continue;
|
|
15857
|
-
actions[`settings.${methodName}`] = { handler: async (ctx) => {
|
|
15858
|
-
const params = ctx.params ?? {};
|
|
15859
|
-
const patch = params.patch ?? {};
|
|
15860
|
-
if (methodName === "updateDeviceSettings") {
|
|
15861
|
-
const deviceId = params.deviceId;
|
|
15862
|
-
if (typeof deviceId !== "number") throw new Error(`settings.${methodName}: numeric deviceId is required`);
|
|
15863
|
-
await addon.updateDeviceSettings(deviceId, patch);
|
|
15864
|
-
return { success: true };
|
|
15865
|
-
}
|
|
15866
|
-
await addon[methodName](patch);
|
|
15867
|
-
return { success: true };
|
|
15868
|
-
} };
|
|
15869
|
-
}
|
|
15838
|
+
if (typeof addon.getDeviceSettings === "function") actions["settings.getDeviceSettings"] = { handler: async (ctx) => {
|
|
15839
|
+
const deviceId = (ctx.params ?? {}).deviceId;
|
|
15840
|
+
if (typeof deviceId !== "number") throw new Error("settings.getDeviceSettings: numeric deviceId is required");
|
|
15841
|
+
return await addon.getDeviceSettings(deviceId) ?? null;
|
|
15842
|
+
} };
|
|
15843
|
+
if (typeof addon.updateDeviceSettings === "function") actions["settings.updateDeviceSettings"] = { handler: async (ctx) => {
|
|
15844
|
+
const params = ctx.params ?? {};
|
|
15845
|
+
const deviceId = params.deviceId;
|
|
15846
|
+
if (typeof deviceId !== "number") throw new Error("settings.updateDeviceSettings: numeric deviceId is required");
|
|
15847
|
+
await addon.updateDeviceSettings(deviceId, params.patch ?? {});
|
|
15848
|
+
return { success: true };
|
|
15849
|
+
} };
|
|
15870
15850
|
}
|
|
15871
15851
|
//#endregion
|
|
15872
15852
|
//#region src/kernel/moleculer/core-cap-service.ts
|
|
@@ -24309,7 +24289,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
24309
24289
|
* to claim, and it was a leftover that read as verification.
|
|
24310
24290
|
* `BaseAddon.resolveConfig` reads THIS function through
|
|
24311
24291
|
* `ctx.settings.readAddonStore()`; the defaults it falls back to then become
|
|
24312
|
-
* the values the addon's next `
|
|
24292
|
+
* the values the addon's next `updateScopedSettings` patch carries into the
|
|
24313
24293
|
* store. That is how the Home Assistant export lost its membership on
|
|
24314
24294
|
* 2026-08-24 — see `brokerRefreshPatch` in the ha-export addon for the other
|
|
24315
24295
|
* half of that story. The line below is the only warning that this window is
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-
|
|
2
|
+
import { Ac as withoutCallerStamp, Ar as extractNestedAddonId, Ca as scopesAllowAddon, D as CatalogFileSchema, Ds as asJsonObject$1, Fi as objectInputDeclaresAddonId, Fs as collectSecretMarkerRefs, Gr as interpolate, Gs as expandCapMethods, Hs as defineRecordKinds, Ic as EventCategory$1, Ii as objectInputDeclaresRequiredDeviceId, Jo as CALLER_STAMPED_CAPABILITIES$1, Ls as createEvent$1, Nt as PackageRequiresSchema, Os as asNumber, Pa as splitTranslationRef, Pc as errMsg$1, Qa as unmetRequirements, St as METHOD_ACCESS_MAP, Tn as bareAddonId, Ua as supportedRuntimes, Us as emitDownForOwnedCaps, Wn as compareVersions, Xo as DEVICE_SETTINGS_CONTRIBUTION_METHODS, Xr as isCollectionArrayMethod, Yo as DATAPLANE_SECRET_HEADER$1, Yr as isArrayOutputSchema, Zi as procedureAuthKey, Zo as DEVICE_STATUS_METHOD, Zs as isDebugChannelName, _c as readinessKey, _i as looseSchema, a as AGENT_MDNS_SERVICE_TYPE, b as CATALOG_LANGS, bt as LOG_LEVEL_RANK, fs as RUNTIME_DEFAULTS, gi as logLevelAtMost, gn as addonSettingsCapability, hc as parseJsonUnknown, ii as kebabToCamel$1, kc as userError, ks as asString$1, li as lifecycleJobSchema, ma as resolveMethodAuth, mc as parseJsonObject, ms as ReadinessTimeoutError, o as AGENT_MDNS_TXT_KEYS, pr as describeUnmet, ps as ReadinessRegistry, qs as getDebugInterest, ri as isVoidInput, s as ALL_CAPABILITY_DEFINITIONS, ti as isObjectInput, wa as scopesAllowDeviceCap, xc as scopeKey, yc as resolveCapMount } from "./dist-CogtCQxu.mjs";
|
|
3
|
+
import { d as JWT_SIGNING_KEY_REF, f as JwtSigningKeyUnavailableError, g as processJwtSigningKey, i as generateDeviceCa, l as verifyDeviceLeaf, m as getProcessJwtSigningKeyState, n as DEVICE_CA_KEY_REF, o as issueDeviceLeaf, p as SYSTEM_SECRET_OWNER, s as loadDeviceCa, u as verifyDeviceSignature, v as staticJwtSigningKey } from "./device-ca-Do0-HV_h.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { AlertCenterAddon, a as redactLogEntry, i as isCredentialKeyName, n as lastCauseAfterChunk, o as redactLogMeta, r as readRunnerDisplayName, s as redactLogText, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
|
|
6
6
|
import "./builtins/alerts/index.mjs";
|
|
@@ -25,22 +25,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
25
25
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
26
26
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
27
27
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
28
|
-
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
29
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
28
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-jrhYTCn2.mjs";
|
|
29
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-CiuxDLoc.mjs";
|
|
30
30
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
31
31
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
32
32
|
import { StorageOrchestratorAddon, a as createHubCapForwardService, i as HUB_CAP_FWD_SERVICE, o as stripForwardedCaller, r as HUB_CAP_FWD_ACTION, s as buildStorageLocationRegistry, t as StorageOrchestratorService, u as storageOrchestratorRecordKinds } from "./builtins/storage-orchestrator/storage-orchestrator.addon.mjs";
|
|
33
33
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
34
|
-
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-
|
|
35
|
-
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-
|
|
34
|
+
import { A as buildNameConstraintSet, B as setProcessAgentHttpsNames, C as LEAF_RENEWAL_WINDOW_DAYS, E as evaluateExistingCert, F as readNameConstraints, I as AGENT_HTTPS_NAMES_COLLECTION, L as AGENT_HTTPS_NAMES_COLUMNS, M as isLocalOnlyHostname, N as permitsIdentity, O as PERMITTED_DNS_SUFFIXES, P as permitsName, R as AgentHttpsNames, S as CA_VALIDITY_DAYS, T as SERVER_AUTH_OID, a as collectAgentNames, b as collectCertIdentity, c as installAgentHttps, d as issueAgentHttpsLeaf, f as loadAgentHttps, h as CA_COMMON_NAME, i as certificateNames, j as isConstrainedCa, k as PERMITTED_IP_RANGES, l as isContainerBridgeAddress, m as pinnedHttpsCaFingerprint, n as acceptAgentSans, o as createAgentHttpsRequest, p as pemDigest, r as agentHttpsPaths, s as describeHttpsLeaf, t as AgentHttpsInstallError, u as isPrivateAddress, w as MAX_LEAF_VALIDITY_DAYS, x as systemHostFacts, y as localCaCommonName, z as getProcessAgentHttpsNames } from "./agent-https-DS4b0ucn.mjs";
|
|
35
|
+
import { a as MESH_CA_KEY_REF, i as MESH_CA_FIELD, n as DEFAULT_HUB_TLS_TCP_PORT, o as MESH_CA_SETTINGS_KEY } from "./constants-Bf1PEHRU.mjs";
|
|
36
36
|
import { $ as caFingerprintCompact, A as getProcessNodeMeshTransport, B as MESH_NODE_CERTIFICATES_COLLECTION, C as MESH_TLS_PORT_HELLO_FIELD, Ct as readOriginSetting, D as setProcessMeshTlsEnabler, Dt as readCidrSetting, E as ServiceBroker, Et as parseCidrList, F as renewMeshCertificate, G as getProcessMeshCertificateRegistry, H as MeshCertificateRegistry, I as revokeMeshCertificate, J as processMeshCrl, K as setProcessMeshCertificateRegistry, L as getProcessMeshTlsListenerState, M as isProcessVerifiedMeshPeer, N as onProcessNodeRegistered, O as dropProcessPeer, P as setProcessMeshPeerTransportLookup, Q as caFingerprint, R as openMeshTlsWhenRevocationsLoaded, S as verifyMembershipAnswer, St as parseOriginList, SystemConfigAddon, T as Errors, Tt as normalizeIp, U as RENEWAL_ABANDONED, V as MESH_NODE_CERTIFICATES_COLUMNS, W as describeMeshLeaf, X as getProcessMeshCaState, Y as MeshCaKeeper, Z as requireProcessMeshCa, _ as signPairingProof, _t as verifyAgentUiUnlockTicket, a as hubHostFromMeshAddress, at as issueMeshLeafForNode, b as MembershipResponder, bt as isInsecureOrigin, c as PAIRING_MAX_SESSIONS, ct as AGENT_DASHBOARD_ORIGINS_FIELD, d as PAIRING_PROTOCOL, dt as AGENT_UI_UNLOCK_USE, et as createMeshCsrPem, f as PAIRING_TTL_MS, ft as AGENT_UI_UNLOCK_VERSION, g as keyFingerprintShort, gt as parseAgentDashboardOrigins, h as describeCsr, ht as mintAgentUiUnlockTicket, i as AgentPairing, it as isValidAgentNodeId, j as getProcessPeerLeaf, k as emitProcessNodeRegistered, l as PAIRING_PATHS, lt as AGENT_UI_UNLOCK_TTL_MS, m as computePairingSas, mt as isAllowedAgentDashboardReturnTo, n as HubPairing, nt as generateMeshCa, o as PAIRING_CODE_DIGITS, ot as issueMeshLeafFromCsr, p as computePairingCommitment, pt as UnlockTicketJtiStore, q as MeshCrl, r as PairingHttpError, rt as generateMeshKeyPair, s as PAIRING_MAX_CODE_ATTEMPTS, st as loadMeshCa, tt as exportMeshPrivateKeyPem, u as PAIRING_PIN_DIGITS, ut as AGENT_UI_UNLOCK_TYP, v as verifyPairingProof, vt as InvalidCorsOriginError, w as TlsTcpTransporter, wt as createCidrMatcher, x as signMembershipProof, xt as normalizeOrigin, y as MEMBERSHIP_PATHS, yt as OPAQUE_ORIGIN, z as setProcessMeshTlsListenerState } from "./builtins/system-config/system-config.addon.mjs";
|
|
37
37
|
import "./builtins/system-config/index.mjs";
|
|
38
38
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
39
39
|
import { C as isModelDownloaded, E as setHuggingFaceReachabilityObserver, T as revisionWeightUrl, _ as downloadFile, a as startEventLoopStallMonitor, b as fetchJson, c as createAuthenticatedFileServer, d as resolveFilePath, f as ModelDownloadService, g as deleteModelFromDisk, h as collectModelFiles, i as attributeStall, l as parseRangeHeader, m as adoptModelRevisions, n as STALL_REPORT_MS, o as createFileDataPlaneHandler, r as STALL_TICK_MS, s as contentTypeFor, t as CustomActionRegistry, u as parseTokenizedUrl, v as downloadModel, w as resolveFormatRevision, x as getModelFilePath, y as ensureModel } from "./custom-action-registry-B9zFBNVa.mjs";
|
|
40
|
-
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-
|
|
40
|
+
import { A as retirePreviousLocalCa, C as checkUploadedCa, D as loadTlsCert, E as ensureTlsCert, F as closeLanHttp, I as readLanHttpState, L as registerLanHttpHandler, M as allFamiliesListenHost, N as applyLanHttp, O as reissueTlsLeaf, P as bindPendingLanHttp, S as chainsToPublicRoot, T as caReplacementMarkerFile, _ as readTlsMode, a as storeUploadedCertificate, b as writeTlsEnabled, c as leafFingerprintOf, d as servedHttpsLeafFingerprint, f as prepareBootTls, g as readTlsEnabled, h as readTlsAccessStatus, i as revertToGeneratedCertificate, j as DEFAULT_LAN_HTTP_PORT, k as replaceUnconstrainedLocalCa, l as registerHttpsListener, m as readExtraSans, n as applyCertificateToListener, o as useStoredUploadedCertificate, p as UPLOADED_CA_FILE, r as regenerateCertificate, s as clearHttpsListener, t as createCiaoPublisher, u as reloadHttpsListener, v as splitPemCertificates, w as validateUploadedTls, x as writeTlsMode, y as writeExtraSans } from "./hub-mdns-ciao-aFHCKrif.mjs";
|
|
41
41
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
42
42
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
43
|
-
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-
|
|
43
|
+
import { _ as backupRecordStoresOf, c as BackupDecryptError, f as generateBackupKeyPair, g as backupOrchestratorRecordKinds, h as readBackupEncryptionHeader, l as BackupKeyFormatError, r as prepareRestoreArchive, s as SystemBackupService, t as BackupKeyRequiredError, u as BackupKeyMismatchError } from "./restore-archive-PlBC2NwT.mjs";
|
|
44
44
|
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
|
|
45
45
|
import { z } from "zod";
|
|
46
46
|
import * as crypto$1 from "node:crypto";
|
|
@@ -15730,9 +15730,8 @@ function normalizeCapability(cap) {
|
|
|
15730
15730
|
* 2. `methodResolver(capName)` from CapabilityRegistry definitions
|
|
15731
15731
|
* 3. Auto-discovery: enumerate own methods on the registered provider
|
|
15732
15732
|
*
|
|
15733
|
-
* Additionally, the
|
|
15734
|
-
* `
|
|
15735
|
-
* are auto-exposed under a
|
|
15733
|
+
* Additionally, the two device settings methods (`getDeviceSettings`,
|
|
15734
|
+
* `updateDeviceSettings`) are auto-exposed under a
|
|
15736
15735
|
* `settings.*` namespace if the addon implements them. This replaces the
|
|
15737
15736
|
* former `$addonHost` Moleculer service — the hub's `addon-settings`
|
|
15738
15737
|
* singleton provider calls `broker.call('<addonId>.settings.<method>')`.
|
|
@@ -15823,46 +15822,27 @@ function discoverProviderMethods(provider) {
|
|
|
15823
15822
|
}
|
|
15824
15823
|
return methods;
|
|
15825
15824
|
}
|
|
15826
|
-
/** The four two-level settings method names on ICamstackAddon. */
|
|
15827
|
-
var SETTINGS_GETTERS = ["getGlobalSettings", "getDeviceSettings"];
|
|
15828
|
-
var SETTINGS_UPDATERS = ["updateGlobalSettings", "updateDeviceSettings"];
|
|
15829
15825
|
/**
|
|
15830
|
-
* Add `settings.
|
|
15831
|
-
*
|
|
15832
|
-
*
|
|
15826
|
+
* Add `settings.getDeviceSettings` and `settings.updateDeviceSettings` to the actions map for an
|
|
15827
|
+
* addon that implements them. An addon has no settings of its own (D986): there is no addon-level
|
|
15828
|
+
* action here.
|
|
15833
15829
|
*
|
|
15834
|
-
*
|
|
15835
|
-
*
|
|
15830
|
+
* The getter returns `ConfigUISchemaWithValues | null`; the updater returns `{ success: true }`
|
|
15831
|
+
* or throws.
|
|
15836
15832
|
*/
|
|
15837
15833
|
function addSettingsActions(addon, actions) {
|
|
15838
|
-
|
|
15839
|
-
|
|
15840
|
-
|
|
15841
|
-
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
|
|
15845
|
-
|
|
15846
|
-
|
|
15847
|
-
|
|
15848
|
-
|
|
15849
|
-
|
|
15850
|
-
}
|
|
15851
|
-
for (const methodName of SETTINGS_UPDATERS) {
|
|
15852
|
-
if (typeof addon[methodName] !== "function") continue;
|
|
15853
|
-
actions[`settings.${methodName}`] = { handler: async (ctx) => {
|
|
15854
|
-
const params = ctx.params ?? {};
|
|
15855
|
-
const patch = params.patch ?? {};
|
|
15856
|
-
if (methodName === "updateDeviceSettings") {
|
|
15857
|
-
const deviceId = params.deviceId;
|
|
15858
|
-
if (typeof deviceId !== "number") throw new Error(`settings.${methodName}: numeric deviceId is required`);
|
|
15859
|
-
await addon.updateDeviceSettings(deviceId, patch);
|
|
15860
|
-
return { success: true };
|
|
15861
|
-
}
|
|
15862
|
-
await addon[methodName](patch);
|
|
15863
|
-
return { success: true };
|
|
15864
|
-
} };
|
|
15865
|
-
}
|
|
15834
|
+
if (typeof addon.getDeviceSettings === "function") actions["settings.getDeviceSettings"] = { handler: async (ctx) => {
|
|
15835
|
+
const deviceId = (ctx.params ?? {}).deviceId;
|
|
15836
|
+
if (typeof deviceId !== "number") throw new Error("settings.getDeviceSettings: numeric deviceId is required");
|
|
15837
|
+
return await addon.getDeviceSettings(deviceId) ?? null;
|
|
15838
|
+
} };
|
|
15839
|
+
if (typeof addon.updateDeviceSettings === "function") actions["settings.updateDeviceSettings"] = { handler: async (ctx) => {
|
|
15840
|
+
const params = ctx.params ?? {};
|
|
15841
|
+
const deviceId = params.deviceId;
|
|
15842
|
+
if (typeof deviceId !== "number") throw new Error("settings.updateDeviceSettings: numeric deviceId is required");
|
|
15843
|
+
await addon.updateDeviceSettings(deviceId, params.patch ?? {});
|
|
15844
|
+
return { success: true };
|
|
15845
|
+
} };
|
|
15866
15846
|
}
|
|
15867
15847
|
//#endregion
|
|
15868
15848
|
//#region src/kernel/moleculer/core-cap-service.ts
|
|
@@ -24305,7 +24285,7 @@ async function buildAddonContext(runtime, declaration, dataDir, options) {
|
|
|
24305
24285
|
* to claim, and it was a leftover that read as verification.
|
|
24306
24286
|
* `BaseAddon.resolveConfig` reads THIS function through
|
|
24307
24287
|
* `ctx.settings.readAddonStore()`; the defaults it falls back to then become
|
|
24308
|
-
* the values the addon's next `
|
|
24288
|
+
* the values the addon's next `updateScopedSettings` patch carries into the
|
|
24309
24289
|
* store. That is how the Home Assistant export lost its membership on
|
|
24310
24290
|
* 2026-08-24 — see `brokerRefreshPatch` in the ha-export addon for the other
|
|
24311
24291
|
* half of that story. The line below is the only warning that this window is
|
|
@@ -26,9 +26,8 @@ type MethodResolver = (capabilityName: string) => readonly string[];
|
|
|
26
26
|
* 2. `methodResolver(capName)` from CapabilityRegistry definitions
|
|
27
27
|
* 3. Auto-discovery: enumerate own methods on the registered provider
|
|
28
28
|
*
|
|
29
|
-
* Additionally, the
|
|
30
|
-
* `
|
|
31
|
-
* are auto-exposed under a
|
|
29
|
+
* Additionally, the two device settings methods (`getDeviceSettings`,
|
|
30
|
+
* `updateDeviceSettings`) are auto-exposed under a
|
|
32
31
|
* `settings.*` namespace if the addon implements them. This replaces the
|
|
33
32
|
* former `$addonHost` Moleculer service — the hub's `addon-settings`
|
|
34
33
|
* singleton provider calls `broker.call('<addonId>.settings.<method>')`.
|
|
@@ -230,7 +230,7 @@ export interface ReadinessSnapshotResponse {
|
|
|
230
230
|
* - `routes` → the addon's `addon-routes` provider `getRoutes()` (handlers
|
|
231
231
|
* STRIPPED — MsgPack can't encode functions; the hub re-binds via `invoke`).
|
|
232
232
|
* - `custom` → the addon's custom-action handler (`action` + `args`).
|
|
233
|
-
* - `settings` → the addon's
|
|
233
|
+
* - `settings` → the addon's scoped/device settings methods (`method` names
|
|
234
234
|
* the entry; `args` carries the params). Mirrors the removed
|
|
235
235
|
* `<addonId>.settings.<method>` Moleculer action.
|
|
236
236
|
* - `data-planes` → the addon's live HTTP data-plane endpoints
|
|
@@ -239,7 +239,7 @@ export interface ReadinessSnapshotResponse {
|
|
|
239
239
|
*/
|
|
240
240
|
export type AddonCallTarget = "routes" | "custom" | "settings" | "data-planes";
|
|
241
241
|
/** The addon-settings methods reachable over the addon-call plane. */
|
|
242
|
-
export type AddonSettingsMethod = "
|
|
242
|
+
export type AddonSettingsMethod = "getScopedSettings" | "listScopedSettings" | "updateScopedSettings" | "readScopedValues" | "getIntegrationFormSchema" | "getDeviceSettings" | "updateDeviceSettings" | "getDeclaredSettingsKeys" | "unsetStoredSettingsKeys";
|
|
243
243
|
/**
|
|
244
244
|
* Parent → child: invoke an ADDON-LEVEL method on a loaded addon (not a cap).
|
|
245
245
|
* Carried as a correlated request frame (`channel.request`) — it returns a
|
|
@@ -107,7 +107,7 @@ export interface ParentUnownedCallDeps {
|
|
|
107
107
|
* internally — NOT a routing hint. For such caps the handler must NOT lift
|
|
108
108
|
* `args.nodeId` into a routing pin: pinning routes the call to a node with
|
|
109
109
|
* no provider for the cap (e.g. a forked addon on an agent calling
|
|
110
|
-
* `addon-settings.
|
|
110
|
+
* `addon-settings.getScopedSettings({addonId, cap, scope, nodeId})` gets pinned to
|
|
111
111
|
* `nodeId` → dead broker fallback → ServiceNotFoundError). Suppressing the
|
|
112
112
|
* pin forwards the call unpinned → singleton resolution on the hub — exactly
|
|
113
113
|
* how `settings-store` (no `nodeId` arg) already behaves. `args` pass
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fs as collectSecretMarkerRefs } from "./dist-CogtCQxu.mjs";
|
|
2
2
|
//#region src/builtins/sqlite-storage/migrations/legacy-integration-rows-door.ts
|
|
3
3
|
/**
|
|
4
4
|
* Migration-only door for the leftover integration rows (planning#416).
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Hs as defineRecordKinds, P as DATABASE_SNAPSHOT_SUFFIX, q as DataStoreDatabaseSchema } from "./dist-CogtCQxu.mjs";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { createCipheriv, createDecipheriv, createHash, createPrivateKey, createPublicKey, diffieHellman, generateKeyPairSync, hkdfSync, randomBytes } from "node:crypto";
|
|
4
4
|
import { Buffer as Buffer$1 } from "buffer";
|
|
Binary file
|
|
Binary file
|