@camstack/types 1.1.42 → 1.1.44

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 (41) hide show
  1. package/dist/addon.js +1 -1
  2. package/dist/addon.mjs +1 -1
  3. package/dist/capabilities/advanced-notifier.cap.d.ts +8 -4
  4. package/dist/capabilities/cap-router-predicates.d.ts +17 -0
  5. package/dist/capabilities/capability-definition.d.ts +1 -1
  6. package/dist/capabilities/custom-model-registry.cap.d.ts +20 -0
  7. package/dist/capabilities/index.d.ts +14 -7
  8. package/dist/capabilities/llm-runtime.cap.d.ts +286 -0
  9. package/dist/capabilities/llm-shared.d.ts +104 -0
  10. package/dist/capabilities/llm.cap.d.ts +596 -0
  11. package/dist/capabilities/login-method.cap.d.ts +53 -7
  12. package/dist/capabilities/model-convert.cap.d.ts +11 -0
  13. package/dist/capabilities/model-distributor.cap.d.ts +22 -0
  14. package/dist/capabilities/pipeline-analytics.cap.d.ts +101 -25
  15. package/dist/capabilities/pipeline-executor.cap.d.ts +26 -0
  16. package/dist/capabilities/pipeline-orchestrator.cap.d.ts +16 -0
  17. package/dist/capabilities/pipeline-runner.cap.d.ts +107 -0
  18. package/dist/capabilities/plate-gallery.cap.d.ts +114 -0
  19. package/dist/capabilities/platform-probe.cap.d.ts +1 -0
  20. package/dist/capabilities/scene-monitor.cap.d.ts +483 -0
  21. package/dist/enums/event-category.d.ts +33 -0
  22. package/dist/generated/addon-api.d.ts +3305 -1081
  23. package/dist/generated/cap-status-types.d.ts +3 -1
  24. package/dist/generated/capability-router-map.d.ts +13 -4
  25. package/dist/generated/device-local-state.d.ts +3 -0
  26. package/dist/generated/device-proxy.d.ts +4 -1
  27. package/dist/generated/method-access-map.d.ts +1 -1
  28. package/dist/generated/provider-kind-map.d.ts +1 -1
  29. package/dist/generated/system-proxy.d.ts +3 -1
  30. package/dist/index.js +1201 -48
  31. package/dist/index.mjs +1169 -49
  32. package/dist/interfaces/advanced-notifier.d.ts +2 -0
  33. package/dist/interfaces/event-bus.d.ts +111 -2
  34. package/dist/interfaces/pipeline-executor-capability.d.ts +9 -0
  35. package/dist/interfaces/pipeline-runner-capability.d.ts +8 -0
  36. package/dist/{sleep-BC9Yqte7.mjs → sleep-DkhOVOjW.mjs} +49 -1
  37. package/dist/{sleep-ByctZsHo.js → sleep-k6I1e98_.js} +49 -1
  38. package/dist/types/detection.d.ts +12 -0
  39. package/dist/types/models.d.ts +33 -1
  40. package/dist/types/pipeline-step.d.ts +31 -0
  41. package/package.json +1 -1
@@ -27,6 +27,8 @@ export interface NotificationRule {
27
27
  readonly text: string;
28
28
  readonly minSimilarity: number;
29
29
  };
30
+ /** Recognized-entity label match (face identity / plate vehicle name). */
31
+ readonly labels?: readonly string[];
30
32
  };
31
33
  readonly outputs: readonly string[];
