@camstack/types 1.2.70 → 1.2.72

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,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { type InferNativeProvider } from './capability-definition.js';
3
2
  import { DeviceType } from '../device/device-type.js';
3
+ import { type InferNativeProvider } from './capability-definition.js';
4
4
  /**
5
5
  * scene-monitor — device-scoped reference-region state cap. An operator marks
6
6
  * a rect ROI on a camera frame and names one or more states; the engine
@@ -14,9 +14,41 @@ import { DeviceType } from '../device/device-type.js';
14
14
  * settings-contribution methods. `status.kind:'push'` — the engine pushes on
15
15
  * every hysteresis flip / availability change; consumers never poll.
16
16
  */
17
- /** Extensible condition tag. Seeded 'day' | 'night'; open by design so more can
18
- * be added without a wire break (matching falls back to any-condition refs). */
17
+ /** Extensible condition tag. Seeded 'day' | 'ir' (the two variants the operator
18
+ * captures) plus 'night' | 'dawn' | 'dusk' from the resolver's sun-times band.
19
+ * Open by design so more can be added without a wire break.
20
+ *
21
+ * Matching does NOT fall back across conditions: cross-condition cosines are
22
+ * not comparable, so "I have never seen this scene in this light" is reported
23
+ * as `unknown`, never guessed. A day reference scored against an IR frame
24
+ * collapses the cosine and would latch a false alarm every single night. */
19
25
  export declare const SceneConditionSchema: z.ZodString;
26
+ /** The conditions the resolver can produce. Seeds for the UI's coverage line;
27
+ * the wire type stays an open string. */
28
+ export declare const SCENE_CONDITIONS: readonly ["day", "ir", "night", "dawn", "dusk"];
29
+ /** Reserved, engine-owned state id standing for "the region no longer looks
30
+ * like ANY captured reference". Never authored by an operator, never stored in
31
+ * `states[]` — it is the synthetic candidate that makes divergence a
32
+ * first-class hysteresis input rather than a bare `return`. */
33
+ export declare const SCENE_DIVERGED = "__diverged__";
34
+ /** `matched` = the baseline is what we see; `diverged` = it demonstrably is not;
35
+ * `unknown` = we cannot judge (no reference for this condition, encoder model
36
+ * changed, view shifted, no snapshot). `unknown` is a real value, not a null,
37
+ * and never counts toward hysteresis in either direction. */
38
+ export declare const SceneVerdictSchema: z.ZodEnum<{
39
+ unknown: "unknown";
40
+ matched: "matched";
41
+ diverged: "diverged";
42
+ }>;
43
+ /** Why a scene cannot judge. Named, because this feature's failure mode is
44
+ * silence that reads as "nothing has happened". */
45
+ export declare const SceneUnavailableSchema: z.ZodEnum<{
46
+ "no-reference-for-condition": "no-reference-for-condition";
47
+ "view-shifted": "view-shifted";
48
+ "no-vision-profile": "no-vision-profile";
49
+ "encoder-model-changed": "encoder-model-changed";
50
+ "no-snapshot": "no-snapshot";
51
+ }>;
20
52
  /** One captured reference — condition-tagged, model-version-gated. `embedding`
21
53
  * is `number[]` (Float32Array does NOT survive MsgPack/UDS). */
22
54
  export declare const SceneReferenceSchema: z.ZodObject<{
@@ -25,6 +57,7 @@ export declare const SceneReferenceSchema: z.ZodObject<{
25
57
  condition: z.ZodString;
26
58
  capturedAt: z.ZodNumber;
27
59
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
60
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
28
61
  }, z.core.$strip>;
29
62
  export declare const SceneMonitorStateSchema: z.ZodObject<{
30
63
  id: z.ZodString;
@@ -35,6 +68,7 @@ export declare const SceneMonitorStateSchema: z.ZodObject<{
35
68
  condition: z.ZodString;
36
69
  capturedAt: z.ZodNumber;
37
70
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
71
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
38
72
  }, z.core.$strip>>;
39
73
  textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
40
74
  referenceCount: z.ZodNumber;
@@ -52,6 +86,40 @@ export declare const SceneCheckSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
52
86
  profileId: z.ZodOptional<z.ZodString>;
53
87
  hysteresisCount: z.ZodNumber;
54
88
  }, z.core.$strip>], "mode">;
