@camstack/addon-tailscale 1.2.43 → 1.2.45
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/client/tailscale.addon.js +1 -1
- package/dist/client/tailscale.addon.mjs +1 -1
- package/dist/{dist-cWp3ATn9.mjs → dist-RluxJbgF.mjs} +333 -12
- package/dist/{dist-Bzn0_Gfg.js → dist-ki6Kt6cL.js} +333 -12
- package/dist/ingress/tailscale-ingress.addon.js +1 -1
- package/dist/ingress/tailscale-ingress.addon.mjs +1 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
//#endregion
|
|
27
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-ki6Kt6cL.js");
|
|
28
28
|
let node_child_process = require("node:child_process");
|
|
29
29
|
let node_util = require("node:util");
|
|
30
30
|
let node_fs = require("node:fs");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability, r as BOOT_RECOVERY_BACKOFF_MS, t as meshNetworkCapability } from "../dist-RluxJbgF.mjs";
|
|
2
2
|
import { execFile, spawn } from "node:child_process";
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import * as fs from "node:fs";
|
|
@@ -8181,13 +8181,49 @@ var StorageMigrationParticipantSchema = _enum([
|
|
|
8181
8181
|
"recorder",
|
|
8182
8182
|
"analytics"
|
|
8183
8183
|
]);
|
|
8184
|
+
/**
|
|
8185
|
+
* The mover's own numbers, folded onto the coordinator's durable move record.
|
|
8186
|
+
*
|
|
8187
|
+
* The long half of a non-blocking migration is `draining`, and it is measured
|
|
8188
|
+
* in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
|
|
8189
|
+
* existed the only place those numbers appeared was a Loki line, so an operator
|
|
8190
|
+
* watching the Admin UI saw `phase: draining` and nothing else for a whole
|
|
8191
|
+
* afternoon.
|
|
8192
|
+
*
|
|
8193
|
+
* It is POLLED, never pushed. Events are telemetry and may be dropped
|
|
8194
|
+
* (D8/D11), and a dropped progress event is indistinguishable from a stalled
|
|
8195
|
+
* mover — which is the exact failure this is meant to end. The coordinator's
|
|
8196
|
+
* `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
|
|
8197
|
+
* read `state`; folding the counters costs no extra read and makes the durable
|
|
8198
|
+
* record say afterwards how far a move actually got.
|
|
8199
|
+
*
|
|
8200
|
+
* `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
|
|
8201
|
+
* a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
|
|
8202
|
+
* cannot say M, and a 0 there would render as "100 % done".
|
|
8203
|
+
*/
|
|
8204
|
+
var StorageMigrationMoveProgressSchema = object({
|
|
8205
|
+
filesMoved: number().int().nonnegative(),
|
|
8206
|
+
/** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
|
|
8207
|
+
filesTotal: number().int().nonnegative().nullable(),
|
|
8208
|
+
bytesMoved: number().int().nonnegative(),
|
|
8209
|
+
/** The MOVER's start, not the migration's: a drain restarted after an addon
|
|
8210
|
+
* crash gets a new mover, and a rate computed from the migration's start
|
|
8211
|
+
* would silently average in the time nothing was running. */
|
|
8212
|
+
startedAt: number(),
|
|
8213
|
+
/** When the coordinator last read these numbers. Paired with `startedAt` it
|
|
8214
|
+
* is the only honest rate: both clocks are the hub's, so a UI never has to
|
|
8215
|
+
* subtract its own. */
|
|
8216
|
+
observedAt: number()
|
|
8217
|
+
});
|
|
8184
8218
|
var StorageMigrationMoveSchema = object({
|
|
8185
8219
|
storageClass: StorageMigrationClassSchema,
|
|
8186
8220
|
fromLocationId: string(),
|
|
8187
8221
|
toLocationId: string(),
|
|
8188
8222
|
moverJobId: string().nullable(),
|
|
8189
8223
|
state: RelocateJobStateSchema.nullable(),
|
|
8190
|
-
error: string().nullable()
|
|
8224
|
+
error: string().nullable(),
|
|
8225
|
+
/** Last observed mover counters; `null` until the mover has been polled once. */
|
|
8226
|
+
progress: StorageMigrationMoveProgressSchema.nullable()
|
|
8191
8227
|
});
|
|
8192
8228
|
var StorageMigrationJobSchema = object({
|
|
8193
8229
|
jobId: string(),
|
|
@@ -8233,6 +8269,98 @@ var StorageMigrationPlanSchema = object({
|
|
|
8233
8269
|
findings: array(StorageMigrationFindingSchema)
|
|
8234
8270
|
});
|
|
8235
8271
|
/**
|
|
8272
|
+
* A mover as it exists RIGHT NOW, whether or not a migration job owns it.
|
|
8273
|
+
*
|
|
8274
|
+
* The coordinator's job record is the state of record for a migration, and its
|
|
8275
|
+
* moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
|
|
8276
|
+
* standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
|
|
8277
|
+
* are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
|
|
8278
|
+
* way because no supported UI path existed. A mover armed like that has no job
|
|
8279
|
+
* to fold progress into, so it has to be readable on its own or it is invisible.
|
|
8280
|
+
*
|
|
8281
|
+
* `migrationJobId` is what tells the two apart: `null` means nothing here
|
|
8282
|
+
* orchestrated it.
|
|
8283
|
+
*/
|
|
8284
|
+
var StorageMigrationMoverSchema = object({
|
|
8285
|
+
lane: _enum(["footage", "media"]),
|
|
8286
|
+
job: RelocateJobSchema,
|
|
8287
|
+
/** The coordinator job that armed this mover, or `null` for a mover armed
|
|
8288
|
+
* directly against the owning addon. */
|
|
8289
|
+
migrationJobId: string().nullable(),
|
|
8290
|
+
/** When the hub read these counters. Stamped here so a rate is `bytesMoved`
|
|
8291
|
+
* over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
|
|
8292
|
+
* a browser subtracting its own `Date.now()` from a server `startedAt` is a
|
|
8293
|
+
* rate made of two different clocks. */
|
|
8294
|
+
observedAt: number()
|
|
8295
|
+
});
|
|
8296
|
+
/**
|
|
8297
|
+
* What a SOURCE still holds for one storage class — the number that makes a
|
|
8298
|
+
* "drain remaining" action honest rather than hopeful.
|
|
8299
|
+
*
|
|
8300
|
+
* It comes from the archive (`SegmentHourLedger.census` for footage, the media
|
|
8301
|
+
* engine's own selection count for media), never from the resident index: a
|
|
8302
|
+
* drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
|
|
8303
|
+
* never been told about (D295).
|
|
8304
|
+
*
|
|
8305
|
+
* `items`/`bytes` are `null` for "the archive could not be asked", which is
|
|
8306
|
+
* deliberately NOT zero: a drain is still offered for an unknown residue,
|
|
8307
|
+
* because refusing on an unanswerable read would hide exactly the case an
|
|
8308
|
+
* operator needs to act on.
|
|
8309
|
+
*/
|
|
8310
|
+
var StorageMigrationResidueSchema = object({
|
|
8311
|
+
storageClass: StorageMigrationClassSchema,
|
|
8312
|
+
/** The location still holding the data. `'*'` for the media lane, whose rows
|
|
8313
|
+
* move from wherever they are rather than from one named source. */
|
|
8314
|
+
fromLocationId: string(),
|
|
8315
|
+
/** Where a drain would move it — the class's CURRENT default. */
|
|
8316
|
+
toLocationId: string(),
|
|
8317
|
+
/** Segments (footage lane) or rows (media lane) still on the source. */
|
|
8318
|
+
items: number().int().nonnegative().nullable(),
|
|
8319
|
+
/** Bytes on the source; `null` when the lane counts rows rather than bytes. */
|
|
8320
|
+
bytes: number().int().nonnegative().nullable()
|
|
8321
|
+
});
|
|
8322
|
+
/**
|
|
8323
|
+
* Run the DRAIN half and nothing else.
|
|
8324
|
+
*
|
|
8325
|
+
* A migration that reached `done` has already repointed, so `start` correctly
|
|
8326
|
+
* refuses its destination ("already the default") — there is nothing left to
|
|
8327
|
+
* repoint. But the drain can fail, be cancelled, be interrupted by a restart,
|
|
8328
|
+
* or finish against a work list that was a tenth of the archive (D295), and
|
|
8329
|
+
* before this there was no supported way to run only that half: the only way
|
|
8330
|
+
* through was calling `recording.relocateFootage` by hand over admin tRPC.
|
|
8331
|
+
*
|
|
8332
|
+
* `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
|
|
8333
|
+
* refusal meaningful: the two verbs are disjoint, so nothing here can silently
|
|
8334
|
+
* re-repoint a class that is already migrated.
|
|
8335
|
+
*/
|
|
8336
|
+
var StorageMigrationDrainInputSchema = object({
|
|
8337
|
+
/** The classes to drain. Each must appear in `storageMigration.residue`, so
|
|
8338
|
+
* a class whose source is already empty is refused rather than started. */
|
|
8339
|
+
classes: array(StorageMigrationClassSchema).min(1),
|
|
8340
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
8341
|
+
});
|
|
8342
|
+
/** What a footage source still holds, asked of the durable hour ledger. */
|
|
8343
|
+
var RelocateResidueInputSchema = object({
|
|
8344
|
+
fromLocationId: string().min(1),
|
|
8345
|
+
/** Narrow to one logical class; omit for every profile on the location. */
|
|
8346
|
+
footageClass: RelocateFootageClassSchema.optional()
|
|
8347
|
+
});
|
|
8348
|
+
/** `null` = the archive could not answer (no ledger on this node, or the
|
|
8349
|
+
* aggregate failed). Never conflated with an empty source. */
|
|
8350
|
+
var RelocateResidueSchema = object({
|
|
8351
|
+
segments: number().int().nonnegative(),
|
|
8352
|
+
bytes: number().int().nonnegative()
|
|
8353
|
+
}).nullable();
|
|
8354
|
+
/** How many rows a media pass would still act on against a given target — the
|
|
8355
|
+
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8356
|
+
* never disagree. `null` = the count could not be taken. */
|
|
8357
|
+
var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
|
|
8358
|
+
var RelocatableMediaCountInputSchema = object({
|
|
8359
|
+
toLocationId: string().min(1),
|
|
8360
|
+
/** Omitted = `move`. */
|
|
8361
|
+
mode: MediaRelocateModeSchema.optional()
|
|
8362
|
+
});
|
|
8363
|
+
/**
|
|
8236
8364
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8237
8365
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8238
8366
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8336,6 +8464,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
|
|
|
8336
8464
|
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
8337
8465
|
* at kernel aggregation time, not here).
|
|
8338
8466
|
*/
|
|
8467
|
+
/**
|
|
8468
|
+
* `StorageAccess` — how the service that DECLARED a storage-location kind
|
|
8469
|
+
* actually reaches the bytes. It is the constraint that decides which
|
|
8470
|
+
* `storage-provider`s may back a location of that kind.
|
|
8471
|
+
*
|
|
8472
|
+
* - `'local-path'` — the service asks `storage.resolve` for a path string and
|
|
8473
|
+
* then does its own `node:fs` I/O on it (the recorder's segment writer, the
|
|
8474
|
+
* post-analysis media roots). Only a provider that serves a genuine local
|
|
8475
|
+
* filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
|
|
8476
|
+
* remote provider's `resolve` returns a path on the REMOTE host, and
|
|
8477
|
+
* `fs.readdir` of it on this node either fails or — far worse — succeeds
|
|
8478
|
+
* against a same-named local directory that is something else entirely.
|
|
8479
|
+
*
|
|
8480
|
+
* - `'cap-mediated'` — every byte travels through the `storage` cap
|
|
8481
|
+
* (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
|
|
8482
|
+
* service never sees a path, so any provider can back it. `backups` is the
|
|
8483
|
+
* one kind that qualifies today.
|
|
8484
|
+
*
|
|
8485
|
+
* Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
|
|
8486
|
+
* an EMERGENT property of how the recorder happened to be written. Nothing
|
|
8487
|
+
* refused the configuration; the first write simply went somewhere wrong, and
|
|
8488
|
+
* a recording write that goes wrong surfaces as a silent black window rather
|
|
8489
|
+
* than an error (the read path does not `stat`). This turns that accident into
|
|
8490
|
+
* a declared, enforced, testable refusal.
|
|
8491
|
+
*/
|
|
8492
|
+
var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
|
|
8339
8493
|
var StorageLocationDeclarationSchema = object({
|
|
8340
8494
|
/**
|
|
8341
8495
|
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
@@ -8355,6 +8509,19 @@ var StorageLocationDeclarationSchema = object({
|
|
|
8355
8509
|
*/
|
|
8356
8510
|
cardinality: _enum(["single", "multi"]),
|
|
8357
8511
|
/**
|
|
8512
|
+
* HOW the declaring service reaches the bytes — and therefore WHICH
|
|
8513
|
+
* providers may back a location of this kind. See {@link StorageAccessSchema}
|
|
8514
|
+
* and {@link STORAGE_ACCESS_FALLBACK}.
|
|
8515
|
+
*
|
|
8516
|
+
* Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
|
|
8517
|
+
* can only over-restrict (refuse a remote provider for a kind that might
|
|
8518
|
+
* have coped) and never under-restrict. Declaring `'cap-mediated'` is the
|
|
8519
|
+
* permissive direction and is therefore never inferred — a repo guard
|
|
8520
|
+
* (`scripts/check-storage-access-declarations.ts`) refuses to let it be
|
|
8521
|
+
* reached by omission.
|
|
8522
|
+
*/
|
|
8523
|
+
access: StorageAccessSchema.optional(),
|
|
8524
|
+
/**
|
|
8358
8525
|
* When set, the default instance for this location inherits its resolved
|
|
8359
8526
|
* root from the named location's default instance. Useful for derivative
|
|
8360
8527
|
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
@@ -17897,8 +18064,10 @@ var TrackSchema = object({
|
|
|
17897
18064
|
lastSeen: number(),
|
|
17898
18065
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
17899
18066
|
positions: array(TrackPositionSchema).readonly(),
|
|
17900
|
-
/** Periodic snapshots at snapshotIntervalMs cadence
|
|
17901
|
-
*
|
|
18067
|
+
/** Periodic snapshots at snapshotIntervalMs cadence — DEBUG media, produced
|
|
18068
|
+
* only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
|
|
18069
|
+
* the retired `saveThumbnails` used to gate this and the rolling
|
|
18070
|
+
* `lastFrame` together). Empty is the healthy default, not a capture gap. */
|
|
17902
18071
|
snapshots: array(TrackSnapshotSchema).readonly(),
|
|
17903
18072
|
/** Deduplicated zones the track has entered at least once. Zone IDS. */
|
|
17904
18073
|
zonesVisited: array(string()).readonly(),
|
|
@@ -18758,7 +18927,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18758
18927
|
}), method(RelocateMediaInputSchema, object({ jobId: string() }), {
|
|
18759
18928
|
kind: "mutation",
|
|
18760
18929
|
auth: "admin"
|
|
18761
|
-
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(
|
|
18930
|
+
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
|
|
18931
|
+
kind: "query",
|
|
18932
|
+
auth: "admin"
|
|
18933
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
18762
18934
|
kind: "query",
|
|
18763
18935
|
auth: "admin"
|
|
18764
18936
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
@@ -20717,6 +20889,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
20717
20889
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
20718
20890
|
kind: "mutation",
|
|
20719
20891
|
auth: "admin"
|
|
20892
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
20893
|
+
kind: "mutation",
|
|
20894
|
+
auth: "admin"
|
|
20720
20895
|
});
|
|
20721
20896
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
20722
20897
|
providerId: string().min(1),
|
|
@@ -21115,12 +21290,38 @@ response: record(string(), unknown()) }), object({
|
|
|
21115
21290
|
*
|
|
21116
21291
|
* ## Why this is a capability and not a helper
|
|
21117
21292
|
*
|
|
21118
|
-
*
|
|
21119
|
-
*
|
|
21120
|
-
*
|
|
21121
|
-
*
|
|
21122
|
-
*
|
|
21123
|
-
*
|
|
21293
|
+
* This capability was introduced with the claim that SIX stores in
|
|
21294
|
+
* `addon-post-analysis` held vectors in a `JSON` settings-store column — object
|
|
21295
|
+
* CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
|
|
21296
|
+
* claim was never true, and leaving it here made five stores look like pending
|
|
21297
|
+
* work when three of them have no vector at all. Counted column by column on
|
|
21298
|
+
* 2026-08-30, exactly THREE ever held one:
|
|
21299
|
+
*
|
|
21300
|
+
* - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
|
|
21301
|
+
* - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
|
|
21302
|
+
* - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
|
|
21303
|
+
* face, migrated 2026-08-30 into its OWN index (see below).
|
|
21304
|
+
*
|
|
21305
|
+
* `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
|
|
21306
|
+
* and `identities` store a name; the event store stores no derivative vector.
|
|
21307
|
+
* They are not migration candidates and never were.
|
|
21308
|
+
*
|
|
21309
|
+
* Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
|
|
21310
|
+
* as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
|
|
21311
|
+
* rows before ranking anything.
|
|
21312
|
+
*
|
|
21313
|
+
* ## One index per COMPARISON, never per encoder
|
|
21314
|
+
*
|
|
21315
|
+
* `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
|
|
21316
|
+
* model, and they still get two indexes. An index is a set of things that are
|
|
21317
|
+
* ranked against each other and that live and die together, and these two are
|
|
21318
|
+
* neither: a `faces` row is TRACK-OWNED and cascades away with its track under
|
|
21319
|
+
* a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
|
|
21320
|
+
* forever and is the gallery every recognition ranks against. One index would
|
|
21321
|
+
* mean every gallery load and every reconcile carried a filter whose failure
|
|
21322
|
+
* mode is either ranking a candidate against itself or reclaiming an enrolled
|
|
21323
|
+
* person's only sample. The dimension they share is not a reason to share an
|
|
21324
|
+
* index; the question they answer is, and it differs.
|
|
21124
21325
|
*
|
|
21125
21326
|
* The fix is not a faster loop, it is a different backend — and the backend
|
|
21126
21327
|
* should be replaceable without touching six callers. So: a singleton
|
|
@@ -21225,7 +21426,20 @@ var VectorQueryResultSchema = object({
|
|
|
21225
21426
|
*/
|
|
21226
21427
|
scanned: number(),
|
|
21227
21428
|
/** True when the backend could not consider every row that passed the filter. */
|
|
21228
|
-
truncated: boolean()
|
|
21429
|
+
truncated: boolean(),
|
|
21430
|
+
/**
|
|
21431
|
+
* The `topK` the backend actually ran with.
|
|
21432
|
+
*
|
|
21433
|
+
* Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
|
|
21434
|
+
* past it used to learn nothing but a boolean, from a WARN in the provider's
|
|
21435
|
+
* own log rather than in its answer. That is how an audit asking for 20,000
|
|
21436
|
+
* consumed 4,096 and reported `examined: 4096` as if it had walked the index,
|
|
21437
|
+
* for weeks. `truncated` says THAT the answer was short; this says BY HOW
|
|
21438
|
+
* MUCH, in the return value, where the caller cannot fail to see it.
|
|
21439
|
+
*
|
|
21440
|
+
* Equals the requested `topK` whenever nothing was lowered.
|
|
21441
|
+
*/
|
|
21442
|
+
effectiveTopK: number().int().positive()
|
|
21229
21443
|
});
|
|
21230
21444
|
var VectorDeleteInputSchema = object({
|
|
21231
21445
|
index: string(),
|
|
@@ -21254,6 +21468,68 @@ var VectorGetResultSchema = object({ items: array(object({
|
|
|
21254
21468
|
id: string(),
|
|
21255
21469
|
metadata: VectorMetadataSchema
|
|
21256
21470
|
})) });
|
|
21471
|
+
/**
|
|
21472
|
+
* Ids to read back WITH their vectors.
|
|
21473
|
+
*
|
|
21474
|
+
* The sibling of {@link VectorGetResultSchema}, and deliberately a separate
|
|
21475
|
+
* method rather than a flag on it: `getByIds` promises no vectors and its one
|
|
21476
|
+
* caller depends on that promise. This one promises the opposite.
|
|
21477
|
+
*
|
|
21478
|
+
* It exists because a store cannot put its vectors here otherwise. An ArcFace
|
|
21479
|
+
* gallery is ranked IN PROCESS, per detection, against every enrolled sample —
|
|
21480
|
+
* a per-face cross-process KNN would be a network round trip inside the
|
|
21481
|
+
* recognition loop. So the gallery is loaded once and held in RAM, and loading
|
|
21482
|
+
* it requires the index to hand the floats back. Without this method the only
|
|
21483
|
+
* way to keep a readable vector is a JSON column, which is the thing this
|
|
21484
|
+
* capability exists to delete.
|
|
21485
|
+
*
|
|
21486
|
+
* BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
|
|
21487
|
+
* index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
|
|
21488
|
+
*/
|
|
21489
|
+
var VectorFetchInputSchema = object({
|
|
21490
|
+
index: string(),
|
|
21491
|
+
ids: array(string())
|
|
21492
|
+
});
|
|
21493
|
+
var VectorFetchResultSchema = object({ items: array(object({
|
|
21494
|
+
id: string(),
|
|
21495
|
+
/** base64 Float32LE — the same wire form `upsert` accepts. */
|
|
21496
|
+
vector: string(),
|
|
21497
|
+
metadata: VectorMetadataSchema
|
|
21498
|
+
})) });
|
|
21499
|
+
/**
|
|
21500
|
+
* ENUMERATE an index: one page of rows in a stable order, no ranking.
|
|
21501
|
+
*
|
|
21502
|
+
* A reconcile does not want the nearest rows, it wants ALL of them, and asking
|
|
21503
|
+
* a KNN for "all" is the wrong question twice over. It hits the backend's `k`
|
|
21504
|
+
* ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
|
|
21505
|
+
* probe vector it does not have, so the audit passed a ZERO vector whose cosine
|
|
21506
|
+
* distance to every row is degenerate. `examined: 4096` then read as "we
|
|
21507
|
+
* looked" for as long as anyone cared to read it.
|
|
21508
|
+
*
|
|
21509
|
+
* This is the primitive that question actually needs: a bounded page, ordered
|
|
21510
|
+
* by the backend's own row order, costing no distance computation at all.
|
|
21511
|
+
* Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
|
|
21512
|
+
* the full-table read this capability was built to stop.
|
|
21513
|
+
*/
|
|
21514
|
+
var VectorScanInputSchema = object({
|
|
21515
|
+
index: string(),
|
|
21516
|
+
/** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
|
|
21517
|
+
cursor: number().int().nonnegative().default(0),
|
|
21518
|
+
limit: number().int().positive()
|
|
21519
|
+
});
|
|
21520
|
+
var VectorScanResultSchema = object({
|
|
21521
|
+
items: array(object({
|
|
21522
|
+
id: string(),
|
|
21523
|
+
metadata: VectorMetadataSchema
|
|
21524
|
+
})),
|
|
21525
|
+
/**
|
|
21526
|
+
* Where the next page starts, or `null` when the walk reached the end.
|
|
21527
|
+
*
|
|
21528
|
+
* `null` is the ONLY end-of-index signal. A caller must not infer the end
|
|
21529
|
+
* from a short page: a backend is free to return fewer rows than asked.
|
|
21530
|
+
*/
|
|
21531
|
+
nextCursor: number().int().nonnegative().nullable()
|
|
21532
|
+
});
|
|
21257
21533
|
var VectorStatsInputSchema = object({ index: string() });
|
|
21258
21534
|
var VectorStatsResultSchema = object({
|
|
21259
21535
|
/** Provider id, so an operator can tell brute force from an ANN index. */
|
|
@@ -21272,7 +21548,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
|
|
|
21272
21548
|
}), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
21273
21549
|
kind: "mutation",
|
|
21274
21550
|
auth: "admin"
|
|
21275
|
-
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21551
|
+
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21276
21552
|
kind: "mutation",
|
|
21277
21553
|
auth: "admin"
|
|
21278
21554
|
}), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
@@ -26237,6 +26513,9 @@ method(object({
|
|
|
26237
26513
|
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
26238
26514
|
kind: "query",
|
|
26239
26515
|
auth: "admin"
|
|
26516
|
+
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26517
|
+
kind: "query",
|
|
26518
|
+
auth: "admin"
|
|
26240
26519
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26241
26520
|
kind: "mutation",
|
|
26242
26521
|
auth: "admin"
|
|
@@ -31202,6 +31481,12 @@ Object.freeze({
|
|
|
31202
31481
|
addonId: null,
|
|
31203
31482
|
access: "create"
|
|
31204
31483
|
},
|
|
31484
|
+
"pipelineAnalytics.countRelocatableMedia": {
|
|
31485
|
+
capName: "pipeline-analytics",
|
|
31486
|
+
capScope: "device",
|
|
31487
|
+
addonId: null,
|
|
31488
|
+
access: "view"
|
|
31489
|
+
},
|
|
31205
31490
|
"pipelineAnalytics.countUnstampedEventMedia": {
|
|
31206
31491
|
capName: "pipeline-analytics",
|
|
31207
31492
|
capScope: "device",
|
|
@@ -32366,6 +32651,12 @@ Object.freeze({
|
|
|
32366
32651
|
addonId: null,
|
|
32367
32652
|
access: "view"
|
|
32368
32653
|
},
|
|
32654
|
+
"recording.getRelocateResidue": {
|
|
32655
|
+
capName: "recording",
|
|
32656
|
+
capScope: "system",
|
|
32657
|
+
addonId: null,
|
|
32658
|
+
access: "view"
|
|
32659
|
+
},
|
|
32369
32660
|
"recording.getStorageMigrationMoveStatus": {
|
|
32370
32661
|
capName: "recording",
|
|
32371
32662
|
capScope: "system",
|
|
@@ -32912,12 +33203,30 @@ Object.freeze({
|
|
|
32912
33203
|
addonId: null,
|
|
32913
33204
|
access: "create"
|
|
32914
33205
|
},
|
|
33206
|
+
"storageMigration.drain": {
|
|
33207
|
+
capName: "storage-migration",
|
|
33208
|
+
capScope: "system",
|
|
33209
|
+
addonId: null,
|
|
33210
|
+
access: "create"
|
|
33211
|
+
},
|
|
33212
|
+
"storageMigration.movers": {
|
|
33213
|
+
capName: "storage-migration",
|
|
33214
|
+
capScope: "system",
|
|
33215
|
+
addonId: null,
|
|
33216
|
+
access: "view"
|
|
33217
|
+
},
|
|
32915
33218
|
"storageMigration.plan": {
|
|
32916
33219
|
capName: "storage-migration",
|
|
32917
33220
|
capScope: "system",
|
|
32918
33221
|
addonId: null,
|
|
32919
33222
|
access: "view"
|
|
32920
33223
|
},
|
|
33224
|
+
"storageMigration.residue": {
|
|
33225
|
+
capName: "storage-migration",
|
|
33226
|
+
capScope: "system",
|
|
33227
|
+
addonId: null,
|
|
33228
|
+
access: "view"
|
|
33229
|
+
},
|
|
32921
33230
|
"storageMigration.start": {
|
|
32922
33231
|
capName: "storage-migration",
|
|
32923
33232
|
capScope: "system",
|
|
@@ -33752,6 +34061,12 @@ Object.freeze({
|
|
|
33752
34061
|
addonId: null,
|
|
33753
34062
|
access: "delete"
|
|
33754
34063
|
},
|
|
34064
|
+
"vectorStore.fetchByIds": {
|
|
34065
|
+
capName: "vector-store",
|
|
34066
|
+
capScope: "system",
|
|
34067
|
+
addonId: null,
|
|
34068
|
+
access: "view"
|
|
34069
|
+
},
|
|
33755
34070
|
"vectorStore.getByIds": {
|
|
33756
34071
|
capName: "vector-store",
|
|
33757
34072
|
capScope: "system",
|
|
@@ -33764,6 +34079,12 @@ Object.freeze({
|
|
|
33764
34079
|
addonId: null,
|
|
33765
34080
|
access: "view"
|
|
33766
34081
|
},
|
|
34082
|
+
"vectorStore.scan": {
|
|
34083
|
+
capName: "vector-store",
|
|
34084
|
+
capScope: "system",
|
|
34085
|
+
addonId: null,
|
|
34086
|
+
access: "view"
|
|
34087
|
+
},
|
|
33767
34088
|
"vectorStore.stats": {
|
|
33768
34089
|
capName: "vector-store",
|
|
33769
34090
|
capScope: "system",
|
|
@@ -8181,13 +8181,49 @@ var StorageMigrationParticipantSchema = _enum([
|
|
|
8181
8181
|
"recorder",
|
|
8182
8182
|
"analytics"
|
|
8183
8183
|
]);
|
|
8184
|
+
/**
|
|
8185
|
+
* The mover's own numbers, folded onto the coordinator's durable move record.
|
|
8186
|
+
*
|
|
8187
|
+
* The long half of a non-blocking migration is `draining`, and it is measured
|
|
8188
|
+
* in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
|
|
8189
|
+
* existed the only place those numbers appeared was a Loki line, so an operator
|
|
8190
|
+
* watching the Admin UI saw `phase: draining` and nothing else for a whole
|
|
8191
|
+
* afternoon.
|
|
8192
|
+
*
|
|
8193
|
+
* It is POLLED, never pushed. Events are telemetry and may be dropped
|
|
8194
|
+
* (D8/D11), and a dropped progress event is indistinguishable from a stalled
|
|
8195
|
+
* mover — which is the exact failure this is meant to end. The coordinator's
|
|
8196
|
+
* `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
|
|
8197
|
+
* read `state`; folding the counters costs no extra read and makes the durable
|
|
8198
|
+
* record say afterwards how far a move actually got.
|
|
8199
|
+
*
|
|
8200
|
+
* `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
|
|
8201
|
+
* a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
|
|
8202
|
+
* cannot say M, and a 0 there would render as "100 % done".
|
|
8203
|
+
*/
|
|
8204
|
+
var StorageMigrationMoveProgressSchema = object({
|
|
8205
|
+
filesMoved: number().int().nonnegative(),
|
|
8206
|
+
/** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
|
|
8207
|
+
filesTotal: number().int().nonnegative().nullable(),
|
|
8208
|
+
bytesMoved: number().int().nonnegative(),
|
|
8209
|
+
/** The MOVER's start, not the migration's: a drain restarted after an addon
|
|
8210
|
+
* crash gets a new mover, and a rate computed from the migration's start
|
|
8211
|
+
* would silently average in the time nothing was running. */
|
|
8212
|
+
startedAt: number(),
|
|
8213
|
+
/** When the coordinator last read these numbers. Paired with `startedAt` it
|
|
8214
|
+
* is the only honest rate: both clocks are the hub's, so a UI never has to
|
|
8215
|
+
* subtract its own. */
|
|
8216
|
+
observedAt: number()
|
|
8217
|
+
});
|
|
8184
8218
|
var StorageMigrationMoveSchema = object({
|
|
8185
8219
|
storageClass: StorageMigrationClassSchema,
|
|
8186
8220
|
fromLocationId: string(),
|
|
8187
8221
|
toLocationId: string(),
|
|
8188
8222
|
moverJobId: string().nullable(),
|
|
8189
8223
|
state: RelocateJobStateSchema.nullable(),
|
|
8190
|
-
error: string().nullable()
|
|
8224
|
+
error: string().nullable(),
|
|
8225
|
+
/** Last observed mover counters; `null` until the mover has been polled once. */
|
|
8226
|
+
progress: StorageMigrationMoveProgressSchema.nullable()
|
|
8191
8227
|
});
|
|
8192
8228
|
var StorageMigrationJobSchema = object({
|
|
8193
8229
|
jobId: string(),
|
|
@@ -8233,6 +8269,98 @@ var StorageMigrationPlanSchema = object({
|
|
|
8233
8269
|
findings: array(StorageMigrationFindingSchema)
|
|
8234
8270
|
});
|
|
8235
8271
|
/**
|
|
8272
|
+
* A mover as it exists RIGHT NOW, whether or not a migration job owns it.
|
|
8273
|
+
*
|
|
8274
|
+
* The coordinator's job record is the state of record for a migration, and its
|
|
8275
|
+
* moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
|
|
8276
|
+
* standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
|
|
8277
|
+
* are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
|
|
8278
|
+
* way because no supported UI path existed. A mover armed like that has no job
|
|
8279
|
+
* to fold progress into, so it has to be readable on its own or it is invisible.
|
|
8280
|
+
*
|
|
8281
|
+
* `migrationJobId` is what tells the two apart: `null` means nothing here
|
|
8282
|
+
* orchestrated it.
|
|
8283
|
+
*/
|
|
8284
|
+
var StorageMigrationMoverSchema = object({
|
|
8285
|
+
lane: _enum(["footage", "media"]),
|
|
8286
|
+
job: RelocateJobSchema,
|
|
8287
|
+
/** The coordinator job that armed this mover, or `null` for a mover armed
|
|
8288
|
+
* directly against the owning addon. */
|
|
8289
|
+
migrationJobId: string().nullable(),
|
|
8290
|
+
/** When the hub read these counters. Stamped here so a rate is `bytesMoved`
|
|
8291
|
+
* over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
|
|
8292
|
+
* a browser subtracting its own `Date.now()` from a server `startedAt` is a
|
|
8293
|
+
* rate made of two different clocks. */
|
|
8294
|
+
observedAt: number()
|
|
8295
|
+
});
|
|
8296
|
+
/**
|
|
8297
|
+
* What a SOURCE still holds for one storage class — the number that makes a
|
|
8298
|
+
* "drain remaining" action honest rather than hopeful.
|
|
8299
|
+
*
|
|
8300
|
+
* It comes from the archive (`SegmentHourLedger.census` for footage, the media
|
|
8301
|
+
* engine's own selection count for media), never from the resident index: a
|
|
8302
|
+
* drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
|
|
8303
|
+
* never been told about (D295).
|
|
8304
|
+
*
|
|
8305
|
+
* `items`/`bytes` are `null` for "the archive could not be asked", which is
|
|
8306
|
+
* deliberately NOT zero: a drain is still offered for an unknown residue,
|
|
8307
|
+
* because refusing on an unanswerable read would hide exactly the case an
|
|
8308
|
+
* operator needs to act on.
|
|
8309
|
+
*/
|
|
8310
|
+
var StorageMigrationResidueSchema = object({
|
|
8311
|
+
storageClass: StorageMigrationClassSchema,
|
|
8312
|
+
/** The location still holding the data. `'*'` for the media lane, whose rows
|
|
8313
|
+
* move from wherever they are rather than from one named source. */
|
|
8314
|
+
fromLocationId: string(),
|
|
8315
|
+
/** Where a drain would move it — the class's CURRENT default. */
|
|
8316
|
+
toLocationId: string(),
|
|
8317
|
+
/** Segments (footage lane) or rows (media lane) still on the source. */
|
|
8318
|
+
items: number().int().nonnegative().nullable(),
|
|
8319
|
+
/** Bytes on the source; `null` when the lane counts rows rather than bytes. */
|
|
8320
|
+
bytes: number().int().nonnegative().nullable()
|
|
8321
|
+
});
|
|
8322
|
+
/**
|
|
8323
|
+
* Run the DRAIN half and nothing else.
|
|
8324
|
+
*
|
|
8325
|
+
* A migration that reached `done` has already repointed, so `start` correctly
|
|
8326
|
+
* refuses its destination ("already the default") — there is nothing left to
|
|
8327
|
+
* repoint. But the drain can fail, be cancelled, be interrupted by a restart,
|
|
8328
|
+
* or finish against a work list that was a tenth of the archive (D295), and
|
|
8329
|
+
* before this there was no supported way to run only that half: the only way
|
|
8330
|
+
* through was calling `recording.relocateFootage` by hand over admin tRPC.
|
|
8331
|
+
*
|
|
8332
|
+
* `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
|
|
8333
|
+
* refusal meaningful: the two verbs are disjoint, so nothing here can silently
|
|
8334
|
+
* re-repoint a class that is already migrated.
|
|
8335
|
+
*/
|
|
8336
|
+
var StorageMigrationDrainInputSchema = object({
|
|
8337
|
+
/** The classes to drain. Each must appear in `storageMigration.residue`, so
|
|
8338
|
+
* a class whose source is already empty is refused rather than started. */
|
|
8339
|
+
classes: array(StorageMigrationClassSchema).min(1),
|
|
8340
|
+
throttleMbps: number().min(1).max(1e3).optional()
|
|
8341
|
+
});
|
|
8342
|
+
/** What a footage source still holds, asked of the durable hour ledger. */
|
|
8343
|
+
var RelocateResidueInputSchema = object({
|
|
8344
|
+
fromLocationId: string().min(1),
|
|
8345
|
+
/** Narrow to one logical class; omit for every profile on the location. */
|
|
8346
|
+
footageClass: RelocateFootageClassSchema.optional()
|
|
8347
|
+
});
|
|
8348
|
+
/** `null` = the archive could not answer (no ledger on this node, or the
|
|
8349
|
+
* aggregate failed). Never conflated with an empty source. */
|
|
8350
|
+
var RelocateResidueSchema = object({
|
|
8351
|
+
segments: number().int().nonnegative(),
|
|
8352
|
+
bytes: number().int().nonnegative()
|
|
8353
|
+
}).nullable();
|
|
8354
|
+
/** How many rows a media pass would still act on against a given target — the
|
|
8355
|
+
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8356
|
+
* never disagree. `null` = the count could not be taken. */
|
|
8357
|
+
var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
|
|
8358
|
+
var RelocatableMediaCountInputSchema = object({
|
|
8359
|
+
toLocationId: string().min(1),
|
|
8360
|
+
/** Omitted = `move`. */
|
|
8361
|
+
mode: MediaRelocateModeSchema.optional()
|
|
8362
|
+
});
|
|
8363
|
+
/**
|
|
8236
8364
|
* `StorageLocationType` — an addon-declared id that identifies the *kind* of
|
|
8237
8365
|
* storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
|
|
8238
8366
|
* so the persisted record schema and the consumer-facing cap can both consume it
|
|
@@ -8336,6 +8464,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
|
|
|
8336
8464
|
* two addons declaring the same `id` must agree on `cardinality` (validated
|
|
8337
8465
|
* at kernel aggregation time, not here).
|
|
8338
8466
|
*/
|
|
8467
|
+
/**
|
|
8468
|
+
* `StorageAccess` — how the service that DECLARED a storage-location kind
|
|
8469
|
+
* actually reaches the bytes. It is the constraint that decides which
|
|
8470
|
+
* `storage-provider`s may back a location of that kind.
|
|
8471
|
+
*
|
|
8472
|
+
* - `'local-path'` — the service asks `storage.resolve` for a path string and
|
|
8473
|
+
* then does its own `node:fs` I/O on it (the recorder's segment writer, the
|
|
8474
|
+
* post-analysis media roots). Only a provider that serves a genuine local
|
|
8475
|
+
* filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
|
|
8476
|
+
* remote provider's `resolve` returns a path on the REMOTE host, and
|
|
8477
|
+
* `fs.readdir` of it on this node either fails or — far worse — succeeds
|
|
8478
|
+
* against a same-named local directory that is something else entirely.
|
|
8479
|
+
*
|
|
8480
|
+
* - `'cap-mediated'` — every byte travels through the `storage` cap
|
|
8481
|
+
* (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
|
|
8482
|
+
* service never sees a path, so any provider can back it. `backups` is the
|
|
8483
|
+
* one kind that qualifies today.
|
|
8484
|
+
*
|
|
8485
|
+
* Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
|
|
8486
|
+
* an EMERGENT property of how the recorder happened to be written. Nothing
|
|
8487
|
+
* refused the configuration; the first write simply went somewhere wrong, and
|
|
8488
|
+
* a recording write that goes wrong surfaces as a silent black window rather
|
|
8489
|
+
* than an error (the read path does not `stat`). This turns that accident into
|
|
8490
|
+
* a declared, enforced, testable refusal.
|
|
8491
|
+
*/
|
|
8492
|
+
var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
|
|
8339
8493
|
var StorageLocationDeclarationSchema = object({
|
|
8340
8494
|
/**
|
|
8341
8495
|
* Global location identifier, e.g. `recordings` or `recordingsLow`.
|
|
@@ -8355,6 +8509,19 @@ var StorageLocationDeclarationSchema = object({
|
|
|
8355
8509
|
*/
|
|
8356
8510
|
cardinality: _enum(["single", "multi"]),
|
|
8357
8511
|
/**
|
|
8512
|
+
* HOW the declaring service reaches the bytes — and therefore WHICH
|
|
8513
|
+
* providers may back a location of this kind. See {@link StorageAccessSchema}
|
|
8514
|
+
* and {@link STORAGE_ACCESS_FALLBACK}.
|
|
8515
|
+
*
|
|
8516
|
+
* Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
|
|
8517
|
+
* can only over-restrict (refuse a remote provider for a kind that might
|
|
8518
|
+
* have coped) and never under-restrict. Declaring `'cap-mediated'` is the
|
|
8519
|
+
* permissive direction and is therefore never inferred — a repo guard
|
|
8520
|
+
* (`scripts/check-storage-access-declarations.ts`) refuses to let it be
|
|
8521
|
+
* reached by omission.
|
|
8522
|
+
*/
|
|
8523
|
+
access: StorageAccessSchema.optional(),
|
|
8524
|
+
/**
|
|
8358
8525
|
* When set, the default instance for this location inherits its resolved
|
|
8359
8526
|
* root from the named location's default instance. Useful for derivative
|
|
8360
8527
|
* slots (e.g. `recordingsLow` → `recordings`) so operators only need to
|
|
@@ -17897,8 +18064,10 @@ var TrackSchema = object({
|
|
|
17897
18064
|
lastSeen: number(),
|
|
17898
18065
|
/** Frame-rate position history (subject to maxPositionHistory cap). */
|
|
17899
18066
|
positions: array(TrackPositionSchema).readonly(),
|
|
17900
|
-
/** Periodic snapshots at snapshotIntervalMs cadence
|
|
17901
|
-
*
|
|
18067
|
+
/** Periodic snapshots at snapshotIntervalMs cadence — DEBUG media, produced
|
|
18068
|
+
* only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
|
|
18069
|
+
* the retired `saveThumbnails` used to gate this and the rolling
|
|
18070
|
+
* `lastFrame` together). Empty is the healthy default, not a capture gap. */
|
|
17902
18071
|
snapshots: array(TrackSnapshotSchema).readonly(),
|
|
17903
18072
|
/** Deduplicated zones the track has entered at least once. Zone IDS. */
|
|
17904
18073
|
zonesVisited: array(string()).readonly(),
|
|
@@ -18758,7 +18927,10 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18758
18927
|
}), method(RelocateMediaInputSchema, object({ jobId: string() }), {
|
|
18759
18928
|
kind: "mutation",
|
|
18760
18929
|
auth: "admin"
|
|
18761
|
-
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(
|
|
18930
|
+
}), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
|
|
18931
|
+
kind: "query",
|
|
18932
|
+
auth: "admin"
|
|
18933
|
+
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
18762
18934
|
kind: "query",
|
|
18763
18935
|
auth: "admin"
|
|
18764
18936
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
@@ -20717,6 +20889,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
|
|
|
20717
20889
|
}), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
20718
20890
|
kind: "mutation",
|
|
20719
20891
|
auth: "admin"
|
|
20892
|
+
}), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
|
|
20893
|
+
kind: "mutation",
|
|
20894
|
+
auth: "admin"
|
|
20720
20895
|
});
|
|
20721
20896
|
var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
|
|
20722
20897
|
providerId: string().min(1),
|
|
@@ -21115,12 +21290,38 @@ response: record(string(), unknown()) }), object({
|
|
|
21115
21290
|
*
|
|
21116
21291
|
* ## Why this is a capability and not a helper
|
|
21117
21292
|
*
|
|
21118
|
-
*
|
|
21119
|
-
*
|
|
21120
|
-
*
|
|
21121
|
-
*
|
|
21122
|
-
*
|
|
21123
|
-
*
|
|
21293
|
+
* This capability was introduced with the claim that SIX stores in
|
|
21294
|
+
* `addon-post-analysis` held vectors in a `JSON` settings-store column — object
|
|
21295
|
+
* CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
|
|
21296
|
+
* claim was never true, and leaving it here made five stores look like pending
|
|
21297
|
+
* work when three of them have no vector at all. Counted column by column on
|
|
21298
|
+
* 2026-08-30, exactly THREE ever held one:
|
|
21299
|
+
*
|
|
21300
|
+
* - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
|
|
21301
|
+
* - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
|
|
21302
|
+
* - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
|
|
21303
|
+
* face, migrated 2026-08-30 into its OWN index (see below).
|
|
21304
|
+
*
|
|
21305
|
+
* `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
|
|
21306
|
+
* and `identities` store a name; the event store stores no derivative vector.
|
|
21307
|
+
* They are not migration candidates and never were.
|
|
21308
|
+
*
|
|
21309
|
+
* Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
|
|
21310
|
+
* as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
|
|
21311
|
+
* rows before ranking anything.
|
|
21312
|
+
*
|
|
21313
|
+
* ## One index per COMPARISON, never per encoder
|
|
21314
|
+
*
|
|
21315
|
+
* `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
|
|
21316
|
+
* model, and they still get two indexes. An index is a set of things that are
|
|
21317
|
+
* ranked against each other and that live and die together, and these two are
|
|
21318
|
+
* neither: a `faces` row is TRACK-OWNED and cascades away with its track under
|
|
21319
|
+
* a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
|
|
21320
|
+
* forever and is the gallery every recognition ranks against. One index would
|
|
21321
|
+
* mean every gallery load and every reconcile carried a filter whose failure
|
|
21322
|
+
* mode is either ranking a candidate against itself or reclaiming an enrolled
|
|
21323
|
+
* person's only sample. The dimension they share is not a reason to share an
|
|
21324
|
+
* index; the question they answer is, and it differs.
|
|
21124
21325
|
*
|
|
21125
21326
|
* The fix is not a faster loop, it is a different backend — and the backend
|
|
21126
21327
|
* should be replaceable without touching six callers. So: a singleton
|
|
@@ -21225,7 +21426,20 @@ var VectorQueryResultSchema = object({
|
|
|
21225
21426
|
*/
|
|
21226
21427
|
scanned: number(),
|
|
21227
21428
|
/** True when the backend could not consider every row that passed the filter. */
|
|
21228
|
-
truncated: boolean()
|
|
21429
|
+
truncated: boolean(),
|
|
21430
|
+
/**
|
|
21431
|
+
* The `topK` the backend actually ran with.
|
|
21432
|
+
*
|
|
21433
|
+
* Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
|
|
21434
|
+
* past it used to learn nothing but a boolean, from a WARN in the provider's
|
|
21435
|
+
* own log rather than in its answer. That is how an audit asking for 20,000
|
|
21436
|
+
* consumed 4,096 and reported `examined: 4096` as if it had walked the index,
|
|
21437
|
+
* for weeks. `truncated` says THAT the answer was short; this says BY HOW
|
|
21438
|
+
* MUCH, in the return value, where the caller cannot fail to see it.
|
|
21439
|
+
*
|
|
21440
|
+
* Equals the requested `topK` whenever nothing was lowered.
|
|
21441
|
+
*/
|
|
21442
|
+
effectiveTopK: number().int().positive()
|
|
21229
21443
|
});
|
|
21230
21444
|
var VectorDeleteInputSchema = object({
|
|
21231
21445
|
index: string(),
|
|
@@ -21254,6 +21468,68 @@ var VectorGetResultSchema = object({ items: array(object({
|
|
|
21254
21468
|
id: string(),
|
|
21255
21469
|
metadata: VectorMetadataSchema
|
|
21256
21470
|
})) });
|
|
21471
|
+
/**
|
|
21472
|
+
* Ids to read back WITH their vectors.
|
|
21473
|
+
*
|
|
21474
|
+
* The sibling of {@link VectorGetResultSchema}, and deliberately a separate
|
|
21475
|
+
* method rather than a flag on it: `getByIds` promises no vectors and its one
|
|
21476
|
+
* caller depends on that promise. This one promises the opposite.
|
|
21477
|
+
*
|
|
21478
|
+
* It exists because a store cannot put its vectors here otherwise. An ArcFace
|
|
21479
|
+
* gallery is ranked IN PROCESS, per detection, against every enrolled sample —
|
|
21480
|
+
* a per-face cross-process KNN would be a network round trip inside the
|
|
21481
|
+
* recognition loop. So the gallery is loaded once and held in RAM, and loading
|
|
21482
|
+
* it requires the index to hand the floats back. Without this method the only
|
|
21483
|
+
* way to keep a readable vector is a JSON column, which is the thing this
|
|
21484
|
+
* capability exists to delete.
|
|
21485
|
+
*
|
|
21486
|
+
* BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
|
|
21487
|
+
* index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
|
|
21488
|
+
*/
|
|
21489
|
+
var VectorFetchInputSchema = object({
|
|
21490
|
+
index: string(),
|
|
21491
|
+
ids: array(string())
|
|
21492
|
+
});
|
|
21493
|
+
var VectorFetchResultSchema = object({ items: array(object({
|
|
21494
|
+
id: string(),
|
|
21495
|
+
/** base64 Float32LE — the same wire form `upsert` accepts. */
|
|
21496
|
+
vector: string(),
|
|
21497
|
+
metadata: VectorMetadataSchema
|
|
21498
|
+
})) });
|
|
21499
|
+
/**
|
|
21500
|
+
* ENUMERATE an index: one page of rows in a stable order, no ranking.
|
|
21501
|
+
*
|
|
21502
|
+
* A reconcile does not want the nearest rows, it wants ALL of them, and asking
|
|
21503
|
+
* a KNN for "all" is the wrong question twice over. It hits the backend's `k`
|
|
21504
|
+
* ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
|
|
21505
|
+
* probe vector it does not have, so the audit passed a ZERO vector whose cosine
|
|
21506
|
+
* distance to every row is degenerate. `examined: 4096` then read as "we
|
|
21507
|
+
* looked" for as long as anyone cared to read it.
|
|
21508
|
+
*
|
|
21509
|
+
* This is the primitive that question actually needs: a bounded page, ordered
|
|
21510
|
+
* by the backend's own row order, costing no distance computation at all.
|
|
21511
|
+
* Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
|
|
21512
|
+
* the full-table read this capability was built to stop.
|
|
21513
|
+
*/
|
|
21514
|
+
var VectorScanInputSchema = object({
|
|
21515
|
+
index: string(),
|
|
21516
|
+
/** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
|
|
21517
|
+
cursor: number().int().nonnegative().default(0),
|
|
21518
|
+
limit: number().int().positive()
|
|
21519
|
+
});
|
|
21520
|
+
var VectorScanResultSchema = object({
|
|
21521
|
+
items: array(object({
|
|
21522
|
+
id: string(),
|
|
21523
|
+
metadata: VectorMetadataSchema
|
|
21524
|
+
})),
|
|
21525
|
+
/**
|
|
21526
|
+
* Where the next page starts, or `null` when the walk reached the end.
|
|
21527
|
+
*
|
|
21528
|
+
* `null` is the ONLY end-of-index signal. A caller must not infer the end
|
|
21529
|
+
* from a short page: a backend is free to return fewer rows than asked.
|
|
21530
|
+
*/
|
|
21531
|
+
nextCursor: number().int().nonnegative().nullable()
|
|
21532
|
+
});
|
|
21257
21533
|
var VectorStatsInputSchema = object({ index: string() });
|
|
21258
21534
|
var VectorStatsResultSchema = object({
|
|
21259
21535
|
/** Provider id, so an operator can tell brute force from an ANN index. */
|
|
@@ -21272,7 +21548,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
|
|
|
21272
21548
|
}), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
|
|
21273
21549
|
kind: "mutation",
|
|
21274
21550
|
auth: "admin"
|
|
21275
|
-
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21551
|
+
}), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
|
|
21276
21552
|
kind: "mutation",
|
|
21277
21553
|
auth: "admin"
|
|
21278
21554
|
}), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
|
|
@@ -26237,6 +26513,9 @@ method(object({
|
|
|
26237
26513
|
}), method(object({}), array(RelocateJobSchema).readonly(), {
|
|
26238
26514
|
kind: "query",
|
|
26239
26515
|
auth: "admin"
|
|
26516
|
+
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26517
|
+
kind: "query",
|
|
26518
|
+
auth: "admin"
|
|
26240
26519
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26241
26520
|
kind: "mutation",
|
|
26242
26521
|
auth: "admin"
|
|
@@ -31202,6 +31481,12 @@ Object.freeze({
|
|
|
31202
31481
|
addonId: null,
|
|
31203
31482
|
access: "create"
|
|
31204
31483
|
},
|
|
31484
|
+
"pipelineAnalytics.countRelocatableMedia": {
|
|
31485
|
+
capName: "pipeline-analytics",
|
|
31486
|
+
capScope: "device",
|
|
31487
|
+
addonId: null,
|
|
31488
|
+
access: "view"
|
|
31489
|
+
},
|
|
31205
31490
|
"pipelineAnalytics.countUnstampedEventMedia": {
|
|
31206
31491
|
capName: "pipeline-analytics",
|
|
31207
31492
|
capScope: "device",
|
|
@@ -32366,6 +32651,12 @@ Object.freeze({
|
|
|
32366
32651
|
addonId: null,
|
|
32367
32652
|
access: "view"
|
|
32368
32653
|
},
|
|
32654
|
+
"recording.getRelocateResidue": {
|
|
32655
|
+
capName: "recording",
|
|
32656
|
+
capScope: "system",
|
|
32657
|
+
addonId: null,
|
|
32658
|
+
access: "view"
|
|
32659
|
+
},
|
|
32369
32660
|
"recording.getStorageMigrationMoveStatus": {
|
|
32370
32661
|
capName: "recording",
|
|
32371
32662
|
capScope: "system",
|
|
@@ -32912,12 +33203,30 @@ Object.freeze({
|
|
|
32912
33203
|
addonId: null,
|
|
32913
33204
|
access: "create"
|
|
32914
33205
|
},
|
|
33206
|
+
"storageMigration.drain": {
|
|
33207
|
+
capName: "storage-migration",
|
|
33208
|
+
capScope: "system",
|
|
33209
|
+
addonId: null,
|
|
33210
|
+
access: "create"
|
|
33211
|
+
},
|
|
33212
|
+
"storageMigration.movers": {
|
|
33213
|
+
capName: "storage-migration",
|
|
33214
|
+
capScope: "system",
|
|
33215
|
+
addonId: null,
|
|
33216
|
+
access: "view"
|
|
33217
|
+
},
|
|
32915
33218
|
"storageMigration.plan": {
|
|
32916
33219
|
capName: "storage-migration",
|
|
32917
33220
|
capScope: "system",
|
|
32918
33221
|
addonId: null,
|
|
32919
33222
|
access: "view"
|
|
32920
33223
|
},
|
|
33224
|
+
"storageMigration.residue": {
|
|
33225
|
+
capName: "storage-migration",
|
|
33226
|
+
capScope: "system",
|
|
33227
|
+
addonId: null,
|
|
33228
|
+
access: "view"
|
|
33229
|
+
},
|
|
32921
33230
|
"storageMigration.start": {
|
|
32922
33231
|
capName: "storage-migration",
|
|
32923
33232
|
capScope: "system",
|
|
@@ -33752,6 +34061,12 @@ Object.freeze({
|
|
|
33752
34061
|
addonId: null,
|
|
33753
34062
|
access: "delete"
|
|
33754
34063
|
},
|
|
34064
|
+
"vectorStore.fetchByIds": {
|
|
34065
|
+
capName: "vector-store",
|
|
34066
|
+
capScope: "system",
|
|
34067
|
+
addonId: null,
|
|
34068
|
+
access: "view"
|
|
34069
|
+
},
|
|
33755
34070
|
"vectorStore.getByIds": {
|
|
33756
34071
|
capName: "vector-store",
|
|
33757
34072
|
capScope: "system",
|
|
@@ -33764,6 +34079,12 @@ Object.freeze({
|
|
|
33764
34079
|
addonId: null,
|
|
33765
34080
|
access: "view"
|
|
33766
34081
|
},
|
|
34082
|
+
"vectorStore.scan": {
|
|
34083
|
+
capName: "vector-store",
|
|
34084
|
+
capScope: "system",
|
|
34085
|
+
addonId: null,
|
|
34086
|
+
access: "view"
|
|
34087
|
+
},
|
|
33767
34088
|
"vectorStore.stats": {
|
|
33768
34089
|
capName: "vector-store",
|
|
33769
34090
|
capScope: "system",
|
|
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
5
|
+
const require_dist = require("../dist-ki6Kt6cL.js");
|
|
6
6
|
let node_crypto = require("node:crypto");
|
|
7
7
|
let node_child_process = require("node:child_process");
|
|
8
8
|
//#region src/ingress/tailscale-cli.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-
|
|
1
|
+
import { a as EventCategory, i as BaseAddon, n as networkAccessCapability } from "../dist-RluxJbgF.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { execFile } from "node:child_process";
|
|
4
4
|
import { promisify } from "node:util";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-tailscale",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.45",
|
|
4
4
|
"description": "Tailscale bundle for CamStack — joins the host to a tailnet (client) and exposes the hub via Serve/Funnel (ingress). Multi-entry npm package shipping 2 addons under a single bundle.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|