32
34
  readonly template?: {
@@ -1,5 +1,5 @@
1
- import type { FrameResult, AudioResult } from '../types/detection.js';
2
- import type { PipelineExecutionTrace } from '../types/pipeline-step.js';
1
+ import type { FrameResult, AudioResult, ObjectDetection } from '../types/detection.js';
2
+ import type { PipelineExecutionTrace, StepCadence } from '../types/pipeline-step.js';
3
3
  import type { MotionRegion } from '../capabilities/motion-detection.cap.js';
4
4
  import type { CameraPipelineConfig } from '../types/camera-pipeline.js';
5
5
  import type { CameraMetrics } from './api-shared.js';
@@ -120,6 +120,109 @@ export interface DetectionResultPayload {
120
120
  readonly capturedAt?: number;
121
121
  [key: string]: unknown;
122
122
  }
123
+ /**
124
+ * Enriched frame emitted on `pipeline-analytics.frame-tracked` after
125
+ * post-analysis detail synthesis. Carries overlay-ready detections:
126
+ * first-level roots pass through from the inference frame; `kind:'detail'`
127
+ * entries (face/plate) are SYNTHESIZED per frame from per-track detail
128
+ * state (two-plane re-injection).
129
+ */
130
+ export interface PipelineAnalyticsFrameTrackedPayload {
131
+ readonly deviceId: number;
132
+ readonly timestamp: number;
133
+ readonly frameWidth: number;
134
+ readonly frameHeight: number;
135
+ readonly detections: readonly ObjectDetection[];
136
+ [key: string]: unknown;
137
+ }
138
+ /** Lifecycle phase of a tracked object: it appears (`start`), its best
139
+ * observation materially improves (`update`), then it ends (`end`). */
140
+ export type TrackLifecyclePhase = 'start' | 'update' | 'end';
141
+ /**
142
+ * Emitted on `pipeline-analytics.track-lifecycle` at three moments of a
143
+ * tracked object's life — `phase:'start'` when it first appears,
144
+ * `phase:'update'` when its best observation MATERIALLY improves (a
145
+ * clearer/larger frame, a newly-recognized identity or plate), and
146
+ * `phase:'end'` exactly once when it expires (TTL-gated). One typed
147
+ * payload shape across phases so a consumer subscribes once and branches
148
+ * on `phase`. Supersedes the thin `TrackStarted` / `TrackEnded` pair.
149
+ *
150
+ * Fields carry the BEST-so-far observation (final at `end`). `media`
151
+ * addresses the current representative image over HTTP. Telemetry
152
+ * semantics (D8): a lost event only misses a moment, never a correctness
153
+ * issue — the durable summary lives in the track store + events.
154
+ */
155
+ export interface PipelineAnalyticsTrackLifecyclePayload {
156
+ readonly deviceId: number;
157
+ readonly trackId: string;
158
+ readonly phase: TrackLifecyclePhase;
159
+ /** Per-track observed-class set (deduplicated accumulator). */
160
+ readonly classes: readonly string[];
161
+ readonly bestClassName: string;
162
+ readonly bestConfidence: number;
163
+ /** Identity name / plate text, when resolved. */
164
+ readonly label?: string;
165
+ readonly identityId?: string;
166
+ readonly plateText?: string;
167
+ readonly firstSeen: number;
168
+ readonly lastSeen: number;
169
+ /** `lastSeen - firstSeen`; ~0 at start, grows over the track's life. */
170
+ readonly durationMs: number;
171
+ readonly zonesVisited?: readonly string[];
172
+ readonly totalDistance?: number;
173
+ readonly positionsCount?: number;
174
+ readonly importance?: number;
175
+ readonly importanceReason?: string;
176
+ /** The current best image, addressable over HTTP. */
177
+ readonly media?: {
178
+ readonly keyFrameMediaKey?: string;
179
+ readonly bestCropMediaKey?: string;
180
+ readonly bestEventId?: string;
181
+ };
182
+ readonly embeddingId?: string;
183
+ readonly embeddingModelId?: string;
184
+ readonly [key: string]: unknown;
185
+ }
186
+ /**
187
+ * Emitted on `pipeline-analytics.face-gallery-changed` whenever a gallery
188
+ * face row changes. `kind:'buffered'` — a new face row was persisted
189
+ * (`FaceRecognizer.onTrackEnd`); `'assigned'` / `'unassigned'` — the face's
190
+ * identity link changed (`FaceGalleryProvider.assignFace`/`unassignFace`);
191
+ * `'deleted'` — the row was removed (`FaceGalleryProvider.deleteFace`).
192
+ * Telemetry semantics (D8): a lost event only delays a UI refresh, never a
193
+ * correctness issue. Consumer: `useFaceGalleryLiveRefresh` (admin-ui).
194
+ */
195
+ export interface PipelineAnalyticsFaceGalleryChangedPayload {
196
+ readonly deviceId: number;
197
+ readonly faceId: string;
198
+ readonly kind: 'buffered' | 'assigned' | 'unassigned' | 'deleted';
199
+ readonly [key: string]: unknown;
200
+ }
201
+ /**
202
+ * Emitted when a plate-gallery row changes: `'buffered'` — a new read was
203
+ * persisted (`PlateRecognizer.onTrackEnd`); `'assigned'`/`'unassigned'` — the
204
+ * vehicle link changed (`PlateGalleryProvider`); `'deleted'` — the row was
205
+ * removed. Telemetry (D8): a lost event only delays a UI refresh. Consumer:
206
+ * `usePlateGalleryLiveRefresh` (admin-ui).
207
+ */
208
+ export interface PipelineAnalyticsPlateGalleryChangedPayload {
209
+ readonly deviceId: number;
210
+ readonly plateId: string;
211
+ readonly kind: 'buffered' | 'assigned' | 'unassigned' | 'deleted';
212
+ readonly [key: string]: unknown;
213
+ }
214
+ /**
215
+ * Child steps enabled for a camera + their scheduling policy, as read
216
+ * from the pipeline catalog. Announced on `PipelineInferenceResultPayload`
217
+ * so a track-level consumer knows which detail-subtree steps it can
218
+ * dispatch via `pipelineRunner.runDetailSubtree` and on what cadence,
219
+ * without a separate round-trip to the executor's schema/config caps.
220
+ */
221
+ export interface DetailStepAnnounce {
222
+ readonly stepId: string;
223
+ readonly inputClasses: readonly string[];
224
+ readonly cadence: StepCadence;
225
+ }
123
226
  /**
124
227
  * Raw inference output emitted by `addon-pipeline-runner` per detection
125
228
  * frame. Carries the FrameResult produced by the runner — the hub-side
@@ -145,6 +248,8 @@ export interface PipelineInferenceResultPayload {
145
248
  * → delivery latency. Undefined when the frame carried no capture stamp.
146
249
  */
147
250
  readonly capturedAt?: number;
251
+ /** Child steps enabled for this camera + their scheduling policy (from the catalog). */
252
+ readonly detailSteps?: readonly DetailStepAnnounce[];
148
253
  readonly [key: string]: unknown;
149
254
  }
