@camstack/types 1.2.303 → 1.2.305

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.
@@ -508,8 +508,31 @@ export interface PhaseTransitionPayload {
508
508
  cooldownMs?: number;
509
509
  /** Ms epoch of the transition. */
510
510
  timestamp?: number;
511
+ /**
512
+ * Why the phase changed. `motion`: the runner's motion gate (an `on-motion`
513
+ * registration) — `source` and `cooldownMs` are set. `attach` / `detach`:
514
+ * the camera was attached `always-on` (every on-motion detection SESSION
515
+ * is) or detached while active. An attach names the motion that opened the
516
+ * session (`source` + `triggeredBy`) when the orchestrator sent it; a
517
+ * detach names none. `cooldownMs` is absent on both. Absent on a runner older than 2026-10-06,
518
+ * whose attach claimed `source: 'analyzer'` and whose detach emitted
519
+ * nothing.
520
+ */
521
+ cause?: PhaseTransitionCause;
522
+ /**
523
+ * On a `cause: 'attach'` of an on-motion SESSION: what raised the motion
524
+ * that opened it (D672) — the camera itself, or an attached sensor with its
525
+ * deviceId. `source` is then the motion source that passed the camera's
526
+ * gate. Absent on an attach with no motion behind it (occupancy burst,
527
+ * standing always-on camera, re-dispatch) and from an orchestrator that does
528
+ * not send `sessionTrigger`.
529
+ */
530
+ triggeredBy?: import('../pipeline/camera-sensors.js').MotionTriggeredBy;
531
+ /** The attached sensor's device name when `triggeredBy.kind === 'sensor'` and it is known. */
532
+ sensorName?: string;
511
533
  [key: string]: unknown;
512
534
  }
535
+ export type PhaseTransitionCause = 'motion' | 'attach' | 'detach';
513
536
  /**
514
537
  * Scope of a readiness transition — the "who does this ready/down apply to".
515
538
  *
@@ -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.
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import type { ModelFormat } from './models.js';
17
17
  export type VariantPrecision = 'fp32' | 'int8';
18
- export type VariantOptimization = 'standard' | 'fast';
18
+ export type VariantOptimization = 'standard' | 'test';
19
19
  /**
20
20
  * Minimal structural shape the grouped selector needs. Both the full
21
21
  * `ModelCatalogEntry` (config UI) and the reduced `PipelineModelOption`
@@ -74,7 +74,7 @@ export interface ModelVariantFamily {
74
74
  /**
75
75
  * Fold a flat catalog into the `family → tier → variant` tree. Deterministic
76
76
  * ordering: tiers by the canonical size ladder (unknown tiers appended
77
- * alphabetically), variants standard-before-int8 and fast last.
77
+ * alphabetically), variants standard-before-int8 and test last.
78
78
  */
79
79
  export declare function buildModelVariantGroups(models: readonly ModelVariantSource[]): readonly ModelVariantFamily[];
80
80
  /**
@@ -115,7 +115,7 @@ export declare const ModelVariantGroupSchema: z.ZodObject<{
115
115
  }>>;
116
116
  optimization: z.ZodOptional<z.ZodEnum<{
117
117
  standard: "standard";
118
- fast: "fast";
118
+ test: "test";
119
119
  }>>;
120
120
  resolution: z.ZodOptional<z.ZodNumber>;
121
121
  }, z.core.$strip>;
@@ -155,9 +155,10 @@ export type ModelHosting = (typeof MODEL_HOSTING)[number];
155
155
  * are per upstream. A persisted custom-model row written when this field was a
156
156
  * string still parses — the string is lifted into `{ weights }`.
157
157
  *
158
- * Every licence surface (the admin "Models and licenses" page,
159
- * `THIRD_PARTY_MODELS.md`, the Hugging Face model table) is GENERATED from
160
- * these records by `scripts/gen-model-licenses.ts` (D661).
158
+ * Every machine licence surface (`THIRD_PARTY_MODELS.md`, the Hugging Face
159
+ * model table) is GENERATED from these records by
160
+ * `scripts/gen-model-licenses.ts` (D661). Operator-facing docs live in
161
+ * `camstack/docs` → `/docs/detection/models`.
161
162
  */
162
163
  export declare const ModelLicenseSchema: z.ZodPreprocess<z.ZodObject<{
163
164
  weights: z.ZodString;
@@ -313,7 +314,7 @@ export declare const ModelCatalogEntrySchema: z.ZodObject<{
313
314
  }>>;
314
315
  optimization: z.ZodOptional<z.ZodEnum<{
315
316
  standard: "standard";
316
- fast: "fast";
317
+ test: "test";
317
318
  }>>;
318
319
  resolution: z.ZodOptional<z.ZodNumber>;
319
320
  }, z.core.$strip>>;
@@ -585,7 +586,7 @@ export declare const ConvertResultSchema: z.ZodObject<{
585
586
  }>>;
586
587
  optimization: z.ZodOptional<z.ZodEnum<{
587
588
  standard: "standard";
588
- fast: "fast";
589
+ test: "test";
589
590
  }>>;
590
591
  resolution: z.ZodOptional<z.ZodNumber>;
591
592
  }, z.core.$strip>>;
@@ -18,7 +18,7 @@ export interface IPipelineStep {
18
18
  */
19
19
  getConfigSchema(model?: ModelCatalogEntry): readonly ConfigField[];
20
20
  }
21
- export type PostprocessorType = 'yolo' | 'ssd' | 'rfdetr' | 'yolonas' | 'yolo-seg' | 'scrfd' | 'yunet' | 'arcface' | 'clip' | 'softmax' | 'ctc' | 'plate-slots' | 'saliency' | 'yamnet';
21
+ export type PostprocessorType = 'yolo' | 'ssd' | 'rfdetr' | 'yolonas' | 'yolo-seg' | 'scrfd' | 'yunet' | 'yolo-split-dfl' | 'arcface' | 'clip' | 'softmax' | 'ctc' | 'plate-slots' | 'saliency' | 'yamnet';
22
22
  export interface StepDefinition {
23
23
  /** Unique step identifier (e.g., 'object-detection', 'face-detection') */
24
24
  readonly id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/types",
3
- "version": "1.2.303",
3
+ "version": "1.2.305",
4
4
  "description": "Shared types, interfaces, and model catalogs for the CamStack detection ecosystem",
5
5
  "keywords": [
6
6
  "camstack",