89
+ /** Defaults, as CONSTANTS rather than only as Zod `.default()`. A Zod default
90
+ * does NOT run on the addon→addon cap path, so every runtime seam reads these
91
+ * as absent-with-a-constant (the `NcConfirmSchema` lesson, three production
92
+ * failures in one day). The schema defaults and these values are the same
93
+ * numbers on purpose. */
94
+ export declare const SCENE_DEFAULT_QUIET_SECONDS = 60;
95
+ export declare const SCENE_DEFAULT_OBSERVATION_SPACING_SEC = 120;
96
+ export declare const SCENE_DEFAULT_CHECK_INTERVAL_SEC = 60;
97
+ export declare const SCENE_DEFAULT_ANCHOR_THRESHOLD = 0.85;
98
+ export declare const SCENE_CONFIRM_DEFAULT_TIMEOUT_MS = 8000;
99
+ export declare const SCENE_CONFIRM_DEFAULT_MAX_IMAGE_PX = 448;
100
+ /** `resetScene({ recapture })` absent means TRUE — the operator decision. Read
101
+ * at the seam, because a Zod `.optional()` carries no default at all. */
102
+ export declare const SCENE_RESET_RECAPTURES = true;
103
+ /**
104
+ * Vision-model adjudication of a candidate flip. Field names deliberately
105
+ * mirror `NcConfirmSchema` so an operator meets one vocabulary, not two.
106
+ *
107
+ * `onTimeout` defaults to **'hold'**, the OPPOSITE of `NcConfirmGate`'s
108
+ * fail-open: a notification suppressed is the worse error there, but a vision
109
+ * model that timed out has not told us the bin is gone, and a latch is a
110
+ * stateful claim that costs the operator a trip to reset.
111
+ */
112
+ export declare const SceneConfirmSchema: z.ZodObject<{
113
+ enabled: z.ZodDefault<z.ZodBoolean>;
114
+ prompt: z.ZodString;
115
+ profileId: z.ZodOptional<z.ZodString>;
116
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
117
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
118
+ onTimeout: z.ZodDefault<z.ZodEnum<{
119
+ flip: "flip";
120
+ hold: "hold";
121
+ }>>;
122
+ }, z.core.$strip>;
55
123
  export declare const SceneMonitorSchema: z.ZodObject<{
56
124
  id: z.ZodString;
57
125
  label: z.ZodString;
@@ -88,6 +156,7 @@ export declare const SceneMonitorSchema: z.ZodObject<{
88
156
  condition: z.ZodString;
89
157
  capturedAt: z.ZodNumber;
90
158
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
159
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
91
160
  }, z.core.$strip>>;
92
161
  textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
93
162
  referenceCount: z.ZodNumber;
@@ -102,6 +171,43 @@ export declare const SceneMonitorSchema: z.ZodObject<{
102
171
  unavailable: "unavailable";
103
172
  }>;
104
173
  unavailableReason: z.ZodNullable<z.ZodString>;
174
+ baselineStateId: z.ZodNullable<z.ZodString>;
175
+ emit: z.ZodDefault<z.ZodEnum<{
176
+ live: "live";
177
+ latched: "latched";
178
+ }>>;
179
+ verdict: z.ZodEnum<{
180
+ unknown: "unknown";
181
+ matched: "matched";
182
+ diverged: "diverged";
183
+ }>;
184
+ latched: z.ZodBoolean;
185
+ armedAt: z.ZodNumber;
186
+ divergedAt: z.ZodNullable<z.ZodNumber>;
187
+ restoredAt: z.ZodNullable<z.ZodNumber>;
188
+ quietSeconds: z.ZodDefault<z.ZodNumber>;
189
+ minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
190
+ confirm: z.ZodOptional<z.ZodObject<{
191
+ enabled: z.ZodDefault<z.ZodBoolean>;
192
+ prompt: z.ZodString;
193
+ profileId: z.ZodOptional<z.ZodString>;
194
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
195
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
196
+ onTimeout: z.ZodDefault<z.ZodEnum<{
197
+ flip: "flip";
198
+ hold: "hold";
199
+ }>>;
200
+ }, z.core.$strip>>;
201
+ anchorThreshold: z.ZodDefault<z.ZodNumber>;
202
+ autoRestore: z.ZodDefault<z.ZodBoolean>;
203
+ unavailable: z.ZodNullable<z.ZodEnum<{
204
+ "no-reference-for-condition": "no-reference-for-condition";
205
+ "view-shifted": "view-shifted";
206
+ "no-vision-profile": "no-vision-profile";
207
+ "encoder-model-changed": "encoder-model-changed";
208
+ "no-snapshot": "no-snapshot";
209
+ }>>;
210
+ coveredConditions: z.ZodArray<z.ZodString>;
105
211
  }, z.core.$strip>;