150
255
  /**
@@ -588,6 +693,10 @@ export interface EventCatalog {
588
693
  'detection.motion-analysis': MotionAnalysisPayload;
589
694
  'detection.motion-zones-raw': MotionZonesRawPayload;
590
695
  'motion.on-motion-changed': MotionOnMotionChangedPayload;
696
+ 'pipeline-analytics.frame-tracked': PipelineAnalyticsFrameTrackedPayload;
697
+ 'pipeline-analytics.track-lifecycle': PipelineAnalyticsTrackLifecyclePayload;
698
+ 'pipeline-analytics.face-gallery-changed': PipelineAnalyticsFaceGalleryChangedPayload;
699
+ 'pipeline-analytics.plate-gallery-changed': PipelineAnalyticsPlateGalleryChangedPayload;
591
700
  /**
592
701
  * On-board detection coming straight from the camera firmware (Reolink
593
702
  * AI alarms, ONVIF analytics, etc.) — as opposed to `detection.result`
@@ -1,4 +1,5 @@
1
1
  import type { PipelineEngineChoice, PipelineConfig } from '../types/pipeline.js';
2
+ import type { PipelineExecutionPlane } from '../types/pipeline-step.js';
2
3
  import type { PipelineSchema, PipelineDefaultStep, PipelineTemplateStep, PipelineTemplate } from '../types/pipeline-schema.js';
3
4
  import type { ModelFormat } from '../types/models.js';
4
5
  import type { FrameInput } from '../types/io.js';
@@ -65,6 +66,14 @@ export interface PipelineRunInput {
65
66
  * that omit this field get a generated id.
66
67
  */
67
68
  readonly sessionId?: string;
69
+ /**
70
+ * Execution plane. 'full' (default) runs the whole tree — benchmark,
71
+ * reference-image, and detail-subtree calls. 'frame' is the live
72
+ * per-frame dispatch: ONLY root-plane steps run; crop children
73
+ * (inputClasses ≠ null) are skipped and served per-track via
74
+ * pipelineRunner.runDetailSubtree (two-plane design).
75
+ */
76
+ readonly plane?: PipelineExecutionPlane;
68
77
  }
69
78
  /**
70
79
  * Singleton capability provided by the pipeline-executor addon.
@@ -166,4 +166,12 @@ export interface IPipelineRunnerProvider {
166
166
  } & CameraMetrics>;
167
167
  /** List the deviceIds currently attached to this runner. */
