@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
@@ -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_process_memory = require("../process-memory-M8WiR3qj.js");
5
+ const require_dist = require("../dist-BpofTthV.js");
6
+ const require_process_memory = require("../process-memory-DglWLA3J.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_dist.__toESM(node_fs);
9
9
  let node_path = require("node:path");
@@ -1,6 +1,6 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { A as audioAnalysisCapability, It as hydrateSchema, S as PoolMemoryWatchdog, _t as resolvePoolMemoryPolicy, j as audioAnalyzerCapability, jt as BaseAddon, n as AUDIO_BACKEND_CHOICES, nt as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL, wt as errMsg } from "../dist-DjplinYP.mjs";
3
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-B2tApNua.mjs";
2
+ import { A as audioAnalysisCapability, It as hydrateSchema, S as PoolMemoryWatchdog, _t as resolvePoolMemoryPolicy, j as audioAnalyzerCapability, jt as BaseAddon, n as AUDIO_BACKEND_CHOICES, nt as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL, wt as errMsg } from "../dist-DoaR6NDJ.mjs";
3
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-DJoquJSu.mjs";
4
4
  import * as fs from "node:fs";
5
5
  import * as path$1 from "node:path";
6
6
  import { downloadFile } from "@camstack/system/addon-utils";
@@ -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_lazy_sharp = require("../lazy-sharp-BI4LsfMM.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_lazy_sharp = require("../lazy-sharp-D6sSNL-G.js");
9
9
  const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
10
- const require_process_memory = require("../process-memory-M8WiR3qj.js");
10
+ const require_process_memory = require("../process-memory-DglWLA3J.js");
11
11
  let node_fs = require("node:fs");
12
12
  node_fs = require_dist.__toESM(node_fs);
13
13
  let node_path = require("node:path");
@@ -1,10 +1,10 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { Bt as nodePin, Ft as createEvent, It as hydrateSchema, Kt as array, O as YAMNET_TO_MACRO, Q as inferModelProvider, Qt as object, S as PoolMemoryWatchdog, St as supportedRuntimes$1, Vt as parseJsonUnknown, W as detectionPipelineCapability, Wt as sleep, Y as evaluateZoneRules, _t as resolvePoolMemoryPolicy, at as overlayClusterStepSettings, c as DEFAULT_CLUSTER_STEP_MODELS, ct as pickClusterStepSettings, dt as pipelineExecutorCapability, en as string, et as loadContributionCapability, ht as resolveClusterStepModelId, jt as BaseAddon, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, q as enumerateInferenceDevices, st as pickClusterStepModels, t as APPLE_SA_TO_MACRO, tn as union, wt as errMsg, yt as runtimeDevices$1, z as defaultDeviceFor$1 } from "../dist-DjplinYP.mjs";
3
- import { a as readProcessCost } from "../node-D7uxWSXD.mjs";
4
- import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep, t as localFrameRegistry, u as landmarkPrecisionVerdict } from "../local-frame-registry-77FL9ua_.mjs";
2
+ import { Bt as nodePin, Ft as createEvent, It as hydrateSchema, Kt as array, O as YAMNET_TO_MACRO, Q as inferModelProvider, Qt as object, S as PoolMemoryWatchdog, St as supportedRuntimes$1, Vt as parseJsonUnknown, W as detectionPipelineCapability, Wt as sleep, Y as evaluateZoneRules, _t as resolvePoolMemoryPolicy, at as overlayClusterStepSettings, c as DEFAULT_CLUSTER_STEP_MODELS, ct as pickClusterStepSettings, dt as pipelineExecutorCapability, en as string, et as loadContributionCapability, ht as resolveClusterStepModelId, jt as BaseAddon, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, q as enumerateInferenceDevices, st as pickClusterStepModels, t as APPLE_SA_TO_MACRO, tn as union, wt as errMsg, yt as runtimeDevices$1, z as defaultDeviceFor$1 } from "../dist-DoaR6NDJ.mjs";
3
+ import { a as readProcessCost } from "../node-CeSZTDKV.mjs";
4
+ import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep, t as localFrameRegistry, u as landmarkPrecisionVerdict } from "../local-frame-registry-Dr8irbU_.mjs";
5
5
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
6
6
  import { n as startEventLoopStallMonitor } from "../event-loop-stall-monitor-DXLNBMkY.mjs";