106
212
  export declare const SceneMonitorStatusSchema: z.ZodObject<{
107
213
  monitors: z.ZodArray<z.ZodObject<{
@@ -140,6 +246,7 @@ export declare const SceneMonitorStatusSchema: z.ZodObject<{
140
246
  condition: z.ZodString;
141
247
  capturedAt: z.ZodNumber;
142
248
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
249
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
143
250
  }, z.core.$strip>>;
144
251
  textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
145
252
  referenceCount: z.ZodNumber;
@@ -154,10 +261,50 @@ export declare const SceneMonitorStatusSchema: z.ZodObject<{
154
261
  unavailable: "unavailable";
155
262
  }>;
156
263
  unavailableReason: z.ZodNullable<z.ZodString>;
264
+ baselineStateId: z.ZodNullable<z.ZodString>;
265
+ emit: z.ZodDefault<z.ZodEnum<{
266
+ live: "live";
267
+ latched: "latched";
268
+ }>>;
269
+ verdict: z.ZodEnum<{
270
+ unknown: "unknown";
271
+ matched: "matched";
272
+ diverged: "diverged";
273
+ }>;
274
+ latched: z.ZodBoolean;
275
+ armedAt: z.ZodNumber;
276
+ divergedAt: z.ZodNullable<z.ZodNumber>;
277
+ restoredAt: z.ZodNullable<z.ZodNumber>;
278
+ quietSeconds: z.ZodDefault<z.ZodNumber>;
279
+ minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
280
+ confirm: z.ZodOptional<z.ZodObject<{
281
+ enabled: z.ZodDefault<z.ZodBoolean>;
282
+ prompt: z.ZodString;
283
+ profileId: z.ZodOptional<z.ZodString>;
284
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
285
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
286
+ onTimeout: z.ZodDefault<z.ZodEnum<{
287
+ flip: "flip";
288
+ hold: "hold";
289
+ }>>;
290
+ }, z.core.$strip>>;
291
+ anchorThreshold: z.ZodDefault<z.ZodNumber>;
292
+ autoRestore: z.ZodDefault<z.ZodBoolean>;
293
+ unavailable: z.ZodNullable<z.ZodEnum<{
294
+ "no-reference-for-condition": "no-reference-for-condition";
295
+ "view-shifted": "view-shifted";
296
+ "no-vision-profile": "no-vision-profile";
297
+ "encoder-model-changed": "encoder-model-changed";
298
+ "no-snapshot": "no-snapshot";
299
+ }>>;
300
+ coveredConditions: z.ZodArray<z.ZodString>;
157
301
  }, z.core.$strip>>;
158
302
  lastFetchedAt: z.ZodNumber;
159
303
  }, z.core.$strip>;
160
304
  export type SceneCondition = z.infer<typeof SceneConditionSchema>;