168
168
  getLocalCameras(): readonly number[];
169
+ /**
170
+ * Two-plane design: run the DETAIL subtree (crop children — embedding,
171
+ * classifier, refiner steps whose `inputClasses !== null`) for a single
172
+ * tracked detection. See `pipelineRunnerCapability.runDetailSubtree`
173
+ * (`capabilities/pipeline-runner.cap.ts`) for full semantics. Returns
174
+ * `null` when neither `frameHandle` nor `cropJpeg` resolves to a crop.
175
+ */
176
+ runDetailSubtree(input: import('../capabilities/pipeline-runner.cap.js').RunDetailSubtreeInput): Promise<import('../capabilities/pipeline-runner.cap.js').RunDetailSubtreeResult | null>;
169
177
  }
@@ -474,10 +474,43 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
474
474
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
475
475
  EventCategory["EnrichmentSceneStateChanged"] = "enrichment.scene.state-changed";
476
476
  EventCategory["EnrichmentActivitySummary"] = "enrichment.activity.summary";
477
+ /**
478
+ * Unified track-lifecycle event: ONE category carrying `phase:
479
+ * 'start' | 'update' | 'end'` with a rich, typed
480
+ * `PipelineAnalyticsTrackLifecyclePayload`. Supersedes the thin
481
+ * `PipelineAnalyticsTrackStarted` / `PipelineAnalyticsTrackEnded`
482
+ * pair — a consumer subscribes once and branches on `phase`.
483
+ */
484
+ EventCategory["PipelineAnalyticsTrackLifecycle"] = "pipeline-analytics.track-lifecycle";
485
+ /**
486
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
487
+ * (`phase:'start'`). Kept as a soft alias — no known subscribers.
488
+ */
477
489
  EventCategory["PipelineAnalyticsTrackStarted"] = "pipeline-analytics.track-started";
490
+ /**
491
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
492
+ * (`phase:'end'`). Kept as a soft alias — no known subscribers.
493
+ */
478
494
  EventCategory["PipelineAnalyticsTrackEnded"] = "pipeline-analytics.track-ended";
479
495
  EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
480
496
  EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
497
+ /**
498
+ * Fired by `addon-post-analysis` whenever a gallery face row changes:
499
+ * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
500
+ * `'unassigned'` its identity link changed, `'deleted'` the row was
501
+ * removed. Telemetry semantics (D8): a lost event only delays a refresh,
502
+ * never a correctness issue. Payload `PipelineAnalyticsFaceGalleryChangedPayload`.
503
+ */
504
+ EventCategory["PipelineAnalyticsFaceGalleryChanged"] = "pipeline-analytics.face-gallery-changed";
505
+ /**
506
+ * Fired by `addon-post-analysis` whenever a gallery plate row changes:
507
+ * `kind:'buffered'` a new read was persisted (`PlateRecognizer.onTrackEnd`),
508
+ * `'assigned'` / `'unassigned'` its vehicle link changed
509
+ * (`PlateGalleryProvider`), `'deleted'` the row was removed. Telemetry
510
+ * semantics (D8): a lost event only delays a refresh, never a correctness
511
+ * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
512
+ */
513
+ EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
481
514
  EventCategory["FrigateLiveEvent"] = "frigate.live-event";
