@camstack/types 1.1.31 → 1.1.33

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.
Files changed (52) hide show
  1. package/dist/addon.js +1 -1
  2. package/dist/addon.mjs +1 -1
  3. package/dist/capabilities/addons.cap.d.ts +3 -1
  4. package/dist/capabilities/alerts.cap.d.ts +5 -5
  5. package/dist/capabilities/camera-streams.cap.d.ts +5 -5
  6. package/dist/capabilities/cap-router-predicates.d.ts +32 -0
  7. package/dist/capabilities/capability-definition.d.ts +18 -13
  8. package/dist/capabilities/consumables.cap.d.ts +1 -1
  9. package/dist/capabilities/custom-model-registry.cap.d.ts +36 -0
  10. package/dist/capabilities/index.d.ts +8 -15
  11. package/dist/capabilities/integrations.cap.d.ts +1 -1
  12. package/dist/capabilities/model-convert.cap.d.ts +21 -3
  13. package/dist/capabilities/model-distributor.cap.d.ts +36 -0
  14. package/dist/capabilities/network-quality.cap.d.ts +1 -1
  15. package/dist/capabilities/nodes.cap.d.ts +1 -1
  16. package/dist/capabilities/pipeline-executor.cap.d.ts +135 -8
  17. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +87 -44
  18. package/dist/capabilities/pipeline-runner.cap.d.ts +10 -69
  19. package/dist/capabilities/snapshot.cap.d.ts +3 -3
  20. package/dist/capabilities/stream-broker.cap.d.ts +9 -1
  21. package/dist/capabilities/system.cap.d.ts +1 -1
  22. package/dist/capabilities/toast.cap.d.ts +1 -1
  23. package/dist/capabilities/webrtc-session.cap.d.ts +15 -1
  24. package/dist/encode-profile.d.ts +2 -2
  25. package/dist/enums/event-category.d.ts +12 -0
  26. package/dist/generated/addon-api.d.ts +746 -636
  27. package/dist/generated/capability-router-map.d.ts +4 -16
  28. package/dist/generated/device-proxy.d.ts +0 -2
  29. package/dist/generated/method-access-map.d.ts +1 -1
  30. package/dist/generated/system-proxy.d.ts +2 -2
  31. package/dist/index.d.ts +1 -3
  32. package/dist/index.js +425 -349
  33. package/dist/index.mjs +412 -343
  34. package/dist/interfaces/capability.d.ts +0 -7
  35. package/dist/interfaces/event-bus.d.ts +9 -0
  36. package/dist/interfaces/pipeline-executor-capability.d.ts +14 -1
  37. package/dist/interfaces/pipeline-runner-capability.d.ts +11 -11
  38. package/dist/interfaces/recording-config.d.ts +2 -2
  39. package/dist/{sleep-CZDdRBua.mjs → sleep-Cc14_yxc.mjs} +12 -4
  40. package/dist/{sleep-Dirr8nGw.js → sleep-DmP-uxoe.js} +12 -4
  41. package/dist/types/agent-pipeline-settings.d.ts +18 -6
  42. package/dist/types/camera-pipeline.d.ts +17 -3
  43. package/dist/types/model-variant-groups.d.ts +90 -0
  44. package/dist/types/models.d.ts +60 -3
  45. package/package.json +1 -1
  46. package/dist/capabilities/restreamer.cap.d.ts +0 -54
  47. package/dist/capabilities/snapshot-provider.cap.d.ts +0 -43
  48. package/dist/capabilities/streaming-engine.cap.d.ts +0 -61
  49. package/dist/capabilities/webrtc.cap.d.ts +0 -75
  50. package/dist/interfaces/restreamer.d.ts +0 -23
  51. package/dist/interfaces/streaming.d.ts +0 -28
  52. package/dist/interfaces/webrtc-provider.d.ts +0 -34
@@ -82,6 +82,7 @@ export declare const RunnerFrameSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObje
82
82
  }, z.core.$strip>, z.ZodObject<{
83
83
  kind: z.ZodLiteral<"remote-restream">;
84
84
  ownerNodeId: z.ZodString;
85
+ ownerReachableHost: z.ZodOptional<z.ZodString>;
85
86
  hubHostnameOverride: z.ZodOptional<z.ZodString>;
86
87
  }, z.core.$strip>], "kind">;
