@camstack/addon-ai 0.4.39 → 0.4.41

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 (3) hide show
  1. package/dist/addon.js +333 -12
  2. package/dist/addon.mjs +333 -12
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -8367,13 +8367,49 @@ var StorageMigrationParticipantSchema = _enum([
8367
8367
  "recorder",
8368
8368
  "analytics"
8369
8369
  ]);
8370
+ /**
8371
+ * The mover's own numbers, folded onto the coordinator's durable move record.
8372
+ *
8373
+ * The long half of a non-blocking migration is `draining`, and it is measured
8374
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
8375
+ * existed the only place those numbers appeared was a Loki line, so an operator
8376
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
8377
+ * afternoon.
8378
+ *
8379
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
8380
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
8381
+ * mover — which is the exact failure this is meant to end. The coordinator's
8382
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
8383
+ * read `state`; folding the counters costs no extra read and makes the durable
8384
+ * record say afterwards how far a move actually got.
8385
+ *
8386
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
8387
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
8388
+ * cannot say M, and a 0 there would render as "100 % done".
8389
+ */
8390
+ var StorageMigrationMoveProgressSchema = object({
8391
+ filesMoved: number$1().int().nonnegative(),
8392
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
8393
+ filesTotal: number$1().int().nonnegative().nullable(),
8394
+ bytesMoved: number$1().int().nonnegative(),
8395
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
8396
+ * crash gets a new mover, and a rate computed from the migration's start
8397
+ * would silently average in the time nothing was running. */
8398
+ startedAt: number$1(),
8399
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
8400
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
8401
+ * subtract its own. */
8402
+ observedAt: number$1()
8403
+ });
8370
8404
  var StorageMigrationMoveSchema = object({
8371
8405
  storageClass: StorageMigrationClassSchema,
8372
8406
  fromLocationId: string(),
8373
8407
  toLocationId: string(),
8374
8408
  moverJobId: string().nullable(),
8375
8409
  state: RelocateJobStateSchema.nullable(),
8376
- error: string().nullable()
8410
+ error: string().nullable(),
8411
+ /** Last observed mover counters; `null` until the mover has been polled once. */
8412
+ progress: StorageMigrationMoveProgressSchema.nullable()
8377
8413
  });
