@camstack/types 1.2.63 → 1.2.65

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.
@@ -136,16 +136,26 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
136
136
  }>>;
137
137
  systemEvent: z.ZodOptional<z.ZodObject<{
138
138
  kinds: z.ZodArray<z.ZodEnum<{
139
- "camera-online": "camera-online";
140
- "camera-offline": "camera-offline";
139
+ "device-online": "device-online";
140
+ "device-offline": "device-offline";
141
+ "device-disabled": "device-disabled";
142
+ "device-enabled": "device-enabled";
141
143
  "stream-online": "stream-online";
142
144
  "stream-offline": "stream-offline";
143
145
  "node-online": "node-online";
144
146
  "node-offline": "node-offline";
145
147
  "addon-update-available": "addon-update-available";
146
148
  "server-update-available": "server-update-available";
149
+ "alarm-triggered": "alarm-triggered";
150
+ "alarm-armed": "alarm-armed";
151
+ "alarm-disarmed": "alarm-disarmed";
152
+ "camera-online": "camera-online";
153
+ "camera-offline": "camera-offline";
154
+ "camera-disabled": "camera-disabled";
155
+ "camera-enabled": "camera-enabled";
147
156
  }>>;
148
157
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
158
+ deviceTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
149
159
  nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
150
160
  packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
151
161
  }, z.core.$strip>>;
@@ -168,6 +178,12 @@ export declare const OsdSlotBindingSchema: z.ZodObject<{
168
178
  count: z.ZodDefault<z.ZodNumber>;
169
179
  sustainSeconds: z.ZodDefault<z.ZodNumber>;
170
180
  }, z.core.$strip>>;
181
+ audio: z.ZodOptional<z.ZodObject<{
182
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
183
+ dbThreshold: z.ZodOptional<z.ZodNumber>;
184
+ hitPercent: z.ZodDefault<z.ZodNumber>;
185
+ samplingSeconds: z.ZodDefault<z.ZodNumber>;
186
+ }, z.core.$strip>>;
171
187
  }, z.core.$strip>>;
172
188
  fallbackText: z.ZodDefault<z.ZodString>;
173
189
  }, z.core.$strip>;
@@ -266,16 +282,26 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
266
282
  }>>;
267
283
  systemEvent: z.ZodOptional<z.ZodObject<{
268
284
  kinds: z.ZodArray<z.ZodEnum<{
269
- "camera-online": "camera-online";
270
- "camera-offline": "camera-offline";
285
+ "device-online": "device-online";
286
+ "device-offline": "device-offline";
287
+ "device-disabled": "device-disabled";
288
+ "device-enabled": "device-enabled";
271
289
  "stream-online": "stream-online";
272
290
  "stream-offline": "stream-offline";
273
291
  "node-online": "node-online";
274
292
  "node-offline": "node-offline";
275
293
  "addon-update-available": "addon-update-available";
276
294
  "server-update-available": "server-update-available";
295
+ "alarm-triggered": "alarm-triggered";
296
+ "alarm-armed": "alarm-armed";
297
+ "alarm-disarmed": "alarm-disarmed";
298
+ "camera-online": "camera-online";
299
+ "camera-offline": "camera-offline";
300
+ "camera-disabled": "camera-disabled";
301
+ "camera-enabled": "camera-enabled";
277
302
  }>>;
278
303
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
304
+ deviceTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
279
305
  nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
280
306
  packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
281
307
  }, z.core.$strip>>;
@@ -298,6 +324,12 @@ export declare const OsdSlotViewSchema: z.ZodObject<{
298
324
  count: z.ZodDefault<z.ZodNumber>;
299
325
  sustainSeconds: z.ZodDefault<z.ZodNumber>;
300
326
  }, z.core.$strip>>;
327
+ audio: z.ZodOptional<z.ZodObject<{
328
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
329
+ dbThreshold: z.ZodOptional<z.ZodNumber>;
330
+ hitPercent: z.ZodDefault<z.ZodNumber>;
331
+ samplingSeconds: z.ZodDefault<z.ZodNumber>;
332
+ }, z.core.$strip>>;
301
333
  }, z.core.$strip>>;
302
334
  fallbackText: z.ZodDefault<z.ZodString>;
303
335
  }, z.core.$strip>>;
@@ -468,16 +500,26 @@ export declare const osdManagerCapability: {
468
500
  }>>;
