@camstack/system 1.1.4 → 1.1.6
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/cap-route-resolver.d.ts +10 -0
- package/dist/{manifest-python-deps-LVY7BATp.js → manifest-python-deps-CUPtSyZ8.js} +8 -2
- package/dist/{manifest-python-deps-kMVttwkC.mjs → manifest-python-deps-i1IOGMpu.mjs} +8 -2
- 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-CUPtSyZ8.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 setWorkerNativeCapsChangeListener, A as createUdsLoggerWithControl, X as getWorkerNativeCapProvider, Z as getWorkerNativeCapSnapshot, i as createUdsAddonContext, j as LocalChildClient, mt as resolveAddonClass, pt as installManifestNativeDeps, t as installManifestPythonDeps, tt as validateProviderRegistrations } from "./manifest-python-deps-
|
|
1
|
+
import { $ as setWorkerNativeCapsChangeListener, A as createUdsLoggerWithControl, X as getWorkerNativeCapProvider, Z as getWorkerNativeCapSnapshot, i as createUdsAddonContext, j as LocalChildClient, mt as resolveAddonClass, pt as installManifestNativeDeps, t as installManifestPythonDeps, tt as validateProviderRegistrations } from "./manifest-python-deps-i1IOGMpu.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-CUPtSyZ8.js");
|
|
24
24
|
const require_custom_action_registry = require("./custom-action-registry-vLYEFTtv.js");
|
|
25
25
|
const require_graceful_fs$1 = require("./graceful-fs-lg19SZNz.js");
|
|
26
26
|
let _camstack_types_node = require("@camstack/types/node");
|
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { LocalAuthAddon, a as require_safe_buffer, i as AuthManager, n as ApiKey
|
|
|
19
19
|
import "./builtins/local-auth/index.mjs";
|
|
20
20
|
import { DeviceManagerAddon } from "./builtins/device-manager/device-manager.addon.mjs";
|
|
21
21
|
import "./builtins/device-manager/index.mjs";
|
|
22
|
-
import { A as createUdsLoggerWithControl, B as createLocalTransport, C as ipcParentLink, D as createUdsEventBus, E as createUdsEventBridge, F as AGENT_CAP_FWD_SERVICE, G as FrameDecoder, H as UdsLocalTransportServer, I as CapRouteResolver, J as buildUdsNativeCapProxy, K as encodeFrame, L as CapRouteError, M as LocalChildRegistry, N as UDS_NO_ROUTE_PREFIX, O as udsChildLogToWorkerEntry, P as AGENT_CAP_FWD_ACTION, Q as mountNativeCapService, R as classifyCapRoute, S as ipcChildLink, T as createParentUnownedCallHandler, U as SocketChannel, V as UdsLocalTransportClient, W as localEndpointPath, Y as createBrokerDeviceManagerApi, _ as __resetCapUsageRegistryForTests, a as getWorkerDeviceRegistry, at as capBareAction, b as brokerTransportLink, c as setHubConnected, ct as deserializeTypedArrays, d as registerEventBusService, dt as CapabilityHandle, et as createAddonService, f as AddonDepsManager, ft as CapabilityUnavailableError, g as CapUsageRegistry, h as createHwAccelService, i as createUdsAddonContext, it as capActionSuffix, j as LocalChildClient, k as createUdsLogger, l as EVENT_TOPIC_PREFIX, lt as serializeTypedArrays, m as resolveHwAccel, mt as resolveAddonClass, n as adaptBrokerToCluster, nt as NATIVE_PROVIDER_SERVICE_INFIX, o as getOrInitReadinessRegistry, ot as capServiceName, p as createKernelHwAccel, pt as installManifestNativeDeps, q as buildNativeCapProxy, r as createAddonContext, rt as capActionName, s as getOrInitReadinessRegistryForClient, st as parseCapAction, t as installManifestPythonDeps, tt as validateProviderRegistrations, u as getBrokerEventBus, ut as DeviceRegistry, v as getCapUsageRegistry, w as localProviderLink, x as buildLinkChain, y as brokerCallForCap, z as callWithServiceDiscovery } from "./manifest-python-deps-
|
|
22
|
+
import { A as createUdsLoggerWithControl, B as createLocalTransport, C as ipcParentLink, D as createUdsEventBus, E as createUdsEventBridge, F as AGENT_CAP_FWD_SERVICE, G as FrameDecoder, H as UdsLocalTransportServer, I as CapRouteResolver, J as buildUdsNativeCapProxy, K as encodeFrame, L as CapRouteError, M as LocalChildRegistry, N as UDS_NO_ROUTE_PREFIX, O as udsChildLogToWorkerEntry, P as AGENT_CAP_FWD_ACTION, Q as mountNativeCapService, R as classifyCapRoute, S as ipcChildLink, T as createParentUnownedCallHandler, U as SocketChannel, V as UdsLocalTransportClient, W as localEndpointPath, Y as createBrokerDeviceManagerApi, _ as __resetCapUsageRegistryForTests, a as getWorkerDeviceRegistry, at as capBareAction, b as brokerTransportLink, c as setHubConnected, ct as deserializeTypedArrays, d as registerEventBusService, dt as CapabilityHandle, et as createAddonService, f as AddonDepsManager, ft as CapabilityUnavailableError, g as CapUsageRegistry, h as createHwAccelService, i as createUdsAddonContext, it as capActionSuffix, j as LocalChildClient, k as createUdsLogger, l as EVENT_TOPIC_PREFIX, lt as serializeTypedArrays, m as resolveHwAccel, mt as resolveAddonClass, n as adaptBrokerToCluster, nt as NATIVE_PROVIDER_SERVICE_INFIX, o as getOrInitReadinessRegistry, ot as capServiceName, p as createKernelHwAccel, pt as installManifestNativeDeps, q as buildNativeCapProxy, r as createAddonContext, rt as capActionName, s as getOrInitReadinessRegistryForClient, st as parseCapAction, t as installManifestPythonDeps, tt as validateProviderRegistrations, u as getBrokerEventBus, ut as DeviceRegistry, v as getCapUsageRegistry, w as localProviderLink, x as buildLinkChain, y as brokerCallForCap, z as callWithServiceDiscovery } from "./manifest-python-deps-i1IOGMpu.mjs";
|
|
23
23
|
import { t as CustomActionRegistry } from "./custom-action-registry-BEXwC-oo.mjs";
|
|
24
24
|
import { n as require_src, t as require_graceful_fs } from "./graceful-fs-BoR9GuPS.mjs";
|
|
25
25
|
import { PYTHON_VERSION, buildBinaryPath, downloadBinary, ensureBinary, ensureFfmpeg, ensurePython, findInPath, getFfmpegDownloadUrl, getPlatformInfo, getPythonDownloadUrl, installPythonPackages, installPythonRequirements } from "@camstack/types/node";
|
|
@@ -80,6 +80,13 @@ export interface CapRouteResolverDeps {
|
|
|
80
80
|
* Decouples the resolver from CapabilityRegistry.
|
|
81
81
|
*/
|
|
82
82
|
readonly inProcessProviders: InProcessProviderLookup;
|
|
83
|
+
/**
|
|
84
|
+
* Per-cap-method RPC timeout (ms). Lets a long-running cap method (e.g.
|
|
85
|
+
* `model-convert.convert`, minutes) override the default 60s remote/forward
|
|
86
|
+
* timeout that would otherwise kill it mid-run. Returns undefined to use the
|
|
87
|
+
* default. Resolved from the cap definition's `methods[method].timeoutMs`.
|
|
88
|
+
*/
|
|
89
|
+
readonly capTimeoutMs?: (capName: string, method: string) => number | undefined;
|
|
83
90
|
}
|
|
84
91
|
/**
|
|
85
92
|
* Params envelope sent to the agent's `$agent-cap-fwd.forward` Moleculer action.
|
|
@@ -126,8 +133,11 @@ export declare class CapRouteResolver {
|
|
|
126
133
|
private readonly hubLocalRegistry;
|
|
127
134
|
private readonly nodeAuthority;
|
|
128
135
|
private readonly inProcessProviders;
|
|
136
|
+
private readonly capTimeoutMs?;
|
|
129
137
|
private readonly snapshot;
|
|
130
138
|
constructor(deps: CapRouteResolverDeps);
|
|
139
|
+
/** Per-call RPC timeout: the cap method's declared override, else the default. */
|
|
140
|
+
private callTimeout;
|
|
131
141
|
resolveCapRoute(capName: string, opts: CapRouteOpts): CapRoute;
|
|
132
142
|
/**
|
|
133
143
|
* Resolve the hub-local-uds route for a cap owned by a forked hub-local
|
|
@@ -3592,6 +3592,7 @@ var CapRouteResolver = class {
|
|
|
3592
3592
|
hubLocalRegistry;
|
|
3593
3593
|
nodeAuthority;
|
|
3594
3594
|
inProcessProviders;
|
|
3595
|
+
capTimeoutMs;
|
|
3595
3596
|
snapshot;
|
|
3596
3597
|
constructor(deps) {
|
|
3597
3598
|
this.hubNodeId = deps.hubNodeId;
|
|
@@ -3599,8 +3600,13 @@ var CapRouteResolver = class {
|
|
|
3599
3600
|
this.hubLocalRegistry = deps.hubLocalRegistry;
|
|
3600
3601
|
this.nodeAuthority = deps.nodeAuthority;
|
|
3601
3602
|
this.inProcessProviders = deps.inProcessProviders;
|
|
3603
|
+
this.capTimeoutMs = deps.capTimeoutMs;
|
|
3602
3604
|
this.snapshot = this.buildSnapshot();
|
|
3603
3605
|
}
|
|
3606
|
+
/** Per-call RPC timeout: the cap method's declared override, else the default. */
|
|
3607
|
+
callTimeout(capName, method) {
|
|
3608
|
+
return this.capTimeoutMs?.(capName, method) ?? REMOTE_CALL_TIMEOUT_MS;
|
|
3609
|
+
}
|
|
3604
3610
|
resolveCapRoute(capName, opts) {
|
|
3605
3611
|
return classifyCapRoute(capName, opts, this.snapshot);
|
|
3606
3612
|
}
|
|
@@ -3692,7 +3698,7 @@ var CapRouteResolver = class {
|
|
|
3692
3698
|
const action = capActionName(addonId, route.capName, method, isNative);
|
|
3693
3699
|
return callWithServiceDiscovery(this.broker, addonId, action, args, {
|
|
3694
3700
|
nodeID: route.nodeId,
|
|
3695
|
-
timeout:
|
|
3701
|
+
timeout: this.callTimeout(route.capName, method)
|
|
3696
3702
|
});
|
|
3697
3703
|
}
|
|
3698
3704
|
case "agent-child-forward": {
|
|
@@ -3706,7 +3712,7 @@ var CapRouteResolver = class {
|
|
|
3706
3712
|
};
|
|
3707
3713
|
return callWithServiceDiscovery(this.broker, AGENT_CAP_FWD_SERVICE, AGENT_CAP_FWD_ACTION, params, {
|
|
3708
3714
|
nodeID: route.agentNodeId,
|
|
3709
|
-
timeout:
|
|
3715
|
+
timeout: this.callTimeout(route.capName, method)
|
|
3710
3716
|
});
|
|
3711
3717
|
}
|
|
3712
3718
|
}
|
|
@@ -3591,6 +3591,7 @@ var CapRouteResolver = class {
|
|
|
3591
3591
|
hubLocalRegistry;
|
|
3592
3592
|
nodeAuthority;
|
|
3593
3593
|
inProcessProviders;
|
|
3594
|
+
capTimeoutMs;
|
|
3594
3595
|
snapshot;
|
|
3595
3596
|
constructor(deps) {
|
|
3596
3597
|
this.hubNodeId = deps.hubNodeId;
|
|
@@ -3598,8 +3599,13 @@ var CapRouteResolver = class {
|
|
|
3598
3599
|
this.hubLocalRegistry = deps.hubLocalRegistry;
|
|
3599
3600
|
this.nodeAuthority = deps.nodeAuthority;
|
|
3600
3601
|
this.inProcessProviders = deps.inProcessProviders;
|
|
3602
|
+
this.capTimeoutMs = deps.capTimeoutMs;
|
|
3601
3603
|
this.snapshot = this.buildSnapshot();
|
|
3602
3604
|
}
|
|
3605
|
+
/** Per-call RPC timeout: the cap method's declared override, else the default. */
|
|
3606
|
+
callTimeout(capName, method) {
|
|
3607
|
+
return this.capTimeoutMs?.(capName, method) ?? REMOTE_CALL_TIMEOUT_MS;
|
|
3608
|
+
}
|
|
3603
3609
|
resolveCapRoute(capName, opts) {
|
|
3604
3610
|
return classifyCapRoute(capName, opts, this.snapshot);
|
|
3605
3611
|
}
|
|
@@ -3691,7 +3697,7 @@ var CapRouteResolver = class {
|
|
|
3691
3697
|
const action = capActionName(addonId, route.capName, method, isNative);
|
|
3692
3698
|
return callWithServiceDiscovery(this.broker, addonId, action, args, {
|
|
3693
3699
|
nodeID: route.nodeId,
|
|
3694
|
-
timeout:
|
|
3700
|
+
timeout: this.callTimeout(route.capName, method)
|
|
3695
3701
|
});
|
|
3696
3702
|
}
|
|
3697
3703
|
case "agent-child-forward": {
|
|
@@ -3705,7 +3711,7 @@ var CapRouteResolver = class {
|
|
|
3705
3711
|
};
|
|
3706
3712
|
return callWithServiceDiscovery(this.broker, AGENT_CAP_FWD_SERVICE, AGENT_CAP_FWD_ACTION, params, {
|
|
3707
3713
|
nodeID: route.agentNodeId,
|
|
3708
|
-
timeout:
|
|
3714
|
+
timeout: this.callTimeout(route.capName, method)
|
|
3709
3715
|
});
|
|
3710
3716
|
}
|
|
3711
3717
|
}
|