482
515
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
483
516
  /**
@@ -3159,6 +3192,7 @@ function createDeviceProxy(api, binding, opts) {
3159
3192
  pressureSensor: createSliceHandle(stateSource, binding.deviceId, "pressure-sensor"),
3160
3193
  privacyMask: createSliceHandle(stateSource, binding.deviceId, "privacy-mask"),
3161
3194
  ptzAutotrack: createSliceHandle(stateSource, binding.deviceId, "ptz-autotrack"),
3195
+ sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
3162
3196
  scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
3163
3197
  smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
3164
3198
  streamParams: createSliceHandle(stateSource, binding.deviceId, "stream-params"),
@@ -3411,6 +3445,9 @@ function createDeviceProxy(api, binding, opts) {
3411
3445
  getKeyEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getKeyEvents", "query", input),
3412
3446
  getEventDensity: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventDensity", "query", input),
3413
3447
  pruneEventsBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneEventsBefore", "mutation", input),
3448
+ pruneTracksBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneTracksBefore", "mutation", input),
3449
+ wipeAllAnalytics: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "wipeAllAnalytics", "mutation", input),
3450
+ deleteTracks: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteTracks", "mutation", input),
3414
3451
  getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
3415
3452
  getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
3416
3453
  searchObjectEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "searchObjectEvents", "query", input),
@@ -3447,6 +3484,16 @@ function createDeviceProxy(api, binding, opts) {
3447
3484
  setSettings: (input) => dispatch("ptz-autotrack", "ptzAutotrack", "setSettings", "mutation", input)
3448
3485
  },
3449
3486
  reboot: { reboot: (input) => dispatch("reboot", "reboot", "reboot", "mutation", input) },
3487
+ sceneMonitor: {
3488
+ listScenes: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenes", "query", input),
3489
+ createScene: (input) => dispatch("scene-monitor", "sceneMonitor", "createScene", "mutation", input),
3490
+ updateScene: (input) => dispatch("scene-monitor", "sceneMonitor", "updateScene", "mutation", input),
3491
+ deleteScene: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteScene", "mutation", input),
3492
+ captureReference: (input) => dispatch("scene-monitor", "sceneMonitor", "captureReference", "mutation", input),
3493
+ deleteReference: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteReference", "mutation", input),
3494
+ recheckNow: (input) => dispatch("scene-monitor", "sceneMonitor", "recheckNow", "mutation", input),
3495
+ getStatus: (input) => dispatch("scene-monitor", "sceneMonitor", "getStatus", "query", input)
3496
+ },
3450
3497
  scriptRunner: {
3451
3498
  run: (input) => dispatch("script-runner", "scriptRunner", "run", "mutation", input),
3452
3499
  stop: (input) => dispatch("script-runner", "scriptRunner", "stop", "mutation", input),
@@ -3626,7 +3673,8 @@ function createDeviceProxy(api, binding, opts) {
3626
3673
  },
3627
3674
  pipelineRunner: {
3628
3675
  detachCamera: (input) => dispatchSystem("pipelineRunner", "detachCamera", "mutation", input),
3629
- getCameraMetrics: (input) => dispatchSystem("pipelineRunner", "getCameraMetrics", "query", input)
3676
+ getCameraMetrics: (input) => dispatchSystem("pipelineRunner", "getCameraMetrics", "query", input),
3677
+ runDetailSubtree: (input) => dispatchSystem("pipelineRunner", "runDetailSubtree", "mutation", input)
3630
3678
  },
3631
3679
  plateGallery: {
3632
3680
  listPlates: (input) => dispatchSystem("plateGallery", "listPlates", "query", input),
@@ -474,10 +474,43 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
474
474
  EventCategory["EnrichmentEmbeddingStored"] = "enrichment.embedding.stored";
475
475
  EventCategory["EnrichmentSceneStateChanged"] = "enrichment.scene.state-changed";
476
476
  EventCategory["EnrichmentActivitySummary"] = "enrichment.activity.summary";
477
+ /**
478
+ * Unified track-lifecycle event: ONE category carrying `phase:
479
+ * 'start' | 'update' | 'end'` with a rich, typed
480
+ * `PipelineAnalyticsTrackLifecyclePayload`. Supersedes the thin
481
+ * `PipelineAnalyticsTrackStarted` / `PipelineAnalyticsTrackEnded`
482
+ * pair — a consumer subscribes once and branches on `phase`.
483
+ */
484
+ EventCategory["PipelineAnalyticsTrackLifecycle"] = "pipeline-analytics.track-lifecycle";
485
+ /**
486
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
487
+ * (`phase:'start'`). Kept as a soft alias — no known subscribers.
488
+ */
477
489
  EventCategory["PipelineAnalyticsTrackStarted"] = "pipeline-analytics.track-started";
490
+ /**
491
+ * @deprecated Superseded by {@link PipelineAnalyticsTrackLifecycle}
492
+ * (`phase:'end'`). Kept as a soft alias — no known subscribers.
493
+ */
478
494
  EventCategory["PipelineAnalyticsTrackEnded"] = "pipeline-analytics.track-ended";
479
495
  EventCategory["PipelineAnalyticsDetectionEvent"] = "pipeline-analytics.detection-event";
480
496
  EventCategory["PipelineAnalyticsFrameTracked"] = "pipeline-analytics.frame-tracked";