469
501
  systemEvent: z.ZodOptional<z.ZodObject<{
470
502
  kinds: z.ZodArray<z.ZodEnum<{
471
- "camera-online": "camera-online";
472
- "camera-offline": "camera-offline";
503
+ "device-online": "device-online";
504
+ "device-offline": "device-offline";
505
+ "device-disabled": "device-disabled";
506
+ "device-enabled": "device-enabled";
473
507
  "stream-online": "stream-online";
474
508
  "stream-offline": "stream-offline";
475
509
  "node-online": "node-online";
476
510
  "node-offline": "node-offline";
477
511
  "addon-update-available": "addon-update-available";
478
512
  "server-update-available": "server-update-available";
513
+ "alarm-triggered": "alarm-triggered";
514
+ "alarm-armed": "alarm-armed";
515
+ "alarm-disarmed": "alarm-disarmed";
516
+ "camera-online": "camera-online";
517
+ "camera-offline": "camera-offline";
518
+ "camera-disabled": "camera-disabled";
519
+ "camera-enabled": "camera-enabled";
479
520
  }>>;
480
521
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
522
+ deviceTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
481
523
  nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
482
524
  packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
483
525
  }, z.core.$strip>>;
@@ -500,6 +542,12 @@ export declare const osdManagerCapability: {
500
542
  count: z.ZodDefault<z.ZodNumber>;
501
543
  sustainSeconds: z.ZodDefault<z.ZodNumber>;
502
544
  }, z.core.$strip>>;
545
+ audio: z.ZodOptional<z.ZodObject<{
546
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
547
+ dbThreshold: z.ZodOptional<z.ZodNumber>;
548
+ hitPercent: z.ZodDefault<z.ZodNumber>;
549
+ samplingSeconds: z.ZodDefault<z.ZodNumber>;
550
+ }, z.core.$strip>>;
503
551
  }, z.core.$strip>>;
504
552
  fallbackText: z.ZodDefault<z.ZodString>;
505
553
  }, z.core.$strip>>;
@@ -684,16 +732,26 @@ export declare const osdManagerCapability: {
684
732
  }>>;
685
733
  systemEvent: z.ZodOptional<z.ZodObject<{
686
734
  kinds: z.ZodArray<z.ZodEnum<{
687
- "camera-online": "camera-online";
688
- "camera-offline": "camera-offline";
735
+ "device-online": "device-online";
736
+ "device-offline": "device-offline";
737
+ "device-disabled": "device-disabled";
738
+ "device-enabled": "device-enabled";
689
739
  "stream-online": "stream-online";
690
740
  "stream-offline": "stream-offline";
691
741
  "node-online": "node-online";
692
742
  "node-offline": "node-offline";
693
743
  "addon-update-available": "addon-update-available";
694
744
  "server-update-available": "server-update-available";
745
+ "alarm-triggered": "alarm-triggered";
746
+ "alarm-armed": "alarm-armed";
747
+ "alarm-disarmed": "alarm-disarmed";
748
+ "camera-online": "camera-online";
749
+ "camera-offline": "camera-offline";
750
+ "camera-disabled": "camera-disabled";
751
+ "camera-enabled": "camera-enabled";
695
752
  }>>;
696
753
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
754
+ deviceTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
697
755
  nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
698
756
  packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
699
757
  }, z.core.$strip>>;
@@ -716,6 +774,12 @@ export declare const osdManagerCapability: {
716
774
  count: z.ZodDefault<z.ZodNumber>;
717
775
  sustainSeconds: z.ZodDefault<z.ZodNumber>;
718
776
  }, z.core.$strip>>;
777
+ audio: z.ZodOptional<z.ZodObject<{
778
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
779
+ dbThreshold: z.ZodOptional<z.ZodNumber>;
780
+ hitPercent: z.ZodDefault<z.ZodNumber>;
781
+ samplingSeconds: z.ZodDefault<z.ZodNumber>;
782
+ }, z.core.$strip>>;
719
783
  }, z.core.$strip>>;
720
784
  fallbackText: z.ZodDefault<z.ZodString>;
721
785
  }, z.core.$strip>;
@@ -813,16 +877,26 @@ export declare const osdManagerCapability: {
813
877
  }>>;
