@camstack/addon-pipeline 1.2.149 → 1.2.152

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.
Files changed (36) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/detection-pipeline/index.js +5 -5
  4. package/dist/detection-pipeline/index.mjs +4 -4
  5. package/dist/{dist-DLy_uz82.js → dist-BpofTthV.js} +398 -19
  6. package/dist/{dist-DjplinYP.mjs → dist-DoaR6NDJ.mjs} +398 -19
  7. package/dist/{lazy-sharp-BI4LsfMM.js → lazy-sharp-D6sSNL-G.js} +1 -1
  8. package/dist/{local-frame-registry-Dr_U_xCG.js → local-frame-registry-4MCvZQ2t.js} +1 -1
  9. package/dist/{local-frame-registry-77FL9ua_.mjs → local-frame-registry-Dr8irbU_.mjs} +1 -1
  10. package/dist/motion-wasm/index.js +2 -2
  11. package/dist/motion-wasm/index.mjs +1 -1
  12. package/dist/{node-D7uxWSXD.mjs → node-CeSZTDKV.mjs} +1 -1
  13. package/dist/{node-BHFLhfkh.js → node-DG_kTYFM.js} +1 -1
  14. package/dist/pipeline-runner/index.js +5 -5
  15. package/dist/pipeline-runner/index.mjs +4 -4
  16. package/dist/{process-memory-B2tApNua.mjs → process-memory-DJoquJSu.mjs} +1 -1
  17. package/dist/{process-memory-M8WiR3qj.js → process-memory-DglWLA3J.js} +1 -1
  18. package/dist/recorder/index.js +7692 -6116
  19. package/dist/recorder/index.mjs +7692 -6116
  20. package/dist/{segment-demux-js-3niBZUpJ.mjs → segment-demux-js-Clx6DzLe.mjs} +1 -1
  21. package/dist/{segment-demux-js-Cc_If7C_.js → segment-demux-js-DUSMkFTq.js} +1 -1
  22. package/dist/session-decode/decode-worker-child.js +2 -2
  23. package/dist/session-decode/decode-worker-child.mjs +1 -1
  24. package/dist/stream-broker/_stub.js +2 -2
  25. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-QfvsYvjB.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BntoKYim.mjs} +3 -3
  26. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DXrU11Bz.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-C-HJX19g.mjs} +1 -1
  27. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CgIcw5Wl.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Cyyhy_D8.mjs} +1 -1
  28. package/dist/stream-broker/demux-worker-child.js +1 -1
  29. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  30. package/dist/stream-broker/{hostInit-Dd2CEvDK.mjs → hostInit--5tl1XaO.mjs} +3 -3
  31. package/dist/stream-broker/index.js +3 -3
  32. package/dist/stream-broker/index.mjs +3 -3
  33. package/dist/stream-broker/remoteEntry.js +1 -1
  34. package/dist/{worker-protocol-Cvln9GmS.mjs → worker-protocol-Ar0-GAh5.mjs} +1 -1
  35. package/dist/{worker-protocol-basMNc_q.js → worker-protocol-C8bHw-bu.js} +1 -1
  36. package/package.json +1 -1