7
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-B2tApNua.mjs";
7
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-DJoquJSu.mjs";
8
8
  import * as fs from "node:fs";
9
9
  import * as path$1 from "node:path";
10
10
  import { spawn } from "node:child_process";
@@ -9338,6 +9338,21 @@ var RelocateJobSchema = object({
9338
9338
  bytesMoved: number().int(),
9339
9339
  /** Total files discovered up front; null while (or when) unknown. */
9340
9340
  filesTotal: number().int().nullable(),
9341
+ /**
9342
+ * Rows this run CORRECTED while moving them — a durable mutation the move
9343
+ * made that nobody asked for, so it is reported where the operator reads the
9344
+ * job rather than only in a log line.
9345
+ *
9346
+ * A footage segment records its byte count in its own NAME, and the durable
9347
+ * hour row derives its aggregates from those names. A file that does not
9348
+ * match its name therefore makes the ledger's sums — and with them quota and
9349
+ * pressure eviction — wrong by the difference, and only a rename can fix it.
9350
+ * On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
9351
+ *
9352
+ * Absent on lanes where the question has no meaning: a media blob's size is
9353
+ * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
9354
+ */
9355
+ rowsReconciled: number().int().nonnegative().optional(),
9341
9356
  startedAt: number(),
9342
9357
  finishedAt: number().nullable(),
9343
9358
  error: string().nullable()
@@ -9406,14 +9421,42 @@ var RelocateMediaInputSchema = object({
9406
9421
  /** Omitted = `move`, the pre-existing behaviour. */
9407
9422
  mode: MediaRelocateModeSchema.optional()
9408
9423
  });
9409
- /** How many rows still carry NO `locationId` — the population a repoint would
9410
- * silently re-aim at a disk that does not hold their bytes. Zero is the only
9411
- * value that permits a non-blocking `eventMedia` cutover. */
9412
- var UnstampedEventMediaCountSchema = object({
9413
- media: number().int().nonnegative(),
9414
- retrainFrames: number().int().nonnegative(),
9415
- total: number().int().nonnegative()
9424
+ /**
9425
+ * The unstamped population of ONE collection split, because the gate and the
9426
+ * operator ask two different questions and only one of them has to be cheap.
9427
+ *
9428
+ * `present` is the GATE: "is there at least one row that would be orphaned by a
9429
+ * repoint". It is a single indexed seek to the first matching row, so it stays
9430
+ * answerable on a saturated disk and answers in O(log n) precisely in the state
9431
+ * that matters — after a seal, when the population is empty.
9432
+ *
9433
+ * `rows` is the NUMBER, for the refusal message and the operator's sense of
9434
+ * scale. It is a second, indexed `COUNT(*)`, and `null` means **not
9435
+ * measurable** — never zero. `{ present: true, rows: null }` is a legitimate
9436
+ * and useful answer: "there are some, and this read could not say how many"
9437
+ * still refuses the cutover, which is the whole job.
9438
+ */
9439
+ var UnstampedRowsSchema = object({
9440
+ present: boolean(),
9441
+ rows: number().int().nonnegative().nullable()
9416
9442
  });
9443
+ /**
9444
+ * How many rows still carry NO `locationId` — the population a repoint would
9445
+ * silently re-aim at a disk that does not hold their bytes.
9446
+ *
9447
+ * **`null` = the count could not be taken**, and it is NOT permission to cut
9448
+ * over. The gate opens on a measured absence and on nothing else; an unread
9449
+ * collection and an empty one are different facts, and this repo has already
9450
+ * paid for conflating them (`RelocateResidueSchema`, D295).
9451
+ */
9452
+ var UnstampedEventMediaCountSchema = object({
9453
+ media: UnstampedRowsSchema,
9454
+ retrainFrames: UnstampedRowsSchema,
9455
+ /** True when EITHER collection holds one. The refusal reads this. */
9456
+ anyPresent: boolean(),
9457
+ /** Sum across both, or `null` when either lane could not be counted. */
9458
+ total: number().int().nonnegative().nullable()
9459
+ }).nullable();
9417
9460
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
9418
9461
  /** The independently selectable logical storage classes — every class
9419
9462
  * `storage.listLocationDeclarations` reports, so an operator never meets a
@@ -9499,13 +9542,53 @@ var StorageMigrationParticipantSchema = _enum([
9499
9542
  "recorder",
9500
9543
  "analytics"
9501
9544
  ]);
9545
+ /**
9546
+ * The mover's own numbers, folded onto the coordinator's durable move record.
9547
+ *
9548
+ * The long half of a non-blocking migration is `draining`, and it is measured
9549
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
9550
+ * existed the only place those numbers appeared was a Loki line, so an operator
9551
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
9552
+ * afternoon.
9553
+ *
9554
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
9555
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
9556
+ * mover — which is the exact failure this is meant to end. The coordinator's
9557
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
9558
+ * read `state`; folding the counters costs no extra read and makes the durable
9559
+ * record say afterwards how far a move actually got.
9560
+ *
9561
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
9562
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
9563
+ * cannot say M, and a 0 there would render as "100 % done".
9564
+ */
9565
+ var StorageMigrationMoveProgressSchema = object({
9566
+ filesMoved: number().int().nonnegative(),
9567
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
9568
+ filesTotal: number().int().nonnegative().nullable(),
9569
+ bytesMoved: number().int().nonnegative(),
9570
+ /** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
9571
+ * a lane that cannot reconcile. A migration that silently rewrote durable
9572
+ * rows would be the same failure as one that silently skipped them. */
9573
+ rowsReconciled: number().int().nonnegative().optional(),
9574
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
9575
+ * crash gets a new mover, and a rate computed from the migration's start
9576
+ * would silently average in the time nothing was running. */
9577
+ startedAt: number(),
9578
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
9579
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
9580
+ * subtract its own. */
9581
+ observedAt: number()
9582
+ });
9502
9583
  var StorageMigrationMoveSchema = object({
9503
9584
  storageClass: StorageMigrationClassSchema,
9504
9585
  fromLocationId: string(),
9505
9586
  toLocationId: string(),
9506
9587
  moverJobId: string().nullable(),
9507
9588
  state: RelocateJobStateSchema.nullable(),
9508
- error: string().nullable()
9589
+ error: string().nullable(),
9590
+ /** Last observed mover counters; `null` until the mover has been polled once. */
9591
+ progress: StorageMigrationMoveProgressSchema.nullable()
9509
9592
  });
9510
9593
  var StorageMigrationJobSchema = object({
9511
9594
  jobId: string(),
@@ -9551,6 +9634,98 @@ var StorageMigrationPlanSchema = object({
9551
9634
  findings: array(StorageMigrationFindingSchema)
9552
9635
  });
9553
9636
  /**
9637
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
9638
+ *
9639
+ * The coordinator's job record is the state of record for a migration, and its
9640
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
9641
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
9642
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
9643
+ * way because no supported UI path existed. A mover armed like that has no job
9644
+ * to fold progress into, so it has to be readable on its own or it is invisible.
9645
+ *
9646
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
9647
+ * orchestrated it.
9648
+ */
9649
+ var StorageMigrationMoverSchema = object({
9650
+ lane: _enum(["footage", "media"]),
9651
+ job: RelocateJobSchema,
9652
+ /** The coordinator job that armed this mover, or `null` for a mover armed
9653
+ * directly against the owning addon. */
9654
+ migrationJobId: string().nullable(),
9655
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
9656
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
9657
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
9658
+ * rate made of two different clocks. */
9659
+ observedAt: number()
9660
+ });
9661
+ /**
9662
+ * What a SOURCE still holds for one storage class — the number that makes a
9663
+ * "drain remaining" action honest rather than hopeful.
9664
+ *
9665
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
9666
+ * engine's own selection count for media), never from the resident index: a
9667
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
9668
+ * never been told about (D295).
9669
+ *
9670
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
9671
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
9672
+ * because refusing on an unanswerable read would hide exactly the case an
9673
+ * operator needs to act on.
9674
+ */
9675
+ var StorageMigrationResidueSchema = object({
9676
+ storageClass: StorageMigrationClassSchema,
9677
+ /** The location still holding the data. `'*'` for the media lane, whose rows
9678
+ * move from wherever they are rather than from one named source. */
9679
+ fromLocationId: string(),
9680
+ /** Where a drain would move it — the class's CURRENT default. */
9681
+ toLocationId: string(),
9682
+ /** Segments (footage lane) or rows (media lane) still on the source. */
9683
+ items: number().int().nonnegative().nullable(),
9684
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
9685
+ bytes: number().int().nonnegative().nullable()
9686
+ });
9687
+ /**
9688
+ * Run the DRAIN half and nothing else.
9689
+ *
9690
+ * A migration that reached `done` has already repointed, so `start` correctly
9691
+ * refuses its destination ("already the default") — there is nothing left to
9692
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
9693
+ * or finish against a work list that was a tenth of the archive (D295), and
9694
+ * before this there was no supported way to run only that half: the only way
9695
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
9696
+ *
9697
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
9698
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
9699
+ * re-repoint a class that is already migrated.
9700
+ */
9701
+ var StorageMigrationDrainInputSchema = object({
9702
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
9703
+ * a class whose source is already empty is refused rather than started. */
9704
+ classes: array(StorageMigrationClassSchema).min(1),
9705
+ throttleMbps: number().min(1).max(1e3).optional()
9706
+ });
9707
+ /** What a footage source still holds, asked of the durable hour ledger. */
9708
+ var RelocateResidueInputSchema = object({
9709
+ fromLocationId: string().min(1),
9710
+ /** Narrow to one logical class; omit for every profile on the location. */
9711
+ footageClass: RelocateFootageClassSchema.optional()
9712
+ });
9713
+ /** `null` = the archive could not answer (no ledger on this node, or the
9714
+ * aggregate failed). Never conflated with an empty source. */
9715
+ var RelocateResidueSchema = object({
9716
+ segments: number().int().nonnegative(),
9717
+ bytes: number().int().nonnegative()
9718
+ }).nullable();
9719
+ /** How many rows a media pass would still act on against a given target — the
9720
+ * media lane's denominator AND its residue, from ONE derivation so the two can
9721
+ * never disagree. `null` = the count could not be taken. */
9722
+ var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
9723
+ var RelocatableMediaCountInputSchema = object({
9724
+ toLocationId: string().min(1),
9725
+ /** Omitted = `move`. */
9726
+ mode: MediaRelocateModeSchema.optional()
9727
+ });
9728
+ /**
9554
9729
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9555
9730
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9556
9731
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9654,6 +9829,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
9654
9829
  * two addons declaring the same `id` must agree on `cardinality` (validated
9655
9830
  * at kernel aggregation time, not here).
9656
9831
  */
9832
+ /**
9833
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
9834
+ * actually reaches the bytes. It is the constraint that decides which
9835
+ * `storage-provider`s may back a location of that kind.
9836
+ *
9837
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
9838
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
9839
+ * post-analysis media roots). Only a provider that serves a genuine local
9840
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
9841
+ * remote provider's `resolve` returns a path on the REMOTE host, and
9842
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
9843
+ * against a same-named local directory that is something else entirely.
9844
+ *
9845
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
9846
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
9847
+ * service never sees a path, so any provider can back it. `backups` is the
9848
+ * one kind that qualifies today.
9849
+ *
9850
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
9851
+ * an EMERGENT property of how the recorder happened to be written. Nothing
9852
+ * refused the configuration; the first write simply went somewhere wrong, and
9853
+ * a recording write that goes wrong surfaces as a silent black window rather
9854
+ * than an error (the read path does not `stat`). This turns that accident into
9855
+ * a declared, enforced, testable refusal.
9856
+ */
9857
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
9657
9858
  var StorageLocationDeclarationSchema = object({
9658
9859
  /**
9659
9860
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -9673,6 +9874,19 @@ var StorageLocationDeclarationSchema = object({
9673
9874
  */
9674
9875
  cardinality: _enum(["single", "multi"]),
9675
9876
  /**
9877
+ * HOW the declaring service reaches the bytes — and therefore WHICH
9878
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
9879
+ * and {@link STORAGE_ACCESS_FALLBACK}.
9880
+ *
9881
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
9882
+ * can only over-restrict (refuse a remote provider for a kind that might
9883
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
9884
+ * permissive direction and is therefore never inferred — a repo guard
9885
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
9886
+ * reached by omission.
9887
+ */
9888
+ access: StorageAccessSchema.optional(),
9889
+ /**
9676
9890
  * When set, the default instance for this location inherits its resolved
9677
9891
  * root from the named location's default instance. Useful for derivative
9678
9892
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -20360,8 +20574,10 @@ var TrackSchema = object({
20360
20574
  lastSeen: number(),
20361
20575
  /** Frame-rate position history (subject to maxPositionHistory cap). */
20362
20576
  positions: array(TrackPositionSchema).readonly(),
20363
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
20364
- * saveThumbnails policy). */
20577
+ /** Periodic snapshots at snapshotIntervalMs cadence DEBUG media, produced
20578
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
20579
+ * the retired `saveThumbnails` used to gate this and the rolling
20580
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
20365
20581
  snapshots: array(TrackSnapshotSchema).readonly(),
20366
20582
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
20367
20583
  zonesVisited: array(string()).readonly(),
@@ -21221,7 +21437,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21221
21437
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
21222
21438
  kind: "mutation",
21223
21439
  auth: "admin"
21224
- }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
21440
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
21441
+ kind: "query",
21442
+ auth: "admin"
21443
+ }), method(object({}), array(RelocateJobSchema).readonly(), {
21225
21444
  kind: "query",
21226
21445
  auth: "admin"
21227
21446
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -23344,6 +23563,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
23344
23563
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23345
23564
  kind: "mutation",
23346
23565
  auth: "admin"
23566
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
23567
+ kind: "mutation",
23568
+ auth: "admin"
23347
23569
  });
23348
23570
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
23349
23571
  providerId: string().min(1),
@@ -23742,12 +23964,38 @@ response: record(string(), unknown()) }), object({
23742
23964
  *
23743
23965
  * ## Why this is a capability and not a helper
23744
23966
  *
23745
- * Six stores in `addon-post-analysis` already hold vectors object CLIP, face,
23746
- * plate, vehicle, identity, and the event store's derivativesand every one of
23747
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
23748
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
23749
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
23750
- * load 5,000 rows before ranking anything.
23967
+ * This capability was introduced with the claim that SIX stores in
23968
+ * `addon-post-analysis` held vectors in a `JSON` settings-store columnobject
23969
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
23970
+ * claim was never true, and leaving it here made five stores look like pending
23971
+ * work when three of them have no vector at all. Counted column by column on
23972
+ * 2026-08-30, exactly THREE ever held one:
23973
+ *
23974
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
23975
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
23976
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
23977
+ * face, migrated 2026-08-30 into its OWN index (see below).
23978
+ *
23979
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
23980
+ * and `identities` store a name; the event store stores no derivative vector.
23981
+ * They are not migration candidates and never were.
23982
+ *
23983
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
23984
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
23985
+ * rows before ranking anything.
23986
+ *
23987
+ * ## One index per COMPARISON, never per encoder
23988
+ *
23989
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
23990
+ * model, and they still get two indexes. An index is a set of things that are
23991
+ * ranked against each other and that live and die together, and these two are
23992
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
23993
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
23994
+ * forever and is the gallery every recognition ranks against. One index would
23995
+ * mean every gallery load and every reconcile carried a filter whose failure
23996
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
23997
+ * person's only sample. The dimension they share is not a reason to share an
23998
+ * index; the question they answer is, and it differs.
23751
23999
  *
23752
24000
  * The fix is not a faster loop, it is a different backend — and the backend
23753
24001
  * should be replaceable without touching six callers. So: a singleton
@@ -23852,7 +24100,20 @@ var VectorQueryResultSchema = object({
23852
24100
  */
23853
24101
  scanned: number(),
23854
24102
  /** True when the backend could not consider every row that passed the filter. */
23855
- truncated: boolean()
24103
+ truncated: boolean(),
24104
+ /**
24105
+ * The `topK` the backend actually ran with.
24106
+ *
24107
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
24108
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
24109
+ * own log rather than in its answer. That is how an audit asking for 20,000
24110
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
24111
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
24112
+ * MUCH, in the return value, where the caller cannot fail to see it.
24113
+ *
24114
+ * Equals the requested `topK` whenever nothing was lowered.
24115
+ */
24116
+ effectiveTopK: number().int().positive()
23856
24117
  });
23857
24118
  var VectorDeleteInputSchema = object({
23858
24119
  index: string(),
@@ -23881,6 +24142,68 @@ var VectorGetResultSchema = object({ items: array(object({
23881
24142
  id: string(),
23882
24143
  metadata: VectorMetadataSchema
23883
24144
  })) });
24145
+ /**
24146
+ * Ids to read back WITH their vectors.
24147
+ *
24148
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
24149
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
24150
+ * caller depends on that promise. This one promises the opposite.
24151
+ *
24152
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
24153
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
24154
+ * a per-face cross-process KNN would be a network round trip inside the
24155
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
24156
+ * it requires the index to hand the floats back. Without this method the only
24157
+ * way to keep a readable vector is a JSON column, which is the thing this
24158
+ * capability exists to delete.
24159
+ *
24160
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
24161
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
24162
+ */
24163
+ var VectorFetchInputSchema = object({
24164
+ index: string(),
24165
+ ids: array(string())
24166
+ });
24167
+ var VectorFetchResultSchema = object({ items: array(object({
24168
+ id: string(),
24169
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
24170
+ vector: string(),
24171
+ metadata: VectorMetadataSchema
24172
+ })) });
24173
+ /**
24174
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
24175
+ *
24176
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
24177
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
24178
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
24179
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
24180
+ * distance to every row is degenerate. `examined: 4096` then read as "we
24181
+ * looked" for as long as anyone cared to read it.
24182
+ *
24183
+ * This is the primitive that question actually needs: a bounded page, ordered
24184
+ * by the backend's own row order, costing no distance computation at all.
24185
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
24186
+ * the full-table read this capability was built to stop.
24187
+ */
24188
+ var VectorScanInputSchema = object({
24189
+ index: string(),
24190
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
24191
+ cursor: number().int().nonnegative().default(0),
24192
+ limit: number().int().positive()
24193
+ });
24194
+ var VectorScanResultSchema = object({
24195
+ items: array(object({
24196
+ id: string(),
24197
+ metadata: VectorMetadataSchema
24198
+ })),
24199
+ /**
24200
+ * Where the next page starts, or `null` when the walk reached the end.
24201
+ *
24202
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
24203
+ * from a short page: a backend is free to return fewer rows than asked.
24204
+ */
24205
+ nextCursor: number().int().nonnegative().nullable()
24206
+ });
23884
24207
  var VectorStatsInputSchema = object({ index: string() });
23885
24208
  var VectorStatsResultSchema = object({
23886
24209
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -23899,7 +24222,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
23899
24222
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
23900
24223
  kind: "mutation",
23901
24224
  auth: "admin"
23902
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
24225
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
23903
24226
  kind: "mutation",
23904
24227
  auth: "admin"
23905
24228
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -29047,6 +29370,20 @@ var recordingCapability = {
29047
29370
  kind: "query",
29048
29371
  auth: "admin"
29049
29372
  }),
29373
+ /**
29374
+ * What a location STILL holds, asked of the durable hour ledger.
29375
+ *
29376
+ * The number behind "drain remaining": segments and bytes that would still
29377
+ * have to move off `fromLocationId`. It is a ledger aggregate — the archive
29378
+ * — because the resident index is not the archive (D295), and a drain sized
29379
+ * off the index is exactly what reported `done` over 80.3 GB on 2026-08-29.
29380
+ * `null` means the archive could not be asked (no ledger on this node, or
29381
+ * the aggregate failed) and is never conflated with an empty source.
29382
+ */
29383
+ getRelocateResidue: method(RelocateResidueInputSchema, RelocateResidueSchema, {
29384
+ kind: "query",
29385
+ auth: "admin"
29386
+ }),
29050
29387
  /** Cancel a running or queued relocate job. A queued job never runs. */
29051
29388
  cancelRelocateJob: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
29052
29389
  kind: "mutation",
@@ -34233,6 +34570,12 @@ Object.freeze({
34233
34570
  addonId: null,
34234
34571
  access: "create"
34235
34572
  },
34573
+ "pipelineAnalytics.countRelocatableMedia": {
34574
+ capName: "pipeline-analytics",
34575
+ capScope: "device",
34576
+ addonId: null,
34577
+ access: "view"
34578
+ },
34236
34579
  "pipelineAnalytics.countUnstampedEventMedia": {
34237
34580
  capName: "pipeline-analytics",
34238
34581
  capScope: "device",
@@ -35397,6 +35740,12 @@ Object.freeze({
35397
35740
  addonId: null,
35398
35741
  access: "view"
35399
35742
  },
35743
+ "recording.getRelocateResidue": {
35744
+ capName: "recording",
35745
+ capScope: "system",
35746
+ addonId: null,
35747
+ access: "view"
35748
+ },
35400
35749
  "recording.getStorageMigrationMoveStatus": {
35401
35750
  capName: "recording",
35402
35751
  capScope: "system",
@@ -35943,12 +36292,30 @@ Object.freeze({
35943
36292
  addonId: null,
35944
36293
  access: "create"
35945
36294
  },
36295
+ "storageMigration.drain": {
36296
+ capName: "storage-migration",
36297
+ capScope: "system",
36298
+ addonId: null,
36299
+ access: "create"
36300
+ },
36301
+ "storageMigration.movers": {
36302
+ capName: "storage-migration",
36303
+ capScope: "system",
36304
+ addonId: null,
36305
+ access: "view"
36306
+ },
35946
36307
  "storageMigration.plan": {
35947
36308
  capName: "storage-migration",
35948
36309
  capScope: "system",
35949
36310
  addonId: null,
35950
36311
  access: "view"
35951
36312
  },
36313
+ "storageMigration.residue": {
36314
+ capName: "storage-migration",
36315
+ capScope: "system",
36316
+ addonId: null,
36317
+ access: "view"
36318
+ },
35952
36319
  "storageMigration.start": {
35953
36320
  capName: "storage-migration",
35954
36321
  capScope: "system",
@@ -36783,6 +37150,12 @@ Object.freeze({
36783
37150
  addonId: null,
36784
37151
  access: "delete"
36785
37152
  },
37153
+ "vectorStore.fetchByIds": {
37154
+ capName: "vector-store",
37155
+ capScope: "system",
37156
+ addonId: null,
37157
+ access: "view"
37158
+ },
36786
37159
  "vectorStore.getByIds": {
36787
37160
  capName: "vector-store",
36788
37161
  capScope: "system",
@@ -36795,6 +37168,12 @@ Object.freeze({
36795
37168
  addonId: null,
36796
37169
  access: "view"
36797
37170
  },
37171
+ "vectorStore.scan": {
37172
+ capName: "vector-store",
37173
+ capScope: "system",
37174
+ addonId: null,
37175
+ access: "view"
37176
+ },
36798
37177
  "vectorStore.stats": {
36799
37178
  capName: "vector-store",
36800
37179
  capScope: "system",