87
88
  export type RunnerFrameSource = z.infer<typeof RunnerFrameSourceSchema>;
@@ -90,13 +91,11 @@ export type RunnerFrameSource = z.infer<typeof RunnerFrameSourceSchema>;
90
91
  * specific runner instance via `attachCamera`. Carries everything the
91
92
  * runner needs to subscribe to the local broker and execute inference.
92
93
  *
93
- * Stateless-pipeline model: the full pipeline content (`engine`, `steps`,
94
- * optional `audio`) travels with the attach payload. The runner keeps it
95
- * in RAM for the lifetime of the attach — on rebalance, edit, or
96
- * restart the orchestrator re-sends the latest snapshot.
97
- *
98
- * `engine`/`steps`/`audio` are optional during the additive migration
99
- * window; once orchestrator + UI are migrated they become required.
94
+ * Stateless-pipeline model: the pipeline content (`steps`, optional
95
+ * `audio`) travels with the attach payload. The runner keeps it in RAM
96
+ * for the lifetime of the attach — on rebalance, edit, or restart the
97
+ * orchestrator re-sends the latest snapshot. Engine is NOT carried: it is
98
+ * node-local, resolved by the executing runner at dispatch time.
100
99
  */
101
100
  declare const RunnerCameraConfigSchema: z.ZodObject<{
102
101
  deviceId: z.ZodNumber;
@@ -120,39 +119,9 @@ declare const RunnerCameraConfigSchema: z.ZodObject<{
120
119
  analyzer: "analyzer";
121
120
  }>>>;
122
121
  pipelineEnabled: z.ZodDefault<z.ZodBoolean>;
123
- engine: z.ZodOptional<z.ZodObject<{
124
- runtime: z.ZodEnum<{
125
- node: "node";
126
- python: "python";
127
- }>;
128
- backend: z.ZodString;
129
- format: z.ZodEnum<{
130
- onnx: "onnx";
131
- coreml: "coreml";
132
- openvino: "openvino";
133
- tflite: "tflite";
134
- pt: "pt";
135
- }>;
136
- device: z.ZodOptional<z.ZodString>;
137
- }, z.core.$strip>>;
138
122
  steps: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<import("./pipeline-executor.cap.js").PipelineStepInputOutput, unknown, z.core.$ZodTypeInternals<import("./pipeline-executor.cap.js").PipelineStepInputOutput, unknown>>>>>;
139
123
  audio: z.ZodOptional<z.ZodNullable<z.ZodObject<{
140
- engine: z.ZodObject<{
141
- runtime: z.ZodEnum<{
142
- node: "node";
143
- python: "python";
144
- }>;
145
- backend: z.ZodString;
146
- format: z.ZodEnum<{
147
- onnx: "onnx";
148
- coreml: "coreml";
149
- openvino: "openvino";
150
- tflite: "tflite";
151
- pt: "pt";
152
- }>;
153
- device: z.ZodOptional<z.ZodString>;
154
- }, z.core.$strip>;
155
- modelId: z.ZodString;
124
+ modelId: z.ZodOptional<z.ZodString>;
156
125
  enabled: z.ZodBoolean;
157
126
  }, z.core.$strip>>>;
158
127
  zones: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -177,6 +146,7 @@ declare const RunnerCameraConfigSchema: z.ZodObject<{
177
146
  }, z.core.$strip>, z.ZodObject<{
178
147
  kind: z.ZodLiteral<"remote-restream">;
179
148
  ownerNodeId: z.ZodString;
149
+ ownerReachableHost: z.ZodOptional<z.ZodString>;
180
150
  hubHostnameOverride: z.ZodOptional<z.ZodString>;
181
151
  }, z.core.$strip>], "kind">>;
182
152
  }, z.core.$strip>;
@@ -268,39 +238,9 @@ export declare const pipelineRunnerCapability: {
268
238
  analyzer: "analyzer";
269
239
  }>>>;
270
240
  pipelineEnabled: z.ZodDefault<z.ZodBoolean>;
