@camstack/types 1.2.128 → 1.2.130
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.
- package/dist/addon.js +3 -2
- package/dist/addon.mjs +3 -2
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/pipeline-analytics.cap.d.ts +213 -0
- package/dist/capabilities/recording.cap.d.ts +64 -0
- package/dist/capabilities/scene-monitor.cap.d.ts +233 -0
- package/dist/capabilities/storage-migration.cap.d.ts +1 -0
- package/dist/capabilities/storage.cap.d.ts +2 -1
- package/dist/capabilities/zone-analytics.cap.d.ts +122 -2
- package/dist/generated/addon-api.d.ts +35 -0
- package/dist/generated/cap-input-defaults.d.ts +1 -1
- package/dist/generated/method-access-map.d.ts +1 -1
- package/dist/generated/method-device-selectors.d.ts +2 -2
- package/dist/generated/system-proxy.d.ts +1 -1
- package/dist/index.js +372 -2
- package/dist/index.mjs +364 -3
- package/dist/interfaces/relocate.d.ts +109 -0
- package/dist/{sleep-C3AniWy-.js → sleep-DIg3xuEw.js} +4 -0
- package/dist/{sleep-ot6dTHCA.mjs → sleep-DcA-CgqX.mjs} +4 -0
- package/package.json +1 -1
|
@@ -366,6 +366,122 @@ export type SceneMonitorState = z.infer<typeof SceneMonitorStateSchema>;
|
|
|
366
366
|
export type SceneCheck = z.infer<typeof SceneCheckSchema>;
|
|
367
367
|
export type SceneMonitor = z.infer<typeof SceneMonitorSchema>;
|
|
368
368
|
export type SceneMonitorStatus = z.infer<typeof SceneMonitorStatusSchema>;
|
|
369
|
+
/**
|
|
370
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
371
|
+
*
|
|
372
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
373
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
374
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
375
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
376
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
377
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
378
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
379
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
380
|
+
*
|
|
381
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
382
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
383
|
+
*/
|
|
384
|
+
export declare const SceneMonitorStatusForDeviceSchema: z.ZodObject<{
|
|
385
|
+
deviceId: z.ZodNumber;
|
|
386
|
+
status: z.ZodNullable<z.ZodObject<{
|
|
387
|
+
monitors: z.ZodArray<z.ZodObject<{
|
|
388
|
+
id: z.ZodString;
|
|
389
|
+
label: z.ZodString;
|
|
390
|
+
roi: z.ZodObject<{
|
|
391
|
+
kind: z.ZodLiteral<"rect">;
|
|
392
|
+
x: z.ZodNumber;
|
|
393
|
+
y: z.ZodNumber;
|
|
394
|
+
width: z.ZodNumber;
|
|
395
|
+
height: z.ZodNumber;
|
|
396
|
+
}, z.core.$strip>;
|
|
397
|
+
enabled: z.ZodBoolean;
|
|
398
|
+
triggerMode: z.ZodEnum<{
|
|
399
|
+
periodic: "periodic";
|
|
400
|
+
both: "both";
|
|
401
|
+
"on-motion": "on-motion";
|
|
402
|
+
}>;
|
|
403
|
+
checkIntervalSec: z.ZodOptional<z.ZodNumber>;
|
|
404
|
+
check: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
405
|
+
mode: z.ZodLiteral<"similarity">;
|
|
406
|
+
threshold: z.ZodNumber;
|
|
407
|
+
hysteresisCount: z.ZodNumber;
|
|
408
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
409
|
+
mode: z.ZodLiteral<"llm">;
|
|
410
|
+
prompt: z.ZodString;
|
|
411
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
412
|
+
hysteresisCount: z.ZodNumber;
|
|
413
|
+
}, z.core.$strip>], "mode">;
|
|
414
|
+
states: z.ZodArray<z.ZodObject<{
|
|
415
|
+
id: z.ZodString;
|
|
416
|
+
label: z.ZodString;
|
|
417
|
+
references: z.ZodArray<z.ZodObject<{
|
|
418
|
+
embedding: z.ZodArray<z.ZodNumber>;
|
|
419
|
+
modelId: z.ZodString;
|
|
420
|
+
condition: z.ZodString;
|
|
421
|
+
capturedAt: z.ZodNumber;
|
|
422
|
+
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
423
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
424
|
+
}, z.core.$strip>>;
|
|
425
|
+
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
426
|
+
referenceCount: z.ZodNumber;
|
|
427
|
+
currentlyMatched: z.ZodBoolean;
|
|
428
|
+
}, z.core.$strip>>;
|
|
429
|
+
currentStateId: z.ZodNullable<z.ZodString>;
|
|
430
|
+
lastCheckedAt: z.ZodNullable<z.ZodNumber>;
|
|
431
|
+
lastConfidence: z.ZodNullable<z.ZodNumber>;
|
|
432
|
+
currentCondition: z.ZodNullable<z.ZodString>;
|
|
433
|
+
availability: z.ZodEnum<{
|
|
434
|
+
ok: "ok";
|
|
435
|
+
unavailable: "unavailable";
|
|
436
|
+
}>;
|
|
437
|
+
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
438
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
439
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
440
|
+
live: "live";
|
|
441
|
+
latched: "latched";
|
|
442
|
+
}>>;
|
|
443
|
+
verdict: z.ZodEnum<{
|
|
444
|
+
unknown: "unknown";
|
|
445
|
+
matched: "matched";
|
|
446
|
+
diverged: "diverged";
|
|
447
|
+
}>;
|
|
448
|
+
latched: z.ZodBoolean;
|
|
449
|
+
armedAt: z.ZodNumber;
|
|
450
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
451
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
452
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
453
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
454
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
455
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
456
|
+
prompt: z.ZodString;
|
|
457
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
458
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
459
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
460
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
461
|
+
flip: "flip";
|
|
462
|
+
hold: "hold";
|
|
463
|
+
}>>;
|
|
464
|
+
}, z.core.$strip>>;
|
|
465
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
466
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
467
|
+
onUncoveredCondition: z.ZodDefault<z.ZodEnum<{
|
|
468
|
+
skip: "skip";
|
|
469
|
+
"judge-anyway": "judge-anyway";
|
|
470
|
+
}>>;
|
|
471
|
+
suspendedCondition: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
472
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
473
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
474
|
+
"view-shifted": "view-shifted";
|
|
475
|
+
"no-vision-profile": "no-vision-profile";
|
|
476
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
477
|
+
"no-snapshot": "no-snapshot";
|
|
478
|
+
}>>;
|
|
479
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
480
|
+
}, z.core.$strip>>;
|
|
481
|
+
lastFetchedAt: z.ZodNumber;
|
|
482
|
+
}, z.core.$strip>>;
|
|
483
|
+
}, z.core.$strip>;
|
|
484
|
+
export type SceneMonitorStatusForDevice = z.infer<typeof SceneMonitorStatusForDeviceSchema>;
|
|
369
485
|
export declare const sceneMonitorCapability: {
|
|
370
486
|
readonly name: "scene-monitor";
|
|
371
487
|
readonly scope: "device";
|
|
@@ -473,6 +589,123 @@ export declare const sceneMonitorCapability: {
|
|
|
473
589
|
}, z.core.$strip>>;
|
|
474
590
|
lastFetchedAt: z.ZodNumber;
|
|
475
591
|
}, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
592
|
+
/**
|
|
593
|
+
* The same answer, for a SET of cameras, in one round trip.
|
|
594
|
+
*
|
|
595
|
+
* `/scenes` renders every camera and re-reads them on a 30s safety-net
|
|
596
|
+
* poll behind the push slice. Fanned out client-side that was one query
|
|
597
|
+
* per camera — 29 round trips through the browser, the hub and the
|
|
598
|
+
* post-analysis runner every 30 seconds to read an in-memory map the
|
|
599
|
+
* owner had already merged. The work is unchanged (`statusFor` per
|
|
600
|
+
* device, all in-process at the owner); what collapses is the transport.
|
|
601
|
+
*
|
|
602
|
+
* A camera that cannot answer still gets a row, with `status: null` —
|
|
603
|
+
* see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
|
|
604
|
+
* ids: a caller that asked for twenty-nine and got twenty-seven cannot
|
|
605
|
+
* tell which two are missing, or that any are.
|
|
606
|
+
*/
|
|
607
|
+
readonly listScenesBatch: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
608
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
609
|
+
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
610
|
+
deviceId: z.ZodNumber;
|
|
611
|
+
status: z.ZodNullable<z.ZodObject<{
|
|
612
|
+
monitors: z.ZodArray<z.ZodObject<{
|
|
613
|
+
id: z.ZodString;
|
|
614
|
+
label: z.ZodString;
|
|
615
|
+
roi: z.ZodObject<{
|
|
616
|
+
kind: z.ZodLiteral<"rect">;
|
|
617
|
+
x: z.ZodNumber;
|
|
618
|
+
y: z.ZodNumber;
|
|
619
|
+
width: z.ZodNumber;
|
|
620
|
+
height: z.ZodNumber;
|
|
621
|
+
}, z.core.$strip>;
|
|
622
|
+
enabled: z.ZodBoolean;
|
|
623
|
+
triggerMode: z.ZodEnum<{
|
|
624
|
+
periodic: "periodic";
|
|
625
|
+
both: "both";
|
|
626
|
+
"on-motion": "on-motion";
|
|
627
|
+
}>;
|
|
628
|
+
checkIntervalSec: z.ZodOptional<z.ZodNumber>;
|
|
629
|
+
check: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
630
|
+
mode: z.ZodLiteral<"similarity">;
|
|
631
|
+
threshold: z.ZodNumber;
|
|
632
|
+
hysteresisCount: z.ZodNumber;
|
|
633
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
634
|
+
mode: z.ZodLiteral<"llm">;
|
|
635
|
+
prompt: z.ZodString;
|
|
636
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
637
|
+
hysteresisCount: z.ZodNumber;
|
|
638
|
+
}, z.core.$strip>], "mode">;
|
|
639
|
+
states: z.ZodArray<z.ZodObject<{
|
|
640
|
+
id: z.ZodString;
|
|
641
|
+
label: z.ZodString;
|
|
642
|
+
references: z.ZodArray<z.ZodObject<{
|
|
643
|
+
embedding: z.ZodArray<z.ZodNumber>;
|
|
644
|
+
modelId: z.ZodString;
|
|
645
|
+
condition: z.ZodString;
|
|
646
|
+
capturedAt: z.ZodNumber;
|
|
647
|
+
thumbnailMediaId: z.ZodOptional<z.ZodString>;
|
|
648
|
+
anchorEmbedding: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
649
|
+
}, z.core.$strip>>;
|
|
650
|
+
textPrompts: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
651
|
+
referenceCount: z.ZodNumber;
|
|
652
|
+
currentlyMatched: z.ZodBoolean;
|
|
653
|
+
}, z.core.$strip>>;
|
|
654
|
+
currentStateId: z.ZodNullable<z.ZodString>;
|
|
655
|
+
lastCheckedAt: z.ZodNullable<z.ZodNumber>;
|
|
656
|
+
lastConfidence: z.ZodNullable<z.ZodNumber>;
|
|
657
|
+
currentCondition: z.ZodNullable<z.ZodString>;
|
|
658
|
+
availability: z.ZodEnum<{
|
|
659
|
+
ok: "ok";
|
|
660
|
+
unavailable: "unavailable";
|
|
661
|
+
}>;
|
|
662
|
+
unavailableReason: z.ZodNullable<z.ZodString>;
|
|
663
|
+
baselineStateId: z.ZodNullable<z.ZodString>;
|
|
664
|
+
emit: z.ZodDefault<z.ZodEnum<{
|
|
665
|
+
live: "live";
|
|
666
|
+
latched: "latched";
|
|
667
|
+
}>>;
|
|
668
|
+
verdict: z.ZodEnum<{
|
|
669
|
+
unknown: "unknown";
|
|
670
|
+
matched: "matched";
|
|
671
|
+
diverged: "diverged";
|
|
672
|
+
}>;
|
|
673
|
+
latched: z.ZodBoolean;
|
|
674
|
+
armedAt: z.ZodNumber;
|
|
675
|
+
divergedAt: z.ZodNullable<z.ZodNumber>;
|
|
676
|
+
restoredAt: z.ZodNullable<z.ZodNumber>;
|
|
677
|
+
quietSeconds: z.ZodDefault<z.ZodNumber>;
|
|
678
|
+
minObservationSpacingSec: z.ZodDefault<z.ZodNumber>;
|
|
679
|
+
confirm: z.ZodOptional<z.ZodObject<{
|
|
680
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
681
|
+
prompt: z.ZodString;
|
|
682
|
+
profileId: z.ZodOptional<z.ZodString>;
|
|
683
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
684
|
+
maxImagePx: z.ZodDefault<z.ZodNumber>;
|
|
685
|
+
onTimeout: z.ZodDefault<z.ZodEnum<{
|
|
686
|
+
flip: "flip";
|
|
687
|
+
hold: "hold";
|
|
688
|
+
}>>;
|
|
689
|
+
}, z.core.$strip>>;
|
|
690
|
+
anchorThreshold: z.ZodDefault<z.ZodNumber>;
|
|
691
|
+
autoRestore: z.ZodDefault<z.ZodBoolean>;
|
|
692
|
+
onUncoveredCondition: z.ZodDefault<z.ZodEnum<{
|
|
693
|
+
skip: "skip";
|
|
694
|
+
"judge-anyway": "judge-anyway";
|
|
695
|
+
}>>;
|
|
696
|
+
suspendedCondition: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
697
|
+
unavailable: z.ZodNullable<z.ZodEnum<{
|
|
698
|
+
"no-reference-for-condition": "no-reference-for-condition";
|
|
699
|
+
"view-shifted": "view-shifted";
|
|
700
|
+
"no-vision-profile": "no-vision-profile";
|
|
701
|
+
"encoder-model-changed": "encoder-model-changed";
|
|
702
|
+
"no-snapshot": "no-snapshot";
|
|
703
|
+
}>>;
|
|
704
|
+
coveredConditions: z.ZodArray<z.ZodString>;
|
|
705
|
+
}, z.core.$strip>>;
|
|
706
|
+
lastFetchedAt: z.ZodNumber;
|
|
707
|
+
}, z.core.$strip>>;
|
|
708
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
476
709
|
readonly createScene: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
477
710
|
deviceId: z.ZodNumber;
|
|
478
711
|
label: z.ZodString;
|
|
@@ -187,6 +187,7 @@ export declare const storageMigrationCapability: {
|
|
|
187
187
|
bytesMoved: z.ZodNumber;
|
|
188
188
|
filesTotal: z.ZodNullable<z.ZodNumber>;
|
|
189
189
|
rowsReconciled: z.ZodOptional<z.ZodNumber>;
|
|
190
|
+
rowsForgotten: z.ZodOptional<z.ZodNumber>;
|
|
190
191
|
startedAt: z.ZodNumber;
|
|
191
192
|
finishedAt: z.ZodNullable<z.ZodNumber>;
|
|
192
193
|
error: z.ZodNullable<z.ZodString>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type InferProvider } from './capability-definition.js';
|
|
3
2
|
import { StorageLocationTypeSchema } from '../interfaces/storage-location.js';
|
|
3
|
+
import { type InferProvider } from './capability-definition.js';
|
|
4
4
|
/**
|
|
5
5
|
* `storage` — singleton consumer-facing capability owned by the
|
|
6
6
|
* `storage-orchestrator` builtin (Task 4 of the storage-unification
|
|
@@ -214,6 +214,7 @@ export declare const storageCapability: {
|
|
|
214
214
|
}, z.core.$strip>], "shouldSaveDiskSpace">>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
215
215
|
readonly testConfig: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
216
216
|
providerId: z.ZodString;
|
|
217
|
+
locationId: z.ZodOptional<z.ZodString>;
|
|
217
218
|
config: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
218
219
|
}, z.core.$strip>, z.ZodObject<{
|
|
219
220
|
ok: z.ZodBoolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { type InferProvider } from './capability-definition.js';
|
|
3
2
|
import { DeviceType } from '../device/device-type.js';
|
|
3
|
+
import { type InferProvider } from './capability-definition.js';
|
|
4
4
|
/**
|
|
5
5
|
* Per-zone occupancy aggregation produced by the analytics frame
|
|
6
6
|
* processor on every inference result. Covers the full combinatorial
|
|
@@ -93,6 +93,67 @@ export declare const CameraOccupancySnapshotSchema: z.ZodObject<{
|
|
|
93
93
|
}, z.core.$strip>>>>;
|
|
94
94
|
}, z.core.$strip>;
|
|
95
95
|
export type CameraOccupancySnapshot = z.infer<typeof CameraOccupancySnapshotSchema>;
|
|
96
|
+
/**
|
|
97
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
98
|
+
*
|
|
99
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
100
|
+
* because `snapshot: null` was already spoken for:
|
|
101
|
+
*
|
|
102
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
103
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
104
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
105
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
106
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
107
|
+
*
|
|
108
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
109
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
110
|
+
* which is a definite claim about a camera nobody could read.
|
|
111
|
+
*/
|
|
112
|
+
export declare const CameraOccupancySnapshotForDeviceSchema: z.ZodObject<{
|
|
113
|
+
deviceId: z.ZodNumber;
|
|
114
|
+
read: z.ZodEnum<{
|
|
115
|
+
read: "read";
|
|
116
|
+
unreadable: "unreadable";
|
|
117
|
+
}>;
|
|
118
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
119
|
+
ts: z.ZodNumber;
|
|
120
|
+
frameWidth: z.ZodNumber;
|
|
121
|
+
frameHeight: z.ZodNumber;
|
|
122
|
+
zones: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
123
|
+
totalObjects: z.ZodNumber;
|
|
124
|
+
byClass: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
125
|
+
zoneId: z.ZodString;
|
|
126
|
+
zoneName: z.ZodString;
|
|
127
|
+
trackIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
128
|
+
}, z.core.$strip>>>;
|
|
129
|
+
frame: z.ZodObject<{
|
|
130
|
+
totalObjects: z.ZodNumber;
|
|
131
|
+
byClass: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
132
|
+
}, z.core.$strip>;
|
|
133
|
+
unzoned: z.ZodObject<{
|
|
134
|
+
totalObjects: z.ZodNumber;
|
|
135
|
+
byClass: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
136
|
+
}, z.core.$strip>;
|
|
137
|
+
stationaryObjects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
138
|
+
id: z.ZodString;
|
|
139
|
+
className: z.ZodString;
|
|
140
|
+
bbox: z.ZodObject<{
|
|
141
|
+
x: z.ZodNumber;
|
|
142
|
+
y: z.ZodNumber;
|
|
143
|
+
w: z.ZodNumber;
|
|
144
|
+
h: z.ZodNumber;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
frameWidth: z.ZodNumber;
|
|
147
|
+
frameHeight: z.ZodNumber;
|
|
148
|
+
firstSeenAt: z.ZodNumber;
|
|
149
|
+
becameStationaryAt: z.ZodNumber;
|
|
150
|
+
lastConfirmedAt: z.ZodNumber;
|
|
151
|
+
label: z.ZodOptional<z.ZodString>;
|
|
152
|
+
keyFrameMediaKey: z.ZodOptional<z.ZodString>;
|
|
153
|
+
}, z.core.$strip>>>>;
|
|
154
|
+
}, z.core.$strip>>;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
export type CameraOccupancySnapshotForDevice = z.infer<typeof CameraOccupancySnapshotForDeviceSchema>;
|
|
96
157
|
export type ZoneScopeBreakdown = z.infer<typeof ZoneScopeBreakdownSchema>;
|
|
97
158
|
export type PerScopeBreakdown = z.infer<typeof PerScopeBreakdownSchema>;
|
|
98
159
|
/**
|
|
@@ -192,6 +253,65 @@ export declare const zoneAnalyticsCapability: {
|
|
|
192
253
|
keyFrameMediaKey: z.ZodOptional<z.ZodString>;
|
|
193
254
|
}, z.core.$strip>>>>;
|
|
194
255
|
}, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
256
|
+
/**
|
|
257
|
+
* The same snapshot, for a SET of cameras, in one round trip.
|
|
258
|
+
*
|
|
259
|
+
* The Events page's Stationary section polls this every 15s for every
|
|
260
|
+
* selected camera. Fanned out client-side that is one query per camera to
|
|
261
|
+
* read a `Map.get` at the owner — the answer costs nothing, the round trip
|
|
262
|
+
* costs everything. Batched, N transports become one and the per-device
|
|
263
|
+
* work is unchanged.
|
|
264
|
+
*
|
|
265
|
+
* Every requested deviceId gets a row, tagged `read` — see
|
|
266
|
+
* {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
|
|
267
|
+
* not answer for is `'unreadable'`, never an empty reading.
|
|
268
|
+
*/
|
|
269
|
+
readonly getCurrentSnapshotBatch: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
270
|
+
deviceIds: z.ZodArray<z.ZodNumber>;
|
|
271
|
+
}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
272
|
+
deviceId: z.ZodNumber;
|
|
273
|
+
read: z.ZodEnum<{
|
|
274
|
+
read: "read";
|
|
275
|
+
unreadable: "unreadable";
|
|
276
|
+
}>;
|
|
277
|
+
snapshot: z.ZodNullable<z.ZodObject<{
|
|
278
|
+
ts: z.ZodNumber;
|
|
279
|
+
frameWidth: z.ZodNumber;
|
|
280
|
+
frameHeight: z.ZodNumber;
|
|
281
|
+
zones: z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
282
|
+
totalObjects: z.ZodNumber;
|
|
283
|
+
byClass: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
284
|
+
zoneId: z.ZodString;
|
|
285
|
+
zoneName: z.ZodString;
|
|
286
|
+
trackIds: z.ZodReadonly<z.ZodArray<z.ZodString>>;
|
|
287
|
+
}, z.core.$strip>>>;
|
|
288
|
+
frame: z.ZodObject<{
|
|
289
|
+
totalObjects: z.ZodNumber;
|
|
290
|
+
byClass: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
291
|
+
}, z.core.$strip>;
|
|
292
|
+
unzoned: z.ZodObject<{
|
|
293
|
+
totalObjects: z.ZodNumber;
|
|
294
|
+
byClass: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
stationaryObjects: z.ZodOptional<z.ZodReadonly<z.ZodArray<z.ZodObject<{
|
|
297
|
+
id: z.ZodString;
|
|
298
|
+
className: z.ZodString;
|
|
299
|
+
bbox: z.ZodObject<{
|
|
300
|
+
x: z.ZodNumber;
|
|
301
|
+
y: z.ZodNumber;
|
|
302
|
+
w: z.ZodNumber;
|
|
303
|
+
h: z.ZodNumber;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
frameWidth: z.ZodNumber;
|
|
306
|
+
frameHeight: z.ZodNumber;
|
|
307
|
+
firstSeenAt: z.ZodNumber;
|
|
308
|
+
becameStationaryAt: z.ZodNumber;
|
|
309
|
+
lastConfirmedAt: z.ZodNumber;
|
|
310
|
+
label: z.ZodOptional<z.ZodString>;
|
|
311
|
+
keyFrameMediaKey: z.ZodOptional<z.ZodString>;
|
|
312
|
+
}, z.core.$strip>>>>;
|
|
313
|
+
}, z.core.$strip>>;
|
|
314
|
+
}, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
|
|
195
315
|
/** Time-series object count inside one zone. `className` optional —
|
|
196
316
|
* omit to count every class in the zone. */
|
|
197
317
|
readonly getZoneHistory: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
|
|
@@ -293,4 +413,4 @@ export declare const zoneAnalyticsCapability: {
|
|
|
293
413
|
readonly durability: "session";
|
|
294
414
|
};
|
|
295
415
|
export type IZoneAnalyticsProvider = InferProvider<typeof zoneAnalyticsCapability>;
|
|
296
|
-
export { CameraOccupancySnapshotSchema as _CameraOccupancySnapshotSchema,
|
|
416
|
+
export { CameraOccupancySnapshotSchema as _CameraOccupancySnapshotSchema, HistoryPointSchema, HistoryRangeSchema, HistoryResolutionEnum, PerScopeBreakdownSchema, StationaryObjectSchema, ZoneScopeBreakdownSchema, };
|
|
@@ -5002,6 +5002,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
5002
5002
|
output: z.infer<typeof pipelineAnalyticsCapability.methods.getKeyEvents.output>;
|
|
5003
5003
|
meta: object;
|
|
5004
5004
|
}>;
|
|
5005
|
+
getKeyEventsBatch: TRPCQueryProcedure<{
|
|
5006
|
+
input: {
|
|
5007
|
+
[x: string]: unknown;
|
|
5008
|
+
} & z.input<typeof pipelineAnalyticsCapability.methods.getKeyEventsBatch.input>;
|
|
5009
|
+
output: z.infer<typeof pipelineAnalyticsCapability.methods.getKeyEventsBatch.output>;
|
|
5010
|
+
meta: object;
|
|
5011
|
+
}>;
|
|
5005
5012
|
getEventDensity: TRPCQueryProcedure<{
|
|
5006
5013
|
input: {
|
|
5007
5014
|
[x: string]: unknown;
|
|
@@ -5058,6 +5065,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
5058
5065
|
output: z.infer<typeof pipelineAnalyticsCapability.methods.getEventStoreFootprint.output>;
|
|
5059
5066
|
meta: object;
|
|
5060
5067
|
}>;
|
|
5068
|
+
getEventMediaFootprintByKind: TRPCQueryProcedure<{
|
|
5069
|
+
input: {
|
|
5070
|
+
[x: string]: unknown;
|
|
5071
|
+
} & z.input<typeof pipelineAnalyticsCapability.methods.getEventMediaFootprintByKind.input>;
|
|
5072
|
+
output: z.infer<typeof pipelineAnalyticsCapability.methods.getEventMediaFootprintByKind.output>;
|
|
5073
|
+
meta: object;
|
|
5074
|
+
}>;
|
|
5061
5075
|
pruneEvents: TRPCMutationProcedure<{
|
|
5062
5076
|
input: {
|
|
5063
5077
|
[x: string]: unknown;
|
|
@@ -6599,6 +6613,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
6599
6613
|
output: z.infer<typeof recordingCapability.methods.getRelocateResidue.output>;
|
|
6600
6614
|
meta: object;
|
|
6601
6615
|
}>;
|
|
6616
|
+
reconcileLedgerAgainstDisk: TRPCMutationProcedure<{
|
|
6617
|
+
input: {
|
|
6618
|
+
[x: string]: unknown;
|
|
6619
|
+
} & z.input<typeof recordingCapability.methods.reconcileLedgerAgainstDisk.input>;
|
|
6620
|
+
output: z.infer<typeof recordingCapability.methods.reconcileLedgerAgainstDisk.output>;
|
|
6621
|
+
meta: object;
|
|
6622
|
+
}>;
|
|
6602
6623
|
cancelRelocateJob: TRPCMutationProcedure<{
|
|
6603
6624
|
input: {
|
|
6604
6625
|
[x: string]: unknown;
|
|
@@ -6697,6 +6718,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
6697
6718
|
output: z.infer<typeof sceneMonitorCapability.methods.listScenes.output>;
|
|
6698
6719
|
meta: object;
|
|
6699
6720
|
}>;
|
|
6721
|
+
listScenesBatch: TRPCQueryProcedure<{
|
|
6722
|
+
input: {
|
|
6723
|
+
[x: string]: unknown;
|
|
6724
|
+
} & z.input<typeof sceneMonitorCapability.methods.listScenesBatch.input>;
|
|
6725
|
+
output: z.infer<typeof sceneMonitorCapability.methods.listScenesBatch.output>;
|
|
6726
|
+
meta: object;
|
|
6727
|
+
}>;
|
|
6700
6728
|
createScene: TRPCMutationProcedure<{
|
|
6701
6729
|
input: {
|
|
6702
6730
|
[x: string]: unknown;
|
|
@@ -8669,6 +8697,13 @@ export type AppRouter = TrpcCoreRouter<{
|
|
|
8669
8697
|
output: z.infer<typeof zoneAnalyticsCapability.methods.getCurrentSnapshot.output>;
|
|
8670
8698
|
meta: object;
|
|
8671
8699
|
}>;
|
|
8700
|
+
getCurrentSnapshotBatch: TRPCQueryProcedure<{
|
|
8701
|
+
input: {
|
|
8702
|
+
[x: string]: unknown;
|
|
8703
|
+
} & z.input<typeof zoneAnalyticsCapability.methods.getCurrentSnapshotBatch.input>;
|
|
8704
|
+
output: z.infer<typeof zoneAnalyticsCapability.methods.getCurrentSnapshotBatch.output>;
|
|
8705
|
+
meta: object;
|
|
8706
|
+
}>;
|
|
8672
8707
|
getZoneHistory: TRPCQueryProcedure<{
|
|
8673
8708
|
input: {
|
|
8674
8709
|
[x: string]: unknown;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Plain data, zero Zod: a forked runner must not import the schema barrel
|
|
12
12
|
* (~144MB RSS per runner — D28).
|
|
13
13
|
*
|
|
14
|
-
* Coverage: 24 caps,
|
|
14
|
+
* Coverage: 24 caps, 55 methods with defaults.
|
|
15
15
|
*/
|
|
16
16
|
export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
|
|
17
17
|
/**
|
|
@@ -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:
|
|
9
|
+
* Coverage: 992 method paths across 126 capabilities.
|
|
10
10
|
*/
|
|
11
11
|
import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
|
|
12
12
|
export interface MethodAccessRecord {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* system-scope cap that takes a deviceId was previously never device-filtered
|
|
7
7
|
* — see the generator header).
|
|
8
8
|
*
|
|
9
|
-
* Coverage:
|
|
10
|
-
*
|
|
9
|
+
* Coverage: 351 methods carry a device reference, of which
|
|
10
|
+
* 130 are on SYSTEM-scope caps.
|
|
11
11
|
*
|
|
12
12
|
* Top-level fields, number arrays, and one-level arrays of objects carrying
|
|
13
13
|
* a numeric device field (targets[].deviceId) are all mapped; the matcher
|
|
@@ -87,7 +87,7 @@ export interface SystemProxy {
|
|
|
87
87
|
readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentDetectWeight' | 'setAgentCapabilities' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'getCameraStatuses' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
|
|
88
88
|
readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop' | 'runStatelessStep'>;
|
|
89
89
|
readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
|
|
90
|
-
readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'getRelocateResidue' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance'>;
|
|
90
|
+
readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'getRelocateResidue' | 'reconcileLedgerAgainstDisk' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance'>;
|
|
91
91
|
readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'createExport' | 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl' | 'readExportBytes'>;
|
|
92
92
|
readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
|
|
93
93
|
readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'insert' | 'insertMany' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'aggregate' | 'histogram' | 'isEmpty' | 'declareCollection'>;
|