@camstack/types 0.1.1 → 0.1.2
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/index.d.mts +3757 -108
- package/dist/index.d.ts +3757 -108
- package/dist/index.js +377 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +369 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +14 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as _trpc_server from '@trpc/server';
|
|
1
2
|
import { ChildProcess } from 'node:child_process';
|
|
2
3
|
|
|
3
4
|
interface BoundingBox {
|
|
@@ -37,6 +38,54 @@ interface ClassMapDefinition {
|
|
|
37
38
|
readonly preserveOriginal: boolean;
|
|
38
39
|
}
|
|
39
40
|
|
|
41
|
+
/** Zone purpose per pipeline stage */
|
|
42
|
+
type ZoneMode = 'include' | 'exclude' | 'monitor';
|
|
43
|
+
/** Motion event source for a camera */
|
|
44
|
+
type MotionSource = 'sensor' | 'stream' | 'smart';
|
|
45
|
+
/** A polygon zone with independent motion/detection behavior */
|
|
46
|
+
interface CameraZone {
|
|
47
|
+
readonly id: string;
|
|
48
|
+
readonly name: string;
|
|
49
|
+
/** Polygon vertices as fraction of frame (0–1) */
|
|
50
|
+
readonly polygon: readonly {
|
|
51
|
+
readonly x: number;
|
|
52
|
+
readonly y: number;
|
|
53
|
+
}[];
|
|
54
|
+
/** Zone purpose for motion detection stage */
|
|
55
|
+
readonly motionMode: ZoneMode;
|
|
56
|
+
/** Zone purpose for pipeline detection stage */
|
|
57
|
+
readonly detectionMode: ZoneMode;
|
|
58
|
+
/** Minimum overlap fraction (0–1) for bbox/mask to count as "in zone" */
|
|
59
|
+
readonly overlapThreshold: number;
|
|
60
|
+
/** Use segmentation mask for overlap when available (vs bbox only) */
|
|
61
|
+
readonly preferMask: boolean;
|
|
62
|
+
/** Only apply to these detection classes (empty/undefined = all) */
|
|
63
|
+
readonly classFilter?: readonly string[];
|
|
64
|
+
/** Seconds of no movement before emitting stationary alert for this zone */
|
|
65
|
+
readonly stationaryAlertSeconds?: number;
|
|
66
|
+
/** Visual color for UI rendering */
|
|
67
|
+
readonly color: string;
|
|
68
|
+
}
|
|
69
|
+
/** Per-camera zone configuration */
|
|
70
|
+
interface CameraZoneConfig {
|
|
71
|
+
readonly deviceId: string;
|
|
72
|
+
readonly zones: readonly CameraZone[];
|
|
73
|
+
/** Auto-generate rectangular border exclusion zone */
|
|
74
|
+
readonly autoBorderExclude: {
|
|
75
|
+
readonly enabled: boolean;
|
|
76
|
+
/** Fraction of frame edge to exclude (0–0.2 typical) */
|
|
77
|
+
readonly percent: number;
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** Zone membership annotation on a detection */
|
|
81
|
+
interface DetectionZoneMembership {
|
|
82
|
+
readonly zoneId: string;
|
|
83
|
+
readonly zoneName: string;
|
|
84
|
+
/** Overlap fraction 0–1 */
|
|
85
|
+
readonly overlap: number;
|
|
86
|
+
readonly mode: ZoneMode;
|
|
87
|
+
}
|
|
88
|
+
|
|
40
89
|
interface SpatialDetection {
|
|
41
90
|
readonly class: string;
|
|
42
91
|
readonly originalClass: string;
|
|
@@ -74,6 +123,59 @@ interface ClassifierOutput {
|
|
|
74
123
|
readonly inferenceMs: number;
|
|
75
124
|
readonly modelId: string;
|
|
76
125
|
}
|
|
126
|
+
interface RefinerOutput {
|
|
127
|
+
/** Base64-encoded binary mask for the refined detection region */
|
|
128
|
+
readonly mask: string;
|
|
129
|
+
readonly maskWidth: number;
|
|
130
|
+
readonly maskHeight: number;
|
|
131
|
+
readonly inferenceMs: number;
|
|
132
|
+
readonly modelId: string;
|
|
133
|
+
}
|
|
134
|
+
/** Origin type of a label — what kind of pipeline step produced it */
|
|
135
|
+
type LabelOrigin = 'classification' | 'face' | 'plate' | 'recognition' | 'unknown';
|
|
136
|
+
/** A label produced by any classifier/recognizer step in the pipeline */
|
|
137
|
+
interface LabelData {
|
|
138
|
+
/** The classification/recognition result (e.g., "Sunbird", "EA0202AA", "Dodge Journey SUV 2012") */
|
|
139
|
+
readonly label: string;
|
|
140
|
+
/** Confidence of the classification */
|
|
141
|
+
readonly score: number;
|
|
142
|
+
/** Bounding box of the source region this label applies to [x1, y1, x2, y2] */
|
|
143
|
+
readonly box: readonly [number, number, number, number];
|
|
144
|
+
/** Source addon that produced this label */
|
|
145
|
+
readonly addonId: string;
|
|
146
|
+
/** Origin type — what kind of step produced this label */
|
|
147
|
+
readonly origin: LabelOrigin;
|
|
148
|
+
}
|
|
149
|
+
/** A detection produced by the pipeline executor with accumulated labels */
|
|
150
|
+
interface PipelineDetection {
|
|
151
|
+
readonly className: string;
|
|
152
|
+
readonly originalClass?: string;
|
|
153
|
+
readonly confidence: number;
|
|
154
|
+
readonly bbox: readonly [number, number, number, number];
|
|
155
|
+
/** Accumulated labels from all classifier/recognizer steps in the pipeline */
|
|
156
|
+
readonly labelsData: readonly LabelData[];
|
|
157
|
+
/** Base64-encoded binary segmentation mask (when using -seg models or refiner) */
|
|
158
|
+
readonly mask?: string;
|
|
159
|
+
readonly maskWidth?: number;
|
|
160
|
+
readonly maskHeight?: number;
|
|
161
|
+
/** Sub-detections from cropper steps (face bbox, plate bbox) — for debug */
|
|
162
|
+
readonly children?: readonly PipelineDetection[];
|
|
163
|
+
readonly zones?: readonly DetectionZoneMembership[];
|
|
164
|
+
readonly embeddingId?: string;
|
|
165
|
+
}
|
|
166
|
+
interface PipelineStepTiming {
|
|
167
|
+
readonly addonId: string;
|
|
168
|
+
readonly modelId: string;
|
|
169
|
+
readonly ms: number;
|
|
170
|
+
readonly detections: number;
|
|
171
|
+
}
|
|
172
|
+
interface PipelineRunResult {
|
|
173
|
+
readonly detections: readonly PipelineDetection[];
|
|
174
|
+
readonly stepTimings: readonly PipelineStepTiming[];
|
|
175
|
+
readonly totalMs: number;
|
|
176
|
+
readonly imageWidth: number;
|
|
177
|
+
readonly imageHeight: number;
|
|
178
|
+
}
|
|
77
179
|
|
|
78
180
|
type ObjectState = 'entering' | 'moving' | 'stationary' | 'leaving' | 'loitering';
|
|
79
181
|
interface TrackedDetection extends SpatialDetection {
|
|
@@ -95,6 +197,8 @@ interface TrackedObjectState {
|
|
|
95
197
|
}
|
|
96
198
|
|
|
97
199
|
type DetectionEventType = 'object.detected' | 'object.classified' | 'object.entering' | 'object.leaving' | 'object.stationary' | 'object.loitering' | 'zone.enter' | 'zone.exit' | 'tripwire.cross' | 'audio.detected';
|
|
200
|
+
type TrackEventType = 'track.new' | 'track.update' | 'track.stationary' | 'track.moving' | 'track.zone-enter' | 'track.zone-exit' | 'track.zone-dwell' | 'track.ended';
|
|
201
|
+
type AnalysisEventType = DetectionEventType | TrackEventType;
|
|
98
202
|
interface ZoneEvent {
|
|
99
203
|
readonly type: 'zone-enter' | 'zone-exit' | 'zone-loiter' | 'tripwire-cross';
|
|
100
204
|
readonly zoneId: string;
|
|
@@ -196,10 +300,29 @@ interface KnownAudioEvent {
|
|
|
196
300
|
}
|
|
197
301
|
|
|
198
302
|
type ModelFormat$1 = 'onnx' | 'coreml' | 'openvino' | 'tflite' | 'pt';
|
|
199
|
-
type ModelOutputFormat = 'yolo' | 'ssd' | 'embedding' | 'classification' | 'ocr';
|
|
303
|
+
type ModelOutputFormat = 'yolo' | 'ssd' | 'embedding' | 'classification' | 'ocr' | 'segmentation';
|
|
200
304
|
interface ModelFormatEntry {
|
|
201
305
|
readonly url: string;
|
|
202
306
|
readonly sizeMB: number;
|
|
307
|
+
/** Whether this format is a directory bundle (e.g., .mlpackage) rather than a single file */
|
|
308
|
+
readonly isDirectory?: boolean;
|
|
309
|
+
/**
|
|
310
|
+
* For directory formats: list of files relative to the directory root.
|
|
311
|
+
* The downloader fetches each file from `{url}/{file}` and saves to `{modelDir}/{file}`.
|
|
312
|
+
* If omitted for a directory format, the downloader probes HuggingFace API (slower).
|
|
313
|
+
*/
|
|
314
|
+
readonly files?: readonly string[];
|
|
315
|
+
/** Runtime(s) that can use this format. If omitted, inferred from ModelFormat key */
|
|
316
|
+
readonly runtimes?: readonly ('node' | 'python')[];
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Extra file that must be downloaded alongside the model (e.g., labels JSON, dict.txt).
|
|
320
|
+
* The downloader fetches from `url` and saves to `{modelsDir}/{filename}`.
|
|
321
|
+
*/
|
|
322
|
+
interface ModelExtraFile {
|
|
323
|
+
readonly url: string;
|
|
324
|
+
readonly filename: string;
|
|
325
|
+
readonly sizeMB: number;
|
|
203
326
|
}
|
|
204
327
|
interface ModelCatalogEntry {
|
|
205
328
|
readonly id: string;
|
|
@@ -213,6 +336,11 @@ interface ModelCatalogEntry {
|
|
|
213
336
|
readonly labels: readonly LabelDefinition[];
|
|
214
337
|
readonly inputLayout?: 'nchw' | 'nhwc';
|
|
215
338
|
readonly inputNormalization?: 'zero-one' | 'imagenet' | 'none';
|
|
339
|
+
/**
|
|
340
|
+
* Auxiliary files required at runtime (labels JSON, charset dict, etc.).
|
|
341
|
+
* Downloaded into the same modelsDir alongside the model file.
|
|
342
|
+
*/
|
|
343
|
+
readonly extraFiles?: readonly ModelExtraFile[];
|
|
216
344
|
}
|
|
217
345
|
interface DetectionModel {
|
|
218
346
|
readonly id: string;
|
|
@@ -249,7 +377,7 @@ interface CustomModelMetadata {
|
|
|
249
377
|
readonly outputFormat: ModelOutputFormat;
|
|
250
378
|
}
|
|
251
379
|
|
|
252
|
-
type PipelineSlot = 'detector' | 'cropper' | 'classifier';
|
|
380
|
+
type PipelineSlot = 'detector' | 'cropper' | 'classifier' | 'refiner';
|
|
253
381
|
interface PipelineNode {
|
|
254
382
|
readonly step: string;
|
|
255
383
|
readonly addon: string;
|
|
@@ -275,7 +403,7 @@ interface StepError {
|
|
|
275
403
|
interface StepResult {
|
|
276
404
|
readonly addon: string;
|
|
277
405
|
readonly slot: PipelineSlot;
|
|
278
|
-
readonly output: DetectorOutput | CropperOutput | ClassifierOutput;
|
|
406
|
+
readonly output: DetectorOutput | CropperOutput | ClassifierOutput | RefinerOutput;
|
|
279
407
|
readonly parentResultId?: string;
|
|
280
408
|
readonly resultId: string;
|
|
281
409
|
readonly inferenceMs: number;
|
|
@@ -516,6 +644,2829 @@ interface GroundTruth {
|
|
|
516
644
|
readonly annotations: readonly GroundTruthAnnotation[];
|
|
517
645
|
}
|
|
518
646
|
|
|
647
|
+
interface PipelineAddonSchema {
|
|
648
|
+
readonly id: string;
|
|
649
|
+
readonly name: string;
|
|
650
|
+
readonly slot: PipelineSlot;
|
|
651
|
+
readonly inputClasses: readonly string[];
|
|
652
|
+
readonly outputClasses: readonly string[];
|
|
653
|
+
/** Which child slots this addon can host (e.g. detector hosts cropper/classifier) */
|
|
654
|
+
readonly childSlots: readonly PipelineSlot[];
|
|
655
|
+
/** Available models with download status per format */
|
|
656
|
+
readonly models: readonly PipelineModelOption[];
|
|
657
|
+
readonly defaultModelId: string;
|
|
658
|
+
readonly defaultConfidence: number;
|
|
659
|
+
/** Best runtime for this addon on this agent — resolved by PlatformScorer */
|
|
660
|
+
readonly defaultRuntime: string;
|
|
661
|
+
/** Best backend for this addon on this agent — resolved by PlatformScorer */
|
|
662
|
+
readonly defaultBackend: string;
|
|
663
|
+
}
|
|
664
|
+
interface PipelineModelOption {
|
|
665
|
+
readonly id: string;
|
|
666
|
+
readonly name: string;
|
|
667
|
+
readonly formats: Partial<Readonly<Record<ModelFormat$1, {
|
|
668
|
+
downloaded: boolean;
|
|
669
|
+
sizeMB: number;
|
|
670
|
+
}>>>;
|
|
671
|
+
}
|
|
672
|
+
interface PipelineSlotSchema {
|
|
673
|
+
readonly id: PipelineSlot;
|
|
674
|
+
readonly label: string;
|
|
675
|
+
readonly priority: number;
|
|
676
|
+
/** Which slot is the parent (null for root detectors) */
|
|
677
|
+
readonly parentSlot: PipelineSlot | null;
|
|
678
|
+
readonly addons: readonly PipelineAddonSchema[];
|
|
679
|
+
}
|
|
680
|
+
interface PipelineSchema {
|
|
681
|
+
readonly slots: readonly PipelineSlotSchema[];
|
|
682
|
+
}
|
|
683
|
+
/** A fully-resolved pipeline step with all defaults from PlatformScorer */
|
|
684
|
+
interface PipelineDefaultStep {
|
|
685
|
+
readonly addonId: string;
|
|
686
|
+
readonly addonName: string;
|
|
687
|
+
readonly slot: PipelineSlot;
|
|
688
|
+
readonly inputClasses: readonly string[];
|
|
689
|
+
readonly outputClasses: readonly string[];
|
|
690
|
+
readonly enabled: boolean;
|
|
691
|
+
readonly agentId: string;
|
|
692
|
+
readonly runtime: string;
|
|
693
|
+
readonly backend: string;
|
|
694
|
+
readonly modelId: string;
|
|
695
|
+
readonly confidence: number;
|
|
696
|
+
readonly classFilters: readonly string[];
|
|
697
|
+
readonly children: readonly PipelineDefaultStep[];
|
|
698
|
+
}
|
|
699
|
+
interface PipelineTemplateStep {
|
|
700
|
+
readonly addonId: string;
|
|
701
|
+
readonly enabled: boolean;
|
|
702
|
+
readonly agentId: string;
|
|
703
|
+
readonly runtime: string;
|
|
704
|
+
readonly backend: string;
|
|
705
|
+
readonly modelId: string;
|
|
706
|
+
readonly confidence: number;
|
|
707
|
+
readonly classFilters: readonly string[];
|
|
708
|
+
readonly children: readonly PipelineTemplateStep[];
|
|
709
|
+
}
|
|
710
|
+
interface PipelineTemplate {
|
|
711
|
+
readonly id: string;
|
|
712
|
+
readonly name: string;
|
|
713
|
+
readonly createdAt: string;
|
|
714
|
+
readonly updatedAt: string;
|
|
715
|
+
readonly steps: readonly PipelineTemplateStep[];
|
|
716
|
+
}
|
|
717
|
+
interface TemplateValidationResult {
|
|
718
|
+
readonly valid: boolean;
|
|
719
|
+
readonly steps: readonly PipelineTemplateStep[];
|
|
720
|
+
readonly warnings: readonly string[];
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
// src/interfaces/storage-backend.ts
|
|
724
|
+
|
|
725
|
+
// src/types/device-type.ts
|
|
726
|
+
var DeviceType$2 = /* @__PURE__ */ ((DeviceType2) => {
|
|
727
|
+
DeviceType2["Camera"] = "camera";
|
|
728
|
+
return DeviceType2;
|
|
729
|
+
})(DeviceType$2 || {});
|
|
730
|
+
|
|
731
|
+
type AppRouter = _trpc_server.TRPCBuiltRouter<{
|
|
732
|
+
ctx: {
|
|
733
|
+
user: {
|
|
734
|
+
id: string;
|
|
735
|
+
username: string;
|
|
736
|
+
role: string;
|
|
737
|
+
} | null;
|
|
738
|
+
};
|
|
739
|
+
meta: object;
|
|
740
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
741
|
+
transformer: true;
|
|
742
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
743
|
+
toast?: _trpc_server.TRPCBuiltRouter<{
|
|
744
|
+
ctx: {
|
|
745
|
+
user: {
|
|
746
|
+
id: string;
|
|
747
|
+
username: string;
|
|
748
|
+
role: string;
|
|
749
|
+
} | null;
|
|
750
|
+
};
|
|
751
|
+
meta: object;
|
|
752
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
753
|
+
transformer: true;
|
|
754
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
755
|
+
onToast: _trpc_server.TRPCSubscriptionProcedure<{
|
|
756
|
+
input: void;
|
|
757
|
+
output: undefined;
|
|
758
|
+
meta: object;
|
|
759
|
+
}>;
|
|
760
|
+
}>> | undefined;
|
|
761
|
+
scopedTokens?: _trpc_server.TRPCBuiltRouter<{
|
|
762
|
+
ctx: {
|
|
763
|
+
user: {
|
|
764
|
+
id: string;
|
|
765
|
+
username: string;
|
|
766
|
+
role: string;
|
|
767
|
+
} | null;
|
|
768
|
+
};
|
|
769
|
+
meta: object;
|
|
770
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
771
|
+
transformer: true;
|
|
772
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
773
|
+
create: _trpc_server.TRPCMutationProcedure<{
|
|
774
|
+
input: {
|
|
775
|
+
name: string;
|
|
776
|
+
scopes: {
|
|
777
|
+
type: "addon" | "route-prefix" | "capability";
|
|
778
|
+
target: string;
|
|
779
|
+
}[];
|
|
780
|
+
expiresAt?: number | undefined;
|
|
781
|
+
};
|
|
782
|
+
output: {
|
|
783
|
+
token: string;
|
|
784
|
+
id: string;
|
|
785
|
+
name: string;
|
|
786
|
+
tokenPrefix: string;
|
|
787
|
+
scopes: undefined[];
|
|
788
|
+
expiresAt: number | undefined;
|
|
789
|
+
createdAt: number;
|
|
790
|
+
};
|
|
791
|
+
meta: object;
|
|
792
|
+
}>;
|
|
793
|
+
list: _trpc_server.TRPCQueryProcedure<{
|
|
794
|
+
input: void;
|
|
795
|
+
output: {
|
|
796
|
+
id: string;
|
|
797
|
+
name: string;
|
|
798
|
+
tokenPrefix: string;
|
|
799
|
+
scopes: undefined[];
|
|
800
|
+
expiresAt: number | undefined;
|
|
801
|
+
lastUsedAt: number | undefined;
|
|
802
|
+
createdAt: number;
|
|
803
|
+
}[];
|
|
804
|
+
meta: object;
|
|
805
|
+
}>;
|
|
806
|
+
revoke: _trpc_server.TRPCMutationProcedure<{
|
|
807
|
+
input: {
|
|
808
|
+
tokenId: string;
|
|
809
|
+
};
|
|
810
|
+
output: {
|
|
811
|
+
success: boolean;
|
|
812
|
+
};
|
|
813
|
+
meta: object;
|
|
814
|
+
}>;
|
|
815
|
+
}>> | undefined;
|
|
816
|
+
notifications?: _trpc_server.TRPCBuiltRouter<{
|
|
817
|
+
ctx: {
|
|
818
|
+
user: {
|
|
819
|
+
id: string;
|
|
820
|
+
username: string;
|
|
821
|
+
role: string;
|
|
822
|
+
} | null;
|
|
823
|
+
};
|
|
824
|
+
meta: object;
|
|
825
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
826
|
+
transformer: true;
|
|
827
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
828
|
+
listOutputs: _trpc_server.TRPCQueryProcedure<{
|
|
829
|
+
input: void;
|
|
830
|
+
output: readonly {
|
|
831
|
+
id: string;
|
|
832
|
+
name: string;
|
|
833
|
+
icon: string;
|
|
834
|
+
}[];
|
|
835
|
+
meta: object;
|
|
836
|
+
}>;
|
|
837
|
+
getRouting: _trpc_server.TRPCQueryProcedure<{
|
|
838
|
+
input: void;
|
|
839
|
+
output: Record<string, string[]>;
|
|
840
|
+
meta: object;
|
|
841
|
+
}>;
|
|
842
|
+
setRouting: _trpc_server.TRPCMutationProcedure<{
|
|
843
|
+
input: {
|
|
844
|
+
category: string;
|
|
845
|
+
outputIds: string[];
|
|
846
|
+
};
|
|
847
|
+
output: {
|
|
848
|
+
success: boolean;
|
|
849
|
+
};
|
|
850
|
+
meta: object;
|
|
851
|
+
}>;
|
|
852
|
+
sendTest: _trpc_server.TRPCMutationProcedure<{
|
|
853
|
+
input: {
|
|
854
|
+
outputId: string;
|
|
855
|
+
};
|
|
856
|
+
output: {
|
|
857
|
+
success: boolean;
|
|
858
|
+
error?: string;
|
|
859
|
+
};
|
|
860
|
+
meta: object;
|
|
861
|
+
}>;
|
|
862
|
+
}>> | undefined;
|
|
863
|
+
inference?: _trpc_server.TRPCBuiltRouter<{
|
|
864
|
+
ctx: {
|
|
865
|
+
user: {
|
|
866
|
+
id: string;
|
|
867
|
+
username: string;
|
|
868
|
+
role: string;
|
|
869
|
+
} | null;
|
|
870
|
+
};
|
|
871
|
+
meta: object;
|
|
872
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
873
|
+
transformer: true;
|
|
874
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
875
|
+
getCapabilities: _trpc_server.TRPCQueryProcedure<{
|
|
876
|
+
input: void;
|
|
877
|
+
output: undefined;
|
|
878
|
+
meta: object;
|
|
879
|
+
}>;
|
|
880
|
+
getAddonModels: _trpc_server.TRPCQueryProcedure<{
|
|
881
|
+
input: {
|
|
882
|
+
addonId: string;
|
|
883
|
+
};
|
|
884
|
+
output: readonly undefined[];
|
|
885
|
+
meta: object;
|
|
886
|
+
}>;
|
|
887
|
+
downloadModel: _trpc_server.TRPCMutationProcedure<{
|
|
888
|
+
input: {
|
|
889
|
+
addonId: string;
|
|
890
|
+
format: "onnx" | "coreml" | "openvino" | "tflite" | "pt";
|
|
891
|
+
modelId: string;
|
|
892
|
+
};
|
|
893
|
+
output: {
|
|
894
|
+
filePath: string;
|
|
895
|
+
sizeMB: number;
|
|
896
|
+
durationMs: number;
|
|
897
|
+
};
|
|
898
|
+
meta: object;
|
|
899
|
+
}>;
|
|
900
|
+
onDownloadProgress: _trpc_server.TRPCSubscriptionProcedure<{
|
|
901
|
+
input: void;
|
|
902
|
+
output: {
|
|
903
|
+
modelId: string;
|
|
904
|
+
format: string;
|
|
905
|
+
downloadedBytes: number;
|
|
906
|
+
totalBytes: number;
|
|
907
|
+
percent: number;
|
|
908
|
+
};
|
|
909
|
+
meta: object;
|
|
910
|
+
}>;
|
|
911
|
+
onPipelineProgress: _trpc_server.TRPCSubscriptionProcedure<{
|
|
912
|
+
input: void;
|
|
913
|
+
output: undefined;
|
|
914
|
+
meta: object;
|
|
915
|
+
}>;
|
|
916
|
+
releaseEngine: _trpc_server.TRPCMutationProcedure<{
|
|
917
|
+
input: {
|
|
918
|
+
addonId: string;
|
|
919
|
+
backend: string;
|
|
920
|
+
runtime: "node" | "python";
|
|
921
|
+
modelId: string;
|
|
922
|
+
};
|
|
923
|
+
output: {
|
|
924
|
+
success: boolean;
|
|
925
|
+
};
|
|
926
|
+
meta: object;
|
|
927
|
+
}>;
|
|
928
|
+
listReferenceImages: _trpc_server.TRPCQueryProcedure<{
|
|
929
|
+
input: void;
|
|
930
|
+
output: {
|
|
931
|
+
id: string;
|
|
932
|
+
filename: string;
|
|
933
|
+
sizeKB: number;
|
|
934
|
+
}[];
|
|
935
|
+
meta: object;
|
|
936
|
+
}>;
|
|
937
|
+
getReferenceImage: _trpc_server.TRPCQueryProcedure<{
|
|
938
|
+
input: {
|
|
939
|
+
filename: string;
|
|
940
|
+
};
|
|
941
|
+
output: {
|
|
942
|
+
base64: string;
|
|
943
|
+
filename: string;
|
|
944
|
+
} | null;
|
|
945
|
+
meta: object;
|
|
946
|
+
}>;
|
|
947
|
+
runDetection: _trpc_server.TRPCMutationProcedure<{
|
|
948
|
+
input: {
|
|
949
|
+
addonId: string;
|
|
950
|
+
backend: string;
|
|
951
|
+
runtime: "node" | "python";
|
|
952
|
+
modelId?: string | undefined;
|
|
953
|
+
referenceImage?: string | undefined;
|
|
954
|
+
imageBase64?: string | undefined;
|
|
955
|
+
};
|
|
956
|
+
output: undefined;
|
|
957
|
+
meta: object;
|
|
958
|
+
}>;
|
|
959
|
+
detect: _trpc_server.TRPCMutationProcedure<{
|
|
960
|
+
input: {
|
|
961
|
+
frame: {
|
|
962
|
+
data: string;
|
|
963
|
+
timestamp: number;
|
|
964
|
+
cameraId: string;
|
|
965
|
+
width: number;
|
|
966
|
+
height: number;
|
|
967
|
+
};
|
|
968
|
+
addonId: string;
|
|
969
|
+
confidence?: number | undefined;
|
|
970
|
+
};
|
|
971
|
+
output: any;
|
|
972
|
+
meta: object;
|
|
973
|
+
}>;
|
|
974
|
+
runPipeline: _trpc_server.TRPCMutationProcedure<{
|
|
975
|
+
input: {
|
|
976
|
+
steps: any[];
|
|
977
|
+
referenceImage?: string | undefined;
|
|
978
|
+
imageBase64?: string | undefined;
|
|
979
|
+
};
|
|
980
|
+
output: undefined;
|
|
981
|
+
meta: object;
|
|
982
|
+
}>;
|
|
983
|
+
}>> | undefined;
|
|
984
|
+
auth: _trpc_server.TRPCBuiltRouter<{
|
|
985
|
+
ctx: {
|
|
986
|
+
user: {
|
|
987
|
+
id: string;
|
|
988
|
+
username: string;
|
|
989
|
+
role: string;
|
|
990
|
+
} | null;
|
|
991
|
+
};
|
|
992
|
+
meta: object;
|
|
993
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
994
|
+
transformer: true;
|
|
995
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
996
|
+
login: _trpc_server.TRPCMutationProcedure<{
|
|
997
|
+
input: {
|
|
998
|
+
password: string;
|
|
999
|
+
username: string;
|
|
1000
|
+
};
|
|
1001
|
+
output: {
|
|
1002
|
+
token: string;
|
|
1003
|
+
user: {
|
|
1004
|
+
id: string;
|
|
1005
|
+
username: string;
|
|
1006
|
+
role: undefined;
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
1009
|
+
meta: object;
|
|
1010
|
+
}>;
|
|
1011
|
+
me: _trpc_server.TRPCQueryProcedure<{
|
|
1012
|
+
input: void;
|
|
1013
|
+
output: undefined;
|
|
1014
|
+
meta: object;
|
|
1015
|
+
}>;
|
|
1016
|
+
logout: _trpc_server.TRPCMutationProcedure<{
|
|
1017
|
+
input: void;
|
|
1018
|
+
output: {
|
|
1019
|
+
success: boolean;
|
|
1020
|
+
};
|
|
1021
|
+
meta: object;
|
|
1022
|
+
}>;
|
|
1023
|
+
listProviders: _trpc_server.TRPCQueryProcedure<{
|
|
1024
|
+
input: void;
|
|
1025
|
+
output: {
|
|
1026
|
+
id: string;
|
|
1027
|
+
name: string;
|
|
1028
|
+
icon: string;
|
|
1029
|
+
flowType: "credentials" | "redirect" | "token";
|
|
1030
|
+
}[];
|
|
1031
|
+
meta: object;
|
|
1032
|
+
}>;
|
|
1033
|
+
}>>;
|
|
1034
|
+
users: _trpc_server.TRPCBuiltRouter<{
|
|
1035
|
+
ctx: {
|
|
1036
|
+
user: {
|
|
1037
|
+
id: string;
|
|
1038
|
+
username: string;
|
|
1039
|
+
role: string;
|
|
1040
|
+
} | null;
|
|
1041
|
+
};
|
|
1042
|
+
meta: object;
|
|
1043
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1044
|
+
transformer: true;
|
|
1045
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1046
|
+
list: _trpc_server.TRPCQueryProcedure<{
|
|
1047
|
+
input: void;
|
|
1048
|
+
output: Omit<undefined, "passwordHash">[];
|
|
1049
|
+
meta: object;
|
|
1050
|
+
}>;
|
|
1051
|
+
create: _trpc_server.TRPCMutationProcedure<{
|
|
1052
|
+
input: {
|
|
1053
|
+
password: string;
|
|
1054
|
+
username: string;
|
|
1055
|
+
role: "admin" | "super_admin" | "viewer";
|
|
1056
|
+
allowedProviders?: string[] | "*" | undefined;
|
|
1057
|
+
allowedDevices?: Record<string, string[] | "*"> | undefined;
|
|
1058
|
+
};
|
|
1059
|
+
output: {
|
|
1060
|
+
id: string;
|
|
1061
|
+
username: string;
|
|
1062
|
+
role: undefined;
|
|
1063
|
+
allowedProviders: string[] | "*";
|
|
1064
|
+
allowedDevices: Record<string, string[] | "*">;
|
|
1065
|
+
createdAt: number;
|
|
1066
|
+
updatedAt: number;
|
|
1067
|
+
};
|
|
1068
|
+
meta: object;
|
|
1069
|
+
}>;
|
|
1070
|
+
update: _trpc_server.TRPCMutationProcedure<{
|
|
1071
|
+
input: {
|
|
1072
|
+
id: string;
|
|
1073
|
+
role?: "admin" | "super_admin" | "viewer" | undefined;
|
|
1074
|
+
allowedProviders?: string[] | "*" | undefined;
|
|
1075
|
+
allowedDevices?: Record<string, string[] | "*"> | undefined;
|
|
1076
|
+
};
|
|
1077
|
+
output: {
|
|
1078
|
+
success: boolean;
|
|
1079
|
+
};
|
|
1080
|
+
meta: object;
|
|
1081
|
+
}>;
|
|
1082
|
+
delete: _trpc_server.TRPCMutationProcedure<{
|
|
1083
|
+
input: {
|
|
1084
|
+
id: string;
|
|
1085
|
+
};
|
|
1086
|
+
output: {
|
|
1087
|
+
success: boolean;
|
|
1088
|
+
};
|
|
1089
|
+
meta: object;
|
|
1090
|
+
}>;
|
|
1091
|
+
resetPassword: _trpc_server.TRPCMutationProcedure<{
|
|
1092
|
+
input: {
|
|
1093
|
+
id: string;
|
|
1094
|
+
newPassword: string;
|
|
1095
|
+
};
|
|
1096
|
+
output: {
|
|
1097
|
+
success: boolean;
|
|
1098
|
+
};
|
|
1099
|
+
meta: object;
|
|
1100
|
+
}>;
|
|
1101
|
+
}>>;
|
|
1102
|
+
system: _trpc_server.TRPCBuiltRouter<{
|
|
1103
|
+
ctx: {
|
|
1104
|
+
user: {
|
|
1105
|
+
id: string;
|
|
1106
|
+
username: string;
|
|
1107
|
+
role: string;
|
|
1108
|
+
} | null;
|
|
1109
|
+
};
|
|
1110
|
+
meta: object;
|
|
1111
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1112
|
+
transformer: true;
|
|
1113
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1114
|
+
info: _trpc_server.TRPCQueryProcedure<{
|
|
1115
|
+
input: void;
|
|
1116
|
+
output: {
|
|
1117
|
+
version: string;
|
|
1118
|
+
uptime: number;
|
|
1119
|
+
nodeVersion: string;
|
|
1120
|
+
platform: NodeJS.Platform;
|
|
1121
|
+
features: undefined;
|
|
1122
|
+
};
|
|
1123
|
+
meta: object;
|
|
1124
|
+
}>;
|
|
1125
|
+
health: _trpc_server.TRPCQueryProcedure<{
|
|
1126
|
+
input: void;
|
|
1127
|
+
output: {
|
|
1128
|
+
status: "ok";
|
|
1129
|
+
uptime: number;
|
|
1130
|
+
};
|
|
1131
|
+
meta: object;
|
|
1132
|
+
}>;
|
|
1133
|
+
featureFlags: _trpc_server.TRPCQueryProcedure<{
|
|
1134
|
+
input: void;
|
|
1135
|
+
output: undefined;
|
|
1136
|
+
meta: object;
|
|
1137
|
+
}>;
|
|
1138
|
+
getRetentionConfig: _trpc_server.TRPCQueryProcedure<{
|
|
1139
|
+
input: void;
|
|
1140
|
+
output: unknown;
|
|
1141
|
+
meta: object;
|
|
1142
|
+
}>;
|
|
1143
|
+
setRetentionConfig: _trpc_server.TRPCMutationProcedure<{
|
|
1144
|
+
input: {
|
|
1145
|
+
detectionEventsDays?: number | undefined;
|
|
1146
|
+
audioLevelsDays?: number | undefined;
|
|
1147
|
+
snapshotsDays?: number | undefined;
|
|
1148
|
+
cleanupIntervalMs?: number | undefined;
|
|
1149
|
+
};
|
|
1150
|
+
output: {
|
|
1151
|
+
success: boolean;
|
|
1152
|
+
config?: undefined;
|
|
1153
|
+
} | {
|
|
1154
|
+
success: boolean;
|
|
1155
|
+
config: unknown;
|
|
1156
|
+
};
|
|
1157
|
+
meta: object;
|
|
1158
|
+
}>;
|
|
1159
|
+
forceRetentionCleanup: _trpc_server.TRPCMutationProcedure<{
|
|
1160
|
+
input: void;
|
|
1161
|
+
output: {
|
|
1162
|
+
success: boolean;
|
|
1163
|
+
report?: undefined;
|
|
1164
|
+
} | {
|
|
1165
|
+
success: boolean;
|
|
1166
|
+
report: unknown;
|
|
1167
|
+
};
|
|
1168
|
+
meta: object;
|
|
1169
|
+
}>;
|
|
1170
|
+
}>>;
|
|
1171
|
+
settings: _trpc_server.TRPCBuiltRouter<{
|
|
1172
|
+
ctx: {
|
|
1173
|
+
user: {
|
|
1174
|
+
id: string;
|
|
1175
|
+
username: string;
|
|
1176
|
+
role: string;
|
|
1177
|
+
} | null;
|
|
1178
|
+
};
|
|
1179
|
+
meta: object;
|
|
1180
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1181
|
+
transformer: true;
|
|
1182
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1183
|
+
getSchema: _trpc_server.TRPCQueryProcedure<{
|
|
1184
|
+
input: {
|
|
1185
|
+
section?: "recording" | "storage" | "addons" | "server" | "auth" | "ffmpeg" | "streaming" | "backup" | "features" | "logging" | "retention" | "detection" | undefined;
|
|
1186
|
+
};
|
|
1187
|
+
output: {
|
|
1188
|
+
section: "recording" | "storage" | "addons" | "server" | "auth" | "ffmpeg" | "streaming" | "backup" | "features" | "logging" | "retention" | "detection";
|
|
1189
|
+
schema: undefined | null;
|
|
1190
|
+
readOnly: boolean;
|
|
1191
|
+
tabs?: undefined;
|
|
1192
|
+
schemas?: undefined;
|
|
1193
|
+
} | {
|
|
1194
|
+
tabs: readonly undefined[];
|
|
1195
|
+
schemas: Record<string, unknown>;
|
|
1196
|
+
section?: undefined;
|
|
1197
|
+
schema?: undefined;
|
|
1198
|
+
readOnly?: undefined;
|
|
1199
|
+
};
|
|
1200
|
+
meta: object;
|
|
1201
|
+
}>;
|
|
1202
|
+
get: _trpc_server.TRPCQueryProcedure<{
|
|
1203
|
+
input: {
|
|
1204
|
+
section: "recording" | "storage" | "addons" | "server" | "auth" | "ffmpeg" | "streaming" | "backup" | "features" | "logging" | "retention" | "detection";
|
|
1205
|
+
};
|
|
1206
|
+
output: {
|
|
1207
|
+
section: "recording" | "storage" | "addons" | "server" | "auth" | "ffmpeg" | "streaming" | "backup" | "features" | "logging" | "retention" | "detection";
|
|
1208
|
+
data: Record<string, unknown>;
|
|
1209
|
+
};
|
|
1210
|
+
meta: object;
|
|
1211
|
+
}>;
|
|
1212
|
+
update: _trpc_server.TRPCMutationProcedure<{
|
|
1213
|
+
input: {
|
|
1214
|
+
data: Record<string, unknown>;
|
|
1215
|
+
section: "recording" | "storage" | "addons" | "server" | "auth" | "ffmpeg" | "streaming" | "backup" | "features" | "logging" | "retention" | "detection";
|
|
1216
|
+
};
|
|
1217
|
+
output: {
|
|
1218
|
+
success: boolean;
|
|
1219
|
+
section: "recording" | "storage" | "addons" | "server" | "auth" | "ffmpeg" | "streaming" | "backup" | "features" | "logging" | "retention" | "detection";
|
|
1220
|
+
};
|
|
1221
|
+
meta: object;
|
|
1222
|
+
}>;
|
|
1223
|
+
}>>;
|
|
1224
|
+
providers: _trpc_server.TRPCBuiltRouter<{
|
|
1225
|
+
ctx: {
|
|
1226
|
+
user: {
|
|
1227
|
+
id: string;
|
|
1228
|
+
username: string;
|
|
1229
|
+
role: string;
|
|
1230
|
+
} | null;
|
|
1231
|
+
};
|
|
1232
|
+
meta: object;
|
|
1233
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1234
|
+
transformer: true;
|
|
1235
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1236
|
+
list: _trpc_server.TRPCQueryProcedure<{
|
|
1237
|
+
input: void;
|
|
1238
|
+
output: readonly undefined[];
|
|
1239
|
+
meta: object;
|
|
1240
|
+
}>;
|
|
1241
|
+
get: _trpc_server.TRPCQueryProcedure<{
|
|
1242
|
+
input: {
|
|
1243
|
+
id: string;
|
|
1244
|
+
};
|
|
1245
|
+
output: {
|
|
1246
|
+
id: string;
|
|
1247
|
+
type: string;
|
|
1248
|
+
name: string;
|
|
1249
|
+
discoveryMode: "both" | "auto" | "manual";
|
|
1250
|
+
status: undefined;
|
|
1251
|
+
deviceCount: number;
|
|
1252
|
+
};
|
|
1253
|
+
meta: object;
|
|
1254
|
+
}>;
|
|
1255
|
+
start: _trpc_server.TRPCMutationProcedure<{
|
|
1256
|
+
input: {
|
|
1257
|
+
id: string;
|
|
1258
|
+
};
|
|
1259
|
+
output: {
|
|
1260
|
+
success: boolean;
|
|
1261
|
+
};
|
|
1262
|
+
meta: object;
|
|
1263
|
+
}>;
|
|
1264
|
+
stop: _trpc_server.TRPCMutationProcedure<{
|
|
1265
|
+
input: {
|
|
1266
|
+
id: string;
|
|
1267
|
+
};
|
|
1268
|
+
output: {
|
|
1269
|
+
success: boolean;
|
|
1270
|
+
};
|
|
1271
|
+
meta: object;
|
|
1272
|
+
}>;
|
|
1273
|
+
restart: _trpc_server.TRPCMutationProcedure<{
|
|
1274
|
+
input: {
|
|
1275
|
+
id: string;
|
|
1276
|
+
};
|
|
1277
|
+
output: {
|
|
1278
|
+
success: boolean;
|
|
1279
|
+
};
|
|
1280
|
+
meta: object;
|
|
1281
|
+
}>;
|
|
1282
|
+
}>>;
|
|
1283
|
+
providerConfig: _trpc_server.TRPCBuiltRouter<{
|
|
1284
|
+
ctx: {
|
|
1285
|
+
user: {
|
|
1286
|
+
id: string;
|
|
1287
|
+
username: string;
|
|
1288
|
+
role: string;
|
|
1289
|
+
} | null;
|
|
1290
|
+
};
|
|
1291
|
+
meta: object;
|
|
1292
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1293
|
+
transformer: true;
|
|
1294
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1295
|
+
addProvider: _trpc_server.TRPCMutationProcedure<{
|
|
1296
|
+
input: {
|
|
1297
|
+
name: string;
|
|
1298
|
+
id: string;
|
|
1299
|
+
type: string;
|
|
1300
|
+
url?: string | undefined;
|
|
1301
|
+
password?: string | undefined;
|
|
1302
|
+
username?: string | undefined;
|
|
1303
|
+
mqtt?: {
|
|
1304
|
+
brokerUrl: string;
|
|
1305
|
+
password?: string | undefined;
|
|
1306
|
+
username?: string | undefined;
|
|
1307
|
+
topicPrefix?: string | undefined;
|
|
1308
|
+
} | undefined;
|
|
1309
|
+
};
|
|
1310
|
+
output: {
|
|
1311
|
+
success: boolean;
|
|
1312
|
+
provider: {
|
|
1313
|
+
name: string;
|
|
1314
|
+
id: string;
|
|
1315
|
+
type: string;
|
|
1316
|
+
url?: string | undefined;
|
|
1317
|
+
password?: string | undefined;
|
|
1318
|
+
username?: string | undefined;
|
|
1319
|
+
mqtt?: {
|
|
1320
|
+
brokerUrl: string;
|
|
1321
|
+
topicPrefix: string;
|
|
1322
|
+
password?: string | undefined;
|
|
1323
|
+
username?: string | undefined;
|
|
1324
|
+
} | undefined;
|
|
1325
|
+
};
|
|
1326
|
+
};
|
|
1327
|
+
meta: object;
|
|
1328
|
+
}>;
|
|
1329
|
+
updateProvider: _trpc_server.TRPCMutationProcedure<{
|
|
1330
|
+
input: {
|
|
1331
|
+
name: string;
|
|
1332
|
+
id: string;
|
|
1333
|
+
type: string;
|
|
1334
|
+
url?: string | undefined;
|
|
1335
|
+
password?: string | undefined;
|
|
1336
|
+
username?: string | undefined;
|
|
1337
|
+
mqtt?: {
|
|
1338
|
+
brokerUrl: string;
|
|
1339
|
+
password?: string | undefined;
|
|
1340
|
+
username?: string | undefined;
|
|
1341
|
+
topicPrefix?: string | undefined;
|
|
1342
|
+
} | undefined;
|
|
1343
|
+
};
|
|
1344
|
+
output: {
|
|
1345
|
+
success: boolean;
|
|
1346
|
+
provider: {
|
|
1347
|
+
name: string;
|
|
1348
|
+
id: string;
|
|
1349
|
+
type: string;
|
|
1350
|
+
url?: string | undefined;
|
|
1351
|
+
password?: string | undefined;
|
|
1352
|
+
username?: string | undefined;
|
|
1353
|
+
mqtt?: {
|
|
1354
|
+
brokerUrl: string;
|
|
1355
|
+
topicPrefix: string;
|
|
1356
|
+
password?: string | undefined;
|
|
1357
|
+
username?: string | undefined;
|
|
1358
|
+
} | undefined;
|
|
1359
|
+
};
|
|
1360
|
+
};
|
|
1361
|
+
meta: object;
|
|
1362
|
+
}>;
|
|
1363
|
+
removeProvider: _trpc_server.TRPCMutationProcedure<{
|
|
1364
|
+
input: {
|
|
1365
|
+
id: string;
|
|
1366
|
+
};
|
|
1367
|
+
output: {
|
|
1368
|
+
success: boolean;
|
|
1369
|
+
removedId: string;
|
|
1370
|
+
};
|
|
1371
|
+
meta: object;
|
|
1372
|
+
}>;
|
|
1373
|
+
testConnection: _trpc_server.TRPCMutationProcedure<{
|
|
1374
|
+
input: {
|
|
1375
|
+
url: string;
|
|
1376
|
+
type: string;
|
|
1377
|
+
password?: string | undefined;
|
|
1378
|
+
username?: string | undefined;
|
|
1379
|
+
};
|
|
1380
|
+
output: undefined;
|
|
1381
|
+
meta: object;
|
|
1382
|
+
}>;
|
|
1383
|
+
}>>;
|
|
1384
|
+
devices: _trpc_server.TRPCBuiltRouter<{
|
|
1385
|
+
ctx: {
|
|
1386
|
+
user: {
|
|
1387
|
+
id: string;
|
|
1388
|
+
username: string;
|
|
1389
|
+
role: string;
|
|
1390
|
+
} | null;
|
|
1391
|
+
};
|
|
1392
|
+
meta: object;
|
|
1393
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1394
|
+
transformer: true;
|
|
1395
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1396
|
+
list: _trpc_server.TRPCQueryProcedure<{
|
|
1397
|
+
input: {
|
|
1398
|
+
capability?: string | undefined;
|
|
1399
|
+
type?: string | undefined;
|
|
1400
|
+
providerId?: string | undefined;
|
|
1401
|
+
} | undefined;
|
|
1402
|
+
output: {
|
|
1403
|
+
id: string;
|
|
1404
|
+
name: string;
|
|
1405
|
+
providerId: string;
|
|
1406
|
+
type: DeviceType$2;
|
|
1407
|
+
capabilities: undefined[];
|
|
1408
|
+
state: undefined;
|
|
1409
|
+
}[];
|
|
1410
|
+
meta: object;
|
|
1411
|
+
}>;
|
|
1412
|
+
get: _trpc_server.TRPCQueryProcedure<{
|
|
1413
|
+
input: {
|
|
1414
|
+
id: string;
|
|
1415
|
+
};
|
|
1416
|
+
output: {
|
|
1417
|
+
id: string;
|
|
1418
|
+
name: string;
|
|
1419
|
+
providerId: string;
|
|
1420
|
+
type: DeviceType$2;
|
|
1421
|
+
capabilities: undefined[];
|
|
1422
|
+
state: undefined;
|
|
1423
|
+
metadata: undefined;
|
|
1424
|
+
};
|
|
1425
|
+
meta: object;
|
|
1426
|
+
}>;
|
|
1427
|
+
getState: _trpc_server.TRPCQueryProcedure<{
|
|
1428
|
+
input: {
|
|
1429
|
+
id: string;
|
|
1430
|
+
};
|
|
1431
|
+
output: undefined;
|
|
1432
|
+
meta: object;
|
|
1433
|
+
}>;
|
|
1434
|
+
getCapabilities: _trpc_server.TRPCQueryProcedure<{
|
|
1435
|
+
input: {
|
|
1436
|
+
id: string;
|
|
1437
|
+
};
|
|
1438
|
+
output: {
|
|
1439
|
+
name: undefined;
|
|
1440
|
+
native: boolean;
|
|
1441
|
+
binding: undefined;
|
|
1442
|
+
resolved: boolean;
|
|
1443
|
+
}[];
|
|
1444
|
+
meta: object;
|
|
1445
|
+
}>;
|
|
1446
|
+
}>>;
|
|
1447
|
+
streaming: _trpc_server.TRPCBuiltRouter<{
|
|
1448
|
+
ctx: {
|
|
1449
|
+
user: {
|
|
1450
|
+
id: string;
|
|
1451
|
+
username: string;
|
|
1452
|
+
role: string;
|
|
1453
|
+
} | null;
|
|
1454
|
+
};
|
|
1455
|
+
meta: object;
|
|
1456
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1457
|
+
transformer: true;
|
|
1458
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1459
|
+
getStreamUrl: _trpc_server.TRPCQueryProcedure<{
|
|
1460
|
+
input: {
|
|
1461
|
+
streamId: string;
|
|
1462
|
+
format: "mjpeg" | "webrtc" | "hls" | "rtsp";
|
|
1463
|
+
};
|
|
1464
|
+
output: {
|
|
1465
|
+
url: string;
|
|
1466
|
+
};
|
|
1467
|
+
meta: object;
|
|
1468
|
+
}>;
|
|
1469
|
+
whepOffer: _trpc_server.TRPCMutationProcedure<{
|
|
1470
|
+
input: {
|
|
1471
|
+
streamId: string;
|
|
1472
|
+
sdpOffer: string;
|
|
1473
|
+
};
|
|
1474
|
+
output: {
|
|
1475
|
+
sdpAnswer: string;
|
|
1476
|
+
};
|
|
1477
|
+
meta: object;
|
|
1478
|
+
}>;
|
|
1479
|
+
}>>;
|
|
1480
|
+
events: _trpc_server.TRPCBuiltRouter<{
|
|
1481
|
+
ctx: {
|
|
1482
|
+
user: {
|
|
1483
|
+
id: string;
|
|
1484
|
+
username: string;
|
|
1485
|
+
role: string;
|
|
1486
|
+
} | null;
|
|
1487
|
+
};
|
|
1488
|
+
meta: object;
|
|
1489
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1490
|
+
transformer: true;
|
|
1491
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1492
|
+
query: _trpc_server.TRPCQueryProcedure<{
|
|
1493
|
+
input: {
|
|
1494
|
+
deviceId: string;
|
|
1495
|
+
limit?: number | undefined;
|
|
1496
|
+
offset?: number | undefined;
|
|
1497
|
+
since?: number | undefined;
|
|
1498
|
+
until?: number | undefined;
|
|
1499
|
+
types?: string[] | undefined;
|
|
1500
|
+
detectionClasses?: string[] | undefined;
|
|
1501
|
+
clusterSpan?: number | undefined;
|
|
1502
|
+
onlyKeyEvents?: boolean | undefined;
|
|
1503
|
+
includeClip?: boolean | undefined;
|
|
1504
|
+
};
|
|
1505
|
+
output: undefined;
|
|
1506
|
+
meta: object;
|
|
1507
|
+
}>;
|
|
1508
|
+
thumbnail: _trpc_server.TRPCQueryProcedure<{
|
|
1509
|
+
input: {
|
|
1510
|
+
deviceId: string;
|
|
1511
|
+
eventId: string;
|
|
1512
|
+
};
|
|
1513
|
+
output: string | null;
|
|
1514
|
+
meta: object;
|
|
1515
|
+
}>;
|
|
1516
|
+
snapshot: _trpc_server.TRPCQueryProcedure<{
|
|
1517
|
+
input: {
|
|
1518
|
+
deviceId: string;
|
|
1519
|
+
eventId: string;
|
|
1520
|
+
};
|
|
1521
|
+
output: string | null;
|
|
1522
|
+
meta: object;
|
|
1523
|
+
}>;
|
|
1524
|
+
clipUrl: _trpc_server.TRPCQueryProcedure<{
|
|
1525
|
+
input: {
|
|
1526
|
+
deviceId: string;
|
|
1527
|
+
eventId: string;
|
|
1528
|
+
};
|
|
1529
|
+
output: {
|
|
1530
|
+
url: string;
|
|
1531
|
+
} | null;
|
|
1532
|
+
meta: object;
|
|
1533
|
+
}>;
|
|
1534
|
+
}>>;
|
|
1535
|
+
logs: _trpc_server.TRPCBuiltRouter<{
|
|
1536
|
+
ctx: {
|
|
1537
|
+
user: {
|
|
1538
|
+
id: string;
|
|
1539
|
+
username: string;
|
|
1540
|
+
role: string;
|
|
1541
|
+
} | null;
|
|
1542
|
+
};
|
|
1543
|
+
meta: object;
|
|
1544
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1545
|
+
transformer: true;
|
|
1546
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1547
|
+
query: _trpc_server.TRPCQueryProcedure<{
|
|
1548
|
+
input: {
|
|
1549
|
+
level?: "error" | "info" | "debug" | "warn" | undefined;
|
|
1550
|
+
limit?: number | undefined;
|
|
1551
|
+
scope?: string[] | undefined;
|
|
1552
|
+
since?: number | undefined;
|
|
1553
|
+
until?: number | undefined;
|
|
1554
|
+
};
|
|
1555
|
+
output: undefined[];
|
|
1556
|
+
meta: object;
|
|
1557
|
+
}>;
|
|
1558
|
+
}>>;
|
|
1559
|
+
live: _trpc_server.TRPCBuiltRouter<{
|
|
1560
|
+
ctx: {
|
|
1561
|
+
user: {
|
|
1562
|
+
id: string;
|
|
1563
|
+
username: string;
|
|
1564
|
+
role: string;
|
|
1565
|
+
} | null;
|
|
1566
|
+
};
|
|
1567
|
+
meta: object;
|
|
1568
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1569
|
+
transformer: true;
|
|
1570
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1571
|
+
recentSystemEvents: _trpc_server.TRPCQueryProcedure<{
|
|
1572
|
+
input: {
|
|
1573
|
+
limit?: number | undefined;
|
|
1574
|
+
category?: string | undefined;
|
|
1575
|
+
} | undefined;
|
|
1576
|
+
output: readonly undefined[];
|
|
1577
|
+
meta: object;
|
|
1578
|
+
}>;
|
|
1579
|
+
onEvent: _trpc_server.TRPCSubscriptionProcedure<{
|
|
1580
|
+
input: {
|
|
1581
|
+
category?: string | undefined;
|
|
1582
|
+
};
|
|
1583
|
+
output: undefined;
|
|
1584
|
+
meta: object;
|
|
1585
|
+
}>;
|
|
1586
|
+
onDeviceEvent: _trpc_server.TRPCSubscriptionProcedure<{
|
|
1587
|
+
input: {
|
|
1588
|
+
deviceId: string;
|
|
1589
|
+
};
|
|
1590
|
+
output: undefined;
|
|
1591
|
+
meta: object;
|
|
1592
|
+
}>;
|
|
1593
|
+
}>>;
|
|
1594
|
+
processes: _trpc_server.TRPCBuiltRouter<{
|
|
1595
|
+
ctx: {
|
|
1596
|
+
user: {
|
|
1597
|
+
id: string;
|
|
1598
|
+
username: string;
|
|
1599
|
+
role: string;
|
|
1600
|
+
} | null;
|
|
1601
|
+
};
|
|
1602
|
+
meta: object;
|
|
1603
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1604
|
+
transformer: true;
|
|
1605
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1606
|
+
listProcesses: _trpc_server.TRPCQueryProcedure<{
|
|
1607
|
+
input: void;
|
|
1608
|
+
output: (undefined | {
|
|
1609
|
+
id: string;
|
|
1610
|
+
label: string;
|
|
1611
|
+
state: "running" | "stopped" | "crashed" | "starting";
|
|
1612
|
+
pid?: number;
|
|
1613
|
+
stats?: {
|
|
1614
|
+
pid: number;
|
|
1615
|
+
cpu: number;
|
|
1616
|
+
memory: number;
|
|
1617
|
+
uptime: number;
|
|
1618
|
+
restartCount: number;
|
|
1619
|
+
};
|
|
1620
|
+
restartCount: number;
|
|
1621
|
+
mode: "forked" | "in-process";
|
|
1622
|
+
})[];
|
|
1623
|
+
meta: object;
|
|
1624
|
+
}>;
|
|
1625
|
+
getProcess: _trpc_server.TRPCQueryProcedure<{
|
|
1626
|
+
input: {
|
|
1627
|
+
id: string;
|
|
1628
|
+
};
|
|
1629
|
+
output: undefined;
|
|
1630
|
+
meta: object;
|
|
1631
|
+
}>;
|
|
1632
|
+
startProcess: _trpc_server.TRPCMutationProcedure<{
|
|
1633
|
+
input: {
|
|
1634
|
+
id: string;
|
|
1635
|
+
};
|
|
1636
|
+
output: {
|
|
1637
|
+
success: boolean;
|
|
1638
|
+
};
|
|
1639
|
+
meta: object;
|
|
1640
|
+
}>;
|
|
1641
|
+
stopProcess: _trpc_server.TRPCMutationProcedure<{
|
|
1642
|
+
input: {
|
|
1643
|
+
id: string;
|
|
1644
|
+
};
|
|
1645
|
+
output: {
|
|
1646
|
+
success: boolean;
|
|
1647
|
+
};
|
|
1648
|
+
meta: object;
|
|
1649
|
+
}>;
|
|
1650
|
+
restartProcess: _trpc_server.TRPCMutationProcedure<{
|
|
1651
|
+
input: {
|
|
1652
|
+
id: string;
|
|
1653
|
+
};
|
|
1654
|
+
output: {
|
|
1655
|
+
success: boolean;
|
|
1656
|
+
};
|
|
1657
|
+
meta: object;
|
|
1658
|
+
}>;
|
|
1659
|
+
listProviderStatus: _trpc_server.TRPCQueryProcedure<{
|
|
1660
|
+
input: void;
|
|
1661
|
+
output: readonly undefined[];
|
|
1662
|
+
meta: object;
|
|
1663
|
+
}>;
|
|
1664
|
+
enableProvider: _trpc_server.TRPCMutationProcedure<{
|
|
1665
|
+
input: {
|
|
1666
|
+
id: string;
|
|
1667
|
+
};
|
|
1668
|
+
output: {
|
|
1669
|
+
success: boolean;
|
|
1670
|
+
};
|
|
1671
|
+
meta: object;
|
|
1672
|
+
}>;
|
|
1673
|
+
disableProvider: _trpc_server.TRPCMutationProcedure<{
|
|
1674
|
+
input: {
|
|
1675
|
+
id: string;
|
|
1676
|
+
};
|
|
1677
|
+
output: {
|
|
1678
|
+
success: boolean;
|
|
1679
|
+
};
|
|
1680
|
+
meta: object;
|
|
1681
|
+
}>;
|
|
1682
|
+
}>>;
|
|
1683
|
+
agents: _trpc_server.TRPCBuiltRouter<{
|
|
1684
|
+
ctx: {
|
|
1685
|
+
user: {
|
|
1686
|
+
id: string;
|
|
1687
|
+
username: string;
|
|
1688
|
+
role: string;
|
|
1689
|
+
} | null;
|
|
1690
|
+
};
|
|
1691
|
+
meta: object;
|
|
1692
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1693
|
+
transformer: true;
|
|
1694
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1695
|
+
listAgents: _trpc_server.TRPCQueryProcedure<{
|
|
1696
|
+
input: void;
|
|
1697
|
+
output: readonly Record<string, unknown>[];
|
|
1698
|
+
meta: object;
|
|
1699
|
+
}>;
|
|
1700
|
+
getAgent: _trpc_server.TRPCQueryProcedure<{
|
|
1701
|
+
input: {
|
|
1702
|
+
id: string;
|
|
1703
|
+
};
|
|
1704
|
+
output: {
|
|
1705
|
+
id: string;
|
|
1706
|
+
name: string;
|
|
1707
|
+
state: "online" | "offline" | "degraded";
|
|
1708
|
+
capabilities: string[];
|
|
1709
|
+
lastHeartbeat: number;
|
|
1710
|
+
connectedSince: number;
|
|
1711
|
+
resources: undefined | undefined;
|
|
1712
|
+
activeTaskCount: number;
|
|
1713
|
+
completedTaskCount: number;
|
|
1714
|
+
failedTaskCount: number;
|
|
1715
|
+
};
|
|
1716
|
+
meta: object;
|
|
1717
|
+
}>;
|
|
1718
|
+
removeAgent: _trpc_server.TRPCMutationProcedure<{
|
|
1719
|
+
input: {
|
|
1720
|
+
id: string;
|
|
1721
|
+
};
|
|
1722
|
+
output: {
|
|
1723
|
+
success: boolean;
|
|
1724
|
+
};
|
|
1725
|
+
meta: object;
|
|
1726
|
+
}>;
|
|
1727
|
+
dispatchTask: _trpc_server.TRPCMutationProcedure<{
|
|
1728
|
+
input: {
|
|
1729
|
+
capability: string;
|
|
1730
|
+
label?: string | undefined;
|
|
1731
|
+
input?: Record<string, unknown> | undefined;
|
|
1732
|
+
timeout?: number | undefined;
|
|
1733
|
+
preferredAgent?: string | undefined;
|
|
1734
|
+
priority?: "low" | "normal" | "high" | undefined;
|
|
1735
|
+
remoteOnly?: boolean | undefined;
|
|
1736
|
+
};
|
|
1737
|
+
output: undefined;
|
|
1738
|
+
meta: object;
|
|
1739
|
+
}>;
|
|
1740
|
+
getAgentCapabilities: _trpc_server.TRPCQueryProcedure<{
|
|
1741
|
+
input: void;
|
|
1742
|
+
output: string[];
|
|
1743
|
+
meta: object;
|
|
1744
|
+
}>;
|
|
1745
|
+
listConnected: _trpc_server.TRPCQueryProcedure<{
|
|
1746
|
+
input: void;
|
|
1747
|
+
output: {
|
|
1748
|
+
info: undefined;
|
|
1749
|
+
status?: undefined;
|
|
1750
|
+
connectedSince: number;
|
|
1751
|
+
}[];
|
|
1752
|
+
meta: object;
|
|
1753
|
+
}>;
|
|
1754
|
+
getAssignments: _trpc_server.TRPCQueryProcedure<{
|
|
1755
|
+
input: {
|
|
1756
|
+
cameraId?: string | undefined;
|
|
1757
|
+
};
|
|
1758
|
+
output: undefined[];
|
|
1759
|
+
meta: object;
|
|
1760
|
+
}>;
|
|
1761
|
+
setAssignment: _trpc_server.TRPCMutationProcedure<{
|
|
1762
|
+
input: {
|
|
1763
|
+
agentId: string;
|
|
1764
|
+
role: "detector" | "decoder" | "transcoder" | "recorder";
|
|
1765
|
+
cameraId: string;
|
|
1766
|
+
priority: "backup" | "primary" | "overflow";
|
|
1767
|
+
rtspUrl?: string | undefined;
|
|
1768
|
+
};
|
|
1769
|
+
output: {
|
|
1770
|
+
success: boolean;
|
|
1771
|
+
};
|
|
1772
|
+
meta: object;
|
|
1773
|
+
}>;
|
|
1774
|
+
removeAssignment: _trpc_server.TRPCMutationProcedure<{
|
|
1775
|
+
input: {
|
|
1776
|
+
role: "detector" | "decoder" | "transcoder" | "recorder";
|
|
1777
|
+
cameraId: string;
|
|
1778
|
+
};
|
|
1779
|
+
output: {
|
|
1780
|
+
success: boolean;
|
|
1781
|
+
};
|
|
1782
|
+
meta: object;
|
|
1783
|
+
}>;
|
|
1784
|
+
dispatchBenchmark: _trpc_server.TRPCMutationProcedure<{
|
|
1785
|
+
input: {
|
|
1786
|
+
config: {
|
|
1787
|
+
durationMs: number;
|
|
1788
|
+
runtime: string;
|
|
1789
|
+
warmupMs: number;
|
|
1790
|
+
inputWidth: number;
|
|
1791
|
+
inputHeight: number;
|
|
1792
|
+
modelId?: string | undefined;
|
|
1793
|
+
};
|
|
1794
|
+
agentId: string;
|
|
1795
|
+
};
|
|
1796
|
+
output: {
|
|
1797
|
+
success: boolean;
|
|
1798
|
+
};
|
|
1799
|
+
meta: object;
|
|
1800
|
+
}>;
|
|
1801
|
+
runRemoteBenchmark: _trpc_server.TRPCMutationProcedure<{
|
|
1802
|
+
input: {
|
|
1803
|
+
agentId: string;
|
|
1804
|
+
runtime: string;
|
|
1805
|
+
durationMs?: number | undefined;
|
|
1806
|
+
modelId?: string | undefined;
|
|
1807
|
+
warmupMs?: number | undefined;
|
|
1808
|
+
inputWidth?: number | undefined;
|
|
1809
|
+
inputHeight?: number | undefined;
|
|
1810
|
+
};
|
|
1811
|
+
output: undefined;
|
|
1812
|
+
meta: object;
|
|
1813
|
+
}>;
|
|
1814
|
+
startTestWorker: _trpc_server.TRPCMutationProcedure<{
|
|
1815
|
+
input: void;
|
|
1816
|
+
output: {
|
|
1817
|
+
ok: boolean;
|
|
1818
|
+
};
|
|
1819
|
+
meta: object;
|
|
1820
|
+
}>;
|
|
1821
|
+
stopTestWorker: _trpc_server.TRPCMutationProcedure<{
|
|
1822
|
+
input: void;
|
|
1823
|
+
output: {
|
|
1824
|
+
ok: boolean;
|
|
1825
|
+
};
|
|
1826
|
+
meta: object;
|
|
1827
|
+
}>;
|
|
1828
|
+
isTestWorkerRunning: _trpc_server.TRPCQueryProcedure<{
|
|
1829
|
+
input: void;
|
|
1830
|
+
output: {
|
|
1831
|
+
running: boolean;
|
|
1832
|
+
};
|
|
1833
|
+
meta: object;
|
|
1834
|
+
}>;
|
|
1835
|
+
}>>;
|
|
1836
|
+
agent: _trpc_server.TRPCBuiltRouter<{
|
|
1837
|
+
ctx: {
|
|
1838
|
+
user: {
|
|
1839
|
+
id: string;
|
|
1840
|
+
username: string;
|
|
1841
|
+
role: string;
|
|
1842
|
+
} | null;
|
|
1843
|
+
};
|
|
1844
|
+
meta: object;
|
|
1845
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1846
|
+
transformer: true;
|
|
1847
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1848
|
+
register: _trpc_server.TRPCMutationProcedure<{
|
|
1849
|
+
input: {
|
|
1850
|
+
name: string;
|
|
1851
|
+
id: string;
|
|
1852
|
+
capabilities: string[];
|
|
1853
|
+
platform: string;
|
|
1854
|
+
arch: string;
|
|
1855
|
+
cpuCores: number;
|
|
1856
|
+
memoryMB: number;
|
|
1857
|
+
port?: number | undefined;
|
|
1858
|
+
host?: string | undefined;
|
|
1859
|
+
gpuModel?: string | undefined;
|
|
1860
|
+
pythonRuntimes?: string[] | undefined;
|
|
1861
|
+
installedAddons?: string[] | undefined;
|
|
1862
|
+
taskTypes?: string[] | undefined;
|
|
1863
|
+
httpPort?: number | undefined;
|
|
1864
|
+
};
|
|
1865
|
+
output: {
|
|
1866
|
+
ok: boolean;
|
|
1867
|
+
agentId: string;
|
|
1868
|
+
};
|
|
1869
|
+
meta: object;
|
|
1870
|
+
}>;
|
|
1871
|
+
heartbeat: _trpc_server.TRPCMutationProcedure<{
|
|
1872
|
+
input: {
|
|
1873
|
+
agentId: string;
|
|
1874
|
+
cpuPercent: number;
|
|
1875
|
+
memoryUsedMB: number;
|
|
1876
|
+
subProcesses?: {
|
|
1877
|
+
name: string;
|
|
1878
|
+
state: "running" | "stopped" | "crashed";
|
|
1879
|
+
pid: number;
|
|
1880
|
+
command: string;
|
|
1881
|
+
cpuPercent: number;
|
|
1882
|
+
memoryRss: number;
|
|
1883
|
+
uptimeSeconds: number;
|
|
1884
|
+
}[] | undefined;
|
|
1885
|
+
activeTasks?: number | undefined;
|
|
1886
|
+
};
|
|
1887
|
+
output: {
|
|
1888
|
+
ok: boolean;
|
|
1889
|
+
};
|
|
1890
|
+
meta: object;
|
|
1891
|
+
}>;
|
|
1892
|
+
onTaskAssignment: _trpc_server.TRPCSubscriptionProcedure<{
|
|
1893
|
+
input: void;
|
|
1894
|
+
output: {
|
|
1895
|
+
taskId: string;
|
|
1896
|
+
taskType: string;
|
|
1897
|
+
payload: unknown;
|
|
1898
|
+
};
|
|
1899
|
+
meta: object;
|
|
1900
|
+
}>;
|
|
1901
|
+
reportTaskResult: _trpc_server.TRPCMutationProcedure<{
|
|
1902
|
+
input: {
|
|
1903
|
+
success: boolean;
|
|
1904
|
+
taskId: string;
|
|
1905
|
+
agentId: string;
|
|
1906
|
+
error?: string | undefined;
|
|
1907
|
+
output?: Record<string, unknown> | undefined;
|
|
1908
|
+
durationMs?: number | undefined;
|
|
1909
|
+
};
|
|
1910
|
+
output: {
|
|
1911
|
+
ok: boolean;
|
|
1912
|
+
};
|
|
1913
|
+
meta: object;
|
|
1914
|
+
}>;
|
|
1915
|
+
processTree: _trpc_server.TRPCQueryProcedure<{
|
|
1916
|
+
input: void;
|
|
1917
|
+
output: {
|
|
1918
|
+
id: string;
|
|
1919
|
+
name: string;
|
|
1920
|
+
pid: number;
|
|
1921
|
+
state: "running";
|
|
1922
|
+
cpuPercent: number;
|
|
1923
|
+
memoryPercent: number;
|
|
1924
|
+
memoryMB: number;
|
|
1925
|
+
isHub: boolean;
|
|
1926
|
+
platform: string;
|
|
1927
|
+
arch: string;
|
|
1928
|
+
host: string;
|
|
1929
|
+
capabilities: string[];
|
|
1930
|
+
installedAddons: string[];
|
|
1931
|
+
pythonRuntimes: string[];
|
|
1932
|
+
connectedSince: number;
|
|
1933
|
+
subProcesses: unknown[];
|
|
1934
|
+
}[];
|
|
1935
|
+
meta: object;
|
|
1936
|
+
}>;
|
|
1937
|
+
installAddon: _trpc_server.TRPCMutationProcedure<{
|
|
1938
|
+
input: {
|
|
1939
|
+
package: string;
|
|
1940
|
+
agentId: string;
|
|
1941
|
+
version?: string | undefined;
|
|
1942
|
+
};
|
|
1943
|
+
output: {
|
|
1944
|
+
ok: boolean;
|
|
1945
|
+
};
|
|
1946
|
+
meta: object;
|
|
1947
|
+
}>;
|
|
1948
|
+
}>>;
|
|
1949
|
+
backup: _trpc_server.TRPCBuiltRouter<{
|
|
1950
|
+
ctx: {
|
|
1951
|
+
user: {
|
|
1952
|
+
id: string;
|
|
1953
|
+
username: string;
|
|
1954
|
+
role: string;
|
|
1955
|
+
} | null;
|
|
1956
|
+
};
|
|
1957
|
+
meta: object;
|
|
1958
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
1959
|
+
transformer: true;
|
|
1960
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
1961
|
+
trigger: _trpc_server.TRPCMutationProcedure<{
|
|
1962
|
+
input: {
|
|
1963
|
+
label?: string | undefined;
|
|
1964
|
+
locations?: string[] | undefined;
|
|
1965
|
+
} | undefined;
|
|
1966
|
+
output: undefined;
|
|
1967
|
+
meta: object;
|
|
1968
|
+
}>;
|
|
1969
|
+
list: _trpc_server.TRPCQueryProcedure<{
|
|
1970
|
+
input: void;
|
|
1971
|
+
output: readonly undefined[];
|
|
1972
|
+
meta: object;
|
|
1973
|
+
}>;
|
|
1974
|
+
restore: _trpc_server.TRPCMutationProcedure<{
|
|
1975
|
+
input: {
|
|
1976
|
+
backupId: string;
|
|
1977
|
+
};
|
|
1978
|
+
output: {
|
|
1979
|
+
success: boolean;
|
|
1980
|
+
};
|
|
1981
|
+
meta: object;
|
|
1982
|
+
}>;
|
|
1983
|
+
delete: _trpc_server.TRPCMutationProcedure<{
|
|
1984
|
+
input: {
|
|
1985
|
+
backupId: string;
|
|
1986
|
+
};
|
|
1987
|
+
output: {
|
|
1988
|
+
success: boolean;
|
|
1989
|
+
};
|
|
1990
|
+
meta: object;
|
|
1991
|
+
}>;
|
|
1992
|
+
}>>;
|
|
1993
|
+
repl: _trpc_server.TRPCBuiltRouter<{
|
|
1994
|
+
ctx: {
|
|
1995
|
+
user: {
|
|
1996
|
+
id: string;
|
|
1997
|
+
username: string;
|
|
1998
|
+
role: string;
|
|
1999
|
+
} | null;
|
|
2000
|
+
};
|
|
2001
|
+
meta: object;
|
|
2002
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2003
|
+
transformer: true;
|
|
2004
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2005
|
+
execute: _trpc_server.TRPCMutationProcedure<{
|
|
2006
|
+
input: {
|
|
2007
|
+
code: string;
|
|
2008
|
+
scope: {
|
|
2009
|
+
type: "system";
|
|
2010
|
+
} | {
|
|
2011
|
+
deviceId: string;
|
|
2012
|
+
type: "device";
|
|
2013
|
+
} | {
|
|
2014
|
+
type: "provider";
|
|
2015
|
+
providerId: string;
|
|
2016
|
+
} | {
|
|
2017
|
+
type: "addon";
|
|
2018
|
+
addonId: string;
|
|
2019
|
+
};
|
|
2020
|
+
};
|
|
2021
|
+
output: undefined;
|
|
2022
|
+
meta: object;
|
|
2023
|
+
}>;
|
|
2024
|
+
completions: _trpc_server.TRPCQueryProcedure<{
|
|
2025
|
+
input: {
|
|
2026
|
+
partial: string;
|
|
2027
|
+
scope: {
|
|
2028
|
+
type: "system";
|
|
2029
|
+
} | {
|
|
2030
|
+
deviceId: string;
|
|
2031
|
+
type: "device";
|
|
2032
|
+
} | {
|
|
2033
|
+
type: "provider";
|
|
2034
|
+
providerId: string;
|
|
2035
|
+
} | {
|
|
2036
|
+
type: "addon";
|
|
2037
|
+
addonId: string;
|
|
2038
|
+
};
|
|
2039
|
+
};
|
|
2040
|
+
output: string[];
|
|
2041
|
+
meta: object;
|
|
2042
|
+
}>;
|
|
2043
|
+
}>>;
|
|
2044
|
+
knownFaces: _trpc_server.TRPCBuiltRouter<{
|
|
2045
|
+
ctx: {
|
|
2046
|
+
user: {
|
|
2047
|
+
id: string;
|
|
2048
|
+
username: string;
|
|
2049
|
+
role: string;
|
|
2050
|
+
} | null;
|
|
2051
|
+
};
|
|
2052
|
+
meta: object;
|
|
2053
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2054
|
+
transformer: true;
|
|
2055
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2056
|
+
list: _trpc_server.TRPCQueryProcedure<{
|
|
2057
|
+
input: void;
|
|
2058
|
+
output: {
|
|
2059
|
+
id: string;
|
|
2060
|
+
label: string;
|
|
2061
|
+
group?: string;
|
|
2062
|
+
cropBase64: string;
|
|
2063
|
+
createdAt: number;
|
|
2064
|
+
updatedAt: number;
|
|
2065
|
+
source?: string;
|
|
2066
|
+
metadata?: Readonly<Record<string, unknown>>;
|
|
2067
|
+
}[];
|
|
2068
|
+
meta: object;
|
|
2069
|
+
}>;
|
|
2070
|
+
register: _trpc_server.TRPCMutationProcedure<{
|
|
2071
|
+
input: {
|
|
2072
|
+
label: string;
|
|
2073
|
+
cropBase64: string;
|
|
2074
|
+
group?: string | undefined;
|
|
2075
|
+
};
|
|
2076
|
+
output: never;
|
|
2077
|
+
meta: object;
|
|
2078
|
+
}>;
|
|
2079
|
+
delete: _trpc_server.TRPCMutationProcedure<{
|
|
2080
|
+
input: {
|
|
2081
|
+
id: string;
|
|
2082
|
+
};
|
|
2083
|
+
output: {
|
|
2084
|
+
success: boolean;
|
|
2085
|
+
};
|
|
2086
|
+
meta: object;
|
|
2087
|
+
}>;
|
|
2088
|
+
update: _trpc_server.TRPCMutationProcedure<{
|
|
2089
|
+
input: {
|
|
2090
|
+
id: string;
|
|
2091
|
+
group?: string | undefined;
|
|
2092
|
+
label?: string | undefined;
|
|
2093
|
+
};
|
|
2094
|
+
output: {
|
|
2095
|
+
success: boolean;
|
|
2096
|
+
};
|
|
2097
|
+
meta: object;
|
|
2098
|
+
}>;
|
|
2099
|
+
recalculate: _trpc_server.TRPCMutationProcedure<{
|
|
2100
|
+
input: {
|
|
2101
|
+
id: string;
|
|
2102
|
+
};
|
|
2103
|
+
output: never;
|
|
2104
|
+
meta: object;
|
|
2105
|
+
}>;
|
|
2106
|
+
match: _trpc_server.TRPCMutationProcedure<{
|
|
2107
|
+
input: {
|
|
2108
|
+
cropBase64: string;
|
|
2109
|
+
threshold?: number | undefined;
|
|
2110
|
+
};
|
|
2111
|
+
output: never;
|
|
2112
|
+
meta: object;
|
|
2113
|
+
}>;
|
|
2114
|
+
batchRegister: _trpc_server.TRPCMutationProcedure<{
|
|
2115
|
+
input: {
|
|
2116
|
+
label: string;
|
|
2117
|
+
cropBase64: string;
|
|
2118
|
+
group?: string | undefined;
|
|
2119
|
+
}[];
|
|
2120
|
+
output: never;
|
|
2121
|
+
meta: object;
|
|
2122
|
+
}>;
|
|
2123
|
+
}>>;
|
|
2124
|
+
session: _trpc_server.TRPCBuiltRouter<{
|
|
2125
|
+
ctx: {
|
|
2126
|
+
user: {
|
|
2127
|
+
id: string;
|
|
2128
|
+
username: string;
|
|
2129
|
+
role: string;
|
|
2130
|
+
} | null;
|
|
2131
|
+
};
|
|
2132
|
+
meta: object;
|
|
2133
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2134
|
+
transformer: true;
|
|
2135
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2136
|
+
getActiveTracks: _trpc_server.TRPCQueryProcedure<{
|
|
2137
|
+
input: {
|
|
2138
|
+
deviceId?: string | undefined;
|
|
2139
|
+
};
|
|
2140
|
+
output: {
|
|
2141
|
+
trackId: string;
|
|
2142
|
+
deviceId: string;
|
|
2143
|
+
className: string;
|
|
2144
|
+
label: string | undefined;
|
|
2145
|
+
firstSeen: number;
|
|
2146
|
+
lastSeen: number;
|
|
2147
|
+
totalFrames: number;
|
|
2148
|
+
state: string;
|
|
2149
|
+
globalId: string | undefined;
|
|
2150
|
+
positions: readonly {
|
|
2151
|
+
readonly x: number;
|
|
2152
|
+
readonly y: number;
|
|
2153
|
+
readonly t: number;
|
|
2154
|
+
}[];
|
|
2155
|
+
hasEmbedding: boolean;
|
|
2156
|
+
hasCrop: boolean;
|
|
2157
|
+
}[];
|
|
2158
|
+
meta: object;
|
|
2159
|
+
}>;
|
|
2160
|
+
getTrackCounts: _trpc_server.TRPCQueryProcedure<{
|
|
2161
|
+
input: void;
|
|
2162
|
+
output: unknown;
|
|
2163
|
+
meta: object;
|
|
2164
|
+
}>;
|
|
2165
|
+
getTrack: _trpc_server.TRPCQueryProcedure<{
|
|
2166
|
+
input: {
|
|
2167
|
+
deviceId: string;
|
|
2168
|
+
trackId: string;
|
|
2169
|
+
};
|
|
2170
|
+
output: {
|
|
2171
|
+
positions: {
|
|
2172
|
+
readonly x: number;
|
|
2173
|
+
readonly y: number;
|
|
2174
|
+
readonly t: number;
|
|
2175
|
+
}[];
|
|
2176
|
+
trackId: string;
|
|
2177
|
+
deviceId: string;
|
|
2178
|
+
className: string;
|
|
2179
|
+
label: string | undefined;
|
|
2180
|
+
firstSeen: number;
|
|
2181
|
+
lastSeen: number;
|
|
2182
|
+
totalFrames: number;
|
|
2183
|
+
state: string;
|
|
2184
|
+
globalId: string | undefined;
|
|
2185
|
+
hasEmbedding: boolean;
|
|
2186
|
+
hasCrop: boolean;
|
|
2187
|
+
} | null;
|
|
2188
|
+
meta: object;
|
|
2189
|
+
}>;
|
|
2190
|
+
clearTracks: _trpc_server.TRPCMutationProcedure<{
|
|
2191
|
+
input: {
|
|
2192
|
+
deviceId?: string | undefined;
|
|
2193
|
+
};
|
|
2194
|
+
output: {
|
|
2195
|
+
success: boolean;
|
|
2196
|
+
};
|
|
2197
|
+
meta: object;
|
|
2198
|
+
}>;
|
|
2199
|
+
}>>;
|
|
2200
|
+
trackMedia: _trpc_server.TRPCBuiltRouter<{
|
|
2201
|
+
ctx: {
|
|
2202
|
+
user: {
|
|
2203
|
+
id: string;
|
|
2204
|
+
username: string;
|
|
2205
|
+
role: string;
|
|
2206
|
+
} | null;
|
|
2207
|
+
};
|
|
2208
|
+
meta: object;
|
|
2209
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2210
|
+
transformer: true;
|
|
2211
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2212
|
+
getEventMedia: _trpc_server.TRPCQueryProcedure<{
|
|
2213
|
+
input: {
|
|
2214
|
+
eventId: string;
|
|
2215
|
+
};
|
|
2216
|
+
output: {
|
|
2217
|
+
path: string;
|
|
2218
|
+
type: undefined;
|
|
2219
|
+
source: "buffer" | "storage";
|
|
2220
|
+
base64: string;
|
|
2221
|
+
sizeBytes: number;
|
|
2222
|
+
}[];
|
|
2223
|
+
meta: object;
|
|
2224
|
+
}>;
|
|
2225
|
+
getTrackMedia: _trpc_server.TRPCQueryProcedure<{
|
|
2226
|
+
input: {
|
|
2227
|
+
trackId: string;
|
|
2228
|
+
};
|
|
2229
|
+
output: {
|
|
2230
|
+
path: string;
|
|
2231
|
+
type: undefined;
|
|
2232
|
+
source: "buffer" | "storage";
|
|
2233
|
+
base64: string;
|
|
2234
|
+
sizeBytes: number;
|
|
2235
|
+
}[];
|
|
2236
|
+
meta: object;
|
|
2237
|
+
}>;
|
|
2238
|
+
getDeviceMedia: _trpc_server.TRPCQueryProcedure<{
|
|
2239
|
+
input: {
|
|
2240
|
+
deviceId: string;
|
|
2241
|
+
since?: number | undefined;
|
|
2242
|
+
until?: number | undefined;
|
|
2243
|
+
};
|
|
2244
|
+
output: {
|
|
2245
|
+
path: string;
|
|
2246
|
+
type: undefined;
|
|
2247
|
+
source: "buffer" | "storage";
|
|
2248
|
+
base64: string;
|
|
2249
|
+
sizeBytes: number;
|
|
2250
|
+
}[];
|
|
2251
|
+
meta: object;
|
|
2252
|
+
}>;
|
|
2253
|
+
getBufferStatus: _trpc_server.TRPCQueryProcedure<{
|
|
2254
|
+
input: void;
|
|
2255
|
+
output: unknown;
|
|
2256
|
+
meta: object;
|
|
2257
|
+
}>;
|
|
2258
|
+
}>>;
|
|
2259
|
+
trackTrail: _trpc_server.TRPCBuiltRouter<{
|
|
2260
|
+
ctx: {
|
|
2261
|
+
user: {
|
|
2262
|
+
id: string;
|
|
2263
|
+
username: string;
|
|
2264
|
+
role: string;
|
|
2265
|
+
} | null;
|
|
2266
|
+
};
|
|
2267
|
+
meta: object;
|
|
2268
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2269
|
+
transformer: true;
|
|
2270
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2271
|
+
getTrail: _trpc_server.TRPCQueryProcedure<{
|
|
2272
|
+
input: {
|
|
2273
|
+
trackId: string;
|
|
2274
|
+
};
|
|
2275
|
+
output: unknown;
|
|
2276
|
+
meta: object;
|
|
2277
|
+
}>;
|
|
2278
|
+
getActiveTrails: _trpc_server.TRPCQueryProcedure<{
|
|
2279
|
+
input: {
|
|
2280
|
+
deviceId: string;
|
|
2281
|
+
};
|
|
2282
|
+
output: unknown;
|
|
2283
|
+
meta: object;
|
|
2284
|
+
}>;
|
|
2285
|
+
listTrails: _trpc_server.TRPCQueryProcedure<{
|
|
2286
|
+
input: {
|
|
2287
|
+
deviceId: string;
|
|
2288
|
+
limit?: number | undefined;
|
|
2289
|
+
since?: number | undefined;
|
|
2290
|
+
until?: number | undefined;
|
|
2291
|
+
className?: string | undefined;
|
|
2292
|
+
};
|
|
2293
|
+
output: unknown;
|
|
2294
|
+
meta: object;
|
|
2295
|
+
}>;
|
|
2296
|
+
setConfig: _trpc_server.TRPCMutationProcedure<{
|
|
2297
|
+
input: {
|
|
2298
|
+
deviceId: string;
|
|
2299
|
+
enabled?: boolean | undefined;
|
|
2300
|
+
snapshotIntervalMs?: number | undefined;
|
|
2301
|
+
maxTrailLength?: number | undefined;
|
|
2302
|
+
saveThumbnails?: boolean | undefined;
|
|
2303
|
+
};
|
|
2304
|
+
output: unknown;
|
|
2305
|
+
meta: object;
|
|
2306
|
+
}>;
|
|
2307
|
+
getConfig: _trpc_server.TRPCQueryProcedure<{
|
|
2308
|
+
input: {
|
|
2309
|
+
deviceId: string;
|
|
2310
|
+
};
|
|
2311
|
+
output: unknown;
|
|
2312
|
+
meta: object;
|
|
2313
|
+
}>;
|
|
2314
|
+
}>>;
|
|
2315
|
+
recording: _trpc_server.TRPCBuiltRouter<{
|
|
2316
|
+
ctx: {
|
|
2317
|
+
user: {
|
|
2318
|
+
id: string;
|
|
2319
|
+
username: string;
|
|
2320
|
+
role: string;
|
|
2321
|
+
} | null;
|
|
2322
|
+
};
|
|
2323
|
+
meta: object;
|
|
2324
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2325
|
+
transformer: true;
|
|
2326
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2327
|
+
enable: _trpc_server.TRPCMutationProcedure<{
|
|
2328
|
+
input: {
|
|
2329
|
+
deviceId: string;
|
|
2330
|
+
policy: {
|
|
2331
|
+
mode: "motion" | "continuous" | "scheduled" | "composite";
|
|
2332
|
+
enabled: boolean;
|
|
2333
|
+
streams: {
|
|
2334
|
+
mode: "inherit" | "always";
|
|
2335
|
+
streamId: string;
|
|
2336
|
+
}[];
|
|
2337
|
+
preBufferSec?: number | undefined;
|
|
2338
|
+
postBufferSec?: number | undefined;
|
|
2339
|
+
scheduleRules?: {
|
|
2340
|
+
mode: "motion" | "continuous";
|
|
2341
|
+
days: number[];
|
|
2342
|
+
startTime: string;
|
|
2343
|
+
endTime: string;
|
|
2344
|
+
}[] | undefined;
|
|
2345
|
+
};
|
|
2346
|
+
storageOverrides?: {
|
|
2347
|
+
dataCategory: "recording:main" | "recording:mid" | "recording:sub" | "thumbnail:scrub" | "thumbnail:event";
|
|
2348
|
+
storageName: string;
|
|
2349
|
+
subDirectory: string;
|
|
2350
|
+
retentionDays?: number | null | undefined;
|
|
2351
|
+
retentionGb?: number | null | undefined;
|
|
2352
|
+
}[] | undefined;
|
|
2353
|
+
ffmpegOverrides?: {
|
|
2354
|
+
path?: string | undefined;
|
|
2355
|
+
hwaccel?: "none" | "vaapi" | "qsv" | "videotoolbox" | "cuda" | "v4l2m2m" | undefined;
|
|
2356
|
+
threads?: number | undefined;
|
|
2357
|
+
inputArgs?: string[] | undefined;
|
|
2358
|
+
outputArgs?: string[] | undefined;
|
|
2359
|
+
videoCodec?: string | undefined;
|
|
2360
|
+
audioCodec?: string | undefined;
|
|
2361
|
+
} | undefined;
|
|
2362
|
+
};
|
|
2363
|
+
output: {
|
|
2364
|
+
success: boolean;
|
|
2365
|
+
};
|
|
2366
|
+
meta: object;
|
|
2367
|
+
}>;
|
|
2368
|
+
disable: _trpc_server.TRPCMutationProcedure<{
|
|
2369
|
+
input: {
|
|
2370
|
+
deviceId: string;
|
|
2371
|
+
};
|
|
2372
|
+
output: {
|
|
2373
|
+
success: boolean;
|
|
2374
|
+
};
|
|
2375
|
+
meta: object;
|
|
2376
|
+
}>;
|
|
2377
|
+
getConfig: _trpc_server.TRPCQueryProcedure<{
|
|
2378
|
+
input: {
|
|
2379
|
+
deviceId: string;
|
|
2380
|
+
};
|
|
2381
|
+
output: unknown;
|
|
2382
|
+
meta: object;
|
|
2383
|
+
}>;
|
|
2384
|
+
updateConfig: _trpc_server.TRPCMutationProcedure<{
|
|
2385
|
+
input: {
|
|
2386
|
+
deviceId: string;
|
|
2387
|
+
policy: {
|
|
2388
|
+
mode: "motion" | "continuous" | "scheduled" | "composite";
|
|
2389
|
+
enabled: boolean;
|
|
2390
|
+
streams: {
|
|
2391
|
+
mode: "inherit" | "always";
|
|
2392
|
+
streamId: string;
|
|
2393
|
+
}[];
|
|
2394
|
+
preBufferSec?: number | undefined;
|
|
2395
|
+
postBufferSec?: number | undefined;
|
|
2396
|
+
scheduleRules?: {
|
|
2397
|
+
mode: "motion" | "continuous";
|
|
2398
|
+
days: number[];
|
|
2399
|
+
startTime: string;
|
|
2400
|
+
endTime: string;
|
|
2401
|
+
}[] | undefined;
|
|
2402
|
+
};
|
|
2403
|
+
ffmpegOverrides?: {
|
|
2404
|
+
path?: string | undefined;
|
|
2405
|
+
hwaccel?: "none" | "vaapi" | "qsv" | "videotoolbox" | "cuda" | "v4l2m2m" | undefined;
|
|
2406
|
+
threads?: number | undefined;
|
|
2407
|
+
inputArgs?: string[] | undefined;
|
|
2408
|
+
outputArgs?: string[] | undefined;
|
|
2409
|
+
videoCodec?: string | undefined;
|
|
2410
|
+
audioCodec?: string | undefined;
|
|
2411
|
+
} | undefined;
|
|
2412
|
+
};
|
|
2413
|
+
output: {
|
|
2414
|
+
success: boolean;
|
|
2415
|
+
};
|
|
2416
|
+
meta: object;
|
|
2417
|
+
}>;
|
|
2418
|
+
getPlaylist: _trpc_server.TRPCQueryProcedure<{
|
|
2419
|
+
input: {
|
|
2420
|
+
deviceId: string;
|
|
2421
|
+
streamId: string;
|
|
2422
|
+
startTime: number;
|
|
2423
|
+
endTime: number;
|
|
2424
|
+
live?: boolean | undefined;
|
|
2425
|
+
};
|
|
2426
|
+
output: unknown;
|
|
2427
|
+
meta: object;
|
|
2428
|
+
}>;
|
|
2429
|
+
getThumbnail: _trpc_server.TRPCQueryProcedure<{
|
|
2430
|
+
input: {
|
|
2431
|
+
deviceId: string;
|
|
2432
|
+
timestamp: number;
|
|
2433
|
+
category?: "scrub" | "event" | undefined;
|
|
2434
|
+
};
|
|
2435
|
+
output: unknown;
|
|
2436
|
+
meta: object;
|
|
2437
|
+
}>;
|
|
2438
|
+
getSegments: _trpc_server.TRPCQueryProcedure<{
|
|
2439
|
+
input: {
|
|
2440
|
+
deviceId: string;
|
|
2441
|
+
streamId: string;
|
|
2442
|
+
startTime: number;
|
|
2443
|
+
endTime: number;
|
|
2444
|
+
};
|
|
2445
|
+
output: unknown;
|
|
2446
|
+
meta: object;
|
|
2447
|
+
}>;
|
|
2448
|
+
getAvailability: _trpc_server.TRPCQueryProcedure<{
|
|
2449
|
+
input: {
|
|
2450
|
+
deviceId: string;
|
|
2451
|
+
startTime: number;
|
|
2452
|
+
endTime: number;
|
|
2453
|
+
};
|
|
2454
|
+
output: unknown;
|
|
2455
|
+
meta: object;
|
|
2456
|
+
}>;
|
|
2457
|
+
estimateStorage: _trpc_server.TRPCQueryProcedure<{
|
|
2458
|
+
input: {
|
|
2459
|
+
deviceId: string;
|
|
2460
|
+
motionInput?: {
|
|
2461
|
+
avgEventsPerDay: number;
|
|
2462
|
+
avgDurationSec: number;
|
|
2463
|
+
} | undefined;
|
|
2464
|
+
};
|
|
2465
|
+
output: {
|
|
2466
|
+
[key: string]: unknown;
|
|
2467
|
+
totalEstimatedGb: number;
|
|
2468
|
+
};
|
|
2469
|
+
meta: object;
|
|
2470
|
+
}>;
|
|
2471
|
+
estimateGlobalStorage: _trpc_server.TRPCQueryProcedure<{
|
|
2472
|
+
input: void;
|
|
2473
|
+
output: {
|
|
2474
|
+
devices: {
|
|
2475
|
+
deviceId: string;
|
|
2476
|
+
estimate: {
|
|
2477
|
+
[key: string]: unknown;
|
|
2478
|
+
totalEstimatedGb: number;
|
|
2479
|
+
};
|
|
2480
|
+
}[];
|
|
2481
|
+
totalEstimatedGb: number;
|
|
2482
|
+
};
|
|
2483
|
+
meta: object;
|
|
2484
|
+
}>;
|
|
2485
|
+
getStorageUsage: _trpc_server.TRPCQueryProcedure<{
|
|
2486
|
+
input: {
|
|
2487
|
+
deviceId: string;
|
|
2488
|
+
streamId: string;
|
|
2489
|
+
};
|
|
2490
|
+
output: unknown;
|
|
2491
|
+
meta: object;
|
|
2492
|
+
}>;
|
|
2493
|
+
setPolicy: _trpc_server.TRPCMutationProcedure<{
|
|
2494
|
+
input: {
|
|
2495
|
+
deviceId: string;
|
|
2496
|
+
policy: {
|
|
2497
|
+
mode: "motion" | "continuous" | "scheduled" | "composite";
|
|
2498
|
+
enabled: boolean;
|
|
2499
|
+
streams: {
|
|
2500
|
+
mode: "inherit" | "always";
|
|
2501
|
+
streamId: string;
|
|
2502
|
+
}[];
|
|
2503
|
+
preBufferSec?: number | undefined;
|
|
2504
|
+
postBufferSec?: number | undefined;
|
|
2505
|
+
scheduleRules?: {
|
|
2506
|
+
mode: "motion" | "continuous";
|
|
2507
|
+
days: number[];
|
|
2508
|
+
startTime: string;
|
|
2509
|
+
endTime: string;
|
|
2510
|
+
}[] | undefined;
|
|
2511
|
+
};
|
|
2512
|
+
};
|
|
2513
|
+
output: {
|
|
2514
|
+
success: boolean;
|
|
2515
|
+
};
|
|
2516
|
+
meta: object;
|
|
2517
|
+
}>;
|
|
2518
|
+
getPolicy: _trpc_server.TRPCQueryProcedure<{
|
|
2519
|
+
input: {
|
|
2520
|
+
deviceId: string;
|
|
2521
|
+
};
|
|
2522
|
+
output: unknown;
|
|
2523
|
+
meta: object;
|
|
2524
|
+
}>;
|
|
2525
|
+
getPolicyStatus: _trpc_server.TRPCQueryProcedure<{
|
|
2526
|
+
input: {
|
|
2527
|
+
deviceId: string;
|
|
2528
|
+
};
|
|
2529
|
+
output: {
|
|
2530
|
+
deviceId: string;
|
|
2531
|
+
policyExists: boolean;
|
|
2532
|
+
enabled: any;
|
|
2533
|
+
mode: any;
|
|
2534
|
+
isRecording: boolean;
|
|
2535
|
+
};
|
|
2536
|
+
meta: object;
|
|
2537
|
+
}>;
|
|
2538
|
+
getMotionStats: _trpc_server.TRPCQueryProcedure<{
|
|
2539
|
+
input: {
|
|
2540
|
+
deviceId: string;
|
|
2541
|
+
startTime: number;
|
|
2542
|
+
endTime: number;
|
|
2543
|
+
};
|
|
2544
|
+
output: {
|
|
2545
|
+
avgEventsPerDay: number;
|
|
2546
|
+
avgDurationSec: number;
|
|
2547
|
+
dutyCyclePercent: number;
|
|
2548
|
+
totalEvents: number;
|
|
2549
|
+
};
|
|
2550
|
+
meta: object;
|
|
2551
|
+
}>;
|
|
2552
|
+
getRetentionConfig: _trpc_server.TRPCQueryProcedure<{
|
|
2553
|
+
input: {
|
|
2554
|
+
deviceId: string;
|
|
2555
|
+
dataCategory: "recording:main" | "recording:mid" | "recording:sub" | "thumbnail:scrub" | "thumbnail:event";
|
|
2556
|
+
};
|
|
2557
|
+
output: unknown;
|
|
2558
|
+
meta: object;
|
|
2559
|
+
}>;
|
|
2560
|
+
updateRetentionConfig: _trpc_server.TRPCMutationProcedure<{
|
|
2561
|
+
input: {
|
|
2562
|
+
deviceId: string;
|
|
2563
|
+
retentionDays: number | null;
|
|
2564
|
+
dataCategory: "recording:main" | "recording:mid" | "recording:sub" | "thumbnail:scrub" | "thumbnail:event";
|
|
2565
|
+
storageName: string;
|
|
2566
|
+
subDirectory: string;
|
|
2567
|
+
retentionGb: number | null;
|
|
2568
|
+
};
|
|
2569
|
+
output: {
|
|
2570
|
+
success: boolean;
|
|
2571
|
+
};
|
|
2572
|
+
meta: object;
|
|
2573
|
+
}>;
|
|
2574
|
+
}>>;
|
|
2575
|
+
network: _trpc_server.TRPCBuiltRouter<{
|
|
2576
|
+
ctx: {
|
|
2577
|
+
user: {
|
|
2578
|
+
id: string;
|
|
2579
|
+
username: string;
|
|
2580
|
+
role: string;
|
|
2581
|
+
} | null;
|
|
2582
|
+
};
|
|
2583
|
+
meta: object;
|
|
2584
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2585
|
+
transformer: true;
|
|
2586
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2587
|
+
getDeviceStats: _trpc_server.TRPCQueryProcedure<{
|
|
2588
|
+
input: {
|
|
2589
|
+
deviceId: string;
|
|
2590
|
+
};
|
|
2591
|
+
output: undefined | null;
|
|
2592
|
+
meta: object;
|
|
2593
|
+
}>;
|
|
2594
|
+
getAllStats: _trpc_server.TRPCQueryProcedure<{
|
|
2595
|
+
input: void;
|
|
2596
|
+
output: readonly undefined[];
|
|
2597
|
+
meta: object;
|
|
2598
|
+
}>;
|
|
2599
|
+
reportClientStats: _trpc_server.TRPCMutationProcedure<{
|
|
2600
|
+
input: {
|
|
2601
|
+
deviceId: string;
|
|
2602
|
+
rttMs: number;
|
|
2603
|
+
jitterMs: number;
|
|
2604
|
+
estimatedBandwidthKbps: number;
|
|
2605
|
+
};
|
|
2606
|
+
output: {
|
|
2607
|
+
success: boolean;
|
|
2608
|
+
};
|
|
2609
|
+
meta: object;
|
|
2610
|
+
}>;
|
|
2611
|
+
}>>;
|
|
2612
|
+
addons: _trpc_server.TRPCBuiltRouter<{
|
|
2613
|
+
ctx: {
|
|
2614
|
+
user: {
|
|
2615
|
+
id: string;
|
|
2616
|
+
username: string;
|
|
2617
|
+
role: string;
|
|
2618
|
+
} | null;
|
|
2619
|
+
};
|
|
2620
|
+
meta: object;
|
|
2621
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2622
|
+
transformer: true;
|
|
2623
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2624
|
+
list: _trpc_server.TRPCQueryProcedure<{
|
|
2625
|
+
input: void;
|
|
2626
|
+
output: {
|
|
2627
|
+
manifest: undefined & {
|
|
2628
|
+
packageName: string;
|
|
2629
|
+
packageVersion: string;
|
|
2630
|
+
removable?: boolean;
|
|
2631
|
+
};
|
|
2632
|
+
hasConfigSchema: boolean;
|
|
2633
|
+
source: "core" | "installed" | "workspace";
|
|
2634
|
+
}[];
|
|
2635
|
+
meta: object;
|
|
2636
|
+
}>;
|
|
2637
|
+
getConfigSchema: _trpc_server.TRPCQueryProcedure<{
|
|
2638
|
+
input: {
|
|
2639
|
+
addonId: string;
|
|
2640
|
+
};
|
|
2641
|
+
output: undefined | null;
|
|
2642
|
+
meta: object;
|
|
2643
|
+
}>;
|
|
2644
|
+
getConfig: _trpc_server.TRPCQueryProcedure<{
|
|
2645
|
+
input: {
|
|
2646
|
+
addonId: string;
|
|
2647
|
+
};
|
|
2648
|
+
output: Record<string, unknown>;
|
|
2649
|
+
meta: object;
|
|
2650
|
+
}>;
|
|
2651
|
+
updateConfig: _trpc_server.TRPCMutationProcedure<{
|
|
2652
|
+
input: {
|
|
2653
|
+
config: Record<string, unknown>;
|
|
2654
|
+
addonId: string;
|
|
2655
|
+
};
|
|
2656
|
+
output: {
|
|
2657
|
+
success: boolean;
|
|
2658
|
+
};
|
|
2659
|
+
meta: object;
|
|
2660
|
+
}>;
|
|
2661
|
+
getLogs: _trpc_server.TRPCQueryProcedure<{
|
|
2662
|
+
input: {
|
|
2663
|
+
addonId: string;
|
|
2664
|
+
level?: "error" | "info" | "debug" | "warn" | undefined;
|
|
2665
|
+
limit?: number | undefined;
|
|
2666
|
+
};
|
|
2667
|
+
output: undefined[];
|
|
2668
|
+
meta: object;
|
|
2669
|
+
}>;
|
|
2670
|
+
}>>;
|
|
2671
|
+
bridgePipeline: _trpc_server.TRPCBuiltRouter<{
|
|
2672
|
+
ctx: {
|
|
2673
|
+
user: {
|
|
2674
|
+
id: string;
|
|
2675
|
+
username: string;
|
|
2676
|
+
role: string;
|
|
2677
|
+
} | null;
|
|
2678
|
+
};
|
|
2679
|
+
meta: object;
|
|
2680
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2681
|
+
transformer: true;
|
|
2682
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2683
|
+
listAddons: _trpc_server.TRPCQueryProcedure<{
|
|
2684
|
+
input: void;
|
|
2685
|
+
output: {
|
|
2686
|
+
id: string;
|
|
2687
|
+
packageName: string;
|
|
2688
|
+
slot: undefined | null;
|
|
2689
|
+
}[];
|
|
2690
|
+
meta: object;
|
|
2691
|
+
}>;
|
|
2692
|
+
getPipeline: _trpc_server.TRPCQueryProcedure<{
|
|
2693
|
+
input: {
|
|
2694
|
+
deviceId: string;
|
|
2695
|
+
};
|
|
2696
|
+
output: undefined | null;
|
|
2697
|
+
meta: object;
|
|
2698
|
+
}>;
|
|
2699
|
+
setPipeline: _trpc_server.TRPCMutationProcedure<{
|
|
2700
|
+
input: {
|
|
2701
|
+
config: {
|
|
2702
|
+
video: any[];
|
|
2703
|
+
audio?: any;
|
|
2704
|
+
};
|
|
2705
|
+
deviceId: string;
|
|
2706
|
+
};
|
|
2707
|
+
output: {
|
|
2708
|
+
success: boolean;
|
|
2709
|
+
};
|
|
2710
|
+
meta: object;
|
|
2711
|
+
}>;
|
|
2712
|
+
validatePipeline: _trpc_server.TRPCQueryProcedure<{
|
|
2713
|
+
input: {
|
|
2714
|
+
video: any[];
|
|
2715
|
+
audio?: any;
|
|
2716
|
+
};
|
|
2717
|
+
output: undefined;
|
|
2718
|
+
meta: object;
|
|
2719
|
+
}>;
|
|
2720
|
+
getAddonConfig: _trpc_server.TRPCQueryProcedure<{
|
|
2721
|
+
input: {
|
|
2722
|
+
addonId: string;
|
|
2723
|
+
};
|
|
2724
|
+
output: Record<string, unknown>;
|
|
2725
|
+
meta: object;
|
|
2726
|
+
}>;
|
|
2727
|
+
setAddonConfig: _trpc_server.TRPCMutationProcedure<{
|
|
2728
|
+
input: {
|
|
2729
|
+
config: Record<string, unknown>;
|
|
2730
|
+
addonId: string;
|
|
2731
|
+
};
|
|
2732
|
+
output: {
|
|
2733
|
+
success: boolean;
|
|
2734
|
+
};
|
|
2735
|
+
meta: object;
|
|
2736
|
+
}>;
|
|
2737
|
+
processFrame: _trpc_server.TRPCQueryProcedure<{
|
|
2738
|
+
input: {
|
|
2739
|
+
deviceId: string;
|
|
2740
|
+
};
|
|
2741
|
+
output: {
|
|
2742
|
+
results: never[];
|
|
2743
|
+
totalMs: number;
|
|
2744
|
+
timings: {};
|
|
2745
|
+
frameTimestamp: number;
|
|
2746
|
+
};
|
|
2747
|
+
meta: object;
|
|
2748
|
+
}>;
|
|
2749
|
+
}>>;
|
|
2750
|
+
bridgeAddons: _trpc_server.TRPCBuiltRouter<{
|
|
2751
|
+
ctx: {
|
|
2752
|
+
user: {
|
|
2753
|
+
id: string;
|
|
2754
|
+
username: string;
|
|
2755
|
+
role: string;
|
|
2756
|
+
} | null;
|
|
2757
|
+
};
|
|
2758
|
+
meta: object;
|
|
2759
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2760
|
+
transformer: true;
|
|
2761
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2762
|
+
listPackages: _trpc_server.TRPCQueryProcedure<{
|
|
2763
|
+
input: void;
|
|
2764
|
+
output: undefined[];
|
|
2765
|
+
meta: object;
|
|
2766
|
+
}>;
|
|
2767
|
+
listAddons: _trpc_server.TRPCQueryProcedure<{
|
|
2768
|
+
input: void;
|
|
2769
|
+
output: {
|
|
2770
|
+
id: string;
|
|
2771
|
+
packageName: string;
|
|
2772
|
+
slot: undefined | null;
|
|
2773
|
+
}[];
|
|
2774
|
+
meta: object;
|
|
2775
|
+
}>;
|
|
2776
|
+
installPackage: _trpc_server.TRPCMutationProcedure<{
|
|
2777
|
+
input: {
|
|
2778
|
+
packageName: string;
|
|
2779
|
+
version?: string | undefined;
|
|
2780
|
+
};
|
|
2781
|
+
output: {
|
|
2782
|
+
success: boolean;
|
|
2783
|
+
loaded: string[];
|
|
2784
|
+
failed: string[];
|
|
2785
|
+
};
|
|
2786
|
+
meta: object;
|
|
2787
|
+
}>;
|
|
2788
|
+
uninstallPackage: _trpc_server.TRPCMutationProcedure<{
|
|
2789
|
+
input: {
|
|
2790
|
+
packageName: string;
|
|
2791
|
+
};
|
|
2792
|
+
output: {
|
|
2793
|
+
success: boolean;
|
|
2794
|
+
};
|
|
2795
|
+
meta: object;
|
|
2796
|
+
}>;
|
|
2797
|
+
reloadPackages: _trpc_server.TRPCMutationProcedure<{
|
|
2798
|
+
input: void;
|
|
2799
|
+
output: {
|
|
2800
|
+
success: boolean;
|
|
2801
|
+
message: string;
|
|
2802
|
+
};
|
|
2803
|
+
meta: object;
|
|
2804
|
+
}>;
|
|
2805
|
+
searchAvailable: _trpc_server.TRPCQueryProcedure<{
|
|
2806
|
+
input: {
|
|
2807
|
+
query?: string | undefined;
|
|
2808
|
+
} | undefined;
|
|
2809
|
+
output: {
|
|
2810
|
+
installed: boolean;
|
|
2811
|
+
installedVersion: string | undefined;
|
|
2812
|
+
name: string;
|
|
2813
|
+
version: string;
|
|
2814
|
+
description: string;
|
|
2815
|
+
keywords: string[];
|
|
2816
|
+
publishedAt: string;
|
|
2817
|
+
author: string;
|
|
2818
|
+
}[];
|
|
2819
|
+
meta: object;
|
|
2820
|
+
}>;
|
|
2821
|
+
}>>;
|
|
2822
|
+
detection: _trpc_server.TRPCBuiltRouter<{
|
|
2823
|
+
ctx: {
|
|
2824
|
+
user: {
|
|
2825
|
+
id: string;
|
|
2826
|
+
username: string;
|
|
2827
|
+
role: string;
|
|
2828
|
+
} | null;
|
|
2829
|
+
};
|
|
2830
|
+
meta: object;
|
|
2831
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2832
|
+
transformer: true;
|
|
2833
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2834
|
+
orchestratorStatus: _trpc_server.TRPCQueryProcedure<{
|
|
2835
|
+
input: void;
|
|
2836
|
+
output: undefined;
|
|
2837
|
+
meta: object;
|
|
2838
|
+
}>;
|
|
2839
|
+
cameraDetectionStatus: _trpc_server.TRPCQueryProcedure<{
|
|
2840
|
+
input: {
|
|
2841
|
+
deviceId: string;
|
|
2842
|
+
};
|
|
2843
|
+
output: undefined | undefined;
|
|
2844
|
+
meta: object;
|
|
2845
|
+
}>;
|
|
2846
|
+
brokerStatus: _trpc_server.TRPCQueryProcedure<{
|
|
2847
|
+
input: {
|
|
2848
|
+
deviceId: string;
|
|
2849
|
+
};
|
|
2850
|
+
output: undefined | null;
|
|
2851
|
+
meta: object;
|
|
2852
|
+
}>;
|
|
2853
|
+
listBrokers: _trpc_server.TRPCQueryProcedure<{
|
|
2854
|
+
input: void;
|
|
2855
|
+
output: {
|
|
2856
|
+
deviceId: string;
|
|
2857
|
+
status: undefined;
|
|
2858
|
+
stats: undefined;
|
|
2859
|
+
}[];
|
|
2860
|
+
meta: object;
|
|
2861
|
+
}>;
|
|
2862
|
+
}>>;
|
|
2863
|
+
capabilities: _trpc_server.TRPCBuiltRouter<{
|
|
2864
|
+
ctx: {
|
|
2865
|
+
user: {
|
|
2866
|
+
id: string;
|
|
2867
|
+
username: string;
|
|
2868
|
+
role: string;
|
|
2869
|
+
} | null;
|
|
2870
|
+
};
|
|
2871
|
+
meta: object;
|
|
2872
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2873
|
+
transformer: true;
|
|
2874
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2875
|
+
listCapabilities: _trpc_server.TRPCQueryProcedure<{
|
|
2876
|
+
input: void;
|
|
2877
|
+
output: undefined[];
|
|
2878
|
+
meta: object;
|
|
2879
|
+
}>;
|
|
2880
|
+
getCapability: _trpc_server.TRPCQueryProcedure<{
|
|
2881
|
+
input: {
|
|
2882
|
+
name: string;
|
|
2883
|
+
};
|
|
2884
|
+
output: undefined | null;
|
|
2885
|
+
meta: object;
|
|
2886
|
+
}>;
|
|
2887
|
+
setActiveSingleton: _trpc_server.TRPCMutationProcedure<{
|
|
2888
|
+
input: {
|
|
2889
|
+
capability: string;
|
|
2890
|
+
addonId: string;
|
|
2891
|
+
};
|
|
2892
|
+
output: void;
|
|
2893
|
+
meta: object;
|
|
2894
|
+
}>;
|
|
2895
|
+
setDeviceCapability: _trpc_server.TRPCMutationProcedure<{
|
|
2896
|
+
input: {
|
|
2897
|
+
capability: string;
|
|
2898
|
+
deviceId: string;
|
|
2899
|
+
addonId: string;
|
|
2900
|
+
};
|
|
2901
|
+
output: void;
|
|
2902
|
+
meta: object;
|
|
2903
|
+
}>;
|
|
2904
|
+
clearDeviceCapability: _trpc_server.TRPCMutationProcedure<{
|
|
2905
|
+
input: {
|
|
2906
|
+
capability: string;
|
|
2907
|
+
deviceId: string;
|
|
2908
|
+
};
|
|
2909
|
+
output: void;
|
|
2910
|
+
meta: object;
|
|
2911
|
+
}>;
|
|
2912
|
+
getDeviceCapabilities: _trpc_server.TRPCQueryProcedure<{
|
|
2913
|
+
input: {
|
|
2914
|
+
deviceId: string;
|
|
2915
|
+
};
|
|
2916
|
+
output: {
|
|
2917
|
+
[k: string]: string;
|
|
2918
|
+
};
|
|
2919
|
+
meta: object;
|
|
2920
|
+
}>;
|
|
2921
|
+
setDeviceCollectionFilter: _trpc_server.TRPCMutationProcedure<{
|
|
2922
|
+
input: {
|
|
2923
|
+
capability: string;
|
|
2924
|
+
deviceId: string;
|
|
2925
|
+
addonIds: string[];
|
|
2926
|
+
};
|
|
2927
|
+
output: void;
|
|
2928
|
+
meta: object;
|
|
2929
|
+
}>;
|
|
2930
|
+
clearDeviceCollectionFilter: _trpc_server.TRPCMutationProcedure<{
|
|
2931
|
+
input: {
|
|
2932
|
+
capability: string;
|
|
2933
|
+
deviceId: string;
|
|
2934
|
+
};
|
|
2935
|
+
output: void;
|
|
2936
|
+
meta: object;
|
|
2937
|
+
}>;
|
|
2938
|
+
}>>;
|
|
2939
|
+
update: _trpc_server.TRPCBuiltRouter<{
|
|
2940
|
+
ctx: {
|
|
2941
|
+
user: {
|
|
2942
|
+
id: string;
|
|
2943
|
+
username: string;
|
|
2944
|
+
role: string;
|
|
2945
|
+
} | null;
|
|
2946
|
+
};
|
|
2947
|
+
meta: object;
|
|
2948
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2949
|
+
transformer: true;
|
|
2950
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2951
|
+
listUpdates: _trpc_server.TRPCQueryProcedure<{
|
|
2952
|
+
input: void;
|
|
2953
|
+
output: readonly undefined[];
|
|
2954
|
+
meta: object;
|
|
2955
|
+
}>;
|
|
2956
|
+
updatePackage: _trpc_server.TRPCMutationProcedure<{
|
|
2957
|
+
input: {
|
|
2958
|
+
name: string;
|
|
2959
|
+
version?: string | undefined;
|
|
2960
|
+
};
|
|
2961
|
+
output: undefined;
|
|
2962
|
+
meta: object;
|
|
2963
|
+
}>;
|
|
2964
|
+
restartServer: _trpc_server.TRPCMutationProcedure<{
|
|
2965
|
+
input: {
|
|
2966
|
+
confirm: true;
|
|
2967
|
+
};
|
|
2968
|
+
output: {
|
|
2969
|
+
success: boolean;
|
|
2970
|
+
message: string;
|
|
2971
|
+
};
|
|
2972
|
+
meta: object;
|
|
2973
|
+
}>;
|
|
2974
|
+
}>>;
|
|
2975
|
+
addonPages: _trpc_server.TRPCBuiltRouter<{
|
|
2976
|
+
ctx: {
|
|
2977
|
+
user: {
|
|
2978
|
+
id: string;
|
|
2979
|
+
username: string;
|
|
2980
|
+
role: string;
|
|
2981
|
+
} | null;
|
|
2982
|
+
};
|
|
2983
|
+
meta: object;
|
|
2984
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
2985
|
+
transformer: true;
|
|
2986
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
2987
|
+
listPages: _trpc_server.TRPCQueryProcedure<{
|
|
2988
|
+
input: void;
|
|
2989
|
+
output: readonly undefined[];
|
|
2990
|
+
meta: object;
|
|
2991
|
+
}>;
|
|
2992
|
+
}>>;
|
|
2993
|
+
benchmark: _trpc_server.TRPCBuiltRouter<{
|
|
2994
|
+
ctx: {
|
|
2995
|
+
user: {
|
|
2996
|
+
id: string;
|
|
2997
|
+
username: string;
|
|
2998
|
+
role: string;
|
|
2999
|
+
} | null;
|
|
3000
|
+
};
|
|
3001
|
+
meta: object;
|
|
3002
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
3003
|
+
transformer: true;
|
|
3004
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
3005
|
+
listDetectors: _trpc_server.TRPCQueryProcedure<{
|
|
3006
|
+
input: void;
|
|
3007
|
+
output: {
|
|
3008
|
+
id: string;
|
|
3009
|
+
name: string;
|
|
3010
|
+
packageName: string;
|
|
3011
|
+
hasConfig: boolean;
|
|
3012
|
+
}[];
|
|
3013
|
+
meta: object;
|
|
3014
|
+
}>;
|
|
3015
|
+
getDetectorDetails: _trpc_server.TRPCQueryProcedure<{
|
|
3016
|
+
input: {
|
|
3017
|
+
addonId: string;
|
|
3018
|
+
};
|
|
3019
|
+
output: undefined;
|
|
3020
|
+
meta: object;
|
|
3021
|
+
}>;
|
|
3022
|
+
listDetectorsDetailed: _trpc_server.TRPCQueryProcedure<{
|
|
3023
|
+
input: void;
|
|
3024
|
+
output: undefined[];
|
|
3025
|
+
meta: object;
|
|
3026
|
+
}>;
|
|
3027
|
+
systemInfo: _trpc_server.TRPCQueryProcedure<{
|
|
3028
|
+
input: void;
|
|
3029
|
+
output: {
|
|
3030
|
+
platform: NodeJS.Platform;
|
|
3031
|
+
arch: string;
|
|
3032
|
+
cpus: number;
|
|
3033
|
+
cpuModel: string;
|
|
3034
|
+
totalMemoryMB: number;
|
|
3035
|
+
freeMemoryMB: number;
|
|
3036
|
+
nodeVersion: string;
|
|
3037
|
+
gpuModel: string | undefined;
|
|
3038
|
+
};
|
|
3039
|
+
meta: object;
|
|
3040
|
+
}>;
|
|
3041
|
+
runBenchmark: _trpc_server.TRPCMutationProcedure<{
|
|
3042
|
+
input: {
|
|
3043
|
+
addonId: string;
|
|
3044
|
+
warmup?: number | undefined;
|
|
3045
|
+
backend?: string | undefined;
|
|
3046
|
+
runtime?: string | undefined;
|
|
3047
|
+
modelId?: string | undefined;
|
|
3048
|
+
inputWidth?: number | undefined;
|
|
3049
|
+
inputHeight?: number | undefined;
|
|
3050
|
+
durationSec?: number | undefined;
|
|
3051
|
+
simulatedCameras?: number | undefined;
|
|
3052
|
+
batchSize?: number | undefined;
|
|
3053
|
+
};
|
|
3054
|
+
output: undefined;
|
|
3055
|
+
meta: object;
|
|
3056
|
+
}>;
|
|
3057
|
+
onBenchmarkProgress: _trpc_server.TRPCSubscriptionProcedure<{
|
|
3058
|
+
input: void;
|
|
3059
|
+
output: undefined;
|
|
3060
|
+
meta: object;
|
|
3061
|
+
}>;
|
|
3062
|
+
detectImage: _trpc_server.TRPCMutationProcedure<{
|
|
3063
|
+
input: {
|
|
3064
|
+
addonId: string;
|
|
3065
|
+
imageBase64: string;
|
|
3066
|
+
imageWidth: number;
|
|
3067
|
+
imageHeight: number;
|
|
3068
|
+
confidenceThreshold?: number | undefined;
|
|
3069
|
+
};
|
|
3070
|
+
output: {
|
|
3071
|
+
inferenceMs: number;
|
|
3072
|
+
modelId: any;
|
|
3073
|
+
detections: any;
|
|
3074
|
+
};
|
|
3075
|
+
meta: object;
|
|
3076
|
+
}>;
|
|
3077
|
+
captureSnapshot: _trpc_server.TRPCMutationProcedure<{
|
|
3078
|
+
input: {
|
|
3079
|
+
deviceId: string;
|
|
3080
|
+
};
|
|
3081
|
+
output: {
|
|
3082
|
+
imageBase64: any;
|
|
3083
|
+
width: any;
|
|
3084
|
+
height: any;
|
|
3085
|
+
};
|
|
3086
|
+
meta: object;
|
|
3087
|
+
}>;
|
|
3088
|
+
pipelineMetrics: _trpc_server.TRPCQueryProcedure<{
|
|
3089
|
+
input: void;
|
|
3090
|
+
output: {
|
|
3091
|
+
orchestrator: null;
|
|
3092
|
+
cameras: never[];
|
|
3093
|
+
} | {
|
|
3094
|
+
orchestrator: undefined;
|
|
3095
|
+
cameras: ({
|
|
3096
|
+
deviceId: string;
|
|
3097
|
+
} & undefined)[];
|
|
3098
|
+
};
|
|
3099
|
+
meta: object;
|
|
3100
|
+
}>;
|
|
3101
|
+
onPipelineMetrics: _trpc_server.TRPCSubscriptionProcedure<{
|
|
3102
|
+
input: {
|
|
3103
|
+
deviceId?: string | undefined;
|
|
3104
|
+
intervalMs?: number | undefined;
|
|
3105
|
+
};
|
|
3106
|
+
output: {
|
|
3107
|
+
orchestrator: any;
|
|
3108
|
+
cameras: any[];
|
|
3109
|
+
timestamp: number;
|
|
3110
|
+
};
|
|
3111
|
+
meta: object;
|
|
3112
|
+
}>;
|
|
3113
|
+
listHistory: _trpc_server.TRPCQueryProcedure<{
|
|
3114
|
+
input: {
|
|
3115
|
+
addonId?: string | undefined;
|
|
3116
|
+
agentName?: string | undefined;
|
|
3117
|
+
} | undefined;
|
|
3118
|
+
output: undefined[];
|
|
3119
|
+
meta: object;
|
|
3120
|
+
}>;
|
|
3121
|
+
saveHistory: _trpc_server.TRPCMutationProcedure<{
|
|
3122
|
+
input: {
|
|
3123
|
+
addonId: string;
|
|
3124
|
+
warmup: number;
|
|
3125
|
+
fps: number;
|
|
3126
|
+
runtime: string;
|
|
3127
|
+
totalDetections: number;
|
|
3128
|
+
iterations: number;
|
|
3129
|
+
inputResolution: string;
|
|
3130
|
+
peakMemoryMB: number;
|
|
3131
|
+
dps: number;
|
|
3132
|
+
inferenceAvgMs: number;
|
|
3133
|
+
avgMs: number;
|
|
3134
|
+
p50Ms: number;
|
|
3135
|
+
p95Ms: number;
|
|
3136
|
+
p99Ms: number;
|
|
3137
|
+
minMs: number;
|
|
3138
|
+
maxMs: number;
|
|
3139
|
+
agentName: string;
|
|
3140
|
+
modelName: string;
|
|
3141
|
+
simulatedCameras?: number | undefined;
|
|
3142
|
+
batchSize?: number | undefined;
|
|
3143
|
+
errorCount?: number | undefined;
|
|
3144
|
+
};
|
|
3145
|
+
output: undefined;
|
|
3146
|
+
meta: object;
|
|
3147
|
+
}>;
|
|
3148
|
+
deleteHistory: _trpc_server.TRPCMutationProcedure<{
|
|
3149
|
+
input: {
|
|
3150
|
+
id: string;
|
|
3151
|
+
};
|
|
3152
|
+
output: {
|
|
3153
|
+
success: boolean;
|
|
3154
|
+
};
|
|
3155
|
+
meta: object;
|
|
3156
|
+
}>;
|
|
3157
|
+
clearHistory: _trpc_server.TRPCMutationProcedure<{
|
|
3158
|
+
input: void;
|
|
3159
|
+
output: {
|
|
3160
|
+
success: boolean;
|
|
3161
|
+
};
|
|
3162
|
+
meta: object;
|
|
3163
|
+
}>;
|
|
3164
|
+
listAgents: _trpc_server.TRPCQueryProcedure<{
|
|
3165
|
+
input: void;
|
|
3166
|
+
output: {
|
|
3167
|
+
id: any;
|
|
3168
|
+
name: any;
|
|
3169
|
+
status: string;
|
|
3170
|
+
type: string;
|
|
3171
|
+
capabilities: any;
|
|
3172
|
+
platform: any;
|
|
3173
|
+
arch: any;
|
|
3174
|
+
cpuCores: any;
|
|
3175
|
+
memoryMB: any;
|
|
3176
|
+
gpuModel: any;
|
|
3177
|
+
runtimes: {
|
|
3178
|
+
value: string;
|
|
3179
|
+
label: string;
|
|
3180
|
+
}[];
|
|
3181
|
+
backends: {
|
|
3182
|
+
value: string;
|
|
3183
|
+
label: string;
|
|
3184
|
+
}[];
|
|
3185
|
+
installedAddons: any;
|
|
3186
|
+
}[];
|
|
3187
|
+
meta: object;
|
|
3188
|
+
}>;
|
|
3189
|
+
runRemoteBenchmark: _trpc_server.TRPCMutationProcedure<{
|
|
3190
|
+
input: {
|
|
3191
|
+
agentId: string;
|
|
3192
|
+
warmup?: number | undefined;
|
|
3193
|
+
runtime?: string | undefined;
|
|
3194
|
+
inputWidth?: number | undefined;
|
|
3195
|
+
inputHeight?: number | undefined;
|
|
3196
|
+
iterations?: number | undefined;
|
|
3197
|
+
};
|
|
3198
|
+
output: {
|
|
3199
|
+
agentId: string;
|
|
3200
|
+
runtime: any;
|
|
3201
|
+
iterations: any;
|
|
3202
|
+
fps: any;
|
|
3203
|
+
avgMs: any;
|
|
3204
|
+
p50Ms: any;
|
|
3205
|
+
p95Ms: any;
|
|
3206
|
+
p99Ms: any;
|
|
3207
|
+
minMs: any;
|
|
3208
|
+
maxMs: any;
|
|
3209
|
+
peakMemoryMB: any;
|
|
3210
|
+
};
|
|
3211
|
+
meta: object;
|
|
3212
|
+
}>;
|
|
3213
|
+
runLatencyTest: _trpc_server.TRPCMutationProcedure<{
|
|
3214
|
+
input: {
|
|
3215
|
+
addonId: string;
|
|
3216
|
+
iterations?: number | undefined;
|
|
3217
|
+
};
|
|
3218
|
+
output: {
|
|
3219
|
+
addonId: string;
|
|
3220
|
+
error: string;
|
|
3221
|
+
iterations: number;
|
|
3222
|
+
results: never[];
|
|
3223
|
+
avgMs?: undefined;
|
|
3224
|
+
minMs?: undefined;
|
|
3225
|
+
maxMs?: undefined;
|
|
3226
|
+
fps?: undefined;
|
|
3227
|
+
} | {
|
|
3228
|
+
addonId: string;
|
|
3229
|
+
iterations: number;
|
|
3230
|
+
avgMs: number;
|
|
3231
|
+
minMs: number;
|
|
3232
|
+
maxMs: number;
|
|
3233
|
+
fps: number;
|
|
3234
|
+
results: {
|
|
3235
|
+
iteration: number;
|
|
3236
|
+
durationMs: number;
|
|
3237
|
+
}[];
|
|
3238
|
+
error?: undefined;
|
|
3239
|
+
};
|
|
3240
|
+
meta: object;
|
|
3241
|
+
}>;
|
|
3242
|
+
}>>;
|
|
3243
|
+
pipeline: _trpc_server.TRPCBuiltRouter<{
|
|
3244
|
+
ctx: {
|
|
3245
|
+
user: {
|
|
3246
|
+
id: string;
|
|
3247
|
+
username: string;
|
|
3248
|
+
role: string;
|
|
3249
|
+
} | null;
|
|
3250
|
+
};
|
|
3251
|
+
meta: object;
|
|
3252
|
+
errorShape: _trpc_server.TRPCDefaultErrorShape;
|
|
3253
|
+
transformer: true;
|
|
3254
|
+
}, _trpc_server.TRPCDecorateCreateRouterOptions<{
|
|
3255
|
+
getSchema: _trpc_server.TRPCQueryProcedure<{
|
|
3256
|
+
input: void;
|
|
3257
|
+
output: undefined;
|
|
3258
|
+
meta: object;
|
|
3259
|
+
}>;
|
|
3260
|
+
listTemplates: _trpc_server.TRPCQueryProcedure<{
|
|
3261
|
+
input: void;
|
|
3262
|
+
output: undefined[];
|
|
3263
|
+
meta: object;
|
|
3264
|
+
}>;
|
|
3265
|
+
saveTemplate: _trpc_server.TRPCMutationProcedure<{
|
|
3266
|
+
input: {
|
|
3267
|
+
name: string;
|
|
3268
|
+
steps?: any;
|
|
3269
|
+
};
|
|
3270
|
+
output: undefined;
|
|
3271
|
+
meta: object;
|
|
3272
|
+
}>;
|
|
3273
|
+
updateTemplate: _trpc_server.TRPCMutationProcedure<{
|
|
3274
|
+
input: {
|
|
3275
|
+
id: string;
|
|
3276
|
+
name?: string | undefined;
|
|
3277
|
+
steps?: any;
|
|
3278
|
+
};
|
|
3279
|
+
output: undefined;
|
|
3280
|
+
meta: object;
|
|
3281
|
+
}>;
|
|
3282
|
+
deleteTemplate: _trpc_server.TRPCMutationProcedure<{
|
|
3283
|
+
input: {
|
|
3284
|
+
id: string;
|
|
3285
|
+
};
|
|
3286
|
+
output: {
|
|
3287
|
+
success: boolean;
|
|
3288
|
+
};
|
|
3289
|
+
meta: object;
|
|
3290
|
+
}>;
|
|
3291
|
+
}>>;
|
|
3292
|
+
}>>;
|
|
3293
|
+
/** @deprecated Use AppRouter instead */
|
|
3294
|
+
type AddonApi = AppRouter;
|
|
3295
|
+
|
|
3296
|
+
/**
|
|
3297
|
+
* All location types that storage providers can serve.
|
|
3298
|
+
* Each type maps to a logical category of files.
|
|
3299
|
+
* A storage provider declares which location types it supports.
|
|
3300
|
+
*/
|
|
3301
|
+
type StorageLocationType = 'recordings-high' | 'recordings-low' | 'recordings-clips' | 'event-images' | 'models' | 'addons-data' | 'cache' | 'logs';
|
|
3302
|
+
/** All location types as an array (for iteration) */
|
|
3303
|
+
declare const STORAGE_LOCATION_TYPES: readonly StorageLocationType[];
|
|
3304
|
+
/** Default subdirectory names for filesystem storage */
|
|
3305
|
+
declare const DEFAULT_LOCATION_SUBDIRS: Readonly<Record<StorageLocationType, string>>;
|
|
3306
|
+
/**
|
|
3307
|
+
* A storage provider serves file-based storage for one or more location types.
|
|
3308
|
+
* Multiple providers can coexist (local filesystem, NAS, S3, etc.).
|
|
3309
|
+
* Each addon/system setting selects which provider to use per location type.
|
|
3310
|
+
*/
|
|
3311
|
+
interface IStorageProvider {
|
|
3312
|
+
/** Unique provider ID (e.g., 'local', 'nas-synology', 's3-aws') */
|
|
3313
|
+
readonly id: string;
|
|
3314
|
+
/** Human-readable name (e.g., 'Local Filesystem', 'Synology NAS') */
|
|
3315
|
+
readonly name: string;
|
|
3316
|
+
/** Which location types this provider serves */
|
|
3317
|
+
readonly supportedLocations: readonly StorageLocationType[];
|
|
3318
|
+
/** Resolve an absolute path/URL for a file within a location */
|
|
3319
|
+
resolve(location: StorageLocationType, relativePath: string): string;
|
|
3320
|
+
/** Write file data */
|
|
3321
|
+
write(location: StorageLocationType, relativePath: string, data: Buffer | NodeJS.ReadableStream): Promise<void>;
|
|
3322
|
+
/** Read file data */
|
|
3323
|
+
read(location: StorageLocationType, relativePath: string): Promise<Buffer>;
|
|
3324
|
+
/** Check if a file exists */
|
|
3325
|
+
exists(location: StorageLocationType, relativePath: string): Promise<boolean>;
|
|
3326
|
+
/** List files/directories under a prefix within a location */
|
|
3327
|
+
list(location: StorageLocationType, prefix?: string): Promise<readonly string[]>;
|
|
3328
|
+
/** Delete a file */
|
|
3329
|
+
delete(location: StorageLocationType, relativePath: string): Promise<void>;
|
|
3330
|
+
/** Get available space in bytes, null if unknown (e.g., S3) */
|
|
3331
|
+
getAvailableSpace(location: StorageLocationType): Promise<number | null>;
|
|
3332
|
+
/** Lifecycle */
|
|
3333
|
+
initialize(): Promise<void>;
|
|
3334
|
+
shutdown(): Promise<void>;
|
|
3335
|
+
}
|
|
3336
|
+
/**
|
|
3337
|
+
* All named collections that the settings backend manages.
|
|
3338
|
+
* Each collection maps to a logical table/bucket in the backend.
|
|
3339
|
+
*/
|
|
3340
|
+
type SettingsCollection = 'system-settings' | 'addon-settings' | 'provider-settings' | 'device-settings' | 'detection-events' | 'audio-levels' | 'track-trails' | 'recording-segments' | 'recording-thumbnails' | 'recording-policies' | 'recording-storage-config' | 'recording-cleanup-queue' | 'known-faces';
|
|
3341
|
+
/**
|
|
3342
|
+
* Settings backend — persistent key-value and document storage.
|
|
3343
|
+
* Default implementation: SQLite. Can be replaced by Postgres, etc.
|
|
3344
|
+
*/
|
|
3345
|
+
interface ISettingsBackend {
|
|
3346
|
+
/** Get a single value by key from a collection */
|
|
3347
|
+
get(collection: SettingsCollection, key: string): Promise<unknown>;
|
|
3348
|
+
/** Set a value by key in a collection (upsert) */
|
|
3349
|
+
set(collection: SettingsCollection, key: string, value: unknown): Promise<void>;
|
|
3350
|
+
/** Get all entries matching an optional filter */
|
|
3351
|
+
query(collection: SettingsCollection, filter?: QueryFilter): Promise<readonly SettingsRecord[]>;
|
|
3352
|
+
/** Insert a new record */
|
|
3353
|
+
insert(collection: SettingsCollection, record: SettingsRecord): Promise<void>;
|
|
3354
|
+
/** Update an existing record by ID */
|
|
3355
|
+
update(collection: SettingsCollection, id: string, data: Record<string, unknown>): Promise<void>;
|
|
3356
|
+
/** Delete a record by key/ID */
|
|
3357
|
+
delete(collection: SettingsCollection, key: string): Promise<void>;
|
|
3358
|
+
/** Count entries in a collection */
|
|
3359
|
+
count(collection: SettingsCollection, filter?: QueryFilter): Promise<number>;
|
|
3360
|
+
/** Check if a collection is empty (used for first-boot detection) */
|
|
3361
|
+
isEmpty(collection: SettingsCollection): Promise<boolean>;
|
|
3362
|
+
/** Lifecycle */
|
|
3363
|
+
initialize(): Promise<void>;
|
|
3364
|
+
shutdown(): Promise<void>;
|
|
3365
|
+
}
|
|
3366
|
+
interface SettingsRecord {
|
|
3367
|
+
readonly id: string;
|
|
3368
|
+
readonly data: Record<string, unknown>;
|
|
3369
|
+
}
|
|
3370
|
+
interface QueryFilter {
|
|
3371
|
+
where?: Record<string, unknown>;
|
|
3372
|
+
whereIn?: Record<string, unknown[]>;
|
|
3373
|
+
whereBetween?: Record<string, [unknown, unknown]>;
|
|
3374
|
+
orderBy?: {
|
|
3375
|
+
field: string;
|
|
3376
|
+
direction: 'asc' | 'desc';
|
|
3377
|
+
};
|
|
3378
|
+
limit?: number;
|
|
3379
|
+
offset?: number;
|
|
3380
|
+
}
|
|
3381
|
+
/**
|
|
3382
|
+
* Embeddings backend — vector storage with approximate nearest neighbor search.
|
|
3383
|
+
* Used for CLIP frame search, face recognition, plate matching.
|
|
3384
|
+
* Default implementation: HNSW (usearch/hnswlib). Can be replaced by Qdrant, etc.
|
|
3385
|
+
*/
|
|
3386
|
+
interface IEmbeddingsBackend {
|
|
3387
|
+
/** Create or open a named vector index */
|
|
3388
|
+
openIndex(name: string, dimensions: number): Promise<IVectorIndex>;
|
|
3389
|
+
/** List all index names */
|
|
3390
|
+
listIndexes(): Promise<readonly string[]>;
|
|
3391
|
+
/** Delete an index and its data */
|
|
3392
|
+
deleteIndex(name: string): Promise<void>;
|
|
3393
|
+
/** Lifecycle */
|
|
3394
|
+
initialize(): Promise<void>;
|
|
3395
|
+
shutdown(): Promise<void>;
|
|
3396
|
+
}
|
|
3397
|
+
interface IVectorIndex {
|
|
3398
|
+
/** Index name */
|
|
3399
|
+
readonly name: string;
|
|
3400
|
+
/** Vector dimensions */
|
|
3401
|
+
readonly dimensions: number;
|
|
3402
|
+
/** Insert a vector with ID and optional metadata */
|
|
3403
|
+
insert(id: string, vector: Float32Array, metadata?: Record<string, unknown>): Promise<void>;
|
|
3404
|
+
/** Batch insert for performance */
|
|
3405
|
+
insertBatch(items: readonly VectorEntry[]): Promise<void>;
|
|
3406
|
+
/** Search for nearest neighbors */
|
|
3407
|
+
search(query: Float32Array, topK: number, filter?: EmbeddingFilter): Promise<readonly VectorSearchResult[]>;
|
|
3408
|
+
/** Delete by ID */
|
|
3409
|
+
delete(id: string): Promise<void>;
|
|
3410
|
+
/** Count entries in the index */
|
|
3411
|
+
count(): Promise<number>;
|
|
3412
|
+
/** Flush pending writes to disk */
|
|
3413
|
+
flush(): Promise<void>;
|
|
3414
|
+
}
|
|
3415
|
+
interface VectorEntry {
|
|
3416
|
+
readonly id: string;
|
|
3417
|
+
readonly vector: Float32Array;
|
|
3418
|
+
readonly metadata?: Record<string, unknown>;
|
|
3419
|
+
}
|
|
3420
|
+
interface VectorSearchResult {
|
|
3421
|
+
readonly id: string;
|
|
3422
|
+
/** Similarity score (0-1, higher is more similar) */
|
|
3423
|
+
readonly score: number;
|
|
3424
|
+
readonly metadata?: Record<string, unknown>;
|
|
3425
|
+
}
|
|
3426
|
+
interface EmbeddingFilter {
|
|
3427
|
+
/** Filter by metadata key-value before vector search */
|
|
3428
|
+
readonly where?: Record<string, unknown>;
|
|
3429
|
+
/** Filter by timestamp range */
|
|
3430
|
+
readonly timestampAfter?: number;
|
|
3431
|
+
readonly timestampBefore?: number;
|
|
3432
|
+
/** Filter by device */
|
|
3433
|
+
readonly deviceId?: string;
|
|
3434
|
+
}
|
|
3435
|
+
/** @deprecated Use StorageLocationType instead */
|
|
3436
|
+
type StorageLocationName = StorageLocationType | 'data' | 'media' | 'recordings' | 'config' | 'events' | 'addon';
|
|
3437
|
+
/** @deprecated Use IStorageProvider instead */
|
|
3438
|
+
interface StorageConfig {
|
|
3439
|
+
locations: Record<string, string>;
|
|
3440
|
+
}
|
|
3441
|
+
/** @deprecated Use SettingsRecord instead */
|
|
3442
|
+
interface StorageRecord {
|
|
3443
|
+
collection: string;
|
|
3444
|
+
id: string;
|
|
3445
|
+
data: Record<string, unknown>;
|
|
3446
|
+
}
|
|
3447
|
+
/** @deprecated Use ISettingsBackend instead */
|
|
3448
|
+
interface IStructuredStorage {
|
|
3449
|
+
query(collection: string, filter?: QueryFilter): Promise<readonly StorageRecord[]>;
|
|
3450
|
+
insert(record: StorageRecord): Promise<StorageRecord>;
|
|
3451
|
+
update(collection: string, id: string, data: Record<string, unknown>): Promise<StorageRecord>;
|
|
3452
|
+
delete(collection: string, id: string): Promise<void>;
|
|
3453
|
+
count(collection: string, filter?: QueryFilter): Promise<number>;
|
|
3454
|
+
}
|
|
3455
|
+
/** @deprecated Use IStorageProvider.read/write instead */
|
|
3456
|
+
interface IFileStorage {
|
|
3457
|
+
readFile(path: string): Promise<Buffer>;
|
|
3458
|
+
writeFile(path: string, data: Buffer): Promise<void>;
|
|
3459
|
+
deleteFile(path: string): Promise<void>;
|
|
3460
|
+
listFiles(prefix?: string): Promise<readonly string[]>;
|
|
3461
|
+
getFileUrl(path: string): Promise<string>;
|
|
3462
|
+
exists(path: string): Promise<boolean>;
|
|
3463
|
+
}
|
|
3464
|
+
/** @deprecated Use IStorageProvider instead */
|
|
3465
|
+
interface IStorageLocation {
|
|
3466
|
+
structured?: IStructuredStorage;
|
|
3467
|
+
files?: IFileStorage;
|
|
3468
|
+
}
|
|
3469
|
+
|
|
519
3470
|
/**
|
|
520
3471
|
* Configuration UI Schema -- declarative form definition for any element.
|
|
521
3472
|
*
|
|
@@ -534,7 +3485,7 @@ interface ConfigSection {
|
|
|
534
3485
|
columns?: 1 | 2 | 3 | 4;
|
|
535
3486
|
fields: ConfigField[];
|
|
536
3487
|
}
|
|
537
|
-
type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigGroupField | ConfigSeparatorField | ConfigInfoField | ConfigModelSelectorField;
|
|
3488
|
+
type ConfigField = ConfigTextField | ConfigNumberField | ConfigBooleanField | ConfigSelectField | ConfigMultiSelectField | ConfigColorField | ConfigPasswordField | ConfigTextAreaField | ConfigSliderField | ConfigTagsField | ConfigGroupField | ConfigSeparatorField | ConfigInfoField | ConfigModelSelectorField | ConfigStorageLocationField;
|
|
538
3489
|
interface ConfigFieldBase {
|
|
539
3490
|
key: string;
|
|
540
3491
|
label: string;
|
|
@@ -653,6 +3604,14 @@ interface ConfigModelSelectorField extends ConfigFieldBase {
|
|
|
653
3604
|
requiredMetadata?: readonly (keyof CustomModelMetadata)[];
|
|
654
3605
|
outputFormatHint?: ModelOutputFormat;
|
|
655
3606
|
}
|
|
3607
|
+
|
|
3608
|
+
interface ConfigStorageLocationField extends ConfigFieldBase {
|
|
3609
|
+
type: 'storage-location';
|
|
3610
|
+
/** Which location type this field selects a provider for */
|
|
3611
|
+
locationType: StorageLocationType;
|
|
3612
|
+
/** Show available space indicator next to each provider option */
|
|
3613
|
+
showAvailableSpace?: boolean;
|
|
3614
|
+
}
|
|
656
3615
|
interface IConfigurable {
|
|
657
3616
|
getConfigSchema(): ConfigUISchema;
|
|
658
3617
|
getConfig(): Record<string, unknown>;
|
|
@@ -787,53 +3746,6 @@ interface IEventBus {
|
|
|
787
3746
|
getRecent(filter?: EventFilter, limit?: number): readonly SystemEvent[];
|
|
788
3747
|
}
|
|
789
3748
|
|
|
790
|
-
type StorageLocationName = 'data' | 'media' | 'recordings' | 'models' | 'cache' | 'logs' | 'config' | 'events' | 'addon';
|
|
791
|
-
interface StorageConfig {
|
|
792
|
-
locations: Record<StorageLocationName, string>;
|
|
793
|
-
}
|
|
794
|
-
interface QueryFilter {
|
|
795
|
-
where?: Record<string, unknown>;
|
|
796
|
-
whereIn?: Record<string, unknown[]>;
|
|
797
|
-
whereBetween?: Record<string, [unknown, unknown]>;
|
|
798
|
-
orderBy?: {
|
|
799
|
-
field: string;
|
|
800
|
-
direction: 'asc' | 'desc';
|
|
801
|
-
};
|
|
802
|
-
limit?: number;
|
|
803
|
-
offset?: number;
|
|
804
|
-
}
|
|
805
|
-
interface StorageRecord {
|
|
806
|
-
collection: string;
|
|
807
|
-
id: string;
|
|
808
|
-
data: Record<string, unknown>;
|
|
809
|
-
}
|
|
810
|
-
interface IStructuredStorage {
|
|
811
|
-
query(collection: string, filter?: QueryFilter): Promise<readonly StorageRecord[]>;
|
|
812
|
-
insert(record: StorageRecord): Promise<StorageRecord>;
|
|
813
|
-
update(collection: string, id: string, data: Record<string, unknown>): Promise<StorageRecord>;
|
|
814
|
-
delete(collection: string, id: string): Promise<void>;
|
|
815
|
-
count(collection: string, filter?: QueryFilter): Promise<number>;
|
|
816
|
-
}
|
|
817
|
-
interface IFileStorage {
|
|
818
|
-
readFile(path: string): Promise<Buffer>;
|
|
819
|
-
writeFile(path: string, data: Buffer): Promise<void>;
|
|
820
|
-
deleteFile(path: string): Promise<void>;
|
|
821
|
-
listFiles(prefix?: string): Promise<readonly string[]>;
|
|
822
|
-
getFileUrl(path: string): Promise<string>;
|
|
823
|
-
exists(path: string): Promise<boolean>;
|
|
824
|
-
}
|
|
825
|
-
interface IStorageLocation {
|
|
826
|
-
structured?: IStructuredStorage;
|
|
827
|
-
files?: IFileStorage;
|
|
828
|
-
}
|
|
829
|
-
interface IStorageProvider {
|
|
830
|
-
initialize(): Promise<void>;
|
|
831
|
-
shutdown(): Promise<void>;
|
|
832
|
-
getLocation(name: StorageLocationName): IStorageLocation;
|
|
833
|
-
export(locationName: StorageLocationName): Promise<Buffer>;
|
|
834
|
-
import(locationName: StorageLocationName, data: Buffer): Promise<void>;
|
|
835
|
-
}
|
|
836
|
-
|
|
837
3749
|
interface ICameraAnalyticsProvider {
|
|
838
3750
|
getLiveState(deviceId: string): CameraLiveState | null;
|
|
839
3751
|
getTracks(deviceId: string, filter?: TrackFilter): TrackedObjectSummary[];
|
|
@@ -846,7 +3758,8 @@ interface ICameraAnalyticsProvider {
|
|
|
846
3758
|
interface IAnalysisAddon extends ICamstackAddon, ICameraAnalyticsProvider {
|
|
847
3759
|
processFrame(deviceId: string, frame: FrameInput): Promise<DetectionEvent[]>;
|
|
848
3760
|
setCameraPipeline(deviceId: string, config: PipelineConfig): void;
|
|
849
|
-
setCameraZones(deviceId: string, zones:
|
|
3761
|
+
setCameraZones(deviceId: string, zones: readonly CameraZone[]): void;
|
|
3762
|
+
setCameraMotionConfig(deviceId: string, source: MotionSource): void;
|
|
850
3763
|
setKnownFaces(faces: KnownFace[]): void;
|
|
851
3764
|
setKnownPlates(plates: KnownPlate[]): void;
|
|
852
3765
|
onLiveStateChange(deviceId: string, callback: (state: CameraLiveState) => void): () => void;
|
|
@@ -1596,30 +4509,108 @@ interface IKnownFaces {
|
|
|
1596
4509
|
readonly group?: string;
|
|
1597
4510
|
}>, clipRecognizer: ClipRecognizer): Promise<unknown>;
|
|
1598
4511
|
}
|
|
1599
|
-
/**
|
|
1600
|
-
* Composite interface exposed via CapabilityRegistry as the
|
|
1601
|
-
* 'analysis-data-persistence' singleton. Each sub-service is wired
|
|
1602
|
-
* individually to the corresponding NestJS wrapper service.
|
|
1603
|
-
*/
|
|
1604
|
-
interface IAnalysisDataPersistence {
|
|
1605
|
-
readonly eventPersistence: IEventPersistence;
|
|
1606
|
-
readonly knownFaces: IKnownFaces;
|
|
1607
|
-
readonly sessionTracker: ISessionTracker;
|
|
1608
|
-
readonly retention: IRetention;
|
|
1609
|
-
readonly trackTrail: ITrackTrail;
|
|
4512
|
+
/**
|
|
4513
|
+
* Composite interface exposed via CapabilityRegistry as the
|
|
4514
|
+
* 'analysis-data-persistence' singleton. Each sub-service is wired
|
|
4515
|
+
* individually to the corresponding NestJS wrapper service.
|
|
4516
|
+
*/
|
|
4517
|
+
interface IAnalysisDataPersistence {
|
|
4518
|
+
readonly eventPersistence: IEventPersistence;
|
|
4519
|
+
readonly knownFaces: IKnownFaces;
|
|
4520
|
+
readonly sessionTracker: ISessionTracker;
|
|
4521
|
+
readonly retention: IRetention;
|
|
4522
|
+
readonly trackTrail: ITrackTrail;
|
|
4523
|
+
}
|
|
4524
|
+
interface TestConnectionResult {
|
|
4525
|
+
readonly success: boolean;
|
|
4526
|
+
readonly version?: string;
|
|
4527
|
+
readonly cameraCount?: number;
|
|
4528
|
+
readonly error?: string;
|
|
4529
|
+
}
|
|
4530
|
+
/**
|
|
4531
|
+
* Generic interface for testing provider connections.
|
|
4532
|
+
* Each provider addon can expose a connection tester.
|
|
4533
|
+
*/
|
|
4534
|
+
interface IProviderConnectionTester {
|
|
4535
|
+
testConnection(): Promise<TestConnectionResult>;
|
|
4536
|
+
}
|
|
4537
|
+
|
|
4538
|
+
interface EmbeddingMetadata {
|
|
4539
|
+
readonly timestamp: number;
|
|
4540
|
+
readonly className: string;
|
|
4541
|
+
readonly deviceId: string;
|
|
4542
|
+
readonly zoneId?: string;
|
|
4543
|
+
readonly labelsData?: readonly LabelData[];
|
|
4544
|
+
}
|
|
4545
|
+
interface SceneStateResult {
|
|
4546
|
+
readonly previousState: string;
|
|
4547
|
+
readonly currentState: string;
|
|
4548
|
+
readonly confidence: number;
|
|
4549
|
+
}
|
|
4550
|
+
interface ISceneIntelligence {
|
|
4551
|
+
embed(deviceId: string, crop: Buffer, metadata: EmbeddingMetadata): Promise<string>;
|
|
4552
|
+
search(query: string, topK: number, filter?: EmbeddingFilter): Promise<VectorSearchResult[]>;
|
|
4553
|
+
searchByImage(image: Buffer, topK: number, filter?: EmbeddingFilter): Promise<VectorSearchResult[]>;
|
|
4554
|
+
evaluateSceneState(deviceId: string, crop: Buffer): Promise<SceneStateResult | null>;
|
|
4555
|
+
}
|
|
4556
|
+
|
|
4557
|
+
interface NotificationRule {
|
|
4558
|
+
readonly id: string;
|
|
4559
|
+
readonly name: string;
|
|
4560
|
+
readonly enabled: boolean;
|
|
4561
|
+
readonly eventTypes: readonly string[];
|
|
4562
|
+
readonly conditions: {
|
|
4563
|
+
readonly deviceIds?: readonly string[];
|
|
4564
|
+
readonly classNames?: readonly string[];
|
|
4565
|
+
readonly zoneIds?: readonly string[];
|
|
4566
|
+
readonly minConfidence?: number;
|
|
4567
|
+
readonly source?: 'pipeline' | 'onboard' | 'any';
|
|
4568
|
+
readonly schedule?: {
|
|
4569
|
+
readonly days: readonly number[];
|
|
4570
|
+
readonly startHour: number;
|
|
4571
|
+
readonly endHour: number;
|
|
4572
|
+
};
|
|
4573
|
+
readonly cooldownSeconds?: number;
|
|
4574
|
+
readonly minDwellSeconds?: number;
|
|
4575
|
+
};
|
|
4576
|
+
readonly outputs: readonly string[];
|
|
4577
|
+
readonly template?: {
|
|
4578
|
+
readonly title: string;
|
|
4579
|
+
readonly body: string;
|
|
4580
|
+
readonly imageMode: 'crop' | 'annotated' | 'full' | 'none';
|
|
4581
|
+
};
|
|
4582
|
+
readonly priority: 'low' | 'normal' | 'high' | 'critical';
|
|
4583
|
+
}
|
|
4584
|
+
interface NotificationTestResult {
|
|
4585
|
+
readonly ruleId: string;
|
|
4586
|
+
readonly eventId: string;
|
|
4587
|
+
readonly timestamp: number;
|
|
4588
|
+
readonly wouldFire: boolean;
|
|
4589
|
+
readonly reason?: string;
|
|
4590
|
+
}
|
|
4591
|
+
interface NotificationHistoryFilter {
|
|
4592
|
+
readonly ruleId?: string;
|
|
4593
|
+
readonly deviceId?: string;
|
|
4594
|
+
readonly from?: number;
|
|
4595
|
+
readonly to?: number;
|
|
4596
|
+
readonly limit?: number;
|
|
1610
4597
|
}
|
|
1611
|
-
interface
|
|
4598
|
+
interface NotificationHistoryEntry {
|
|
4599
|
+
readonly id: string;
|
|
4600
|
+
readonly ruleId: string;
|
|
4601
|
+
readonly ruleName: string;
|
|
4602
|
+
readonly eventId: string;
|
|
4603
|
+
readonly timestamp: number;
|
|
4604
|
+
readonly outputs: readonly string[];
|
|
1612
4605
|
readonly success: boolean;
|
|
1613
|
-
readonly version?: string;
|
|
1614
|
-
readonly cameraCount?: number;
|
|
1615
4606
|
readonly error?: string;
|
|
1616
4607
|
}
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
4608
|
+
interface IAdvancedNotifier {
|
|
4609
|
+
getRules(): readonly NotificationRule[];
|
|
4610
|
+
upsertRule(rule: NotificationRule): void;
|
|
4611
|
+
deleteRule(ruleId: string): void;
|
|
4612
|
+
testRule(ruleId: string, lookbackMinutes: number): Promise<NotificationTestResult[]>;
|
|
4613
|
+
getHistory(filter?: NotificationHistoryFilter): Promise<NotificationHistoryEntry[]>;
|
|
1623
4614
|
}
|
|
1624
4615
|
|
|
1625
4616
|
/**
|
|
@@ -1691,6 +4682,8 @@ interface CapabilityProviderMap {
|
|
|
1691
4682
|
'device-provider': unknown;
|
|
1692
4683
|
'network-access': unknown;
|
|
1693
4684
|
'streaming-engine': unknown;
|
|
4685
|
+
'scene-intelligence': ISceneIntelligence;
|
|
4686
|
+
'advanced-notifier': IAdvancedNotifier;
|
|
1694
4687
|
[key: string]: unknown;
|
|
1695
4688
|
}
|
|
1696
4689
|
|
|
@@ -1780,6 +4773,116 @@ interface ITaskHandler {
|
|
|
1780
4773
|
cancel?(): Promise<void>;
|
|
1781
4774
|
}
|
|
1782
4775
|
|
|
4776
|
+
/** Messages sent from main process to worker */
|
|
4777
|
+
type MainToWorkerMessage = {
|
|
4778
|
+
type: 'INIT';
|
|
4779
|
+
addonId: string;
|
|
4780
|
+
addonDir: string;
|
|
4781
|
+
config: Record<string, unknown>;
|
|
4782
|
+
storagePaths: Record<string, string>;
|
|
4783
|
+
/** Private data directory for this addon */
|
|
4784
|
+
dataDir: string;
|
|
4785
|
+
/** Legacy location paths (deprecated — use storageProvider proxy instead) */
|
|
4786
|
+
locationPaths: Record<string, string>;
|
|
4787
|
+
} | {
|
|
4788
|
+
type: 'CONFIG_CHANGE';
|
|
4789
|
+
config: Record<string, unknown>;
|
|
4790
|
+
} | {
|
|
4791
|
+
type: 'CAPABILITY_RESPONSE';
|
|
4792
|
+
requestId: string;
|
|
4793
|
+
result: unknown;
|
|
4794
|
+
error?: string;
|
|
4795
|
+
} | {
|
|
4796
|
+
type: 'SHUTDOWN';
|
|
4797
|
+
} | {
|
|
4798
|
+
type: 'PING';
|
|
4799
|
+
};
|
|
4800
|
+
/** Messages sent from worker to main process */
|
|
4801
|
+
type WorkerToMainMessage = {
|
|
4802
|
+
type: 'READY';
|
|
4803
|
+
capabilities: ReadonlyArray<{
|
|
4804
|
+
name: string;
|
|
4805
|
+
mode: 'singleton' | 'collection';
|
|
4806
|
+
}>;
|
|
4807
|
+
} | {
|
|
4808
|
+
type: 'CAPABILITY_REGISTER';
|
|
4809
|
+
name: string;
|
|
4810
|
+
mode: 'singleton' | 'collection';
|
|
4811
|
+
} | {
|
|
4812
|
+
type: 'CAPABILITY_CALL';
|
|
4813
|
+
requestId: string;
|
|
4814
|
+
capability: string;
|
|
4815
|
+
method: string;
|
|
4816
|
+
args: readonly unknown[];
|
|
4817
|
+
} | {
|
|
4818
|
+
type: 'LOG';
|
|
4819
|
+
level: string;
|
|
4820
|
+
message: string;
|
|
4821
|
+
context?: Record<string, unknown>;
|
|
4822
|
+
} | {
|
|
4823
|
+
type: 'EVENT';
|
|
4824
|
+
category: string;
|
|
4825
|
+
data: Record<string, unknown>;
|
|
4826
|
+
} | {
|
|
4827
|
+
type: 'STATS';
|
|
4828
|
+
cpu: number;
|
|
4829
|
+
memory: number;
|
|
4830
|
+
uptime: number;
|
|
4831
|
+
} | {
|
|
4832
|
+
type: 'PONG';
|
|
4833
|
+
} | {
|
|
4834
|
+
type: 'ERROR';
|
|
4835
|
+
message: string;
|
|
4836
|
+
stack?: string;
|
|
4837
|
+
} | {
|
|
4838
|
+
type: 'SUB_PROCESS_SPAWNED';
|
|
4839
|
+
pid: number;
|
|
4840
|
+
name: string;
|
|
4841
|
+
command: string;
|
|
4842
|
+
} | {
|
|
4843
|
+
type: 'SUB_PROCESS_EXITED';
|
|
4844
|
+
pid: number;
|
|
4845
|
+
code: number | null;
|
|
4846
|
+
} | {
|
|
4847
|
+
type: 'TASK_HANDLER_REGISTER';
|
|
4848
|
+
taskType: string;
|
|
4849
|
+
description: string;
|
|
4850
|
+
security?: 'safe' | 'dangerous';
|
|
4851
|
+
};
|
|
4852
|
+
/** Worker process state */
|
|
4853
|
+
type WorkerState = 'starting' | 'running' | 'stopping' | 'stopped' | 'crashed';
|
|
4854
|
+
/** Worker process info exposed to main process */
|
|
4855
|
+
interface WorkerInfo {
|
|
4856
|
+
readonly addonId: string;
|
|
4857
|
+
readonly pid: number;
|
|
4858
|
+
readonly state: WorkerState;
|
|
4859
|
+
readonly cpuPercent: number;
|
|
4860
|
+
readonly memoryRss: number;
|
|
4861
|
+
readonly uptimeSeconds: number;
|
|
4862
|
+
readonly restartCount: number;
|
|
4863
|
+
readonly subProcesses: readonly SubProcessInfo[];
|
|
4864
|
+
}
|
|
4865
|
+
/** Sub-process info */
|
|
4866
|
+
interface SubProcessInfo {
|
|
4867
|
+
readonly pid: number;
|
|
4868
|
+
readonly name: string;
|
|
4869
|
+
readonly command: string;
|
|
4870
|
+
readonly state: 'running' | 'stopped' | 'crashed';
|
|
4871
|
+
readonly cpuPercent: number;
|
|
4872
|
+
readonly memoryRss: number;
|
|
4873
|
+
readonly uptimeSeconds: number;
|
|
4874
|
+
}
|
|
4875
|
+
/** Worker process stats (distinct from the existing ProcessStats in process.ts) */
|
|
4876
|
+
interface WorkerProcessStats {
|
|
4877
|
+
readonly pid: number;
|
|
4878
|
+
readonly cpuPercent: number;
|
|
4879
|
+
readonly memoryRss: number;
|
|
4880
|
+
readonly heapUsed?: number;
|
|
4881
|
+
readonly uptimeSeconds: number;
|
|
4882
|
+
readonly restartCount: number;
|
|
4883
|
+
readonly state: WorkerState;
|
|
4884
|
+
}
|
|
4885
|
+
|
|
1783
4886
|
/** Storage interface for addon file operations */
|
|
1784
4887
|
interface IAddonFileStorage {
|
|
1785
4888
|
readFile(path: string): Promise<Buffer>;
|
|
@@ -1819,6 +4922,17 @@ interface AddonManifest {
|
|
|
1819
4922
|
readonly name: string;
|
|
1820
4923
|
readonly version: string;
|
|
1821
4924
|
readonly description?: string;
|
|
4925
|
+
/** Relative path to SVG icon asset within the addon package */
|
|
4926
|
+
readonly icon?: string;
|
|
4927
|
+
/** Brand hex color for UI display (e.g., "#3b82f6") */
|
|
4928
|
+
readonly color?: string;
|
|
4929
|
+
/**
|
|
4930
|
+
* Whether multiple instances of this provider can be created.
|
|
4931
|
+
* 'unique' — only one instance allowed (e.g., RTSP, ONVIF)
|
|
4932
|
+
* 'multiple' — user can create N instances (e.g., Frigate, Scrypted)
|
|
4933
|
+
* Default: 'multiple'
|
|
4934
|
+
*/
|
|
4935
|
+
readonly instanceMode?: 'unique' | 'multiple';
|
|
1822
4936
|
readonly packageName?: string;
|
|
1823
4937
|
readonly capabilities?: readonly (AddonCapability | {
|
|
1824
4938
|
name: string;
|
|
@@ -1832,7 +4946,18 @@ interface AddonManifest {
|
|
|
1832
4946
|
readonly supportsCustomModels?: boolean;
|
|
1833
4947
|
readonly mayRequirePython?: boolean;
|
|
1834
4948
|
readonly defaultConfig?: Readonly<Record<string, unknown>>;
|
|
4949
|
+
/** Whether this addon performs active inference with models.
|
|
4950
|
+
* Passive addons (e.g. motion-detection) set this to false
|
|
4951
|
+
* and are excluded from the inference pipeline schema. Default: true. */
|
|
4952
|
+
readonly passive?: boolean;
|
|
4953
|
+
/**
|
|
4954
|
+
* Label output type — declares what kind of label this addon produces
|
|
4955
|
+
* when used as a classifier/recognizer in the pipeline.
|
|
4956
|
+
* Used to tag LabelData.origin so the UI can render labels appropriately.
|
|
4957
|
+
*/
|
|
4958
|
+
readonly labelOutputType?: LabelOrigin;
|
|
1835
4959
|
}
|
|
4960
|
+
/** @deprecated Use IStorageProvider.resolve() instead of raw paths */
|
|
1836
4961
|
interface AddonLocationPaths {
|
|
1837
4962
|
readonly data: string;
|
|
1838
4963
|
readonly media: string;
|
|
@@ -1845,12 +4970,49 @@ interface AddonLocationPaths {
|
|
|
1845
4970
|
* Minimal model-management API exposed to addons via AddonContext.
|
|
1846
4971
|
*/
|
|
1847
4972
|
interface IAddonModelManager {
|
|
1848
|
-
/**
|
|
1849
|
-
|
|
4973
|
+
/** Ensure a model is downloaded. Returns the local file path. */
|
|
4974
|
+
ensure(modelId: string, format?: ModelFormat$1): Promise<string>;
|
|
4975
|
+
/** Ensure extra files for a model are downloaded. Returns paths. */
|
|
4976
|
+
ensureExtraFiles(modelId: string): Promise<readonly string[]>;
|
|
1850
4977
|
/** Absolute path to the shared models directory. */
|
|
1851
4978
|
getModelsDir(): string;
|
|
1852
|
-
/**
|
|
1853
|
-
isDownloaded(
|
|
4979
|
+
/** Check if a model is already downloaded. */
|
|
4980
|
+
isDownloaded(modelId: string, format?: ModelFormat$1): boolean;
|
|
4981
|
+
/** @deprecated Use ensure() instead. Legacy API kept for backward compatibility. */
|
|
4982
|
+
downloadModel(id: string): Promise<string>;
|
|
4983
|
+
}
|
|
4984
|
+
/** Process management for addon sub-processes (ffmpeg, python, etc.) */
|
|
4985
|
+
interface IAddonProcessManager {
|
|
4986
|
+
/** Spawn a child process managed by this addon's worker */
|
|
4987
|
+
spawn(config: SubProcessConfig): Promise<IManagedSubProcess>;
|
|
4988
|
+
/** List all sub-processes spawned by this addon */
|
|
4989
|
+
listProcesses(): readonly SubProcessInfo[];
|
|
4990
|
+
/** Get worker stats (this addon's worker process) */
|
|
4991
|
+
getWorkerStats(): WorkerProcessStats;
|
|
4992
|
+
}
|
|
4993
|
+
interface SubProcessConfig {
|
|
4994
|
+
readonly name: string;
|
|
4995
|
+
readonly command: string;
|
|
4996
|
+
readonly args?: readonly string[];
|
|
4997
|
+
readonly cwd?: string;
|
|
4998
|
+
readonly env?: Readonly<Record<string, string>>;
|
|
4999
|
+
readonly autoRestart?: boolean;
|
|
5000
|
+
readonly maxRestarts?: number;
|
|
5001
|
+
}
|
|
5002
|
+
interface IManagedSubProcess {
|
|
5003
|
+
readonly pid: number;
|
|
5004
|
+
readonly name: string;
|
|
5005
|
+
getStats(): WorkerProcessStats;
|
|
5006
|
+
write(data: Buffer): void;
|
|
5007
|
+
readonly stdout: AsyncIterable<Buffer>;
|
|
5008
|
+
readonly stderr: AsyncIterable<Buffer>;
|
|
5009
|
+
kill(signal?: NodeJS.Signals): void;
|
|
5010
|
+
wait(): Promise<{
|
|
5011
|
+
code: number | null;
|
|
5012
|
+
signal: string | null;
|
|
5013
|
+
}>;
|
|
5014
|
+
onExit(handler: (code: number | null) => void): void;
|
|
5015
|
+
onError(handler: (error: Error) => void): void;
|
|
1854
5016
|
}
|
|
1855
5017
|
/**
|
|
1856
5018
|
* AddonContext -- injected into every addon at initialize().
|
|
@@ -1858,6 +5020,15 @@ interface IAddonModelManager {
|
|
|
1858
5020
|
* The context includes both the CamstackContext fields (id, logger, eventBus, storage, config)
|
|
1859
5021
|
* and addon-specific extras (addonConfig, models, locationPaths, router, network).
|
|
1860
5022
|
*/
|
|
5023
|
+
/**
|
|
5024
|
+
* AddonContext -- injected into every addon at initialize().
|
|
5025
|
+
*
|
|
5026
|
+
* The `api` field is typed as `AddonApi` — a generated interface that
|
|
5027
|
+
* mirrors the server's tRPC router namespaces. This gives addons type-safe
|
|
5028
|
+
* access to server procedures without depending on the server package.
|
|
5029
|
+
*
|
|
5030
|
+
* To regenerate after changing routers: npx tsx scripts/generate-api-types.ts
|
|
5031
|
+
*/
|
|
1861
5032
|
interface AddonContext {
|
|
1862
5033
|
/** Immutable progressive ID */
|
|
1863
5034
|
readonly id: string;
|
|
@@ -1865,27 +5036,45 @@ interface AddonContext {
|
|
|
1865
5036
|
readonly logger: IScopedLogger;
|
|
1866
5037
|
/** System event bus */
|
|
1867
5038
|
readonly eventBus: IEventBus;
|
|
1868
|
-
/** Scoped storage location */
|
|
5039
|
+
/** Scoped storage location (legacy — use storageProvider instead) */
|
|
1869
5040
|
readonly storage: IStorageLocation;
|
|
1870
5041
|
/** Persisted config store */
|
|
1871
5042
|
readonly config: IElementConfig;
|
|
1872
|
-
/** Bootstrap configuration from server settings (read-only
|
|
5043
|
+
/** Bootstrap configuration from server settings (read-only) */
|
|
1873
5044
|
readonly addonConfig: Readonly<Record<string, unknown>>;
|
|
1874
5045
|
/** Model management -- download default models or retrieve cached paths. */
|
|
1875
5046
|
models?: IAddonModelManager;
|
|
1876
|
-
/**
|
|
5047
|
+
/** @deprecated Use storageProvider.resolve() instead */
|
|
1877
5048
|
readonly locationPaths: AddonLocationPaths;
|
|
5049
|
+
/** File storage provider — resolve paths, read/write files per location type */
|
|
5050
|
+
readonly storageProvider?: IStorageProvider;
|
|
5051
|
+
/** Settings backend — query/insert structured data (events, settings, metadata) */
|
|
5052
|
+
readonly settingsBackend?: ISettingsBackend;
|
|
5053
|
+
/** Embeddings backend — vector storage for similarity search */
|
|
5054
|
+
readonly embeddingsBackend?: IEmbeddingsBackend;
|
|
5055
|
+
/**
|
|
5056
|
+
* Private data directory for this addon.
|
|
5057
|
+
* Resolved via storageProvider.resolve('addons-data', '{addonId}/').
|
|
5058
|
+
* The addon owns this directory exclusively.
|
|
5059
|
+
*/
|
|
5060
|
+
readonly dataDir: string;
|
|
1878
5061
|
/** HTTP router for registering addon routes */
|
|
1879
5062
|
readonly router?: IAddonRouter;
|
|
1880
5063
|
/** Network access provider */
|
|
1881
5064
|
readonly network?: INetworkProvider;
|
|
1882
|
-
/** Storage provider */
|
|
1883
|
-
readonly storageProvider?: IStorageProvider;
|
|
1884
5065
|
/**
|
|
1885
5066
|
* Register a task handler that can be dispatched by the hub.
|
|
1886
5067
|
* Only effective in agent mode — in hub mode, handlers are stored but not dispatched.
|
|
1887
5068
|
*/
|
|
1888
5069
|
registerTaskHandler?(handler: ITaskHandler): void;
|
|
5070
|
+
/** Process management — spawn and monitor sub-processes */
|
|
5071
|
+
readonly process?: IAddonProcessManager;
|
|
5072
|
+
/**
|
|
5073
|
+
* Full tRPC client — same API as the frontend.
|
|
5074
|
+
* Transport is transparent: direct caller (in-process), WSS (worker), or WSS (remote agent).
|
|
5075
|
+
* Use this for all server interactions: storage, events, devices, streaming, etc.
|
|
5076
|
+
*/
|
|
5077
|
+
readonly api?: AddonApi;
|
|
1889
5078
|
}
|
|
1890
5079
|
interface ICamstackAddon {
|
|
1891
5080
|
readonly id?: string;
|
|
@@ -1910,10 +5099,10 @@ interface AddonPageDeclaration {
|
|
|
1910
5099
|
readonly icon: string;
|
|
1911
5100
|
/** Route path (e.g., '/benchmark') */
|
|
1912
5101
|
readonly path: string;
|
|
1913
|
-
/** Relative path to JS bundle within addon package */
|
|
5102
|
+
/** Relative path to JS bundle within addon package (default export = React component) */
|
|
1914
5103
|
readonly bundle: string;
|
|
1915
|
-
/** Web component
|
|
1916
|
-
readonly element
|
|
5104
|
+
/** @deprecated Web component element name — addon pages now export React components */
|
|
5105
|
+
readonly element?: string;
|
|
1917
5106
|
}
|
|
1918
5107
|
/** Provider interface for addons that expose UI pages */
|
|
1919
5108
|
interface IAddonPageProvider {
|
|
@@ -1929,6 +5118,20 @@ interface AddonDeclaration {
|
|
|
1929
5118
|
readonly id: string;
|
|
1930
5119
|
readonly entry: string;
|
|
1931
5120
|
readonly slot: PipelineSlot;
|
|
5121
|
+
/** Relative path to SVG icon asset within the addon package */
|
|
5122
|
+
readonly icon?: string;
|
|
5123
|
+
/** Brand hex color for UI display */
|
|
5124
|
+
readonly color?: string;
|
|
5125
|
+
/** Instance mode: 'unique' or 'multiple'. Default: 'multiple' */
|
|
5126
|
+
readonly instanceMode?: 'unique' | 'multiple';
|
|
5127
|
+
/** @deprecated Use inProcess instead. Legacy opt-in flag for forking. */
|
|
5128
|
+
readonly forkable?: boolean;
|
|
5129
|
+
/**
|
|
5130
|
+
* Force this addon to stay in-process (no forking).
|
|
5131
|
+
* Default: false — all non-infra addons are forked by default.
|
|
5132
|
+
* Use CAMSTACK_FORCE_INPROCESS=true env var for emergency global fallback.
|
|
5133
|
+
*/
|
|
5134
|
+
readonly inProcess?: boolean;
|
|
1932
5135
|
/** Capabilities this addon provides. Declared in package.json camstack.addons[].capabilities */
|
|
1933
5136
|
readonly capabilities?: readonly CapabilityDeclaration[];
|
|
1934
5137
|
/** UI pages provided by this addon */
|
|
@@ -1961,6 +5164,11 @@ interface IClassifierProvider extends IPipelineSlotProvider {
|
|
|
1961
5164
|
classify(input: CropInput): Promise<ClassifierOutput>;
|
|
1962
5165
|
}
|
|
1963
5166
|
|
|
5167
|
+
interface IRefinerProvider extends IPipelineSlotProvider {
|
|
5168
|
+
readonly slot: 'refiner';
|
|
5169
|
+
refine(input: CropInput): Promise<RefinerOutput>;
|
|
5170
|
+
}
|
|
5171
|
+
|
|
1964
5172
|
interface IDetectionAddon extends ICamstackAddon, IPipelineSlotProvider {
|
|
1965
5173
|
getConfigSchema(): ConfigUISchema;
|
|
1966
5174
|
getClassMap(): ClassMapDefinition;
|
|
@@ -1985,6 +5193,161 @@ interface ResolveEngineOptions {
|
|
|
1985
5193
|
readonly modelsDir: string;
|
|
1986
5194
|
}
|
|
1987
5195
|
|
|
5196
|
+
/** Hardware information detected at boot */
|
|
5197
|
+
interface HardwareInfo {
|
|
5198
|
+
readonly platform: 'darwin' | 'linux' | 'win32';
|
|
5199
|
+
readonly arch: 'arm64' | 'x64';
|
|
5200
|
+
readonly cpuModel: string;
|
|
5201
|
+
readonly cpuCores: number;
|
|
5202
|
+
readonly totalRAM_MB: number;
|
|
5203
|
+
readonly availableRAM_MB: number;
|
|
5204
|
+
readonly gpu: GpuInfo | null;
|
|
5205
|
+
readonly npu: NpuInfo | null;
|
|
5206
|
+
}
|
|
5207
|
+
interface GpuInfo {
|
|
5208
|
+
readonly type: 'nvidia' | 'amd' | 'intel' | 'apple';
|
|
5209
|
+
readonly name: string;
|
|
5210
|
+
readonly memoryMB?: number;
|
|
5211
|
+
}
|
|
5212
|
+
interface NpuInfo {
|
|
5213
|
+
readonly type: 'apple-ane' | 'intel-npu';
|
|
5214
|
+
}
|
|
5215
|
+
/** A probed backend with availability and score */
|
|
5216
|
+
interface PlatformScore {
|
|
5217
|
+
readonly runtime: 'node' | 'python';
|
|
5218
|
+
readonly backend: string;
|
|
5219
|
+
readonly format: 'onnx' | 'coreml' | 'openvino';
|
|
5220
|
+
readonly score: number;
|
|
5221
|
+
readonly reason: string;
|
|
5222
|
+
readonly available: boolean;
|
|
5223
|
+
}
|
|
5224
|
+
/** Full platform capabilities — cached once per boot */
|
|
5225
|
+
interface PlatformCapabilities {
|
|
5226
|
+
readonly hardware: HardwareInfo;
|
|
5227
|
+
readonly scores: readonly PlatformScore[];
|
|
5228
|
+
readonly bestScore: PlatformScore;
|
|
5229
|
+
readonly pythonPath: string | null;
|
|
5230
|
+
}
|
|
5231
|
+
/** Model requirement declared by an addon */
|
|
5232
|
+
interface ModelRequirement {
|
|
5233
|
+
readonly modelId: string;
|
|
5234
|
+
readonly name: string;
|
|
5235
|
+
/** Minimum RAM needed for inference (model + runtime overhead, in MB) */
|
|
5236
|
+
readonly minRAM_MB: number;
|
|
5237
|
+
/** Relative accuracy score 0-100 */
|
|
5238
|
+
readonly accuracyScore: number;
|
|
5239
|
+
/** Available formats in the model catalog */
|
|
5240
|
+
readonly formats: readonly string[];
|
|
5241
|
+
}
|
|
5242
|
+
/** Resolved config — the tripletta chosen by the scorer for an addon */
|
|
5243
|
+
interface ResolvedInferenceConfig {
|
|
5244
|
+
readonly modelId: string;
|
|
5245
|
+
readonly runtime: 'node' | 'python';
|
|
5246
|
+
readonly backend: string;
|
|
5247
|
+
readonly format: string;
|
|
5248
|
+
readonly reason: string;
|
|
5249
|
+
}
|
|
5250
|
+
|
|
5251
|
+
/** A hardware backend available for inference (e.g. CPU, CoreML, CUDA) */
|
|
5252
|
+
interface BackendInfo {
|
|
5253
|
+
/** Backend identifier — matches engine-resolver backend param */
|
|
5254
|
+
readonly id: string;
|
|
5255
|
+
/** Human-readable label */
|
|
5256
|
+
readonly label: string;
|
|
5257
|
+
/** Whether this backend is available on the current agent/hub */
|
|
5258
|
+
readonly available: boolean;
|
|
5259
|
+
/** Device type for display */
|
|
5260
|
+
readonly device: string;
|
|
5261
|
+
}
|
|
5262
|
+
/** A Python-specific backend with its associated model format */
|
|
5263
|
+
interface PythonBackendInfo extends BackendInfo {
|
|
5264
|
+
/** The model format this backend needs (coreml → .mlpackage, openvino → .xml, etc.) */
|
|
5265
|
+
readonly modelFormat: ModelFormat$1;
|
|
5266
|
+
/** Python module required (e.g. 'coremltools', 'openvino', 'torch') */
|
|
5267
|
+
readonly pythonModule: string;
|
|
5268
|
+
}
|
|
5269
|
+
/** Node.js runtime — uses onnxruntime-node, always loads .onnx files */
|
|
5270
|
+
interface NodeRuntimeInfo {
|
|
5271
|
+
readonly available: true;
|
|
5272
|
+
/** ONNX execution provider backends (cpu, coreml, cuda, tensorrt) */
|
|
5273
|
+
readonly backends: readonly BackendInfo[];
|
|
5274
|
+
/** Node.js always uses ONNX format */
|
|
5275
|
+
readonly modelFormat: 'onnx';
|
|
5276
|
+
}
|
|
5277
|
+
/** Python runtime — uses subprocess with native model formats */
|
|
5278
|
+
interface PythonRuntimeInfo {
|
|
5279
|
+
readonly available: boolean;
|
|
5280
|
+
readonly pythonPath?: string;
|
|
5281
|
+
/** Each Python backend uses a different model format */
|
|
5282
|
+
readonly backends: readonly PythonBackendInfo[];
|
|
5283
|
+
}
|
|
5284
|
+
/** All runtimes available on an agent/hub */
|
|
5285
|
+
interface RuntimeCapabilities {
|
|
5286
|
+
readonly node: NodeRuntimeInfo;
|
|
5287
|
+
readonly python: PythonRuntimeInfo;
|
|
5288
|
+
}
|
|
5289
|
+
/** Download status of a specific model format */
|
|
5290
|
+
interface ModelFormatStatus {
|
|
5291
|
+
readonly url: string;
|
|
5292
|
+
readonly sizeMB: number;
|
|
5293
|
+
readonly downloaded: boolean;
|
|
5294
|
+
readonly filePath?: string;
|
|
5295
|
+
}
|
|
5296
|
+
/** A model from the catalog with download status per format */
|
|
5297
|
+
interface ModelAvailability {
|
|
5298
|
+
readonly id: string;
|
|
5299
|
+
readonly name: string;
|
|
5300
|
+
readonly description: string;
|
|
5301
|
+
readonly inputSize: {
|
|
5302
|
+
readonly width: number;
|
|
5303
|
+
readonly height: number;
|
|
5304
|
+
};
|
|
5305
|
+
readonly formats: Partial<Readonly<Record<ModelFormat$1, ModelFormatStatus>>>;
|
|
5306
|
+
}
|
|
5307
|
+
/** Detection addon with its available models */
|
|
5308
|
+
interface AddonCapabilityInfo {
|
|
5309
|
+
readonly id: string;
|
|
5310
|
+
readonly name: string;
|
|
5311
|
+
readonly models: readonly ModelAvailability[];
|
|
5312
|
+
}
|
|
5313
|
+
/** Complete inference capabilities for an agent/hub */
|
|
5314
|
+
interface InferenceCapabilities {
|
|
5315
|
+
readonly agentId: string;
|
|
5316
|
+
readonly agentName: string;
|
|
5317
|
+
readonly platform: string;
|
|
5318
|
+
readonly arch: string;
|
|
5319
|
+
readonly addons: readonly AddonCapabilityInfo[];
|
|
5320
|
+
readonly runtimes: RuntimeCapabilities;
|
|
5321
|
+
readonly modelsDir: string;
|
|
5322
|
+
/** Platform scores from PlatformScorer — available after boot probe */
|
|
5323
|
+
readonly platformScores?: readonly PlatformScore[];
|
|
5324
|
+
}
|
|
5325
|
+
/** Configuration to create/retrieve a managed inference engine */
|
|
5326
|
+
interface EngineConfig {
|
|
5327
|
+
readonly addonId: string;
|
|
5328
|
+
readonly modelId: string;
|
|
5329
|
+
/** 'node' = onnxruntime-node, 'python' = Python subprocess */
|
|
5330
|
+
readonly runtime: 'node' | 'python';
|
|
5331
|
+
/** Backend within that runtime (e.g. 'cpu', 'coreml', 'cuda') */
|
|
5332
|
+
readonly backend: string;
|
|
5333
|
+
}
|
|
5334
|
+
/** Progress event emitted during model download */
|
|
5335
|
+
interface ModelDownloadProgress {
|
|
5336
|
+
readonly modelId: string;
|
|
5337
|
+
readonly format: ModelFormat$1;
|
|
5338
|
+
readonly downloadedBytes: number;
|
|
5339
|
+
readonly totalBytes: number;
|
|
5340
|
+
readonly percent: number;
|
|
5341
|
+
}
|
|
5342
|
+
/** Result of a benchmark model download */
|
|
5343
|
+
interface BenchmarkDownloadResult {
|
|
5344
|
+
readonly modelId: string;
|
|
5345
|
+
readonly format: ModelFormat$1;
|
|
5346
|
+
readonly filePath: string;
|
|
5347
|
+
readonly sizeMB: number;
|
|
5348
|
+
readonly durationMs: number;
|
|
5349
|
+
}
|
|
5350
|
+
|
|
1988
5351
|
interface IZoneRepository {
|
|
1989
5352
|
getByCamera(cameraId: string): Promise<ZoneDefinition[]>;
|
|
1990
5353
|
save(zone: ZoneDefinition): Promise<void>;
|
|
@@ -2024,36 +5387,30 @@ interface IPythonEnvironment {
|
|
|
2024
5387
|
}
|
|
2025
5388
|
|
|
2026
5389
|
/**
|
|
2027
|
-
*
|
|
5390
|
+
* @deprecated — This file contains legacy storage backend interfaces.
|
|
5391
|
+
* Use the new interfaces from './storage.ts' instead:
|
|
5392
|
+
* - IStorageProvider (capability: 'storage')
|
|
5393
|
+
* - ISettingsBackend (capability: 'settings-store')
|
|
5394
|
+
* - IEmbeddingsBackend (capability: 'embeddings')
|
|
2028
5395
|
*/
|
|
5396
|
+
|
|
5397
|
+
/** @deprecated Use IStorageProvider from storage.ts */
|
|
2029
5398
|
interface IStorageBackend {
|
|
2030
|
-
/** Backend type identifier */
|
|
2031
5399
|
readonly type: string;
|
|
2032
|
-
/** Base path of this backend */
|
|
2033
5400
|
readonly basePath: string;
|
|
2034
|
-
/** Resolve a subpath to an absolute path */
|
|
2035
5401
|
resolve(subpath: string): string;
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
/** Check if the backend path exists and is writable */
|
|
2039
|
-
isAvailable(location?: StorageLocationName): boolean;
|
|
2040
|
-
/** Ensure base directory exists (mkdir -p equivalent) */
|
|
5402
|
+
resolve(location: StorageLocationType, ...segments: string[]): string;
|
|
5403
|
+
isAvailable(location?: StorageLocationType): boolean;
|
|
2041
5404
|
initialize(): Promise<void>;
|
|
2042
|
-
|
|
2043
|
-
getLocationPath?(location: StorageLocationName): string;
|
|
2044
|
-
}
|
|
2045
|
-
/** @deprecated Use IStorageProvider from storage.ts instead */
|
|
2046
|
-
interface IStorageProviderLegacy {
|
|
2047
|
-
getLocation(name: string): string;
|
|
2048
|
-
setLocationPath?(name: StorageLocationName, absolutePath: string): void;
|
|
5405
|
+
getLocationPath?(location: StorageLocationType): string;
|
|
2049
5406
|
}
|
|
2050
|
-
/**
|
|
5407
|
+
/** @deprecated */
|
|
2051
5408
|
interface StorageLocationConfig {
|
|
2052
5409
|
readonly name: string;
|
|
2053
5410
|
readonly basePath: string;
|
|
2054
5411
|
readonly backendType?: string;
|
|
2055
5412
|
}
|
|
2056
|
-
/**
|
|
5413
|
+
/** @deprecated Use DEFAULT_LOCATION_SUBDIRS from storage.ts */
|
|
2057
5414
|
declare const DEFAULT_LOCATION_SUBPATHS: Record<string, string>;
|
|
2058
5415
|
|
|
2059
5416
|
interface IPipelineRunner {
|
|
@@ -2076,7 +5433,48 @@ interface IPipelineValidator {
|
|
|
2076
5433
|
validate(config: PipelineConfig): ValidationResult;
|
|
2077
5434
|
}
|
|
2078
5435
|
|
|
2079
|
-
|
|
5436
|
+
/**
|
|
5437
|
+
* Addon i18n interface -- allows addons to provide translations
|
|
5438
|
+
* for their UI labels, descriptions, and config schema fields.
|
|
5439
|
+
*
|
|
5440
|
+
* Addons implement IAddonTranslationProvider to supply translations
|
|
5441
|
+
* either as a static map or via a dynamic lookup method.
|
|
5442
|
+
*/
|
|
5443
|
+
/** A flat key-value map of translation strings for a single locale */
|
|
5444
|
+
type TranslationMap = Readonly<Record<string, string>>;
|
|
5445
|
+
/** A complete translations bundle keyed by locale code (e.g. 'en', 'it', 'de') */
|
|
5446
|
+
type TranslationBundle = Readonly<Record<string, TranslationMap>>;
|
|
5447
|
+
/**
|
|
5448
|
+
* Provider interface for addons that supply translations.
|
|
5449
|
+
*
|
|
5450
|
+
* Addons can provide translations in two ways:
|
|
5451
|
+
* 1. A static bundle via `getTranslationBundle()` containing all locales
|
|
5452
|
+
* 2. A per-locale lookup via `getTranslations(locale)` for lazy loading
|
|
5453
|
+
*
|
|
5454
|
+
* At least one method must be implemented. If both are present,
|
|
5455
|
+
* `getTranslations()` takes precedence for the requested locale.
|
|
5456
|
+
*/
|
|
5457
|
+
interface IAddonTranslationProvider {
|
|
5458
|
+
readonly id: string;
|
|
5459
|
+
/**
|
|
5460
|
+
* Return translations for a specific locale.
|
|
5461
|
+
* Returns undefined if the locale is not supported.
|
|
5462
|
+
*/
|
|
5463
|
+
getTranslations?(locale: string): TranslationMap | undefined;
|
|
5464
|
+
/**
|
|
5465
|
+
* Return the full translation bundle containing all supported locales.
|
|
5466
|
+
* Useful when the addon ships all translations statically.
|
|
5467
|
+
*/
|
|
5468
|
+
getTranslationBundle?(): TranslationBundle;
|
|
5469
|
+
}
|
|
5470
|
+
/**
|
|
5471
|
+
* Resolve a translation key against a provider for the given locale.
|
|
5472
|
+
* Falls back to 'en' if the requested locale is not available,
|
|
5473
|
+
* then falls back to the key itself if no translation is found.
|
|
5474
|
+
*/
|
|
5475
|
+
declare function resolveTranslation(provider: IAddonTranslationProvider, locale: string, key: string): string;
|
|
5476
|
+
|
|
5477
|
+
type DeviceType$1 = 'camera' | 'doorbell' | 'sensor' | 'switch' | 'thermostat' | 'light' | 'generic';
|
|
2080
5478
|
interface DeviceState {
|
|
2081
5479
|
online: boolean;
|
|
2082
5480
|
lastSeen?: number;
|
|
@@ -2100,7 +5498,7 @@ interface IDevice {
|
|
|
2100
5498
|
readonly id: string;
|
|
2101
5499
|
readonly name: string;
|
|
2102
5500
|
readonly providerId: string;
|
|
2103
|
-
readonly type: DeviceType;
|
|
5501
|
+
readonly type: DeviceType$1;
|
|
2104
5502
|
readonly capabilities: DeviceCapabilityName[];
|
|
2105
5503
|
/** The device's context -- logger, storage, eventBus scoped to this device */
|
|
2106
5504
|
readonly ctx: CamstackContext;
|
|
@@ -2121,7 +5519,7 @@ interface ProviderStatus {
|
|
|
2121
5519
|
interface DiscoveredDevice {
|
|
2122
5520
|
externalId: string;
|
|
2123
5521
|
name: string;
|
|
2124
|
-
type: DeviceType;
|
|
5522
|
+
type: DeviceType$1;
|
|
2125
5523
|
capabilities: DeviceCapabilityName[];
|
|
2126
5524
|
metadata: DeviceMetadata;
|
|
2127
5525
|
}
|
|
@@ -2330,6 +5728,20 @@ interface ISwitch extends IDeviceCapability {
|
|
|
2330
5728
|
toggle(): Promise<void>;
|
|
2331
5729
|
}
|
|
2332
5730
|
|
|
5731
|
+
/** Native detection events from camera hardware (ONVIF, Frigate, etc.) */
|
|
5732
|
+
interface NativeDetectionEvent {
|
|
5733
|
+
readonly cameraId: string;
|
|
5734
|
+
readonly type: 'motion' | 'person' | 'vehicle' | 'animal' | string;
|
|
5735
|
+
readonly confidence?: number;
|
|
5736
|
+
readonly timestamp: number;
|
|
5737
|
+
readonly source: 'onvif' | 'frigate' | 'rtsp-metadata' | string;
|
|
5738
|
+
}
|
|
5739
|
+
/** Interface for cameras that support native detection */
|
|
5740
|
+
interface ICameraNativeDetection {
|
|
5741
|
+
readonly supportsNativeDetection: true;
|
|
5742
|
+
onNativeDetection(handler: (event: NativeDetectionEvent) => void): () => void;
|
|
5743
|
+
}
|
|
5744
|
+
|
|
2333
5745
|
type StreamFormat = 'webrtc' | 'hls' | 'mjpeg' | 'rtsp';
|
|
2334
5746
|
interface StreamingSource {
|
|
2335
5747
|
readonly url: string;
|
|
@@ -2359,7 +5771,7 @@ interface IStreamingEngine {
|
|
|
2359
5771
|
getStreamStatus(streamId: string): StreamStatus | null;
|
|
2360
5772
|
}
|
|
2361
5773
|
|
|
2362
|
-
type UserRole = 'super_admin' | 'admin' | 'viewer';
|
|
5774
|
+
type UserRole = 'super_admin' | 'admin' | 'viewer' | 'agent';
|
|
2363
5775
|
interface UserPermissions {
|
|
2364
5776
|
role: UserRole;
|
|
2365
5777
|
allowedProviders: string[] | '*';
|
|
@@ -2387,11 +5799,12 @@ interface ApiKeyRecord {
|
|
|
2387
5799
|
lastUsedAt?: number;
|
|
2388
5800
|
}
|
|
2389
5801
|
interface TokenPayload {
|
|
2390
|
-
type?: 'api_key';
|
|
5802
|
+
type?: 'api_key' | 'service';
|
|
2391
5803
|
keyId?: string;
|
|
2392
5804
|
userId?: string;
|
|
2393
5805
|
username?: string;
|
|
2394
5806
|
role: UserRole;
|
|
5807
|
+
agentId?: string;
|
|
2395
5808
|
allowedProviders: string[] | '*';
|
|
2396
5809
|
allowedDevices: Record<string, string[] | '*'>;
|
|
2397
5810
|
iat?: number;
|
|
@@ -3038,6 +6451,198 @@ interface IReplEngine {
|
|
|
3038
6451
|
getCompletions(partial: string, context: ReplContext): Promise<string[]>;
|
|
3039
6452
|
}
|
|
3040
6453
|
|
|
6454
|
+
/**
|
|
6455
|
+
* API-shared types — types that originated in @camstack/core, @camstack/kernel,
|
|
6456
|
+
* or server internals and are now canonical here so the generated API type file
|
|
6457
|
+
* has zero external dependencies beyond @camstack/types.
|
|
6458
|
+
*/
|
|
6459
|
+
|
|
6460
|
+
interface BackupManifest {
|
|
6461
|
+
readonly id: string;
|
|
6462
|
+
readonly timestamp: number;
|
|
6463
|
+
readonly label?: string;
|
|
6464
|
+
readonly locations: readonly string[];
|
|
6465
|
+
readonly sizeMB: number;
|
|
6466
|
+
readonly path: string;
|
|
6467
|
+
}
|
|
6468
|
+
interface ProviderListItem {
|
|
6469
|
+
id: string;
|
|
6470
|
+
type: string;
|
|
6471
|
+
name: string;
|
|
6472
|
+
status: ProviderStatus;
|
|
6473
|
+
started: boolean;
|
|
6474
|
+
lifecycle: ElementStatus;
|
|
6475
|
+
}
|
|
6476
|
+
interface InstalledPackage {
|
|
6477
|
+
readonly name: string;
|
|
6478
|
+
readonly version: string;
|
|
6479
|
+
readonly dir: string;
|
|
6480
|
+
}
|
|
6481
|
+
/** A page declaration enriched with its source addon ID */
|
|
6482
|
+
interface AddonPageInfo {
|
|
6483
|
+
readonly addonId: string;
|
|
6484
|
+
readonly page: AddonPageDeclaration;
|
|
6485
|
+
readonly bundleUrl: string;
|
|
6486
|
+
}
|
|
6487
|
+
type BenchmarkPhase = 'init' | 'warmup' | 'running' | 'done';
|
|
6488
|
+
interface BenchmarkProgress {
|
|
6489
|
+
readonly addonId: string;
|
|
6490
|
+
readonly phase: BenchmarkPhase;
|
|
6491
|
+
readonly elapsedSec: number;
|
|
6492
|
+
readonly totalSec: number;
|
|
6493
|
+
readonly warmupFrame: number;
|
|
6494
|
+
readonly warmupTotal: number;
|
|
6495
|
+
readonly framesProcessed: number;
|
|
6496
|
+
readonly totalDetections: number;
|
|
6497
|
+
readonly objectsFound: number;
|
|
6498
|
+
readonly errorCount: number;
|
|
6499
|
+
readonly simulatedCameras: number;
|
|
6500
|
+
readonly batchSize: number;
|
|
6501
|
+
readonly currentDps: number;
|
|
6502
|
+
readonly currentFps: number;
|
|
6503
|
+
readonly recentAvgMs: number;
|
|
6504
|
+
readonly inferenceMs: number;
|
|
6505
|
+
}
|
|
6506
|
+
interface BenchmarkResult {
|
|
6507
|
+
readonly addonId: string;
|
|
6508
|
+
readonly addonName: string;
|
|
6509
|
+
readonly referenceImage: string;
|
|
6510
|
+
readonly runtime: string;
|
|
6511
|
+
readonly iterations: number;
|
|
6512
|
+
readonly durationSec: number;
|
|
6513
|
+
readonly warmup: number;
|
|
6514
|
+
readonly inputResolution: string;
|
|
6515
|
+
readonly dps: number;
|
|
6516
|
+
readonly totalDetections: number;
|
|
6517
|
+
readonly objectsFound: number;
|
|
6518
|
+
readonly avgDetectionsPerFrame: number;
|
|
6519
|
+
readonly inferenceAvgMs: number;
|
|
6520
|
+
readonly inferenceP50Ms: number;
|
|
6521
|
+
readonly inferenceP95Ms: number;
|
|
6522
|
+
readonly inferenceP99Ms: number;
|
|
6523
|
+
readonly fps: number;
|
|
6524
|
+
readonly avgMs: number;
|
|
6525
|
+
readonly p50Ms: number;
|
|
6526
|
+
readonly p95Ms: number;
|
|
6527
|
+
readonly p99Ms: number;
|
|
6528
|
+
readonly minMs: number;
|
|
6529
|
+
readonly maxMs: number;
|
|
6530
|
+
readonly peakMemoryMB: number;
|
|
6531
|
+
readonly errorCount: number;
|
|
6532
|
+
readonly successCount: number;
|
|
6533
|
+
readonly modelId: string;
|
|
6534
|
+
readonly simulatedCameras: number;
|
|
6535
|
+
readonly batchSize: number;
|
|
6536
|
+
}
|
|
6537
|
+
interface HistoryEntry {
|
|
6538
|
+
readonly id: string;
|
|
6539
|
+
readonly date: string;
|
|
6540
|
+
readonly agentName: string;
|
|
6541
|
+
readonly addonId: string;
|
|
6542
|
+
readonly modelName: string;
|
|
6543
|
+
readonly runtime: string;
|
|
6544
|
+
readonly dps: number;
|
|
6545
|
+
readonly inferenceAvgMs: number;
|
|
6546
|
+
readonly totalDetections: number;
|
|
6547
|
+
readonly fps: number;
|
|
6548
|
+
readonly avgMs: number;
|
|
6549
|
+
readonly p50Ms: number;
|
|
6550
|
+
readonly p95Ms: number;
|
|
6551
|
+
readonly p99Ms: number;
|
|
6552
|
+
readonly minMs: number;
|
|
6553
|
+
readonly maxMs: number;
|
|
6554
|
+
readonly peakMemoryMB: number;
|
|
6555
|
+
readonly iterations: number;
|
|
6556
|
+
readonly warmup: number;
|
|
6557
|
+
readonly inputResolution: string;
|
|
6558
|
+
readonly simulatedCameras?: number;
|
|
6559
|
+
readonly batchSize?: number;
|
|
6560
|
+
readonly errorCount?: number;
|
|
6561
|
+
}
|
|
6562
|
+
interface PipelineProgressEvent {
|
|
6563
|
+
readonly step: 'loading-engine' | 'inferring' | 'complete';
|
|
6564
|
+
readonly addonId: string;
|
|
6565
|
+
readonly modelId: string;
|
|
6566
|
+
readonly ms?: number;
|
|
6567
|
+
readonly message?: string;
|
|
6568
|
+
}
|
|
6569
|
+
interface OrchestratorMetrics {
|
|
6570
|
+
readonly activeCameras: number;
|
|
6571
|
+
readonly throttledCameras: number;
|
|
6572
|
+
readonly avgInferenceTimeMs: number;
|
|
6573
|
+
readonly queueDepth: number;
|
|
6574
|
+
}
|
|
6575
|
+
interface CameraMetrics {
|
|
6576
|
+
readonly priority: CameraPriority;
|
|
6577
|
+
readonly configuredFps: number;
|
|
6578
|
+
readonly actualFps: number;
|
|
6579
|
+
readonly queueDepth: number;
|
|
6580
|
+
readonly avgInferenceTimeMs: number;
|
|
6581
|
+
readonly droppedFrames: number;
|
|
6582
|
+
readonly phase: CameraPhase;
|
|
6583
|
+
}
|
|
6584
|
+
interface PackageUpdate {
|
|
6585
|
+
readonly name: string;
|
|
6586
|
+
readonly currentVersion: string;
|
|
6587
|
+
readonly latestVersion: string;
|
|
6588
|
+
readonly category: 'addon' | 'core';
|
|
6589
|
+
readonly requiresRestart: boolean;
|
|
6590
|
+
}
|
|
6591
|
+
interface UpdateResult {
|
|
6592
|
+
readonly success: boolean;
|
|
6593
|
+
readonly version: string;
|
|
6594
|
+
readonly requiresRestart: boolean;
|
|
6595
|
+
readonly error?: string;
|
|
6596
|
+
}
|
|
6597
|
+
interface DetectorDetails {
|
|
6598
|
+
id: string;
|
|
6599
|
+
name: string;
|
|
6600
|
+
models: Array<{
|
|
6601
|
+
id: string;
|
|
6602
|
+
name: string;
|
|
6603
|
+
inputSize?: {
|
|
6604
|
+
width: number;
|
|
6605
|
+
height: number;
|
|
6606
|
+
};
|
|
6607
|
+
}>;
|
|
6608
|
+
runtimes: Array<{
|
|
6609
|
+
value: string;
|
|
6610
|
+
label: string;
|
|
6611
|
+
}>;
|
|
6612
|
+
backends: Array<{
|
|
6613
|
+
value: string;
|
|
6614
|
+
label: string;
|
|
6615
|
+
}>;
|
|
6616
|
+
defaultConfig: Record<string, unknown> | null;
|
|
6617
|
+
}
|
|
6618
|
+
|
|
6619
|
+
/**
|
|
6620
|
+
* System settings UI schemas — the single source of truth for all settings sections.
|
|
6621
|
+
*
|
|
6622
|
+
* These are defined in @camstack/types so that:
|
|
6623
|
+
* - The backend can serve them via API
|
|
6624
|
+
* - Addons can reference/extend them
|
|
6625
|
+
* - The frontend fetches them at runtime (no hardcoded duplication)
|
|
6626
|
+
*
|
|
6627
|
+
* Values are stored in the SQL system_settings table, not config.yaml.
|
|
6628
|
+
* Only `server` is read-only (loaded from config.yaml at bootstrap).
|
|
6629
|
+
*/
|
|
6630
|
+
|
|
6631
|
+
type SystemSettingsSection = 'server' | 'auth' | 'features' | 'storage' | 'logging' | 'addons' | 'recording' | 'streaming' | 'ffmpeg' | 'detection' | 'backup' | 'retention';
|
|
6632
|
+
/** Sections where fields are read-only (bootstrap from config.yaml). */
|
|
6633
|
+
declare const READ_ONLY_SECTIONS: ReadonlySet<SystemSettingsSection>;
|
|
6634
|
+
interface SettingsTabDef {
|
|
6635
|
+
readonly id: SystemSettingsSection;
|
|
6636
|
+
readonly label: string;
|
|
6637
|
+
}
|
|
6638
|
+
declare const SETTINGS_TABS: readonly SettingsTabDef[];
|
|
6639
|
+
declare const SYSTEM_SETTINGS_SCHEMAS: Readonly<Record<SystemSettingsSection, ConfigUISchema>>;
|
|
6640
|
+
/**
|
|
6641
|
+
* Get the UI schema for a settings section.
|
|
6642
|
+
* Returns undefined for unknown sections.
|
|
6643
|
+
*/
|
|
6644
|
+
declare function getSystemSettingsSchema(section: string): ConfigUISchema | undefined;
|
|
6645
|
+
|
|
3041
6646
|
declare const HF_REPO = "camstack/camstack-models";
|
|
3042
6647
|
declare const HF_BASE_URL = "https://huggingface.co/camstack/camstack-models/resolve/main";
|
|
3043
6648
|
|
|
@@ -3050,4 +6655,48 @@ declare const COCO_80_LABELS: readonly LabelDefinition[];
|
|
|
3050
6655
|
declare const MACRO_LABELS: readonly LabelDefinition[];
|
|
3051
6656
|
declare const COCO_TO_MACRO: ClassMapDefinition;
|
|
3052
6657
|
|
|
3053
|
-
|
|
6658
|
+
/**
|
|
6659
|
+
* Motion detection configuration per camera.
|
|
6660
|
+
* Motion is a pipeline TRIGGER, not a pipeline step.
|
|
6661
|
+
*/
|
|
6662
|
+
interface CameraMotionConfig {
|
|
6663
|
+
/** 'stream' = frame-diff analysis on decoded frames (default)
|
|
6664
|
+
* 'onboarded' = use camera's native motion signal via IMotionSensor capability
|
|
6665
|
+
* 'smart' = AI-based motion detection */
|
|
6666
|
+
readonly source: 'stream' | 'onboarded' | 'smart';
|
|
6667
|
+
/** Frame-diff settings (only used when source='stream') */
|
|
6668
|
+
readonly threshold?: number;
|
|
6669
|
+
readonly minArea?: number;
|
|
6670
|
+
}
|
|
6671
|
+
/**
|
|
6672
|
+
* Camera native AI detection configuration.
|
|
6673
|
+
* These events are emitted for recording/notifications, NOT for inference pipeline.
|
|
6674
|
+
* Uses the IObjectDetector device capability to receive detection events.
|
|
6675
|
+
*/
|
|
6676
|
+
interface CameraNativeDetectionConfig {
|
|
6677
|
+
/** Whether to listen for the camera's native AI events */
|
|
6678
|
+
readonly enabled: boolean;
|
|
6679
|
+
/** Source identifier for attribution */
|
|
6680
|
+
readonly source: string;
|
|
6681
|
+
/** Classes the camera reports natively */
|
|
6682
|
+
readonly classes: readonly string[];
|
|
6683
|
+
}
|
|
6684
|
+
/**
|
|
6685
|
+
* Combined camera detection capabilities config.
|
|
6686
|
+
*/
|
|
6687
|
+
interface CameraDetectionCapabilities {
|
|
6688
|
+
readonly motion: CameraMotionConfig;
|
|
6689
|
+
readonly nativeDetection?: CameraNativeDetectionConfig;
|
|
6690
|
+
}
|
|
6691
|
+
|
|
6692
|
+
declare enum DeviceType {
|
|
6693
|
+
Camera = "camera"
|
|
6694
|
+
}
|
|
6695
|
+
interface DeviceTypeInfo {
|
|
6696
|
+
readonly type: DeviceType;
|
|
6697
|
+
readonly label: string;
|
|
6698
|
+
readonly icon: string;
|
|
6699
|
+
}
|
|
6700
|
+
declare const DEVICE_TYPE_INFO: Record<DeviceType, DeviceTypeInfo>;
|
|
6701
|
+
|
|
6702
|
+
export { type AccessoryInfo, type AccuracyStats, type ActiveDetection, type AddonCapability, type AddonCapabilityInfo, type AddonContext, type AddonDeclaration, type AddonFileLocationName, type AddonHttpReply, type AddonHttpRequest, type AddonLocationPaths, type AddonManifest, type AddonPackageManifest, type AddonPageDeclaration, type AddonPageInfo, type AddonStorageLocationName, type AddonStorageLocations, type AddonStructuredLocationName, type AgentBenchmarkStatus, type AgentCapability, type AgentEntry, type AgentInfo, type AgentRegistrationInfo, type AgentResources, type AgentRuntimeStatus, type AgentStatus, type AgentTask, type AgentTaskResult, type AgentToHubMessage, type AnalysisContext, type AnalysisEvent, type AnalysisEventType, type AnnotatedSnapshotResult, type ApiKeyRecord, type AppRouter, type AudioChunk, type AudioChunkCallback, type AudioChunkInput, type AudioClassification, type AudioEvent, type AuthResult, type AuthenticatedUser, BINARY_FRAME_HEADER_SIZE, BINARY_FRAME_TYPE, type BackendInfo, type BackupManifest, type BenchmarkConfig, type BenchmarkDownloadResult, type BenchmarkExecution, type BenchmarkMode, type BenchmarkPhase, type BenchmarkProgress, type BenchmarkReport, type BenchmarkResult, type BenchmarkSource, type BenchmarkStreamEvent, type BenchmarkTarget, type BenchmarkTargetResult, type BoundingBox, type BrokerStats, type BrokerStatus, COCO_80_LABELS, COCO_TO_MACRO, type CameraAnalysisConfig, type CameraDetectionCapabilities, type CameraDetectionConfig, type CameraLiveState, type CameraMetrics, type CameraMotionConfig, type CameraNativeDetectionConfig, type CameraPhase, type CameraPriority, type CameraRoleAssignment, type CameraZone, type CameraZoneConfig, type CamstackContext, type CapabilityBinding, type CapabilityConsumerRegistration, type CapabilityDeclaration, type CapabilityInfo, type CapabilityMode, type CapabilityProviderMap, type ClassMapDefinition, type Classification, type ClassifierOutput, type ClientNetworkStats, type ClipRecognizer, type ConfigBooleanField, type ConfigColorField, type ConfigCondition, type ConfigField, type ConfigFieldBase, type ConfigGroupField, type ConfigInfoField, type ConfigModelSelectorField, type ConfigMultiSelectField, type ConfigNumberField, type ConfigOption, type ConfigPasswordField, type ConfigSection, type ConfigSelectField, type ConfigSeparatorField, type ConfigSliderField, type ConfigStorageLocationField, type ConfigTagsField, type ConfigTextAreaField, type ConfigTextField, type ConfigUISchema, type ConnectionMode, type CropInput, type CropperOutput, type CustomModelMetadata, DEFAULT_FEATURES, DEFAULT_LOCATION_SUBDIRS, DEFAULT_LOCATION_SUBPATHS, DEFAULT_RETENTION, DETECTION_TYPES, DEVICE_TYPE_INFO, type DecodeOptions, type DecodedAudioChunk, type DecodedFrame, type DecoderSessionConfig, type DecoderStats, type Detection, type DetectionDevice, type DetectionEvent, type DetectionEventType, type DetectionFrame, type DetectionLine, type DetectionModel, type DetectionResult, type DetectionRuntime, type DetectionType, type DetectionZone, type DetectionZoneMembership, type DetectorDetails, type DetectorOutput, type DeviceCapabilityBinding, type DeviceCapabilityName, type DeviceEvent, type DeviceMetadata, type DeviceNetworkStats, type DeviceState, type DeviceStoredEvent, DeviceType, type DeviceTypeInfo, type DiscoveredDevice, type DoorbellEvent, type ElementState, type ElementStatus, type EmbeddingFilter, type EmbeddingMetadata, type EncodedPacket, type EndpointCapabilities, type EngineConfig, type EventBufferStatus, type EventCluster, type EventFilter, type EventQuery, type EventQueryResult, type EventSnapshot, type EventSource, type ExposedResourceRequest, type ExposedResourceResponse, type ExposedResourceType, type FeatureFlag, type FeatureManifest, type FfmpegConfig, type FrameInput, type FrameSubscriptionOptions, type GlobalIdentity, type GpuInfo, type GroundTruth, type GroundTruthAnnotation, HF_BASE_URL, HF_REPO, type HardwareInfo, type HeatmapData, type HeatmapOptions, type HistoryEntry, type HttpMethod, type HubToAgentMessage, type IAccessory, type IAddonFileStorage, type IAddonHttpRoute, type IAddonModelManager, type IAddonPageProvider, type IAddonProcessManager, type IAddonRouteProvider, type IAddonRouter, type IAddonStructuredStorage, type IAddonTranslationProvider, type IAdminUI, type IAdvancedNotifier, type IAnalysisAddon, type IAnalysisDataPersistence, type IAnalysisPipeline, type IAnalysisStage, type IAudioClassifier, type IAudioDetector, type IAuthProvider, type ICamera, type ICameraAnalyticsProvider, type ICameraNativeDetection, type ICameraPipeline, type ICamstackAddon, type IClassFilterStage, type IClassifierProvider, type IConfigurable, type ICropperProvider, type IDecoderProvider, type IDecoderSession, type IDetectionAddon, type IDetectorProvider, type IDevice, type IDeviceCapability, type IDeviceProvider, type IDoorbell, type IElementConfig, type IEmbeddingsBackend, type IEventBus, type IEventGenerationStage, type IEventPersistence, type IEvents, type IExposedResource, type IFaceDetector, type IFaceRecognizer, type IFileStorage, type IInferenceEngine, type IKnownFaceRepository, type IKnownFaces, type IKnownPlateRepository, type ILifecycleManaged, type ILogDestination, type IManagedSubProcess, type IModelCatalogProvider, type IMotionSensor, type INetworkAccessProvider, type INetworkEndpoint, type INetworkProvider, type INetworkQualityTracker, type INotificationOutput, type IObjectDetector, type IObjectSnapshotStage, type IPanTiltZoom, type IPipelineConsumer, type IPipelineManager, type IPipelineRunner, type IPipelineSlotProvider, type IPipelineValidator, type IPlateDetector, type IPlateRecognizer, type IProcessManager, type IProviderConnectionTester, type IPythonEnvironment, type IRecognitionStage, type IRecognizer, type IRecording, type IRecordingAddon, type IRecordingCoordinator, type IRecordingDb, type IRefinerProvider, type IRemoteAccessProvider, type IReplEngine, type IResourceExposer, type IRestreamer, type IRetention, type ISceneIntelligence, type IScopedLogger, type ISessionTracker, type ISettingsBackend, type ISiren, type IStatusLight, type IStorageBackend, type IStorageLocation, type IStorageProvider, type IStreamBroker, type IStreamBrokerManager, type IStreamSourceAdapter, type IStreamingEngine, type IStructuredStorage, type ISubDetectionStage, type ISubDetector, type ISwitch, type ITaskHandler, type IToastService, type ITrackTrail, type ITrackerStage, type ITurnProvider, type ITwoWayAudio, type IVectorIndex, type IWebRtcProvider, type IZoneAnalysisStage, type IZoneRepository, type InferenceCapabilities, type InstalledPackage, type KnownAudioEvent, type KnownFace, type KnownFaceEntry, type KnownPlate, type LabelData, type LabelDefinition, type LabelOrigin, type Landmark, type LatencyStats, type LiveEvent, type LogEntry, type LogFilter, type LogLevel, type LoggerFactory, MACRO_LABELS, type MainToWorkerMessage, type ManagedProcessStatus, type ModelAvailability, type ModelCatalogEntry, type ModelDownloadOptions, type ModelDownloadProgress, type ModelDownloadResult, type ModelExtraFile, type ModelFormat$1 as ModelFormat, type ModelFormatEntry, type ModelFormatStatus, type ModelOutputFormat, type ModelRequirement, type MotionSource, type MultiBenchmarkReport, type NativeDetectionEvent, type NetworkAccessStatus, type NetworkAddress, type NodeRuntimeInfo, type NormalizedSource, type Notification, type NotificationHistoryEntry, type NotificationHistoryFilter, type NotificationRule, type NotificationTestResult, type NpuInfo, type ObjectSnapshotResult, type ObjectState, type OrchestratorMetrics, type PackageUpdate, type PersistableEvent, type PipelineAddonSchema, type PipelineConfig, type PipelineDefaultStep, type PipelineDetection, type PipelineModelOption, type PipelineNode, type PipelineOutputFormat, type PipelineOutputStream, type PipelineProgressEvent, type PipelineResult, type PipelineRunResult, type PipelineSchema, type PipelineSlot, type PipelineSlotSchema, type PipelineStatus, type PipelineStatusInfo, type PipelineStepTiming, type PipelineTemplate, type PipelineTemplateStep, type PlatformCapabilities, type PlatformScore, type ProbeCapability, type ProbeResult, type ProcessConfig, type ProcessStats, type ProviderListItem, type ProviderStatus, type PtzPreset, type PublicAddress, type PythonBackendInfo, type PythonEnvReady, type PythonProbeResult, type PythonRuntimeInfo, type QueryFilter, READ_ONLY_SECTIONS, RECOGNITION_TYPES, type RecognitionResult, type RecognitionType, type RecordingSegment, type RecordingSegmentInfo, type RefinerOutput, type RegisteredStream, type RemoteAccessStatus, type RemoteBenchmarkConfig, type ReplContext, type ReplResult, type ReplScope, type RequiredStep, type ResolveEngineOptions, type ResolvedInferenceConfig, type ResourceAuthMode, type ResourceStats, type RestreamerExposedResource, type RetentionConfig, type RetentionReport, type RolePriority, type RouteAccess, type RouteHandler, type RouteRequest, type RouteResponse, type RuntimeCapabilities, SETTINGS_TABS, STORAGE_LOCATION_TYPES, SUB_DETECTION_TYPES, SYSTEM_SETTINGS_SCHEMAS, type SceneStateResult, type ScopedToken, type ServerModelCatalogEntry, type ModelType as ServerModelType, type ServerTrackedDetection, type SessionTrack, type SettingsCollection, type SettingsRecord, type SettingsTabDef, type SourceAdapterStatus, type SourceCapabilities, type SpatialDetection, type StepError, type StepResult, type StorageConfig, type StorageLocationConfig, type StorageLocationName, type StorageLocationType, type StorageRecord, type StreamFormat, type StreamInfo, type StreamNetworkStats, type StreamOption, type StreamSource, type StreamSourceOption, type StreamStatus, type StreamingSource, type SubDetection, type SubDetectionType, type SubProcessConfig, type SubProcessInfo, type SystemEvent, type SystemInfo, type SystemSettingsSection, type TaskContext, type TaskDispatchOptions, type TaskHandlerSecurity, type TaskProgress, type TemplateValidationResult, type TestConnectionResult, type TimeRange, type TimeRangeOptions, type Toast, type TokenPayload, type TokenScope, type TrackCaptureConfig, type TrackDetail, type TrackEventType, type TrackFilter, type TrackMediaFile, type TrackMediaType, type TrackPosition, type TrackSnapshot, type TrackTrail, type TrackedDetection, type TrackedObjectState, type TrackedObjectSummary, type TrackingInfo, type TranslationBundle, type TranslationMap, type TurnCredentials, type TurnServer, type Unsubscribe, type UpdateResult, type UserPermissions, type UserRecord, type UserRole, type ValidationIssue, type ValidationResult, type VectorEntry, type VectorSearchResult, type VideoFrame, type VideoFrameCallback, type WorkerInfo, type WorkerProcessStats, type WorkerState, type WorkerToMainMessage, type ZoneDefinition, type ZoneEvent, type ZoneHistoryPoint, type ZoneLiveState, type ZoneMode, cosineSimilarity, createAnalysisContext, enrichContext, getSystemSettingsSchema, hfModelUrl, resolveTranslation };
|