271
- engine: z.ZodOptional<z.ZodObject<{
272
- runtime: z.ZodEnum<{
273
- node: "node";
274
- python: "python";
275
- }>;
276
- backend: z.ZodString;
277
- format: z.ZodEnum<{
278
- onnx: "onnx";
279
- coreml: "coreml";
280
- openvino: "openvino";
281
- tflite: "tflite";
282
- pt: "pt";
283
- }>;
284
- device: z.ZodOptional<z.ZodString>;
285
- }, z.core.$strip>>;
286
241
  steps: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodType<import("./pipeline-executor.cap.js").PipelineStepInputOutput, unknown, z.core.$ZodTypeInternals<import("./pipeline-executor.cap.js").PipelineStepInputOutput, unknown>>>>>;
287
242
  audio: z.ZodOptional<z.ZodNullable<z.ZodObject<{
288
- engine: z.ZodObject<{
289
- runtime: z.ZodEnum<{
290
- node: "node";
291
- python: "python";
292
- }>;
293
- backend: z.ZodString;
294
- format: z.ZodEnum<{
295
- onnx: "onnx";
296
- coreml: "coreml";
297
- openvino: "openvino";
298
- tflite: "tflite";
299
- pt: "pt";
300
- }>;
301
- device: z.ZodOptional<z.ZodString>;
302
- }, z.core.$strip>;
303
- modelId: z.ZodString;
243
+ modelId: z.ZodOptional<z.ZodString>;
304
244
  enabled: z.ZodBoolean;
305
245
  }, z.core.$strip>>>;
306
246
  zones: z.ZodDefault<z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -325,6 +265,7 @@ export declare const pipelineRunnerCapability: {
325
265
  }, z.core.$strip>, z.ZodObject<{
326
266
  kind: z.ZodLiteral<"remote-restream">;
327
267
  ownerNodeId: z.ZodString;
268
+ ownerReachableHost: z.ZodOptional<z.ZodString>;
328
269
  hubHostnameOverride: z.ZodOptional<z.ZodString>;
329
270
  }, z.core.$strip>], "kind">>;
