@camstack/types 1.1.56 → 1.1.58
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.js +1 -1
- package/dist/addon.mjs +1 -1
- package/dist/capabilities/index.d.ts +1 -1
- package/dist/capabilities/pipeline-executor.cap.d.ts +0 -26
- package/dist/capabilities/pipeline-orchestrator.cap.d.ts +182 -32
- package/dist/capabilities/pipeline-runner.cap.d.ts +12 -0
- package/dist/generated/addon-api.d.ts +186 -88
- package/dist/generated/device-proxy.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/system-proxy.d.ts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +191 -49
- package/dist/index.mjs +190 -50
- package/dist/interfaces/pipeline-runner-capability.d.ts +22 -0
- package/dist/interfaces/platform.d.ts +2 -0
- package/dist/{sleep-D8ZkNoYz.mjs → sleep-BQ60XlE9.mjs} +2 -0
- package/dist/{sleep-CF-UWPp0.js → sleep-eVjOy4ev.js} +2 -0
- package/dist/types/agent-pipeline-settings.d.ts +41 -21
- package/dist/utils/runtime-mapping.d.ts +17 -1
- package/package.json +1 -1
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { CameraPipelineConfig } from './camera-pipeline.js';
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
22
|
+
* LEGACY per-addon configuration (the removed per-node model layer,
|
|
23
|
+
* `agent.addonDefaults[addonId]`). Retained ONLY for the one-shot boot
|
|
24
|
+
* migration that strips `addonDefaults`, and for UI/library code pending
|
|
25
|
+
* the per-(node,device) rework. New code carries model/settings per
|
|
26
|
+
* `(node,device)` via {@link DeviceStepConfig}.
|
|
26
27
|
*
|
|
27
28
|
* modelId present ONLY when the operator explicitly chose a model;
|
|
28
29
|
* absent = use this node's format default (resolved on-the-fly by the
|
|
@@ -34,16 +35,25 @@ export interface AgentAddonConfig {
|
|
|
34
35
|
readonly settings: Readonly<Record<string, unknown>>;
|
|
35
36
|
}
|
|
36
37
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* per-
|
|
42
|
-
*
|
|
43
|
-
|
|
38
|
+
* Per-(node,device) BASE provisioning for one step: the model + intrinsic
|
|
39
|
+
* settings the executing node applies for EVERY camera landing on that
|
|
40
|
+
* accelerator. Both fields optional — absent = the executor resolves its own
|
|
41
|
+
* format default at runtime. This is the same shape carried by the
|
|
42
|
+
* per-camera-device OVERRIDE ({@link CameraStepOverridePatch}); the dispatch
|
|
43
|
+
* provisioning stage merges override on top of base (`override ?? base`).
|
|
44
|
+
*/
|
|
45
|
+
export interface DeviceStepConfig {
|
|
46
|
+
readonly modelId?: string;
|
|
47
|
+
readonly settings?: Readonly<Record<string, unknown>>;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Per-(camera,node,device,step) override patch over the per-(node,device)
|
|
51
|
+
* base ({@link DeviceStepConfig}). Both fields optional — unset means
|
|
52
|
+
* "inherit from the device base". Enablement is NOT carried here: which
|
|
53
|
+
* steps run is the per-camera `stepToggles` authority. When `settings` is
|
|
54
|
+
* present it merges over the base `settings` (override keys win).
|
|
44
55
|
*/
|
|
45
56
|
export interface CameraStepOverridePatch {
|
|
46
|
-
readonly enabled?: boolean;
|
|
47
57
|
readonly modelId?: string;
|
|
48
58
|
readonly settings?: Readonly<Record<string, unknown>>;
|
|
49
59
|
}
|
|
@@ -57,7 +67,6 @@ export interface CameraStepOverridePatch {
|
|
|
57
67
|
* on these settings nor carried on the attach payload.
|
|
58
68
|
*/
|
|
59
69
|
export interface AgentPipelineSettings {
|
|
60
|
-
readonly addonDefaults: Readonly<Record<string, AgentAddonConfig>>;
|
|
61
70
|
/**
|
|
62
71
|
* Optional per-node camera capacity cap. When set, the load balancer will
|
|
63
72
|
* not assign more than this many cameras to this agent. `null` = unlimited.
|
|
@@ -111,10 +120,21 @@ export interface AgentPipelineSettings {
|
|
|
111
120
|
* one best accelerator, others opt-in. When TWO+ keys are enabled the
|
|
112
121
|
* dispatcher balances new sessions across them (weighted, by active-session
|
|
113
122
|
* count) so the accelerators run CONCURRENTLY.
|
|
123
|
+
*
|
|
124
|
+
* `steps` (per-(node,device) BASE provisioning) — an optional
|
|
125
|
+
* `stepId → {modelId?, settings?}` map: the default model + intrinsic
|
|
126
|
+
* settings for EVERY camera landing on that accelerator, overridable
|
|
127
|
+
* per-camera via `cameraSettings.stepOverridesByDevice`. A stepId ABSENT ⇒
|
|
128
|
+
* that step uses the device format default. A pinned modelId MUST have a
|
|
129
|
+
* build for the device's FORMAT, else the executor's `resolveInputSteps`
|
|
130
|
+
* substitutes it back to the format default (the UI only offers
|
|
131
|
+
* format-compatible models, so a stored base is always valid).
|
|
114
132
|
*/
|
|
115
133
|
readonly inferenceDevices?: Readonly<Record<string, {
|
|
116
134
|
readonly enabled: boolean;
|
|
117
135
|
readonly weight?: number;
|
|
136
|
+
readonly maxSessions?: number;
|
|
137
|
+
readonly steps?: Readonly<Record<string, DeviceStepConfig>>;
|
|
118
138
|
}>>;
|
|
119
139
|
}
|
|
120
140
|
/**
|
|
@@ -128,15 +148,15 @@ export interface CameraPipelineSettings {
|
|
|
128
148
|
readonly pinnedAgentNodeId?: string;
|
|
129
149
|
readonly stepToggles?: Readonly<Record<string, boolean>>;
|
|
130
150
|
/**
|
|
131
|
-
*
|
|
132
|
-
*
|
|
133
|
-
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
*
|
|
151
|
+
* Per-(camera,node,device) model/settings override. Addressed by
|
|
152
|
+
* `[agentNodeId][deviceKey][addonId]` because the camera is balanced onto
|
|
153
|
+
* one `(node,deviceKey)` per session and a node's accelerators share no
|
|
154
|
+
* format. Overrides the per-(node,device) base
|
|
155
|
+
* (`inferenceDevices[node][deviceKey].steps`) for one camera on one
|
|
156
|
+
* accelerator; the wholesale `pipelineByAgent[agent]` escape hatch, when
|
|
157
|
+
* present, still bypasses this. Enablement is orthogonal (`stepToggles`).
|
|
138
158
|
*/
|
|
139
|
-
readonly
|
|
159
|
+
readonly stepOverridesByDevice?: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, CameraStepOverridePatch>>>>>>;
|
|
140
160
|
/**
|
|
141
161
|
* Per-agent wholesale pipeline override. Engine is NOT stored here —
|
|
142
162
|
* the override runs under the engine selected on that agent via the
|
|
@@ -21,6 +21,22 @@ export type PipelineRuntime = 'node' | 'python';
|
|
|
21
21
|
* Python backends use their native format.
|
|
22
22
|
*/
|
|
23
23
|
declare const BACKEND_TO_FORMAT: Readonly<Record<string, ModelFormat>>;
|
|
24
|
+
/**
|
|
25
|
+
* DEVICE-POOL backend → model format — the SSOT for the multi-device inference
|
|
26
|
+
* DESCRIPTOR path (Python per-device pools), distinct from {@link BACKEND_TO_FORMAT}
|
|
27
|
+
* above which is the legacy NODE runtime map (where `coreml → onnx` because
|
|
28
|
+
* onnxruntime-node's CoreML EP loads `.onnx`). Here a device pool runs the
|
|
29
|
+
* backend NATIVELY, so `coreml → coreml` and `edgetpu → tflite`. Consumed by
|
|
30
|
+
* `resolveDeviceEngine` (addon-pipeline) and the orchestrator's
|
|
31
|
+
* `parseDeviceKey`/`getNodeInferenceDevices` — the previously-duplicated
|
|
32
|
+
* `BACKEND_FORMAT` maps (R3/node-F2). `cpu`/`cuda` floor to onnx.
|
|
33
|
+
*/
|
|
34
|
+
declare const DEVICE_BACKEND_TO_FORMAT: Readonly<Record<string, ModelFormat>>;
|
|
35
|
+
/**
|
|
36
|
+
* Resolve a DEVICE-POOL backend to its model format via {@link DEVICE_BACKEND_TO_FORMAT},
|
|
37
|
+
* flooring unknown backends to `onnx`. The single entry point both addons call.
|
|
38
|
+
*/
|
|
39
|
+
declare function deviceBackendToFormat(backend: string): ModelFormat;
|
|
24
40
|
/**
|
|
25
41
|
* Map DetectionRuntime to ModelFormat.
|
|
26
42
|
* Used when the addon receives an explicit runtime (not 'auto').
|
|
@@ -84,4 +100,4 @@ export declare function pythonScriptForBackend(backend: string): string | undefi
|
|
|
84
100
|
* 'coreml', 'pytorch', 'openvino' need Python; 'onnx' and 'tflite' don't.
|
|
85
101
|
*/
|
|
86
102
|
export declare function requiresPython(runtime: DetectionRuntime | string): boolean;
|
|
87
|
-
export { BACKEND_TO_FORMAT, RUNTIME_TO_FORMAT, PYTHON_SCRIPT };
|
|
103
|
+
export { BACKEND_TO_FORMAT, DEVICE_BACKEND_TO_FORMAT, deviceBackendToFormat, RUNTIME_TO_FORMAT, PYTHON_SCRIPT, };
|