497
+ /**
498
+ * Fired by `addon-post-analysis` whenever a gallery face row changes:
499
+ * `kind:'buffered'` a new detected face was persisted, `'assigned'` /
500
+ * `'unassigned'` its identity link changed, `'deleted'` the row was
501
+ * removed. Telemetry semantics (D8): a lost event only delays a refresh,
502
+ * never a correctness issue. Payload `PipelineAnalyticsFaceGalleryChangedPayload`.
503
+ */
504
+ EventCategory["PipelineAnalyticsFaceGalleryChanged"] = "pipeline-analytics.face-gallery-changed";
505
+ /**
506
+ * Fired by `addon-post-analysis` whenever a gallery plate row changes:
507
+ * `kind:'buffered'` a new read was persisted (`PlateRecognizer.onTrackEnd`),
508
+ * `'assigned'` / `'unassigned'` its vehicle link changed
509
+ * (`PlateGalleryProvider`), `'deleted'` the row was removed. Telemetry
510
+ * semantics (D8): a lost event only delays a refresh, never a correctness
511
+ * issue. Payload `PipelineAnalyticsPlateGalleryChangedPayload`.
512
+ */
513
+ EventCategory["PipelineAnalyticsPlateGalleryChanged"] = "pipeline-analytics.plate-gallery-changed";
481
514
  EventCategory["FrigateLiveEvent"] = "frigate.live-event";
482
515
  EventCategory["CameraStreamsProfileSlotsChanged"] = "camera-streams.onProfileSlotsChanged";
483
516
  /**
@@ -3159,6 +3192,7 @@ function createDeviceProxy(api, binding, opts) {
3159
3192
  pressureSensor: createSliceHandle(stateSource, binding.deviceId, "pressure-sensor"),
3160
3193
  privacyMask: createSliceHandle(stateSource, binding.deviceId, "privacy-mask"),
3161
3194
  ptzAutotrack: createSliceHandle(stateSource, binding.deviceId, "ptz-autotrack"),
3195
+ sceneMonitor: createSliceHandle(stateSource, binding.deviceId, "scene-monitor"),
3162
3196
  scriptRunner: createSliceHandle(stateSource, binding.deviceId, "script-runner"),
3163
3197
  smoke: createSliceHandle(stateSource, binding.deviceId, "smoke"),
3164
3198
  streamParams: createSliceHandle(stateSource, binding.deviceId, "stream-params"),
@@ -3411,6 +3445,9 @@ function createDeviceProxy(api, binding, opts) {
3411
3445
  getKeyEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getKeyEvents", "query", input),
3412
3446
  getEventDensity: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventDensity", "query", input),
3413
3447
  pruneEventsBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneEventsBefore", "mutation", input),
3448
+ pruneTracksBefore: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "pruneTracksBefore", "mutation", input),
3449
+ wipeAllAnalytics: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "wipeAllAnalytics", "mutation", input),
3450
+ deleteTracks: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "deleteTracks", "mutation", input),
3414
3451
  getEventMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getEventMedia", "query", input),
3415
3452
  getTrackMedia: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "getTrackMedia", "query", input),
3416
3453
  searchObjectEvents: (input) => dispatch("pipeline-analytics", "pipelineAnalytics", "searchObjectEvents", "query", input),
@@ -3447,6 +3484,16 @@ function createDeviceProxy(api, binding, opts) {
3447
3484
  setSettings: (input) => dispatch("ptz-autotrack", "ptzAutotrack", "setSettings", "mutation", input)
3448
3485
  },
3449
3486
  reboot: { reboot: (input) => dispatch("reboot", "reboot", "reboot", "mutation", input) },
3487
+ sceneMonitor: {
3488
+ listScenes: (input) => dispatch("scene-monitor", "sceneMonitor", "listScenes", "query", input),
3489
+ createScene: (input) => dispatch("scene-monitor", "sceneMonitor", "createScene", "mutation", input),
3490
+ updateScene: (input) => dispatch("scene-monitor", "sceneMonitor", "updateScene", "mutation", input),
3491
+ deleteScene: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteScene", "mutation", input),
3492
+ captureReference: (input) => dispatch("scene-monitor", "sceneMonitor", "captureReference", "mutation", input),
3493
+ deleteReference: (input) => dispatch("scene-monitor", "sceneMonitor", "deleteReference", "mutation", input),
3494
+ recheckNow: (input) => dispatch("scene-monitor", "sceneMonitor", "recheckNow", "mutation", input),
3495
+ getStatus: (input) => dispatch("scene-monitor", "sceneMonitor", "getStatus", "query", input)
3496
+ },
3450
3497
  scriptRunner: {
3451
3498
  run: (input) => dispatch("script-runner", "scriptRunner", "run", "mutation", input),
3452
3499
  stop: (input) => dispatch("script-runner", "scriptRunner", "stop", "mutation", input),
@@ -3626,7 +3673,8 @@ function createDeviceProxy(api, binding, opts) {
3626
3673
  },
3627
3674
  pipelineRunner: {
3628
3675
  detachCamera: (input) => dispatchSystem("pipelineRunner", "detachCamera", "mutation", input),
3629
- getCameraMetrics: (input) => dispatchSystem("pipelineRunner", "getCameraMetrics", "query", input)
3676
+ getCameraMetrics: (input) => dispatchSystem("pipelineRunner", "getCameraMetrics", "query", input),
3677
+ runDetailSubtree: (input) => dispatchSystem("pipelineRunner", "runDetailSubtree", "mutation", input)
3630
3678
  },
3631
3679
  plateGallery: {
3632
3680
  listPlates: (input) => dispatchSystem("plateGallery", "listPlates", "query", input),
@@ -206,6 +206,18 @@ export interface ObjectDetection extends DetectionBase {
206
206
  /** Model id that produced `embedding` (e.g. `arcface-r100`). Present iff
207
207
  * `embedding` is present — lets consumers skip samples from a stale model. */
