@camstack/types 1.2.124 → 1.2.126

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/addon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_event_category = require("./event-category-BaEgqJNv.js");
3
- const require_sleep = require("./sleep-CJrvRDlD.js");
3
+ const require_sleep = require("./sleep-CWWLTM6W.js");
4
4
  const require_err_msg = require("./err-msg-COpsHMw2.js");
5
5
  //#region src/generated/cap-input-defaults.ts
6
6
  /**
@@ -16,7 +16,7 @@ const require_err_msg = require("./err-msg-COpsHMw2.js");
16
16
  * Plain data, zero Zod: a forked runner must not import the schema barrel
17
17
  * (~144MB RSS per runner — D28).
18
18
  *
19
- * Coverage: 24 caps, 53 methods with defaults.
19
+ * Coverage: 24 caps, 54 methods with defaults.
20
20
  */
21
21
  var CAP_INPUT_DEFAULTS = Object.freeze({
22
22
  "addons": { "getLogs": { "limit": 100 } },
@@ -236,7 +236,10 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
236
236
  "createApiKey": { "isAdmin": false },
237
237
  "createUser": { "isAdmin": false }
238
238
  },
239
- "vector-store": { "declareIndex": { "metric": "cosine" } },
239
+ "vector-store": {
240
+ "declareIndex": { "metric": "cosine" },
241
+ "scan": { "cursor": 0 }
242
+ },
240
243
  "zones": {
241
244
  "addZone": { "zone": { "__nested__": {
242
245
  "kind": "polygon",
package/dist/addon.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as EventCategory } from "./event-category-BZL-fdNj.mjs";
2
- import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-L5-bG_a_.mjs";
2
+ import { B as ReadinessRegistry, E as adminUiCapability, L as nodePin, R as readNodePin, St as emitReadiness, T as DeviceType, V as ReadinessTimeoutError, W as scopeKey, _t as DisposerChain, a as asJsonObject, b as deviceOpsCapability, d as BOOT_RECOVERY_BACKOFF_MS, f as DEVICE_SCOPED_CAPS, gt as DATAPLANE_SECRET_HEADER, h as createEventBusSliceSource, j as expandCapMethods, m as createDeviceProxy, p as isDeviceScopedCap, s as asString, t as sleep, u as parseJsonUnknown, vt as BaseAddon, x as viewerUiCapability, yt as normalizeAddonInitResult } from "./sleep-bm0x6zZF.mjs";
3
3
  import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
4
4
  //#region src/generated/cap-input-defaults.ts
5
5
  /**
@@ -15,7 +15,7 @@ import { t as errMsg } from "./err-msg-IQTHeDzc.mjs";
15
15
  * Plain data, zero Zod: a forked runner must not import the schema barrel
16
16
  * (~144MB RSS per runner — D28).
17
17
  *
18
- * Coverage: 24 caps, 53 methods with defaults.
18
+ * Coverage: 24 caps, 54 methods with defaults.
19
19
  */
20
20
  var CAP_INPUT_DEFAULTS = Object.freeze({
21
21
  "addons": { "getLogs": { "limit": 100 } },
@@ -235,7 +235,10 @@ var CAP_INPUT_DEFAULTS = Object.freeze({
235
235
  "createApiKey": { "isAdmin": false },
236
236
  "createUser": { "isAdmin": false }
237
237
  },
238
- "vector-store": { "declareIndex": { "metric": "cosine" } },
238
+ "vector-store": {
239
+ "declareIndex": { "metric": "cosine" },
240
+ "scan": { "cursor": 0 }
241
+ },
239
242
  "zones": {
240
243
  "addZone": { "zone": { "__nested__": {
241
244
  "kind": "polygon",
@@ -2464,6 +2464,27 @@ export declare const pipelineAnalyticsCapability: {
2464
2464
  retrainFrames: z.ZodNumber;
2465
2465
  total: z.ZodNumber;
2466
2466
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
2467
+ /**
2468
+ * How many rows a pass would STILL act on against `toLocationId`.
2469
+ *
2470
+ * One derivation, two consumers: it is the media lane's denominator (the
2471
+ * **M** the footage lane gets from the ledger census — D295) and it is the
2472
+ * residue behind "drain remaining". Deriving them separately is how "N of M"
2473
+ * ends up comparing two different populations.
2474
+ *
2475
+ * `null` means the count could not be taken; it is never zero-filled,
2476
+ * because a zero here reads as "nothing left to move".
2477
+ */
2478
+ readonly countRelocatableMedia: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
2479
+ toLocationId: z.ZodString;
2480
+ mode: z.ZodOptional<z.ZodEnum<{
2481
+ move: "move";
2482
+ seal: "seal";
2483
+ gallery: "gallery";
2484
+ }>>;
2485
+ }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
2486
+ rows: z.ZodNumber;
2487
+ }, z.core.$strip>>, "query">;
2467
2488
  /** Every relocate job this addon knows about, newest first (in RAM: the
2468
2489
  * move is resumable, so a lost list costs nothing but the display). */
2469
2490
  readonly listRelocateMediaJobs: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
@@ -718,6 +718,26 @@ export declare const recordingCapability: {
718
718
  finishedAt: z.ZodNullable<z.ZodNumber>;
719
719
  error: z.ZodNullable<z.ZodString>;
720
720
  }, z.core.$strip>>>, "query">;
721
+ /**
722
+ * What a location STILL holds, asked of the durable hour ledger.
723
+ *
724
+ * The number behind "drain remaining": segments and bytes that would still
725
+ * have to move off `fromLocationId`. It is a ledger aggregate — the archive
726
+ * — because the resident index is not the archive (D295), and a drain sized
727
+ * off the index is exactly what reported `done` over 80.3 GB on 2026-08-29.
728
+ * `null` means the archive could not be asked (no ledger on this node, or
729
+ * the aggregate failed) and is never conflated with an empty source.
730
+ */
731
+ readonly getRelocateResidue: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
732
+ fromLocationId: z.ZodString;
733
+ footageClass: z.ZodOptional<z.ZodEnum<{
734
+ recordings: "recordings";
735
+ recordingsLow: "recordingsLow";
736
+ }>>;
737
+ }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
738
+ segments: z.ZodNumber;
739
+ bytes: z.ZodNumber;
740
+ }, z.core.$strip>>, "query">;
721
741
  /** Cancel a running or queued relocate job. A queued job never runs. */
722
742
  readonly cancelRelocateJob: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
723
743
  jobId: z.ZodString;
@@ -129,6 +129,13 @@ export declare const storageMigrationCapability: {
129
129
  cancelled: "cancelled";
130
130
  }>>;
131
131
  error: z.ZodNullable<z.ZodString>;
132
+ progress: z.ZodNullable<z.ZodObject<{
133
+ filesMoved: z.ZodNumber;
134
+ filesTotal: z.ZodNullable<z.ZodNumber>;
135
+ bytesMoved: z.ZodNumber;
136
+ startedAt: z.ZodNumber;
137
+ observedAt: z.ZodNumber;
138
+ }, z.core.$strip>>;
132
139
  }, z.core.$strip>>;
133
140
  pauseLeaseId: z.ZodNullable<z.ZodString>;
134
141
  pausedParticipants: z.ZodArray<z.ZodEnum<{
@@ -148,6 +155,82 @@ export declare const storageMigrationCapability: {
148
155
  }, z.core.$strip>, z.ZodObject<{
149
156
  cancelled: z.ZodBoolean;
150
157
  }, z.core.$strip>, "mutation">;
158
+ /**
159
+ * Every mover running RIGHT NOW, in both lanes, with its counters.
160
+ *
161
+ * `status` covers a migration's own moves — the coordinator folds their
162
+ * progress onto the durable job record it is already polling. This covers
163
+ * the other case, and it is not hypothetical: a drain armed straight against
164
+ * `recording.relocateFootage` (the only path that existed before
165
+ * {@link drain}) has no job to fold into and would otherwise be invisible.
166
+ */
167
+ readonly movers: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
168
+ lane: z.ZodEnum<{
169
+ media: "media";
170
+ footage: "footage";
171
+ }>;
172
+ job: z.ZodObject<{
173
+ jobId: z.ZodString;
174
+ state: z.ZodEnum<{
175
+ failed: "failed";
176
+ running: "running";
177
+ queued: "queued";
178
+ done: "done";
179
+ cancelled: "cancelled";
180
+ }>;
181
+ fromLocationId: z.ZodString;
182
+ toLocationId: z.ZodString;
183
+ deviceId: z.ZodNullable<z.ZodNumber>;
184
+ entities: z.ZodArray<z.ZodString>;
185
+ filesMoved: z.ZodNumber;
186
+ bytesMoved: z.ZodNumber;
187
+ filesTotal: z.ZodNullable<z.ZodNumber>;
188
+ startedAt: z.ZodNumber;
189
+ finishedAt: z.ZodNullable<z.ZodNumber>;
190
+ error: z.ZodNullable<z.ZodString>;
191
+ }, z.core.$strip>;
192
+ migrationJobId: z.ZodNullable<z.ZodString>;
193
+ observedAt: z.ZodNumber;
194
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
195
+ /**
196
+ * What each class's SOURCE still holds, from the archive — never from the
197
+ * resident index (D295). Only classes with something left (or something
198
+ * unknown) are listed, so an empty list means there is nothing to drain and
199
+ * the UI has no honest button to offer.
200
+ */
201
+ readonly residue: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{}, z.core.$strip>, z.ZodReadonly<z.ZodArray<z.ZodObject<{
202
+ storageClass: z.ZodEnum<{
203
+ recordings: "recordings";
204
+ recordingsLow: "recordingsLow";
205
+ eventMedia: "eventMedia";
206
+ backups: "backups";
207
+ galleryMedia: "galleryMedia";
208
+ }>;
209
+ fromLocationId: z.ZodString;
210
+ toLocationId: z.ZodString;
211
+ items: z.ZodNullable<z.ZodNumber>;
212
+ bytes: z.ZodNullable<z.ZodNumber>;
213
+ }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
214
+ /**
215
+ * Run the drain half alone, on a class whose default has ALREADY moved.
216
+ *
217
+ * It never repoints anything, which is what lets `start` keep refusing a
218
+ * destination that is already the default: the two verbs cannot be confused
219
+ * for one another, and no operator can re-repoint a migrated class through
220
+ * this door.
221
+ */
222
+ readonly drain: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
223
+ classes: z.ZodArray<z.ZodEnum<{
224
+ recordings: "recordings";
225
+ recordingsLow: "recordingsLow";
226
+ eventMedia: "eventMedia";
227
+ backups: "backups";
228
+ galleryMedia: "galleryMedia";
229
+ }>>;
230
+ throttleMbps: z.ZodOptional<z.ZodNumber>;
231
+ }, z.core.$strip>, z.ZodObject<{
232
+ jobId: z.ZodString;
233
+ }, z.core.$strip>, "mutation">;
151
234
  };
152
235
  };
153
236
  export type IStorageMigrationProvider = InferProvider<typeof storageMigrationCapability>;
@@ -131,6 +131,10 @@ export declare const storageCapability: {
131
131
  single: "single";
132
132
  multi: "multi";
133
133
  }>;
134
+ access: z.ZodOptional<z.ZodEnum<{
135
+ "local-path": "local-path";
136
+ "cap-mediated": "cap-mediated";
137
+ }>>;
134
138
  defaultsTo: z.ZodOptional<z.ZodString>;
135
139
  defaultRoot: z.ZodOptional<z.ZodEnum<{
136
140
  data: "data";
@@ -5,12 +5,38 @@ import { type InferProvider } from './capability-definition.js';
5
5
  *
6
6
  * ## Why this is a capability and not a helper
7
7
  *
8
- * Six stores in `addon-post-analysis` already hold vectors object CLIP, face,
9
- * plate, vehicle, identity, and the event store's derivativesand every one of
10
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
11
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
12
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
13
- * load 5,000 rows before ranking anything.
8
+ * This capability was introduced with the claim that SIX stores in
9
+ * `addon-post-analysis` held vectors in a `JSON` settings-store columnobject
10
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
11
+ * claim was never true, and leaving it here made five stores look like pending
12
+ * work when three of them have no vector at all. Counted column by column on
13
+ * 2026-08-30, exactly THREE ever held one:
14
+ *
15
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
16
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
17
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
18
+ * face, migrated 2026-08-30 into its OWN index (see below).
19
+ *
20
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
21
+ * and `identities` store a name; the event store stores no derivative vector.
22
+ * They are not migration candidates and never were.
23
+ *
24
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
25
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
26
+ * rows before ranking anything.
27
+ *
28
+ * ## One index per COMPARISON, never per encoder
29
+ *
30
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
31
+ * model, and they still get two indexes. An index is a set of things that are
32
+ * ranked against each other and that live and die together, and these two are
33
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
34
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
35
+ * forever and is the gallery every recognition ranks against. One index would
36
+ * mean every gallery load and every reconcile carried a filter whose failure
37
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
38
+ * person's only sample. The dimension they share is not a reason to share an
39
+ * index; the question they answer is, and it differs.
14
40
  *
15
41
  * The fix is not a faster loop, it is a different backend — and the backend
16
42
  * should be replaceable without touching six callers. So: a singleton
@@ -114,6 +140,7 @@ export declare const VectorQueryResultSchema: z.ZodObject<{
114
140
  }, z.core.$strip>>;
115
141
  scanned: z.ZodNumber;
116
142
  truncated: z.ZodBoolean;
143
+ effectiveTopK: z.ZodNumber;
117
144
  }, z.core.$strip>;
118
145
  export declare const VectorDeleteInputSchema: z.ZodObject<{
119
146
  index: z.ZodString;
@@ -149,6 +176,62 @@ export declare const VectorGetResultSchema: z.ZodObject<{
149
176
  metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
150
177
  }, z.core.$strip>>;
151
178
  }, z.core.$strip>;
179
+ /**
180
+ * Ids to read back WITH their vectors.
181
+ *
182
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
183
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
184
+ * caller depends on that promise. This one promises the opposite.
185
+ *
186
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
187
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
188
+ * a per-face cross-process KNN would be a network round trip inside the
189
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
190
+ * it requires the index to hand the floats back. Without this method the only
191
+ * way to keep a readable vector is a JSON column, which is the thing this
192
+ * capability exists to delete.
193
+ *
194
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
195
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
196
+ */
197
+ export declare const VectorFetchInputSchema: z.ZodObject<{
198
+ index: z.ZodString;
199
+ ids: z.ZodArray<z.ZodString>;
200
+ }, z.core.$strip>;
201
+ export declare const VectorFetchResultSchema: z.ZodObject<{
202
+ items: z.ZodArray<z.ZodObject<{
203
+ id: z.ZodString;
204
+ vector: z.ZodString;
205
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
206
+ }, z.core.$strip>>;
207
+ }, z.core.$strip>;
208
+ /**
209
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
210
+ *
211
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
212
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
213
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
214
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
215
+ * distance to every row is degenerate. `examined: 4096` then read as "we
216
+ * looked" for as long as anyone cared to read it.
217
+ *
218
+ * This is the primitive that question actually needs: a bounded page, ordered
219
+ * by the backend's own row order, costing no distance computation at all.
220
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
221
+ * the full-table read this capability was built to stop.
222
+ */
223
+ export declare const VectorScanInputSchema: z.ZodObject<{
224
+ index: z.ZodString;
225
+ cursor: z.ZodDefault<z.ZodNumber>;
226
+ limit: z.ZodNumber;
227
+ }, z.core.$strip>;
228
+ export declare const VectorScanResultSchema: z.ZodObject<{
229
+ items: z.ZodArray<z.ZodObject<{
230
+ id: z.ZodString;
231
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
232
+ }, z.core.$strip>>;
233
+ nextCursor: z.ZodNullable<z.ZodNumber>;
234
+ }, z.core.$strip>;
152
235
  export declare const VectorStatsInputSchema: z.ZodObject<{
153
236
  index: z.ZodString;
154
237
  }, z.core.$strip>;
@@ -216,6 +299,7 @@ export declare const vectorStoreCapability: {
216
299
  }, z.core.$strip>>;
217
300
  scanned: z.ZodNumber;
218
301
  truncated: z.ZodBoolean;
302
+ effectiveTopK: z.ZodNumber;
219
303
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
220
304
  /** Metadata by id, no vectors — see {@link VectorGetResultSchema}. */
221
305
  readonly getByIds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
@@ -227,6 +311,29 @@ export declare const vectorStoreCapability: {
227
311
  metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
228
312
  }, z.core.$strip>>;
229
313
  }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
314
+ /** Metadata AND vectors, by named id — see {@link VectorFetchInputSchema}. */
315
+ readonly fetchByIds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
316
+ index: z.ZodString;
317
+ ids: z.ZodArray<z.ZodString>;
318
+ }, z.core.$strip>, z.ZodObject<{
319
+ items: z.ZodArray<z.ZodObject<{
320
+ id: z.ZodString;
321
+ vector: z.ZodString;
322
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
323
+ }, z.core.$strip>>;
324
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
325
+ /** One page of the whole index, unranked — see {@link VectorScanInputSchema}. */
326
+ readonly scan: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
327
+ index: z.ZodString;
328
+ cursor: z.ZodDefault<z.ZodNumber>;
329
+ limit: z.ZodNumber;
330
+ }, z.core.$strip>, z.ZodObject<{
331
+ items: z.ZodArray<z.ZodObject<{
332
+ id: z.ZodString;
333
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
334
+ }, z.core.$strip>>;
335
+ nextCursor: z.ZodNullable<z.ZodNumber>;
336
+ }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
230
337
  readonly deleteByIds: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
231
338
  index: z.ZodString;
232
339
  ids: z.ZodArray<z.ZodString>;
@@ -5128,6 +5128,13 @@ export type AppRouter = TrpcCoreRouter<{
5128
5128
  output: z.infer<typeof pipelineAnalyticsCapability.methods.countUnstampedEventMedia.output>;
5129
5129
  meta: object;
5130
5130
  }>;
5131
+ countRelocatableMedia: TRPCQueryProcedure<{
5132
+ input: {
5133
+ [x: string]: unknown;
5134
+ } & z.input<typeof pipelineAnalyticsCapability.methods.countRelocatableMedia.input>;
5135
+ output: z.infer<typeof pipelineAnalyticsCapability.methods.countRelocatableMedia.output>;
5136
+ meta: object;
5137
+ }>;
5131
5138
  listRelocateMediaJobs: TRPCQueryProcedure<{
5132
5139
  input: {
5133
5140
  [x: string]: unknown;
@@ -6578,6 +6585,13 @@ export type AppRouter = TrpcCoreRouter<{
6578
6585
  output: z.infer<typeof recordingCapability.methods.listRelocateJobs.output>;
6579
6586
  meta: object;
6580
6587
  }>;
6588
+ getRelocateResidue: TRPCQueryProcedure<{
6589
+ input: {
6590
+ [x: string]: unknown;
6591
+ } & z.input<typeof recordingCapability.methods.getRelocateResidue.input>;
6592
+ output: z.infer<typeof recordingCapability.methods.getRelocateResidue.output>;
6593
+ meta: object;
6594
+ }>;
6581
6595
  cancelRelocateJob: TRPCMutationProcedure<{
6582
6596
  input: {
6583
6597
  [x: string]: unknown;
@@ -7252,6 +7266,27 @@ export type AppRouter = TrpcCoreRouter<{
7252
7266
  output: z.infer<typeof storageMigrationCapability.methods.cancel.output>;
7253
7267
  meta: object;
7254
7268
  }>;
7269
+ movers: TRPCQueryProcedure<{
7270
+ input: {
7271
+ [x: string]: unknown;
7272
+ } & z.input<typeof storageMigrationCapability.methods.movers.input>;
7273
+ output: z.infer<typeof storageMigrationCapability.methods.movers.output>;
7274
+ meta: object;
7275
+ }>;
7276
+ residue: TRPCQueryProcedure<{
7277
+ input: {
7278
+ [x: string]: unknown;
7279
+ } & z.input<typeof storageMigrationCapability.methods.residue.input>;
7280
+ output: z.infer<typeof storageMigrationCapability.methods.residue.output>;
7281
+ meta: object;
7282
+ }>;
7283
+ drain: TRPCMutationProcedure<{
7284
+ input: {
7285
+ [x: string]: unknown;
7286
+ } & z.input<typeof storageMigrationCapability.methods.drain.input>;
7287
+ output: z.infer<typeof storageMigrationCapability.methods.drain.output>;
7288
+ meta: object;
7289
+ }>;
7255
7290
  }>>;
7256
7291
  storageProvider: TRPCBuiltRouter<{
7257
7292
  ctx: TrpcContext;
@@ -8403,6 +8438,20 @@ export type AppRouter = TrpcCoreRouter<{
8403
8438
  output: z.infer<typeof vectorStoreCapability.methods.getByIds.output>;
8404
8439
  meta: object;
8405
8440
  }>;
8441
+ fetchByIds: TRPCQueryProcedure<{
8442
+ input: {
8443
+ [x: string]: unknown;
8444
+ } & z.input<typeof vectorStoreCapability.methods.fetchByIds.input>;
8445
+ output: z.infer<typeof vectorStoreCapability.methods.fetchByIds.output>;
8446
+ meta: object;
8447
+ }>;
8448
+ scan: TRPCQueryProcedure<{
8449
+ input: {
8450
+ [x: string]: unknown;
8451
+ } & z.input<typeof vectorStoreCapability.methods.scan.input>;
8452
+ output: z.infer<typeof vectorStoreCapability.methods.scan.output>;
8453
+ meta: object;
8454
+ }>;
8406
8455
  deleteByIds: TRPCMutationProcedure<{
8407
8456
  input: {
8408
8457
  [x: string]: unknown;
@@ -11,7 +11,7 @@
11
11
  * Plain data, zero Zod: a forked runner must not import the schema barrel
12
12
  * (~144MB RSS per runner — D28).
13
13
  *
14
- * Coverage: 24 caps, 53 methods with defaults.
14
+ * Coverage: 24 caps, 54 methods with defaults.
15
15
  */
16
16
  export declare const CAP_INPUT_DEFAULTS: Readonly<Record<string, Readonly<Record<string, Readonly<Record<string, unknown>>>>>>;
17
17
  /**
@@ -6,7 +6,7 @@
6
6
  * scope+access check inside `protectedProcedure` (see
7
7
  * `server/backend/src/api/trpc/trpc.middleware.ts`).
8
8
  *
9
- * Coverage: 979 method paths across 126 capabilities.
9
+ * Coverage: 986 method paths across 126 capabilities.
10
10
  */
11
11
  import type { CapabilityMethodAccess } from '../capabilities/capability-definition.js';
12
12
  export interface MethodAccessRecord {
@@ -87,12 +87,12 @@ export interface SystemProxy {
87
87
  readonly pipelineOrchestrator: Pick<InferProvider<typeof pipelineOrchestratorCapability>, 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'rebalance' | 'getPipelineAssignments' | 'getAgentLoad' | 'getGlobalMetrics' | 'getCapabilityBindings' | 'setCapabilityBinding' | 'getIngestOwner' | 'getAudioNodeLoad' | 'getAgentSettings' | 'listAgentSettings' | 'removeAgentSettings' | 'setAgentMaxCameras' | 'setAgentDetectWeight' | 'setAgentCapabilities' | 'setAgentReachableHost' | 'setAgentInferenceDevices' | 'getNodeInferenceDevices' | 'resetNodePipelineDefaults' | 'getCameraStatuses' | 'reconcileFromDisk' | 'getReconcileFromDiskStatus' | 'listTemplates' | 'saveTemplate' | 'updateTemplate' | 'deleteTemplate'>;
88
88
  readonly pipelineRunner: Pick<InferProvider<typeof pipelineRunnerCapability>, 'attachCamera' | 'reportMotion' | 'getLocalLoad' | 'getLocalMetrics' | 'getAllCameraMetrics' | 'getLocalCameras' | 'getNativeCrop' | 'runStatelessStep'>;
89
89
  readonly plateGallery: Pick<InferProvider<typeof plateGalleryCapability>, 'getPlateMedia' | 'searchPlates' | 'suggestPlateClusters' | 'correctPlateText' | 'deletePlate' | 'listVehicles' | 'createVehicle' | 'renameVehicle' | 'deleteVehicle' | 'listVehicleSamples' | 'removeVehicleSample' | 'assignPlate' | 'unassignPlate' | 'assignPlates' | 'unassignPlates'>;
90
- readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance'>;
90
+ readonly recording: Pick<InferProvider<typeof recordingCapability>, 'getStorageUsage' | 'listOpsLog' | 'pauseForStorageMigration' | 'resumeForStorageMigration' | 'refreshStorageLocationsForMigration' | 'startStorageMigrationMove' | 'getStorageMigrationMoveStatus' | 'cancelStorageMigrationMove' | 'relocateFootage' | 'listRelocateJobs' | 'getRelocateResidue' | 'cancelRelocateJob' | 'planStorageRebalance' | 'startStorageRebalance'>;
91
91
  readonly recordingExport: Pick<InferProvider<typeof recordingExportCapability>, 'createExport' | 'getExport' | 'cancelExport' | 'deleteExport' | 'getDownloadUrl' | 'readExportBytes'>;
92
92
  readonly serverManagement: Pick<InferProvider<typeof serverManagementCapability>, 'getServerPackageStatus' | 'checkServerUpdate' | 'applyServerUpdate' | 'rollbackServerUpdate' | 'restartServer'>;
93
93
  readonly settingsStore: Pick<InferProvider<typeof settingsStoreCapability>, 'get' | 'set' | 'query' | 'insert' | 'insertMany' | 'update' | 'delete' | 'deleteWhere' | 'updateWhere' | 'count' | 'aggregate' | 'histogram' | 'isEmpty' | 'declareCollection'>;
94
94
  readonly storage: Pick<InferProvider<typeof storageCapability>, 'resolve' | 'write' | 'read' | 'exists' | 'list' | 'delete' | 'getAvailableSpace' | 'beginUpload' | 'writeChunk' | 'finalizeUpload' | 'abortUpload' | 'beginDownload' | 'readChunk' | 'endDownload' | 'listLocations' | 'getDefaultLocation' | 'listLocationDeclarations' | 'upsertLocation' | 'deleteLocation' | 'testLocation' | 'listProviders' | 'testConfig'>;
95
- readonly storageMigration: Pick<InferProvider<typeof storageMigrationCapability>, 'plan' | 'start' | 'status' | 'cancel'>;
95
+ readonly storageMigration: Pick<InferProvider<typeof storageMigrationCapability>, 'plan' | 'start' | 'status' | 'cancel' | 'movers' | 'residue' | 'drain'>;
96
96
  readonly streamBroker: Pick<InferProvider<typeof streamBrokerCapability>, 'fetchEventMedia' | 'listAllCameraStreams' | 'listAllProfileSlots' | 'getBrokerStats' | 'probeStream' | 'listClients' | 'killClient' | 'getStreamUrl' | 'getStreamWithCodec' | 'releaseStreamWithCodec' | 'acquireEgressTranscode' | 'releaseEgressTranscode' | 'subscribeAudioChunks' | 'pullAudioChunks' | 'unsubscribeAudioChunks' | 'subscribeFrames' | 'pullFrameHandles' | 'unsubscribeFrames' | 'setPreBufferDuration' | 'getPreBufferInfo' | 'getRtspPort' | 'getAllRtspEntries' | 'getRtspEntry' | 'regenerateRtspToken' | 'setRtspEnabled' | 'isRtspEnabled'>;
97
97
  readonly system: Pick<InferProvider<typeof systemCapability>, 'info' | 'health' | 'featureFlags' | 'networkAddresses' | 'getRetentionConfig' | 'setRetentionConfig' | 'forceRetentionCleanup' | 'getSiteLocation' | 'setSiteLocation' | 'detectSiteLocation' | 'getRequestCensus' | 'getLoadContributions' | 'getFailureContributions' | 'getLoggingSettings' | 'setLoggingSettings'>;
98
98
  readonly terminalSession: Pick<InferProvider<typeof terminalSessionCapability>, 'listProfiles' | 'listInstances' | 'createInstance' | 'updateInstance' | 'deleteInstance' | 'setInstanceEnabled' | 'listLegacyCameras' | 'adoptLegacyMonitor' | 'listSessions' | 'openSession' | 'resize' | 'pullOutput' | 'writeInput' | 'close'>;
package/dist/index.d.ts CHANGED
@@ -38,6 +38,7 @@ export type * from './interfaces/config-port.js';
38
38
  export type * from './interfaces/config-ui.js';
39
39
  export type { HydratedFieldEntry } from './interfaces/config-ui.js';
40
40
  export { collectHydratedFieldEntries, collectHydratedFieldValues, hydrateSchema, resolveHydratedFieldValue, WELL_KNOWN_TAB_MAP, WELL_KNOWN_TABS, } from './interfaces/config-ui.js';
41
+ export { collectSecretConfigKeys, isSecretConfigField, REDACTED_SECRET, schemaDeclaresAnyField, } from './interfaces/config-ui-secrets.js';
41
42
  export type * from './interfaces/context.js';
42
43
  export type * from './interfaces/decoder.js';
43
44
  export type * from './interfaces/detection-addon.js';
@@ -92,8 +93,8 @@ export type * from './interfaces/server-network.js';
92
93
  export type * from './interfaces/storage.js';
93
94
  export type { StorageLocation, StorageLocationRef, } from './interfaces/storage-location.js';
94
95
  export { StorageLocationRefSchema, StorageLocationSchema, StorageLocationTypeSchema, } from './interfaces/storage-location.js';
95
- export type { StorageLocationDeclaration } from './interfaces/storage-location-declaration.js';
96
- export { StorageLocationDeclarationSchema } from './interfaces/storage-location-declaration.js';
96
+ export type { StorageAccess, StorageLocationDeclaration, } from './interfaces/storage-location-declaration.js';
97
+ export { STORAGE_ACCESS_FALLBACK, StorageAccessSchema, StorageLocationDeclarationSchema, } from './interfaces/storage-location-declaration.js';
97
98
  export * from './interfaces/stream-broker.js';
98
99
  export type * from './interfaces/task-handler.js';
99
100
  export type { Timezone, TimezoneDstRule, Weekday } from './interfaces/timezones.js';