@camstack/types 1.2.304 → 1.2.306

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.
@@ -343,6 +343,15 @@ export interface DetailStepAnnounce {
343
343
  readonly stepId: string;
344
344
  readonly inputClasses: readonly string[];
345
345
  readonly cadence: StepCadence;
346
+ /**
347
+ * The root model that already fills this step for this camera (D715): the
348
+ * model declares the fill and the step's `labelLink` policy lets it be
349
+ * skipped. A consumer does not dispatch the step for a track whose detection
350
+ * carries the linked label (`detector-link:<stepId>`); a track without one
351
+ * (a class the detector cannot name) still gets the step. Absent ⇒ the step
352
+ * runs as before.
353
+ */
354
+ readonly filledBy?: string;
346
355
  }
347
356
  /**
348
357
  * Raw inference output emitted by `addon-pipeline-runner` per detection
@@ -508,8 +517,31 @@ export interface PhaseTransitionPayload {
508
517
  cooldownMs?: number;
509
518
  /** Ms epoch of the transition. */
510
519
  timestamp?: number;
520
+ /**
521
+ * Why the phase changed. `motion`: the runner's motion gate (an `on-motion`
522
+ * registration) — `source` and `cooldownMs` are set. `attach` / `detach`:
523
+ * the camera was attached `always-on` (every on-motion detection SESSION
524
+ * is) or detached while active. An attach names the motion that opened the
525
+ * session (`source` + `triggeredBy`) when the orchestrator sent it; a
526
+ * detach names none. `cooldownMs` is absent on both. Absent on a runner older than 2026-10-06,
527
+ * whose attach claimed `source: 'analyzer'` and whose detach emitted
528
+ * nothing.
529
+ */
530
+ cause?: PhaseTransitionCause;
531
+ /**
532
+ * On a `cause: 'attach'` of an on-motion SESSION: what raised the motion
533
+ * that opened it (D672) — the camera itself, or an attached sensor with its
534
+ * deviceId. `source` is then the motion source that passed the camera's
535
+ * gate. Absent on an attach with no motion behind it (occupancy burst,
536
+ * standing always-on camera, re-dispatch) and from an orchestrator that does
537
+ * not send `sessionTrigger`.
538
+ */
539
+ triggeredBy?: import('../pipeline/camera-sensors.js').MotionTriggeredBy;
540
+ /** The attached sensor's device name when `triggeredBy.kind === 'sensor'` and it is known. */
541
+ sensorName?: string;
511
542
  [key: string]: unknown;
512
543
  }
544
+ export type PhaseTransitionCause = 'motion' | 'attach' | 'detach';
513
545
  /**
514
546
  * Scope of a readiness transition — the "who does this ready/down apply to".
515
547
  *
@@ -37,6 +37,12 @@ export interface RunnerCameraConfig {
37
37
  * as `['pipeline']` — today's behaviour, unchanged.
38
38
  */
39
39
  readonly detectionSources?: import('../capabilities/pipeline-runner.cap.js').DetectionSources;
40
+ /**
41
+ * What opened this attach — a SESSION attach only (`SessionTriggerSchema`,
42
+ * D672 rule 11 as amended 2026-10-06). The runner names it on the phase
43
+ * event and decides nothing on it. Absent ⇒ no source is named.
44
+ */
45
+ readonly sessionTrigger?: import('../capabilities/pipeline-runner.cap.js').SessionTrigger;
40
46
  readonly pipelineEnabled: boolean;
