@camstack/types 1.2.278 → 1.2.280

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.
@@ -233,6 +233,9 @@ export interface PipelineAnalyticsTrackLifecyclePayload {
233
233
  };
234
234
  readonly embeddingId?: string;
235
235
  readonly embeddingModelId?: string;
236
+ /** D683: present on the `end` of a piece L2 fused into another track — the
237
+ * subject continues under this id; consumers merge rather than count two. */
238
+ readonly fusedIntoTrackId?: string;
236
239
  readonly [key: string]: unknown;
237
240
  }
238
241
  /**
@@ -46,6 +46,18 @@ export interface TaxonomyPicker {
46
46
  * condition has no fixed vocabulary (→ free-text tag input).
47
47
  */
48
48
  export declare function pickerForCondition(conditionId: string, taxonomy: NcTaxonomy | undefined): TaxonomyPicker | null;
49
+ /**
50
+ * The class picker a RULE's class scope uses: {@link pickerForCondition}'s
51
+ * `classes` vocabulary WITHOUT the audio group (R13, D690).
52
+ *
53
+ * A detection rule that picked a sound there became the legacy one-sample audio
54
+ * rule and broke itself; sounds are authored on a Sound rule
55
+ * (`conditions.audio`). The plain `classes` picker keeps the audio group for
56
+ * the surfaces where a sound IS a class — a snooze, a report, the simulator.
57
+ */
58
+ export declare function pickerForRuleClasses(taxonomy: NcTaxonomy | undefined): TaxonomyPicker | null;
59
+ /** An audio kind (`audio-*`) — the one prefix every sound class carries. */
60
+ export declare function isAudioClassName(name: string): boolean;
49
61
  /** All option values across a picker's groups (for custom-value detection). */
50
62
  export declare function knownValues(picker: TaxonomyPicker): ReadonlySet<string>;
51
63
  /**
@@ -0,0 +1,44 @@
1
+ /**
2
+ * A model-free appearance descriptor of one detection box (D683 §8).
3
+ *
4
+ * Computed on the runner from the analysis raster the frame already leased
5
+ * (`pipeline-runner/appearance-descriptor.ts`), carried on `ObjectDetection`
6
+ * and mirrored onto the tracker's `SpatialDetection`. A vector about a box,
7
+ * never pixels (D9/D18). No learned weights, so no licence question (O6).
8
+ *
9
+ * Layout: the box shrunk 10 % per side, split into an upper and a lower half;
10
+ * per half a hue–saturation histogram (8 hue × 4 saturation), a value histogram
11
+ * (8) and a magnitude-weighted gradient-orientation histogram (8). Each block
12
+ * is L1-normalised and quantised to integers 0–255. About 300 bytes of JSON.
13
+ */
14
+ export declare const APPEARANCE_DESCRIPTOR_VERSION = 1;
15
+ export declare const APPEARANCE_BIN_COUNT = 96;
16
+ export declare const APPEARANCE_BLOCKS: {
17
+ readonly upperHs: readonly [0, 32];
18
+ readonly upperV: readonly [32, 40];
19
+ readonly upperGrad: readonly [40, 48];
20
+ readonly lowerHs: readonly [48, 80];
21
+ readonly lowerV: readonly [80, 88];
22
+ readonly lowerGrad: readonly [88, 96];
23
+ };
24
+ export type AppearanceBlockName = keyof typeof APPEARANCE_BLOCKS;
25
+ export interface AppearanceDescriptor {
26
+ readonly version: 1;
27
+ /** {@link APPEARANCE_BIN_COUNT} integers, laid out by {@link APPEARANCE_BLOCKS}. */
28
+ readonly bins: readonly number[];
29
+ /** The view carries no colour (IR / greyscale / near-black): hue–saturation says nothing. */
30
+ readonly gray: boolean;
31
+ }
32
+ /**
33
+ * Whether appearance may influence anything at all (D683 §3.2, fix round 1
34
+ * ruling 2026-09-30 on the Task 10 cost-bench STOP): OFF until the
35
+ * descriptor is calibrated on tapes that carry it (Task 23, review M9).
36
+ *
37
+ * This is the ONE authority both addons read — never two settings that
38
+ * could disagree (CLAUDE.md D62). The tracker's `TrackerV2Config.appearanceResolvesAmbiguity`
39
+ * default reads it (`addon-post-analysis/pipeline/tracker-v2/types.ts`); the
40
+ * runner's cost gate reads it too (`addon-pipeline/pipeline-runner/appearance-attach.ts`),
41
+ * short-circuiting BEFORE any crop, resample or descriptor is computed, so a
42
+ * disabled camera costs nothing extra per frame.
43
+ */
44
+ export declare const APPEARANCE_RESOLVES_AMBIGUITY_DEFAULT = false;
@@ -1,6 +1,7 @@
1
1
  import type { FirstLevelMacroClass } from './labels.js';
2
2
  import type { AudioClassifyOutcome } from '../capabilities/schemas/detection-shared.js';
3
3
  import type { TrackState } from '../capabilities/pipeline-analytics.cap.js';
4
+ import type { AppearanceDescriptor } from './appearance.js';
4
5
  import type { BoundingBox as EngineBoundingBox, FrameInput, Landmark } from './io.js';
5
6
  export interface SpatialDetection {
6
7
  readonly class: string;
@@ -24,6 +25,12 @@ export interface SpatialDetection {
24
25
  * produced it all the way to the confirmation gate (D379).
25
26
  */
26
27
  readonly birthEvidence?: BirthEvidence;
28
+ /**
29
+ * Mirrored from {@link ObjectDetection.appearance} when this detection enters
30
+ * the tracker (D683). Absent = no descriptor was computed (too small, no
31
+ * raster, a runner that predates it): never read as "different".
32
+ */
33
+ readonly appearance?: AppearanceDescriptor;
27
34
  }
28
35
  export interface CropInput {
29
36
  readonly frame: FrameInput;
@@ -422,6 +429,11 @@ export interface ObjectDetection extends DetectionBase {
422
429
  readonly x: number;
423
430
  readonly y: number;
424
431
  }[];
432
+ /**
433
+ * The box's model-free appearance descriptor, computed by the runner on the
434
+ * frame this detection was measured on (D683). First-level boxes only.
435
+ */
436
+ readonly appearance?: AppearanceDescriptor;
425
437
  }
426
438
  /** Audio detection — flat, time-localised within the window. */
427
439
  export interface AudioDetection extends DetectionBase {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.278",
3
+ "version": "1.2.280",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",