@camstack/system 1.1.16 → 1.1.17
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 +1 -1
- package/dist/addon-runner.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/kernel/transport/parent-unowned-call.d.ts +18 -0
- package/dist/{manifest-python-deps-D-mT3V97.mjs → manifest-python-deps-DOAh19rY.mjs} +4 -0
- package/dist/{manifest-python-deps-D-LSp57v.js → manifest-python-deps-lZd5B4FS.js} +4 -0
- package/package.json +1 -1
package/dist/addon-runner.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require("./chunk-Cek0wNdY.js");
|
|
2
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
2
|
+
const require_manifest_python_deps = require("./manifest-python-deps-lZd5B4FS.js");
|
|
3
3
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
node_fs = require_chunk.__toESM(node_fs);
|
package/dist/addon-runner.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as getWorkerNativeCapProvider, N as createUdsLoggerWithControl, P as LocalChildClient, _t as resolveAddonClass, et as getWorkerNativeCapSnapshot, gt as installManifestNativeDeps, i as createUdsAddonContext, it as validateProviderRegistrations, nt as setWorkerNativeCapsChangeListener, t as installManifestPythonDeps } from "./manifest-python-deps-
|
|
1
|
+
import { $ as getWorkerNativeCapProvider, N as createUdsLoggerWithControl, P as LocalChildClient, _t as resolveAddonClass, et as getWorkerNativeCapSnapshot, gt as installManifestNativeDeps, i as createUdsAddonContext, it as validateProviderRegistrations, nt as setWorkerNativeCapsChangeListener, t as installManifestPythonDeps } from "./manifest-python-deps-DOAh19rY.mjs";
|
|
2
2
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
3
3
|
import { register } from "node:module";
|
|
4
4
|
import * as fs from "node:fs";
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ const require_builtins_local_auth_local_auth_addon = require("./builtins/local-a
|
|
|
20
20
|
require("./builtins/local-auth/index.js");
|
|
21
21
|
const require_builtins_device_manager_device_manager_addon = require("./builtins/device-manager/device-manager.addon.js");
|
|
22
22
|
require("./builtins/device-manager/index.js");
|
|
23
|
-
const require_manifest_python_deps = require("./manifest-python-deps-
|
|
23
|
+
const require_manifest_python_deps = require("./manifest-python-deps-lZd5B4FS.js");
|
|
24
24
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
25
25
|
let _camstack_types_node = require("@camstack/types/node");
|
|
26
26
|
let node_http = require("node:http");
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,7 @@ import { LocalAuthAddon, a as require_ms, c as __esmMin, d as __toCommonJS, f as
|
|
|
18
18
|
import "./builtins/local-auth/index.mjs";
|
|
19
19
|
import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
20
20
|
import "./builtins/device-manager/index.mjs";
|
|
21
|
-
import { A as createUdsEventBus, B as CapRouteError, C as ipcParentLink, D as createHubCapForwardService, E as HUB_CAP_FWD_SERVICE, F as LocalChildRegistry, G as UdsLocalTransportServer, H as callWithServiceDiscovery, I as UDS_NO_ROUTE_PREFIX, J as FrameDecoder, K as SocketChannel, L as AGENT_CAP_FWD_ACTION, M as createUdsLogger, N as createUdsLoggerWithControl, O as createParentUnownedCallHandler, P as LocalChildClient, Q as createBrokerDeviceManagerApi, R as AGENT_CAP_FWD_SERVICE, S as ipcChildLink, T as HUB_CAP_FWD_ACTION, U as createLocalTransport, V as classifyCapRoute, W as UdsLocalTransportClient, X as buildNativeCapProxy, Y as encodeFrame, Z as buildUdsNativeCapProxy, _ as __resetCapUsageRegistryForTests, _t as resolveAddonClass, a as getWorkerDeviceRegistry, at as NATIVE_PROVIDER_SERVICE_INFIX, b as brokerTransportLink, c as setHubConnected, ct as capBareAction, d as registerEventBusService, dt as deserializeTypedArrays, f as AddonDepsManager, ft as serializeTypedArrays, g as CapUsageRegistry, gt as installManifestNativeDeps, h as createHwAccelService, ht as CapabilityUnavailableError, i as createUdsAddonContext, it as validateProviderRegistrations, j as udsChildLogToWorkerEntry, k as createUdsEventBridge, l as EVENT_TOPIC_PREFIX, lt as capServiceName, m as resolveHwAccel, mt as CapabilityHandle, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as capActionName, p as createKernelHwAccel, pt as DeviceRegistry, q as localEndpointPath, r as createAddonContext, rt as createAddonService, s as getOrInitReadinessRegistryForClient, st as capActionSuffix, t as installManifestPythonDeps, tt as mountNativeCapService, u as getBrokerEventBus, ut as parseCapAction, v as getCapUsageRegistry, w as localProviderLink, x as buildLinkChain, y as brokerCallForCap, z as CapRouteResolver } from "./manifest-python-deps-
|
|
21
|
+
import { A as createUdsEventBus, B as CapRouteError, C as ipcParentLink, D as createHubCapForwardService, E as HUB_CAP_FWD_SERVICE, F as LocalChildRegistry, G as UdsLocalTransportServer, H as callWithServiceDiscovery, I as UDS_NO_ROUTE_PREFIX, J as FrameDecoder, K as SocketChannel, L as AGENT_CAP_FWD_ACTION, M as createUdsLogger, N as createUdsLoggerWithControl, O as createParentUnownedCallHandler, P as LocalChildClient, Q as createBrokerDeviceManagerApi, R as AGENT_CAP_FWD_SERVICE, S as ipcChildLink, T as HUB_CAP_FWD_ACTION, U as createLocalTransport, V as classifyCapRoute, W as UdsLocalTransportClient, X as buildNativeCapProxy, Y as encodeFrame, Z as buildUdsNativeCapProxy, _ as __resetCapUsageRegistryForTests, _t as resolveAddonClass, a as getWorkerDeviceRegistry, at as NATIVE_PROVIDER_SERVICE_INFIX, b as brokerTransportLink, c as setHubConnected, ct as capBareAction, d as registerEventBusService, dt as deserializeTypedArrays, f as AddonDepsManager, ft as serializeTypedArrays, g as CapUsageRegistry, gt as installManifestNativeDeps, h as createHwAccelService, ht as CapabilityUnavailableError, i as createUdsAddonContext, it as validateProviderRegistrations, j as udsChildLogToWorkerEntry, k as createUdsEventBridge, l as EVENT_TOPIC_PREFIX, lt as capServiceName, m as resolveHwAccel, mt as CapabilityHandle, n as adaptBrokerToCluster, o as getOrInitReadinessRegistry, ot as capActionName, p as createKernelHwAccel, pt as DeviceRegistry, q as localEndpointPath, r as createAddonContext, rt as createAddonService, s as getOrInitReadinessRegistryForClient, st as capActionSuffix, t as installManifestPythonDeps, tt as mountNativeCapService, u as getBrokerEventBus, ut as parseCapAction, v as getCapUsageRegistry, w as localProviderLink, x as buildLinkChain, y as brokerCallForCap, z as CapRouteResolver } from "./manifest-python-deps-DOAh19rY.mjs";
|
|
22
22
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
23
23
|
import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
24
24
|
import { request } from "node:http";
|
|
@@ -72,6 +72,24 @@ export interface ParentUnownedCallDeps {
|
|
|
72
72
|
* services. See `hub-cap-forward.ts`.
|
|
73
73
|
*/
|
|
74
74
|
readonly forwardToHub?: (input: CapCallInput) => Promise<unknown>;
|
|
75
|
+
/**
|
|
76
|
+
* Optional empty-collection fast-path. Returns `[]` (an empty aggregate) when
|
|
77
|
+
* `capName` is a `mode:'collection'` cap whose `method` is array-output AND
|
|
78
|
+
* ZERO providers are registered cluster-wide; `null`/`undefined` otherwise.
|
|
79
|
+
*
|
|
80
|
+
* Why: a collection cap with no providers IS the empty collection — but with
|
|
81
|
+
* nothing registered, the resolver returns `no-provider` and the call falls
|
|
82
|
+
* to the broker fallback, which polls Moleculer service discovery for a
|
|
83
|
+
* `${cap}.${method}` service that will NEVER appear until the discovery
|
|
84
|
+
* deadline (~30s) elapses. That 30s stall hit EVERY WebRTC cold start via the
|
|
85
|
+
* provider-less `turn-provider` (`getTurnServers`). Returning `[]` up front
|
|
86
|
+
* treats a provider-less collection as the empty collection it is — instant,
|
|
87
|
+
* no discovery. A collection WITH ≥1 provider returns `null` here and routes
|
|
88
|
+
* normally (the aggregate fans out across its providers as before). The
|
|
89
|
+
* kernel layer has no cap registry, so the wiring side (which has both the
|
|
90
|
+
* `CapabilityDefinition`s and the registry) injects this.
|
|
91
|
+
*/
|
|
92
|
+
readonly resolveEmptyCollection?: (capName: string, method: string) => readonly unknown[] | null;
|
|
75
93
|
/** Optional logger for the broker-fallback diagnostic line. */
|
|
76
94
|
readonly logger?: ParentUnownedCallLogger;
|
|
77
95
|
}
|
|
@@ -4619,6 +4619,10 @@ function createParentUnownedCallHandler(deps) {
|
|
|
4619
4619
|
return async (input) => {
|
|
4620
4620
|
const deviceId = input.deviceId ?? extractDeviceId(input.args);
|
|
4621
4621
|
const nodeId = input.nodeId ?? extractNodeId(input.args);
|
|
4622
|
+
if (nodeId === void 0) {
|
|
4623
|
+
const empty = deps.resolveEmptyCollection?.(input.capName, input.method);
|
|
4624
|
+
if (empty != null) return empty;
|
|
4625
|
+
}
|
|
4622
4626
|
const resolver = deps.getResolver();
|
|
4623
4627
|
if (resolver !== null) try {
|
|
4624
4628
|
const route = resolver.resolveCapRoute(input.capName, {
|
|
@@ -4621,6 +4621,10 @@ function createParentUnownedCallHandler(deps) {
|
|
|
4621
4621
|
return async (input) => {
|
|
4622
4622
|
const deviceId = input.deviceId ?? extractDeviceId(input.args);
|
|
4623
4623
|
const nodeId = input.nodeId ?? extractNodeId(input.args);
|
|
4624
|
+
if (nodeId === void 0) {
|
|
4625
|
+
const empty = deps.resolveEmptyCollection?.(input.capName, input.method);
|
|
4626
|
+
if (empty != null) return empty;
|
|
4627
|
+
}
|
|
4624
4628
|
const resolver = deps.getResolver();
|
|
4625
4629
|
if (resolver !== null) try {
|
|
4626
4630
|
const route = resolver.resolveCapRoute(input.capName, {
|