8378
8414
  var StorageMigrationJobSchema = object({
8379
8415
  jobId: string(),
@@ -8419,6 +8455,98 @@ var StorageMigrationPlanSchema = object({
8419
8455
  findings: array(StorageMigrationFindingSchema)
8420
8456
  });
8421
8457
  /**
8458
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
8459
+ *
8460
+ * The coordinator's job record is the state of record for a migration, and its
8461
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
8462
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
8463
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
8464
+ * way because no supported UI path existed. A mover armed like that has no job
8465
+ * to fold progress into, so it has to be readable on its own or it is invisible.
8466
+ *
8467
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
8468
+ * orchestrated it.
8469
+ */
8470
+ var StorageMigrationMoverSchema = object({
8471
+ lane: _enum(["footage", "media"]),
8472
+ job: RelocateJobSchema,
8473
+ /** The coordinator job that armed this mover, or `null` for a mover armed
8474
+ * directly against the owning addon. */
8475
+ migrationJobId: string().nullable(),
8476
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
8477
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
8478
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
8479
+ * rate made of two different clocks. */
8480
+ observedAt: number$1()
8481
+ });
8482
+ /**
8483
+ * What a SOURCE still holds for one storage class — the number that makes a
8484
+ * "drain remaining" action honest rather than hopeful.
8485
+ *
8486
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
8487
+ * engine's own selection count for media), never from the resident index: a
8488
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
8489
+ * never been told about (D295).
8490
+ *
8491
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
8492
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
8493
+ * because refusing on an unanswerable read would hide exactly the case an
8494
+ * operator needs to act on.
8495
+ */
8496
+ var StorageMigrationResidueSchema = object({
8497
+ storageClass: StorageMigrationClassSchema,
8498
+ /** The location still holding the data. `'*'` for the media lane, whose rows
8499
+ * move from wherever they are rather than from one named source. */
8500
+ fromLocationId: string(),
8501
+ /** Where a drain would move it — the class's CURRENT default. */
8502
+ toLocationId: string(),
8503
+ /** Segments (footage lane) or rows (media lane) still on the source. */
8504
+ items: number$1().int().nonnegative().nullable(),
8505
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
8506
+ bytes: number$1().int().nonnegative().nullable()
8507
+ });
8508
+ /**
8509
+ * Run the DRAIN half and nothing else.
8510
+ *
8511
+ * A migration that reached `done` has already repointed, so `start` correctly
8512
+ * refuses its destination ("already the default") — there is nothing left to
8513
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
8514
+ * or finish against a work list that was a tenth of the archive (D295), and
8515
+ * before this there was no supported way to run only that half: the only way
8516
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
8517
+ *
8518
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
8519
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
8520
+ * re-repoint a class that is already migrated.
8521
+ */
8522
+ var StorageMigrationDrainInputSchema = object({
8523
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
8524
+ * a class whose source is already empty is refused rather than started. */
8525
+ classes: array(StorageMigrationClassSchema).min(1),
8526
+ throttleMbps: number$1().min(1).max(1e3).optional()
8527
+ });
8528
+ /** What a footage source still holds, asked of the durable hour ledger. */
8529
+ var RelocateResidueInputSchema = object({
8530
+ fromLocationId: string().min(1),
8531
+ /** Narrow to one logical class; omit for every profile on the location. */
8532
+ footageClass: RelocateFootageClassSchema.optional()
8533
+ });
8534
+ /** `null` = the archive could not answer (no ledger on this node, or the
8535
+ * aggregate failed). Never conflated with an empty source. */
8536
+ var RelocateResidueSchema = object({
8537
+ segments: number$1().int().nonnegative(),
8538
+ bytes: number$1().int().nonnegative()
8539
+ }).nullable();
8540
+ /** How many rows a media pass would still act on against a given target — the
8541
+ * media lane's denominator AND its residue, from ONE derivation so the two can
8542
+ * never disagree. `null` = the count could not be taken. */
8543
+ var RelocatableMediaCountSchema = object({ rows: number$1().int().nonnegative() }).nullable();
8544
+ var RelocatableMediaCountInputSchema = object({
8545
+ toLocationId: string().min(1),
8546
+ /** Omitted = `move`. */
8547
+ mode: MediaRelocateModeSchema.optional()
8548
+ });
8549
+ /**
8422
8550
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8423
8551
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8424
8552
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8522,6 +8650,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
8522
8650
  * two addons declaring the same `id` must agree on `cardinality` (validated
8523
8651
  * at kernel aggregation time, not here).
8524
8652
  */
8653
+ /**
8654
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
8655
+ * actually reaches the bytes. It is the constraint that decides which
8656
+ * `storage-provider`s may back a location of that kind.
8657
+ *
8658
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
8659
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
8660
+ * post-analysis media roots). Only a provider that serves a genuine local
8661
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
8662
+ * remote provider's `resolve` returns a path on the REMOTE host, and
8663
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
8664
+ * against a same-named local directory that is something else entirely.
8665
+ *
8666
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
8667
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
8668
+ * service never sees a path, so any provider can back it. `backups` is the
8669
+ * one kind that qualifies today.
8670
+ *
8671
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
8672
+ * an EMERGENT property of how the recorder happened to be written. Nothing
8673
+ * refused the configuration; the first write simply went somewhere wrong, and
8674
+ * a recording write that goes wrong surfaces as a silent black window rather
8675
+ * than an error (the read path does not `stat`). This turns that accident into
8676
+ * a declared, enforced, testable refusal.
8677
+ */
8678
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
8525
8679
  var StorageLocationDeclarationSchema = object({
8526
8680
  /**
8527
8681
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -8541,6 +8695,19 @@ var StorageLocationDeclarationSchema = object({
8541
8695
  */
8542
8696
  cardinality: _enum(["single", "multi"]),
8543
8697
  /**
8698
+ * HOW the declaring service reaches the bytes — and therefore WHICH
8699
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
8700
+ * and {@link STORAGE_ACCESS_FALLBACK}.
8701
+ *
8702
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
8703
+ * can only over-restrict (refuse a remote provider for a kind that might
8704
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
8705
+ * permissive direction and is therefore never inferred — a repo guard
8706
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
8707
+ * reached by omission.
8708
+ */
8709
+ access: StorageAccessSchema.optional(),
8710
+ /**
8544
8711
  * When set, the default instance for this location inherits its resolved
8545
8712
  * root from the named location's default instance. Useful for derivative
8546
8713
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -18160,8 +18327,10 @@ var TrackSchema = object({
18160
18327
  lastSeen: number$1(),
18161
18328
  /** Frame-rate position history (subject to maxPositionHistory cap). */
18162
18329
  positions: array(TrackPositionSchema).readonly(),
18163
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
18164
- * saveThumbnails policy). */
18330
+ /** Periodic snapshots at snapshotIntervalMs cadence — DEBUG media, produced
18331
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
18332
+ * the retired `saveThumbnails` used to gate this and the rolling
18333
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
18165
18334
  snapshots: array(TrackSnapshotSchema).readonly(),
18166
18335
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
18167
18336
  zonesVisited: array(string()).readonly(),
@@ -19021,7 +19190,10 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
19021
19190
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19022
19191
  kind: "mutation",
19023
19192
  auth: "admin"
19024
- }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
19193
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
19194
+ kind: "query",
19195
+ auth: "admin"
19196
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
19025
19197
  kind: "query",
19026
19198
  auth: "admin"
19027
19199
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -20980,6 +21152,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
20980
21152
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
20981
21153
  kind: "mutation",
20982
21154
  auth: "admin"
21155
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21156
+ kind: "mutation",
21157
+ auth: "admin"
20983
21158
  });
20984
21159
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
20985
21160
  providerId: string().min(1),
@@ -21378,12 +21553,38 @@ response: record(string(), unknown()) }), object({
21378
21553
  *
21379
21554
  * ## Why this is a capability and not a helper
21380
21555
  *
21381
- * Six stores in `addon-post-analysis` already hold vectors — object CLIP, face,
21382
- * plate, vehicle, identity, and the event store's derivatives — and every one of
21383
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
21384
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
21385
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
21386
- * load 5,000 rows before ranking anything.
21556
+ * This capability was introduced with the claim that SIX stores in
21557
+ * `addon-post-analysis` held vectors in a `JSON` settings-store column — object
21558
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
21559
+ * claim was never true, and leaving it here made five stores look like pending
21560
+ * work when three of them have no vector at all. Counted column by column on
21561
+ * 2026-08-30, exactly THREE ever held one:
21562
+ *
21563
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
21564
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
21565
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
21566
+ * face, migrated 2026-08-30 into its OWN index (see below).
21567
+ *
21568
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
21569
+ * and `identities` store a name; the event store stores no derivative vector.
21570
+ * They are not migration candidates and never were.
21571
+ *
21572
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
21573
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
21574
+ * rows before ranking anything.
21575
+ *
21576
+ * ## One index per COMPARISON, never per encoder
21577
+ *
21578
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
21579
+ * model, and they still get two indexes. An index is a set of things that are
21580
+ * ranked against each other and that live and die together, and these two are
21581
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
21582
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
21583
+ * forever and is the gallery every recognition ranks against. One index would
21584
+ * mean every gallery load and every reconcile carried a filter whose failure
21585
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
21586
+ * person's only sample. The dimension they share is not a reason to share an
21587
+ * index; the question they answer is, and it differs.
21387
21588
  *
21388
21589
  * The fix is not a faster loop, it is a different backend — and the backend
21389
21590
  * should be replaceable without touching six callers. So: a singleton
@@ -21488,7 +21689,20 @@ var VectorQueryResultSchema = object({
21488
21689
  */
21489
21690
  scanned: number$1(),
21490
21691
  /** True when the backend could not consider every row that passed the filter. */
21491
- truncated: boolean()
21692
+ truncated: boolean(),
21693
+ /**
21694
+ * The `topK` the backend actually ran with.
21695
+ *
21696
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
21697
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
21698
+ * own log rather than in its answer. That is how an audit asking for 20,000
21699
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
21700
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
21701
+ * MUCH, in the return value, where the caller cannot fail to see it.
21702
+ *
21703
+ * Equals the requested `topK` whenever nothing was lowered.
21704
+ */
21705
+ effectiveTopK: number$1().int().positive()
21492
21706
  });
21493
21707
  var VectorDeleteInputSchema = object({
21494
21708
  index: string(),
@@ -21517,6 +21731,68 @@ var VectorGetResultSchema = object({ items: array(object({
21517
21731
  id: string(),
21518
21732
  metadata: VectorMetadataSchema
21519
21733
  })) });
21734
+ /**
21735
+ * Ids to read back WITH their vectors.
21736
+ *
21737
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
21738
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
21739
+ * caller depends on that promise. This one promises the opposite.
21740
+ *
21741
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
21742
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
21743
+ * a per-face cross-process KNN would be a network round trip inside the
21744
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
21745
+ * it requires the index to hand the floats back. Without this method the only
21746
+ * way to keep a readable vector is a JSON column, which is the thing this
21747
+ * capability exists to delete.
21748
+ *
21749
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
21750
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
21751
+ */
21752
+ var VectorFetchInputSchema = object({
21753
+ index: string(),
21754
+ ids: array(string())
21755
+ });
21756
+ var VectorFetchResultSchema = object({ items: array(object({
21757
+ id: string(),
21758
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
21759
+ vector: string(),
21760
+ metadata: VectorMetadataSchema
21761
+ })) });
21762
+ /**
21763
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
21764
+ *
21765
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
21766
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
21767
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
21768
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
21769
+ * distance to every row is degenerate. `examined: 4096` then read as "we
21770
+ * looked" for as long as anyone cared to read it.
21771
+ *
21772
+ * This is the primitive that question actually needs: a bounded page, ordered
21773
+ * by the backend's own row order, costing no distance computation at all.
21774
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
21775
+ * the full-table read this capability was built to stop.
21776
+ */
21777
+ var VectorScanInputSchema = object({
21778
+ index: string(),
21779
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
21780
+ cursor: number$1().int().nonnegative().default(0),
21781
+ limit: number$1().int().positive()
21782
+ });
21783
+ var VectorScanResultSchema = object({
21784
+ items: array(object({
21785
+ id: string(),
21786
+ metadata: VectorMetadataSchema
21787
+ })),
21788
+ /**
21789
+ * Where the next page starts, or `null` when the walk reached the end.
21790
+ *
21791
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
21792
+ * from a short page: a backend is free to return fewer rows than asked.
21793
+ */
21794
+ nextCursor: number$1().int().nonnegative().nullable()
21795
+ });
21520
21796
  var VectorStatsInputSchema = object({ index: string() });
21521
21797
  var VectorStatsResultSchema = object({
21522
21798
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -21535,7 +21811,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
21535
21811
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
21536
21812
  kind: "mutation",
21537
21813
  auth: "admin"
21538
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21814
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21539
21815
  kind: "mutation",
21540
21816
  auth: "admin"
21541
21817
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -26439,6 +26715,9 @@ method(object({
26439
26715
  }), method(object({}), array(RelocateJobSchema).readonly(), {
26440
26716
  kind: "query",
26441
26717
  auth: "admin"
26718
+ }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26719
+ kind: "query",
26720
+ auth: "admin"
26442
26721
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26443
26722
  kind: "mutation",
26444
26723
  auth: "admin"
@@ -31404,6 +31683,12 @@ Object.freeze({
31404
31683
  addonId: null,
31405
31684
  access: "create"
31406
31685
  },
31686
+ "pipelineAnalytics.countRelocatableMedia": {
31687
+ capName: "pipeline-analytics",
31688
+ capScope: "device",
31689
+ addonId: null,
31690
+ access: "view"
31691
+ },
31407
31692
  "pipelineAnalytics.countUnstampedEventMedia": {
31408
31693
  capName: "pipeline-analytics",
31409
31694
  capScope: "device",
@@ -32568,6 +32853,12 @@ Object.freeze({
32568
32853
  addonId: null,
32569
32854
  access: "view"
32570
32855
  },
32856
+ "recording.getRelocateResidue": {
32857
+ capName: "recording",
32858
+ capScope: "system",
32859
+ addonId: null,
32860
+ access: "view"
32861
+ },
32571
32862
  "recording.getStorageMigrationMoveStatus": {
32572
32863
  capName: "recording",
32573
32864
  capScope: "system",
@@ -33114,12 +33405,30 @@ Object.freeze({
33114
33405
  addonId: null,
33115
33406
  access: "create"
33116
33407
  },
33408
+ "storageMigration.drain": {
33409
+ capName: "storage-migration",
33410
+ capScope: "system",
33411
+ addonId: null,
33412
+ access: "create"
33413
+ },
33414
+ "storageMigration.movers": {
33415
+ capName: "storage-migration",
33416
+ capScope: "system",
33417
+ addonId: null,
33418
+ access: "view"
33419
+ },
33117
33420
  "storageMigration.plan": {
33118
33421
  capName: "storage-migration",
33119
33422
  capScope: "system",
33120
33423
  addonId: null,
33121
33424
  access: "view"
33122
33425
  },
33426
+ "storageMigration.residue": {
33427
+ capName: "storage-migration",
33428
+ capScope: "system",
33429
+ addonId: null,
33430
+ access: "view"
33431
+ },
33123
33432
  "storageMigration.start": {
33124
33433
  capName: "storage-migration",
33125
33434
  capScope: "system",
@@ -33954,6 +34263,12 @@ Object.freeze({
33954
34263
  addonId: null,
33955
34264
  access: "delete"
33956
34265
  },
34266
+ "vectorStore.fetchByIds": {
34267
+ capName: "vector-store",
34268
+ capScope: "system",
34269
+ addonId: null,
34270
+ access: "view"
34271
+ },
33957
34272
  "vectorStore.getByIds": {
33958
34273
  capName: "vector-store",
33959
34274
  capScope: "system",
@@ -33966,6 +34281,12 @@ Object.freeze({
33966
34281
  addonId: null,
33967
34282
  access: "view"
33968
34283
  },
34284
+ "vectorStore.scan": {
34285
+ capName: "vector-store",
34286
+ capScope: "system",
34287
+ addonId: null,
34288
+ access: "view"
34289
+ },
33969
34290
  "vectorStore.stats": {
33970
34291
  capName: "vector-store",
33971
34292
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -8394,13 +8394,49 @@ var StorageMigrationParticipantSchema = _enum([
8394
8394
  "recorder",
8395
8395
  "analytics"
8396
8396
  ]);
8397
+ /**
8398
+ * The mover's own numbers, folded onto the coordinator's durable move record.
8399
+ *
8400
+ * The long half of a non-blocking migration is `draining`, and it is measured
8401
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
8402
+ * existed the only place those numbers appeared was a Loki line, so an operator
8403
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
8404
+ * afternoon.
8405
+ *
8406
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
8407
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
8408
+ * mover — which is the exact failure this is meant to end. The coordinator's
8409
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
8410
+ * read `state`; folding the counters costs no extra read and makes the durable
8411
+ * record say afterwards how far a move actually got.
8412
+ *
8413
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
8414
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
8415
+ * cannot say M, and a 0 there would render as "100 % done".
8416
+ */
8417
+ var StorageMigrationMoveProgressSchema = object({
8418
+ filesMoved: number$1().int().nonnegative(),
8419
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
8420
+ filesTotal: number$1().int().nonnegative().nullable(),
8421
+ bytesMoved: number$1().int().nonnegative(),
8422
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
8423
+ * crash gets a new mover, and a rate computed from the migration's start
8424
+ * would silently average in the time nothing was running. */
8425
+ startedAt: number$1(),
8426
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
8427
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
8428
+ * subtract its own. */
8429
+ observedAt: number$1()
8430
+ });
8397
8431
  var StorageMigrationMoveSchema = object({
8398
8432
  storageClass: StorageMigrationClassSchema,
8399
8433
  fromLocationId: string(),
8400
8434
  toLocationId: string(),
8401
8435
  moverJobId: string().nullable(),
8402
8436
  state: RelocateJobStateSchema.nullable(),
8403
- error: string().nullable()
8437
+ error: string().nullable(),
8438
+ /** Last observed mover counters; `null` until the mover has been polled once. */
8439
+ progress: StorageMigrationMoveProgressSchema.nullable()
8404
8440
  });
8405
8441
  var StorageMigrationJobSchema = object({
8406
8442
  jobId: string(),
@@ -8446,6 +8482,98 @@ var StorageMigrationPlanSchema = object({
8446
8482
  findings: array(StorageMigrationFindingSchema)
8447
8483
  });
8448
8484
  /**
8485
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
8486
+ *
8487
+ * The coordinator's job record is the state of record for a migration, and its
8488
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
8489
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
8490
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
8491
+ * way because no supported UI path existed. A mover armed like that has no job
8492
+ * to fold progress into, so it has to be readable on its own or it is invisible.
8493
+ *
8494
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
8495
+ * orchestrated it.
8496
+ */
8497
+ var StorageMigrationMoverSchema = object({
8498
+ lane: _enum(["footage", "media"]),
8499
+ job: RelocateJobSchema,
8500
+ /** The coordinator job that armed this mover, or `null` for a mover armed
8501
+ * directly against the owning addon. */
8502
+ migrationJobId: string().nullable(),
8503
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
8504
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
8505
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
8506
+ * rate made of two different clocks. */
8507
+ observedAt: number$1()
8508
+ });
8509
+ /**
8510
+ * What a SOURCE still holds for one storage class — the number that makes a
8511
+ * "drain remaining" action honest rather than hopeful.
8512
+ *
8513
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
8514
+ * engine's own selection count for media), never from the resident index: a
8515
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
8516
+ * never been told about (D295).
8517
+ *
8518
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
8519
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
8520
+ * because refusing on an unanswerable read would hide exactly the case an
8521
+ * operator needs to act on.
8522
+ */
8523
+ var StorageMigrationResidueSchema = object({
8524
+ storageClass: StorageMigrationClassSchema,
8525
+ /** The location still holding the data. `'*'` for the media lane, whose rows
8526
+ * move from wherever they are rather than from one named source. */
8527
+ fromLocationId: string(),
8528
+ /** Where a drain would move it — the class's CURRENT default. */
8529
+ toLocationId: string(),
8530
+ /** Segments (footage lane) or rows (media lane) still on the source. */
8531
+ items: number$1().int().nonnegative().nullable(),
8532
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
8533
+ bytes: number$1().int().nonnegative().nullable()
8534
+ });
8535
+ /**
8536
+ * Run the DRAIN half and nothing else.
8537
+ *
8538
+ * A migration that reached `done` has already repointed, so `start` correctly
8539
+ * refuses its destination ("already the default") — there is nothing left to
8540
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
8541
+ * or finish against a work list that was a tenth of the archive (D295), and
8542
+ * before this there was no supported way to run only that half: the only way
8543
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
8544
+ *
8545
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
8546
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
8547
+ * re-repoint a class that is already migrated.
8548
+ */
8549
+ var StorageMigrationDrainInputSchema = object({
8550
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
8551
+ * a class whose source is already empty is refused rather than started. */
8552
+ classes: array(StorageMigrationClassSchema).min(1),
8553
+ throttleMbps: number$1().min(1).max(1e3).optional()
8554
+ });
8555
+ /** What a footage source still holds, asked of the durable hour ledger. */
8556
+ var RelocateResidueInputSchema = object({
8557
+ fromLocationId: string().min(1),
8558
+ /** Narrow to one logical class; omit for every profile on the location. */
8559
+ footageClass: RelocateFootageClassSchema.optional()
8560
+ });
8561
+ /** `null` = the archive could not answer (no ledger on this node, or the
8562
+ * aggregate failed). Never conflated with an empty source. */
8563
+ var RelocateResidueSchema = object({
8564
+ segments: number$1().int().nonnegative(),
8565
+ bytes: number$1().int().nonnegative()
8566
+ }).nullable();
8567
+ /** How many rows a media pass would still act on against a given target — the
8568
+ * media lane's denominator AND its residue, from ONE derivation so the two can
8569
+ * never disagree. `null` = the count could not be taken. */
8570
+ var RelocatableMediaCountSchema = object({ rows: number$1().int().nonnegative() }).nullable();
8571
+ var RelocatableMediaCountInputSchema = object({
8572
+ toLocationId: string().min(1),
8573
+ /** Omitted = `move`. */
8574
+ mode: MediaRelocateModeSchema.optional()
8575
+ });
8576
+ /**
8449
8577
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8450
8578
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8451
8579
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8549,6 +8677,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
8549
8677
  * two addons declaring the same `id` must agree on `cardinality` (validated
8550
8678
  * at kernel aggregation time, not here).
8551
8679
  */
8680
+ /**
8681
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
8682
+ * actually reaches the bytes. It is the constraint that decides which
8683
+ * `storage-provider`s may back a location of that kind.
8684
+ *
8685
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
8686
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
8687
+ * post-analysis media roots). Only a provider that serves a genuine local
8688
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
8689
+ * remote provider's `resolve` returns a path on the REMOTE host, and
8690
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
8691
+ * against a same-named local directory that is something else entirely.
8692
+ *
8693
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
8694
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
8695
+ * service never sees a path, so any provider can back it. `backups` is the
8696
+ * one kind that qualifies today.
8697
+ *
8698
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
8699
+ * an EMERGENT property of how the recorder happened to be written. Nothing
8700
+ * refused the configuration; the first write simply went somewhere wrong, and
8701
+ * a recording write that goes wrong surfaces as a silent black window rather
8702
+ * than an error (the read path does not `stat`). This turns that accident into
8703
+ * a declared, enforced, testable refusal.
8704
+ */
8705
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
8552
8706
  var StorageLocationDeclarationSchema = object({
8553
8707
  /**
8554
8708
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -8568,6 +8722,19 @@ var StorageLocationDeclarationSchema = object({
8568
8722
  */
8569
8723
  cardinality: _enum(["single", "multi"]),
8570
8724
  /**
8725
+ * HOW the declaring service reaches the bytes — and therefore WHICH
8726
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
8727
+ * and {@link STORAGE_ACCESS_FALLBACK}.
8728
+ *
8729
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
8730
+ * can only over-restrict (refuse a remote provider for a kind that might
8731
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
8732
+ * permissive direction and is therefore never inferred — a repo guard
8733
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
8734
+ * reached by omission.
8735
+ */
8736
+ access: StorageAccessSchema.optional(),
8737
+ /**
8571
8738
  * When set, the default instance for this location inherits its resolved
8572
8739
  * root from the named location's default instance. Useful for derivative
8573
8740
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -18187,8 +18354,10 @@ var TrackSchema = object({
18187
18354
  lastSeen: number$1(),
18188
18355
  /** Frame-rate position history (subject to maxPositionHistory cap). */
18189
18356
  positions: array(TrackPositionSchema).readonly(),
18190
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
18191
- * saveThumbnails policy). */
18357
+ /** Periodic snapshots at snapshotIntervalMs cadence — DEBUG media, produced
18358
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
18359
+ * the retired `saveThumbnails` used to gate this and the rolling
18360
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
18192
18361
  snapshots: array(TrackSnapshotSchema).readonly(),
18193
18362
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
18194
18363
  zonesVisited: array(string()).readonly(),
@@ -19048,7 +19217,10 @@ DeviceType.Camera, method(object({ deviceId: number$1() }), array(TrackSchema).r
19048
19217
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19049
19218
  kind: "mutation",
19050
19219
  auth: "admin"
19051
- }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
19220
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
19221
+ kind: "query",
19222
+ auth: "admin"
19223
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
19052
19224
  kind: "query",
19053
19225
  auth: "admin"
19054
19226
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -21007,6 +21179,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21007
21179
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21008
21180
  kind: "mutation",
21009
21181
  auth: "admin"
21182
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21183
+ kind: "mutation",
21184
+ auth: "admin"
21010
21185
  });
21011
21186
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21012
21187
  providerId: string().min(1),
@@ -21405,12 +21580,38 @@ response: record(string(), unknown()) }), object({
21405
21580
  *
21406
21581
  * ## Why this is a capability and not a helper
21407
21582
  *
21408
- * Six stores in `addon-post-analysis` already hold vectors — object CLIP, face,
21409
- * plate, vehicle, identity, and the event store's derivatives — and every one of
21410
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
21411
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
21412
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
21413
- * load 5,000 rows before ranking anything.
21583
+ * This capability was introduced with the claim that SIX stores in
21584
+ * `addon-post-analysis` held vectors in a `JSON` settings-store column — object
21585
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
21586
+ * claim was never true, and leaving it here made five stores look like pending
21587
+ * work when three of them have no vector at all. Counted column by column on
21588
+ * 2026-08-30, exactly THREE ever held one:
21589
+ *
21590
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
21591
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
21592
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
21593
+ * face, migrated 2026-08-30 into its OWN index (see below).
21594
+ *
21595
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
21596
+ * and `identities` store a name; the event store stores no derivative vector.
21597
+ * They are not migration candidates and never were.
21598
+ *
21599
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
21600
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
21601
+ * rows before ranking anything.
21602
+ *
21603
+ * ## One index per COMPARISON, never per encoder
21604
+ *
21605
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
21606
+ * model, and they still get two indexes. An index is a set of things that are
21607
+ * ranked against each other and that live and die together, and these two are
21608
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
21609
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
21610
+ * forever and is the gallery every recognition ranks against. One index would
21611
+ * mean every gallery load and every reconcile carried a filter whose failure
21612
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
21613
+ * person's only sample. The dimension they share is not a reason to share an
21614
+ * index; the question they answer is, and it differs.
21414
21615
  *
21415
21616
  * The fix is not a faster loop, it is a different backend — and the backend
21416
21617
  * should be replaceable without touching six callers. So: a singleton
@@ -21515,7 +21716,20 @@ var VectorQueryResultSchema = object({
21515
21716
  */
21516
21717
  scanned: number$1(),
21517
21718
  /** True when the backend could not consider every row that passed the filter. */
21518
- truncated: boolean()
21719
+ truncated: boolean(),
21720
+ /**
21721
+ * The `topK` the backend actually ran with.
21722
+ *
21723
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
21724
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
21725
+ * own log rather than in its answer. That is how an audit asking for 20,000
21726
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
21727
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
21728
+ * MUCH, in the return value, where the caller cannot fail to see it.
21729
+ *
21730
+ * Equals the requested `topK` whenever nothing was lowered.
21731
+ */
21732
+ effectiveTopK: number$1().int().positive()
21519
21733
  });
21520
21734
  var VectorDeleteInputSchema = object({
21521
21735
  index: string(),
@@ -21544,6 +21758,68 @@ var VectorGetResultSchema = object({ items: array(object({
21544
21758
  id: string(),
21545
21759
  metadata: VectorMetadataSchema
21546
21760
  })) });
21761
+ /**
21762
+ * Ids to read back WITH their vectors.
21763
+ *
21764
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
21765
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
21766
+ * caller depends on that promise. This one promises the opposite.
21767
+ *
21768
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
21769
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
21770
+ * a per-face cross-process KNN would be a network round trip inside the
21771
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
21772
+ * it requires the index to hand the floats back. Without this method the only
21773
+ * way to keep a readable vector is a JSON column, which is the thing this
21774
+ * capability exists to delete.
21775
+ *
21776
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
21777
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
21778
+ */
21779
+ var VectorFetchInputSchema = object({
21780
+ index: string(),
21781
+ ids: array(string())
21782
+ });
21783
+ var VectorFetchResultSchema = object({ items: array(object({
21784
+ id: string(),
21785
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
21786
+ vector: string(),
21787
+ metadata: VectorMetadataSchema
21788
+ })) });
21789
+ /**
21790
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
21791
+ *
21792
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
21793
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
21794
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
21795
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
21796
+ * distance to every row is degenerate. `examined: 4096` then read as "we
21797
+ * looked" for as long as anyone cared to read it.
21798
+ *
21799
+ * This is the primitive that question actually needs: a bounded page, ordered
21800
+ * by the backend's own row order, costing no distance computation at all.
21801
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
21802
+ * the full-table read this capability was built to stop.
21803
+ */
21804
+ var VectorScanInputSchema = object({
21805
+ index: string(),
21806
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
21807
+ cursor: number$1().int().nonnegative().default(0),
21808
+ limit: number$1().int().positive()
21809
+ });
21810
+ var VectorScanResultSchema = object({
21811
+ items: array(object({
21812
+ id: string(),
21813
+ metadata: VectorMetadataSchema
21814
+ })),
21815
+ /**
21816
+ * Where the next page starts, or `null` when the walk reached the end.
21817
+ *
21818
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
21819
+ * from a short page: a backend is free to return fewer rows than asked.
21820
+ */
21821
+ nextCursor: number$1().int().nonnegative().nullable()
21822
+ });
21547
21823
  var VectorStatsInputSchema = object({ index: string() });
21548
21824
  var VectorStatsResultSchema = object({
21549
21825
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -21562,7 +21838,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
21562
21838
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
21563
21839
  kind: "mutation",
21564
21840
  auth: "admin"
21565
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21841
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21566
21842
  kind: "mutation",
21567
21843
  auth: "admin"
21568
21844
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -26466,6 +26742,9 @@ method(object({
26466
26742
  }), method(object({}), array(RelocateJobSchema).readonly(), {
26467
26743
  kind: "query",
26468
26744
  auth: "admin"
26745
+ }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26746
+ kind: "query",
26747
+ auth: "admin"
26469
26748
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26470
26749
  kind: "mutation",
26471
26750
  auth: "admin"
@@ -31431,6 +31710,12 @@ Object.freeze({
31431
31710
  addonId: null,
31432
31711
  access: "create"
31433
31712
  },
31713
+ "pipelineAnalytics.countRelocatableMedia": {
31714
+ capName: "pipeline-analytics",
31715
+ capScope: "device",
31716
+ addonId: null,
31717
+ access: "view"
31718
+ },
31434
31719
  "pipelineAnalytics.countUnstampedEventMedia": {
31435
31720
  capName: "pipeline-analytics",
31436
31721
  capScope: "device",
@@ -32595,6 +32880,12 @@ Object.freeze({
32595
32880
  addonId: null,
32596
32881
  access: "view"
32597
32882
  },
32883
+ "recording.getRelocateResidue": {
32884
+ capName: "recording",
32885
+ capScope: "system",
32886
+ addonId: null,
32887
+ access: "view"
32888
+ },
32598
32889
  "recording.getStorageMigrationMoveStatus": {
32599
32890
  capName: "recording",
32600
32891
  capScope: "system",
@@ -33141,12 +33432,30 @@ Object.freeze({
33141
33432
  addonId: null,
33142
33433
  access: "create"
33143
33434
  },
33435
+ "storageMigration.drain": {
33436
+ capName: "storage-migration",
33437
+ capScope: "system",
33438
+ addonId: null,
33439
+ access: "create"
33440
+ },
33441
+ "storageMigration.movers": {
33442
+ capName: "storage-migration",
33443
+ capScope: "system",
33444
+ addonId: null,
33445
+ access: "view"
33446
+ },
33144
33447
  "storageMigration.plan": {
33145
33448
  capName: "storage-migration",
33146
33449
  capScope: "system",
33147
33450
  addonId: null,
33148
33451
  access: "view"
33149
33452
  },
33453
+ "storageMigration.residue": {
33454
+ capName: "storage-migration",
33455
+ capScope: "system",
33456
+ addonId: null,
33457
+ access: "view"
33458
+ },
33150
33459
  "storageMigration.start": {
33151
33460
  capName: "storage-migration",
33152
33461
  capScope: "system",
@@ -33981,6 +34290,12 @@ Object.freeze({
33981
34290
  addonId: null,
33982
34291
  access: "delete"
33983
34292
  },
34293
+ "vectorStore.fetchByIds": {
34294
+ capName: "vector-store",
34295
+ capScope: "system",
34296
+ addonId: null,
34297
+ access: "view"
34298
+ },
33984
34299
  "vectorStore.getByIds": {
33985
34300
  capName: "vector-store",
33986
34301
  capScope: "system",
@@ -33993,6 +34308,12 @@ Object.freeze({
33993
34308
  addonId: null,
33994
34309
  access: "view"
33995
34310
  },
34311
+ "vectorStore.scan": {
34312
+ capName: "vector-store",
34313
+ capScope: "system",
34314
+ addonId: null,
34315
+ access: "view"
34316
+ },
33996
34317
  "vectorStore.stats": {
33997
34318
  capName: "vector-store",
33998
34319
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-ai",
3
- "version": "0.4.39",
3
+ "version": "0.4.41",
4
4
  "description": "AI addon for CamStack — the `llm` collection provider (cloud, LAN, and camstack-managed local llama.cpp profiles) plus the per-node `llm-runtime` managed executor.",
5
5
  "keywords": [
6
6
  "camstack",