@camstack/types 1.2.590 → 1.2.592

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.
@@ -1,9 +1,10 @@
1
+ import type { SuppliedRootOutput } from '../capabilities/pipeline-executor.cap.js';
1
2
  import type { ConfigField } from '../interfaces/config-ui.js';
2
3
  import type { StepModelScope } from '../pipeline/cluster-model-scope.js';
4
+ import type { FrameViewCrop } from './frame-view.js';
3
5
  import type { ClassMapDefinition } from './labels.js';
4
6
  import type { ModelCatalogEntry } from './models.js';
5
7
  import type { PipelineSlot } from './pipeline.js';
6
- import type { SuppliedRootOutput } from '../capabilities/pipeline-executor.cap.js';
7
8
  /**
8
9
  * Each pipeline step implements this interface as a class.
9
10
  * `definition` holds the static metadata; `getConfigSchema()` declares
@@ -361,6 +362,37 @@ export interface PipelineRunOptions {
361
362
  * `pipelineExecutor.runPipeline.suppliedRoot`): that step is not inferred.
362
363
  */
363
364
  readonly suppliedRoot?: SuppliedRootOutput;
365
+ /**
366
+ * Motion-guided root crop (D1060): which pixels the object-detection root
367
+ * runs on for THIS frame. `roi` carries the frame-space crop; `full` keeps
368
+ * the full frame. Never applies to a `crop-zone` root, whose package-zone
369
+ * crop always wins. Absent ⇒ full frame.
370
+ */
371
+ readonly rootInputSource?: RootInputSource;
372
+ }
373
+ /** Why the object-detection root ran on the pixels it ran on (D1060). */
374
+ export type RootInputSourceReason =
375
+ /** A crop around the motion subjects and the recent root boxes. */
376
+ 'motion'
377
+ /** Neither motion nor a recent root box: nothing to crop around. */
378
+ | 'no-motion'
379
+ /** The crop would exceed the ceiling fraction of the frame — too little magnification. */
380
+ | 'roi-too-large'
381
+ /** A recent root box would exceed the model's subject-scale bound once cropped: the crop would magnify it into the scale the model fails at. */
382
+ | 'subject-too-large'
383
+ /** The previous crop found nothing where the root had recent boxes; this frame checks on the full frame. */
384
+ | 'roi-missed'
385
+ /** The per-camera periodic full frame. */
386
+ | 'forced-full'
387
+ /** Frame or model geometry unknown. */
388
+ | 'no-geometry';
389
+ /** The root input source decided for one frame (D1060). Rides the `pipeline.trace` event. */
390
+ export interface RootInputSource {
391
+ readonly stepId: string;
392
+ readonly source: 'roi' | 'full';
393
+ readonly reason: RootInputSourceReason;
394
+ /** Frame-space pixel crop, present iff `source === 'roi'`. */
395
+ readonly crop?: FrameViewCrop;
364
396
  }
365
397
  export interface StepTrace {
366
398
  readonly stepId: string;
@@ -396,6 +428,8 @@ export interface PipelineExecutionTrace {
396
428
  readonly steps: readonly StepTrace[];
397
429
  readonly totalMs: number;
398
430
  readonly detectionCount: number;
431
+ /** Which pixels the object-detection root ran on for this frame (D1060). */
432
+ readonly rootSource?: RootInputSource;
399
433
  readonly [key: string]: unknown;
400
434
  }
401
435
  export interface MotionBox {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.590",
3
+ "version": "1.2.592",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",