@camstack/addon-export-google 0.1.7 → 0.1.9
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/export-google.addon.js +333 -12
- package/dist/export-google.addon.mjs +333 -12
- package/package.json +1 -1
|
@@ -8357,13 +8357,49 @@ var StorageMigrationParticipantSchema = _enum([
|
|
|
8357
8357
|
"recorder",
|
|
8358
8358
|
"analytics"
|
|
8359
8359
|
]);
|
|
8360
|
+
/**
|
|
8361
|
+
* The mover's own numbers, folded onto the coordinator's durable move record.
|
|
8362
|
+
*
|
|
8363
|
+
* The long half of a non-blocking migration is `draining`, and it is measured
|
|
8364
|
+
* in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
|
|
8365
|
+
* existed the only place those numbers appeared was a Loki line, so an operator
|
|
8366
|
+
* watching the Admin UI saw `phase: draining` and nothing else for a whole
|
|
8367
|
+
* afternoon.
|
|
8368
|
+
*
|
|
8369
|
+
* It is POLLED, never pushed. Events are telemetry and may be dropped
|
|
8370
|
+
* (D8/D11), and a dropped progress event is indistinguishable from a stalled
|
|
8371
|
+
* mover — which is the exact failure this is meant to end. The coordinator's
|
|
8372
|
+
* `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
|
|
8373
|
+
* read `state`; folding the counters costs no extra read and makes the durable
|
|
8374
|
+
* record say afterwards how far a move actually got.
|
|
8375
|
+
*
|
|
8376
|
+
* `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
|
|
8377
|
+
* a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
|
|
8378
|
+
* cannot say M, and a 0 there would render as "100 % done".
|
|
8379
|
+
*/
|
|
8380
|
+
var StorageMigrationMoveProgressSchema = object({
|
|
8381
|
+
filesMoved: number().int().nonnegative(),
|
|
8382
|
+
/** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
|
|
8383
|
+
filesTotal: number().int().nonnegative().nullable(),
|
|
8384
|
+
bytesMoved: number().int().nonnegative(),
|
|
8385
|
+
/** The MOVER's start, not the migration's: a drain restarted after an addon
|
|
8386
|
+
* crash gets a new mover, and a rate computed from the migration's start
|
|
8387
|
+
* would silently average in the time nothing was running. */
|
|
8388
|
+
startedAt: number(),
|
|
8389
|
+
/** When the coordinator last read these numbers. Paired with `startedAt` it
|
|
8390
|
+
* is the only honest rate: both clocks are the hub's, so a UI never has to
|
|
8391
|
+
* subtract its own. */
|
|
8392
|
+
observedAt: number()
|
|
8393
|
+
});
|
|
8360
8394
|
var StorageMigrationMoveSchema = object({
|
|
8361
8395
|
storageClass: StorageMigrationClassSchema,
|
|
8362
8396
|
fromLocationId: string(),
|
|
8363
8397
|
toLocationId: string(),
|
|
8364
8398
|
moverJobId: string().nullable(),
|
|
8365
8399
|
state: RelocateJobStateSchema.nullable(),
|
|
8366
|
-
error: string().nullable()
|
|
8400
|
+
error: string().nullable(),
|
|
8401
|
+
/** Last observed mover counters; `null` until the mover has been polled once. */
|
|
8402
|
+
progress: StorageMigrationMoveProgressSchema.nullable()
|
|
8367
8403
|
});
|
|
8368
8404
|
var StorageMigrationJobSchema = object({
|
|
8369
8405
|
jobId: string(),
|
|
@@ -8409,6 +8445,98 @@ var StorageMigrationPlanSchema = object({
|
|
|
8409
8445
|
findings: array(StorageMigrationFindingSchema)
|
|
8410
8446
|
});
|
|
8411
8447
|
/**
|
|
8448
|
+
* A mover as it exists RIGHT NOW, whether or not a migration job owns it.
|
|
8449
|
+
*
|
|
8450
|
+
* The coordinator's job record is the state of record for a migration, and its
|
|
8451
|
+
* moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
|
|
8452
|
+
* standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
|
|
8453
|
+
* are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
|
|
8454
|
+
* way because no supported UI path existed. A mover armed like that has no job
|
|
8455
|
+
* to fold progress into, so it has to be readable on its own or it is invisible.
|
|
8456
|
+
*
|
|
8457
|
+
* `migrationJobId` is what tells the two apart: `null` means nothing here
|
|
8458
|
+
* orchestrated it.
|
|
8459
|
+
*/
|
|
8460
|
+
var StorageMigrationMoverSchema = object({
|
|
8461
|
+
lane: _enum(["footage", "media"]),
|
|
8462
|
+
job: RelocateJobSchema,
|
|
8463
|
+
/** The coordinator job that armed this mover, or `null` for a mover armed
|
|
8464
|
+
* directly against the owning addon. */
|
|
8465
|
+
migrationJobId: string().nullable(),
|
|
8466
|
+
/** When the hub read these counters. Stamped here so a rate is `bytesMoved`
|
|
8467
|
+
* over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
|
|
8468
|
+
* a browser subtracting its own `Date.now()` from a server `startedAt` is a
|
|
8469
|
+
* rate made of two different clocks. */
|
|
8470
|
+
observedAt: number()
|
|
8471
|
+
});
|
|
8472
|
+
/**
|
|
8473
|
+
* What a SOURCE still holds for one storage class — the number that makes a
|
|
8474
|
+
* "drain remaining" action honest rather than hopeful.
|
|
8475
|
+
*
|
|
8476
|
+
* It comes from the archive (`SegmentHourLedger.census` for footage, the media
|
|
8477
|
+
* engine's own selection count for media), never from the resident index: a
|
|
8478
|
+
* drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
|
|
8479
|
+
* never been told about (D295).
|
|
8480
|
+
*
|
|
8481
|
+
* `items`/`bytes` are `null` for "the archive could not be asked", which is
|
|
8482
|
+
* deliberately NOT zero: a drain is still offered for an unknown residue,
|
|
8483
|
+
* because refusing on an unanswerable read would hide exactly the case an
|
|
8484
|
+
* operator needs to act on.
|
|
8485
|
+
*/
|
|
8486
|
+
var StorageMigrationResidueSchema = object({
|
|
8487
|
+
storageClass: StorageMigrationClassSchema,
|
|
8488
|
+
/** The location still holding the data. `'*'` for the media lane, whose rows
|
|
8489
|
+
* move from wherever they are rather than from one named source. */
|
|
8490
|
+
fromLocationId: string(),
|
|
8491
|
+
/** Where a drain would move it — the class's CURRENT default. */
|
|
8492
|
+
toLocationId: string(),
|
|
8493
|
+
/** Segments (footage lane) or rows (media lane) still on the source. */
|
|
8494
|
+
items: number().int().nonnegative().nullable(),
|
|
8495
|
+
/** Bytes on the source; `null` when the lane counts rows rather than bytes. */
|
|
8496
|
+
bytes: number().int().nonnegative().nullable()
|
|
8497
|
+
});
|
|
8498
|
+
/**
|
|
8499
|
+
* Run the DRAIN half and nothing else.
|
|
8500
|
+
*
|
|
8501
|
+
* A migration that reached `done` has already repointed, so `start` correctly
|
|
8502
|
+
* refuses its destination ("already the default") — there is nothing left to
|
|
8503
|
+
* repoint. But the drain can fail, be cancelled, be interrupted by a restart,
|
|
8504
|
+
* or finish against a work list that was a tenth of the archive (D295), and
|
|
8505
|
+
* before this there was no supported way to run only that half: the only way
|
|
8506
|
+
* through was calling `recording.relocateFootage` by hand over admin tRPC.
|
|
8507
|
+
*
|
|
8508
|
+
* `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
|
|
8509
|
+
* refusal meaningful: the two verbs are disjoint, so nothing here can silently
|
|
8510
|
+
* re-repoint a class that is already migrated.
|
|
8511
|
+
*/
|
|
8512
|
+
var StorageMigrationDrainInputSchema = object({
|
|
8513
|
+
/** The classes to drain. Each must appear in `storageMigration.residue`, so
|
|
8514
|
+
* a class whose source is already empty is refused rather than started. */
|
|
8515
|
+
classes: array(StorageMigrationClassSchema).min(1),
|
|
8516
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
8517
|
+
});
|
|
8518
|
+
/** What a footage source still holds, asked of the durable hour ledger. */
|
|
8519
|
+
var RelocateResidueInputSchema = object({
|
|
8520
|
+
fromLocationId: string().min(1),
|
|
8521
|
+
/** Narrow to one logical class; omit for every profile on the location. */
|
|
8522
|
+
footageClass: RelocateFootageClassSchema.optional()
|
|
8523
|
+
});
|
|
8524
|
+
/** `null` = the archive could not answer (no ledger on this node, or the
|
|
8525
|
+
* aggregate failed). Never conflated with an empty source. */
|
|
8526
|
+
var RelocateResidueSchema = object({
|
|
8527
|
+
segments: number().int().nonnegative(),
|
|
8528
|
+
bytes: number().int().nonnegative()
|
|
8529
|
+
}).nullable();
|
|
8530
|
+
/** How many rows a media pass would still act on against a given target — the
|
|
8531
|
+
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8532
|
+
* never disagree. `null` = the count could not be taken. */
|
|
8533
|
+
var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
|
|
8534
|
+
var RelocatableMediaCountInputSchema = object({
|
|
8535
|
+
toLocationId: string().min(1),
|
|
8536
|
+
/** Omitted = `move`. */
|
|
8537
|
+
mode: MediaRelocateModeSchema.optional()
|
|
8538
|
+
});
|
|
8539
|
+
/**
|
|
8412
8540
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8413
8541
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8414
8542
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8512,6 +8640,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
|
|
|
8512
8640
|
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
8513
8641
|
* at kernel aggregation time, not here).
|
|
8514
8642
|
*/
|
|
8643
|
+
/**
|
|
8644
|
+
* `StorageAccess` — how the service that DECLARED a storage-location kind
|
|
8645
|
+
* actually reaches the bytes. It is the constraint that decides which
|
|
8646
|
+
* `storage-provider`s may back a location of that kind.
|
|
8647
|
+
*
|
|
8648
|
+
* - `'local-path'` — the service asks `storage.resolve` for a path string and
|
|
8649
|
+
* then does its own `node:fs` I/O on it (the recorder's segment writer, the
|
|
8650
|
+
* post-analysis media roots). Only a provider that serves a genuine local
|
|
8651
|
+
* filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
|
|
8652
|
+
* remote provider's `resolve` returns a path on the REMOTE host, and
|
|
8653
|
+
* `fs.readdir` of it on this node either fails or — far worse — succeeds
|
|
8654
|
+
* against a same-named local directory that is something else entirely.
|
|
8655
|
+
*
|
|
8656
|
+
* - `'cap-mediated'` — every byte travels through the `storage` cap
|
|
8657
|
+
* (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
|
|
8658
|
+
* service never sees a path, so any provider can back it. `backups` is the
|
|
8659
|
+
* one kind that qualifies today.
|
|
8660
|
+
*
|
|
8661
|
+
* Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
|
|
8662
|
+
* an EMERGENT property of how the recorder happened to be written. Nothing
|
|
8663
|
+
* refused the configuration; the first write simply went somewhere wrong, and
|
|
8664
|
+
* a recording write that goes wrong surfaces as a silent black window rather
|
|
8665
|
+
* than an error (the read path does not `stat`). This turns that accident into
|
|
8666
|
+
* a declared, enforced, testable refusal.
|
|
8667
|
+
*/
|
|
8668
|
+
var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
|
|
8515
8669
|
var StorageLocationDeclarationSchema = object({
|
|
8516
8670
|
/**
|
|
8517
8671
|
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
@@ -8531,6 +8685,19 @@ var StorageLocationDeclarationSchema = object({
|
|
|
8531
8685
|
*/
|
|
8532
8686
|
cardinality: _enum(["single", "multi"]),
|
|
8533
8687
|
/**
|
|
8688
|
+
* HOW the declaring service reaches the bytes — and therefore WHICH
|
|
8689
|
+
* providers may back a location of this kind. See {@link StorageAccessSchema}
|
|
8690
|
+
* and {@link STORAGE_ACCESS_FALLBACK}.
|
|
8691
|
+
*
|
|
8692
|
+
* Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
|
|
8693
|
+
* can only over-restrict (refuse a remote provider for a kind that might
|
|
8694
|
+
* have coped) and never under-restrict. Declaring `'cap-mediated'` is the
|
|
8695
|
+
* permissive direction and is therefore never inferred — a repo guard
|
|
8696
|
+
* (`scripts/check-storage-access-declarations.ts`) refuses to let it be
|
|
8697
|
+
* reached by omission.
|
|
8698
|
+
*/
|
|
8699
|
+
access: StorageAccessSchema.optional(),
|
|
8700
|
+
/**
|
|
8534
8701
|
* When set, the default instance for this location inherits its resolved
|
|
8535
8702
|
* root from the named location's default instance. Useful for derivative
|
|
8536
8703
|
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
@@ -18145,8 +18312,10 @@ var TrackSchema = object({
|
|
|
18145
18312
|
lastSeen: number(),
|
|
18146
18313
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
18147
18314
|
positions: array(TrackPositionSchema).readonly(),
|
|
18148
|
-
/** Periodic snapshots at snapshotIntervalMs cadence
|
|
18149
|
-
*
|
|
18315
|
+
/** Periodic snapshots at snapshotIntervalMs cadence — DEBUG media, produced
|
|
18316
|
+
* only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
|
|
18317
|
+
* the retired `saveThumbnails` used to gate this and the rolling
|
|
18318
|
+
* `lastFrame` together). Empty is the healthy default, not a capture gap. */
|
|
18150
18319
|
snapshots: array(TrackSnapshotSchema).readonly(),
|
|
18151
18320
|
/** Deduplicated zones the track has entered at least once. Zone IDS. */
|
|
18152
18321
|
zonesVisited: array(string()).readonly(),
|
|
@@ -19006,7 +19175,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19006
19175
|
}), method(RelocateMediaInputSchema, object({ jobId: string() }), {
|
|
19007
19176
|
kind: "mutation",
|
|
19008
19177
|
auth: "admin"
|
|
19009
|
-
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(
|
|
19178
|
+
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
|
|
19179
|
+
kind: "query",
|
|
19180
|
+
auth: "admin"
|
|
19181
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
19010
19182
|
kind: "query",
|
|
19011
19183
|
auth: "admin"
|
|
19012
19184
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
@@ -20965,6 +21137,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
20965
21137
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
20966
21138
|
kind: "mutation",
|
|
20967
21139
|
auth: "admin"
|
|
21140
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
21141
|
+
kind: "mutation",
|
|
21142
|
+
auth: "admin"
|
|
20968
21143
|
});
|
|
20969
21144
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
20970
21145
|
providerId: string().min(1),
|
|
@@ -21363,12 +21538,38 @@ response: record(string(), unknown()) }), object({
|
|
|
21363
21538
|
*
|
|
21364
21539
|
* ## Why this is a capability and not a helper
|
|
21365
21540
|
*
|
|
21366
|
-
*
|
|
21367
|
-
*
|
|
21368
|
-
*
|
|
21369
|
-
*
|
|
21370
|
-
*
|
|
21371
|
-
*
|
|
21541
|
+
* This capability was introduced with the claim that SIX stores in
|
|
21542
|
+
* `addon-post-analysis` held vectors in a `JSON` settings-store column — object
|
|
21543
|
+
* CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
|
|
21544
|
+
* claim was never true, and leaving it here made five stores look like pending
|
|
21545
|
+
* work when three of them have no vector at all. Counted column by column on
|
|
21546
|
+
* 2026-08-30, exactly THREE ever held one:
|
|
21547
|
+
*
|
|
21548
|
+
* - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
|
|
21549
|
+
* - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
|
|
21550
|
+
* - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
|
|
21551
|
+
* face, migrated 2026-08-30 into its OWN index (see below).
|
|
21552
|
+
*
|
|
21553
|
+
* `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
|
|
21554
|
+
* and `identities` store a name; the event store stores no derivative vector.
|
|
21555
|
+
* They are not migration candidates and never were.
|
|
21556
|
+
*
|
|
21557
|
+
* Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
|
|
21558
|
+
* as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
|
|
21559
|
+
* rows before ranking anything.
|
|
21560
|
+
*
|
|
21561
|
+
* ## One index per COMPARISON, never per encoder
|
|
21562
|
+
*
|
|
21563
|
+
* `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
|
|
21564
|
+
* model, and they still get two indexes. An index is a set of things that are
|
|
21565
|
+
* ranked against each other and that live and die together, and these two are
|
|
21566
|
+
* neither: a `faces` row is TRACK-OWNED and cascades away with its track under
|
|
21567
|
+
* a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
|
|
21568
|
+
* forever and is the gallery every recognition ranks against. One index would
|
|
21569
|
+
* mean every gallery load and every reconcile carried a filter whose failure
|
|
21570
|
+
* mode is either ranking a candidate against itself or reclaiming an enrolled
|
|
21571
|
+
* person's only sample. The dimension they share is not a reason to share an
|
|
21572
|
+
* index; the question they answer is, and it differs.
|
|
21372
21573
|
*
|
|
21373
21574
|
* The fix is not a faster loop, it is a different backend — and the backend
|
|
21374
21575
|
* should be replaceable without touching six callers. So: a singleton
|
|
@@ -21473,7 +21674,20 @@ var VectorQueryResultSchema = object({
|
|
|
21473
21674
|
*/
|
|
21474
21675
|
scanned: number(),
|
|
21475
21676
|
/** True when the backend could not consider every row that passed the filter. */
|
|
21476
|
-
truncated: boolean()
|
|
21677
|
+
truncated: boolean(),
|
|
21678
|
+
/**
|
|
21679
|
+
* The `topK` the backend actually ran with.
|
|
21680
|
+
*
|
|
21681
|
+
* Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
|
|
21682
|
+
* past it used to learn nothing but a boolean, from a WARN in the provider's
|
|
21683
|
+
* own log rather than in its answer. That is how an audit asking for 20,000
|
|
21684
|
+
* consumed 4,096 and reported `examined: 4096` as if it had walked the index,
|
|
21685
|
+
* for weeks. `truncated` says THAT the answer was short; this says BY HOW
|
|
21686
|
+
* MUCH, in the return value, where the caller cannot fail to see it.
|
|
21687
|
+
*
|
|
21688
|
+
* Equals the requested `topK` whenever nothing was lowered.
|
|
21689
|
+
*/
|
|
21690
|
+
effectiveTopK: number().int().positive()
|
|
21477
21691
|
});
|
|
21478
21692
|
var VectorDeleteInputSchema = object({
|
|
21479
21693
|
index: string(),
|
|
@@ -21502,6 +21716,68 @@ var VectorGetResultSchema = object({ items: array(object({
|
|
|
21502
21716
|
id: string(),
|
|
21503
21717
|
metadata: VectorMetadataSchema
|
|
21504
21718
|
})) });
|
|
21719
|
+
/**
|
|
21720
|
+
* Ids to read back WITH their vectors.
|
|
21721
|
+
*
|
|
21722
|
+
* The sibling of {@link VectorGetResultSchema}, and deliberately a separate
|
|
21723
|
+
* method rather than a flag on it: `getByIds` promises no vectors and its one
|
|
21724
|
+
* caller depends on that promise. This one promises the opposite.
|
|
21725
|
+
*
|
|
21726
|
+
* It exists because a store cannot put its vectors here otherwise. An ArcFace
|
|
21727
|
+
* gallery is ranked IN PROCESS, per detection, against every enrolled sample —
|
|
21728
|
+
* a per-face cross-process KNN would be a network round trip inside the
|
|
21729
|
+
* recognition loop. So the gallery is loaded once and held in RAM, and loading
|
|
21730
|
+
* it requires the index to hand the floats back. Without this method the only
|
|
21731
|
+
* way to keep a readable vector is a JSON column, which is the thing this
|
|
21732
|
+
* capability exists to delete.
|
|
21733
|
+
*
|
|
21734
|
+
* BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
|
|
21735
|
+
* index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
|
|
21736
|
+
*/
|
|
21737
|
+
var VectorFetchInputSchema = object({
|
|
21738
|
+
index: string(),
|
|
21739
|
+
ids: array(string())
|
|
21740
|
+
});
|
|
21741
|
+
var VectorFetchResultSchema = object({ items: array(object({
|
|
21742
|
+
id: string(),
|
|
21743
|
+
/** base64 Float32LE — the same wire form `upsert` accepts. */
|
|
21744
|
+
vector: string(),
|
|
21745
|
+
metadata: VectorMetadataSchema
|
|
21746
|
+
})) });
|
|
21747
|
+
/**
|
|
21748
|
+
* ENUMERATE an index: one page of rows in a stable order, no ranking.
|
|
21749
|
+
*
|
|
21750
|
+
* A reconcile does not want the nearest rows, it wants ALL of them, and asking
|
|
21751
|
+
* a KNN for "all" is the wrong question twice over. It hits the backend's `k`
|
|
21752
|
+
* ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
|
|
21753
|
+
* probe vector it does not have, so the audit passed a ZERO vector whose cosine
|
|
21754
|
+
* distance to every row is degenerate. `examined: 4096` then read as "we
|
|
21755
|
+
* looked" for as long as anyone cared to read it.
|
|
21756
|
+
*
|
|
21757
|
+
* This is the primitive that question actually needs: a bounded page, ordered
|
|
21758
|
+
* by the backend's own row order, costing no distance computation at all.
|
|
21759
|
+
* Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
|
|
21760
|
+
* the full-table read this capability was built to stop.
|
|
21761
|
+
*/
|
|
21762
|
+
var VectorScanInputSchema = object({
|
|
21763
|
+
index: string(),
|
|
21764
|
+
/** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
|
|
21765
|
+
cursor: number().int().nonnegative().default(0),
|
|
21766
|
+
limit: number().int().positive()
|
|
21767
|
+
});
|
|
21768
|
+
var VectorScanResultSchema = object({
|
|
21769
|
+
items: array(object({
|
|
21770
|
+
id: string(),
|
|
21771
|
+
metadata: VectorMetadataSchema
|
|
21772
|
+
})),
|
|
21773
|
+
/**
|
|
21774
|
+
* Where the next page starts, or `null` when the walk reached the end.
|
|
21775
|
+
*
|
|
21776
|
+
* `null` is the ONLY end-of-index signal. A caller must not infer the end
|
|
21777
|
+
* from a short page: a backend is free to return fewer rows than asked.
|
|
21778
|
+
*/
|
|
21779
|
+
nextCursor: number().int().nonnegative().nullable()
|
|
21780
|
+
});
|
|
21505
21781
|
var VectorStatsInputSchema = object({ index: string() });
|
|
21506
21782
|
var VectorStatsResultSchema = object({
|
|
21507
21783
|
/** Provider id, so an operator can tell brute force from an ANN index. */
|
|
@@ -21520,7 +21796,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
|
|
|
21520
21796
|
}), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
21521
21797
|
kind: "mutation",
|
|
21522
21798
|
auth: "admin"
|
|
21523
|
-
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21799
|
+
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21524
21800
|
kind: "mutation",
|
|
21525
21801
|
auth: "admin"
|
|
21526
21802
|
}), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
@@ -26436,6 +26712,9 @@ method(object({
|
|
|
26436
26712
|
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
26437
26713
|
kind: "query",
|
|
26438
26714
|
auth: "admin"
|
|
26715
|
+
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26716
|
+
kind: "query",
|
|
26717
|
+
auth: "admin"
|
|
26439
26718
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26440
26719
|
kind: "mutation",
|
|
26441
26720
|
auth: "admin"
|
|
@@ -31408,6 +31687,12 @@ Object.freeze({
|
|
|
31408
31687
|
addonId: null,
|
|
31409
31688
|
access: "create"
|
|
31410
31689
|
},
|
|
31690
|
+
"pipelineAnalytics.countRelocatableMedia": {
|
|
31691
|
+
capName: "pipeline-analytics",
|
|
31692
|
+
capScope: "device",
|
|
31693
|
+
addonId: null,
|
|
31694
|
+
access: "view"
|
|
31695
|
+
},
|
|
31411
31696
|
"pipelineAnalytics.countUnstampedEventMedia": {
|
|
31412
31697
|
capName: "pipeline-analytics",
|
|
31413
31698
|
capScope: "device",
|
|
@@ -32572,6 +32857,12 @@ Object.freeze({
|
|
|
32572
32857
|
addonId: null,
|
|
32573
32858
|
access: "view"
|
|
32574
32859
|
},
|
|
32860
|
+
"recording.getRelocateResidue": {
|
|
32861
|
+
capName: "recording",
|
|
32862
|
+
capScope: "system",
|
|
32863
|
+
addonId: null,
|
|
32864
|
+
access: "view"
|
|
32865
|
+
},
|
|
32575
32866
|
"recording.getStorageMigrationMoveStatus": {
|
|
32576
32867
|
capName: "recording",
|
|
32577
32868
|
capScope: "system",
|
|
@@ -33118,12 +33409,30 @@ Object.freeze({
|
|
|
33118
33409
|
addonId: null,
|
|
33119
33410
|
access: "create"
|
|
33120
33411
|
},
|
|
33412
|
+
"storageMigration.drain": {
|
|
33413
|
+
capName: "storage-migration",
|
|
33414
|
+
capScope: "system",
|
|
33415
|
+
addonId: null,
|
|
33416
|
+
access: "create"
|
|
33417
|
+
},
|
|
33418
|
+
"storageMigration.movers": {
|
|
33419
|
+
capName: "storage-migration",
|
|
33420
|
+
capScope: "system",
|
|
33421
|
+
addonId: null,
|
|
33422
|
+
access: "view"
|
|
33423
|
+
},
|
|
33121
33424
|
"storageMigration.plan": {
|
|
33122
33425
|
capName: "storage-migration",
|
|
33123
33426
|
capScope: "system",
|
|
33124
33427
|
addonId: null,
|
|
33125
33428
|
access: "view"
|
|
33126
33429
|
},
|
|
33430
|
+
"storageMigration.residue": {
|
|
33431
|
+
capName: "storage-migration",
|
|
33432
|
+
capScope: "system",
|
|
33433
|
+
addonId: null,
|
|
33434
|
+
access: "view"
|
|
33435
|
+
},
|
|
33127
33436
|
"storageMigration.start": {
|
|
33128
33437
|
capName: "storage-migration",
|
|
33129
33438
|
capScope: "system",
|
|
@@ -33958,6 +34267,12 @@ Object.freeze({
|
|
|
33958
34267
|
addonId: null,
|
|
33959
34268
|
access: "delete"
|
|
33960
34269
|
},
|
|
34270
|
+
"vectorStore.fetchByIds": {
|
|
34271
|
+
capName: "vector-store",
|
|
34272
|
+
capScope: "system",
|
|
34273
|
+
addonId: null,
|
|
34274
|
+
access: "view"
|
|
34275
|
+
},
|
|
33961
34276
|
"vectorStore.getByIds": {
|
|
33962
34277
|
capName: "vector-store",
|
|
33963
34278
|
capScope: "system",
|
|
@@ -33970,6 +34285,12 @@ Object.freeze({
|
|
|
33970
34285
|
addonId: null,
|
|
33971
34286
|
access: "view"
|
|
33972
34287
|
},
|
|
34288
|
+
"vectorStore.scan": {
|
|
34289
|
+
capName: "vector-store",
|
|
34290
|
+
capScope: "system",
|
|
34291
|
+
addonId: null,
|
|
34292
|
+
access: "view"
|
|
34293
|
+
},
|
|
33973
34294
|
"vectorStore.stats": {
|
|
33974
34295
|
capName: "vector-store",
|
|
33975
34296
|
capScope: "system",
|
|
@@ -8353,13 +8353,49 @@ var StorageMigrationParticipantSchema = _enum([
|
|
|
8353
8353
|
"recorder",
|
|
8354
8354
|
"analytics"
|
|
8355
8355
|
]);
|
|
8356
|
+
/**
|
|
8357
|
+
* The mover's own numbers, folded onto the coordinator's durable move record.
|
|
8358
|
+
*
|
|
8359
|
+
* The long half of a non-blocking migration is `draining`, and it is measured
|
|
8360
|
+
* in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
|
|
8361
|
+
* existed the only place those numbers appeared was a Loki line, so an operator
|
|
8362
|
+
* watching the Admin UI saw `phase: draining` and nothing else for a whole
|
|
8363
|
+
* afternoon.
|
|
8364
|
+
*
|
|
8365
|
+
* It is POLLED, never pushed. Events are telemetry and may be dropped
|
|
8366
|
+
* (D8/D11), and a dropped progress event is indistinguishable from a stalled
|
|
8367
|
+
* mover — which is the exact failure this is meant to end. The coordinator's
|
|
8368
|
+
* `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
|
|
8369
|
+
* read `state`; folding the counters costs no extra read and makes the durable
|
|
8370
|
+
* record say afterwards how far a move actually got.
|
|
8371
|
+
*
|
|
8372
|
+
* `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
|
|
8373
|
+
* a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
|
|
8374
|
+
* cannot say M, and a 0 there would render as "100 % done".
|
|
8375
|
+
*/
|
|
8376
|
+
var StorageMigrationMoveProgressSchema = object({
|
|
8377
|
+
filesMoved: number().int().nonnegative(),
|
|
8378
|
+
/** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
|
|
8379
|
+
filesTotal: number().int().nonnegative().nullable(),
|
|
8380
|
+
bytesMoved: number().int().nonnegative(),
|
|
8381
|
+
/** The MOVER's start, not the migration's: a drain restarted after an addon
|
|
8382
|
+
* crash gets a new mover, and a rate computed from the migration's start
|
|
8383
|
+
* would silently average in the time nothing was running. */
|
|
8384
|
+
startedAt: number(),
|
|
8385
|
+
/** When the coordinator last read these numbers. Paired with `startedAt` it
|
|
8386
|
+
* is the only honest rate: both clocks are the hub's, so a UI never has to
|
|
8387
|
+
* subtract its own. */
|
|
8388
|
+
observedAt: number()
|
|
8389
|
+
});
|
|
8356
8390
|
var StorageMigrationMoveSchema = object({
|
|
8357
8391
|
storageClass: StorageMigrationClassSchema,
|
|
8358
8392
|
fromLocationId: string(),
|
|
8359
8393
|
toLocationId: string(),
|
|
8360
8394
|
moverJobId: string().nullable(),
|
|
8361
8395
|
state: RelocateJobStateSchema.nullable(),
|
|
8362
|
-
error: string().nullable()
|
|
8396
|
+
error: string().nullable(),
|
|
8397
|
+
/** Last observed mover counters; `null` until the mover has been polled once. */
|
|
8398
|
+
progress: StorageMigrationMoveProgressSchema.nullable()
|
|
8363
8399
|
});
|
|
8364
8400
|
var StorageMigrationJobSchema = object({
|
|
8365
8401
|
jobId: string(),
|
|
@@ -8405,6 +8441,98 @@ var StorageMigrationPlanSchema = object({
|
|
|
8405
8441
|
findings: array(StorageMigrationFindingSchema)
|
|
8406
8442
|
});
|
|
8407
8443
|
/**
|
|
8444
|
+
* A mover as it exists RIGHT NOW, whether or not a migration job owns it.
|
|
8445
|
+
*
|
|
8446
|
+
* The coordinator's job record is the state of record for a migration, and its
|
|
8447
|
+
* moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
|
|
8448
|
+
* standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
|
|
8449
|
+
* are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
|
|
8450
|
+
* way because no supported UI path existed. A mover armed like that has no job
|
|
8451
|
+
* to fold progress into, so it has to be readable on its own or it is invisible.
|
|
8452
|
+
*
|
|
8453
|
+
* `migrationJobId` is what tells the two apart: `null` means nothing here
|
|
8454
|
+
* orchestrated it.
|
|
8455
|
+
*/
|
|
8456
|
+
var StorageMigrationMoverSchema = object({
|
|
8457
|
+
lane: _enum(["footage", "media"]),
|
|
8458
|
+
job: RelocateJobSchema,
|
|
8459
|
+
/** The coordinator job that armed this mover, or `null` for a mover armed
|
|
8460
|
+
* directly against the owning addon. */
|
|
8461
|
+
migrationJobId: string().nullable(),
|
|
8462
|
+
/** When the hub read these counters. Stamped here so a rate is `bytesMoved`
|
|
8463
|
+
* over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
|
|
8464
|
+
* a browser subtracting its own `Date.now()` from a server `startedAt` is a
|
|
8465
|
+
* rate made of two different clocks. */
|
|
8466
|
+
observedAt: number()
|
|
8467
|
+
});
|
|
8468
|
+
/**
|
|
8469
|
+
* What a SOURCE still holds for one storage class — the number that makes a
|
|
8470
|
+
* "drain remaining" action honest rather than hopeful.
|
|
8471
|
+
*
|
|
8472
|
+
* It comes from the archive (`SegmentHourLedger.census` for footage, the media
|
|
8473
|
+
* engine's own selection count for media), never from the resident index: a
|
|
8474
|
+
* drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
|
|
8475
|
+
* never been told about (D295).
|
|
8476
|
+
*
|
|
8477
|
+
* `items`/`bytes` are `null` for "the archive could not be asked", which is
|
|
8478
|
+
* deliberately NOT zero: a drain is still offered for an unknown residue,
|
|
8479
|
+
* because refusing on an unanswerable read would hide exactly the case an
|
|
8480
|
+
* operator needs to act on.
|
|
8481
|
+
*/
|
|
8482
|
+
var StorageMigrationResidueSchema = object({
|
|
8483
|
+
storageClass: StorageMigrationClassSchema,
|
|
8484
|
+
/** The location still holding the data. `'*'` for the media lane, whose rows
|
|
8485
|
+
* move from wherever they are rather than from one named source. */
|
|
8486
|
+
fromLocationId: string(),
|
|
8487
|
+
/** Where a drain would move it — the class's CURRENT default. */
|
|
8488
|
+
toLocationId: string(),
|
|
8489
|
+
/** Segments (footage lane) or rows (media lane) still on the source. */
|
|
8490
|
+
items: number().int().nonnegative().nullable(),
|
|
8491
|
+
/** Bytes on the source; `null` when the lane counts rows rather than bytes. */
|
|
8492
|
+
bytes: number().int().nonnegative().nullable()
|
|
8493
|
+
});
|
|
8494
|
+
/**
|
|
8495
|
+
* Run the DRAIN half and nothing else.
|
|
8496
|
+
*
|
|
8497
|
+
* A migration that reached `done` has already repointed, so `start` correctly
|
|
8498
|
+
* refuses its destination ("already the default") — there is nothing left to
|
|
8499
|
+
* repoint. But the drain can fail, be cancelled, be interrupted by a restart,
|
|
8500
|
+
* or finish against a work list that was a tenth of the archive (D295), and
|
|
8501
|
+
* before this there was no supported way to run only that half: the only way
|
|
8502
|
+
* through was calling `recording.relocateFootage` by hand over admin tRPC.
|
|
8503
|
+
*
|
|
8504
|
+
* `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
|
|
8505
|
+
* refusal meaningful: the two verbs are disjoint, so nothing here can silently
|
|
8506
|
+
* re-repoint a class that is already migrated.
|
|
8507
|
+
*/
|
|
8508
|
+
var StorageMigrationDrainInputSchema = object({
|
|
8509
|
+
/** The classes to drain. Each must appear in `storageMigration.residue`, so
|
|
8510
|
+
* a class whose source is already empty is refused rather than started. */
|
|
8511
|
+
classes: array(StorageMigrationClassSchema).min(1),
|
|
8512
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
8513
|
+
});
|
|
8514
|
+
/** What a footage source still holds, asked of the durable hour ledger. */
|
|
8515
|
+
var RelocateResidueInputSchema = object({
|
|
8516
|
+
fromLocationId: string().min(1),
|
|
8517
|
+
/** Narrow to one logical class; omit for every profile on the location. */
|
|
8518
|
+
footageClass: RelocateFootageClassSchema.optional()
|
|
8519
|
+
});
|
|
8520
|
+
/** `null` = the archive could not answer (no ledger on this node, or the
|
|
8521
|
+
* aggregate failed). Never conflated with an empty source. */
|
|
8522
|
+
var RelocateResidueSchema = object({
|
|
8523
|
+
segments: number().int().nonnegative(),
|
|
8524
|
+
bytes: number().int().nonnegative()
|
|
8525
|
+
}).nullable();
|
|
8526
|
+
/** How many rows a media pass would still act on against a given target — the
|
|
8527
|
+
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8528
|
+
* never disagree. `null` = the count could not be taken. */
|
|
8529
|
+
var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
|
|
8530
|
+
var RelocatableMediaCountInputSchema = object({
|
|
8531
|
+
toLocationId: string().min(1),
|
|
8532
|
+
/** Omitted = `move`. */
|
|
8533
|
+
mode: MediaRelocateModeSchema.optional()
|
|
8534
|
+
});
|
|
8535
|
+
/**
|
|
8408
8536
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8409
8537
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8410
8538
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8508,6 +8636,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
|
|
|
8508
8636
|
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
8509
8637
|
* at kernel aggregation time, not here).
|
|
8510
8638
|
*/
|
|
8639
|
+
/**
|
|
8640
|
+
* `StorageAccess` — how the service that DECLARED a storage-location kind
|
|
8641
|
+
* actually reaches the bytes. It is the constraint that decides which
|
|
8642
|
+
* `storage-provider`s may back a location of that kind.
|
|
8643
|
+
*
|
|
8644
|
+
* - `'local-path'` — the service asks `storage.resolve` for a path string and
|
|
8645
|
+
* then does its own `node:fs` I/O on it (the recorder's segment writer, the
|
|
8646
|
+
* post-analysis media roots). Only a provider that serves a genuine local
|
|
8647
|
+
* filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
|
|
8648
|
+
* remote provider's `resolve` returns a path on the REMOTE host, and
|
|
8649
|
+
* `fs.readdir` of it on this node either fails or — far worse — succeeds
|
|
8650
|
+
* against a same-named local directory that is something else entirely.
|
|
8651
|
+
*
|
|
8652
|
+
* - `'cap-mediated'` — every byte travels through the `storage` cap
|
|
8653
|
+
* (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
|
|
8654
|
+
* service never sees a path, so any provider can back it. `backups` is the
|
|
8655
|
+
* one kind that qualifies today.
|
|
8656
|
+
*
|
|
8657
|
+
* Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
|
|
8658
|
+
* an EMERGENT property of how the recorder happened to be written. Nothing
|
|
8659
|
+
* refused the configuration; the first write simply went somewhere wrong, and
|
|
8660
|
+
* a recording write that goes wrong surfaces as a silent black window rather
|
|
8661
|
+
* than an error (the read path does not `stat`). This turns that accident into
|
|
8662
|
+
* a declared, enforced, testable refusal.
|
|
8663
|
+
*/
|
|
8664
|
+
var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
|
|
8511
8665
|
var StorageLocationDeclarationSchema = object({
|
|
8512
8666
|
/**
|
|
8513
8667
|
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
@@ -8527,6 +8681,19 @@ var StorageLocationDeclarationSchema = object({
|
|
|
8527
8681
|
*/
|
|
8528
8682
|
cardinality: _enum(["single", "multi"]),
|
|
8529
8683
|
/**
|
|
8684
|
+
* HOW the declaring service reaches the bytes — and therefore WHICH
|
|
8685
|
+
* providers may back a location of this kind. See {@link StorageAccessSchema}
|
|
8686
|
+
* and {@link STORAGE_ACCESS_FALLBACK}.
|
|
8687
|
+
*
|
|
8688
|
+
* Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
|
|
8689
|
+
* can only over-restrict (refuse a remote provider for a kind that might
|
|
8690
|
+
* have coped) and never under-restrict. Declaring `'cap-mediated'` is the
|
|
8691
|
+
* permissive direction and is therefore never inferred — a repo guard
|
|
8692
|
+
* (`scripts/check-storage-access-declarations.ts`) refuses to let it be
|
|
8693
|
+
* reached by omission.
|
|
8694
|
+
*/
|
|
8695
|
+
access: StorageAccessSchema.optional(),
|
|
8696
|
+
/**
|
|
8530
8697
|
* When set, the default instance for this location inherits its resolved
|
|
8531
8698
|
* root from the named location's default instance. Useful for derivative
|
|
8532
8699
|
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
@@ -18141,8 +18308,10 @@ var TrackSchema = object({
|
|
|
18141
18308
|
lastSeen: number(),
|
|
18142
18309
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
18143
18310
|
positions: array(TrackPositionSchema).readonly(),
|
|
18144
|
-
/** Periodic snapshots at snapshotIntervalMs cadence
|
|
18145
|
-
*
|
|
18311
|
+
/** Periodic snapshots at snapshotIntervalMs cadence — DEBUG media, produced
|
|
18312
|
+
* only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
|
|
18313
|
+
* the retired `saveThumbnails` used to gate this and the rolling
|
|
18314
|
+
* `lastFrame` together). Empty is the healthy default, not a capture gap. */
|
|
18146
18315
|
snapshots: array(TrackSnapshotSchema).readonly(),
|
|
18147
18316
|
/** Deduplicated zones the track has entered at least once. Zone IDS. */
|
|
18148
18317
|
zonesVisited: array(string()).readonly(),
|
|
@@ -19002,7 +19171,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
19002
19171
|
}), method(RelocateMediaInputSchema, object({ jobId: string() }), {
|
|
19003
19172
|
kind: "mutation",
|
|
19004
19173
|
auth: "admin"
|
|
19005
|
-
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(
|
|
19174
|
+
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
|
|
19175
|
+
kind: "query",
|
|
19176
|
+
auth: "admin"
|
|
19177
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
19006
19178
|
kind: "query",
|
|
19007
19179
|
auth: "admin"
|
|
19008
19180
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
@@ -20961,6 +21133,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
20961
21133
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
20962
21134
|
kind: "mutation",
|
|
20963
21135
|
auth: "admin"
|
|
21136
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
21137
|
+
kind: "mutation",
|
|
21138
|
+
auth: "admin"
|
|
20964
21139
|
});
|
|
20965
21140
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
20966
21141
|
providerId: string().min(1),
|
|
@@ -21359,12 +21534,38 @@ response: record(string(), unknown()) }), object({
|
|
|
21359
21534
|
*
|
|
21360
21535
|
* ## Why this is a capability and not a helper
|
|
21361
21536
|
*
|
|
21362
|
-
*
|
|
21363
|
-
*
|
|
21364
|
-
*
|
|
21365
|
-
*
|
|
21366
|
-
*
|
|
21367
|
-
*
|
|
21537
|
+
* This capability was introduced with the claim that SIX stores in
|
|
21538
|
+
* `addon-post-analysis` held vectors in a `JSON` settings-store column — object
|
|
21539
|
+
* CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
|
|
21540
|
+
* claim was never true, and leaving it here made five stores look like pending
|
|
21541
|
+
* work when three of them have no vector at all. Counted column by column on
|
|
21542
|
+
* 2026-08-30, exactly THREE ever held one:
|
|
21543
|
+
*
|
|
21544
|
+
* - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
|
|
21545
|
+
* - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
|
|
21546
|
+
* - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
|
|
21547
|
+
* face, migrated 2026-08-30 into its OWN index (see below).
|
|
21548
|
+
*
|
|
21549
|
+
* `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
|
|
21550
|
+
* and `identities` store a name; the event store stores no derivative vector.
|
|
21551
|
+
* They are not migration candidates and never were.
|
|
21552
|
+
*
|
|
21553
|
+
* Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
|
|
21554
|
+
* as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
|
|
21555
|
+
* rows before ranking anything.
|
|
21556
|
+
*
|
|
21557
|
+
* ## One index per COMPARISON, never per encoder
|
|
21558
|
+
*
|
|
21559
|
+
* `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
|
|
21560
|
+
* model, and they still get two indexes. An index is a set of things that are
|
|
21561
|
+
* ranked against each other and that live and die together, and these two are
|
|
21562
|
+
* neither: a `faces` row is TRACK-OWNED and cascades away with its track under
|
|
21563
|
+
* a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
|
|
21564
|
+
* forever and is the gallery every recognition ranks against. One index would
|
|
21565
|
+
* mean every gallery load and every reconcile carried a filter whose failure
|
|
21566
|
+
* mode is either ranking a candidate against itself or reclaiming an enrolled
|
|
21567
|
+
* person's only sample. The dimension they share is not a reason to share an
|
|
21568
|
+
* index; the question they answer is, and it differs.
|
|
21368
21569
|
*
|
|
21369
21570
|
* The fix is not a faster loop, it is a different backend — and the backend
|
|
21370
21571
|
* should be replaceable without touching six callers. So: a singleton
|
|
@@ -21469,7 +21670,20 @@ var VectorQueryResultSchema = object({
|
|
|
21469
21670
|
*/
|
|
21470
21671
|
scanned: number(),
|
|
21471
21672
|
/** True when the backend could not consider every row that passed the filter. */
|
|
21472
|
-
truncated: boolean()
|
|
21673
|
+
truncated: boolean(),
|
|
21674
|
+
/**
|
|
21675
|
+
* The `topK` the backend actually ran with.
|
|
21676
|
+
*
|
|
21677
|
+
* Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
|
|
21678
|
+
* past it used to learn nothing but a boolean, from a WARN in the provider's
|
|
21679
|
+
* own log rather than in its answer. That is how an audit asking for 20,000
|
|
21680
|
+
* consumed 4,096 and reported `examined: 4096` as if it had walked the index,
|
|
21681
|
+
* for weeks. `truncated` says THAT the answer was short; this says BY HOW
|
|
21682
|
+
* MUCH, in the return value, where the caller cannot fail to see it.
|
|
21683
|
+
*
|
|
21684
|
+
* Equals the requested `topK` whenever nothing was lowered.
|
|
21685
|
+
*/
|
|
21686
|
+
effectiveTopK: number().int().positive()
|
|
21473
21687
|
});
|
|
21474
21688
|
var VectorDeleteInputSchema = object({
|
|
21475
21689
|
index: string(),
|
|
@@ -21498,6 +21712,68 @@ var VectorGetResultSchema = object({ items: array(object({
|
|
|
21498
21712
|
id: string(),
|
|
21499
21713
|
metadata: VectorMetadataSchema
|
|
21500
21714
|
})) });
|
|
21715
|
+
/**
|
|
21716
|
+
* Ids to read back WITH their vectors.
|
|
21717
|
+
*
|
|
21718
|
+
* The sibling of {@link VectorGetResultSchema}, and deliberately a separate
|
|
21719
|
+
* method rather than a flag on it: `getByIds` promises no vectors and its one
|
|
21720
|
+
* caller depends on that promise. This one promises the opposite.
|
|
21721
|
+
*
|
|
21722
|
+
* It exists because a store cannot put its vectors here otherwise. An ArcFace
|
|
21723
|
+
* gallery is ranked IN PROCESS, per detection, against every enrolled sample —
|
|
21724
|
+
* a per-face cross-process KNN would be a network round trip inside the
|
|
21725
|
+
* recognition loop. So the gallery is loaded once and held in RAM, and loading
|
|
21726
|
+
* it requires the index to hand the floats back. Without this method the only
|
|
21727
|
+
* way to keep a readable vector is a JSON column, which is the thing this
|
|
21728
|
+
* capability exists to delete.
|
|
21729
|
+
*
|
|
21730
|
+
* BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
|
|
21731
|
+
* index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
|
|
21732
|
+
*/
|
|
21733
|
+
var VectorFetchInputSchema = object({
|
|
21734
|
+
index: string(),
|
|
21735
|
+
ids: array(string())
|
|
21736
|
+
});
|
|
21737
|
+
var VectorFetchResultSchema = object({ items: array(object({
|
|
21738
|
+
id: string(),
|
|
21739
|
+
/** base64 Float32LE — the same wire form `upsert` accepts. */
|
|
21740
|
+
vector: string(),
|
|
21741
|
+
metadata: VectorMetadataSchema
|
|
21742
|
+
})) });
|
|
21743
|
+
/**
|
|
21744
|
+
* ENUMERATE an index: one page of rows in a stable order, no ranking.
|
|
21745
|
+
*
|
|
21746
|
+
* A reconcile does not want the nearest rows, it wants ALL of them, and asking
|
|
21747
|
+
* a KNN for "all" is the wrong question twice over. It hits the backend's `k`
|
|
21748
|
+
* ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
|
|
21749
|
+
* probe vector it does not have, so the audit passed a ZERO vector whose cosine
|
|
21750
|
+
* distance to every row is degenerate. `examined: 4096` then read as "we
|
|
21751
|
+
* looked" for as long as anyone cared to read it.
|
|
21752
|
+
*
|
|
21753
|
+
* This is the primitive that question actually needs: a bounded page, ordered
|
|
21754
|
+
* by the backend's own row order, costing no distance computation at all.
|
|
21755
|
+
* Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
|
|
21756
|
+
* the full-table read this capability was built to stop.
|
|
21757
|
+
*/
|
|
21758
|
+
var VectorScanInputSchema = object({
|
|
21759
|
+
index: string(),
|
|
21760
|
+
/** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
|
|
21761
|
+
cursor: number().int().nonnegative().default(0),
|
|
21762
|
+
limit: number().int().positive()
|
|
21763
|
+
});
|
|
21764
|
+
var VectorScanResultSchema = object({
|
|
21765
|
+
items: array(object({
|
|
21766
|
+
id: string(),
|
|
21767
|
+
metadata: VectorMetadataSchema
|
|
21768
|
+
})),
|
|
21769
|
+
/**
|
|
21770
|
+
* Where the next page starts, or `null` when the walk reached the end.
|
|
21771
|
+
*
|
|
21772
|
+
* `null` is the ONLY end-of-index signal. A caller must not infer the end
|
|
21773
|
+
* from a short page: a backend is free to return fewer rows than asked.
|
|
21774
|
+
*/
|
|
21775
|
+
nextCursor: number().int().nonnegative().nullable()
|
|
21776
|
+
});
|
|
21501
21777
|
var VectorStatsInputSchema = object({ index: string() });
|
|
21502
21778
|
var VectorStatsResultSchema = object({
|
|
21503
21779
|
/** Provider id, so an operator can tell brute force from an ANN index. */
|
|
@@ -21516,7 +21792,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
|
|
|
21516
21792
|
}), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
21517
21793
|
kind: "mutation",
|
|
21518
21794
|
auth: "admin"
|
|
21519
|
-
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21795
|
+
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21520
21796
|
kind: "mutation",
|
|
21521
21797
|
auth: "admin"
|
|
21522
21798
|
}), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
@@ -26432,6 +26708,9 @@ method(object({
|
|
|
26432
26708
|
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
26433
26709
|
kind: "query",
|
|
26434
26710
|
auth: "admin"
|
|
26711
|
+
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26712
|
+
kind: "query",
|
|
26713
|
+
auth: "admin"
|
|
26435
26714
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26436
26715
|
kind: "mutation",
|
|
26437
26716
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-export-google",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "Google Home export — hub-side smart-home fulfillment (SYNC / QUERY / EXECUTE / DISCONNECT) for the non-camera fleet, served over the hub's own OAuth account link. No Google credential is stored, sent or required.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|