@camstack/server 1.2.897 → 1.2.898
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 +6 -0
- package/package.json +17 -10
- package/system/dist/addon-runner.js +103 -12
- package/system/dist/addon-runner.mjs +103 -12
- 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 +14 -11
- package/system/dist/builtins/composer/composer.addon.mjs +11 -8
- 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 +170 -14
- package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +169 -13
- package/system/dist/builtins/core-blocks/migrations/automation-confirmed-view.d.ts +23 -0
- package/system/dist/builtins/core-blocks/migrations/index.d.ts +1 -0
- package/system/dist/builtins/core-blocks/migrations/pump-cycle-split.d.ts +1 -0
- package/system/dist/builtins/device-history/device-history.addon.js +10 -9
- package/system/dist/builtins/device-history/device-history.addon.mjs +10 -9
- package/system/dist/builtins/device-manager/command-holds-wiring.d.ts +22 -0
- package/system/dist/builtins/device-manager/command-holds.d.ts +75 -0
- package/system/dist/builtins/device-manager/device-manager.addon.d.ts +2 -0
- package/system/dist/builtins/device-manager/device-manager.addon.js +381 -26
- package/system/dist/builtins/device-manager/device-manager.addon.mjs +378 -27
- package/system/dist/builtins/device-manager/device-state-mirror.d.ts +35 -9
- package/system/dist/builtins/hub-forwarder/index.js +1 -1
- package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/system/dist/builtins/keychain/index.js +4 -4
- package/system/dist/builtins/keychain/index.mjs +4 -4
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
- package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
- package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
- package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
- package/system/dist/builtins/local-network/local-network.addon.js +3 -3
- package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
- package/system/dist/builtins/loki-logging/index.js +1 -1
- package/system/dist/builtins/loki-logging/index.mjs +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/system/dist/builtins/platform-probe/index.js +1 -1
- package/system/dist/builtins/platform-probe/index.mjs +1 -1
- package/system/dist/builtins/record-entries/index.js +1 -1
- package/system/dist/builtins/record-entries/index.mjs +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/system/dist/builtins/shared/device-state-changed.d.ts +8 -0
- 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-D1rjl2dW.js → capture-engine-BWS0KTbm.js} +48 -1
- package/system/dist/{capture-engine-Bjgs__i9.mjs → capture-engine-DBQDaDxJ.mjs} +37 -2
- package/system/dist/{composition-sources-CF2-u58e.js → composition-sources-CDOW1dnY.js} +1 -32
- package/system/dist/{composition-sources-B727nlA0.mjs → composition-sources-CGUWmf-T.mjs} +2 -21
- package/system/dist/{constants-BF309c_I.mjs → constants-BmrLkwZs.mjs} +1 -1
- package/system/dist/{constants-DaR1SUh7.js → constants-BwrRoq-j.js} +1 -1
- package/system/dist/{device-ca-DT1hYtdW.mjs → device-ca-BGgZXEto.mjs} +1 -1
- package/system/dist/{device-ca-BqcX5_f2.js → device-ca-DiuwWyZY.js} +1 -1
- package/system/dist/{dist-BoEy9sm9.js → dist-CCd8IeIU.js} +685 -53
- package/system/dist/{dist-DorY_sjS.mjs → dist-D7t8wLTF.mjs} +674 -54
- package/system/dist/file-host-worker.js +1 -1
- package/system/dist/file-host-worker.mjs +1 -1
- package/system/dist/{hub-identity-CZ0nE3GK.mjs → hub-identity-BohJeqdO.mjs} +1 -1
- package/system/dist/{hub-identity-DH1rxUMD.js → hub-identity-G_ZdyPpc.js} +1 -1
- package/system/dist/{hub-mdns-ciao-N0nL34fx.js → hub-mdns-ciao-CKD4EgkG.js} +2 -2
- package/system/dist/{hub-mdns-ciao-7HK57Vtx.mjs → hub-mdns-ciao-D5RxSMrH.mjs} +2 -2
- package/system/dist/index.js +45 -13
- package/system/dist/index.mjs +46 -14
- package/system/dist/kernel/command-hold-overrides.d.ts +42 -0
- package/system/dist/kernel/moleculer/child-cap-descriptors.d.ts +3 -0
- package/system/dist/kernel/moleculer/device-cap-proxy.d.ts +2 -1
- package/system/dist/kernel/transport/child-cap-protocol.d.ts +6 -1
- package/system/dist/{legacy-integration-rows-door-BTfeULYt.js → legacy-integration-rows-door-BgCl68ek.js} +1 -1
- package/system/dist/{legacy-integration-rows-door-CdAQlIvv.mjs → legacy-integration-rows-door-Rm9JmIsl.mjs} +1 -1
- package/system/dist/{rename-composition-block-B1x-yK5U.js → rename-composition-block-2Z2ED7Og.js} +1 -1
- package/system/dist/{rename-composition-block-CIQjxBUa.mjs → rename-composition-block-DNO3mNEO.mjs} +1 -1
- package/system/dist/{restore-archive-Bj_gYmE9.mjs → restore-archive-2L5TymvF.mjs} +1 -1
- package/system/dist/{restore-archive-B086o8pL.js → restore-archive-CZkQO8t3.js} +1 -1
- package/system/dist/{wal-maintenance-Dgfmi-Ao.mjs → wal-maintenance-BMYe_n18.mjs} +0 -0
- package/system/dist/{wal-maintenance-MVIyxmu7.js → wal-maintenance-YjDJ73Qd.js} +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-YjDJ73Qd.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-BMYe_n18.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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _l as defineRecordKinds } from "./dist-D7t8wLTF.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-CCd8IeIU.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,7 +1,7 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-CCd8IeIU.js");
|
|
3
3
|
const require_x509_es = require("./x509.es-WtnRNyYS.js");
|
|
4
|
-
const require_hub_identity = require("./hub-identity-
|
|
4
|
+
const require_hub_identity = require("./hub-identity-G_ZdyPpc.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 { su as userError } from "./dist-D7t8wLTF.mjs";
|
|
3
3
|
import { f as X509Certificate$1 } from "./x509.es-BRiJgOvu.mjs";
|
|
4
|
-
import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-
|
|
4
|
+
import { A as evaluateExistingCert, C as localCaCommonName, F as isConstrainedCa, L as permitsIdentity, S as loadCa, b as generateCa, j as reasonRequiresNewCa, w as collectCertIdentity, x as issueLeaf, z as readNameConstraints } from "./hub-identity-BohJeqdO.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-CCd8IeIU.js");
|
|
4
|
+
const require_device_ca = require("./device-ca-DiuwWyZY.js");
|
|
5
5
|
const require_read_all_rows$1 = require("./read-all-rows-CVoO1ONM.js");
|
|
6
6
|
const require_log_redactor = require("./log-redactor-BhIEMaG9.js");
|
|
7
7
|
const require_builtins_alerts_alerts_addon = require("./builtins/alerts/alerts.addon.js");
|
|
@@ -28,22 +28,22 @@ const require_builtins_loki_logging_index = require("./builtins/loki-logging/ind
|
|
|
28
28
|
const require_builtins_native_metrics_native_metrics_addon = require("./builtins/native-metrics/native-metrics.addon.js");
|
|
29
29
|
const require_builtins_device_history_device_history_addon = require("./builtins/device-history/device-history.addon.js");
|
|
30
30
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
31
|
-
const require_wal_maintenance = require("./wal-maintenance-
|
|
32
|
-
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-
|
|
31
|
+
const require_wal_maintenance = require("./wal-maintenance-YjDJ73Qd.js");
|
|
32
|
+
const require_legacy_integration_rows_door = require("./legacy-integration-rows-door-BgCl68ek.js");
|
|
33
33
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
34
34
|
const require_builtins_sqlite_storage_index = require("./builtins/sqlite-storage/index.js");
|
|
35
35
|
const require_builtins_storage_orchestrator_storage_orchestrator_addon = require("./builtins/storage-orchestrator/storage-orchestrator.addon.js");
|
|
36
36
|
require("./builtins/storage-orchestrator/index.js");
|
|
37
|
-
const require_hub_identity = require("./hub-identity-
|
|
38
|
-
const require_constants = require("./constants-
|
|
37
|
+
const require_hub_identity = require("./hub-identity-G_ZdyPpc.js");
|
|
38
|
+
const require_constants = require("./constants-BwrRoq-j.js");
|
|
39
39
|
const require_builtins_system_config_system_config_addon = require("./builtins/system-config/system-config.addon.js");
|
|
40
40
|
require("./builtins/system-config/index.js");
|
|
41
41
|
const require_builtins_winston_logging_index = require("./builtins/winston-logging/index.js");
|
|
42
42
|
const require_custom_action_registry = require("./custom-action-registry-CmWpSeMS.js");
|
|
43
|
-
const require_hub_mdns_ciao = require("./hub-mdns-ciao-
|
|
43
|
+
const require_hub_mdns_ciao = require("./hub-mdns-ciao-CKD4EgkG.js");
|
|
44
44
|
const require_platform_key_source = require("./platform-key-source-Di7HrlGR.js");
|
|
45
45
|
const require_resource_monitor = require("./resource-monitor-mio9dSCT.js");
|
|
46
|
-
const require_restore_archive = require("./restore-archive-
|
|
46
|
+
const require_restore_archive = require("./restore-archive-CZkQO8t3.js");
|
|
47
47
|
const require_coral_accelerators = require("./coral-accelerators-BSVsBVzt.js");
|
|
48
48
|
let zod = require("zod");
|
|
49
49
|
let node_crypto = require("node:crypto");
|
|
@@ -14102,7 +14102,21 @@ var workerNativeCaps = /* @__PURE__ */ new Map();
|
|
|
14102
14102
|
* the pull-based discovery sweep.
|
|
14103
14103
|
*/
|
|
14104
14104
|
var workerNativeCapAddonIds = /* @__PURE__ */ new Map();
|
|
14105
|
+
/**
|
|
14106
|
+
* The command-hold options a provider stated at registration (D1061).
|
|
14107
|
+
* capName → deviceId → options. Carried on the child's cap descriptors so the
|
|
14108
|
+
* hub's hold reads them; absent = the core default.
|
|
14109
|
+
*/
|
|
14110
|
+
var workerNativeCapHolds = /* @__PURE__ */ new Map();
|
|
14105
14111
|
var mountedNativeCapServices = /* @__PURE__ */ new Set();
|
|
14112
|
+
/** A provider's hold options as plain data, or `undefined` when it stated none. */
|
|
14113
|
+
function commandHoldsOf(options) {
|
|
14114
|
+
const commands = options?.commands;
|
|
14115
|
+
if (commands === void 0) return void 0;
|
|
14116
|
+
const out = {};
|
|
14117
|
+
for (const [method, option] of Object.entries(commands)) if (option !== void 0) out[method] = option;
|
|
14118
|
+
return Object.keys(out).length === 0 ? void 0 : out;
|
|
14119
|
+
}
|
|
14106
14120
|
/**
|
|
14107
14121
|
* Optional change listener fired whenever the worker native-cap set mutates
|
|
14108
14122
|
* (a `registerNativeCap` adds a (cap, device) pair, or a device is cleared).
|
|
@@ -14358,7 +14372,8 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14358
14372
|
get devices() {
|
|
14359
14373
|
return selfApi;
|
|
14360
14374
|
},
|
|
14361
|
-
registerNativeCap(cap, provider) {
|
|
14375
|
+
registerNativeCap(cap, provider, options) {
|
|
14376
|
+
const commandHolds = commandHoldsOf(options);
|
|
14362
14377
|
if (cap.runtimeState && runtimeStateRef) try {
|
|
14363
14378
|
runtimeStateRef.installCapSchema(cap.name, cap.runtimeState);
|
|
14364
14379
|
} catch (err) {
|
|
@@ -14391,8 +14406,15 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14391
14406
|
readSlice: () => runtimeStateRef?.getCapState("switch"),
|
|
14392
14407
|
logger: opts.logger
|
|
14393
14408
|
});
|
|
14394
|
-
if (opts.capabilityRegistry)
|
|
14395
|
-
|
|
14409
|
+
if (opts.capabilityRegistry) {
|
|
14410
|
+
opts.capabilityRegistry.registerNativeProvider(cap.name, id, addonId, finalProvider);
|
|
14411
|
+
if (commandHolds !== void 0) require_builtins_device_manager_device_manager_addon.getCommandHoldOverrideRegistry().set(require_builtins_device_manager_device_manager_addon.IN_PROCESS_HOLD_SOURCE, {
|
|
14412
|
+
deviceId: id,
|
|
14413
|
+
capName: cap.name,
|
|
14414
|
+
commands: commandHolds
|
|
14415
|
+
});
|
|
14416
|
+
else require_builtins_device_manager_device_manager_addon.getCommandHoldOverrideRegistry().delete(require_builtins_device_manager_device_manager_addon.IN_PROCESS_HOLD_SOURCE, id, cap.name);
|
|
14417
|
+
} else if (opts.broker || opts.udsMode) {
|
|
14396
14418
|
let perCap = workerNativeCaps.get(cap.name);
|
|
14397
14419
|
if (!perCap) {
|
|
14398
14420
|
perCap = /* @__PURE__ */ new Map();
|
|
@@ -14405,6 +14427,11 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14405
14427
|
workerNativeCapAddonIds.set(cap.name, perAddonId);
|
|
14406
14428
|
}
|
|
14407
14429
|
perAddonId.set(id, addonId);
|
|
14430
|
+
if (commandHolds !== void 0) {
|
|
14431
|
+
const perHolds = workerNativeCapHolds.get(cap.name) ?? /* @__PURE__ */ new Map();
|
|
14432
|
+
perHolds.set(id, commandHolds);
|
|
14433
|
+
workerNativeCapHolds.set(cap.name, perHolds);
|
|
14434
|
+
} else workerNativeCapHolds.get(cap.name)?.delete(id);
|
|
14408
14435
|
if (opts.broker) mountNativeCapService(opts.broker, addonId, cap);
|
|
14409
14436
|
onWorkerNativeCapsChanged?.();
|
|
14410
14437
|
} else throw new Error(`DeviceContext.registerNativeCap('${cap.name}') called on '${stableId}' but none of capabilityRegistry / broker / udsMode was provided.`);
|
|
@@ -14458,10 +14485,13 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14458
14485
|
},
|
|
14459
14486
|
meta: { capName }
|
|
14460
14487
|
});
|
|
14461
|
-
else if (opts.capabilityRegistry)
|
|
14462
|
-
|
|
14488
|
+
else if (opts.capabilityRegistry) {
|
|
14489
|
+
opts.capabilityRegistry.unregisterNativeProvider(capName, id);
|
|
14490
|
+
require_builtins_device_manager_device_manager_addon.getCommandHoldOverrideRegistry().delete(require_builtins_device_manager_device_manager_addon.IN_PROCESS_HOLD_SOURCE, id, capName);
|
|
14491
|
+
} else {
|
|
14463
14492
|
workerNativeCaps.get(capName)?.delete(id);
|
|
14464
14493
|
workerNativeCapAddonIds.get(capName)?.delete(id);
|
|
14494
|
+
workerNativeCapHolds.get(capName)?.delete(id);
|
|
14465
14495
|
onWorkerNativeCapsChanged?.();
|
|
14466
14496
|
}
|
|
14467
14497
|
eventBus.emit({
|
|
@@ -18980,6 +19010,7 @@ var LocalChildRegistry = class {
|
|
|
18980
19010
|
rawForward: msg.rawForward === true
|
|
18981
19011
|
});
|
|
18982
19012
|
this.invalidateCapIndex();
|
|
19013
|
+
require_builtins_device_manager_device_manager_addon.getCommandHoldOverrideRegistry().replaceSource(require_builtins_device_manager_device_manager_addon.childHoldSource(msg.childId), require_builtins_device_manager_device_manager_addon.childCommandHoldEntries(msg.caps));
|
|
18983
19014
|
this.logPatternSet(msg.childId, eventPatterns);
|
|
18984
19015
|
this.lastInterestKey.delete(msg.childId);
|
|
18985
19016
|
this.refreshEventInterest();
|
|
@@ -19094,6 +19125,7 @@ var LocalChildRegistry = class {
|
|
|
19094
19125
|
}
|
|
19095
19126
|
this.children.delete(childId);
|
|
19096
19127
|
this.invalidateCapIndex();
|
|
19128
|
+
require_builtins_device_manager_device_manager_addon.getCommandHoldOverrideRegistry().replaceSource(require_builtins_device_manager_device_manager_addon.childHoldSource(childId), []);
|
|
19097
19129
|
this.childEventStats.delete(childId);
|
|
19098
19130
|
this.lastInterestKey.delete(childId);
|
|
19099
19131
|
this.refreshEventInterest();
|
package/system/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as __require } from "./chunk-CNf5ZN-e.mjs";
|
|
2
|
-
import { $c as
|
|
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 { $c as asJsonObject$1, $i as lifecycleJobSchema, $l as scopeKey, Ai as isAddonInstanceId, Cl as getDebugInterest, Da as objectInputDeclaresAddonId, Fn as addonSettingsCapability, Ga as procedureAuthKey, Gi as isVoidInput, Gl as parseJsonObject, Gn as bareAddonId, Ic as RUNTIME_DEFAULTS, Ii as isCollectionArrayMethod, Jl as readinessKey, Kl as parseJsonUnknown, Lc as ReadinessRegistry, Mo as scopesAllowAddon, Mt as LOG_LEVEL_RANK, No as scopesAllowDeviceCap, Oa as objectInputDeclaresRequiredDeviceId, Ol as isDebugChannelName, Pi as isArrayOutputSchema, Pt as METHOD_ACCESS_MAP, Rc as ReadinessTimeoutError, Rr as describeUnmet, S as CATALOG_LANGS, Ui as isObjectInput, Xl as resolveCapMount, _c as CALLER_STAMPED_CAPABILITIES$1, _l as defineRecordKinds, _u as EventCategory$1, a as AGENT_MDNS_SERVICE_TYPE, ai as extractNestedAddonId, bc as DEVICE_STATUS_METHOD, cl as collectSecretMarkerRefs, el as asNumber, fl as createEvent$1, hs as unmetRequirements, hu as errMsg$1, k as CatalogFileSchema, ki as interpolate, ns as supportedRuntimes, o as AGENT_MDNS_TXT_KEYS, oa as logLevelAtMost, pr as compareVersions, qi as kebabToCamel$1, qo as splitTranslationRef, qt as PackageRequiresSchema, s as ALL_CAPABILITY_DEFINITIONS, sa as looseSchema, su as userError, tl as asString$1, uu as withoutCallerStamp, vc as DATAPLANE_SECRET_HEADER$1, vl as emitDownForOwnedCaps, xl as expandCapMethods, yc as DEVICE_SETTINGS_CONTRIBUTION_METHODS, yo as resolveMethodAuth } from "./dist-D7t8wLTF.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-BGgZXEto.mjs";
|
|
4
4
|
import { t as require_read_all_rows } from "./read-all-rows-TaPqdWNF.mjs";
|
|
5
5
|
import { a as redactLogText, i as redactLogMeta, r as redactLogEntry, t as isCredentialKeyName } from "./log-redactor-XLDrPzOi.mjs";
|
|
6
6
|
import { AlertCenterAddon, n as lastCauseAfterChunk, r as readRunnerDisplayName, t as CRASH_BREAKER_ERROR_PREFIX } from "./builtins/alerts/alerts.addon.mjs";
|
|
@@ -15,7 +15,7 @@ import { t as loadPrefixed } from "./prefix-walk-DAOBSyH1.mjs";
|
|
|
15
15
|
import { n as readCurrentCommandOrigin, r as runWithCapCallContext, t as currentCapCallContext } from "./cap-call-scope-Bic6Ekfw.mjs";
|
|
16
16
|
import { CoreBlocksAddon, c as readUnscopedAddonSettings, o as clearNodeSettings, s as createAddonSettingsStore } from "./builtins/core-blocks/core-blocks.addon.mjs";
|
|
17
17
|
import "./builtins/core-blocks/index.mjs";
|
|
18
|
-
import { DeviceManagerAddon, a as
|
|
18
|
+
import { DeviceManagerAddon, a as CommandObserverRegistry, c as commandActorFromContext, d as reportCommand, f as runObservedCommand, g as setWrapperActive, h as readDeviceOrThrow, i as getCommandHoldOverrideRegistry, l as commandObserverLink, m as createDeviceSettingsStore, n as childCommandHoldEntries, o as __resetCommandObserverRegistryForTests, p as observable, r as childHoldSource, s as addonCommandActor, t as IN_PROCESS_HOLD_SOURCE, u as getCommandObserverRegistry } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
19
19
|
import "./builtins/device-manager/index.mjs";
|
|
20
20
|
import { HubForwarderAddon, HubForwarderDestination } from "./builtins/hub-forwarder/index.mjs";
|
|
21
21
|
import { LivenessMonitorAddon } from "./builtins/liveness-monitor/liveness-monitor.addon.mjs";
|
|
@@ -27,22 +27,22 @@ import { LokiDestination, LokiLoggingAddon } from "./builtins/loki-logging/index
|
|
|
27
27
|
import NativeMetricsAddon, { a as NativeMetricsProvider, i as parseProcStatusRss, n as nodeProcReader, r as parseProcStat } from "./builtins/native-metrics/native-metrics.addon.mjs";
|
|
28
28
|
import { DeviceHistoryAddon } from "./builtins/device-history/device-history.addon.mjs";
|
|
29
29
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
30
|
-
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-
|
|
31
|
-
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-
|
|
30
|
+
import { D as RecordsEngine, l as SqliteSettingsBackend } from "./wal-maintenance-BMYe_n18.mjs";
|
|
31
|
+
import { n as clearLegacyIntegrationRows, o as readLegacyIntegrationRows } from "./legacy-integration-rows-door-Rm9JmIsl.mjs";
|
|
32
32
|
import { SqliteSettingsAddon } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
33
33
|
import { ConfigStore, DeviceStore } from "./builtins/sqlite-storage/index.mjs";
|
|
34
34
|
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";
|
|
35
35
|
import "./builtins/storage-orchestrator/index.mjs";
|
|
36
|
-
import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-
|
|
37
|
-
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-
|
|
36
|
+
import { A as evaluateExistingCert, B as AGENT_HTTPS_NAMES_COLLECTION, C as localCaCommonName, D as LEAF_RENEWAL_WINDOW_DAYS, E as CA_VALIDITY_DAYS, F as isConstrainedCa, H as AgentHttpsNames, I as isLocalOnlyHostname, L as permitsIdentity, M as PERMITTED_DNS_SUFFIXES, N as PERMITTED_IP_RANGES, O as MAX_LEAF_VALIDITY_DAYS, P as buildNameConstraintSet, R as permitsName, T as systemHostFacts, U as getProcessAgentHttpsNames, V as AGENT_HTTPS_NAMES_COLUMNS, W as setProcessAgentHttpsNames, _ as pemDigest, a as AgentHttpsInstallError, c as certificateNames, d as describeHttpsLeaf, f as installAgentHttps, g as loadAgentHttps, h as issueAgentHttpsLeaf, i as loadOrCreateHubId, k as SERVER_AUTH_OID, l as collectAgentNames, m as isPrivateAddress, n as HUB_IDENTITY_RELATIVE, o as acceptAgentSans, p as isContainerBridgeAddress, r as isAnnouncedHubId, s as agentHttpsPaths, t as HUB_IDENTITY_FILE, u as createAgentHttpsRequest, v as pinnedHttpsCaFingerprint, w as collectCertIdentity, y as CA_COMMON_NAME, z as readNameConstraints } from "./hub-identity-BohJeqdO.mjs";
|
|
37
|
+
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-BmrLkwZs.mjs";
|
|
38
38
|
import { $ as getProcessMeshCaState, A as emitProcessNodeRegistered, At as readCidrSetting, B as getProcessMeshTlsListenerState, C as verifyMembershipAnswer, Ct as isInsecureOrigin, D as ServiceBroker, Dt as createCidrMatcher, E as Errors, Et as readOriginSetting, F as onProcessNodeRegistered, G as MeshCertificateRegistry, H as setProcessMeshTlsListenerState, I as setProcessMeshHandshakeReporter, J as getProcessMeshCertificateRegistry, K as RENEWAL_ABANDONED, L as setProcessMeshPeerTransportLookup, M as getProcessNodeMeshTransport, N as getProcessPeerLeaf, O as setProcessMeshTlsEnabler, Ot as normalizeIp, P as isProcessVerifiedMeshPeer, Q as MeshCaKeeper, R as renewMeshCertificate, S as signMembershipProof, St as OPAQUE_ORIGIN, SystemConfigAddon, T as TlsTcpTransporter, Tt as parseOriginList, U as MESH_NODE_CERTIFICATES_COLLECTION, V as openMeshTlsWhenRevocationsLoaded, W as MESH_NODE_CERTIFICATES_COLUMNS, X as MeshCrl, Y as setProcessMeshCertificateRegistry, Z as processMeshCrl, _ as keyFingerprintShort, _t as isAllowedAgentDashboardReturnTo, a as dialableHubHost, at as generateMeshCa, b as MEMBERSHIP_PATHS, bt as verifyAgentUiUnlockTicket, c as PAIRING_MAX_CODE_ATTEMPTS, ct as issueMeshLeafForNode, d as PAIRING_PIN_DIGITS, dt as AGENT_DASHBOARD_ORIGINS_FIELD, et as requireProcessMeshCa, f as PAIRING_PROTOCOL, ft as AGENT_UI_UNLOCK_TTL_MS, g as describeCsr, gt as UnlockTicketJtiStore, h as computePairingSas, ht as AGENT_UI_UNLOCK_VERSION, i as AgentPairing, it as exportMeshPrivateKeyPem, j as getProcessMeshHandshakeReporter, k as dropProcessPeer, kt as parseCidrList, l as PAIRING_MAX_SESSIONS, lt as issueMeshLeafFromCsr, m as computePairingCommitment, mt as AGENT_UI_UNLOCK_USE, n as HubPairing, nt as caFingerprintCompact, o as hubHostFromMeshAddress, ot as generateMeshKeyPair, p as PAIRING_TTL_MS, pt as AGENT_UI_UNLOCK_TYP, q as describeMeshLeaf, r as PairingHttpError, rt as createMeshCsrPem, s as PAIRING_CODE_DIGITS, st as isValidAgentNodeId, tt as caFingerprint, u as PAIRING_PATHS, ut as loadMeshCa, v as signPairingProof, vt as mintAgentUiUnlockTicket, w as MESH_TLS_PORT_HELLO_FIELD, wt as normalizeOrigin, x as MembershipResponder, xt as InvalidCorsOriginError, y as verifyPairingProof, yt as parseAgentDashboardOrigins, z as revokeMeshCertificate } from "./builtins/system-config/system-config.addon.mjs";
|
|
39
39
|
import "./builtins/system-config/index.mjs";
|
|
40
40
|
import { WinstonDestination, WinstonLoggingAddon } from "./builtins/winston-logging/index.mjs";
|
|
41
41
|
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";
|
|
42
|
-
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-
|
|
42
|
+
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-D5RxSMrH.mjs";
|
|
43
43
|
import { n as getPlatformKeychainKey, r as setPlatformKeychainKey, t as clearPlatformKeychainKey } from "./platform-key-source-BWlq0jjn.mjs";
|
|
44
44
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Di9daRwI.mjs";
|
|
45
|
-
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-
|
|
45
|
+
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-2L5TymvF.mjs";
|
|
46
46
|
import { r as nodeCoralFs, t as classifyCoralAccelerator } from "./coral-accelerators-DBlgWB8k.mjs";
|
|
47
47
|
import { z } from "zod";
|
|
48
48
|
import * as crypto$1 from "node:crypto";
|
|
@@ -14098,7 +14098,21 @@ var workerNativeCaps = /* @__PURE__ */ new Map();
|
|
|
14098
14098
|
* the pull-based discovery sweep.
|
|
14099
14099
|
*/
|
|
14100
14100
|
var workerNativeCapAddonIds = /* @__PURE__ */ new Map();
|
|
14101
|
+
/**
|
|
14102
|
+
* The command-hold options a provider stated at registration (D1061).
|
|
14103
|
+
* capName → deviceId → options. Carried on the child's cap descriptors so the
|
|
14104
|
+
* hub's hold reads them; absent = the core default.
|
|
14105
|
+
*/
|
|
14106
|
+
var workerNativeCapHolds = /* @__PURE__ */ new Map();
|
|
14101
14107
|
var mountedNativeCapServices = /* @__PURE__ */ new Set();
|
|
14108
|
+
/** A provider's hold options as plain data, or `undefined` when it stated none. */
|
|
14109
|
+
function commandHoldsOf(options) {
|
|
14110
|
+
const commands = options?.commands;
|
|
14111
|
+
if (commands === void 0) return void 0;
|
|
14112
|
+
const out = {};
|
|
14113
|
+
for (const [method, option] of Object.entries(commands)) if (option !== void 0) out[method] = option;
|
|
14114
|
+
return Object.keys(out).length === 0 ? void 0 : out;
|
|
14115
|
+
}
|
|
14102
14116
|
/**
|
|
14103
14117
|
* Optional change listener fired whenever the worker native-cap set mutates
|
|
14104
14118
|
* (a `registerNativeCap` adds a (cap, device) pair, or a device is cleared).
|
|
@@ -14354,7 +14368,8 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14354
14368
|
get devices() {
|
|
14355
14369
|
return selfApi;
|
|
14356
14370
|
},
|
|
14357
|
-
registerNativeCap(cap, provider) {
|
|
14371
|
+
registerNativeCap(cap, provider, options) {
|
|
14372
|
+
const commandHolds = commandHoldsOf(options);
|
|
14358
14373
|
if (cap.runtimeState && runtimeStateRef) try {
|
|
14359
14374
|
runtimeStateRef.installCapSchema(cap.name, cap.runtimeState);
|
|
14360
14375
|
} catch (err) {
|
|
@@ -14387,8 +14402,15 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14387
14402
|
readSlice: () => runtimeStateRef?.getCapState("switch"),
|
|
14388
14403
|
logger: opts.logger
|
|
14389
14404
|
});
|
|
14390
|
-
if (opts.capabilityRegistry)
|
|
14391
|
-
|
|
14405
|
+
if (opts.capabilityRegistry) {
|
|
14406
|
+
opts.capabilityRegistry.registerNativeProvider(cap.name, id, addonId, finalProvider);
|
|
14407
|
+
if (commandHolds !== void 0) getCommandHoldOverrideRegistry().set(IN_PROCESS_HOLD_SOURCE, {
|
|
14408
|
+
deviceId: id,
|
|
14409
|
+
capName: cap.name,
|
|
14410
|
+
commands: commandHolds
|
|
14411
|
+
});
|
|
14412
|
+
else getCommandHoldOverrideRegistry().delete(IN_PROCESS_HOLD_SOURCE, id, cap.name);
|
|
14413
|
+
} else if (opts.broker || opts.udsMode) {
|
|
14392
14414
|
let perCap = workerNativeCaps.get(cap.name);
|
|
14393
14415
|
if (!perCap) {
|
|
14394
14416
|
perCap = /* @__PURE__ */ new Map();
|
|
@@ -14401,6 +14423,11 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14401
14423
|
workerNativeCapAddonIds.set(cap.name, perAddonId);
|
|
14402
14424
|
}
|
|
14403
14425
|
perAddonId.set(id, addonId);
|
|
14426
|
+
if (commandHolds !== void 0) {
|
|
14427
|
+
const perHolds = workerNativeCapHolds.get(cap.name) ?? /* @__PURE__ */ new Map();
|
|
14428
|
+
perHolds.set(id, commandHolds);
|
|
14429
|
+
workerNativeCapHolds.set(cap.name, perHolds);
|
|
14430
|
+
} else workerNativeCapHolds.get(cap.name)?.delete(id);
|
|
14404
14431
|
if (opts.broker) mountNativeCapService(opts.broker, addonId, cap);
|
|
14405
14432
|
onWorkerNativeCapsChanged?.();
|
|
14406
14433
|
} else throw new Error(`DeviceContext.registerNativeCap('${cap.name}') called on '${stableId}' but none of capabilityRegistry / broker / udsMode was provided.`);
|
|
@@ -14454,10 +14481,13 @@ function createBrokerDeviceManagerApi(opts) {
|
|
|
14454
14481
|
},
|
|
14455
14482
|
meta: { capName }
|
|
14456
14483
|
});
|
|
14457
|
-
else if (opts.capabilityRegistry)
|
|
14458
|
-
|
|
14484
|
+
else if (opts.capabilityRegistry) {
|
|
14485
|
+
opts.capabilityRegistry.unregisterNativeProvider(capName, id);
|
|
14486
|
+
getCommandHoldOverrideRegistry().delete(IN_PROCESS_HOLD_SOURCE, id, capName);
|
|
14487
|
+
} else {
|
|
14459
14488
|
workerNativeCaps.get(capName)?.delete(id);
|
|
14460
14489
|
workerNativeCapAddonIds.get(capName)?.delete(id);
|
|
14490
|
+
workerNativeCapHolds.get(capName)?.delete(id);
|
|
14461
14491
|
onWorkerNativeCapsChanged?.();
|
|
14462
14492
|
}
|
|
14463
14493
|
eventBus.emit({
|
|
@@ -18976,6 +19006,7 @@ var LocalChildRegistry = class {
|
|
|
18976
19006
|
rawForward: msg.rawForward === true
|
|
18977
19007
|
});
|
|
18978
19008
|
this.invalidateCapIndex();
|
|
19009
|
+
getCommandHoldOverrideRegistry().replaceSource(childHoldSource(msg.childId), childCommandHoldEntries(msg.caps));
|
|
18979
19010
|
this.logPatternSet(msg.childId, eventPatterns);
|
|
18980
19011
|
this.lastInterestKey.delete(msg.childId);
|
|
18981
19012
|
this.refreshEventInterest();
|
|
@@ -19090,6 +19121,7 @@ var LocalChildRegistry = class {
|
|
|
19090
19121
|
}
|
|
19091
19122
|
this.children.delete(childId);
|
|
19092
19123
|
this.invalidateCapIndex();
|
|
19124
|
+
getCommandHoldOverrideRegistry().replaceSource(childHoldSource(childId), []);
|
|
19093
19125
|
this.childEventStats.delete(childId);
|
|
19094
19126
|
this.lastInterestKey.delete(childId);
|
|
19095
19127
|
this.refreshEventInterest();
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The providers' command-hold options (D1061), as the hub process knows them.
|
|
3
|
+
*
|
|
4
|
+
* A provider states its options where it registers a device's native cap
|
|
5
|
+
* (`ctx.registerNativeCap(cap, provider, { commands })`). They reach this
|
|
6
|
+
* registry by the same road the registration does: an in-process registration
|
|
7
|
+
* writes here directly (source `in-process`), a forked child carries them on its
|
|
8
|
+
* cap descriptors and the UDS parent replaces the child's whole set on every
|
|
9
|
+
* register frame and drops it when the child goes (source `child:<id>`). The
|
|
10
|
+
* device-manager's hold reads them; absent = the core default.
|
|
11
|
+
*
|
|
12
|
+
* Memory only, like the holds themselves: a restart re-registers every cap.
|
|
13
|
+
*/
|
|
14
|
+
import type { CommandHoldOptions } from "@camstack/types";
|
|
15
|
+
import type { ChildCapDescriptor } from "./transport/child-cap-protocol.js";
|
|
16
|
+
/** One device cap's options, as a source reports them. */
|
|
17
|
+
export interface CommandHoldOverrideEntry {
|
|
18
|
+
readonly deviceId: number;
|
|
19
|
+
readonly capName: string;
|
|
20
|
+
readonly commands: CommandHoldOptions;
|
|
21
|
+
}
|
|
22
|
+
/** The source key of an in-process registration. */
|
|
23
|
+
export declare const IN_PROCESS_HOLD_SOURCE = "in-process";
|
|
24
|
+
/** The source key of a forked child's registrations. */
|
|
25
|
+
export declare function childHoldSource(childId: string): string;
|
|
26
|
+
/** The options a child's cap descriptors carry, one entry per device cap. */
|
|
27
|
+
export declare function childCommandHoldEntries(caps: readonly ChildCapDescriptor[]): CommandHoldOverrideEntry[];
|
|
28
|
+
export declare class CommandHoldOverrideRegistry {
|
|
29
|
+
private readonly bySource;
|
|
30
|
+
/** Record (or replace) one device cap's options from `source`. */
|
|
31
|
+
set(source: string, entry: CommandHoldOverrideEntry): void;
|
|
32
|
+
/** Forget one device cap's options from `source`. */
|
|
33
|
+
delete(source: string, deviceId: number, capName: string): void;
|
|
34
|
+
/** Replace everything `source` reported with `entries` (an empty list forgets the source). */
|
|
35
|
+
replaceSource(source: string, entries: readonly CommandHoldOverrideEntry[]): void;
|
|
36
|
+
/** The options for a device cap, from whichever source registered it; `undefined` = default. */
|
|
37
|
+
get(deviceId: number, capName: string): CommandHoldOptions | undefined;
|
|
38
|
+
}
|
|
39
|
+
/** The process-wide registry. */
|
|
40
|
+
export declare function getCommandHoldOverrideRegistry(): CommandHoldOverrideRegistry;
|
|
41
|
+
/** Test seam: forget every option. */
|
|
42
|
+
export declare function __resetCommandHoldOverrideRegistryForTests(): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CommandHoldOptions } from "@camstack/types";
|
|
1
2
|
import type { ChildCapDescriptor } from "../transport/child-cap-protocol.js";
|
|
2
3
|
/** One hosted addon's contribution to the runner UNION manifest. */
|
|
3
4
|
export interface RunnerManifestEntry {
|
|
@@ -9,6 +10,8 @@ export interface NativeCapSnapshotEntry {
|
|
|
9
10
|
readonly capName: string;
|
|
10
11
|
readonly addonId: string;
|
|
11
12
|
readonly deviceIds: readonly number[];
|
|
13
|
+
/** The hold options per device that stated any (D1061). */
|
|
14
|
+
readonly commandHolds?: ReadonlyMap<number, CommandHoldOptions>;
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
14
17
|
* Builds the {@link ChildCapDescriptor} array that the UDS child transport
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AddonApi, CapabilityDefinition, DeviceManagerApi, IDevice, IEventBus, IKernelStreamProbe, InferProvider, IScopedLogger } from "@camstack/types";
|
|
1
|
+
import type { AddonApi, CapabilityDefinition, CommandHoldOptions, DeviceManagerApi, IDevice, IEventBus, IKernelStreamProbe, InferProvider, IScopedLogger } from "@camstack/types";
|
|
2
2
|
import { deviceOpsCapability } from "@camstack/types/addon";
|
|
3
3
|
import type { ServiceBroker } from "moleculer";
|
|
4
4
|
import type { CapabilityRegistry } from "../capability-registry.js";
|
|
@@ -50,6 +50,7 @@ export declare function getWorkerNativeCapSnapshot(): ReadonlyArray<{
|
|
|
50
50
|
readonly capName: string;
|
|
51
51
|
readonly addonId: string;
|
|
52
52
|
readonly deviceIds: readonly number[];
|
|
53
|
+
readonly commandHolds?: ReadonlyMap<number, CommandHoldOptions>;
|
|
53
54
|
}>;
|
|
54
55
|
export declare function getWorkerNativeCapsForDevice(deviceId: number): readonly string[];
|
|
55
56
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChildCustomActionCatalogs, CommandOriginClaim, CustomActionCaller, IReadinessRegistryRecord, LogLevel, LogTags, SystemEvent } from "@camstack/types";
|
|
1
|
+
import type { ChildCustomActionCatalogs, CommandHoldOptions, CommandOriginClaim, CustomActionCaller, IReadinessRegistryRecord, LogLevel, LogTags, SystemEvent } from "@camstack/types";
|
|
2
2
|
import type { CapRoutingHints } from "./cap-routing-hints.js";
|
|
3
3
|
/**
|
|
4
4
|
* Routing descriptor a child sends so the parent can route cap calls to it.
|
|
@@ -20,6 +20,11 @@ export interface ChildCapDescriptor {
|
|
|
20
20
|
* back to the childId (identical to the historical single-addon behaviour).
|
|
21
21
|
*/
|
|
22
22
|
readonly addonId?: string;
|
|
23
|
+
/**
|
|
24
|
+
* The command-hold options the provider stated for this device cap (D1061),
|
|
25
|
+
* per method. OPTIONAL: absent = the core default (and a legacy child).
|
|
26
|
+
*/
|
|
27
|
+
readonly commandHolds?: CommandHoldOptions;
|
|
23
28
|
}
|
|
24
29
|
/** First message a child sends after connecting — its complete cap manifest. */
|
|
25
30
|
export interface RegisterMessage {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { cl as collectSecretMarkerRefs } from "./dist-D7t8wLTF.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).
|
package/system/dist/{rename-composition-block-CIQjxBUa.mjs → rename-composition-block-DNO3mNEO.mjs}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { du as COMPOSED_DEVICE_STABLE_ID_PREFIX, hu as errMsg } from "./dist-D7t8wLTF.mjs";
|
|
2
2
|
//#region src/builtins/core-blocks/rename-composition-block.ts
|
|
3
3
|
/**
|
|
4
4
|
* An operator rename of a composed device writes the composition block's
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as DATABASE_SNAPSHOT_SUFFIX,
|
|
1
|
+
import { F as DATABASE_SNAPSHOT_SUFFIX, _l as defineRecordKinds, et as DataStoreDatabaseSchema } from "./dist-D7t8wLTF.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
|