208
208
  readonly embeddingModelId?: string;
209
+ /**
210
+ * The EXACT landmark-aligned crop (base64-encoded JPEG) that a face-embedding
211
+ * step fed to the recognizer for THIS `face` detail — i.e. the literal ArcFace
212
+ * model input the `embedding` above was computed from. Present iff an aligned
213
+ * crop was produced (a `faceAlignment` model ran with ≥5 landmarks); absent on
214
+ * the plain-crop fallback and on non-face detections. Lets a gallery display
215
+ * the true embedded crop (1:1 with the embedding, for match debugging) instead
216
+ * of a separately captured natural crop. Small (a 112² JPEG), cheap to carry on
217
+ * the face detail. Only the `face` detail carries it — it is NOT inherited onto
218
+ * the parent person (the person box is not the ArcFace input).
219
+ */
220
+ readonly faceAlignedCrop?: string;
209
221
  }
210
222
  /** Audio detection — flat, time-localised within the window. */
211
223
  export interface AudioDetection extends DetectionBase {
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import type { ClassMapDefinition, LabelDefinition } from './labels.js';
3
- export declare const MODEL_FORMATS: readonly ["onnx", "coreml", "openvino", "tflite", "pt"];
3
+ export declare const MODEL_FORMATS: readonly ["onnx", "coreml", "openvino", "tflite", "pt", "gguf"];
4
4
  export type ModelFormat = (typeof MODEL_FORMATS)[number];
5
5
  export type ModelOutputFormat = 'yolo' | 'ssd' | 'embedding' | 'classification' | 'ocr' | 'segmentation';
6
6
  /**
@@ -93,6 +93,16 @@ export declare const ModelFormatsSchema: z.ZodObject<{
93
93
  python: "python";
94
94
  }>>>>;
95
95
  }, z.core.$strip>>;
96
+ gguf: z.ZodOptional<z.ZodObject<{
97
+ url: z.ZodString;
98
+ sizeMB: z.ZodNumber;
99
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
100
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
101
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
102
+ node: "node";
103
+ python: "python";
104
+ }>>>>;
105
+ }, z.core.$strip>>;
96
106
  }, z.core.$strip>;
97
107
  /**
98
108
  * Variant-selector grouping axes. Shared by the full `ModelCatalogEntry` and by
@@ -171,6 +181,16 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
171
181
  python: "python";
172
182
  }>>>>;
173
183
  }, z.core.$strip>>;
184
+ gguf: z.ZodOptional<z.ZodObject<{
185
+ url: z.ZodString;
186
+ sizeMB: z.ZodNumber;
187
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
188
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
189
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
190
+ node: "node";
191
+ python: "python";
192
+ }>>>>;
193
+ }, z.core.$strip>>;
174
194
  }, z.core.$strip>;
175
195
  inputSize: z.ZodObject<{
176
196
  width: z.ZodNumber;
@@ -312,6 +332,7 @@ export declare const ConvertArtifactSchema: z.ZodObject<{
312
332
  openvino: "openvino";
313
333
  tflite: "tflite";
314
334
  pt: "pt";
335
+ gguf: "gguf";
315
336
  }>;
316
337
  precision: z.ZodOptional<z.ZodEnum<{
317
338
  int8: "int8";
@@ -378,6 +399,16 @@ export declare const ConvertResultSchema: z.ZodObject<{
378
399
  python: "python";
379
400
  }>>>>;
380
401
  }, z.core.$strip>>;
402
+ gguf: z.ZodOptional<z.ZodObject<{
403
+ url: z.ZodString;
404
+ sizeMB: z.ZodNumber;
405
+ isDirectory: z.ZodOptional<z.ZodBoolean>;
406
+ files: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodString>>>;
407
+ runtimes: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodEnum<{
408
+ node: "node";
409
+ python: "python";
410
+ }>>>>;
411
+ }, z.core.$strip>>;
381
412
  }, z.core.$strip>;
382
413
  inputSize: z.ZodObject<{
383
414
  width: z.ZodNumber;
@@ -436,6 +467,7 @@ export declare const ConvertResultSchema: z.ZodObject<{
436
467
  openvino: "openvino";
437
468
  tflite: "tflite";
438
469
  pt: "pt";
470
+ gguf: "gguf";
439
471
  }>;
440
472
  precision: z.ZodOptional<z.ZodEnum<{
441
473
  int8: "int8";
@@ -82,6 +82,28 @@ export interface StepDefinition {
82
82
  * detected with score ≥ 0.7. Configurable per-step via settings.
83
83
  */
84
84
  readonly defaultMinParentScore?: number;
85
+ /**
86
+ * Detail-subtree dispatch cadence — how often a track-level consumer
87
+ * should invoke `pipelineRunner.runDetailSubtree` for this step. Only
88
+ * meaningful for child steps (`inputClasses !== null`); root steps
89
+ * (object-detection, audio-classifier) run on every frame instead and
90
+ * ignore this field. Absent on a child step falls back to the catalog
91
+ * builder's default (`{ trigger: 'once', maxPerTrack: 3 }` — see
92
+ * `PipelineStepBase` in `addon-pipeline`'s step-definitions.ts).
93
+ */
94
+ readonly cadence?: StepCadence;
95
+ }
96
+ /**
97
+ * Scheduling policy for a detail-subtree step, shared by
98
+ * `StepDefinition.cadence` (the catalog authority) and
99
+ * `DetailStepAnnounce.cadence` (the per-camera announce derived from it —
100
+ * see `interfaces/event-bus.ts`).
101
+ */
102
+ export interface StepCadence {
103
+ readonly trigger: 'once' | 'improve' | 'periodic';
104
+ readonly minIntervalMs?: number;
105
+ readonly maxPerTrack?: number;
106
+ readonly stickyOnConfidence?: number;
85
107
  }