814
878
  systemEvent: z.ZodOptional<z.ZodObject<{
815
879
  kinds: z.ZodArray<z.ZodEnum<{
816
- "camera-online": "camera-online";
817
- "camera-offline": "camera-offline";
880
+ "device-online": "device-online";
881
+ "device-offline": "device-offline";
882
+ "device-disabled": "device-disabled";
883
+ "device-enabled": "device-enabled";
818
884
  "stream-online": "stream-online";
819
885
  "stream-offline": "stream-offline";
820
886
  "node-online": "node-online";
821
887
  "node-offline": "node-offline";
822
888
  "addon-update-available": "addon-update-available";
823
889
  "server-update-available": "server-update-available";
890
+ "alarm-triggered": "alarm-triggered";
891
+ "alarm-armed": "alarm-armed";
892
+ "alarm-disarmed": "alarm-disarmed";
893
+ "camera-online": "camera-online";
894
+ "camera-offline": "camera-offline";
895
+ "camera-disabled": "camera-disabled";
896
+ "camera-enabled": "camera-enabled";
824
897
  }>>;
825
898
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
899
+ deviceTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
826
900
  nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
827
901
  packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
828
902
  }, z.core.$strip>>;
@@ -845,6 +919,12 @@ export declare const osdManagerCapability: {
845
919
  count: z.ZodDefault<z.ZodNumber>;
846
920
  sustainSeconds: z.ZodDefault<z.ZodNumber>;
847
921
  }, z.core.$strip>>;
922
+ audio: z.ZodOptional<z.ZodObject<{
923
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
924
+ dbThreshold: z.ZodOptional<z.ZodNumber>;
925
+ hitPercent: z.ZodDefault<z.ZodNumber>;
926
+ samplingSeconds: z.ZodDefault<z.ZodNumber>;
927
+ }, z.core.$strip>>;
848
928
  }, z.core.$strip>>;
849
929
  fallbackText: z.ZodDefault<z.ZodString>;
850
930
  }, z.core.$strip>>;
@@ -974,16 +1054,26 @@ export declare const osdManagerCapability: {
974
1054
  }>>;
975
1055
  systemEvent: z.ZodOptional<z.ZodObject<{
976
1056
  kinds: z.ZodArray<z.ZodEnum<{
977
- "camera-online": "camera-online";
978
- "camera-offline": "camera-offline";
1057
+ "device-online": "device-online";
1058
+ "device-offline": "device-offline";
1059
+ "device-disabled": "device-disabled";
1060
+ "device-enabled": "device-enabled";
979
1061
  "stream-online": "stream-online";
980
1062
  "stream-offline": "stream-offline";
981
1063
  "node-online": "node-online";
982
1064
  "node-offline": "node-offline";
983
1065
  "addon-update-available": "addon-update-available";
984
1066
  "server-update-available": "server-update-available";
1067
+ "alarm-triggered": "alarm-triggered";
1068
+ "alarm-armed": "alarm-armed";
1069
+ "alarm-disarmed": "alarm-disarmed";
1070
+ "camera-online": "camera-online";
1071
+ "camera-offline": "camera-offline";
1072
+ "camera-disabled": "camera-disabled";
1073
+ "camera-enabled": "camera-enabled";
985
1074
  }>>;
986
1075
  deviceIds: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1076
+ deviceTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
987
1077
  nodeIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
988
1078
  packageNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
989
1079
  }, z.core.$strip>>;
@@ -1006,6 +1096,12 @@ export declare const osdManagerCapability: {
1006
1096
  count: z.ZodDefault<z.ZodNumber>;
1007
1097
  sustainSeconds: z.ZodDefault<z.ZodNumber>;
1008
1098
  }, z.core.$strip>>;
1099
+ audio: z.ZodOptional<z.ZodObject<{
1100
+ labels: z.ZodOptional<z.ZodArray<z.ZodString>>;
1101
+ dbThreshold: z.ZodOptional<z.ZodNumber>;
1102
+ hitPercent: z.ZodDefault<z.ZodNumber>;
1103
+ samplingSeconds: z.ZodDefault<z.ZodNumber>;
1104
+ }, z.core.$strip>>;
1009
1105
  }, z.core.$strip>>;
1010
1106
  fallbackText: z.ZodDefault<z.ZodString>;
1011
1107
  }, z.core.$strip>>;
@@ -2174,6 +2174,7 @@ export declare const pipelineAnalyticsCapability: {
2174
2174
  }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
2175
2175
  jobId: z.ZodString;
