@camstack/addon-model-studio 1.1.60 → 1.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MotionZonesSettings-Bd4XXu93.mjs → MotionZonesSettings-B_OmCAXn.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-u5iEsuzJ.mjs → PrivacyMaskSettings-rewJAGm0.mjs} +4 -4
- package/dist/{SceneMonitorEditor-HzwpY3Jf.mjs → SceneMonitorEditor-BY4tJte_.mjs} +3 -3
- package/dist/_stub.js +10 -10
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-CegGwSfe.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BUHSjtFq.mjs} +4 -4
- package/dist/{_virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DLxM_aHR.mjs → _virtual_mf___mfe_internal__addon_model_studio_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D0yi4BW4.mjs} +1 -1
- package/dist/{hostInit-DyZ75O1o.mjs → hostInit-BqDhrCXu.mjs} +3 -3
- package/dist/model-studio.addon.js +387 -19
- package/dist/model-studio.addon.mjs +387 -19
- package/dist/{player-overlays-DBw7cP5Q.mjs → player-overlays-DN9nqGXk.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-BYjuH3Vm.mjs → responsive-DdrSu5QF.mjs} +1 -1
- package/dist/{square-DdqOJGrs.mjs → square-BVmTlLTE.mjs} +1 -1
- package/dist/{trash-2-4d9LA9Gd.mjs → trash-2-BxEQ66D3.mjs} +1 -1
- package/dist/{use-device-snapshot-CmiKvu6l.mjs → use-device-snapshot-CbpsFwcI.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CI68GRdZ.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CQ_gHSHU.mjs} +1 -1
- package/package.json +1 -1
|
@@ -8570,6 +8570,21 @@ var RelocateJobSchema = object({
|
|
|
8570
8570
|
bytesMoved: number().int(),
|
|
8571
8571
|
/** Total files discovered up front; null while (or when) unknown. */
|
|
8572
8572
|
filesTotal: number().int().nullable(),
|
|
8573
|
+
/**
|
|
8574
|
+
* Rows this run CORRECTED while moving them — a durable mutation the move
|
|
8575
|
+
* made that nobody asked for, so it is reported where the operator reads the
|
|
8576
|
+
* job rather than only in a log line.
|
|
8577
|
+
*
|
|
8578
|
+
* A footage segment records its byte count in its own NAME, and the durable
|
|
8579
|
+
* hour row derives its aggregates from those names. A file that does not
|
|
8580
|
+
* match its name therefore makes the ledger's sums — and with them quota and
|
|
8581
|
+
* pressure eviction — wrong by the difference, and only a rename can fix it.
|
|
8582
|
+
* On 2026-08-30 one such row also stalled a 110 749-file drain permanently.
|
|
8583
|
+
*
|
|
8584
|
+
* Absent on lanes where the question has no meaning: a media blob's size is
|
|
8585
|
+
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8586
|
+
*/
|
|
8587
|
+
rowsReconciled: number().int().nonnegative().optional(),
|
|
8573
8588
|
startedAt: number(),
|
|
8574
8589
|
finishedAt: number().nullable(),
|
|
8575
8590
|
error: string().nullable()
|
|
@@ -8638,14 +8653,42 @@ var RelocateMediaInputSchema = object({
|
|
|
8638
8653
|
/** Omitted = `move`, the pre-existing behaviour. */
|
|
8639
8654
|
mode: MediaRelocateModeSchema.optional()
|
|
8640
8655
|
});
|
|
8641
|
-
/**
|
|
8642
|
-
*
|
|
8643
|
-
*
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8647
|
-
|
|
8656
|
+
/**
|
|
8657
|
+
* The unstamped population of ONE collection — split, because the gate and the
|
|
8658
|
+
* operator ask two different questions and only one of them has to be cheap.
|
|
8659
|
+
*
|
|
8660
|
+
* `present` is the GATE: "is there at least one row that would be orphaned by a
|
|
8661
|
+
* repoint". It is a single indexed seek to the first matching row, so it stays
|
|
8662
|
+
* answerable on a saturated disk and answers in O(log n) precisely in the state
|
|
8663
|
+
* that matters — after a seal, when the population is empty.
|
|
8664
|
+
*
|
|
8665
|
+
* `rows` is the NUMBER, for the refusal message and the operator's sense of
|
|
8666
|
+
* scale. It is a second, indexed `COUNT(*)`, and `null` means **not
|
|
8667
|
+
* measurable** — never zero. `{ present: true, rows: null }` is a legitimate
|
|
8668
|
+
* and useful answer: "there are some, and this read could not say how many"
|
|
8669
|
+
* still refuses the cutover, which is the whole job.
|
|
8670
|
+
*/
|
|
8671
|
+
var UnstampedRowsSchema = object({
|
|
8672
|
+
present: boolean(),
|
|
8673
|
+
rows: number().int().nonnegative().nullable()
|
|
8648
8674
|
});
|
|
8675
|
+
/**
|
|
8676
|
+
* How many rows still carry NO `locationId` — the population a repoint would
|
|
8677
|
+
* silently re-aim at a disk that does not hold their bytes.
|
|
8678
|
+
*
|
|
8679
|
+
* **`null` = the count could not be taken**, and it is NOT permission to cut
|
|
8680
|
+
* over. The gate opens on a measured absence and on nothing else; an unread
|
|
8681
|
+
* collection and an empty one are different facts, and this repo has already
|
|
8682
|
+
* paid for conflating them (`RelocateResidueSchema`, D295).
|
|
8683
|
+
*/
|
|
8684
|
+
var UnstampedEventMediaCountSchema = object({
|
|
8685
|
+
media: UnstampedRowsSchema,
|
|
8686
|
+
retrainFrames: UnstampedRowsSchema,
|
|
8687
|
+
/** True when EITHER collection holds one. The refusal reads this. */
|
|
8688
|
+
anyPresent: boolean(),
|
|
8689
|
+
/** Sum across both, or `null` when either lane could not be counted. */
|
|
8690
|
+
total: number().int().nonnegative().nullable()
|
|
8691
|
+
}).nullable();
|
|
8649
8692
|
var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
|
|
8650
8693
|
/** The independently selectable logical storage classes — every class
|
|
8651
8694
|
* `storage.listLocationDeclarations` reports, so an operator never meets a
|
|
@@ -8731,13 +8774,53 @@ var StorageMigrationParticipantSchema = _enum([
|
|
|
8731
8774
|
"recorder",
|
|
8732
8775
|
"analytics"
|
|
8733
8776
|
]);
|
|
8777
|
+
/**
|
|
8778
|
+
* The mover's own numbers, folded onto the coordinator's durable move record.
|
|
8779
|
+
*
|
|
8780
|
+
* The long half of a non-blocking migration is `draining`, and it is measured
|
|
8781
|
+
* in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
|
|
8782
|
+
* existed the only place those numbers appeared was a Loki line, so an operator
|
|
8783
|
+
* watching the Admin UI saw `phase: draining` and nothing else for a whole
|
|
8784
|
+
* afternoon.
|
|
8785
|
+
*
|
|
8786
|
+
* It is POLLED, never pushed. Events are telemetry and may be dropped
|
|
8787
|
+
* (D8/D11), and a dropped progress event is indistinguishable from a stalled
|
|
8788
|
+
* mover — which is the exact failure this is meant to end. The coordinator's
|
|
8789
|
+
* `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
|
|
8790
|
+
* read `state`; folding the counters costs no extra read and makes the durable
|
|
8791
|
+
* record say afterwards how far a move actually got.
|
|
8792
|
+
*
|
|
8793
|
+
* `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
|
|
8794
|
+
* a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
|
|
8795
|
+
* cannot say M, and a 0 there would render as "100 % done".
|
|
8796
|
+
*/
|
|
8797
|
+
var StorageMigrationMoveProgressSchema = object({
|
|
8798
|
+
filesMoved: number().int().nonnegative(),
|
|
8799
|
+
/** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
|
|
8800
|
+
filesTotal: number().int().nonnegative().nullable(),
|
|
8801
|
+
bytesMoved: number().int().nonnegative(),
|
|
8802
|
+
/** Rows the mover corrected while moving them — see `RelocateJob`. Absent on
|
|
8803
|
+
* a lane that cannot reconcile. A migration that silently rewrote durable
|
|
8804
|
+
* rows would be the same failure as one that silently skipped them. */
|
|
8805
|
+
rowsReconciled: number().int().nonnegative().optional(),
|
|
8806
|
+
/** The MOVER's start, not the migration's: a drain restarted after an addon
|
|
8807
|
+
* crash gets a new mover, and a rate computed from the migration's start
|
|
8808
|
+
* would silently average in the time nothing was running. */
|
|
8809
|
+
startedAt: number(),
|
|
8810
|
+
/** When the coordinator last read these numbers. Paired with `startedAt` it
|
|
8811
|
+
* is the only honest rate: both clocks are the hub's, so a UI never has to
|
|
8812
|
+
* subtract its own. */
|
|
8813
|
+
observedAt: number()
|
|
8814
|
+
});
|
|
8734
8815
|
var StorageMigrationMoveSchema = object({
|
|
8735
8816
|
storageClass: StorageMigrationClassSchema,
|
|
8736
8817
|
fromLocationId: string(),
|
|
8737
8818
|
toLocationId: string(),
|
|
8738
8819
|
moverJobId: string().nullable(),
|
|
8739
8820
|
state: RelocateJobStateSchema.nullable(),
|
|
8740
|
-
error: string().nullable()
|
|
8821
|
+
error: string().nullable(),
|
|
8822
|
+
/** Last observed mover counters; `null` until the mover has been polled once. */
|
|
8823
|
+
progress: StorageMigrationMoveProgressSchema.nullable()
|
|
8741
8824
|
});
|
|
8742
8825
|
var StorageMigrationJobSchema = object({
|
|
8743
8826
|
jobId: string(),
|
|
@@ -8783,6 +8866,98 @@ var StorageMigrationPlanSchema = object({
|
|
|
8783
8866
|
findings: array(StorageMigrationFindingSchema)
|
|
8784
8867
|
});
|
|
8785
8868
|
/**
|
|
8869
|
+
* A mover as it exists RIGHT NOW, whether or not a migration job owns it.
|
|
8870
|
+
*
|
|
8871
|
+
* The coordinator's job record is the state of record for a migration, and its
|
|
8872
|
+
* moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
|
|
8873
|
+
* standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
|
|
8874
|
+
* are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
|
|
8875
|
+
* way because no supported UI path existed. A mover armed like that has no job
|
|
8876
|
+
* to fold progress into, so it has to be readable on its own or it is invisible.
|
|
8877
|
+
*
|
|
8878
|
+
* `migrationJobId` is what tells the two apart: `null` means nothing here
|
|
8879
|
+
* orchestrated it.
|
|
8880
|
+
*/
|
|
8881
|
+
var StorageMigrationMoverSchema = object({
|
|
8882
|
+
lane: _enum(["footage", "media"]),
|
|
8883
|
+
job: RelocateJobSchema,
|
|
8884
|
+
/** The coordinator job that armed this mover, or `null` for a mover armed
|
|
8885
|
+
* directly against the owning addon. */
|
|
8886
|
+
migrationJobId: string().nullable(),
|
|
8887
|
+
/** When the hub read these counters. Stamped here so a rate is `bytesMoved`
|
|
8888
|
+
* over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
|
|
8889
|
+
* a browser subtracting its own `Date.now()` from a server `startedAt` is a
|
|
8890
|
+
* rate made of two different clocks. */
|
|
8891
|
+
observedAt: number()
|
|
8892
|
+
});
|
|
8893
|
+
/**
|
|
8894
|
+
* What a SOURCE still holds for one storage class — the number that makes a
|
|
8895
|
+
* "drain remaining" action honest rather than hopeful.
|
|
8896
|
+
*
|
|
8897
|
+
* It comes from the archive (`SegmentHourLedger.census` for footage, the media
|
|
8898
|
+
* engine's own selection count for media), never from the resident index: a
|
|
8899
|
+
* drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
|
|
8900
|
+
* never been told about (D295).
|
|
8901
|
+
*
|
|
8902
|
+
* `items`/`bytes` are `null` for "the archive could not be asked", which is
|
|
8903
|
+
* deliberately NOT zero: a drain is still offered for an unknown residue,
|
|
8904
|
+
* because refusing on an unanswerable read would hide exactly the case an
|
|
8905
|
+
* operator needs to act on.
|
|
8906
|
+
*/
|
|
8907
|
+
var StorageMigrationResidueSchema = object({
|
|
8908
|
+
storageClass: StorageMigrationClassSchema,
|
|
8909
|
+
/** The location still holding the data. `'*'` for the media lane, whose rows
|
|
8910
|
+
* move from wherever they are rather than from one named source. */
|
|
8911
|
+
fromLocationId: string(),
|
|
8912
|
+
/** Where a drain would move it — the class's CURRENT default. */
|
|
8913
|
+
toLocationId: string(),
|
|
8914
|
+
/** Segments (footage lane) or rows (media lane) still on the source. */
|
|
8915
|
+
items: number().int().nonnegative().nullable(),
|
|
8916
|
+
/** Bytes on the source; `null` when the lane counts rows rather than bytes. */
|
|
8917
|
+
bytes: number().int().nonnegative().nullable()
|
|
8918
|
+
});
|
|
8919
|
+
/**
|
|
8920
|
+
* Run the DRAIN half and nothing else.
|
|
8921
|
+
*
|
|
8922
|
+
* A migration that reached `done` has already repointed, so `start` correctly
|
|
8923
|
+
* refuses its destination ("already the default") — there is nothing left to
|
|
8924
|
+
* repoint. But the drain can fail, be cancelled, be interrupted by a restart,
|
|
8925
|
+
* or finish against a work list that was a tenth of the archive (D295), and
|
|
8926
|
+
* before this there was no supported way to run only that half: the only way
|
|
8927
|
+
* through was calling `recording.relocateFootage` by hand over admin tRPC.
|
|
8928
|
+
*
|
|
8929
|
+
* `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
|
|
8930
|
+
* refusal meaningful: the two verbs are disjoint, so nothing here can silently
|
|
8931
|
+
* re-repoint a class that is already migrated.
|
|
8932
|
+
*/
|
|
8933
|
+
var StorageMigrationDrainInputSchema = object({
|
|
8934
|
+
/** The classes to drain. Each must appear in `storageMigration.residue`, so
|
|
8935
|
+
* a class whose source is already empty is refused rather than started. */
|
|
8936
|
+
classes: array(StorageMigrationClassSchema).min(1),
|
|
8937
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
8938
|
+
});
|
|
8939
|
+
/** What a footage source still holds, asked of the durable hour ledger. */
|
|
8940
|
+
var RelocateResidueInputSchema = object({
|
|
8941
|
+
fromLocationId: string().min(1),
|
|
8942
|
+
/** Narrow to one logical class; omit for every profile on the location. */
|
|
8943
|
+
footageClass: RelocateFootageClassSchema.optional()
|
|
8944
|
+
});
|
|
8945
|
+
/** `null` = the archive could not answer (no ledger on this node, or the
|
|
8946
|
+
* aggregate failed). Never conflated with an empty source. */
|
|
8947
|
+
var RelocateResidueSchema = object({
|
|
8948
|
+
segments: number().int().nonnegative(),
|
|
8949
|
+
bytes: number().int().nonnegative()
|
|
8950
|
+
}).nullable();
|
|
8951
|
+
/** How many rows a media pass would still act on against a given target — the
|
|
8952
|
+
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8953
|
+
* never disagree. `null` = the count could not be taken. */
|
|
8954
|
+
var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
|
|
8955
|
+
var RelocatableMediaCountInputSchema = object({
|
|
8956
|
+
toLocationId: string().min(1),
|
|
8957
|
+
/** Omitted = `move`. */
|
|
8958
|
+
mode: MediaRelocateModeSchema.optional()
|
|
8959
|
+
});
|
|
8960
|
+
/**
|
|
8786
8961
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8787
8962
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8788
8963
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8886,6 +9061,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
|
|
|
8886
9061
|
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
8887
9062
|
* at kernel aggregation time, not here).
|
|
8888
9063
|
*/
|
|
9064
|
+
/**
|
|
9065
|
+
* `StorageAccess` — how the service that DECLARED a storage-location kind
|
|
9066
|
+
* actually reaches the bytes. It is the constraint that decides which
|
|
9067
|
+
* `storage-provider`s may back a location of that kind.
|
|
9068
|
+
*
|
|
9069
|
+
* - `'local-path'` — the service asks `storage.resolve` for a path string and
|
|
9070
|
+
* then does its own `node:fs` I/O on it (the recorder's segment writer, the
|
|
9071
|
+
* post-analysis media roots). Only a provider that serves a genuine local
|
|
9072
|
+
* filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
|
|
9073
|
+
* remote provider's `resolve` returns a path on the REMOTE host, and
|
|
9074
|
+
* `fs.readdir` of it on this node either fails or — far worse — succeeds
|
|
9075
|
+
* against a same-named local directory that is something else entirely.
|
|
9076
|
+
*
|
|
9077
|
+
* - `'cap-mediated'` — every byte travels through the `storage` cap
|
|
9078
|
+
* (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
|
|
9079
|
+
* service never sees a path, so any provider can back it. `backups` is the
|
|
9080
|
+
* one kind that qualifies today.
|
|
9081
|
+
*
|
|
9082
|
+
* Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
|
|
9083
|
+
* an EMERGENT property of how the recorder happened to be written. Nothing
|
|
9084
|
+
* refused the configuration; the first write simply went somewhere wrong, and
|
|
9085
|
+
* a recording write that goes wrong surfaces as a silent black window rather
|
|
9086
|
+
* than an error (the read path does not `stat`). This turns that accident into
|
|
9087
|
+
* a declared, enforced, testable refusal.
|
|
9088
|
+
*/
|
|
9089
|
+
var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
|
|
8889
9090
|
var StorageLocationDeclarationSchema = object({
|
|
8890
9091
|
/**
|
|
8891
9092
|
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
@@ -8905,6 +9106,19 @@ var StorageLocationDeclarationSchema = object({
|
|
|
8905
9106
|
*/
|
|
8906
9107
|
cardinality: _enum(["single", "multi"]),
|
|
8907
9108
|
/**
|
|
9109
|
+
* HOW the declaring service reaches the bytes — and therefore WHICH
|
|
9110
|
+
* providers may back a location of this kind. See {@link StorageAccessSchema}
|
|
9111
|
+
* and {@link STORAGE_ACCESS_FALLBACK}.
|
|
9112
|
+
*
|
|
9113
|
+
* Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
|
|
9114
|
+
* can only over-restrict (refuse a remote provider for a kind that might
|
|
9115
|
+
* have coped) and never under-restrict. Declaring `'cap-mediated'` is the
|
|
9116
|
+
* permissive direction and is therefore never inferred — a repo guard
|
|
9117
|
+
* (`scripts/check-storage-access-declarations.ts`) refuses to let it be
|
|
9118
|
+
* reached by omission.
|
|
9119
|
+
*/
|
|
9120
|
+
access: StorageAccessSchema.optional(),
|
|
9121
|
+
/**
|
|
8908
9122
|
* When set, the default instance for this location inherits its resolved
|
|
8909
9123
|
* root from the named location's default instance. Useful for derivative
|
|
8910
9124
|
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
@@ -18492,8 +18706,10 @@ var TrackSchema = object({
|
|
|
18492
18706
|
lastSeen: number(),
|
|
18493
18707
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
18494
18708
|
positions: array(TrackPositionSchema).readonly(),
|
|
18495
|
-
/** Periodic snapshots at snapshotIntervalMs cadence
|
|
18496
|
-
*
|
|
18709
|
+
/** Periodic snapshots at snapshotIntervalMs cadence — DEBUG media, produced
|
|
18710
|
+
* only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
|
|
18711
|
+
* the retired `saveThumbnails` used to gate this and the rolling
|
|
18712
|
+
* `lastFrame` together). Empty is the healthy default, not a capture gap. */
|
|
18497
18713
|
snapshots: array(TrackSnapshotSchema).readonly(),
|
|
18498
18714
|
/** Deduplicated zones the track has entered at least once. Zone IDS. */
|
|
18499
18715
|
zonesVisited: array(string()).readonly(),
|
|
@@ -19353,7 +19569,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19353
19569
|
}), method(RelocateMediaInputSchema, object({ jobId: string() }), {
|
|
19354
19570
|
kind: "mutation",
|
|
19355
19571
|
auth: "admin"
|
|
19356
|
-
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(
|
|
19572
|
+
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
|
|
19573
|
+
kind: "query",
|
|
19574
|
+
auth: "admin"
|
|
19575
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
19357
19576
|
kind: "query",
|
|
19358
19577
|
auth: "admin"
|
|
19359
19578
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
@@ -21312,6 +21531,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
21312
21531
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
21313
21532
|
kind: "mutation",
|
|
21314
21533
|
auth: "admin"
|
|
21534
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
21535
|
+
kind: "mutation",
|
|
21536
|
+
auth: "admin"
|
|
21315
21537
|
});
|
|
21316
21538
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
21317
21539
|
providerId: string().min(1),
|
|
@@ -21710,12 +21932,38 @@ response: record(string(), unknown()) }), object({
|
|
|
21710
21932
|
*
|
|
21711
21933
|
* ## Why this is a capability and not a helper
|
|
21712
21934
|
*
|
|
21713
|
-
*
|
|
21714
|
-
*
|
|
21715
|
-
*
|
|
21716
|
-
*
|
|
21717
|
-
*
|
|
21718
|
-
*
|
|
21935
|
+
* This capability was introduced with the claim that SIX stores in
|
|
21936
|
+
* `addon-post-analysis` held vectors in a `JSON` settings-store column — object
|
|
21937
|
+
* CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
|
|
21938
|
+
* claim was never true, and leaving it here made five stores look like pending
|
|
21939
|
+
* work when three of them have no vector at all. Counted column by column on
|
|
21940
|
+
* 2026-08-30, exactly THREE ever held one:
|
|
21941
|
+
*
|
|
21942
|
+
* - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
|
|
21943
|
+
* - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
|
|
21944
|
+
* - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
|
|
21945
|
+
* face, migrated 2026-08-30 into its OWN index (see below).
|
|
21946
|
+
*
|
|
21947
|
+
* `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
|
|
21948
|
+
* and `identities` store a name; the event store stores no derivative vector.
|
|
21949
|
+
* They are not migration candidates and never were.
|
|
21950
|
+
*
|
|
21951
|
+
* Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
|
|
21952
|
+
* as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
|
|
21953
|
+
* rows before ranking anything.
|
|
21954
|
+
*
|
|
21955
|
+
* ## One index per COMPARISON, never per encoder
|
|
21956
|
+
*
|
|
21957
|
+
* `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
|
|
21958
|
+
* model, and they still get two indexes. An index is a set of things that are
|
|
21959
|
+
* ranked against each other and that live and die together, and these two are
|
|
21960
|
+
* neither: a `faces` row is TRACK-OWNED and cascades away with its track under
|
|
21961
|
+
* a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
|
|
21962
|
+
* forever and is the gallery every recognition ranks against. One index would
|
|
21963
|
+
* mean every gallery load and every reconcile carried a filter whose failure
|
|
21964
|
+
* mode is either ranking a candidate against itself or reclaiming an enrolled
|
|
21965
|
+
* person's only sample. The dimension they share is not a reason to share an
|
|
21966
|
+
* index; the question they answer is, and it differs.
|
|
21719
21967
|
*
|
|
21720
21968
|
* The fix is not a faster loop, it is a different backend — and the backend
|
|
21721
21969
|
* should be replaceable without touching six callers. So: a singleton
|
|
@@ -21820,7 +22068,20 @@ var VectorQueryResultSchema = object({
|
|
|
21820
22068
|
*/
|
|
21821
22069
|
scanned: number(),
|
|
21822
22070
|
/** True when the backend could not consider every row that passed the filter. */
|
|
21823
|
-
truncated: boolean()
|
|
22071
|
+
truncated: boolean(),
|
|
22072
|
+
/**
|
|
22073
|
+
* The `topK` the backend actually ran with.
|
|
22074
|
+
*
|
|
22075
|
+
* Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
|
|
22076
|
+
* past it used to learn nothing but a boolean, from a WARN in the provider's
|
|
22077
|
+
* own log rather than in its answer. That is how an audit asking for 20,000
|
|
22078
|
+
* consumed 4,096 and reported `examined: 4096` as if it had walked the index,
|
|
22079
|
+
* for weeks. `truncated` says THAT the answer was short; this says BY HOW
|
|
22080
|
+
* MUCH, in the return value, where the caller cannot fail to see it.
|
|
22081
|
+
*
|
|
22082
|
+
* Equals the requested `topK` whenever nothing was lowered.
|
|
22083
|
+
*/
|
|
22084
|
+
effectiveTopK: number().int().positive()
|
|
21824
22085
|
});
|
|
21825
22086
|
var VectorDeleteInputSchema = object({
|
|
21826
22087
|
index: string(),
|
|
@@ -21849,6 +22110,68 @@ var VectorGetResultSchema = object({ items: array(object({
|
|
|
21849
22110
|
id: string(),
|
|
21850
22111
|
metadata: VectorMetadataSchema
|
|
21851
22112
|
})) });
|
|
22113
|
+
/**
|
|
22114
|
+
* Ids to read back WITH their vectors.
|
|
22115
|
+
*
|
|
22116
|
+
* The sibling of {@link VectorGetResultSchema}, and deliberately a separate
|
|
22117
|
+
* method rather than a flag on it: `getByIds` promises no vectors and its one
|
|
22118
|
+
* caller depends on that promise. This one promises the opposite.
|
|
22119
|
+
*
|
|
22120
|
+
* It exists because a store cannot put its vectors here otherwise. An ArcFace
|
|
22121
|
+
* gallery is ranked IN PROCESS, per detection, against every enrolled sample —
|
|
22122
|
+
* a per-face cross-process KNN would be a network round trip inside the
|
|
22123
|
+
* recognition loop. So the gallery is loaded once and held in RAM, and loading
|
|
22124
|
+
* it requires the index to hand the floats back. Without this method the only
|
|
22125
|
+
* way to keep a readable vector is a JSON column, which is the thing this
|
|
22126
|
+
* capability exists to delete.
|
|
22127
|
+
*
|
|
22128
|
+
* BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
|
|
22129
|
+
* index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
|
|
22130
|
+
*/
|
|
22131
|
+
var VectorFetchInputSchema = object({
|
|
22132
|
+
index: string(),
|
|
22133
|
+
ids: array(string())
|
|
22134
|
+
});
|
|
22135
|
+
var VectorFetchResultSchema = object({ items: array(object({
|
|
22136
|
+
id: string(),
|
|
22137
|
+
/** base64 Float32LE — the same wire form `upsert` accepts. */
|
|
22138
|
+
vector: string(),
|
|
22139
|
+
metadata: VectorMetadataSchema
|
|
22140
|
+
})) });
|
|
22141
|
+
/**
|
|
22142
|
+
* ENUMERATE an index: one page of rows in a stable order, no ranking.
|
|
22143
|
+
*
|
|
22144
|
+
* A reconcile does not want the nearest rows, it wants ALL of them, and asking
|
|
22145
|
+
* a KNN for "all" is the wrong question twice over. It hits the backend's `k`
|
|
22146
|
+
* ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
|
|
22147
|
+
* probe vector it does not have, so the audit passed a ZERO vector whose cosine
|
|
22148
|
+
* distance to every row is degenerate. `examined: 4096` then read as "we
|
|
22149
|
+
* looked" for as long as anyone cared to read it.
|
|
22150
|
+
*
|
|
22151
|
+
* This is the primitive that question actually needs: a bounded page, ordered
|
|
22152
|
+
* by the backend's own row order, costing no distance computation at all.
|
|
22153
|
+
* Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
|
|
22154
|
+
* the full-table read this capability was built to stop.
|
|
22155
|
+
*/
|
|
22156
|
+
var VectorScanInputSchema = object({
|
|
22157
|
+
index: string(),
|
|
22158
|
+
/** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
|
|
22159
|
+
cursor: number().int().nonnegative().default(0),
|
|
22160
|
+
limit: number().int().positive()
|
|
22161
|
+
});
|
|
22162
|
+
var VectorScanResultSchema = object({
|
|
22163
|
+
items: array(object({
|
|
22164
|
+
id: string(),
|
|
22165
|
+
metadata: VectorMetadataSchema
|
|
22166
|
+
})),
|
|
22167
|
+
/**
|
|
22168
|
+
* Where the next page starts, or `null` when the walk reached the end.
|
|
22169
|
+
*
|
|
22170
|
+
* `null` is the ONLY end-of-index signal. A caller must not infer the end
|
|
22171
|
+
* from a short page: a backend is free to return fewer rows than asked.
|
|
22172
|
+
*/
|
|
22173
|
+
nextCursor: number().int().nonnegative().nullable()
|
|
22174
|
+
});
|
|
21852
22175
|
var VectorStatsInputSchema = object({ index: string() });
|
|
21853
22176
|
var VectorStatsResultSchema = object({
|
|
21854
22177
|
/** Provider id, so an operator can tell brute force from an ANN index. */
|
|
@@ -21867,7 +22190,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
|
|
|
21867
22190
|
}), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
21868
22191
|
kind: "mutation",
|
|
21869
22192
|
auth: "admin"
|
|
21870
|
-
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
22193
|
+
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21871
22194
|
kind: "mutation",
|
|
21872
22195
|
auth: "admin"
|
|
21873
22196
|
}), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
@@ -26771,6 +27094,9 @@ method(object({
|
|
|
26771
27094
|
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
26772
27095
|
kind: "query",
|
|
26773
27096
|
auth: "admin"
|
|
27097
|
+
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
27098
|
+
kind: "query",
|
|
27099
|
+
auth: "admin"
|
|
26774
27100
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26775
27101
|
kind: "mutation",
|
|
26776
27102
|
auth: "admin"
|
|
@@ -31736,6 +32062,12 @@ Object.freeze({
|
|
|
31736
32062
|
addonId: null,
|
|
31737
32063
|
access: "create"
|
|
31738
32064
|
},
|
|
32065
|
+
"pipelineAnalytics.countRelocatableMedia": {
|
|
32066
|
+
capName: "pipeline-analytics",
|
|
32067
|
+
capScope: "device",
|
|
32068
|
+
addonId: null,
|
|
32069
|
+
access: "view"
|
|
32070
|
+
},
|
|
31739
32071
|
"pipelineAnalytics.countUnstampedEventMedia": {
|
|
31740
32072
|
capName: "pipeline-analytics",
|
|
31741
32073
|
capScope: "device",
|
|
@@ -32900,6 +33232,12 @@ Object.freeze({
|
|
|
32900
33232
|
addonId: null,
|
|
32901
33233
|
access: "view"
|
|
32902
33234
|
},
|
|
33235
|
+
"recording.getRelocateResidue": {
|
|
33236
|
+
capName: "recording",
|
|
33237
|
+
capScope: "system",
|
|
33238
|
+
addonId: null,
|
|
33239
|
+
access: "view"
|
|
33240
|
+
},
|
|
32903
33241
|
"recording.getStorageMigrationMoveStatus": {
|
|
32904
33242
|
capName: "recording",
|
|
32905
33243
|
capScope: "system",
|
|
@@ -33446,12 +33784,30 @@ Object.freeze({
|
|
|
33446
33784
|
addonId: null,
|
|
33447
33785
|
access: "create"
|
|
33448
33786
|
},
|
|
33787
|
+
"storageMigration.drain": {
|
|
33788
|
+
capName: "storage-migration",
|
|
33789
|
+
capScope: "system",
|
|
33790
|
+
addonId: null,
|
|
33791
|
+
access: "create"
|
|
33792
|
+
},
|
|
33793
|
+
"storageMigration.movers": {
|
|
33794
|
+
capName: "storage-migration",
|
|
33795
|
+
capScope: "system",
|
|
33796
|
+
addonId: null,
|
|
33797
|
+
access: "view"
|
|
33798
|
+
},
|
|
33449
33799
|
"storageMigration.plan": {
|
|
33450
33800
|
capName: "storage-migration",
|
|
33451
33801
|
capScope: "system",
|
|
33452
33802
|
addonId: null,
|
|
33453
33803
|
access: "view"
|
|
33454
33804
|
},
|
|
33805
|
+
"storageMigration.residue": {
|
|
33806
|
+
capName: "storage-migration",
|
|
33807
|
+
capScope: "system",
|
|
33808
|
+
addonId: null,
|
|
33809
|
+
access: "view"
|
|
33810
|
+
},
|
|
33455
33811
|
"storageMigration.start": {
|
|
33456
33812
|
capName: "storage-migration",
|
|
33457
33813
|
capScope: "system",
|
|
@@ -34286,6 +34642,12 @@ Object.freeze({
|
|
|
34286
34642
|
addonId: null,
|
|
34287
34643
|
access: "delete"
|
|
34288
34644
|
},
|
|
34645
|
+
"vectorStore.fetchByIds": {
|
|
34646
|
+
capName: "vector-store",
|
|
34647
|
+
capScope: "system",
|
|
34648
|
+
addonId: null,
|
|
34649
|
+
access: "view"
|
|
34650
|
+
},
|
|
34289
34651
|
"vectorStore.getByIds": {
|
|
34290
34652
|
capName: "vector-store",
|
|
34291
34653
|
capScope: "system",
|
|
@@ -34298,6 +34660,12 @@ Object.freeze({
|
|
|
34298
34660
|
addonId: null,
|
|
34299
34661
|
access: "view"
|
|
34300
34662
|
},
|
|
34663
|
+
"vectorStore.scan": {
|
|
34664
|
+
capName: "vector-store",
|
|
34665
|
+
capScope: "system",
|
|
34666
|
+
addonId: null,
|
|
34667
|
+
access: "view"
|
|
34668
|
+
},
|
|
34301
34669
|
"vectorStore.stats": {
|
|
34302
34670
|
capName: "vector-store",
|
|
34303
34671
|
capScope: "system",
|