@camstack/addon-remote-storage 1.2.42 → 1.2.45

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.
@@ -7988,6 +7988,21 @@ var RelocateJobSchema = object({
7988
7988
  bytesMoved: number().int(),
7989
7989
  /** Total files discovered up front; null while (or when) unknown. */
7990
7990
  filesTotal: number().int().nullable(),
7991
+ /**
7992
+ * Rows this run CORRECTED while moving them — a durable mutation the move
7993
+ * made that nobody asked for, so it is reported where the operator reads the
7994
+ * job rather than only in a log line.
7995
+ *
7996
+ * A footage segment records its byte count in its own NAME, and the durable
7997
+ * hour row derives its aggregates from those names. A file that does not
7998
+ * match its name therefore makes the ledger's sums — and with them quota and
7999
+ * pressure eviction — wrong by the difference, and only a rename can fix it.
8000
+ * On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
8001
+ *
8002
+ * Absent on lanes where the question has no meaning: a media blob's size is
8003
+ * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8004
+ */
8005
+ rowsReconciled: number().int().nonnegative().optional(),
7991
8006
  startedAt: number(),
7992
8007
  finishedAt: number().nullable(),
7993
8008
  error: string().nullable()
@@ -8056,14 +8071,42 @@ var RelocateMediaInputSchema = object({
8056
8071
  /** Omitted = `move`, the pre-existing behaviour. */
8057
8072
  mode: MediaRelocateModeSchema.optional()
8058
8073
  });
8059
- /** How many rows still carry NO `locationId` — the population a repoint would
8060
- * silently re-aim at a disk that does not hold their bytes. Zero is the only
8061
- * value that permits a non-blocking `eventMedia` cutover. */
8062
- var UnstampedEventMediaCountSchema = object({
8063
- media: number().int().nonnegative(),
8064
- retrainFrames: number().int().nonnegative(),
8065
- total: number().int().nonnegative()
8074
+ /**
8075
+ * The unstamped population of ONE collection split, because the gate and the
8076
+ * operator ask two different questions and only one of them has to be cheap.
8077
+ *
8078
+ * `present` is the GATE: "is there at least one row that would be orphaned by a
8079
+ * repoint". It is a single indexed seek to the first matching row, so it stays
8080
+ * answerable on a saturated disk and answers in O(log n) precisely in the state
8081
+ * that matters — after a seal, when the population is empty.
8082
+ *
8083
+ * `rows` is the NUMBER, for the refusal message and the operator's sense of
8084
+ * scale. It is a second, indexed `COUNT(*)`, and `null` means **not
8085
+ * measurable** — never zero. `{ present: true, rows: null }` is a legitimate
8086
+ * and useful answer: "there are some, and this read could not say how many"
8087
+ * still refuses the cutover, which is the whole job.
8088
+ */
8089
+ var UnstampedRowsSchema = object({
8090
+ present: boolean(),
8091
+ rows: number().int().nonnegative().nullable()
8066
8092
  });
8093
+ /**
8094
+ * How many rows still carry NO `locationId` — the population a repoint would
8095
+ * silently re-aim at a disk that does not hold their bytes.
8096
+ *
8097
+ * **`null` = the count could not be taken**, and it is NOT permission to cut
8098
+ * over. The gate opens on a measured absence and on nothing else; an unread
8099
+ * collection and an empty one are different facts, and this repo has already
8100
+ * paid for conflating them (`RelocateResidueSchema`, D295).
8101
+ */
8102
+ var UnstampedEventMediaCountSchema = object({
8103
+ media: UnstampedRowsSchema,
8104
+ retrainFrames: UnstampedRowsSchema,
8105
+ /** True when EITHER collection holds one. The refusal reads this. */
8106
+ anyPresent: boolean(),
8107
+ /** Sum across both, or `null` when either lane could not be counted. */
8108
+ total: number().int().nonnegative().nullable()
8109
+ }).nullable();
8067
8110
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8068
8111
  /** The independently selectable logical storage classes — every class
8069
8112
  * `storage.listLocationDeclarations` reports, so an operator never meets a
@@ -8149,13 +8192,53 @@ var StorageMigrationParticipantSchema = _enum([
8149
8192
  "recorder",
8150
8193
  "analytics"
8151
8194
  ]);
8195
+ /**
8196
+ * The mover's own numbers, folded onto the coordinator's durable move record.
8197
+ *
8198
+ * The long half of a non-blocking migration is `draining`, and it is measured
8199
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
8200
+ * existed the only place those numbers appeared was a Loki line, so an operator
8201
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
8202
+ * afternoon.
8203
+ *
8204
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
8205
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
8206
+ * mover — which is the exact failure this is meant to end. The coordinator's
8207
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
8208
+ * read `state`; folding the counters costs no extra read and makes the durable
8209
+ * record say afterwards how far a move actually got.
8210
+ *
8211
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
8212
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
8213
+ * cannot say M, and a 0 there would render as "100 % done".
8214
+ */
8215
+ var StorageMigrationMoveProgressSchema = object({
8216
+ filesMoved: number().int().nonnegative(),
8217
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
8218
+ filesTotal: number().int().nonnegative().nullable(),
8219
+ bytesMoved: number().int().nonnegative(),
8220
+ /** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
8221
+ * a lane that cannot reconcile. A migration that silently rewrote durable
8222
+ * rows would be the same failure as one that silently skipped them. */
8223
+ rowsReconciled: number().int().nonnegative().optional(),
8224
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
8225
+ * crash gets a new mover, and a rate computed from the migration's start
8226
+ * would silently average in the time nothing was running. */
8227
+ startedAt: number(),
8228
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
8229
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
8230
+ * subtract its own. */
8231
+ observedAt: number()
8232
+ });
8152
8233
  var StorageMigrationMoveSchema = object({
8153
8234
  storageClass: StorageMigrationClassSchema,
8154
8235
  fromLocationId: string(),
8155
8236
  toLocationId: string(),
8156
8237
  moverJobId: string().nullable(),
8157
8238
  state: RelocateJobStateSchema.nullable(),
8158
- error: string().nullable()
8239
+ error: string().nullable(),
8240
+ /** Last observed mover counters; `null` until the mover has been polled once. */
8241
+ progress: StorageMigrationMoveProgressSchema.nullable()
8159
8242
  });
8160
8243
  var StorageMigrationJobSchema = object({
8161
8244
  jobId: string(),
@@ -8201,6 +8284,98 @@ var StorageMigrationPlanSchema = object({
8201
8284
  findings: array(StorageMigrationFindingSchema)
8202
8285
  });
8203
8286
  /**
8287
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
8288
+ *
8289
+ * The coordinator's job record is the state of record for a migration, and its
8290
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
8291
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
8292
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
8293
+ * way because no supported UI path existed. A mover armed like that has no job
8294
+ * to fold progress into, so it has to be readable on its own or it is invisible.
8295
+ *
8296
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
8297
+ * orchestrated it.
8298
+ */
8299
+ var StorageMigrationMoverSchema = object({
8300
+ lane: _enum(["footage", "media"]),
8301
+ job: RelocateJobSchema,
8302
+ /** The coordinator job that armed this mover, or `null` for a mover armed
8303
+ * directly against the owning addon. */
8304
+ migrationJobId: string().nullable(),
8305
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
8306
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
8307
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
8308
+ * rate made of two different clocks. */
8309
+ observedAt: number()
8310
+ });
8311
+ /**
8312
+ * What a SOURCE still holds for one storage class — the number that makes a
8313
+ * "drain remaining" action honest rather than hopeful.
8314
+ *
8315
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
8316
+ * engine's own selection count for media), never from the resident index: a
8317
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
8318
+ * never been told about (D295).
8319
+ *
8320
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
8321
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
8322
+ * because refusing on an unanswerable read would hide exactly the case an
8323
+ * operator needs to act on.
8324
+ */
8325
+ var StorageMigrationResidueSchema = object({
8326
+ storageClass: StorageMigrationClassSchema,
8327
+ /** The location still holding the data. `'*'` for the media lane, whose rows
8328
+ * move from wherever they are rather than from one named source. */
8329
+ fromLocationId: string(),
8330
+ /** Where a drain would move it — the class's CURRENT default. */
8331
+ toLocationId: string(),
8332
+ /** Segments (footage lane) or rows (media lane) still on the source. */
8333
+ items: number().int().nonnegative().nullable(),
8334
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
8335
+ bytes: number().int().nonnegative().nullable()
8336
+ });
8337
+ /**
8338
+ * Run the DRAIN half and nothing else.
8339
+ *
8340
+ * A migration that reached `done` has already repointed, so `start` correctly
8341
+ * refuses its destination ("already the default") — there is nothing left to
8342
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
8343
+ * or finish against a work list that was a tenth of the archive (D295), and
8344
+ * before this there was no supported way to run only that half: the only way
8345
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
8346
+ *
8347
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
8348
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
8349
+ * re-repoint a class that is already migrated.
8350
+ */
8351
+ var StorageMigrationDrainInputSchema = object({
8352
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
8353
+ * a class whose source is already empty is refused rather than started. */
8354
+ classes: array(StorageMigrationClassSchema).min(1),
8355
+ throttleMbps: number().min(1).max(1e3).optional()
8356
+ });
8357
+ /** What a footage source still holds, asked of the durable hour ledger. */
8358
+ var RelocateResidueInputSchema = object({
8359
+ fromLocationId: string().min(1),
8360
+ /** Narrow to one logical class; omit for every profile on the location. */
8361
+ footageClass: RelocateFootageClassSchema.optional()
8362
+ });
8363
+ /** `null` = the archive could not answer (no ledger on this node, or the
8364
+ * aggregate failed). Never conflated with an empty source. */
8365
+ var RelocateResidueSchema = object({
8366
+ segments: number().int().nonnegative(),
8367
+ bytes: number().int().nonnegative()
8368
+ }).nullable();
8369
+ /** How many rows a media pass would still act on against a given target — the
8370
+ * media lane's denominator AND its residue, from ONE derivation so the two can
8371
+ * never disagree. `null` = the count could not be taken. */
8372
+ var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8373
+ var RelocatableMediaCountInputSchema = object({
8374
+ toLocationId: string().min(1),
8375
+ /** Omitted = `move`. */
8376
+ mode: MediaRelocateModeSchema.optional()
8377
+ });
8378
+ /**
8204
8379
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8205
8380
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8206
8381
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8304,6 +8479,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
8304
8479
  * two addons declaring the same `id` must agree on `cardinality` (validated
8305
8480
  * at kernel aggregation time, not here).
8306
8481
  */
8482
+ /**
8483
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
8484
+ * actually reaches the bytes. It is the constraint that decides which
8485
+ * `storage-provider`s may back a location of that kind.
8486
+ *
8487
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
8488
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
8489
+ * post-analysis media roots). Only a provider that serves a genuine local
8490
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
8491
+ * remote provider's `resolve` returns a path on the REMOTE host, and
8492
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
8493
+ * against a same-named local directory that is something else entirely.
8494
+ *
8495
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
8496
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
8497
+ * service never sees a path, so any provider can back it. `backups` is the
8498
+ * one kind that qualifies today.
8499
+ *
8500
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
8501
+ * an EMERGENT property of how the recorder happened to be written. Nothing
8502
+ * refused the configuration; the first write simply went somewhere wrong, and
8503
+ * a recording write that goes wrong surfaces as a silent black window rather
8504
+ * than an error (the read path does not `stat`). This turns that accident into
8505
+ * a declared, enforced, testable refusal.
8506
+ */
8507
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
8307
8508
  var StorageLocationDeclarationSchema = object({
8308
8509
  /**
8309
8510
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -8323,6 +8524,19 @@ var StorageLocationDeclarationSchema = object({
8323
8524
  */
8324
8525
  cardinality: _enum(["single", "multi"]),
8325
8526
  /**
8527
+ * HOW the declaring service reaches the bytes — and therefore WHICH
8528
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
8529
+ * and {@link STORAGE_ACCESS_FALLBACK}.
8530
+ *
8531
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
8532
+ * can only over-restrict (refuse a remote provider for a kind that might
8533
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
8534
+ * permissive direction and is therefore never inferred — a repo guard
8535
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
8536
+ * reached by omission.
8537
+ */
8538
+ access: StorageAccessSchema.optional(),
8539
+ /**
8326
8540
  * When set, the default instance for this location inherits its resolved
8327
8541
  * root from the named location's default instance. Useful for derivative
8328
8542
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -17848,8 +18062,10 @@ var TrackSchema = object({
17848
18062
  lastSeen: number(),
17849
18063
  /** Frame-rate position history (subject to maxPositionHistory cap). */
17850
18064
  positions: array(TrackPositionSchema).readonly(),
17851
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
17852
- * saveThumbnails policy). */
18065
+ /** Periodic snapshots at snapshotIntervalMs cadence DEBUG media, produced
18066
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
18067
+ * the retired `saveThumbnails` used to gate this and the rolling
18068
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
17853
18069
  snapshots: array(TrackSnapshotSchema).readonly(),
17854
18070
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
17855
18071
  zonesVisited: array(string()).readonly(),
@@ -18709,7 +18925,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18709
18925
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
18710
18926
  kind: "mutation",
18711
18927
  auth: "admin"
18712
- }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
18928
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
18929
+ kind: "query",
18930
+ auth: "admin"
18931
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
18713
18932
  kind: "query",
18714
18933
  auth: "admin"
18715
18934
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20668,6 +20887,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
20668
20887
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20669
20888
  kind: "mutation",
20670
20889
  auth: "admin"
20890
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
20891
+ kind: "mutation",
20892
+ auth: "admin"
20671
20893
  });
20672
20894
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
20673
20895
  providerId: string().min(1),
@@ -21126,12 +21348,38 @@ response: record(string(), unknown()) }), object({
21126
21348
  *
21127
21349
  * ## Why this is a capability and not a helper
21128
21350
  *
21129
- * Six stores in `addon-post-analysis` already hold vectors object CLIP, face,
21130
- * plate, vehicle, identity, and the event store's derivativesand every one of
21131
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
21132
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
21133
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
21134
- * load 5,000 rows before ranking anything.
21351
+ * This capability was introduced with the claim that SIX stores in
21352
+ * `addon-post-analysis` held vectors in a `JSON` settings-store columnobject
21353
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
21354
+ * claim was never true, and leaving it here made five stores look like pending
21355
+ * work when three of them have no vector at all. Counted column by column on
21356
+ * 2026-08-30, exactly THREE ever held one:
21357
+ *
21358
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
21359
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
21360
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
21361
+ * face, migrated 2026-08-30 into its OWN index (see below).
21362
+ *
21363
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
21364
+ * and `identities` store a name; the event store stores no derivative vector.
21365
+ * They are not migration candidates and never were.
21366
+ *
21367
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
21368
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
21369
+ * rows before ranking anything.
21370
+ *
21371
+ * ## One index per COMPARISON, never per encoder
21372
+ *
21373
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
21374
+ * model, and they still get two indexes. An index is a set of things that are
21375
+ * ranked against each other and that live and die together, and these two are
21376
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
21377
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
21378
+ * forever and is the gallery every recognition ranks against. One index would
21379
+ * mean every gallery load and every reconcile carried a filter whose failure
21380
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
21381
+ * person's only sample. The dimension they share is not a reason to share an
21382
+ * index; the question they answer is, and it differs.
21135
21383
  *
21136
21384
  * The fix is not a faster loop, it is a different backend — and the backend
21137
21385
  * should be replaceable without touching six callers. So: a singleton
@@ -21236,7 +21484,20 @@ var VectorQueryResultSchema = object({
21236
21484
  */
21237
21485
  scanned: number(),
21238
21486
  /** True when the backend could not consider every row that passed the filter. */
21239
- truncated: boolean()
21487
+ truncated: boolean(),
21488
+ /**
21489
+ * The `topK` the backend actually ran with.
21490
+ *
21491
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
21492
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
21493
+ * own log rather than in its answer. That is how an audit asking for 20,000
21494
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
21495
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
21496
+ * MUCH, in the return value, where the caller cannot fail to see it.
21497
+ *
21498
+ * Equals the requested `topK` whenever nothing was lowered.
21499
+ */
21500
+ effectiveTopK: number().int().positive()
21240
21501
  });
21241
21502
  var VectorDeleteInputSchema = object({
21242
21503
  index: string(),
@@ -21265,6 +21526,68 @@ var VectorGetResultSchema = object({ items: array(object({
21265
21526
  id: string(),
21266
21527
  metadata: VectorMetadataSchema
21267
21528
  })) });
21529
+ /**
21530
+ * Ids to read back WITH their vectors.
21531
+ *
21532
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
21533
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
21534
+ * caller depends on that promise. This one promises the opposite.
21535
+ *
21536
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
21537
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
21538
+ * a per-face cross-process KNN would be a network round trip inside the
21539
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
21540
+ * it requires the index to hand the floats back. Without this method the only
21541
+ * way to keep a readable vector is a JSON column, which is the thing this
21542
+ * capability exists to delete.
21543
+ *
21544
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
21545
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
21546
+ */
21547
+ var VectorFetchInputSchema = object({
21548
+ index: string(),
21549
+ ids: array(string())
21550
+ });
21551
+ var VectorFetchResultSchema = object({ items: array(object({
21552
+ id: string(),
21553
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
21554
+ vector: string(),
21555
+ metadata: VectorMetadataSchema
21556
+ })) });
21557
+ /**
21558
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
21559
+ *
21560
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
21561
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
21562
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
21563
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
21564
+ * distance to every row is degenerate. `examined: 4096` then read as "we
21565
+ * looked" for as long as anyone cared to read it.
21566
+ *
21567
+ * This is the primitive that question actually needs: a bounded page, ordered
21568
+ * by the backend's own row order, costing no distance computation at all.
21569
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
21570
+ * the full-table read this capability was built to stop.
21571
+ */
21572
+ var VectorScanInputSchema = object({
21573
+ index: string(),
21574
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
21575
+ cursor: number().int().nonnegative().default(0),
21576
+ limit: number().int().positive()
21577
+ });
21578
+ var VectorScanResultSchema = object({
21579
+ items: array(object({
21580
+ id: string(),
21581
+ metadata: VectorMetadataSchema
21582
+ })),
21583
+ /**
21584
+ * Where the next page starts, or `null` when the walk reached the end.
21585
+ *
21586
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
21587
+ * from a short page: a backend is free to return fewer rows than asked.
21588
+ */
21589
+ nextCursor: number().int().nonnegative().nullable()
21590
+ });
21268
21591
  var VectorStatsInputSchema = object({ index: string() });
21269
21592
  var VectorStatsResultSchema = object({
21270
21593
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -21283,7 +21606,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
21283
21606
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
21284
21607
  kind: "mutation",
21285
21608
  auth: "admin"
21286
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21609
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21287
21610
  kind: "mutation",
21288
21611
  auth: "admin"
21289
21612
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -26187,6 +26510,9 @@ method(object({
26187
26510
  }), method(object({}), array(RelocateJobSchema).readonly(), {
26188
26511
  kind: "query",
26189
26512
  auth: "admin"
26513
+ }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26514
+ kind: "query",
26515
+ auth: "admin"
26190
26516
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26191
26517
  kind: "mutation",
26192
26518
  auth: "admin"
@@ -31152,6 +31478,12 @@ Object.freeze({
31152
31478
  addonId: null,
31153
31479
  access: "create"
31154
31480
  },
31481
+ "pipelineAnalytics.countRelocatableMedia": {
31482
+ capName: "pipeline-analytics",
31483
+ capScope: "device",
31484
+ addonId: null,
31485
+ access: "view"
31486
+ },
31155
31487
  "pipelineAnalytics.countUnstampedEventMedia": {
31156
31488
  capName: "pipeline-analytics",
31157
31489
  capScope: "device",
@@ -32316,6 +32648,12 @@ Object.freeze({
32316
32648
  addonId: null,
32317
32649
  access: "view"
32318
32650
  },
32651
+ "recording.getRelocateResidue": {
32652
+ capName: "recording",
32653
+ capScope: "system",
32654
+ addonId: null,
32655
+ access: "view"
32656
+ },
32319
32657
  "recording.getStorageMigrationMoveStatus": {
32320
32658
  capName: "recording",
32321
32659
  capScope: "system",
@@ -32862,12 +33200,30 @@ Object.freeze({
32862
33200
  addonId: null,
32863
33201
  access: "create"
32864
33202
  },
33203
+ "storageMigration.drain": {
33204
+ capName: "storage-migration",
33205
+ capScope: "system",
33206
+ addonId: null,
33207
+ access: "create"
33208
+ },
33209
+ "storageMigration.movers": {
33210
+ capName: "storage-migration",
33211
+ capScope: "system",
33212
+ addonId: null,
33213
+ access: "view"
33214
+ },
32865
33215
  "storageMigration.plan": {
32866
33216
  capName: "storage-migration",
32867
33217
  capScope: "system",
32868
33218
  addonId: null,
32869
33219
  access: "view"
32870
33220
  },
33221
+ "storageMigration.residue": {
33222
+ capName: "storage-migration",
33223
+ capScope: "system",
33224
+ addonId: null,
33225
+ access: "view"
33226
+ },
32871
33227
  "storageMigration.start": {
32872
33228
  capName: "storage-migration",
32873
33229
  capScope: "system",
@@ -33702,6 +34058,12 @@ Object.freeze({
33702
34058
  addonId: null,
33703
34059
  access: "delete"
33704
34060
  },
34061
+ "vectorStore.fetchByIds": {
34062
+ capName: "vector-store",
34063
+ capScope: "system",
34064
+ addonId: null,
34065
+ access: "view"
34066
+ },
33705
34067
  "vectorStore.getByIds": {
33706
34068
  capName: "vector-store",
33707
34069
  capScope: "system",
@@ -33714,6 +34076,12 @@ Object.freeze({
33714
34076
  addonId: null,
33715
34077
  access: "view"
33716
34078
  },
34079
+ "vectorStore.scan": {
34080
+ capName: "vector-store",
34081
+ capScope: "system",
34082
+ addonId: null,
34083
+ access: "view"
34084
+ },
33717
34085
  "vectorStore.stats": {
33718
34086
  capName: "vector-store",
33719
34087
  capScope: "system",