@@ -9315,6 +9315,21 @@ var RelocateJobSchema = object({
9315
9315
  bytesMoved: number().int(),
9316
9316
  /** Total files discovered up front; null while (or when) unknown. */
9317
9317
  filesTotal: number().int().nullable(),
9318
+ /**
9319
+ * Rows this run CORRECTED while moving them — a durable mutation the move
9320
+ * made that nobody asked for, so it is reported where the operator reads the
9321
+ * job rather than only in a log line.
9322
+ *
9323
+ * A footage segment records its byte count in its own NAME, and the durable
9324
+ * hour row derives its aggregates from those names. A file that does not
9325
+ * match its name therefore makes the ledger's sums — and with them quota and
9326
+ * pressure eviction — wrong by the difference, and only a rename can fix it.
9327
+ * On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
9328
+ *
9329
+ * Absent on lanes where the question has no meaning: a media blob's size is
9330
+ * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
9331
+ */
9332
+ rowsReconciled: number().int().nonnegative().optional(),
9318
9333
  startedAt: number(),
9319
9334
  finishedAt: number().nullable(),
9320
9335
  error: string().nullable()
@@ -9383,14 +9398,42 @@ var RelocateMediaInputSchema = object({
9383
9398
  /** Omitted = `move`, the pre-existing behaviour. */
9384
9399
  mode: MediaRelocateModeSchema.optional()
9385
9400
  });
9386
- /** How many rows still carry NO `locationId` — the population a repoint would
9387
- * silently re-aim at a disk that does not hold their bytes. Zero is the only
9388
- * value that permits a non-blocking `eventMedia` cutover. */
9389
- var UnstampedEventMediaCountSchema = object({
9390
- media: number().int().nonnegative(),
9391
- retrainFrames: number().int().nonnegative(),
9392
- total: number().int().nonnegative()
9401
+ /**
9402
+ * The unstamped population of ONE collection split, because the gate and the
9403
+ * operator ask two different questions and only one of them has to be cheap.
9404
+ *
9405
+ * `present` is the GATE: "is there at least one row that would be orphaned by a
9406
+ * repoint". It is a single indexed seek to the first matching row, so it stays
9407
+ * answerable on a saturated disk and answers in O(log n) precisely in the state
9408
+ * that matters — after a seal, when the population is empty.
9409
+ *
9410
+ * `rows` is the NUMBER, for the refusal message and the operator's sense of
9411
+ * scale. It is a second, indexed `COUNT(*)`, and `null` means **not
9412
+ * measurable** — never zero. `{ present: true, rows: null }` is a legitimate
9413
+ * and useful answer: "there are some, and this read could not say how many"
9414
+ * still refuses the cutover, which is the whole job.
9415
+ */
9416
+ var UnstampedRowsSchema = object({
9417
+ present: boolean(),
9418
+ rows: number().int().nonnegative().nullable()
9393
9419
  });
9420
+ /**
9421
+ * How many rows still carry NO `locationId` — the population a repoint would
9422
+ * silently re-aim at a disk that does not hold their bytes.
9423
+ *
9424
+ * **`null` = the count could not be taken**, and it is NOT permission to cut
9425
+ * over. The gate opens on a measured absence and on nothing else; an unread
9426
+ * collection and an empty one are different facts, and this repo has already
9427
+ * paid for conflating them (`RelocateResidueSchema`, D295).
9428
+ */
9429
+ var UnstampedEventMediaCountSchema = object({
9430
+ media: UnstampedRowsSchema,
9431
+ retrainFrames: UnstampedRowsSchema,
9432
+ /** True when EITHER collection holds one. The refusal reads this. */
9433
+ anyPresent: boolean(),
9434
+ /** Sum across both, or `null` when either lane could not be counted. */
9435
+ total: number().int().nonnegative().nullable()
9436
+ }).nullable();
9394
9437
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
9395
9438
  /** The independently selectable logical storage classes — every class
9396
9439
  * `storage.listLocationDeclarations` reports, so an operator never meets a
@@ -9476,13 +9519,53 @@ var StorageMigrationParticipantSchema = _enum([
9476
9519
  "recorder",
9477
9520
  "analytics"
9478
9521
  ]);
9522
+ /**
9523
+ * The mover's own numbers, folded onto the coordinator's durable move record.
9524
+ *
9525
+ * The long half of a non-blocking migration is `draining`, and it is measured
9526
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
9527
+ * existed the only place those numbers appeared was a Loki line, so an operator
9528
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
9529
+ * afternoon.
9530
+ *
9531
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
9532
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
9533
+ * mover — which is the exact failure this is meant to end. The coordinator's
9534
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
9535
+ * read `state`; folding the counters costs no extra read and makes the durable
9536
+ * record say afterwards how far a move actually got.
9537
+ *
9538
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
9539
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
9540
+ * cannot say M, and a 0 there would render as "100 % done".
9541
+ */
9542
+ var StorageMigrationMoveProgressSchema = object({
9543
+ filesMoved: number().int().nonnegative(),
9544
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
9545
+ filesTotal: number().int().nonnegative().nullable(),
9546
+ bytesMoved: number().int().nonnegative(),
9547
+ /** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
9548
+ * a lane that cannot reconcile. A migration that silently rewrote durable
9549
+ * rows would be the same failure as one that silently skipped them. */
9550
+ rowsReconciled: number().int().nonnegative().optional(),
9551
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
9552
+ * crash gets a new mover, and a rate computed from the migration's start
9553
+ * would silently average in the time nothing was running. */
9554
+ startedAt: number(),
9555
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
9556
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
9557
+ * subtract its own. */
9558
+ observedAt: number()
9559
+ });
9479
9560
  var StorageMigrationMoveSchema = object({
9480
9561
  storageClass: StorageMigrationClassSchema,
9481
9562
  fromLocationId: string(),
9482
9563
  toLocationId: string(),
9483
9564
  moverJobId: string().nullable(),
9484
9565
  state: RelocateJobStateSchema.nullable(),
9485
- error: string().nullable()
9566
+ error: string().nullable(),
9567
+ /** Last observed mover counters; `null` until the mover has been polled once. */
9568
+ progress: StorageMigrationMoveProgressSchema.nullable()
9486
9569
  });
9487
9570
  var StorageMigrationJobSchema = object({
9488
9571
  jobId: string(),
@@ -9528,6 +9611,98 @@ var StorageMigrationPlanSchema = object({
9528
9611
  findings: array(StorageMigrationFindingSchema)
9529
9612
  });
9530
9613
  /**
9614
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
9615
+ *
9616
+ * The coordinator's job record is the state of record for a migration, and its
9617
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
9618
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
9619
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
9620
+ * way because no supported UI path existed. A mover armed like that has no job
9621
+ * to fold progress into, so it has to be readable on its own or it is invisible.
9622
+ *
9623
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
9624
+ * orchestrated it.
9625
+ */
9626
+ var StorageMigrationMoverSchema = object({
9627
+ lane: _enum(["footage", "media"]),
9628
+ job: RelocateJobSchema,
9629
+ /** The coordinator job that armed this mover, or `null` for a mover armed
9630
+ * directly against the owning addon. */
9631
+ migrationJobId: string().nullable(),
9632
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
9633
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
9634
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
9635
+ * rate made of two different clocks. */
9636
+ observedAt: number()
9637
+ });
9638
+ /**
9639
+ * What a SOURCE still holds for one storage class — the number that makes a
9640
+ * "drain remaining" action honest rather than hopeful.
9641
+ *
9642
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
9643
+ * engine's own selection count for media), never from the resident index: a
9644
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
9645
+ * never been told about (D295).
9646
+ *
9647
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
9648
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
9649
+ * because refusing on an unanswerable read would hide exactly the case an
9650
+ * operator needs to act on.
9651
+ */
9652
+ var StorageMigrationResidueSchema = object({
9653
+ storageClass: StorageMigrationClassSchema,
9654
+ /** The location still holding the data. `'*'` for the media lane, whose rows
9655
+ * move from wherever they are rather than from one named source. */
9656
+ fromLocationId: string(),
9657
+ /** Where a drain would move it — the class's CURRENT default. */
9658
+ toLocationId: string(),
9659
+ /** Segments (footage lane) or rows (media lane) still on the source. */
9660
+ items: number().int().nonnegative().nullable(),
9661
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
9662
+ bytes: number().int().nonnegative().nullable()
9663
+ });
9664
+ /**
9665
+ * Run the DRAIN half and nothing else.
9666
+ *
9667
+ * A migration that reached `done` has already repointed, so `start` correctly
9668
+ * refuses its destination ("already the default") — there is nothing left to
9669
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
9670
+ * or finish against a work list that was a tenth of the archive (D295), and
9671
+ * before this there was no supported way to run only that half: the only way
9672
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
9673
+ *
9674
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
9675
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
9676
+ * re-repoint a class that is already migrated.
9677
+ */
9678
+ var StorageMigrationDrainInputSchema = object({
9679
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
9680
+ * a class whose source is already empty is refused rather than started. */
9681
+ classes: array(StorageMigrationClassSchema).min(1),
9682
+ throttleMbps: number().min(1).max(1e3).optional()
9683
+ });
9684
+ /** What a footage source still holds, asked of the durable hour ledger. */
9685
+ var RelocateResidueInputSchema = object({
9686
+ fromLocationId: string().min(1),
9687
+ /** Narrow to one logical class; omit for every profile on the location. */
9688
+ footageClass: RelocateFootageClassSchema.optional()
9689
+ });
9690
+ /** `null` = the archive could not answer (no ledger on this node, or the
9691
+ * aggregate failed). Never conflated with an empty source. */
9692
+ var RelocateResidueSchema = object({
9693
+ segments: number().int().nonnegative(),
9694
+ bytes: number().int().nonnegative()
9695
+ }).nullable();
9696
+ /** How many rows a media pass would still act on against a given target — the
9697
+ * media lane's denominator AND its residue, from ONE derivation so the two can
9698
+ * never disagree. `null` = the count could not be taken. */
9699
+ var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
9700
+ var RelocatableMediaCountInputSchema = object({
9701
+ toLocationId: string().min(1),
9702
+ /** Omitted = `move`. */
9703
+ mode: MediaRelocateModeSchema.optional()
9704
+ });
9705
+ /**
9531
9706
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9532
9707
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9533
9708
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9631,6 +9806,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
9631
9806
  * two addons declaring the same `id` must agree on `cardinality` (validated
9632
9807
  * at kernel aggregation time, not here).
9633
9808
  */
9809
+ /**
9810
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
9811
+ * actually reaches the bytes. It is the constraint that decides which
9812
+ * `storage-provider`s may back a location of that kind.
9813
+ *
9814
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
9815
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
9816
+ * post-analysis media roots). Only a provider that serves a genuine local
9817
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
9818
+ * remote provider's `resolve` returns a path on the REMOTE host, and
9819
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
9820
+ * against a same-named local directory that is something else entirely.
9821
+ *
9822
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
9823
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
9824
+ * service never sees a path, so any provider can back it. `backups` is the
9825
+ * one kind that qualifies today.
9826
+ *
9827
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
9828
+ * an EMERGENT property of how the recorder happened to be written. Nothing
9829
+ * refused the configuration; the first write simply went somewhere wrong, and
9830
+ * a recording write that goes wrong surfaces as a silent black window rather
9831
+ * than an error (the read path does not `stat`). This turns that accident into
9832
+ * a declared, enforced, testable refusal.
9833
+ */
9834
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
9634
9835
  var StorageLocationDeclarationSchema = object({
9635
9836
  /**
9636
9837
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -9650,6 +9851,19 @@ var StorageLocationDeclarationSchema = object({
9650
9851
  */
9651
9852
  cardinality: _enum(["single", "multi"]),
9652
9853
  /**
9854
+ * HOW the declaring service reaches the bytes — and therefore WHICH
9855
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
9856
+ * and {@link STORAGE_ACCESS_FALLBACK}.
9857
+ *
9858
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
9859
+ * can only over-restrict (refuse a remote provider for a kind that might
9860
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
9861
+ * permissive direction and is therefore never inferred — a repo guard
9862
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
9863
+ * reached by omission.
9864
+ */
9865
+ access: StorageAccessSchema.optional(),
9866
+ /**
9653
9867
  * When set, the default instance for this location inherits its resolved
9654
9868
  * root from the named location's default instance. Useful for derivative
9655
9869
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -20337,8 +20551,10 @@ var TrackSchema = object({
20337
20551
  lastSeen: number(),
20338
20552
  /** Frame-rate position history (subject to maxPositionHistory cap). */
20339
20553
  positions: array(TrackPositionSchema).readonly(),
20340
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
20341
- * saveThumbnails policy). */
20554
+ /** Periodic snapshots at snapshotIntervalMs cadence DEBUG media, produced
20555
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
20556
+ * the retired `saveThumbnails` used to gate this and the rolling
20557
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
20342
20558
  snapshots: array(TrackSnapshotSchema).readonly(),
20343
20559
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
20344
20560
  zonesVisited: array(string()).readonly(),
@@ -21198,7 +21414,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21198
21414
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
21199
21415
  kind: "mutation",
21200
21416
  auth: "admin"
21201
- }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
21417
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
21418
+ kind: "query",
21419
+ auth: "admin"
21420
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21202
21421
  kind: "query",
21203
21422
  auth: "admin"
21204
21423
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -23321,6 +23540,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
23321
23540
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23322
23541
  kind: "mutation",
23323
23542
  auth: "admin"
23543
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
23544
+ kind: "mutation",
23545
+ auth: "admin"
23324
23546
  });
23325
23547
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
23326
23548
  providerId: string().min(1),
@@ -23719,12 +23941,38 @@ response: record(string(), unknown()) }), object({
23719
23941
  *
23720
23942
  * ## Why this is a capability and not a helper
23721
23943
  *
23722
- * Six stores in `addon-post-analysis` already hold vectors object CLIP, face,
23723
- * plate, vehicle, identity, and the event store's derivativesand every one of
23724
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
23725
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
23726
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
23727
- * load 5,000 rows before ranking anything.
23944
+ * This capability was introduced with the claim that SIX stores in
23945
+ * `addon-post-analysis` held vectors in a `JSON` settings-store columnobject
23946
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
23947
+ * claim was never true, and leaving it here made five stores look like pending
23948
+ * work when three of them have no vector at all. Counted column by column on
23949
+ * 2026-08-30, exactly THREE ever held one:
23950
+ *
23951
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
23952
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
23953
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
23954
+ * face, migrated 2026-08-30 into its OWN index (see below).
23955
+ *
23956
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
23957
+ * and `identities` store a name; the event store stores no derivative vector.
23958
+ * They are not migration candidates and never were.
23959
+ *
23960
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
23961
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
23962
+ * rows before ranking anything.
23963
+ *
23964
+ * ## One index per COMPARISON, never per encoder
23965
+ *
23966
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
23967
+ * model, and they still get two indexes. An index is a set of things that are
23968
+ * ranked against each other and that live and die together, and these two are
23969
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
23970
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
23971
+ * forever and is the gallery every recognition ranks against. One index would
23972
+ * mean every gallery load and every reconcile carried a filter whose failure
23973
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
23974
+ * person's only sample. The dimension they share is not a reason to share an
23975
+ * index; the question they answer is, and it differs.
23728
23976
  *
23729
23977
  * The fix is not a faster loop, it is a different backend — and the backend
23730
23978
  * should be replaceable without touching six callers. So: a singleton
@@ -23829,7 +24077,20 @@ var VectorQueryResultSchema = object({
23829
24077
  */
23830
24078
  scanned: number(),
23831
24079
  /** True when the backend could not consider every row that passed the filter. */
23832
- truncated: boolean()
24080
+ truncated: boolean(),
24081
+ /**
24082
+ * The `topK` the backend actually ran with.
24083
+ *
24084
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
24085
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
24086
+ * own log rather than in its answer. That is how an audit asking for 20,000
24087
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
24088
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
24089
+ * MUCH, in the return value, where the caller cannot fail to see it.
24090
+ *
24091
+ * Equals the requested `topK` whenever nothing was lowered.
24092
+ */
24093
+ effectiveTopK: number().int().positive()
23833
24094
  });
23834
24095
  var VectorDeleteInputSchema = object({
23835
24096
  index: string(),
@@ -23858,6 +24119,68 @@ var VectorGetResultSchema = object({ items: array(object({
23858
24119
  id: string(),
23859
24120
  metadata: VectorMetadataSchema
23860
24121
  })) });
24122
+ /**
24123
+ * Ids to read back WITH their vectors.
24124
+ *
24125
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
24126
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
24127
+ * caller depends on that promise. This one promises the opposite.
24128
+ *
24129
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
24130
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
24131
+ * a per-face cross-process KNN would be a network round trip inside the
24132
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
24133
+ * it requires the index to hand the floats back. Without this method the only
24134
+ * way to keep a readable vector is a JSON column, which is the thing this
24135
+ * capability exists to delete.
24136
+ *
24137
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
24138
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
24139
+ */
24140
+ var VectorFetchInputSchema = object({
24141
+ index: string(),
24142
+ ids: array(string())
24143
+ });
24144
+ var VectorFetchResultSchema = object({ items: array(object({
24145
+ id: string(),
24146
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
24147
+ vector: string(),
24148
+ metadata: VectorMetadataSchema
24149
+ })) });
24150
+ /**
24151
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
24152
+ *
24153
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
24154
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
24155
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
24156
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
24157
+ * distance to every row is degenerate. `examined: 4096` then read as "we
24158
+ * looked" for as long as anyone cared to read it.
24159
+ *
24160
+ * This is the primitive that question actually needs: a bounded page, ordered
24161
+ * by the backend's own row order, costing no distance computation at all.
24162
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
24163
+ * the full-table read this capability was built to stop.
24164
+ */
24165
+ var VectorScanInputSchema = object({
24166
+ index: string(),
24167
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
24168
+ cursor: number().int().nonnegative().default(0),
24169
+ limit: number().int().positive()
24170
+ });
24171
+ var VectorScanResultSchema = object({
24172
+ items: array(object({
24173
+ id: string(),
24174
+ metadata: VectorMetadataSchema
24175
+ })),
24176
+ /**
24177
+ * Where the next page starts, or `null` when the walk reached the end.
24178
+ *
24179
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
24180
+ * from a short page: a backend is free to return fewer rows than asked.
24181
+ */
24182
+ nextCursor: number().int().nonnegative().nullable()
24183
+ });
23861
24184
  var VectorStatsInputSchema = object({ index: string() });
23862
24185
  var VectorStatsResultSchema = object({
23863
24186
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -23876,7 +24199,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
23876
24199
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
23877
24200
  kind: "mutation",
23878
24201
  auth: "admin"
23879
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
24202
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
23880
24203
  kind: "mutation",
23881
24204
  auth: "admin"
23882
24205
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -29024,6 +29347,20 @@ var recordingCapability = {
29024
29347
  kind: "query",
29025
29348
  auth: "admin"
29026
29349
  }),
29350
+ /**
29351
+ * What a location STILL holds, asked of the durable hour ledger.
29352
+ *
29353
+ * The number behind "drain remaining": segments and bytes that would still
29354
+ * have to move off `fromLocationId`. It is a ledger aggregate — the archive
29355
+ * — because the resident index is not the archive (D295), and a drain sized
29356
+ * off the index is exactly what reported `done` over 80.3 GB on 2026-08-29.
29357
+ * `null` means the archive could not be asked (no ledger on this node, or
29358
+ * the aggregate failed) and is never conflated with an empty source.
29359
+ */
29360
+ getRelocateResidue: method(RelocateResidueInputSchema, RelocateResidueSchema, {
29361
+ kind: "query",
29362
+ auth: "admin"
29363
+ }),
29027
29364
  /** Cancel a running or queued relocate job. A queued job never runs. */
29028
29365
  cancelRelocateJob: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
29029
29366
  kind: "mutation",
@@ -34210,6 +34547,12 @@ Object.freeze({
34210
34547
  addonId: null,
34211
34548
  access: "create"
34212
34549
  },
34550
+ "pipelineAnalytics.countRelocatableMedia": {
34551
+ capName: "pipeline-analytics",
34552
+ capScope: "device",
34553
+ addonId: null,
34554
+ access: "view"
34555
+ },
34213
34556
  "pipelineAnalytics.countUnstampedEventMedia": {
34214
34557
  capName: "pipeline-analytics",
34215
34558
  capScope: "device",
@@ -35374,6 +35717,12 @@ Object.freeze({
35374
35717
  addonId: null,
35375
35718
  access: "view"
35376
35719
  },
35720
+ "recording.getRelocateResidue": {
35721
+ capName: "recording",
35722
+ capScope: "system",
35723
+ addonId: null,
35724
+ access: "view"
35725
+ },
35377
35726
  "recording.getStorageMigrationMoveStatus": {
35378
35727
  capName: "recording",
35379
35728
  capScope: "system",
@@ -35920,12 +36269,30 @@ Object.freeze({
35920
36269
  addonId: null,
35921
36270
  access: "create"
35922
36271
  },
36272
+ "storageMigration.drain": {
36273
+ capName: "storage-migration",
36274
+ capScope: "system",
36275
+ addonId: null,
36276
+ access: "create"
36277
+ },
36278
+ "storageMigration.movers": {
36279
+ capName: "storage-migration",
36280
+ capScope: "system",
36281
+ addonId: null,
36282
+ access: "view"
36283
+ },
35923
36284
  "storageMigration.plan": {
35924
36285
  capName: "storage-migration",
35925
36286
  capScope: "system",
35926
36287
  addonId: null,
35927
36288
  access: "view"
35928
36289
  },
36290
+ "storageMigration.residue": {
36291
+ capName: "storage-migration",
36292
+ capScope: "system",
36293
+ addonId: null,
36294
+ access: "view"
36295
+ },
35929
36296
  "storageMigration.start": {
35930
36297
  capName: "storage-migration",
35931
36298
  capScope: "system",
@@ -36760,6 +37127,12 @@ Object.freeze({
36760
37127
  addonId: null,
36761
37128
  access: "delete"
36762
37129
  },
37130
+ "vectorStore.fetchByIds": {
37131
+ capName: "vector-store",
37132
+ capScope: "system",
37133
+ addonId: null,
37134
+ access: "view"
37135
+ },
36763
37136
  "vectorStore.getByIds": {
36764
37137
  capName: "vector-store",
36765
37138
  capScope: "system",
@@ -36772,6 +37145,12 @@ Object.freeze({
36772
37145
  addonId: null,
36773
37146
  access: "view"
36774
37147
  },
37148
+ "vectorStore.scan": {
37149
+ capName: "vector-store",
37150
+ capScope: "system",
37151
+ addonId: null,
37152
+ access: "view"
37153
+ },
36775
37154
  "vectorStore.stats": {
36776
37155
  capName: "vector-store",
36777
37156
  capScope: "system",
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-DLy_uz82.js");
1
+ const require_dist = require("./dist-BpofTthV.js");
2
2
  let node_path = require("node:path");
3
3
  node_path = require_dist.__toESM(node_path);
4
4
  let node_url = require("node:url");
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-DLy_uz82.js");
1
+ const require_dist = require("./dist-BpofTthV.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";
@@ -1,4 +1,4 @@
1
- import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-DjplinYP.mjs";
1
+ import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-DoaR6NDJ.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DLy_uz82.js");
6
- const require_lazy_sharp = require("../lazy-sharp-BI4LsfMM.js");
5
+ const require_dist = require("../dist-BpofTthV.js");
6
+ const require_lazy_sharp = require("../lazy-sharp-D6sSNL-G.js");
7
7
  let node_fs = require("node:fs");
8
8
  let node_path = require("node:path");
9
9
  //#region src/motion-wasm/wasm-motion-detector.ts
@@ -1,4 +1,4 @@
1
- import { It as hydrateSchema, Pt as DeviceType, Y as evaluateZoneRules, it as motionDetectionCapability, jt as BaseAddon } from "../dist-DjplinYP.mjs";
1
+ import { It as hydrateSchema, Pt as DeviceType, Y as evaluateZoneRules, it as motionDetectionCapability, jt as BaseAddon } from "../dist-DoaR6NDJ.mjs";
2
2
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { Dt as buildFfmpegArgs, Et as Fmp4BoxSplitter, kt as isSoftwareDecode, wt as errMsg } from "./dist-DjplinYP.mjs";
1
+ import { Dt as buildFfmpegArgs, Et as Fmp4BoxSplitter, kt as isSoftwareDecode, wt as errMsg } from "./dist-DoaR6NDJ.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import "node:fs";
4
4
  import "node:path";
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-DLy_uz82.js");
1
+ const require_dist = require("./dist-BpofTthV.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  let node_fs = require("node:fs");
4
4
  node_fs = require_dist.__toESM(node_fs, 1);
@@ -2,12 +2,12 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DLy_uz82.js");
6
- const require_node = require("../node-BHFLhfkh.js");
7
- const require_local_frame_registry = require("../local-frame-registry-Dr_U_xCG.js");
8
- const require_worker_protocol = require("../worker-protocol-basMNc_q.js");
5
+ const require_dist = require("../dist-BpofTthV.js");
6
+ const require_node = require("../node-DG_kTYFM.js");
7
+ const require_local_frame_registry = require("../local-frame-registry-4MCvZQ2t.js");
8
+ const require_worker_protocol = require("../worker-protocol-C8bHw-bu.js");
9
9
  const require_hub_hostname = require("../hub-hostname-DAJXlOgV.js");
10
- const require_lazy_sharp = require("../lazy-sharp-BI4LsfMM.js");
10
+ const require_lazy_sharp = require("../lazy-sharp-D6sSNL-G.js");
11
11
  const require_restream_intent = require("../restream-intent-Cv9x3jmu.js");
12
12
  const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
13
13
  const require_remote_restream = require("../remote-restream-CO36Sr30.js");
@@ -1,7 +1,7 @@
1
- import { B as defineCustomActions, Bt as nodePin, Ft as createEvent, Gt as _enum, H as deriveDetailCropRect, Kt as array, L as customAction, Qt as object, X as failureContributionCapability, Xt as literal, Yt as lazy, Zt as number, _ as FailureCounters, en as string, et as loadContributionCapability, ft as pipelineRunnerCapability, jt as BaseAddon, lt as pickDetailCropConvention, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, p as DEFAULT_NATIVE_LEASE_SETTINGS, qt as boolean, u as DEFAULT_DETAIL_CROP_CONVENTION, ut as pickNativeLeaseOverride, wt as errMsg } from "../dist-DjplinYP.mjs";
2
- import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-D7uxWSXD.mjs";
3
- import { c as getStepDefinition, n as resolveFrameViewGeometry, t as localFrameRegistry } from "../local-frame-registry-77FL9ua_.mjs";
4
- import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-Cvln9GmS.mjs";
1
+ import { B as defineCustomActions, Bt as nodePin, Ft as createEvent, Gt as _enum, H as deriveDetailCropRect, Kt as array, L as customAction, Qt as object, X as failureContributionCapability, Xt as literal, Yt as lazy, Zt as number, _ as FailureCounters, en as string, et as loadContributionCapability, ft as pipelineRunnerCapability, jt as BaseAddon, lt as pickDetailCropConvention, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, p as DEFAULT_NATIVE_LEASE_SETTINGS, qt as boolean, u as DEFAULT_DETAIL_CROP_CONVENTION, ut as pickNativeLeaseOverride, wt as errMsg } from "../dist-DoaR6NDJ.mjs";
2
+ import { i as NO_COST_CLAIM, t as ChildCostRegistry } from "../node-CeSZTDKV.mjs";
3
+ import { c as getStepDefinition, n as resolveFrameViewGeometry, t as localFrameRegistry } from "../local-frame-registry-Dr8irbU_.mjs";
4
+ import { a as nativeLeaseSettingEnv, t as isWorkerReply } from "../worker-protocol-Ar0-GAh5.mjs";
5
5
  import { t as resolveHubHostname } from "../hub-hostname-cCknRYKj.mjs";
6
6
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
7
7
  import { n as withDetectionIntent } from "../restream-intent-B4BXZra7.mjs";
@@ -1,4 +1,4 @@
1
- import { ot as parseProcStatus } from "./dist-DjplinYP.mjs";
1
+ import { ot as parseProcStatus } from "./dist-DoaR6NDJ.mjs";
2
2
  import * as fs from "node:fs";
3
3
  import { execFile } from "node:child_process";
4
4
  //#region src/shared/node-topology-platform.ts
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-DLy_uz82.js");
1
+ const require_dist = require("./dist-BpofTthV.js");
2
2
  let node_fs = require("node:fs");
3
3
  node_fs = require_dist.__toESM(node_fs);
4
4
  let node_child_process = require("node:child_process");