305
+ export type SceneVerdict = z.infer<typeof SceneVerdictSchema>;
306
+ export type SceneUnavailable = z.infer<typeof SceneUnavailableSchema>;
307
+ export type SceneConfirm = z.infer<typeof SceneConfirmSchema>;
161
308
  export type SceneReference = z.infer<typeof SceneReferenceSchema>;
162
309
  export type SceneMonitorState = z.infer<typeof SceneMonitorStateSchema>;
163
310
  export type SceneCheck = z.infer<typeof SceneCheckSchema>;
@@ -218,6 +365,7 @@ export declare const sceneMonitorCapability: {
218
365
  condition: z.ZodString;
219
366
  capturedAt: z.ZodNumber;
220
367
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
368
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
221
369
  }, z.core.$strip>>;
222
370
  textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
223
371
  referenceCount: z.ZodNumber;
@@ -232,6 +380,43 @@ export declare const sceneMonitorCapability: {
232
380
  unavailable: "unavailable";
233
381
  }>;
234
382
  unavailableReason: z.ZodNullable<z.ZodString>;
383
+ baselineStateId: z.ZodNullable<z.ZodString>;
384
+ emit: z.ZodDefault<z.ZodEnum<{
385
+ live: "live";
386
+ latched: "latched";
387
+ }>>;
388
+ verdict: z.ZodEnum<{
389
+ unknown: "unknown";
390
+ matched: "matched";
391
+ diverged: "diverged";
392
+ }>;
393
+ latched: z.ZodBoolean;
394
+ armedAt: z.ZodNumber;
395
+ divergedAt: z.ZodNullable<z.ZodNumber>;
396
+ restoredAt: z.ZodNullable<z.ZodNumber>;
397
+ quietSeconds: z.ZodDefault<z.ZodNumber>;
398
+ minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
399
+ confirm: z.ZodOptional<z.ZodObject<{
400
+ enabled: z.ZodDefault<z.ZodBoolean>;
401
+ prompt: z.ZodString;
402
+ profileId: z.ZodOptional<z.ZodString>;
403
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
404
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
405
+ onTimeout: z.ZodDefault<z.ZodEnum<{
406
+ flip: "flip";
407
+ hold: "hold";
408
+ }>>;
409
+ }, z.core.$strip>>;
410
+ anchorThreshold: z.ZodDefault<z.ZodNumber>;
411
+ autoRestore: z.ZodDefault<z.ZodBoolean>;
412
+ unavailable: z.ZodNullable<z.ZodEnum<{
413
+ "no-reference-for-condition": "no-reference-for-condition";
414
+ "view-shifted": "view-shifted";
415
+ "no-vision-profile": "no-vision-profile";
416
+ "encoder-model-changed": "encoder-model-changed";
417
+ "no-snapshot": "no-snapshot";
418
+ }>>;
419
+ coveredConditions: z.ZodArray<z.ZodString>;
235
420
  }, z.core.$strip>>;
236
421
  lastFetchedAt: z.ZodNumber;
237
422
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
@@ -297,6 +482,7 @@ export declare const sceneMonitorCapability: {
297
482
  condition: z.ZodString;
298
483
  capturedAt: z.ZodNumber;
299
484
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
485
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
300
486
  }, z.core.$strip>>;
301
487
  textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
302
488
  referenceCount: z.ZodNumber;
@@ -311,6 +497,43 @@ export declare const sceneMonitorCapability: {
311
497
  unavailable: "unavailable";
312
498
  }>;
313
499
  unavailableReason: z.ZodNullable<z.ZodString>;