330
271
  }, z.core.$strip>, z.ZodObject<{
@@ -4,9 +4,9 @@ import { DeviceType } from '../device/device-type.js';
4
4
  /**
5
5
  * A single device snapshot returned as base64 JPEG/PNG.
6
6
  *
7
- * Shared with the `snapshot-provider` collection cap the orchestrator
8
- * receives the same shape from each native provider and from the
9
- * broker-based fallback.
7
+ * The `SnapshotAddon` wrapper returns this shape whether the frame came from
8
+ * the device-native provider (onboard capture) or from the stream-broker
9
+ * prebuffer fallback.
10
10
  */
11
11
  declare const SnapshotImageSchema: z.ZodObject<{
12
12
  base64: z.ZodString;
@@ -1,5 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import { type InferProvider } from './capability-definition.js';
3
+ /** Stream delivery format. (Relocated from the retired `streaming-engine` cap.) */
4
+ export declare const StreamFormatSchema: z.ZodEnum<{
5
+ rtsp: "rtsp";
6
+ webrtc: "webrtc";
7
+ hls: "hls";
8
+ mjpeg: "mjpeg";
9
+ }>;
10
+ export type StreamFormat = z.infer<typeof StreamFormatSchema>;
3
11
  declare const RtspRestreamEntrySchema: z.ZodObject<{
4
12
  brokerId: z.ZodString;
5
13
  url: z.ZodString;
@@ -320,11 +328,11 @@ export declare const streamBrokerCapability: {
320
328
  gopFrames: z.ZodOptional<z.ZodNumber>;
321
329
  bf: z.ZodOptional<z.ZodNumber>;
322
330
  preset: z.ZodOptional<z.ZodEnum<{
331
+ fast: "fast";
323
332
  ultrafast: "ultrafast";
324
333
  superfast: "superfast";
325
334
  veryfast: "veryfast";
326
335
  faster: "faster";
327
- fast: "fast";
328
336
  medium: "medium";
329
337
  }>>;
330
338
  tune: z.ZodOptional<z.ZodEnum<{
@@ -82,7 +82,7 @@ export declare const systemCapability: {
82
82
  };
83
83
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
84
84
  readonly mount: {
85
- readonly kind: "service-backed";
85
+ readonly kind: "server-provided";
86
86
  };
87
87
  };
88
88
  export type ISystemProvider = InferProvider<typeof systemCapability>;
@@ -52,7 +52,7 @@ export declare const toastCapability: {
52
52
  };
53
53
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
54
54
  readonly mount: {
55
- readonly kind: "service-backed";
55
+ readonly kind: "server-provided";
56
56
  };
57
57
  };
58
58
  export type IToastProvider = InferProvider<typeof toastCapability>;
@@ -1,6 +1,20 @@
1
1
  import { z } from 'zod';
2
2
  import { type InferProvider } from './capability-definition.js';
3
3
  import { DeviceType } from '../device/device-type.js';
4
+ /**
5
+ * Optional client-side hints sent at session creation to help the provider
6
+ * pick the best native source. All fields optional — a viewer that knows
7
+ * nothing still gets a sane default. (Relocated from the retired `webrtc`
8
+ * collection cap; this `webrtc-session` cap is the live signaling surface.)
9
+ */
10
+ export declare const webrtcClientHintsSchema: z.ZodObject<{
11
+ viewportWidth: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
12
+ viewportHeight: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
13
+ devicePixelRatio: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
14
+ downlinkMbps: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
15
+ prefersTier: z.ZodOptional<z.ZodOptional<z.ZodString>>;
16
+ }, z.core.$strip>;
17
+ export type WebrtcClientHints = z.infer<typeof webrtcClientHintsSchema>;
4
18
  /**
5
19
  * Discriminated target for a WebRTC session. The client sends this
6
20
  * structured object instead of building / parsing brokerId strings;
@@ -342,7 +356,7 @@ export declare const webrtcSessionCapability: {
342
356
  };
343
357
  /** BIG PLAN 2: declarative mount hint — read by `@camstack/system` `buildCapRouters`. */
344
358
  readonly mount: {
345
- readonly kind: "custom";
359
+ readonly kind: "server-provided";
346
360
  };
347
361
  };
348
362
  export type IWebrtcSessionProvider = InferProvider<typeof webrtcSessionCapability>;
@@ -29,11 +29,11 @@ export declare const VideoEncodeSchema: z.ZodObject<{
29
29
  gopFrames: z.ZodOptional<z.ZodNumber>;
30
30
  bf: z.ZodOptional<z.ZodNumber>;
31
31
  preset: z.ZodOptional<z.ZodEnum<{
32
+ fast: "fast";
32
33
  ultrafast: "ultrafast";
33
34
  superfast: "superfast";
34
35
  veryfast: "veryfast";
35
36
  faster: "faster";
36
- fast: "fast";
37
37
  medium: "medium";
38
38
  }>>;
39
39
  tune: z.ZodOptional<z.ZodEnum<{
@@ -75,11 +75,11 @@ export declare const EncodeProfileSchema: z.ZodObject<{
75
75
  gopFrames: z.ZodOptional<z.ZodNumber>;
76
76
  bf: z.ZodOptional<z.ZodNumber>;
77
77
  preset: z.ZodOptional<z.ZodEnum<{
78
+ fast: "fast";
78
79
  ultrafast: "ultrafast";
79
80
  superfast: "superfast";
80
81
  veryfast: "veryfast";
81
82
  faster: "faster";
82
- fast: "fast";
83
83
  medium: "medium";
84
84
  }>>;
85
85
  tune: z.ZodOptional<z.ZodEnum<{
@@ -182,6 +182,18 @@ export declare enum EventCategory {
182
182
  * `DeviceStreamsRegistered` cycle.
183
183
  */
184
184
  PipelineCameraUpdated = "pipeline.camera-updated",
185
+ /**
186
+ * The cluster camera-source OWNER changed (`clusterRoles.ingestNode`).
187
+ * Emitted by addon-pipeline-orchestrator whenever it (re)derives node
188
+ * capabilities — at boot, on agent online/offline, and on an ingest-node
189
+ * flip. Carries the resolved `ownerNodeId`. The stream-broker consumes it to
190
+ * keep its ingest-owner-gate decision current WITHOUT a per-`ensureBroker`
191
+ * cross-process `getIngestOwner` query (push the authority's decision instead
192
+ * of polling it on the hot path). Idempotent state — re-emitted on every
193
+ * topology change, so a dropped event self-heals on the next one (plus the
194
+ * broker's long backstop reconcile query).
195
+ */
196
+ PipelineIngestOwnerChanged = "pipeline.ingest-owner-changed",
185
197
  /**
186
198
  * Periodic snapshot of per-node pipeline-runner load
187
199
  * (`RunnerLocalLoad`). Emitted ~1Hz by every runner so UI dashboards