2176
2176
  state: z.ZodEnum<{
2177
+ queued: "queued";
2177
2178
  done: "done";
2178
2179
  failed: "failed";
2179
2180
  running: "running";
@@ -17,13 +17,24 @@ import { type InferProvider } from './capability-definition.js';
17
17
  /** Playback-speed multiplier for the render (1 = realtime). */
18
18
  export declare const ExportSpeedSchema: z.ZodNumber;
19
19
  /**
20
- * One dense interval, in SECONDS FROM THE EXPORT'S OWN `fromMs`.
20
+ * One dense interval, in WALL-CLOCK SECONDS FROM THE EXPORT'S OWN `fromMs`.
21
21
  *
22
- * Relative and not absolute epoch on purpose: the renderer's frame-select
23
- * expression sees ffmpeg's `t`, which starts at 0 for the export's source
24
- * playlist. Handing it absolute epochs would make every call site responsible
25
- * for the same subtraction, and the one that forgot would emit a filter that
26
- * selects nothing silently, as a uniform timelapse.
22
+ * **Wall clock, not ffmpeg's `t`** and the recorder translates. A caller
23
+ * derives these bounds from things that happened at a TIME (a track's
24
+ * `firstSeen`), while `t` runs over the source playlist: the concatenation of
25
+ * every segment present for the range, with each recording GAP removed. The
26
+ * two agree only on a window that recorded without one interruption, and only
27
+ * the render side knows the segments, so the translation lives there
28
+ * (`export-dense-map.ts`, addon-pipeline).
29
+ *
30
+ * It was not always so. These seconds were fed to `between(t,…)` verbatim, and
31
+ * on a 10 h window holding 29,393 s of footage every range landed late by the
32
+ * gap accumulated before it — up to 6,607 s, well past EOF. Nothing matched,
33
+ * the video was a uniform timelapse, and the log line reported the five ranges
34
+ * that had been ASKED for (2026-08-13, export `57d14363`, camera 615).
35
+ *
36
+ * Relative and not absolute epoch, because an absolute epoch would make every
37
+ * call site responsible for the same subtraction.
27
38
  */
28
39
  export declare const ExportDenseRangeSchema: z.ZodObject<{
29
40
  fromSec: z.ZodNumber;
@@ -53,6 +53,7 @@ export type RecordingManifest = z.infer<typeof RecordingManifestSchema>;
53
53
  export declare const RecordingDeviceUsageSchema: z.ZodObject<{
54
54
  deviceId: z.ZodNumber;
55
55
  usedBytes: z.ZodNumber;
56
+ oldestMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
56
57
  }, z.core.$strip>;
57
58
  export type RecordingDeviceUsage = z.infer<typeof RecordingDeviceUsageSchema>;
58
59
  /** Recording storage usage + capacity for one storage location. */
@@ -73,6 +74,7 @@ export declare const RecordingStorageUsageSchema: z.ZodObject<{
73
74
  devices: z.ZodArray<z.ZodObject<{
74
75
  deviceId: z.ZodNumber;
75
76
  usedBytes: z.ZodNumber;
77
+ oldestMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
76
78
  }, z.core.$strip>>;
77
79
  locations: z.ZodArray<z.ZodObject<{
78
80
  locationId: z.ZodNullable<z.ZodString>;
@@ -83,6 +85,82 @@ export declare const RecordingStorageUsageSchema: z.ZodObject<{
83
85
  }, z.core.$strip>>;
84
86
  }, z.core.$strip>;
85
87
  export type RecordingStorageUsage = z.infer<typeof RecordingStorageUsageSchema>;
88
+ /**
89
+ * The OPERATOR-ARMED half of multi-location recordings (D116).
90
+ *
91
+ * The placement plan decides where NEW writes go and moves nothing. A rebalance
92
+ * is the operator asking for the EXISTING archive to be brought into line with
93
+ * that plan: one relocate job per (camera, profile) pile that sits on the wrong
94
+ * location, run FIFO behind the single-flight mover.
95
+ *
96
+ * `plan…` and `start…` return the SAME shape deliberately — what the operator
97
+ * confirms is exactly what gets enqueued, and `jobIds` is the only difference
98
+ * (empty on the plan).
99
+ */
100
+ export declare const RecordingRebalanceMoveSchema: z.ZodObject<{
101
+ deviceId: z.ZodNumber;
102
+ profile: z.ZodString;
103
+ fromLocationId: z.ZodString;
104
+ toLocationId: z.ZodString;
105
+ bytes: z.ZodNumber;
106
+ files: z.ZodNumber;
107
+ }, z.core.$strip>;
108
+ export type RecordingRebalanceMove = z.infer<typeof RecordingRebalanceMoveSchema>;
109
+ /** Why a pile that is out of place is staying there. Every refusal is
110
+ * reported: a rebalance that silently drops a camera reads exactly like one
111
+ * that had nothing to do. */
112
+ export declare const RecordingRebalanceSkipReasonSchema: z.ZodEnum<{
113
+ "below-threshold": "below-threshold";
114
+ unassigned: "unassigned";
115
+ "target-not-writable": "target-not-writable";
116
+ "no-headroom": "no-headroom";
117
+ }>;
118
+ export type RecordingRebalanceSkipReason = z.infer<typeof RecordingRebalanceSkipReasonSchema>;
119
+ export declare const RecordingRebalanceSkipSchema: z.ZodObject<{
120
+ deviceId: z.ZodNumber;
121
+ profile: z.ZodString;
122
+ fromLocationId: z.ZodString;
123
+ toLocationId: z.ZodNullable<z.ZodString>;
124
+ bytes: z.ZodNumber;
125
+ reason: z.ZodEnum<{
126
+ "below-threshold": "below-threshold";
127
+ unassigned: "unassigned";
128
+ "target-not-writable": "target-not-writable";
129
+ "no-headroom": "no-headroom";
130
+ }>;
131
+ }, z.core.$strip>;
132
+ export type RecordingRebalanceSkip = z.infer<typeof RecordingRebalanceSkipSchema>;
133
+ export declare const RecordingRebalancePlanSchema: z.ZodObject<{
134
+ moves: z.ZodArray<z.ZodObject<{
135
+ deviceId: z.ZodNumber;
136
+ profile: z.ZodString;
137
+ fromLocationId: z.ZodString;
138
+ toLocationId: z.ZodString;
139
+ bytes: z.ZodNumber;
140
+ files: z.ZodNumber;
141
+ }, z.core.$strip>>;
142
+ skipped: z.ZodArray<z.ZodObject<{
143
+ deviceId: z.ZodNumber;
144
+ profile: z.ZodString;
145
+ fromLocationId: z.ZodString;
146
+ toLocationId: z.ZodNullable<z.ZodString>;
147
+ bytes: z.ZodNumber;
148
+ reason: z.ZodEnum<{
149
+ "below-threshold": "below-threshold";
150
+ unassigned: "unassigned";
151
+ "target-not-writable": "target-not-writable";
152
+ "no-headroom": "no-headroom";
153
+ }>;
154
+ }, z.core.$strip>>;
155
+ bytesToMove: z.ZodNumber;
156
+ jobIds: z.ZodArray<z.ZodString>;
157
+ }, z.core.$strip>;
158
+ export type RecordingRebalancePlan = z.infer<typeof RecordingRebalancePlanSchema>;
159
+ export declare const RecordingRebalanceInputSchema: z.ZodObject<{
160
+ throttleMbps: z.ZodOptional<z.ZodNumber>;
161
+ minMoveGb: z.ZodOptional<z.ZodNumber>;
162
+ }, z.core.$strip>;
163
+ export type RecordingRebalanceInput = z.infer<typeof RecordingRebalanceInputSchema>;
86
164
  /**
87
165
  * Result of locating footage at a wall-clock instant for one device/profile.
88
166
  * `segment` carries the covering segment's window; `gap` reports the forward
@@ -183,6 +261,7 @@ export declare const recordingCapability: {
183
261
  devices: z.ZodArray<z.ZodObject<{
184
262
  deviceId: z.ZodNumber;
185
263
  usedBytes: z.ZodNumber;
264
+ oldestMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
186
265
  }, z.core.$strip>>;
187
266
  locations: z.ZodArray<z.ZodObject<{
188
267
  locationId: z.ZodNullable<z.ZodString>;
@@ -512,6 +591,8 @@ export declare const recordingCapability: {
512
591
  recordings: "recordings";
513
592
  recordingsLow: "recordingsLow";
514
593
  }>>;
594
+ deviceId: z.ZodOptional<z.ZodNumber>;
595
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
515
596
  throttleMbps: z.ZodOptional<z.ZodNumber>;
516
597
  leaseId: z.ZodString;
517
598
  }, z.core.$strip>, z.ZodObject<{
@@ -522,6 +603,7 @@ export declare const recordingCapability: {
522
603
  }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
523
604
  jobId: z.ZodString;
524
605
  state: z.ZodEnum<{
606
+ queued: "queued";
525
607
  done: "done";
526
608
  failed: "failed";
527
609
  running: "running";
@@ -543,6 +625,113 @@ export declare const recordingCapability: {
543
625
  }, z.core.$strip>, z.ZodObject<{
544
626
  cancelled: z.ZodBoolean;
545
627
  }, z.core.$strip>, "mutation">;
628
+ /**
629
+ * Move footage between locations — the OPERATOR's mover, scoped to one
630
+ * camera (and optionally to specific profiles) rather than a whole disk.
631
+ * Queued FIFO behind the single-flight engine, so arming several is safe.
632
+ */
633
+ readonly relocateFootage: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
634
+ fromLocationId: z.ZodString;
635
+ toLocationId: z.ZodString;
636
+ entities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
637
+ segments: "segments";
638
+ }>>>;
639
+ footageClass: z.ZodOptional<z.ZodEnum<{
640
+ recordings: "recordings";
641
+ recordingsLow: "recordingsLow";
642
+ }>>;
643
+ deviceId: z.ZodOptional<z.ZodNumber>;
644
+ profiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
645
+ throttleMbps: z.ZodOptional<z.ZodNumber>;
646
+ }, z.core.$strip>, z.ZodObject<{
647
+ jobId: z.ZodString;
648
+ }, z.core.$strip>, "mutation">;
649
+ /** Every relocate job this recorder knows about, newest first (in RAM: the
650
+ * move is resumable, so a lost list costs nothing but the display). */
651
+ readonly listRelocateJobs: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
652
+ jobId: z.ZodString;
653
+ state: z.ZodEnum<{
654
+ queued: "queued";
655
+ done: "done";
656
+ failed: "failed";
657
+ running: "running";
658
+ cancelled: "cancelled";
659
+ }>;
660
+ fromLocationId: z.ZodString;
661
+ toLocationId: z.ZodString;
662
+ deviceId: z.ZodNullable<z.ZodNumber>;
663
+ entities: z.ZodArray<z.ZodString>;
664
+ filesMoved: z.ZodNumber;
665
+ bytesMoved: z.ZodNumber;
666
+ filesTotal: z.ZodNullable<z.ZodNumber>;
667
+ startedAt: z.ZodNumber;
668
+ finishedAt: z.ZodNullable<z.ZodNumber>;
669
+ error: z.ZodNullable<z.ZodString>;
670
+ }, z.core.$strip>>>, "query">;
671
+ /** Cancel a running or queued relocate job. A queued job never runs. */
672
+ readonly cancelRelocateJob: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
673
+ jobId: z.ZodString;
674
+ }, z.core.$strip>, z.ZodObject<{
675
+ cancelled: z.ZodBoolean;
676
+ }, z.core.$strip>, "mutation">;
677
+ /** What a rebalance WOULD move, and what it would refuse. Moves nothing. */
678
+ readonly planStorageRebalance: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
679
+ throttleMbps: z.ZodOptional<z.ZodNumber>;
680
+ minMoveGb: z.ZodOptional<z.ZodNumber>;
681
+ }, z.core.$strip>, z.ZodObject<{
682
+ moves: z.ZodArray<z.ZodObject<{
683
+ deviceId: z.ZodNumber;
684
+ profile: z.ZodString;
685
+ fromLocationId: z.ZodString;
686
+ toLocationId: z.ZodString;
687
+ bytes: z.ZodNumber;
688
+ files: z.ZodNumber;
689
+ }, z.core.$strip>>;
690
+ skipped: z.ZodArray<z.ZodObject<{
691
+ deviceId: z.ZodNumber;
692
+ profile: z.ZodString;
693
+ fromLocationId: z.ZodString;
694
+ toLocationId: z.ZodNullable<z.ZodString>;
695
+ bytes: z.ZodNumber;
696
+ reason: z.ZodEnum<{
697
+ "below-threshold": "below-threshold";
698
+ unassigned: "unassigned";
699
+ "target-not-writable": "target-not-writable";
700
+ "no-headroom": "no-headroom";
701
+ }>;
702
+ }, z.core.$strip>>;
703
+ bytesToMove: z.ZodNumber;
704
+ jobIds: z.ZodArray<z.ZodString>;
705
+ }, z.core.$strip>, "query">;
706
+ /** Arm the rebalance: enqueue one relocate job per planned move. */
707
+ readonly startStorageRebalance: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
708
+ throttleMbps: z.ZodOptional<z.ZodNumber>;
709
+ minMoveGb: z.ZodOptional<z.ZodNumber>;
710
+ }, z.core.$strip>, z.ZodObject<{
711
+ moves: z.ZodArray<z.ZodObject<{
712
+ deviceId: z.ZodNumber;
713
+ profile: z.ZodString;
714
+ fromLocationId: z.ZodString;
715
+ toLocationId: z.ZodString;
716
+ bytes: z.ZodNumber;
717
+ files: z.ZodNumber;
718
+ }, z.core.$strip>>;
719
+ skipped: z.ZodArray<z.ZodObject<{
720
+ deviceId: z.ZodNumber;
721
+ profile: z.ZodString;
722
+ fromLocationId: z.ZodString;
723
+ toLocationId: z.ZodNullable<z.ZodString>;
724
+ bytes: z.ZodNumber;
725
+ reason: z.ZodEnum<{
726
+ "below-threshold": "below-threshold";
727
+ unassigned: "unassigned";
728
+ "target-not-writable": "target-not-writable";
729
+ "no-headroom": "no-headroom";
730
+ }>;
731
+ }, z.core.$strip>>;
732
+ bytesToMove: z.ZodNumber;
733
+ jobIds: z.ZodArray<z.ZodString>;
734
+ }, z.core.$strip>, "mutation">;
546
735
  };