86
108
  export interface PoolModelConfig {
87
109
  /** Absolute path to the model file (.mlpackage, .xml, .onnx) */
@@ -158,8 +180,17 @@ export interface MaskOutput {
158
180
  /** Discriminated union for step output — use switch(output.kind) */
159
181
  export type StepOutput = DetectionsOutput | ClassificationsOutput | EmbeddingOutput | TextOutput | MaskOutput;
160
182
  export type TraceVerbosity = 'off' | 'summary' | 'full';
183
+ /**
184
+ * Execution plane for a pipeline run (two-plane design). `'full'` (default)
185
+ * runs the whole tree — benchmark, reference-image, and detail-subtree
186
+ * calls. `'frame'` is the live per-frame dispatch: ONLY root-plane steps
187
+ * (`StepDefinition.inputClasses === null`) run; crop children are skipped
188
+ * and served per-track via a separate detail-subtree call instead.
189
+ */
190
+ export type PipelineExecutionPlane = 'full' | 'frame';
161
191
  export interface PipelineRunOptions {
162
192
  readonly traceVerbosity?: TraceVerbosity;
193
+ readonly plane?: PipelineExecutionPlane;
163
194
  }
164
195
  export interface StepTrace {
165
196
  readonly stepId: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.1.42",
3
+ "version": "1.1.44",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",