41
47
  /**
42
48
  * Which of the node's inference accelerators this session runs on
@@ -9,6 +9,31 @@ import { type NcAlarmBlocking, type NcAlarmBlockingEdit, type NcAlarmModeDelays,
9
9
  export type NcAlarmDelayField = 'exitDelaySec' | 'entryDelaySec' | 'triggeredDurationSec';
10
10
  export declare const NC_ALARM_DELAY_FIELDS: readonly NcAlarmDelayField[];
11
11
  export type NcAlarmDelaySource = 'mode' | 'default';
12
+ /**
13
+ * The STOCK after-trigger duration a panel seeds and every mode inherits unless it sets its
14
+ * own (D706: 30 s, was 10 s under D701). Only the seed: a persisted value is never rewritten.
15
+ * The panel's defaults, its one-shot migration and the admin UI's "pick a timed action" fill
16
+ * all read this one constant.
17
+ */
18
+ export declare const NC_ALARM_DEFAULT_TRIGGERED_DURATION_SEC = 30;
19
+ /** The per-mode notification switches (D706), both off unless the mode sets them. */
20
+ export type NcAlarmNotifyField = 'notifyDuringEntryDelay' | 'notifySensorRewatched';
21
+ export declare const NC_ALARM_NOTIFY_FIELDS: readonly NcAlarmNotifyField[];
22
+ /** What one mode's notification switches resolve to (D706). */
23
+ export interface NcAlarmModeNotifyPolicy {
24
+ /** The alarm rules' own pushes go out during this mode's entry delay. */
25
+ readonly notifyDuringEntryDelay: boolean;
26
+ /** A bypassed sensor that rejoins the watch is announced. */
27
+ readonly notifySensorRewatched: boolean;
28
+ }
29
+ /**
30
+ * The switches `mode` runs on. There is no global value: absent is OFF (operator decision
31
+ * 2026-10-06 — the entry-delay notification is the only one by default, and "watched again"
32
+ * is not sent). An answer from an older hub carries no switch and reads as off.
33
+ */
34
+ export declare function resolveModeNotifyPolicy(settings: {
35
+ readonly modeDelays?: readonly NcAlarmModeDelays[];
36
+ }, mode: AlarmArmMode): NcAlarmModeNotifyPolicy;
12
37
  /**
13
38
  * Derive the post-triggered action from a stored blob that may predate the field:
14
39
  * a positive duration meant re-arm; zero/absent meant stay triggered.
@@ -24,9 +24,9 @@
24
24
  * ## What each knob costs
25
25
  *
26
26
  * A HELD frame is a full NATIVE-resolution copy in system RAM. With the
27
- * default pinned-RGB24 lease path (`CAMSTACK_SESSION_PINNED_RGB_CROP`, on):
28
- * 4K ≈ 24.9 MB/frame, 1080p ≈ 6.2 MB/frame. On the YUV420P path (flag off, and
29
- * for software-decoded sessions): 4K ≈ 12.4 MB, 1080p ≈ 3.1 MB. Worst-case
27
+ * pinned-RGB24 lease path (hardware sessions):
28
+ * 4K ≈ 24.9 MB/frame, 1080p ≈ 6.2 MB/frame. On the YUV420P path (software-decoded
29
+ * sessions): 4K ≈ 12.4 MB, 1080p ≈ 3.1 MB. Worst-case
30
30
  * resident RAM for ONE busy camera is now `frameBytes × holdFrames`, clamped by
31
31
  * the budget ceiling — bounded by a COUNT because a held frame is waiting for
32
32
  * one specific event (its own detection result), not for a clock.
@@ -183,6 +183,17 @@ export declare const ModelLicenseSchema: z.ZodPreprocess<z.ZodObject<{
183
183
  nonCommercial: z.ZodOptional<z.ZodBoolean>;
184
184
  }, z.core.$strip>>;
185
185
  export type ModelLicense = z.infer<typeof ModelLicenseSchema>;
186
+ /** One `fillsClassifierEffects` entry — see `ModelCatalogEntry.fillsClassifierEffects`. */
187
+ export declare const FillsClassifierEffectSchema: z.ZodObject<{
188
+ stepId: z.ZodEnum<{
189
+ "animal-classifier": "animal-classifier";
190
+ "vehicle-classifier": "vehicle-classifier";
191
+ "package-detection": "package-detection";
192
+ }>;
193
+ labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
194
+ uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
195
+ }, z.core.$strip>;
196
+ export type FillsClassifierEffect = z.infer<typeof FillsClassifierEffectSchema>;
186
197
  export declare const ModelCatalogEntrySchema: z.ZodObject<{
187
198
  id: z.ZodString;
188
199
  name: z.ZodString;
@@ -333,6 +344,15 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
333
344
  }>>;
334
345
  preserveOriginal: z.ZodBoolean;
335
346
  }, z.core.$strip>>;
347
+ fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
348
+ stepId: z.ZodEnum<{
349
+ "animal-classifier": "animal-classifier";
350
+ "vehicle-classifier": "vehicle-classifier";
351
+ "package-detection": "package-detection";
352
+ }>;
353
+ labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
354
+ uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
355
+ }, z.core.$strip>>>>;
336
356
  clip: z.ZodOptional<z.ZodObject<{
337
357
  textModelId: z.ZodString;
338
358
  embeddingDim: z.ZodNumber;
@@ -605,6 +625,15 @@ export declare const ConvertResultSchema: z.ZodObject<{
605
625
  }>>;
606
626
  preserveOriginal: z.ZodBoolean;
607
627
  }, z.core.$strip>>;
628
+ fillsClassifierEffects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
629
+ stepId: z.ZodEnum<{
630
+ "animal-classifier": "animal-classifier";
631
+ "vehicle-classifier": "vehicle-classifier";
632
+ "package-detection": "package-detection";
633
+ }>;
634
+ labelToEffect: z.ZodRecord<z.ZodString, z.ZodString>;
635
+ uncovered: z.ZodReadonly<z.ZodArray<z.ZodString>>;
636
+ }, z.core.$strip>>>>;
608
637
  clip: z.ZodOptional<z.ZodObject<{
609
638
  textModelId: z.ZodString;
610
639
  embeddingDim: z.ZodNumber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.304",
3
+ "version": "1.2.306",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",
@@ -39,6 +39,11 @@
39
39
  "import": "./dist/enums.mjs",
40
40
  "require": "./dist/enums.js"
41
41
  },
42
+ "./client": {
43
+ "types": "./dist/client.d.ts",
44
+ "import": "./dist/client.mjs",
45
+ "require": "./dist/client.js"
46
+ },
42
47
  "./catalogs": {
43
48
  "types": "./dist/catalogs/index.d.ts",
44
49
  "import": "./dist/catalogs/index.mjs",
@@ -55,7 +60,7 @@
55
60
  "dist"
56
61
  ],
57
62
  "scripts": {
58
- "build": "vite build && tsc -p tsconfig.json --emitDeclarationOnly",
63
+ "build": "vite build && vite build -c vite.client.config.ts && tsc -p tsconfig.json --emitDeclarationOnly",
59
64
  "dev": "tsup --watch",
60
65
  "typecheck": "tsc --noEmit -p tsconfig.spec.json",
61
66
  "test": "vitest run",