547
736
  };
548
737
  export type IRecordingProvider = InferProvider<typeof recordingCapability>;
@@ -75,6 +75,7 @@ export declare const storageMigrationCapability: {
75
75
  toLocationId: z.ZodString;
76
76
  moverJobId: z.ZodNullable<z.ZodString>;
77
77
  state: z.ZodNullable<z.ZodEnum<{
78
+ queued: "queued";
78
79
  done: "done";
79
80
  failed: "failed";
80
81
  running: "running";
@@ -6310,6 +6310,41 @@ export type AppRouter = TrpcCoreRouter<{
6310
6310
  output: z.infer<typeof recordingCapability.methods.cancelStorageMigrationMove.output>;
6311
6311
  meta: object;
6312
6312
  }>;
6313
+ relocateFootage: TRPCMutationProcedure<{
6314
+ input: {
6315
+ [x: string]: unknown;
6316
+ } & z.input<typeof recordingCapability.methods.relocateFootage.input>;
6317
+ output: z.infer<typeof recordingCapability.methods.relocateFootage.output>;
6318
+ meta: object;
6319
+ }>;
6320
+ listRelocateJobs: TRPCQueryProcedure<{
6321
+ input: {
6322
+ [x: string]: unknown;
6323
+ } & z.input<typeof recordingCapability.methods.listRelocateJobs.input>;
6324
+ output: z.infer<typeof recordingCapability.methods.listRelocateJobs.output>;
6325
+ meta: object;
6326
+ }>;
6327
+ cancelRelocateJob: TRPCMutationProcedure<{
6328
+ input: {
6329
+ [x: string]: unknown;
6330
+ } & z.input<typeof recordingCapability.methods.cancelRelocateJob.input>;
6331
+ output: z.infer<typeof recordingCapability.methods.cancelRelocateJob.output>;
6332
+ meta: object;
6333
+ }>;
6334
+ planStorageRebalance: TRPCQueryProcedure<{
6335
+ input: {
6336
+ [x: string]: unknown;
6337
+ } & z.input<typeof recordingCapability.methods.planStorageRebalance.input>;
6338
+ output: z.infer<typeof recordingCapability.methods.planStorageRebalance.output>;
6339
+ meta: object;
6340
+ }>;
6341
+ startStorageRebalance: TRPCMutationProcedure<{
6342
+ input: {
6343
+ [x: string]: unknown;
6344
+ } & z.input<typeof recordingCapability.methods.startStorageRebalance.input>;
6345
+ output: z.infer<typeof recordingCapability.methods.startStorageRebalance.output>;
6346
+ meta: object;
6347
+ }>;
6313
6348
  }>>;
6314
6349
  recordingExport: TRPCBuiltRouter<{
6315
6350
  ctx: TrpcContext;
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 928 method paths across 123 capabilities.
9
+ * Coverage: 933 method paths across 123 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -87,7 +87,7 @@ export interface SystemProxy {
87
87
  readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentDetectWeight' | 'setAgentCapabilities' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'getCameraStatuses' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
88
88
  readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop' | 'runStatelessStep'>;
89
89
  readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
90
- readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove'>;
90
+ readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance'>;
91
91
  readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl' | 'readExportBytes'>;
92
92
  readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
93
93
  readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'insert' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'histogram' | 'isEmpty' | 'declareCollection'>;
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export * from './ffmpeg/invocation.js';
15
15
  export * from './ffmpeg/sharing-key.js';
16
16
  export * from './health/wiring-health.js';
17
17
  export type * from './interfaces/addon.js';
18
- export { DEFAULT_ADDON_PLACEMENT, isAgentOnlyPlacement, isDeployableToAgent, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveRunnerId, } from './interfaces/addon.js';
18
+ export { DEFAULT_ADDON_PLACEMENT, isAgentOnlyPlacement, isDeployableToAgent, isIsolatedBuiltin, resolveAddonExecution, resolveAddonGroup, resolveAddonPlacement, resolveRunnerId, } from './interfaces/addon.js';
19
19
  export type * from './interfaces/addon-data-plane.js';
20
20
  export { DATAPLANE_SECRET_HEADER } from './interfaces/addon-data-plane.js';
21
21
  export type * from './interfaces/addon-routes.js';
@@ -188,10 +188,10 @@ export { isBaseConditionKey, knownValues, NC_BASE_CONDITION_KEYS, type NcBaseCon
188
188
  export { type PreparedAction, type PreparedAttachment, type PreparedNotification, prepareNotification, type ResolvedLevel, } from './notification/degrade-engine.js';
189
189
  export { htmlToText, markdownToHtmlLite, markdownToText, type NotificationFormat as NotificationBodyFormat, resolveFormat, textToHtml, transcodeBody, } from './notification/format-transcode.js';
190
190
  export { isScheduleActive } from './notification/schedule.js';
191
- export type { TimelapseRule, TimelapseRuleInput, TimelapseRulePatch, TimelapseTemplate, } from './notification/timelapse-rule.js';
192
- export { readTimelapseGeneratedAt, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, } from './notification/timelapse-rule.js';
191
+ export type { TimelapseCadencePair, TimelapsePreviewMode, TimelapseRule, TimelapseRuleInput, TimelapseRulePatch, TimelapseTemplate, } from './notification/timelapse-rule.js';
192
+ export { assertTimelapseCadences, DEFAULT_TIMELAPSE_PREVIEW_TEXT, readTimelapseGeneratedAt, TIMELAPSE_DENSE_FLOOR_SEC, TimelapseRuleInputSchema, TimelapseRulePatchSchema, TimelapseRuleSchema, TimelapseTemplateSchema, } from './notification/timelapse-rule.js';
193
193
  export { DEFAULT_DETAIL_CROP_CONVENTION, DETAIL_CROP_PADDING_FIELD, DETAIL_CROP_PADDING_KEY, DETAIL_CROP_SECTION_ID, DETAIL_CROP_SQUARE_KEY, type DetailCropConvention, DetailCropConventionSchema, type DetailCropRect, deriveDetailCropRect, type HydratedSettingsSection, type HydratedSettingsView, pickDetailCropConvention, readDetailCropConvention, } from './pipeline/detail-crop.js';
194
- export { DEFAULT_NATIVE_LEASE_SETTINGS, NATIVE_LEASE_ACTIVITY_FIELD, NATIVE_LEASE_ACTIVITY_KEY, NATIVE_LEASE_ADMISSION_FIELD, NATIVE_LEASE_ADMISSION_KEY, NATIVE_LEASE_BUDGET_FIELD, NATIVE_LEASE_BUDGET_KEY, NATIVE_LEASE_SECTION_ID, NATIVE_LEASE_TTL_FIELD, NATIVE_LEASE_TTL_KEY, type NativeLeaseAdmission, NativeLeaseAdmissionSchema, type NativeLeaseKnob, type NativeLeaseNumberKnob, type NativeLeaseSettings, type NativeLeaseSettingsOverride, NativeLeaseSettingsSchema, pickNativeLeaseOverride, readNativeLeaseOverride, } from './pipeline/native-lease.js';
194
+ export { DEFAULT_NATIVE_LEASE_SETTINGS, NATIVE_LEASE_ACTIVITY_FIELD, NATIVE_LEASE_ACTIVITY_KEY, NATIVE_LEASE_ADMISSION_FIELD, NATIVE_LEASE_ADMISSION_KEY, NATIVE_LEASE_BUDGET_FIELD, NATIVE_LEASE_BUDGET_KEY, NATIVE_LEASE_HOLD_FIELD, NATIVE_LEASE_HOLD_KEY, NATIVE_LEASE_SECTION_ID, NATIVE_LEASE_TILE_BUDGET_FIELD, NATIVE_LEASE_TILE_BUDGET_KEY, type NativeLeaseAdmission, NativeLeaseAdmissionSchema, type NativeLeaseKnob, type NativeLeaseNumberKnob, type NativeLeaseSettings, type NativeLeaseSettingsOverride, NativeLeaseSettingsSchema, pickNativeLeaseOverride, readNativeLeaseOverride, } from './pipeline/native-lease.js';
195
195
  export { type ApiKeyRecord, ApiKeyRecordSchema, type CapScope, CapScopeSchema, type MethodAccess, MethodAccessSchema, type ScopedToken, ScopedTokenSchema, type TokenScope, TokenScopeSchema, type UserRecord, UserRecordSchema, } from './schemas/auth-records.js';
196
196
  export type { CameraDetectionCapabilities, CameraMotionConfig, CameraNativeDetectionConfig, } from './types/camera-detection.js';
197
197
  export { DEVICE_TYPE_INFO, type DeviceTypeInfo } from './types/device-type.js';