500
+ baselineStateId: z.ZodNullable<z.ZodString>;
501
+ emit: z.ZodDefault<z.ZodEnum<{
502
+ live: "live";
503
+ latched: "latched";
504
+ }>>;
505
+ verdict: z.ZodEnum<{
506
+ unknown: "unknown";
507
+ matched: "matched";
508
+ diverged: "diverged";
509
+ }>;
510
+ latched: z.ZodBoolean;
511
+ armedAt: z.ZodNumber;
512
+ divergedAt: z.ZodNullable<z.ZodNumber>;
513
+ restoredAt: z.ZodNullable<z.ZodNumber>;
514
+ quietSeconds: z.ZodDefault<z.ZodNumber>;
515
+ minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
516
+ confirm: z.ZodOptional<z.ZodObject<{
517
+ enabled: z.ZodDefault<z.ZodBoolean>;
518
+ prompt: z.ZodString;
519
+ profileId: z.ZodOptional<z.ZodString>;
520
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
521
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
522
+ onTimeout: z.ZodDefault<z.ZodEnum<{
523
+ flip: "flip";
524
+ hold: "hold";
525
+ }>>;
526
+ }, z.core.$strip>>;
527
+ anchorThreshold: z.ZodDefault<z.ZodNumber>;
528
+ autoRestore: z.ZodDefault<z.ZodBoolean>;
529
+ unavailable: z.ZodNullable<z.ZodEnum<{
530
+ "no-reference-for-condition": "no-reference-for-condition";
531
+ "view-shifted": "view-shifted";
532
+ "no-vision-profile": "no-vision-profile";
533
+ "encoder-model-changed": "encoder-model-changed";
534
+ "no-snapshot": "no-snapshot";
535
+ }>>;
536
+ coveredConditions: z.ZodArray<z.ZodString>;
314
537
  }, z.core.$strip>, "mutation">;
315
538
  readonly updateScene: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
316
539
  deviceId: z.ZodNumber;
@@ -341,6 +564,25 @@ export declare const sceneMonitorCapability: {
341
564
  profileId: z.ZodOptional<z.ZodString>;
342
565
  hysteresisCount: z.ZodNumber;
343
566
  }, z.core.$strip>], "mode">>;
567
+ emit: z.ZodOptional<z.ZodEnum<{
568
+ live: "live";
569
+ latched: "latched";
570
+ }>>;
571
+ quietSeconds: z.ZodOptional<z.ZodNumber>;
572
+ minObservationSpacingSec: z.ZodOptional<z.ZodNumber>;
573
+ anchorThreshold: z.ZodOptional<z.ZodNumber>;
574
+ autoRestore: z.ZodOptional<z.ZodBoolean>;
575
+ confirm: z.ZodOptional<z.ZodNullable<z.ZodObject<{
576
+ enabled: z.ZodDefault<z.ZodBoolean>;
577
+ prompt: z.ZodString;
578
+ profileId: z.ZodOptional<z.ZodString>;
579
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
580
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
581
+ onTimeout: z.ZodDefault<z.ZodEnum<{
582
+ flip: "flip";
583
+ hold: "hold";
584
+ }>>;
585
+ }, z.core.$strip>>>;
344
586
  }, z.core.$strip>;
345
587
  }, z.core.$strip>, z.ZodVoid, "mutation">;
346
588
  readonly deleteScene: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
@@ -367,6 +609,22 @@ export declare const sceneMonitorCapability: {
367
609
  deviceId: z.ZodNumber;
368
610
  monitorId: z.ZodString;
369
611
  }, z.core.$strip>, z.ZodVoid, "mutation">;
612
+ /**
613
+ * Clear the latch, re-arm, and — by default — RE-CAPTURE the baseline for
614
+ * the CURRENT condition. The bin never goes back in exactly the same spot;
615
+ * "reset" in the operator's head means *this is the new normal*, and
616
+ * re-capture is what makes the feature self-healing against slow drift
617
+ * instead of failing silently weeks later.
618
+ *
619
+ * Reachable from three surfaces on this one mutation: the scene card, a
620
+ * notification button (an `onTrigger` sequence with a `kind:'cap'` step —
621
+ * no new Notification-Center code at all), and tRPC for scripts.
622
+ */
623
+ readonly resetScene: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
624
+ deviceId: z.ZodNumber;
625
+ monitorId: z.ZodString;
626
+ recapture: z.ZodOptional<z.ZodBoolean>;
627
+ }, z.core.$strip>, z.ZodVoid, "mutation">;
370
628
  };
