@camstack/addon-pipeline-orchestrator 1.2.123 → 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/index.js CHANGED
@@ -8879,6 +8879,21 @@ var RelocateJobSchema = object({
8879
8879
  bytesMoved: number().int(),
8880
8880
  /** Total files discovered up front; null while (or when) unknown. */
8881
8881
  filesTotal: number().int().nullable(),
8882
+ /**
8883
+ * Rows this run CORRECTED while moving them — a durable mutation the move
8884
+ * made that nobody asked for, so it is reported where the operator reads the
8885
+ * job rather than only in a log line.
8886
+ *
8887
+ * A footage segment records its byte count in its own NAME, and the durable
8888
+ * hour row derives its aggregates from those names. A file that does not
8889
+ * match its name therefore makes the ledger's sums — and with them quota and
8890
+ * pressure eviction — wrong by the difference, and only a rename can fix it.
8891
+ * On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
8892
+ *
8893
+ * Absent on lanes where the question has no meaning: a media blob's size is
8894
+ * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8895
+ */
8896
+ rowsReconciled: number().int().nonnegative().optional(),
8882
8897
  startedAt: number(),
8883
8898
  finishedAt: number().nullable(),
8884
8899
  error: string().nullable()
@@ -8947,14 +8962,42 @@ var RelocateMediaInputSchema = object({
8947
8962
  /** Omitted = `move`, the pre-existing behaviour. */
8948
8963
  mode: MediaRelocateModeSchema.optional()
8949
8964
  });
8950
- /** How many rows still carry NO `locationId` — the population a repoint would
8951
- * silently re-aim at a disk that does not hold their bytes. Zero is the only
8952
- * value that permits a non-blocking `eventMedia` cutover. */
8953
- var UnstampedEventMediaCountSchema = object({
8954
- media: number().int().nonnegative(),
8955
- retrainFrames: number().int().nonnegative(),
8956
- total: number().int().nonnegative()
8965
+ /**
8966
+ * The unstamped population of ONE collection split, because the gate and the
8967
+ * operator ask two different questions and only one of them has to be cheap.
8968
+ *
8969
+ * `present` is the GATE: "is there at least one row that would be orphaned by a
8970
+ * repoint". It is a single indexed seek to the first matching row, so it stays
8971
+ * answerable on a saturated disk and answers in O(log n) precisely in the state
8972
+ * that matters — after a seal, when the population is empty.
8973
+ *
8974
+ * `rows` is the NUMBER, for the refusal message and the operator's sense of
8975
+ * scale. It is a second, indexed `COUNT(*)`, and `null` means **not
8976
+ * measurable** — never zero. `{ present: true, rows: null }` is a legitimate
8977
+ * and useful answer: "there are some, and this read could not say how many"
8978
+ * still refuses the cutover, which is the whole job.
8979
+ */
8980
+ var UnstampedRowsSchema = object({
8981
+ present: boolean(),
8982
+ rows: number().int().nonnegative().nullable()
8957
8983
  });
8984
+ /**
8985
+ * How many rows still carry NO `locationId` — the population a repoint would
8986
+ * silently re-aim at a disk that does not hold their bytes.
8987
+ *
8988
+ * **`null` = the count could not be taken**, and it is NOT permission to cut
8989
+ * over. The gate opens on a measured absence and on nothing else; an unread
8990
+ * collection and an empty one are different facts, and this repo has already
8991
+ * paid for conflating them (`RelocateResidueSchema`, D295).
8992
+ */
8993
+ var UnstampedEventMediaCountSchema = object({
8994
+ media: UnstampedRowsSchema,
8995
+ retrainFrames: UnstampedRowsSchema,
8996
+ /** True when EITHER collection holds one. The refusal reads this. */
8997
+ anyPresent: boolean(),
8998
+ /** Sum across both, or `null` when either lane could not be counted. */
8999
+ total: number().int().nonnegative().nullable()
9000
+ }).nullable();
8958
9001
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8959
9002
  /** The independently selectable logical storage classes — every class
8960
9003
  * `storage.listLocationDeclarations` reports, so an operator never meets a
@@ -9040,13 +9083,53 @@ var StorageMigrationParticipantSchema = _enum([
9040
9083
  "recorder",
9041
9084
  "analytics"
9042
9085
  ]);
9086
+ /**
9087
+ * The mover's own numbers, folded onto the coordinator's durable move record.
9088
+ *
9089
+ * The long half of a non-blocking migration is `draining`, and it is measured
9090
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
9091
+ * existed the only place those numbers appeared was a Loki line, so an operator
9092
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
9093
+ * afternoon.
9094
+ *
9095
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
9096
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
9097
+ * mover — which is the exact failure this is meant to end. The coordinator's
9098
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
9099
+ * read `state`; folding the counters costs no extra read and makes the durable
9100
+ * record say afterwards how far a move actually got.
9101
+ *
9102
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
9103
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
9104
+ * cannot say M, and a 0 there would render as "100 % done".
9105
+ */
9106
+ var StorageMigrationMoveProgressSchema = object({
9107
+ filesMoved: number().int().nonnegative(),
9108
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
9109
+ filesTotal: number().int().nonnegative().nullable(),
9110
+ bytesMoved: number().int().nonnegative(),
9111
+ /** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
9112
+ * a lane that cannot reconcile. A migration that silently rewrote durable
9113
+ * rows would be the same failure as one that silently skipped them. */
9114
+ rowsReconciled: number().int().nonnegative().optional(),
9115
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
9116
+ * crash gets a new mover, and a rate computed from the migration's start
9117
+ * would silently average in the time nothing was running. */
9118
+ startedAt: number(),
9119
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
9120
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
9121
+ * subtract its own. */
9122
+ observedAt: number()
9123
+ });
9043
9124
  var StorageMigrationMoveSchema = object({
9044
9125
  storageClass: StorageMigrationClassSchema,
9045
9126
  fromLocationId: string(),
9046
9127
  toLocationId: string(),
9047
9128
  moverJobId: string().nullable(),
9048
9129
  state: RelocateJobStateSchema.nullable(),
9049
- error: string().nullable()
9130
+ error: string().nullable(),
9131
+ /** Last observed mover counters; `null` until the mover has been polled once. */
9132
+ progress: StorageMigrationMoveProgressSchema.nullable()
9050
9133
  });
9051
9134
  var StorageMigrationJobSchema = object({
9052
9135
  jobId: string(),
@@ -9092,6 +9175,98 @@ var StorageMigrationPlanSchema = object({
9092
9175
  findings: array(StorageMigrationFindingSchema)
9093
9176
  });
9094
9177
  /**
9178
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
9179
+ *
9180
+ * The coordinator's job record is the state of record for a migration, and its
9181
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
9182
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
9183
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
9184
+ * way because no supported UI path existed. A mover armed like that has no job
9185
+ * to fold progress into, so it has to be readable on its own or it is invisible.
9186
+ *
9187
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
9188
+ * orchestrated it.
9189
+ */
9190
+ var StorageMigrationMoverSchema = object({
9191
+ lane: _enum(["footage", "media"]),
9192
+ job: RelocateJobSchema,
9193
+ /** The coordinator job that armed this mover, or `null` for a mover armed
9194
+ * directly against the owning addon. */
9195
+ migrationJobId: string().nullable(),
9196
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
9197
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
9198
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
9199
+ * rate made of two different clocks. */
9200
+ observedAt: number()
9201
+ });
9202
+ /**
9203
+ * What a SOURCE still holds for one storage class — the number that makes a
9204
+ * "drain remaining" action honest rather than hopeful.
9205
+ *
9206
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
9207
+ * engine's own selection count for media), never from the resident index: a
9208
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
9209
+ * never been told about (D295).
9210
+ *
9211
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
9212
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
9213
+ * because refusing on an unanswerable read would hide exactly the case an
9214
+ * operator needs to act on.
9215
+ */
9216
+ var StorageMigrationResidueSchema = object({
9217
+ storageClass: StorageMigrationClassSchema,
9218
+ /** The location still holding the data. `'*'` for the media lane, whose rows
9219
+ * move from wherever they are rather than from one named source. */
9220
+ fromLocationId: string(),
9221
+ /** Where a drain would move it — the class's CURRENT default. */
9222
+ toLocationId: string(),
9223
+ /** Segments (footage lane) or rows (media lane) still on the source. */
9224
+ items: number().int().nonnegative().nullable(),
9225
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
9226
+ bytes: number().int().nonnegative().nullable()
9227
+ });
9228
+ /**
9229
+ * Run the DRAIN half and nothing else.
9230
+ *
9231
+ * A migration that reached `done` has already repointed, so `start` correctly
9232
+ * refuses its destination ("already the default") — there is nothing left to
9233
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
9234
+ * or finish against a work list that was a tenth of the archive (D295), and
9235
+ * before this there was no supported way to run only that half: the only way
9236
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
9237
+ *
9238
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
9239
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
9240
+ * re-repoint a class that is already migrated.
9241
+ */
9242
+ var StorageMigrationDrainInputSchema = object({
9243
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
9244
+ * a class whose source is already empty is refused rather than started. */
9245
+ classes: array(StorageMigrationClassSchema).min(1),
9246
+ throttleMbps: number().min(1).max(1e3).optional()
9247
+ });
9248
+ /** What a footage source still holds, asked of the durable hour ledger. */
9249
+ var RelocateResidueInputSchema = object({
9250
+ fromLocationId: string().min(1),
9251
+ /** Narrow to one logical class; omit for every profile on the location. */
9252
+ footageClass: RelocateFootageClassSchema.optional()
9253
+ });
9254
+ /** `null` = the archive could not answer (no ledger on this node, or the
9255
+ * aggregate failed). Never conflated with an empty source. */
9256
+ var RelocateResidueSchema = object({
9257
+ segments: number().int().nonnegative(),
9258
+ bytes: number().int().nonnegative()
9259
+ }).nullable();
9260
+ /** How many rows a media pass would still act on against a given target — the
9261
+ * media lane's denominator AND its residue, from ONE derivation so the two can
9262
+ * never disagree. `null` = the count could not be taken. */
9263
+ var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
9264
+ var RelocatableMediaCountInputSchema = object({
9265
+ toLocationId: string().min(1),
9266
+ /** Omitted = `move`. */
9267
+ mode: MediaRelocateModeSchema.optional()
9268
+ });
9269
+ /**
9095
9270
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9096
9271
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9097
9272
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9195,6 +9370,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
9195
9370
  * two addons declaring the same `id` must agree on `cardinality` (validated
9196
9371
  * at kernel aggregation time, not here).
9197
9372
  */
9373
+ /**
9374
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
9375
+ * actually reaches the bytes. It is the constraint that decides which
9376
+ * `storage-provider`s may back a location of that kind.
9377
+ *
9378
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
9379
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
9380
+ * post-analysis media roots). Only a provider that serves a genuine local
9381
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
9382
+ * remote provider's `resolve` returns a path on the REMOTE host, and
9383
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
9384
+ * against a same-named local directory that is something else entirely.
9385
+ *
9386
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
9387
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
9388
+ * service never sees a path, so any provider can back it. `backups` is the
9389
+ * one kind that qualifies today.
9390
+ *
9391
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
9392
+ * an EMERGENT property of how the recorder happened to be written. Nothing
9393
+ * refused the configuration; the first write simply went somewhere wrong, and
9394
+ * a recording write that goes wrong surfaces as a silent black window rather
9395
+ * than an error (the read path does not `stat`). This turns that accident into
9396
+ * a declared, enforced, testable refusal.
9397
+ */
9398
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
9198
9399
  var StorageLocationDeclarationSchema = object({
9199
9400
  /**
9200
9401
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -9214,6 +9415,19 @@ var StorageLocationDeclarationSchema = object({
9214
9415
  */
9215
9416
  cardinality: _enum(["single", "multi"]),
9216
9417
  /**
9418
+ * HOW the declaring service reaches the bytes — and therefore WHICH
9419
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
9420
+ * and {@link STORAGE_ACCESS_FALLBACK}.
9421
+ *
9422
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
9423
+ * can only over-restrict (refuse a remote provider for a kind that might
9424
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
9425
+ * permissive direction and is therefore never inferred — a repo guard
9426
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
9427
+ * reached by omission.
9428
+ */
9429
+ access: StorageAccessSchema.optional(),
9430
+ /**
9217
9431
  * When set, the default instance for this location inherits its resolved
9218
9432
  * root from the named location's default instance. Useful for derivative
9219
9433
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -19042,8 +19256,10 @@ var TrackSchema = object({
19042
19256
  lastSeen: number(),
19043
19257
  /** Frame-rate position history (subject to maxPositionHistory cap). */
19044
19258
  positions: array(TrackPositionSchema).readonly(),
19045
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
19046
- * saveThumbnails policy). */
19259
+ /** Periodic snapshots at snapshotIntervalMs cadence DEBUG media, produced
19260
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
19261
+ * the retired `saveThumbnails` used to gate this and the rolling
19262
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
19047
19263
  snapshots: array(TrackSnapshotSchema).readonly(),
19048
19264
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
19049
19265
  zonesVisited: array(string()).readonly(),
@@ -19903,7 +20119,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19903
20119
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19904
20120
  kind: "mutation",
19905
20121
  auth: "admin"
19906
- }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
20122
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
20123
+ kind: "query",
20124
+ auth: "admin"
20125
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
19907
20126
  kind: "query",
19908
20127
  auth: "admin"
19909
20128
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -22343,6 +22562,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
22343
22562
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
22344
22563
  kind: "mutation",
22345
22564
  auth: "admin"
22565
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
22566
+ kind: "mutation",
22567
+ auth: "admin"
22346
22568
  });
22347
22569
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
22348
22570
  providerId: string().min(1),
@@ -22741,12 +22963,38 @@ response: record(string(), unknown()) }), object({
22741
22963
  *
22742
22964
  * ## Why this is a capability and not a helper
22743
22965
  *
22744
- * Six stores in `addon-post-analysis` already hold vectors object CLIP, face,
22745
- * plate, vehicle, identity, and the event store's derivativesand every one of
22746
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
22747
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
22748
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
22749
- * load 5,000 rows before ranking anything.
22966
+ * This capability was introduced with the claim that SIX stores in
22967
+ * `addon-post-analysis` held vectors in a `JSON` settings-store columnobject
22968
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
22969
+ * claim was never true, and leaving it here made five stores look like pending
22970
+ * work when three of them have no vector at all. Counted column by column on
22971
+ * 2026-08-30, exactly THREE ever held one:
22972
+ *
22973
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
22974
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
22975
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
22976
+ * face, migrated 2026-08-30 into its OWN index (see below).
22977
+ *
22978
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
22979
+ * and `identities` store a name; the event store stores no derivative vector.
22980
+ * They are not migration candidates and never were.
22981
+ *
22982
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
22983
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
22984
+ * rows before ranking anything.
22985
+ *
22986
+ * ## One index per COMPARISON, never per encoder
22987
+ *
22988
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
22989
+ * model, and they still get two indexes. An index is a set of things that are
22990
+ * ranked against each other and that live and die together, and these two are
22991
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
22992
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
22993
+ * forever and is the gallery every recognition ranks against. One index would
22994
+ * mean every gallery load and every reconcile carried a filter whose failure
22995
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
22996
+ * person's only sample. The dimension they share is not a reason to share an
22997
+ * index; the question they answer is, and it differs.
22750
22998
  *
22751
22999
  * The fix is not a faster loop, it is a different backend — and the backend
22752
23000
  * should be replaceable without touching six callers. So: a singleton
@@ -22851,7 +23099,20 @@ var VectorQueryResultSchema = object({
22851
23099
  */
22852
23100
  scanned: number(),
22853
23101
  /** True when the backend could not consider every row that passed the filter. */
22854
- truncated: boolean()
23102
+ truncated: boolean(),
23103
+ /**
23104
+ * The `topK` the backend actually ran with.
23105
+ *
23106
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
23107
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
23108
+ * own log rather than in its answer. That is how an audit asking for 20,000
23109
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
23110
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
23111
+ * MUCH, in the return value, where the caller cannot fail to see it.
23112
+ *
23113
+ * Equals the requested `topK` whenever nothing was lowered.
23114
+ */
23115
+ effectiveTopK: number().int().positive()
22855
23116
  });
22856
23117
  var VectorDeleteInputSchema = object({
22857
23118
  index: string(),
@@ -22880,6 +23141,68 @@ var VectorGetResultSchema = object({ items: array(object({
22880
23141
  id: string(),
22881
23142
  metadata: VectorMetadataSchema
22882
23143
  })) });
23144
+ /**
23145
+ * Ids to read back WITH their vectors.
23146
+ *
23147
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
23148
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
23149
+ * caller depends on that promise. This one promises the opposite.
23150
+ *
23151
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
23152
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
23153
+ * a per-face cross-process KNN would be a network round trip inside the
23154
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
23155
+ * it requires the index to hand the floats back. Without this method the only
23156
+ * way to keep a readable vector is a JSON column, which is the thing this
23157
+ * capability exists to delete.
23158
+ *
23159
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
23160
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
23161
+ */
23162
+ var VectorFetchInputSchema = object({
23163
+ index: string(),
23164
+ ids: array(string())
23165
+ });
23166
+ var VectorFetchResultSchema = object({ items: array(object({
23167
+ id: string(),
23168
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
23169
+ vector: string(),
23170
+ metadata: VectorMetadataSchema
23171
+ })) });
23172
+ /**
23173
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
23174
+ *
23175
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
23176
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
23177
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
23178
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
23179
+ * distance to every row is degenerate. `examined: 4096` then read as "we
23180
+ * looked" for as long as anyone cared to read it.
23181
+ *
23182
+ * This is the primitive that question actually needs: a bounded page, ordered
23183
+ * by the backend's own row order, costing no distance computation at all.
23184
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
23185
+ * the full-table read this capability was built to stop.
23186
+ */
23187
+ var VectorScanInputSchema = object({
23188
+ index: string(),
23189
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
23190
+ cursor: number().int().nonnegative().default(0),
23191
+ limit: number().int().positive()
23192
+ });
23193
+ var VectorScanResultSchema = object({
23194
+ items: array(object({
23195
+ id: string(),
23196
+ metadata: VectorMetadataSchema
23197
+ })),
23198
+ /**
23199
+ * Where the next page starts, or `null` when the walk reached the end.
23200
+ *
23201
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
23202
+ * from a short page: a backend is free to return fewer rows than asked.
23203
+ */
23204
+ nextCursor: number().int().nonnegative().nullable()
23205
+ });
22883
23206
  var VectorStatsInputSchema = object({ index: string() });
22884
23207
  var VectorStatsResultSchema = object({
22885
23208
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -22898,7 +23221,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
22898
23221
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
22899
23222
  kind: "mutation",
22900
23223
  auth: "admin"
22901
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
23224
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
22902
23225
  kind: "mutation",
22903
23226
  auth: "admin"
22904
23227
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -27802,6 +28125,9 @@ method(object({
27802
28125
  }), method(object({}), array(RelocateJobSchema).readonly(), {
27803
28126
  kind: "query",
27804
28127
  auth: "admin"
28128
+ }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28129
+ kind: "query",
28130
+ auth: "admin"
27805
28131
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
27806
28132
  kind: "mutation",
27807
28133
  auth: "admin"
@@ -32851,6 +33177,12 @@ Object.freeze({
32851
33177
  addonId: null,
32852
33178
  access: "create"
32853
33179
  },
33180
+ "pipelineAnalytics.countRelocatableMedia": {
33181
+ capName: "pipeline-analytics",
33182
+ capScope: "device",
33183
+ addonId: null,
33184
+ access: "view"
33185
+ },
32854
33186
  "pipelineAnalytics.countUnstampedEventMedia": {
32855
33187
  capName: "pipeline-analytics",
32856
33188
  capScope: "device",
@@ -34015,6 +34347,12 @@ Object.freeze({
34015
34347
  addonId: null,
34016
34348
  access: "view"
34017
34349
  },
34350
+ "recording.getRelocateResidue": {
34351
+ capName: "recording",
34352
+ capScope: "system",
34353
+ addonId: null,
34354
+ access: "view"
34355
+ },
34018
34356
  "recording.getStorageMigrationMoveStatus": {
34019
34357
  capName: "recording",
34020
34358
  capScope: "system",
@@ -34561,12 +34899,30 @@ Object.freeze({
34561
34899
  addonId: null,
34562
34900
  access: "create"
34563
34901
  },
34902
+ "storageMigration.drain": {
34903
+ capName: "storage-migration",
34904
+ capScope: "system",
34905
+ addonId: null,
34906
+ access: "create"
34907
+ },
34908
+ "storageMigration.movers": {
34909
+ capName: "storage-migration",
34910
+ capScope: "system",
34911
+ addonId: null,
34912
+ access: "view"
34913
+ },
34564
34914
  "storageMigration.plan": {
34565
34915
  capName: "storage-migration",
34566
34916
  capScope: "system",
34567
34917
  addonId: null,
34568
34918
  access: "view"
34569
34919
  },
34920
+ "storageMigration.residue": {
34921
+ capName: "storage-migration",
34922
+ capScope: "system",
34923
+ addonId: null,
34924
+ access: "view"
34925
+ },
34570
34926
  "storageMigration.start": {
34571
34927
  capName: "storage-migration",
34572
34928
  capScope: "system",
@@ -35401,6 +35757,12 @@ Object.freeze({
35401
35757
  addonId: null,
35402
35758
  access: "delete"
35403
35759
  },
35760
+ "vectorStore.fetchByIds": {
35761
+ capName: "vector-store",
35762
+ capScope: "system",
35763
+ addonId: null,
35764
+ access: "view"
35765
+ },
35404
35766
  "vectorStore.getByIds": {
35405
35767
  capName: "vector-store",
35406
35768
  capScope: "system",
@@ -35413,6 +35775,12 @@ Object.freeze({
35413
35775
  addonId: null,
35414
35776
  access: "view"
35415
35777
  },
35778
+ "vectorStore.scan": {
35779
+ capName: "vector-store",
35780
+ capScope: "system",
35781
+ addonId: null,
35782
+ access: "view"
35783
+ },
35416
35784
  "vectorStore.stats": {
35417
35785
  capName: "vector-store",
35418
35786
  capScope: "system",