@camstack/system 1.2.8 → 1.2.10
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/dist/addon-runner.js +6 -6
- package/dist/addon-runner.mjs +6 -6
- package/dist/addon-utils.js +1 -1
- package/dist/addon-utils.mjs +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
- package/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
- package/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
- package/dist/builtins/alerts/alerts.addon.js +1 -1
- package/dist/builtins/alerts/alerts.addon.mjs +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +1 -1
- package/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +1 -1
- package/dist/builtins/console-logging/index.js +1 -1
- package/dist/builtins/console-logging/index.mjs +1 -1
- package/dist/builtins/device-manager/device-manager.addon.js +1 -1
- package/dist/builtins/device-manager/device-manager.addon.mjs +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.js +1 -1
- package/dist/builtins/doorbell/virtual-doorbell.addon.mjs +1 -1
- package/dist/builtins/hub-forwarder/index.js +1 -1
- package/dist/builtins/hub-forwarder/index.mjs +1 -1
- package/dist/builtins/local-auth/local-auth.addon.js +1 -1
- package/dist/builtins/local-auth/local-auth.addon.mjs +1 -1
- package/dist/builtins/local-network/local-network.addon.js +1 -1
- package/dist/builtins/local-network/local-network.addon.mjs +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
- package/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
- package/dist/builtins/platform-probe/index.js +1 -1
- package/dist/builtins/platform-probe/index.mjs +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
- package/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
- package/dist/builtins/snapshot/index.js +29 -1
- package/dist/builtins/snapshot/index.mjs +29 -1
- package/dist/builtins/snapshot/snapshot.addon.d.ts +6 -0
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
- package/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.js +1 -1
- package/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +1 -1
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.d.ts +12 -0
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +48 -7
- package/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +48 -7
- package/dist/builtins/storage-orchestrator/storage-pressure-manager.d.ts +27 -0
- package/dist/builtins/system-config/system-config.addon.js +1 -1
- package/dist/builtins/system-config/system-config.addon.mjs +1 -1
- package/dist/builtins/winston-logging/index.js +1 -1
- package/dist/builtins/winston-logging/index.mjs +1 -1
- package/dist/{custom-action-registry-BEXwC-oo.mjs → custom-action-registry-F__gp_VX.mjs} +1 -1
- package/dist/{custom-action-registry-vLYEFTtv.js → custom-action-registry-jY0NOZK8.js} +1 -1
- package/dist/{dist-CdgScQ3H.js → dist-BQOCTD5b.js} +1664 -1434
- package/dist/{dist-CxM20CkF.mjs → dist-DpKeSZel.mjs} +1659 -1435
- package/dist/index.js +3 -3
- package/dist/index.mjs +3 -3
- package/dist/kernel/custom-action-registry.d.ts +3 -3
- package/dist/kernel/transport/child-cap-protocol.d.ts +11 -1
- package/dist/{manifest-python-deps-CUHn5wqq.js → manifest-python-deps-1I7WdPDD.js} +5 -3
- package/dist/{manifest-python-deps-CcW0WpfS.mjs → manifest-python-deps-I2MGvDvo.mjs} +5 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
3
|
-
const require_dist = require("./dist-
|
|
3
|
+
const require_dist = require("./dist-BQOCTD5b.js");
|
|
4
4
|
const require_model_download_service = require("./model-download-service-hf0ookyy.js");
|
|
5
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
5
|
+
const require_manifest_python_deps = require("./manifest-python-deps-1I7WdPDD.js");
|
|
6
6
|
const require_resource_monitor = require("./resource-monitor-DNNomR-i.js");
|
|
7
7
|
const require_builtins_sqlite_storage_filesystem_storage_addon = require("./builtins/sqlite-storage/filesystem-storage.addon.js");
|
|
8
8
|
const require_builtins_sqlite_storage_sqlite_settings_addon = require("./builtins/sqlite-storage/sqlite-settings.addon.js");
|
|
@@ -22,7 +22,7 @@ const require_builtins_local_auth_local_auth_addon = require("./builtins/local-a
|
|
|
22
22
|
require("./builtins/local-auth/index.js");
|
|
23
23
|
const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
|
|
24
24
|
require("./builtins/device-manager/index.js");
|
|
25
|
-
const require_custom_action_registry = require("./custom-action-registry-
|
|
25
|
+
const require_custom_action_registry = require("./custom-action-registry-jY0NOZK8.js");
|
|
26
26
|
let _camstack_types_node = require("@camstack/types/node");
|
|
27
27
|
let zod = require("zod");
|
|
28
28
|
let node_http = require("node:http");
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { B as looseSchema, Dt as readinessKey, Et as parseJsonUnknown$1, F as isVoidInput, I as kebabToCamel, L as lifecycleJobSchema, M as isArrayOutputSchema, N as isCollectionArrayMethod, Ot as resolveCapMount, P as isObjectInput, St as expandCapMethods, Tt as parseJsonObject, W as objectInputDeclaresAddonId, _t as asNumber, at as errMsg$1, bt as emitDownForOwnedCaps, c as RUNTIME_DEFAULTS, ct as DEVICE_SETTINGS_CONTRIBUTION_METHODS, gt as asJsonObject$1, jt as EventCategory$1, k as extractNestedAddonId, kt as scopeKey, lt as DEVICE_STATUS_METHOD, m as addonSettingsCapability, mt as ReadinessTimeoutError, pt as ReadinessRegistry, q as procedureAuthKey, s as METHOD_ACCESS_MAP, st as DATAPLANE_SECRET_HEADER$1, t as ALL_CAPABILITY_DEFINITIONS, vt as asString$1, yt as createEvent } from "./dist-DpKeSZel.mjs";
|
|
2
2
|
import { a as downloadModel, c as getModelFilePath, d as contentTypeFor, f as createAuthenticatedFileServer, h as resolveFilePath, i as downloadFile, l as isModelDownloaded, m as parseTokenizedUrl, n as collectModelFiles, o as ensureModel, p as parseRangeHeader, r as deleteModelFromDisk, s as fetchJson, t as ModelDownloadService, u as createFileDataPlaneHandler } from "./model-download-service-Cp9f4dk6.mjs";
|
|
3
|
-
import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as resolveAddonClass, D as localProviderLink, E as ipcParentLink, F as createUdsLogger, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, N as createUdsEventBus, O as HUB_CAP_FWD_ACTION, P as udsChildLogToWorkerEntry, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as runNpm, T as ipcChildLink, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, k as HUB_CAP_FWD_SERVICE, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveNpmInvocation, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-
|
|
3
|
+
import { $ as buildNativeCapProxy, A as createHubCapForwardService, B as AGENT_CAP_FWD_ACTION, C as brokerTransportLink, Ct as resolveAddonClass, D as localProviderLink, E as ipcParentLink, F as createUdsLogger, G as callWithServiceDiscovery, H as CapRouteResolver, I as createUdsLoggerWithControl, J as UdsLocalTransportServer, K as createLocalTransport, L as LocalChildClient, M as createUdsEventBridge, N as createUdsEventBus, O as HUB_CAP_FWD_ACTION, P as udsChildLogToWorkerEntry, Q as encodeFrame, R as LocalChildRegistry, S as brokerCallForCap, St as runNpm, T as ipcChildLink, U as CapRouteError, V as AGENT_CAP_FWD_SERVICE, W as classifyCapRoute, X as localEndpointPath, Y as SocketChannel, Z as FrameDecoder, _ as createKernelHwAccel, _t as CapabilityHandle, a as getWorkerDeviceRegistry, b as __resetCapUsageRegistryForTests, bt as installManifestNativeDeps, c as setHubConnected, ct as NATIVE_PROVIDER_SERVICE_INFIX, d as getBrokerEventBus, dt as capBareAction, et as buildUdsNativeCapProxy, f as getMoleculerEventStats, ft as capServiceName, g as AddonDepsManager, gt as DeviceRegistry, h as subscribePassthrough, ht as serializeTypedArrays, i as createUdsAddonContext, it as mountNativeCapService, j as createParentUnownedCallHandler, k as HUB_CAP_FWD_SERVICE, l as EVENT_TOPIC_PREFIX, lt as capActionName, m as setNodeEventInterest, mt as deserializeTypedArrays, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as createAddonService, p as registerEventBusService, pt as parseCapAction, q as UdsLocalTransportClient, r as createAddonContext, s as getOrInitReadinessRegistryForClient, st as validateProviderRegistrations, t as installManifestPythonDeps, tt as createBrokerDeviceManagerApi, u as clusterEventTopic, ut as capActionSuffix, v as resolveHwAccel, vt as CapabilityUnavailableError, w as buildLinkChain, wt as createAddonDataPlaneFacility, x as getCapUsageRegistry, xt as resolveNpmInvocation, y as CapUsageRegistry, yt as copyBundledNativeModules, z as UDS_NO_ROUTE_PREFIX } from "./manifest-python-deps-I2MGvDvo.mjs";
|
|
4
4
|
import { n as getSinglePidStats, t as getPidStats } from "./resource-monitor-Le3l0qS2.mjs";
|
|
5
5
|
import { FilesystemStorageAddon, t as FilesystemStorageProvider } from "./builtins/sqlite-storage/filesystem-storage.addon.mjs";
|
|
6
6
|
import { SqliteSettingsAddon, t as SqliteSettingsBackend } from "./builtins/sqlite-storage/sqlite-settings.addon.mjs";
|
|
@@ -20,7 +20,7 @@ import { LocalAuthAddon, a as require_ms, c as __esmMin, d as __toCommonJS, f as
|
|
|
20
20
|
import "./builtins/local-auth/index.mjs";
|
|
21
21
|
import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
22
22
|
import "./builtins/device-manager/index.mjs";
|
|
23
|
-
import { t as CustomActionRegistry } from "./custom-action-registry-
|
|
23
|
+
import { t as CustomActionRegistry } from "./custom-action-registry-F__gp_VX.mjs";
|
|
24
24
|
import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
25
25
|
import { z } from "zod";
|
|
26
26
|
import { request } from "node:http";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { CustomActionSpec, CustomActionsSpec } from '@camstack/types';
|
|
2
|
-
type Handler = (action: string, input: unknown) => Promise<unknown>;
|
|
1
|
+
import { CustomActionCaller, CustomActionSpec, CustomActionsSpec } from '@camstack/types';
|
|
2
|
+
type Handler = (action: string, input: unknown, caller?: CustomActionCaller) => Promise<unknown>;
|
|
3
3
|
export interface CustomActionEntry {
|
|
4
4
|
readonly spec: CustomActionSpec;
|
|
5
|
-
readonly handler: (input: unknown) => Promise<unknown>;
|
|
5
|
+
readonly handler: (input: unknown, caller?: CustomActionCaller) => Promise<unknown>;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* CustomActionRegistry — per-process registry of addon custom actions.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IReadinessRegistryRecord, LogLevel, LogTags, SystemEvent } from '@camstack/types';
|
|
1
|
+
import { CustomActionCaller, IReadinessRegistryRecord, LogLevel, LogTags, SystemEvent } from '@camstack/types';
|
|
2
2
|
/**
|
|
3
3
|
* Routing descriptor a child sends so the parent can route cap calls to it.
|
|
4
4
|
* The provider implementation never crosses the wire — only these keys do.
|
|
@@ -164,6 +164,16 @@ export interface AddonCallMessage {
|
|
|
164
164
|
readonly method?: AddonSettingsMethod;
|
|
165
165
|
/** Custom-action / settings input (already validated by the hub). */
|
|
166
166
|
readonly args?: unknown;
|
|
167
|
+
/**
|
|
168
|
+
* Authenticated caller, forwarded ONLY for a `target: 'custom'` action that
|
|
169
|
+
* declares `caller: 'required'`. Derived server-side from the request
|
|
170
|
+
* principal by the hub (never from client input); ABSENT for every other
|
|
171
|
+
* call. Additive on the wire: a legacy child that predates this field simply
|
|
172
|
+
* never reads it (its custom-action dispatch invokes the handler with input
|
|
173
|
+
* only), and a child that receives no `caller` sees `undefined` — identical
|
|
174
|
+
* to the pre-forwarding behaviour. See {@link CustomActionCaller}.
|
|
175
|
+
*/
|
|
176
|
+
readonly caller?: CustomActionCaller;
|
|
167
177
|
}
|
|
168
178
|
/**
|
|
169
179
|
* Parent → child: request to change the child's Moleculer log level.
|
|
@@ -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-BQOCTD5b.js");
|
|
3
3
|
let _camstack_types_node = require("@camstack/types/node");
|
|
4
4
|
let node_http = require("node:http");
|
|
5
5
|
let node_fs = require("node:fs");
|
|
@@ -4533,7 +4533,8 @@ var LocalChildRegistry = class {
|
|
|
4533
4533
|
target: input.target,
|
|
4534
4534
|
...input.action !== void 0 ? { action: input.action } : {},
|
|
4535
4535
|
...input.method !== void 0 ? { method: input.method } : {},
|
|
4536
|
-
...input.args !== void 0 ? { args: input.args } : {}
|
|
4536
|
+
...input.args !== void 0 ? { args: input.args } : {},
|
|
4537
|
+
...input.caller !== void 0 ? { caller: input.caller } : {}
|
|
4537
4538
|
};
|
|
4538
4539
|
}
|
|
4539
4540
|
/** Build the parent→child `cap-call` wire message from a routing input. */
|
|
@@ -4890,7 +4891,8 @@ var LocalChildClient = class {
|
|
|
4890
4891
|
target: msg.target,
|
|
4891
4892
|
...msg.action !== void 0 ? { action: msg.action } : {},
|
|
4892
4893
|
...msg.method !== void 0 ? { method: msg.method } : {},
|
|
4893
|
-
...msg.args !== void 0 ? { args: msg.args } : {}
|
|
4894
|
+
...msg.args !== void 0 ? { args: msg.args } : {},
|
|
4895
|
+
...msg.caller !== void 0 ? { caller: msg.caller } : {}
|
|
4894
4896
|
});
|
|
4895
4897
|
}
|
|
4896
4898
|
throw new Error(`unknown parent request kind: ${msg.kind}`);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as readNodePin } from "./dist-DpKeSZel.mjs";
|
|
2
2
|
import { ensureBinary, ensureFfmpeg, ensurePython, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
3
3
|
import { createServer } from "node:http";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -4531,7 +4531,8 @@ var LocalChildRegistry = class {
|
|
|
4531
4531
|
target: input.target,
|
|
4532
4532
|
...input.action !== void 0 ? { action: input.action } : {},
|
|
4533
4533
|
...input.method !== void 0 ? { method: input.method } : {},
|
|
4534
|
-
...input.args !== void 0 ? { args: input.args } : {}
|
|
4534
|
+
...input.args !== void 0 ? { args: input.args } : {},
|
|
4535
|
+
...input.caller !== void 0 ? { caller: input.caller } : {}
|
|
4535
4536
|
};
|
|
4536
4537
|
}
|
|
4537
4538
|
/** Build the parent→child `cap-call` wire message from a routing input. */
|
|
@@ -4888,7 +4889,8 @@ var LocalChildClient = class {
|
|
|
4888
4889
|
target: msg.target,
|
|
4889
4890
|
...msg.action !== void 0 ? { action: msg.action } : {},
|
|
4890
4891
|
...msg.method !== void 0 ? { method: msg.method } : {},
|
|
4891
|
-
...msg.args !== void 0 ? { args: msg.args } : {}
|
|
4892
|
+
...msg.args !== void 0 ? { args: msg.args } : {},
|
|
4893
|
+
...msg.caller !== void 0 ? { caller: msg.caller } : {}
|
|
4892
4894
|
});
|
|
4893
4895
|
}
|
|
4894
4896
|
throw new Error(`unknown parent request kind: ${msg.kind}`);
|