371
629
  readonly status: {
372
630
  readonly schema: z.ZodObject<{
@@ -406,6 +664,7 @@ export declare const sceneMonitorCapability: {
406
664
  condition: z.ZodString;
407
665
  capturedAt: z.ZodNumber;
408
666
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
667
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
409
668
  }, z.core.$strip>>;
410
669
  textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
411
670
  referenceCount: z.ZodNumber;
@@ -420,6 +679,43 @@ export declare const sceneMonitorCapability: {
420
679
  unavailable: "unavailable";
421
680
  }>;
422
681
  unavailableReason: z.ZodNullable<z.ZodString>;
682
+ baselineStateId: z.ZodNullable<z.ZodString>;
683
+ emit: z.ZodDefault<z.ZodEnum<{
684
+ live: "live";
685
+ latched: "latched";
686
+ }>>;
687
+ verdict: z.ZodEnum<{
688
+ unknown: "unknown";
689
+ matched: "matched";
690
+ diverged: "diverged";
691
+ }>;
692
+ latched: z.ZodBoolean;
693
+ armedAt: z.ZodNumber;
694
+ divergedAt: z.ZodNullable<z.ZodNumber>;
695
+ restoredAt: z.ZodNullable<z.ZodNumber>;
696
+ quietSeconds: z.ZodDefault<z.ZodNumber>;
697
+ minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
698
+ confirm: z.ZodOptional<z.ZodObject<{
699
+ enabled: z.ZodDefault<z.ZodBoolean>;
700
+ prompt: z.ZodString;
701
+ profileId: z.ZodOptional<z.ZodString>;
702
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
703
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
704
+ onTimeout: z.ZodDefault<z.ZodEnum<{
705
+ flip: "flip";
706
+ hold: "hold";
707
+ }>>;
708
+ }, z.core.$strip>>;
709
+ anchorThreshold: z.ZodDefault<z.ZodNumber>;
710
+ autoRestore: z.ZodDefault<z.ZodBoolean>;
711
+ unavailable: z.ZodNullable<z.ZodEnum<{
712
+ "no-reference-for-condition": "no-reference-for-condition";
713
+ "view-shifted": "view-shifted";
714
+ "no-vision-profile": "no-vision-profile";
715
+ "encoder-model-changed": "encoder-model-changed";
716
+ "no-snapshot": "no-snapshot";
717
+ }>>;
718
+ coveredConditions: z.ZodArray<z.ZodString>;
423
719
  }, z.core.$strip>>;
424
720
  lastFetchedAt: z.ZodNumber;
425
721
  }, z.core.$strip>;
@@ -462,6 +758,7 @@ export declare const sceneMonitorCapability: {
462
758
  condition: z.ZodString;
463
759
  capturedAt: z.ZodNumber;
464
760
  thumbnailMediaId: z.ZodOptional<z.ZodString>;
761
+ anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
465
762
  }, z.core.$strip>>;
466
763
  textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
467
764
  referenceCount: z.ZodNumber;
@@ -476,6 +773,43 @@ export declare const sceneMonitorCapability: {
476
773
  unavailable: "unavailable";
477
774
  }>;
478
775
  unavailableReason: z.ZodNullable<z.ZodString>;
776
+ baselineStateId: z.ZodNullable<z.ZodString>;
777
+ emit: z.ZodDefault<z.ZodEnum<{
778
+ live: "live";
779
+ latched: "latched";
780
+ }>>;
781
+ verdict: z.ZodEnum<{
782
+ unknown: "unknown";
783
+ matched: "matched";
784
+ diverged: "diverged";
785
+ }>;
786
+ latched: z.ZodBoolean;
787
+ armedAt: z.ZodNumber;
788
+ divergedAt: z.ZodNullable<z.ZodNumber>;
789
+ restoredAt: z.ZodNullable<z.ZodNumber>;
790
+ quietSeconds: z.ZodDefault<z.ZodNumber>;
791
+ minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
792
+ confirm: z.ZodOptional<z.ZodObject<{
793
+ enabled: z.ZodDefault<z.ZodBoolean>;
794
+ prompt: z.ZodString;
795
+ profileId: z.ZodOptional<z.ZodString>;
796
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
797
+ maxImagePx: z.ZodDefault<z.ZodNumber>;
798
+ onTimeout: z.ZodDefault<z.ZodEnum<{
799
+ flip: "flip";
800
+ hold: "hold";
801
+ }>>;
802
+ }, z.core.$strip>>;
803
+ anchorThreshold: z.ZodDefault<z.ZodNumber>;
804
+ autoRestore: z.ZodDefault<z.ZodBoolean>;
805
+ unavailable: z.ZodNullable<z.ZodEnum<{
806
+ "no-reference-for-condition": "no-reference-for-condition";
807
+ "view-shifted": "view-shifted";
808
+ "no-vision-profile": "no-vision-profile";
809
+ "encoder-model-changed": "encoder-model-changed";
810
+ "no-snapshot": "no-snapshot";
811
+ }>>;
812
+ coveredConditions: z.ZodArray<z.ZodString>;
479
813
  }, z.core.$strip>>;
480
814
  lastFetchedAt: z.ZodNumber;
481
815
  }, z.core.$strip>;
@@ -203,6 +203,33 @@ export declare enum EventCategory {
203
203
  */
204
204
  PipelineCameraAssigned = "pipeline.camera-assigned",
205
205
  PipelineCameraUnassigned = "pipeline.camera-unassigned",
206
+ /**
207
+ * A node the orchestrator would otherwise place cameras on has NO usable
208
+ * inference device: the operator enabled one or more accelerators there and
209
+ * the live probe reports every one of them unavailable. Emitted once per
210
+ * TRANSITION into that state (never per dispatch), and the node is dropped
211
+ * from the placement candidate set for as long as it holds.
212
+ *
213
+ * This exists because the state was previously invisible: little-unraid
214
+ * absorbed 283k inference errors in a day while still being handed cameras,
215
+ * and nothing in the system said so.
216
+ *
217
+ * A node with no accelerators configured at all is NOT this — its devices
218
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
219
+ * serves it exactly as before.
220
+ */
221
+ PipelineNodeInferenceUnavailable = "pipeline.node-inference-unavailable",
222
+ /**
223
+ * A camera has an OPEN detection session and has produced no detection at
224
+ * all for longer than the blind threshold — the camera is being decoded and
225
+ * inferred and is returning nothing. Emitted once per transition into blind,
226
+ * per camera.
227
+ *
228
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
229
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
230
+ * camera" produce byte-identical silence.
231
+ */
232
+ PipelineDetectionBlind = "pipeline.detection-blind",
206
233
  /**
207
234
  * Per-camera pipeline config was mutated by the orchestrator
208
235
  * (3-level settings change via `setAgentAddonDefaults` /
package/dist/enums.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_event_category = require("./event-category-DxZbWydC.js");
2
+ const require_event_category = require("./event-category-D3gG7oil.js");
3
3
  //#region src/enums/event-source-type.ts
4
4
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
5
5
  EventSourceType["Addon"] = "addon";
package/dist/enums.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as EventCategory } from "./event-category-Cv9dO26A.mjs";
1
+ import { t as EventCategory } from "./event-category-Bxo5yJjt.mjs";
2
2
  //#region src/enums/event-source-type.ts
3
3
  var EventSourceType = /* @__PURE__ */ function(EventSourceType) {
4
4
  EventSourceType["Addon"] = "addon";
@@ -205,6 +205,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
205
205
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
206
206
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
207
207
  /**
208
+ * A node the orchestrator would otherwise place cameras on has NO usable
209
+ * inference device: the operator enabled one or more accelerators there and
210
+ * the live probe reports every one of them unavailable. Emitted once per
211
+ * TRANSITION into that state (never per dispatch), and the node is dropped
212
+ * from the placement candidate set for as long as it holds.
213
+ *
214
+ * This exists because the state was previously invisible: little-unraid
215
+ * absorbed 283k inference errors in a day while still being handed cameras,
216
+ * and nothing in the system said so.
217
+ *
218
+ * A node with no accelerators configured at all is NOT this — its devices
219
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
220
+ * serves it exactly as before.
221
+ */
222
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
223
+ /**
224
+ * A camera has an OPEN detection session and has produced no detection at
225
+ * all for longer than the blind threshold — the camera is being decoded and
226
+ * inferred and is returning nothing. Emitted once per transition into blind,
227
+ * per camera.
228
+ *
229
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
230
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
231
+ * camera" produce byte-identical silence.
232
+ */
233
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
234
+ /**
208
235
  * Per-camera pipeline config was mutated by the orchestrator
209
236
  * (3-level settings change via `setAgentAddonDefaults` /
210
237
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -205,6 +205,33 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
205
205
  EventCategory["PipelineCameraAssigned"] = "pipeline.camera-assigned";
206
206
  EventCategory["PipelineCameraUnassigned"] = "pipeline.camera-unassigned";
207
207
  /**
208
+ * A node the orchestrator would otherwise place cameras on has NO usable
209
+ * inference device: the operator enabled one or more accelerators there and
210
+ * the live probe reports every one of them unavailable. Emitted once per
211
+ * TRANSITION into that state (never per dispatch), and the node is dropped
212
+ * from the placement candidate set for as long as it holds.
213
+ *
214
+ * This exists because the state was previously invisible: little-unraid
215
+ * absorbed 283k inference errors in a day while still being handed cameras,
216
+ * and nothing in the system said so.
217
+ *
218
+ * A node with no accelerators configured at all is NOT this — its devices
219
+ * are `disabled`, not `unavailable`, and the runner's default CPU pool
220
+ * serves it exactly as before.
221
+ */
222
+ EventCategory["PipelineNodeInferenceUnavailable"] = "pipeline.node-inference-unavailable";
223
+ /**
224
+ * A camera has an OPEN detection session and has produced no detection at
225
+ * all for longer than the blind threshold — the camera is being decoded and
226
+ * inferred and is returning nothing. Emitted once per transition into blind,
227
+ * per camera.
228
+ *
229
+ * The failure it reports: a 1h43 detection blackout on the entrance camera
230
+ * that nobody noticed, because "a camera that detects nothing" and "a quiet
231
+ * camera" produce byte-identical silence.
232
+ */
233
+ EventCategory["PipelineDetectionBlind"] = "pipeline.detection-blind";
234
+ /**
208
235
  * Per-camera pipeline config was mutated by the orchestrator
209
236
  * (3-level settings change via `setAgentAddonDefaults` /
210
237
  * `setCameraStepToggle` / `setCameraPipelineForAgent` or a
@@ -6464,6 +6464,13 @@ export type AppRouter = TrpcCoreRouter<{
6464
6464
  output: z.infer<typeof sceneMonitorCapability.methods.recheckNow.output>;
6465
6465
  meta: object;
6466
6466
  }>;
6467
+ resetScene: TRPCMutationProcedure<{
6468
+ input: {
6469
+ [x: string]: unknown;
6470
+ } & z.input<typeof sceneMonitorCapability.methods.resetScene.input>;
6471
+ output: z.infer<typeof sceneMonitorCapability.methods.resetScene.output>;
6472
+ meta: object;
6473
+ }>;
6467
6474
  }>>;
6468
6475
  scriptRunner: TRPCBuiltRouter<{
6469
6476
  ctx: TrpcContext;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 933 method paths across 123 capabilities.
9
+ * Coverage: 934 method paths across 123 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -6,7 +6,7 @@
6
6
  * system-scope cap that takes a deviceId was previously never device-filtered
7
7
  * — see the generator header).
8
8
  *
9
- * Coverage: 330 methods carry a device reference, of which
9
+ * Coverage: 331 methods carry a device reference, of which
10
10
  * 124 are on SYSTEM-scope caps.
11
11
  *
12
12
  * Only TOP-LEVEL input fields appear here; a nested device id is not