@camstack/addon-provider-homeassistant 1.2.55 → 1.2.58

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/addon.js CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_dist = require("./dist-Dt7YuyK3.js");
2
+ const require_dist = require("./dist-DjxuSmvp.js");
3
3
  let node_crypto = require("node:crypto");
4
4
  let node_zlib = require("node:zlib");
5
5
  //#region src/ha-device-source.ts
package/dist/addon.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-BpQG6lq7.mjs";
1
+ import { $ as presenceCapability, A as controlCapability, At as EventCategory, B as humiditySensorCapability, C as buildAddonRouteProvider, Ct as number, D as colorCapability, Dt as union, E as climateControlCapability, Et as string, F as eventEmitterCapability, G as motionCapability, H as lawnMowerControlCapability, I as fanControlCapability, J as notifierCapability, K as normalizeUnit, L as floodCapability, M as deviceAdoptionCapability, O as connectivityCapability, Ot as unknown, P as enumSensorCapability, Q as prepareNotification, R as gasCapability, S as brokerCapability, St as literal, T as carbonMonoxideCapability, Tt as record, U as lockControlCapability, V as imageCapability, W as mediaPlayerCapability, Y as numericSensorCapability, Z as powerMeterCapability, _ as automationControlCapability, _t as createEvent, at as temperatureSensorCapability, b as binaryCapability, bt as array, ct as valveCapability, d as TargetSchema, dt as weatherCapability, et as pressureSensorCapability, f as accessoriesCapability, ft as errMsg, g as ambientLightSensorCapability, gt as DeviceType, h as alarmPanelCapability, ht as DeviceRole, it as tamperCapability, j as coverCapability, k as contactCapability, kt as url, lt as vibrationCapability, m as airQualitySensorCapability, mt as DeviceFeature, n as BaseDevice, nt as smokeCapability, ot as updateCapability, p as addonRoutesCapability, q as notificationOutputCapability, r as BaseDeviceProvider, rt as switchCapability, s as EnumSensorDateTimeFormatSchema, st as vacuumControlCapability, tt as scriptRunnerCapability, ut as waterHeaterCapability, v as batteryCapability, w as buttonCapability, wt as object, x as brightnessCapability, xt as discriminatedUnion, y as bestLocationMatch, yt as _enum, z as humidifierCapability } from "./dist-CCHqsqE6.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
4
4
  //#region src/ha-device-source.ts
@@ -8242,18 +8242,61 @@ var RelocateFootageInputSchema = object({
8242
8242
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8243
8243
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8244
8244
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8245
+ /**
8246
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8247
+ * mover (the engine already walks both collections with a timestamp cursor and
8248
+ * already has a stamp-without-copy path).
8249
+ *
8250
+ * - `move` — the default and the historical behaviour: event-media and
8251
+ * retrain blobs move to `toLocationId` and their rows are
8252
+ * stamped. The enrolled gallery is skipped (D197).
8253
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8254
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8255
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8256
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8257
+ * instant a repoint moves that pointer the row reads from the
8258
+ * new disk while its bytes are on the old one.
8259
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8260
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8261
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8262
+ * never run beside a live second location: it is stop-the-world
8263
+ * by construction, which is acceptable only because the gallery
8264
+ * is a few KB per enrolled sample.
8265
+ */
8266
+ var MediaRelocateModeSchema = _enum([
8267
+ "move",
8268
+ "seal",
8269
+ "gallery"
8270
+ ]);
8245
8271
  var RelocateMediaInputSchema = object({
8246
8272
  toLocationId: string(),
8247
- throttleMbps: number().min(1).max(1e3).optional()
8273
+ throttleMbps: number().min(1).max(1e3).optional(),
8274
+ /** Omitted = `move`, the pre-existing behaviour. */
8275
+ mode: MediaRelocateModeSchema.optional()
8276
+ });
8277
+ /** How many rows still carry NO `locationId` — the population a repoint would
8278
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8279
+ * value that permits a non-blocking `eventMedia` cutover. */
8280
+ var UnstampedEventMediaCountSchema = object({
8281
+ media: number().int().nonnegative(),
8282
+ retrainFrames: number().int().nonnegative(),
8283
+ total: number().int().nonnegative()
8248
8284
  });
8249
8285
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8250
- /** The independently selectable logical storage classes. `recordings`
8251
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8252
- * segments; `eventMedia` is post-analysis blobs. */
8286
+ /** The independently selectable logical storage classes — every class
8287
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8288
+ * Zod enum error where they should meet an explanation.
8289
+ *
8290
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8291
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8292
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8293
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8253
8294
  var StorageMigrationClassSchema = _enum([
8254
8295
  "recordings",
8255
8296
  "recordingsLow",
8256
- "eventMedia"
8297
+ "eventMedia",
8298
+ "backups",
8299
+ "galleryMedia"
8257
8300
  ]);
8258
8301
  /** A destination is always an existing, fully-qualified location id. The
8259
8302
  * migration API intentionally never changes a source location's `basePath`:
@@ -8261,20 +8304,56 @@ var StorageMigrationClassSchema = _enum([
8261
8304
  var StorageMigrationDestinationsSchema = object({
8262
8305
  recordings: string().min(1).optional(),
8263
8306
  recordingsLow: string().min(1).optional(),
8264
- eventMedia: string().min(1).optional()
8307
+ eventMedia: string().min(1).optional(),
8308
+ backups: string().min(1).optional(),
8309
+ galleryMedia: string().min(1).optional()
8265
8310
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8311
+ /**
8312
+ * How a migration sequences the cutover against the byte move.
8313
+ *
8314
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8315
+ * resume. Recording is stopped for the whole move. Right
8316
+ * for a small or a cold class, and the only legal mode for
8317
+ * a `cardinality: 'single'` class.
8318
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8319
+ * refresh, resume, then move the past with everything
8320
+ * running. The pause is three bounded instants (a detach +
8321
+ * attach round, a write-gate drain, a lease) instead of one
8322
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8323
+ * stopped recording under `blocking`; the same move is
8324
+ * seconds of stopped recording under `nonBlocking`.
8325
+ *
8326
+ * The mode is on the JOB, not only on the input, because `status` is where an
8327
+ * operator finds out which one is running.
8328
+ */
8329
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8266
8330
  /** Shared input for planning and starting an orchestrated storage migration. */
8267
8331
  var StorageMigrationInputSchema = object({
8268
8332
  destinations: StorageMigrationDestinationsSchema,
8269
- throttleMbps: number().min(1).max(1e3).optional()
8333
+ throttleMbps: number().min(1).max(1e3).optional(),
8334
+ /** Omitted = `blocking`, which stays the default. */
8335
+ mode: StorageMigrationModeSchema.optional()
8270
8336
  });
8271
- /** The durable coordinator state machine. The only phase that changes default
8272
- * locations is `repointing`, after every selected mover has completed and been
8273
- * verified. */
8337
+ /**
8338
+ * The durable coordinator state machine.
8339
+ *
8340
+ * `blocking`:
8341
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8342
+ *
8343
+ * `nonBlocking`:
8344
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8345
+ *
8346
+ * Same phases, different order plus two new ones — not a second mover.
8347
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8348
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8349
+ * `repointing` is still the only phase that changes a default location.
8350
+ */
8274
8351
  var StorageMigrationPhaseSchema = _enum([
8275
8352
  "planning",
8353
+ "sealing",
8276
8354
  "pausing",
8277
8355
  "moving",
8356
+ "draining",
8278
8357
  "verifying",
8279
8358
  "repointing",
8280
8359
  "refreshing",
@@ -8288,17 +8367,56 @@ var StorageMigrationParticipantSchema = _enum([
8288
8367
  "recorder",
8289
8368
  "analytics"
8290
8369
  ]);
8370
+ /**
8371
+ * The mover's own numbers, folded onto the coordinator's durable move record.
8372
+ *
8373
+ * The long half of a non-blocking migration is `draining`, and it is measured
8374
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
8375
+ * existed the only place those numbers appeared was a Loki line, so an operator
8376
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
8377
+ * afternoon.
8378
+ *
8379
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
8380
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
8381
+ * mover — which is the exact failure this is meant to end. The coordinator's
8382
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
8383
+ * read `state`; folding the counters costs no extra read and makes the durable
8384
+ * record say afterwards how far a move actually got.
8385
+ *
8386
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
8387
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
8388
+ * cannot say M, and a 0 there would render as "100 % done".
8389
+ */
8390
+ var StorageMigrationMoveProgressSchema = object({
8391
+ filesMoved: number().int().nonnegative(),
8392
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
8393
+ filesTotal: number().int().nonnegative().nullable(),
8394
+ bytesMoved: number().int().nonnegative(),
8395
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
8396
+ * crash gets a new mover, and a rate computed from the migration's start
8397
+ * would silently average in the time nothing was running. */
8398
+ startedAt: number(),
8399
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
8400
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
8401
+ * subtract its own. */
8402
+ observedAt: number()
8403
+ });
8291
8404
  var StorageMigrationMoveSchema = object({
8292
8405
  storageClass: StorageMigrationClassSchema,
8293
8406
  fromLocationId: string(),
8294
8407
  toLocationId: string(),
8295
8408
  moverJobId: string().nullable(),
8296
8409
  state: RelocateJobStateSchema.nullable(),
8297
- error: string().nullable()
8410
+ error: string().nullable(),
8411
+ /** Last observed mover counters; `null` until the mover has been polled once. */
8412
+ progress: StorageMigrationMoveProgressSchema.nullable()
8298
8413
  });
8299
8414
  var StorageMigrationJobSchema = object({
8300
8415
  jobId: string(),
8301
8416
  phase: StorageMigrationPhaseSchema,
8417
+ /** Which order this job is running. `status` is the only place an operator
8418
+ * can tell a seconds-long cutover from a thirty-hour one. */
8419
+ mode: StorageMigrationModeSchema,
8302
8420
  destinations: StorageMigrationDestinationsSchema,
8303
8421
  throttleMbps: number(),
8304
8422
  moves: array(StorageMigrationMoveSchema),
@@ -8311,13 +8429,122 @@ var StorageMigrationJobSchema = object({
8311
8429
  finishedAt: number().nullable(),
8312
8430
  error: string().nullable()
8313
8431
  });
8432
+ var StorageMigrationFindingSchema = object({
8433
+ code: _enum([
8434
+ "sharesDeviceWithSource",
8435
+ "deviceIdentityUnknown",
8436
+ "unstampedEventMediaRows",
8437
+ "blockingOnly",
8438
+ "noMover"
8439
+ ]),
8440
+ storageClass: StorageMigrationClassSchema,
8441
+ /** Human-readable, already carrying the ids and counts. */
8442
+ message: string()
8443
+ });
8314
8444
  var StorageMigrationPlanSchema = object({
8315
8445
  destinations: StorageMigrationDestinationsSchema,
8446
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8447
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8448
+ * it. */
8449
+ mode: StorageMigrationModeSchema,
8316
8450
  moves: array(object({
8317
8451
  storageClass: StorageMigrationClassSchema,
8318
8452
  fromLocationId: string(),
8319
8453
  toLocationId: string()
8320
- }))
8454
+ })),
8455
+ findings: array(StorageMigrationFindingSchema)
8456
+ });
8457
+ /**
8458
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
8459
+ *
8460
+ * The coordinator's job record is the state of record for a migration, and its
8461
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
8462
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
8463
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
8464
+ * way because no supported UI path existed. A mover armed like that has no job
8465
+ * to fold progress into, so it has to be readable on its own or it is invisible.
8466
+ *
8467
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
8468
+ * orchestrated it.
8469
+ */
8470
+ var StorageMigrationMoverSchema = object({
8471
+ lane: _enum(["footage", "media"]),
8472
+ job: RelocateJobSchema,
8473
+ /** The coordinator job that armed this mover, or `null` for a mover armed
8474
+ * directly against the owning addon. */
8475
+ migrationJobId: string().nullable(),
8476
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
8477
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
8478
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
8479
+ * rate made of two different clocks. */
8480
+ observedAt: number()
8481
+ });
8482
+ /**
8483
+ * What a SOURCE still holds for one storage class — the number that makes a
8484
+ * "drain remaining" action honest rather than hopeful.
8485
+ *
8486
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
8487
+ * engine's own selection count for media), never from the resident index: a
8488
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
8489
+ * never been told about (D295).
8490
+ *
8491
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
8492
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
8493
+ * because refusing on an unanswerable read would hide exactly the case an
8494
+ * operator needs to act on.
8495
+ */
8496
+ var StorageMigrationResidueSchema = object({
8497
+ storageClass: StorageMigrationClassSchema,
8498
+ /** The location still holding the data. `'*'` for the media lane, whose rows
8499
+ * move from wherever they are rather than from one named source. */
8500
+ fromLocationId: string(),
8501
+ /** Where a drain would move it — the class's CURRENT default. */
8502
+ toLocationId: string(),
8503
+ /** Segments (footage lane) or rows (media lane) still on the source. */
8504
+ items: number().int().nonnegative().nullable(),
8505
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
8506
+ bytes: number().int().nonnegative().nullable()
8507
+ });
8508
+ /**
8509
+ * Run the DRAIN half and nothing else.
8510
+ *
8511
+ * A migration that reached `done` has already repointed, so `start` correctly
8512
+ * refuses its destination ("already the default") — there is nothing left to
8513
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
8514
+ * or finish against a work list that was a tenth of the archive (D295), and
8515
+ * before this there was no supported way to run only that half: the only way
8516
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
8517
+ *
8518
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
8519
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
8520
+ * re-repoint a class that is already migrated.
8521
+ */
8522
+ var StorageMigrationDrainInputSchema = object({
8523
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
8524
+ * a class whose source is already empty is refused rather than started. */
8525
+ classes: array(StorageMigrationClassSchema).min(1),
8526
+ throttleMbps: number().min(1).max(1e3).optional()
8527
+ });
8528
+ /** What a footage source still holds, asked of the durable hour ledger. */
8529
+ var RelocateResidueInputSchema = object({
8530
+ fromLocationId: string().min(1),
8531
+ /** Narrow to one logical class; omit for every profile on the location. */
8532
+ footageClass: RelocateFootageClassSchema.optional()
8533
+ });
8534
+ /** `null` = the archive could not answer (no ledger on this node, or the
8535
+ * aggregate failed). Never conflated with an empty source. */
8536
+ var RelocateResidueSchema = object({
8537
+ segments: number().int().nonnegative(),
8538
+ bytes: number().int().nonnegative()
8539
+ }).nullable();
8540
+ /** How many rows a media pass would still act on against a given target — the
8541
+ * media lane's denominator AND its residue, from ONE derivation so the two can
8542
+ * never disagree. `null` = the count could not be taken. */
8543
+ var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8544
+ var RelocatableMediaCountInputSchema = object({
8545
+ toLocationId: string().min(1),
8546
+ /** Omitted = `move`. */
8547
+ mode: MediaRelocateModeSchema.optional()
8321
8548
  });
8322
8549
  /**
8323
8550
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -8423,6 +8650,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
8423
8650
  * two addons declaring the same `id` must agree on `cardinality` (validated
8424
8651
  * at kernel aggregation time, not here).
8425
8652
  */
8653
+ /**
8654
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
8655
+ * actually reaches the bytes. It is the constraint that decides which
8656
+ * `storage-provider`s may back a location of that kind.
8657
+ *
8658
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
8659
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
8660
+ * post-analysis media roots). Only a provider that serves a genuine local
8661
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
8662
+ * remote provider's `resolve` returns a path on the REMOTE host, and
8663
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
8664
+ * against a same-named local directory that is something else entirely.
8665
+ *
8666
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
8667
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
8668
+ * service never sees a path, so any provider can back it. `backups` is the
8669
+ * one kind that qualifies today.
8670
+ *
8671
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
8672
+ * an EMERGENT property of how the recorder happened to be written. Nothing
8673
+ * refused the configuration; the first write simply went somewhere wrong, and
8674
+ * a recording write that goes wrong surfaces as a silent black window rather
8675
+ * than an error (the read path does not `stat`). This turns that accident into
8676
+ * a declared, enforced, testable refusal.
8677
+ */
8678
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
8426
8679
  var StorageLocationDeclarationSchema = object({
8427
8680
  /**
8428
8681
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -8442,6 +8695,19 @@ var StorageLocationDeclarationSchema = object({
8442
8695
  */
8443
8696
  cardinality: _enum(["single", "multi"]),
8444
8697
  /**
8698
+ * HOW the declaring service reaches the bytes — and therefore WHICH
8699
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
8700
+ * and {@link STORAGE_ACCESS_FALLBACK}.
8701
+ *
8702
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
8703
+ * can only over-restrict (refuse a remote provider for a kind that might
8704
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
8705
+ * permissive direction and is therefore never inferred — a repo guard
8706
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
8707
+ * reached by omission.
8708
+ */
8709
+ access: StorageAccessSchema.optional(),
8710
+ /**
8445
8711
  * When set, the default instance for this location inherits its resolved
8446
8712
  * root from the named location's default instance. Useful for derivative
8447
8713
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -18494,8 +18760,10 @@ var TrackSchema = object({
18494
18760
  lastSeen: number(),
18495
18761
  /** Frame-rate position history (subject to maxPositionHistory cap). */
18496
18762
  positions: array(TrackPositionSchema).readonly(),
18497
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
18498
- * saveThumbnails policy). */
18763
+ /** Periodic snapshots at snapshotIntervalMs cadence DEBUG media, produced
18764
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
18765
+ * the retired `saveThumbnails` used to gate this and the rolling
18766
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
18499
18767
  snapshots: array(TrackSnapshotSchema).readonly(),
18500
18768
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
18501
18769
  zonesVisited: array(string()).readonly(),
@@ -19355,6 +19623,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19355
19623
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19356
19624
  kind: "mutation",
19357
19625
  auth: "admin"
19626
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
19627
+ kind: "query",
19628
+ auth: "admin"
19358
19629
  }), method(object({}), array(RelocateJobSchema).readonly(), {
19359
19630
  kind: "query",
19360
19631
  auth: "admin"
@@ -21262,7 +21533,10 @@ method(object({
21262
21533
  }), StorageLocationSchema, {
21263
21534
  kind: "mutation",
21264
21535
  auth: "admin"
21265
- }), method(object({ id: string() }), _void(), {
21536
+ }), method(object({
21537
+ id: string(),
21538
+ force: boolean().optional()
21539
+ }), _void(), {
21266
21540
  kind: "mutation",
21267
21541
  auth: "admin"
21268
21542
  }), method(object({ id: string() }), object({
@@ -21311,6 +21585,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21311
21585
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21312
21586
  kind: "mutation",
21313
21587
  auth: "admin"
21588
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21589
+ kind: "mutation",
21590
+ auth: "admin"
21314
21591
  });
21315
21592
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21316
21593
  providerId: string().min(1),
@@ -21709,12 +21986,38 @@ response: record(string(), unknown()) }), object({
21709
21986
  *
21710
21987
  * ## Why this is a capability and not a helper
21711
21988
  *
21712
- * Six stores in `addon-post-analysis` already hold vectors object CLIP, face,
21713
- * plate, vehicle, identity, and the event store's derivativesand every one of
21714
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
21715
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
21716
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
21717
- * load 5,000 rows before ranking anything.
21989
+ * This capability was introduced with the claim that SIX stores in
21990
+ * `addon-post-analysis` held vectors in a `JSON` settings-store columnobject
21991
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
21992
+ * claim was never true, and leaving it here made five stores look like pending
21993
+ * work when three of them have no vector at all. Counted column by column on
21994
+ * 2026-08-30, exactly THREE ever held one:
21995
+ *
21996
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
21997
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
21998
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
21999
+ * face, migrated 2026-08-30 into its OWN index (see below).
22000
+ *
22001
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
22002
+ * and `identities` store a name; the event store stores no derivative vector.
22003
+ * They are not migration candidates and never were.
22004
+ *
22005
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
22006
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
22007
+ * rows before ranking anything.
22008
+ *
22009
+ * ## One index per COMPARISON, never per encoder
22010
+ *
22011
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
22012
+ * model, and they still get two indexes. An index is a set of things that are
22013
+ * ranked against each other and that live and die together, and these two are
22014
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
22015
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
22016
+ * forever and is the gallery every recognition ranks against. One index would
22017
+ * mean every gallery load and every reconcile carried a filter whose failure
22018
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
22019
+ * person's only sample. The dimension they share is not a reason to share an
22020
+ * index; the question they answer is, and it differs.
21718
22021
  *
21719
22022
  * The fix is not a faster loop, it is a different backend — and the backend
21720
22023
  * should be replaceable without touching six callers. So: a singleton
@@ -21819,7 +22122,20 @@ var VectorQueryResultSchema = object({
21819
22122
  */
21820
22123
  scanned: number(),
21821
22124
  /** True when the backend could not consider every row that passed the filter. */
21822
- truncated: boolean()
22125
+ truncated: boolean(),
22126
+ /**
22127
+ * The `topK` the backend actually ran with.
22128
+ *
22129
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
22130
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
22131
+ * own log rather than in its answer. That is how an audit asking for 20,000
22132
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
22133
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
22134
+ * MUCH, in the return value, where the caller cannot fail to see it.
22135
+ *
22136
+ * Equals the requested `topK` whenever nothing was lowered.
22137
+ */
22138
+ effectiveTopK: number().int().positive()
21823
22139
  });
21824
22140
  var VectorDeleteInputSchema = object({
21825
22141
  index: string(),
@@ -21848,6 +22164,68 @@ var VectorGetResultSchema = object({ items: array(object({
21848
22164
  id: string(),
21849
22165
  metadata: VectorMetadataSchema
21850
22166
  })) });
22167
+ /**
22168
+ * Ids to read back WITH their vectors.
22169
+ *
22170
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
22171
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
22172
+ * caller depends on that promise. This one promises the opposite.
22173
+ *
22174
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
22175
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
22176
+ * a per-face cross-process KNN would be a network round trip inside the
22177
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
22178
+ * it requires the index to hand the floats back. Without this method the only
22179
+ * way to keep a readable vector is a JSON column, which is the thing this
22180
+ * capability exists to delete.
22181
+ *
22182
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
22183
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
22184
+ */
22185
+ var VectorFetchInputSchema = object({
22186
+ index: string(),
22187
+ ids: array(string())
22188
+ });
22189
+ var VectorFetchResultSchema = object({ items: array(object({
22190
+ id: string(),
22191
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
22192
+ vector: string(),
22193
+ metadata: VectorMetadataSchema
22194
+ })) });
22195
+ /**
22196
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
22197
+ *
22198
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
22199
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
22200
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
22201
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
22202
+ * distance to every row is degenerate. `examined: 4096` then read as "we
22203
+ * looked" for as long as anyone cared to read it.
22204
+ *
22205
+ * This is the primitive that question actually needs: a bounded page, ordered
22206
+ * by the backend's own row order, costing no distance computation at all.
22207
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
22208
+ * the full-table read this capability was built to stop.
22209
+ */
22210
+ var VectorScanInputSchema = object({
22211
+ index: string(),
22212
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
22213
+ cursor: number().int().nonnegative().default(0),
22214
+ limit: number().int().positive()
22215
+ });
22216
+ var VectorScanResultSchema = object({
22217
+ items: array(object({
22218
+ id: string(),
22219
+ metadata: VectorMetadataSchema
22220
+ })),
22221
+ /**
22222
+ * Where the next page starts, or `null` when the walk reached the end.
22223
+ *
22224
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
22225
+ * from a short page: a backend is free to return fewer rows than asked.
22226
+ */
22227
+ nextCursor: number().int().nonnegative().nullable()
22228
+ });
21851
22229
  var VectorStatsInputSchema = object({ index: string() });
21852
22230
  var VectorStatsResultSchema = object({
21853
22231
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -21866,7 +22244,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
21866
22244
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
21867
22245
  kind: "mutation",
21868
22246
  auth: "admin"
21869
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
22247
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21870
22248
  kind: "mutation",
21871
22249
  auth: "admin"
21872
22250
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -28574,6 +28952,9 @@ method(object({
28574
28952
  }), method(object({}), array(RelocateJobSchema).readonly(), {
28575
28953
  kind: "query",
28576
28954
  auth: "admin"
28955
+ }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28956
+ kind: "query",
28957
+ auth: "admin"
28577
28958
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28578
28959
  kind: "mutation",
28579
28960
  auth: "admin"
@@ -35208,6 +35589,18 @@ Object.freeze({
35208
35589
  addonId: null,
35209
35590
  access: "create"
35210
35591
  },
35592
+ "pipelineAnalytics.countRelocatableMedia": {
35593
+ capName: "pipeline-analytics",
35594
+ capScope: "device",
35595
+ addonId: null,
35596
+ access: "view"
35597
+ },
35598
+ "pipelineAnalytics.countUnstampedEventMedia": {
35599
+ capName: "pipeline-analytics",
35600
+ capScope: "device",
35601
+ addonId: null,
35602
+ access: "view"
35603
+ },
35211
35604
  "pipelineAnalytics.deleteDeviceEvents": {
35212
35605
  capName: "pipeline-analytics",
35213
35606
  capScope: "device",
@@ -36366,6 +36759,12 @@ Object.freeze({
36366
36759
  addonId: null,
36367
36760
  access: "view"
36368
36761
  },
36762
+ "recording.getRelocateResidue": {
36763
+ capName: "recording",
36764
+ capScope: "system",
36765
+ addonId: null,
36766
+ access: "view"
36767
+ },
36369
36768
  "recording.getStorageMigrationMoveStatus": {
36370
36769
  capName: "recording",
36371
36770
  capScope: "system",
@@ -36912,12 +37311,30 @@ Object.freeze({
36912
37311
  addonId: null,
36913
37312
  access: "create"
36914
37313
  },
37314
+ "storageMigration.drain": {
37315
+ capName: "storage-migration",
37316
+ capScope: "system",
37317
+ addonId: null,
37318
+ access: "create"
37319
+ },
37320
+ "storageMigration.movers": {
37321
+ capName: "storage-migration",
37322
+ capScope: "system",
37323
+ addonId: null,
37324
+ access: "view"
37325
+ },
36915
37326
  "storageMigration.plan": {
36916
37327
  capName: "storage-migration",
36917
37328
  capScope: "system",
36918
37329
  addonId: null,
36919
37330
  access: "view"
36920
37331
  },
37332
+ "storageMigration.residue": {
37333
+ capName: "storage-migration",
37334
+ capScope: "system",
37335
+ addonId: null,
37336
+ access: "view"
37337
+ },
36921
37338
  "storageMigration.start": {
36922
37339
  capName: "storage-migration",
36923
37340
  capScope: "system",
@@ -37752,6 +38169,12 @@ Object.freeze({
37752
38169
  addonId: null,
37753
38170
  access: "delete"
37754
38171
  },
38172
+ "vectorStore.fetchByIds": {
38173
+ capName: "vector-store",
38174
+ capScope: "system",
38175
+ addonId: null,
38176
+ access: "view"
38177
+ },
37755
38178
  "vectorStore.getByIds": {
37756
38179
  capName: "vector-store",
37757
38180
  capScope: "system",
@@ -37764,6 +38187,12 @@ Object.freeze({
37764
38187
  addonId: null,
37765
38188
  access: "view"
37766
38189
  },
38190
+ "vectorStore.scan": {
38191
+ capName: "vector-store",
38192
+ capScope: "system",
38193
+ addonId: null,
38194
+ access: "view"
38195
+ },
37767
38196
  "vectorStore.stats": {
37768
38197
  capName: "vector-store",
37769
38198
  capScope: "system",
@@ -8242,18 +8242,61 @@ var RelocateFootageInputSchema = object({
8242
8242
  * `RecordingConfig.enabled` or camera wrapper bindings. */
8243
8243
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
8244
8244
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
8245
+ /**
8246
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
8247
+ * mover (the engine already walks both collections with a timestamp cursor and
8248
+ * already has a stamp-without-copy path).
8249
+ *
8250
+ * - `move` — the default and the historical behaviour: event-media and
8251
+ * retrain blobs move to `toLocationId` and their rows are
8252
+ * stamped. The enrolled gallery is skipped (D197).
8253
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
8254
+ * stamped with `toLocationId`. `toLocationId` here is the id the
8255
+ * bytes ALREADY sit on — today's `eventMedia` default — because
8256
+ * a NULL row means "wherever `eventMedia` points *now*", and the
8257
+ * instant a repoint moves that pointer the row reads from the
8258
+ * new disk while its bytes are on the old one.
8259
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
8260
+ * (enrolled-gallery) rows, which `move` deliberately skips.
8261
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
8262
+ * never run beside a live second location: it is stop-the-world
8263
+ * by construction, which is acceptable only because the gallery
8264
+ * is a few KB per enrolled sample.
8265
+ */
8266
+ var MediaRelocateModeSchema = _enum([
8267
+ "move",
8268
+ "seal",
8269
+ "gallery"
8270
+ ]);
8245
8271
  var RelocateMediaInputSchema = object({
8246
8272
  toLocationId: string(),
8247
- throttleMbps: number().min(1).max(1e3).optional()
8273
+ throttleMbps: number().min(1).max(1e3).optional(),
8274
+ /** Omitted = `move`, the pre-existing behaviour. */
8275
+ mode: MediaRelocateModeSchema.optional()
8276
+ });
8277
+ /** How many rows still carry NO `locationId` — the population a repoint would
8278
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
8279
+ * value that permits a non-blocking `eventMedia` cutover. */
8280
+ var UnstampedEventMediaCountSchema = object({
8281
+ media: number().int().nonnegative(),
8282
+ retrainFrames: number().int().nonnegative(),
8283
+ total: number().int().nonnegative()
8248
8284
  });
8249
8285
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
8250
- /** The independently selectable logical storage classes. `recordings`
8251
- * encompasses the high and mid segment profiles; `recordingsLow` is low
8252
- * segments; `eventMedia` is post-analysis blobs. */
8286
+ /** The independently selectable logical storage classes — every class
8287
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
8288
+ * Zod enum error where they should meet an explanation.
8289
+ *
8290
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
8291
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
8292
+ * enrolled gallery; `backups` is the system backup archive. The last two have
8293
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
8253
8294
  var StorageMigrationClassSchema = _enum([
8254
8295
  "recordings",
8255
8296
  "recordingsLow",
8256
- "eventMedia"
8297
+ "eventMedia",
8298
+ "backups",
8299
+ "galleryMedia"
8257
8300
  ]);
8258
8301
  /** A destination is always an existing, fully-qualified location id. The
8259
8302
  * migration API intentionally never changes a source location's `basePath`:
@@ -8261,20 +8304,56 @@ var StorageMigrationClassSchema = _enum([
8261
8304
  var StorageMigrationDestinationsSchema = object({
8262
8305
  recordings: string().min(1).optional(),
8263
8306
  recordingsLow: string().min(1).optional(),
8264
- eventMedia: string().min(1).optional()
8307
+ eventMedia: string().min(1).optional(),
8308
+ backups: string().min(1).optional(),
8309
+ galleryMedia: string().min(1).optional()
8265
8310
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8311
+ /**
8312
+ * How a migration sequences the cutover against the byte move.
8313
+ *
8314
+ * - `blocking` — the historical order: pause, move every byte, repoint,
8315
+ * resume. Recording is stopped for the whole move. Right
8316
+ * for a small or a cold class, and the only legal mode for
8317
+ * a `cardinality: 'single'` class.
8318
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
8319
+ * refresh, resume, then move the past with everything
8320
+ * running. The pause is three bounded instants (a detach +
8321
+ * attach round, a write-gate drain, a lease) instead of one
8322
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
8323
+ * stopped recording under `blocking`; the same move is
8324
+ * seconds of stopped recording under `nonBlocking`.
8325
+ *
8326
+ * The mode is on the JOB, not only on the input, because `status` is where an
8327
+ * operator finds out which one is running.
8328
+ */
8329
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8266
8330
  /** Shared input for planning and starting an orchestrated storage migration. */
8267
8331
  var StorageMigrationInputSchema = object({
8268
8332
  destinations: StorageMigrationDestinationsSchema,
8269
- throttleMbps: number().min(1).max(1e3).optional()
8333
+ throttleMbps: number().min(1).max(1e3).optional(),
8334
+ /** Omitted = `blocking`, which stays the default. */
8335
+ mode: StorageMigrationModeSchema.optional()
8270
8336
  });
8271
- /** The durable coordinator state machine. The only phase that changes default
8272
- * locations is `repointing`, after every selected mover has completed and been
8273
- * verified. */
8337
+ /**
8338
+ * The durable coordinator state machine.
8339
+ *
8340
+ * `blocking`:
8341
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
8342
+ *
8343
+ * `nonBlocking`:
8344
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
8345
+ *
8346
+ * Same phases, different order plus two new ones — not a second mover.
8347
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
8348
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
8349
+ * `repointing` is still the only phase that changes a default location.
8350
+ */
8274
8351
  var StorageMigrationPhaseSchema = _enum([
8275
8352
  "planning",
8353
+ "sealing",
8276
8354
  "pausing",
8277
8355
  "moving",
8356
+ "draining",
8278
8357
  "verifying",
8279
8358
  "repointing",
8280
8359
  "refreshing",
@@ -8288,17 +8367,56 @@ var StorageMigrationParticipantSchema = _enum([
8288
8367
  "recorder",
8289
8368
  "analytics"
8290
8369
  ]);
8370
+ /**
8371
+ * The mover's own numbers, folded onto the coordinator's durable move record.
8372
+ *
8373
+ * The long half of a non-blocking migration is `draining`, and it is measured
8374
+ * in hours: 136 885 files at ~4 MB/s is about five of them. Before this shape
8375
+ * existed the only place those numbers appeared was a Loki line, so an operator
8376
+ * watching the Admin UI saw `phase: draining` and nothing else for a whole
8377
+ * afternoon.
8378
+ *
8379
+ * It is POLLED, never pushed. Events are telemetry and may be dropped
8380
+ * (D8/D11), and a dropped progress event is indistinguishable from a stalled
8381
+ * mover — which is the exact failure this is meant to end. The coordinator's
8382
+ * `waitForMoves` already fetches the whole {@link RelocateJob} on every tick to
8383
+ * read `state`; folding the counters costs no extra read and makes the durable
8384
+ * record say afterwards how far a move actually got.
8385
+ *
8386
+ * `filesTotal` is `null` for "no honest denominator" and is never zero-filled:
8387
+ * a windowed footage job (`sinceMs`) and a node with no ledger both genuinely
8388
+ * cannot say M, and a 0 there would render as "100 % done".
8389
+ */
8390
+ var StorageMigrationMoveProgressSchema = object({
8391
+ filesMoved: number().int().nonnegative(),
8392
+ /** The archive census — the **M** of "N of M" (D295). `null` = unknowable. */
8393
+ filesTotal: number().int().nonnegative().nullable(),
8394
+ bytesMoved: number().int().nonnegative(),
8395
+ /** The MOVER's start, not the migration's: a drain restarted after an addon
8396
+ * crash gets a new mover, and a rate computed from the migration's start
8397
+ * would silently average in the time nothing was running. */
8398
+ startedAt: number(),
8399
+ /** When the coordinator last read these numbers. Paired with `startedAt` it
8400
+ * is the only honest rate: both clocks are the hub's, so a UI never has to
8401
+ * subtract its own. */
8402
+ observedAt: number()
8403
+ });
8291
8404
  var StorageMigrationMoveSchema = object({
8292
8405
  storageClass: StorageMigrationClassSchema,
8293
8406
  fromLocationId: string(),
8294
8407
  toLocationId: string(),
8295
8408
  moverJobId: string().nullable(),
8296
8409
  state: RelocateJobStateSchema.nullable(),
8297
- error: string().nullable()
8410
+ error: string().nullable(),
8411
+ /** Last observed mover counters; `null` until the mover has been polled once. */
8412
+ progress: StorageMigrationMoveProgressSchema.nullable()
8298
8413
  });
8299
8414
  var StorageMigrationJobSchema = object({
8300
8415
  jobId: string(),
8301
8416
  phase: StorageMigrationPhaseSchema,
8417
+ /** Which order this job is running. `status` is the only place an operator
8418
+ * can tell a seconds-long cutover from a thirty-hour one. */
8419
+ mode: StorageMigrationModeSchema,
8302
8420
  destinations: StorageMigrationDestinationsSchema,
8303
8421
  throttleMbps: number(),
8304
8422
  moves: array(StorageMigrationMoveSchema),
@@ -8311,13 +8429,122 @@ var StorageMigrationJobSchema = object({
8311
8429
  finishedAt: number().nullable(),
8312
8430
  error: string().nullable()
8313
8431
  });
8432
+ var StorageMigrationFindingSchema = object({
8433
+ code: _enum([
8434
+ "sharesDeviceWithSource",
8435
+ "deviceIdentityUnknown",
8436
+ "unstampedEventMediaRows",
8437
+ "blockingOnly",
8438
+ "noMover"
8439
+ ]),
8440
+ storageClass: StorageMigrationClassSchema,
8441
+ /** Human-readable, already carrying the ids and counts. */
8442
+ message: string()
8443
+ });
8314
8444
  var StorageMigrationPlanSchema = object({
8315
8445
  destinations: StorageMigrationDestinationsSchema,
8446
+ /** The mode this plan was built for. A plan is only valid for its mode: the
8447
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
8448
+ * it. */
8449
+ mode: StorageMigrationModeSchema,
8316
8450
  moves: array(object({
8317
8451
  storageClass: StorageMigrationClassSchema,
8318
8452
  fromLocationId: string(),
8319
8453
  toLocationId: string()
8320
- }))
8454
+ })),
8455
+ findings: array(StorageMigrationFindingSchema)
8456
+ });
8457
+ /**
8458
+ * A mover as it exists RIGHT NOW, whether or not a migration job owns it.
8459
+ *
8460
+ * The coordinator's job record is the state of record for a migration, and its
8461
+ * moves carry {@link StorageMigrationMoveProgress}. But the movers are usable
8462
+ * standalone — `recording.relocateFootage` and `pipelineAnalytics.relocateMedia`
8463
+ * are both operator-callable, and on 2026-08-29 a five-hour drain was armed that
8464
+ * way because no supported UI path existed. A mover armed like that has no job
8465
+ * to fold progress into, so it has to be readable on its own or it is invisible.
8466
+ *
8467
+ * `migrationJobId` is what tells the two apart: `null` means nothing here
8468
+ * orchestrated it.
8469
+ */
8470
+ var StorageMigrationMoverSchema = object({
8471
+ lane: _enum(["footage", "media"]),
8472
+ job: RelocateJobSchema,
8473
+ /** The coordinator job that armed this mover, or `null` for a mover armed
8474
+ * directly against the owning addon. */
8475
+ migrationJobId: string().nullable(),
8476
+ /** When the hub read these counters. Stamped here so a rate is `bytesMoved`
8477
+ * over (`observedAt` − `job.startedAt`) with BOTH ends on the hub's clock —
8478
+ * a browser subtracting its own `Date.now()` from a server `startedAt` is a
8479
+ * rate made of two different clocks. */
8480
+ observedAt: number()
8481
+ });
8482
+ /**
8483
+ * What a SOURCE still holds for one storage class — the number that makes a
8484
+ * "drain remaining" action honest rather than hopeful.
8485
+ *
8486
+ * It comes from the archive (`SegmentHourLedger.census` for footage, the media
8487
+ * engine's own selection count for media), never from the resident index: a
8488
+ * drain sized off `RecordingIndex` is what reported `done` over 80.3 GB it had
8489
+ * never been told about (D295).
8490
+ *
8491
+ * `items`/`bytes` are `null` for "the archive could not be asked", which is
8492
+ * deliberately NOT zero: a drain is still offered for an unknown residue,
8493
+ * because refusing on an unanswerable read would hide exactly the case an
8494
+ * operator needs to act on.
8495
+ */
8496
+ var StorageMigrationResidueSchema = object({
8497
+ storageClass: StorageMigrationClassSchema,
8498
+ /** The location still holding the data. `'*'` for the media lane, whose rows
8499
+ * move from wherever they are rather than from one named source. */
8500
+ fromLocationId: string(),
8501
+ /** Where a drain would move it — the class's CURRENT default. */
8502
+ toLocationId: string(),
8503
+ /** Segments (footage lane) or rows (media lane) still on the source. */
8504
+ items: number().int().nonnegative().nullable(),
8505
+ /** Bytes on the source; `null` when the lane counts rows rather than bytes. */
8506
+ bytes: number().int().nonnegative().nullable()
8507
+ });
8508
+ /**
8509
+ * Run the DRAIN half and nothing else.
8510
+ *
8511
+ * A migration that reached `done` has already repointed, so `start` correctly
8512
+ * refuses its destination ("already the default") — there is nothing left to
8513
+ * repoint. But the drain can fail, be cancelled, be interrupted by a restart,
8514
+ * or finish against a work list that was a tenth of the archive (D295), and
8515
+ * before this there was no supported way to run only that half: the only way
8516
+ * through was calling `recording.relocateFootage` by hand over admin tRPC.
8517
+ *
8518
+ * `drain` NEVER calls `setDefaultLocations`. That is what keeps `start`'s
8519
+ * refusal meaningful: the two verbs are disjoint, so nothing here can silently
8520
+ * re-repoint a class that is already migrated.
8521
+ */
8522
+ var StorageMigrationDrainInputSchema = object({
8523
+ /** The classes to drain. Each must appear in `storageMigration.residue`, so
8524
+ * a class whose source is already empty is refused rather than started. */
8525
+ classes: array(StorageMigrationClassSchema).min(1),
8526
+ throttleMbps: number().min(1).max(1e3).optional()
8527
+ });
8528
+ /** What a footage source still holds, asked of the durable hour ledger. */
8529
+ var RelocateResidueInputSchema = object({
8530
+ fromLocationId: string().min(1),
8531
+ /** Narrow to one logical class; omit for every profile on the location. */
8532
+ footageClass: RelocateFootageClassSchema.optional()
8533
+ });
8534
+ /** `null` = the archive could not answer (no ledger on this node, or the
8535
+ * aggregate failed). Never conflated with an empty source. */
8536
+ var RelocateResidueSchema = object({
8537
+ segments: number().int().nonnegative(),
8538
+ bytes: number().int().nonnegative()
8539
+ }).nullable();
8540
+ /** How many rows a media pass would still act on against a given target — the
8541
+ * media lane's denominator AND its residue, from ONE derivation so the two can
8542
+ * never disagree. `null` = the count could not be taken. */
8543
+ var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8544
+ var RelocatableMediaCountInputSchema = object({
8545
+ toLocationId: string().min(1),
8546
+ /** Omitted = `move`. */
8547
+ mode: MediaRelocateModeSchema.optional()
8321
8548
  });
8322
8549
  /**
8323
8550
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -8423,6 +8650,32 @@ var StorageLocationRefSchema = union([StorageLocationTypeSchema, string().regex(
8423
8650
  * two addons declaring the same `id` must agree on `cardinality` (validated
8424
8651
  * at kernel aggregation time, not here).
8425
8652
  */
8653
+ /**
8654
+ * `StorageAccess` — how the service that DECLARED a storage-location kind
8655
+ * actually reaches the bytes. It is the constraint that decides which
8656
+ * `storage-provider`s may back a location of that kind.
8657
+ *
8658
+ * - `'local-path'` — the service asks `storage.resolve` for a path string and
8659
+ * then does its own `node:fs` I/O on it (the recorder's segment writer, the
8660
+ * post-analysis media roots). Only a provider that serves a genuine local
8661
+ * filesystem (`getProviderInfo().nodeLocal === true`) can satisfy that: a
8662
+ * remote provider's `resolve` returns a path on the REMOTE host, and
8663
+ * `fs.readdir` of it on this node either fails or — far worse — succeeds
8664
+ * against a same-named local directory that is something else entirely.
8665
+ *
8666
+ * - `'cap-mediated'` — every byte travels through the `storage` cap
8667
+ * (`read`/`write`, or `beginUpload`/`writeChunk`/`finalizeUpload`). The
8668
+ * service never sees a path, so any provider can back it. `backups` is the
8669
+ * one kind that qualifies today.
8670
+ *
8671
+ * Before this existed, `recordings` was unreachable by SFTP/S3/WebDAV only as
8672
+ * an EMERGENT property of how the recorder happened to be written. Nothing
8673
+ * refused the configuration; the first write simply went somewhere wrong, and
8674
+ * a recording write that goes wrong surfaces as a silent black window rather
8675
+ * than an error (the read path does not `stat`). This turns that accident into
8676
+ * a declared, enforced, testable refusal.
8677
+ */
8678
+ var StorageAccessSchema = _enum(["local-path", "cap-mediated"]);
8426
8679
  var StorageLocationDeclarationSchema = object({
8427
8680
  /**
8428
8681
  * Global location identifier, e.g. `recordings` or `recordingsLow`.
@@ -8442,6 +8695,19 @@ var StorageLocationDeclarationSchema = object({
8442
8695
  */
8443
8696
  cardinality: _enum(["single", "multi"]),
8444
8697
  /**
8698
+ * HOW the declaring service reaches the bytes — and therefore WHICH
8699
+ * providers may back a location of this kind. See {@link StorageAccessSchema}
8700
+ * and {@link STORAGE_ACCESS_FALLBACK}.
8701
+ *
8702
+ * Absent means `'local-path'`. That default is FAIL-CLOSED on purpose: it
8703
+ * can only over-restrict (refuse a remote provider for a kind that might
8704
+ * have coped) and never under-restrict. Declaring `'cap-mediated'` is the
8705
+ * permissive direction and is therefore never inferred — a repo guard
8706
+ * (`scripts/check-storage-access-declarations.ts`) refuses to let it be
8707
+ * reached by omission.
8708
+ */
8709
+ access: StorageAccessSchema.optional(),
8710
+ /**
8445
8711
  * When set, the default instance for this location inherits its resolved
8446
8712
  * root from the named location's default instance. Useful for derivative
8447
8713
  * slots (e.g. `recordingsLow` → `recordings`) so operators only need to
@@ -18494,8 +18760,10 @@ var TrackSchema = object({
18494
18760
  lastSeen: number(),
18495
18761
  /** Frame-rate position history (subject to maxPositionHistory cap). */
18496
18762
  positions: array(TrackPositionSchema).readonly(),
18497
- /** Periodic snapshots at snapshotIntervalMs cadence (subject to
18498
- * saveThumbnails policy). */
18763
+ /** Periodic snapshots at snapshotIntervalMs cadence DEBUG media, produced
18764
+ * only while `MediaSettings.debugMediaEnabled` is on for the camera (D299;
18765
+ * the retired `saveThumbnails` used to gate this and the rolling
18766
+ * `lastFrame` together). Empty is the healthy default, not a capture gap. */
18499
18767
  snapshots: array(TrackSnapshotSchema).readonly(),
18500
18768
  /** Deduplicated zones the track has entered at least once. Zone IDS. */
18501
18769
  zonesVisited: array(string()).readonly(),
@@ -19355,6 +19623,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19355
19623
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
19356
19624
  kind: "mutation",
19357
19625
  auth: "admin"
19626
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(RelocatableMediaCountInputSchema, RelocatableMediaCountSchema, {
19627
+ kind: "query",
19628
+ auth: "admin"
19358
19629
  }), method(object({}), array(RelocateJobSchema).readonly(), {
19359
19630
  kind: "query",
19360
19631
  auth: "admin"
@@ -21262,7 +21533,10 @@ method(object({
21262
21533
  }), StorageLocationSchema, {
21263
21534
  kind: "mutation",
21264
21535
  auth: "admin"
21265
- }), method(object({ id: string() }), _void(), {
21536
+ }), method(object({
21537
+ id: string(),
21538
+ force: boolean().optional()
21539
+ }), _void(), {
21266
21540
  kind: "mutation",
21267
21541
  auth: "admin"
21268
21542
  }), method(object({ id: string() }), object({
@@ -21311,6 +21585,9 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21311
21585
  }), method(object({ jobId: string().optional() }), StorageMigrationJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21312
21586
  kind: "mutation",
21313
21587
  auth: "admin"
21588
+ }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21589
+ kind: "mutation",
21590
+ auth: "admin"
21314
21591
  });
21315
21592
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21316
21593
  providerId: string().min(1),
@@ -21709,12 +21986,38 @@ response: record(string(), unknown()) }), object({
21709
21986
  *
21710
21987
  * ## Why this is a capability and not a helper
21711
21988
  *
21712
- * Six stores in `addon-post-analysis` already hold vectors object CLIP, face,
21713
- * plate, vehicle, identity, and the event store's derivativesand every one of
21714
- * them keeps its vectors in a `JSON` settings-store column and ranks them by
21715
- * brute-force cosine in JS. Measured on the live hub that costs ~11.7 KB per row
21716
- * (512 floats as TEXT, `JSON.parse`d on every search) and made semantic search
21717
- * load 5,000 rows before ranking anything.
21989
+ * This capability was introduced with the claim that SIX stores in
21990
+ * `addon-post-analysis` held vectors in a `JSON` settings-store columnobject
21991
+ * CLIP, face, plate, vehicle, identity, and the event store's derivatives. That
21992
+ * claim was never true, and leaving it here made five stores look like pending
21993
+ * work when three of them have no vector at all. Counted column by column on
21994
+ * 2026-08-30, exactly THREE ever held one:
21995
+ *
21996
+ * - `object-clip` — 512-dim CLIP image embedding, migrated 2026-08-06.
21997
+ * - `faces.embedding` — 512-dim ArcFace face embedding, migrated 2026-08-30.
21998
+ * - `identity-samples.embedding` — the same ArcFace vector for an ENROLLED
21999
+ * face, migrated 2026-08-30 into its OWN index (see below).
22000
+ *
22001
+ * `plates` and `vehicle-samples` store a plate STRING and a score; `vehicles`
22002
+ * and `identities` store a name; the event store stores no derivative vector.
22003
+ * They are not migration candidates and never were.
22004
+ *
22005
+ * Measured on the live hub the JSON encoding cost ~11.7 KB per row (512 floats
22006
+ * as TEXT, `JSON.parse`d on every search) and made semantic search load 5,000
22007
+ * rows before ranking anything.
22008
+ *
22009
+ * ## One index per COMPARISON, never per encoder
22010
+ *
22011
+ * `faces` and `identity-samples` hold the same 512 ArcFace dims from the same
22012
+ * model, and they still get two indexes. An index is a set of things that are
22013
+ * ranked against each other and that live and die together, and these two are
22014
+ * neither: a `faces` row is TRACK-OWNED and cascades away with its track under
22015
+ * a per-camera capacity cap, an `identity-samples` row is retention-EXEMPT
22016
+ * forever and is the gallery every recognition ranks against. One index would
22017
+ * mean every gallery load and every reconcile carried a filter whose failure
22018
+ * mode is either ranking a candidate against itself or reclaiming an enrolled
22019
+ * person's only sample. The dimension they share is not a reason to share an
22020
+ * index; the question they answer is, and it differs.
21718
22021
  *
21719
22022
  * The fix is not a faster loop, it is a different backend — and the backend
21720
22023
  * should be replaceable without touching six callers. So: a singleton
@@ -21819,7 +22122,20 @@ var VectorQueryResultSchema = object({
21819
22122
  */
21820
22123
  scanned: number(),
21821
22124
  /** True when the backend could not consider every row that passed the filter. */
21822
- truncated: boolean()
22125
+ truncated: boolean(),
22126
+ /**
22127
+ * The `topK` the backend actually ran with.
22128
+ *
22129
+ * Every backend has a ceiling — sqlite-vec's is 4,096 — and a caller asking
22130
+ * past it used to learn nothing but a boolean, from a WARN in the provider's
22131
+ * own log rather than in its answer. That is how an audit asking for 20,000
22132
+ * consumed 4,096 and reported `examined: 4096` as if it had walked the index,
22133
+ * for weeks. `truncated` says THAT the answer was short; this says BY HOW
22134
+ * MUCH, in the return value, where the caller cannot fail to see it.
22135
+ *
22136
+ * Equals the requested `topK` whenever nothing was lowered.
22137
+ */
22138
+ effectiveTopK: number().int().positive()
21823
22139
  });
21824
22140
  var VectorDeleteInputSchema = object({
21825
22141
  index: string(),
@@ -21848,6 +22164,68 @@ var VectorGetResultSchema = object({ items: array(object({
21848
22164
  id: string(),
21849
22165
  metadata: VectorMetadataSchema
21850
22166
  })) });
22167
+ /**
22168
+ * Ids to read back WITH their vectors.
22169
+ *
22170
+ * The sibling of {@link VectorGetResultSchema}, and deliberately a separate
22171
+ * method rather than a flag on it: `getByIds` promises no vectors and its one
22172
+ * caller depends on that promise. This one promises the opposite.
22173
+ *
22174
+ * It exists because a store cannot put its vectors here otherwise. An ArcFace
22175
+ * gallery is ranked IN PROCESS, per detection, against every enrolled sample —
22176
+ * a per-face cross-process KNN would be a network round trip inside the
22177
+ * recognition loop. So the gallery is loaded once and held in RAM, and loading
22178
+ * it requires the index to hand the floats back. Without this method the only
22179
+ * way to keep a readable vector is a JSON column, which is the thing this
22180
+ * capability exists to delete.
22181
+ *
22182
+ * BOUNDED BY THE CALLER: ids are named, never "everything". Enumerating an
22183
+ * index is {@link VectorScanInputSchema}'s job, and it returns no vectors.
22184
+ */
22185
+ var VectorFetchInputSchema = object({
22186
+ index: string(),
22187
+ ids: array(string())
22188
+ });
22189
+ var VectorFetchResultSchema = object({ items: array(object({
22190
+ id: string(),
22191
+ /** base64 Float32LE — the same wire form `upsert` accepts. */
22192
+ vector: string(),
22193
+ metadata: VectorMetadataSchema
22194
+ })) });
22195
+ /**
22196
+ * ENUMERATE an index: one page of rows in a stable order, no ranking.
22197
+ *
22198
+ * A reconcile does not want the nearest rows, it wants ALL of them, and asking
22199
+ * a KNN for "all" is the wrong question twice over. It hits the backend's `k`
22200
+ * ceiling — 4,096 on sqlite-vec against a 22,128-row index — and it needs a
22201
+ * probe vector it does not have, so the audit passed a ZERO vector whose cosine
22202
+ * distance to every row is degenerate. `examined: 4096` then read as "we
22203
+ * looked" for as long as anyone cared to read it.
22204
+ *
22205
+ * This is the primitive that question actually needs: a bounded page, ordered
22206
+ * by the backend's own row order, costing no distance computation at all.
22207
+ * Vectors are NOT returned — an enumeration that shipped 2 KB per row would be
22208
+ * the full-table read this capability was built to stop.
22209
+ */
22210
+ var VectorScanInputSchema = object({
22211
+ index: string(),
22212
+ /** Opaque resume point. `0` starts at the top; pass back `nextCursor`. */
22213
+ cursor: number().int().nonnegative().default(0),
22214
+ limit: number().int().positive()
22215
+ });
22216
+ var VectorScanResultSchema = object({
22217
+ items: array(object({
22218
+ id: string(),
22219
+ metadata: VectorMetadataSchema
22220
+ })),
22221
+ /**
22222
+ * Where the next page starts, or `null` when the walk reached the end.
22223
+ *
22224
+ * `null` is the ONLY end-of-index signal. A caller must not infer the end
22225
+ * from a short page: a backend is free to return fewer rows than asked.
22226
+ */
22227
+ nextCursor: number().int().nonnegative().nullable()
22228
+ });
21851
22229
  var VectorStatsInputSchema = object({ index: string() });
21852
22230
  var VectorStatsResultSchema = object({
21853
22231
  /** Provider id, so an operator can tell brute force from an ANN index. */
@@ -21866,7 +22244,7 @@ method(VectorDeclareIndexInputSchema, _void(), {
21866
22244
  }), method(VectorUpsertInputSchema, VectorUpsertResultSchema, {
21867
22245
  kind: "mutation",
21868
22246
  auth: "admin"
21869
- }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
22247
+ }), method(VectorQueryInputSchema, VectorQueryResultSchema, { auth: "admin" }), method(VectorGetInputSchema, VectorGetResultSchema, { auth: "admin" }), method(VectorFetchInputSchema, VectorFetchResultSchema, { auth: "admin" }), method(VectorScanInputSchema, VectorScanResultSchema, { auth: "admin" }), method(VectorDeleteInputSchema, VectorDeleteResultSchema, {
21870
22248
  kind: "mutation",
21871
22249
  auth: "admin"
21872
22250
  }), method(VectorDeleteByFilterInputSchema, VectorDeleteResultSchema, {
@@ -28574,6 +28952,9 @@ method(object({
28574
28952
  }), method(object({}), array(RelocateJobSchema).readonly(), {
28575
28953
  kind: "query",
28576
28954
  auth: "admin"
28955
+ }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28956
+ kind: "query",
28957
+ auth: "admin"
28577
28958
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28578
28959
  kind: "mutation",
28579
28960
  auth: "admin"
@@ -35208,6 +35589,18 @@ Object.freeze({
35208
35589
  addonId: null,
35209
35590
  access: "create"
35210
35591
  },
35592
+ "pipelineAnalytics.countRelocatableMedia": {
35593
+ capName: "pipeline-analytics",
35594
+ capScope: "device",
35595
+ addonId: null,
35596
+ access: "view"
35597
+ },
35598
+ "pipelineAnalytics.countUnstampedEventMedia": {
35599
+ capName: "pipeline-analytics",
35600
+ capScope: "device",
35601
+ addonId: null,
35602
+ access: "view"
35603
+ },
35211
35604
  "pipelineAnalytics.deleteDeviceEvents": {
35212
35605
  capName: "pipeline-analytics",
35213
35606
  capScope: "device",
@@ -36366,6 +36759,12 @@ Object.freeze({
36366
36759
  addonId: null,
36367
36760
  access: "view"
36368
36761
  },
36762
+ "recording.getRelocateResidue": {
36763
+ capName: "recording",
36764
+ capScope: "system",
36765
+ addonId: null,
36766
+ access: "view"
36767
+ },
36369
36768
  "recording.getStorageMigrationMoveStatus": {
36370
36769
  capName: "recording",
36371
36770
  capScope: "system",
@@ -36912,12 +37311,30 @@ Object.freeze({
36912
37311
  addonId: null,
36913
37312
  access: "create"
36914
37313
  },
37314
+ "storageMigration.drain": {
37315
+ capName: "storage-migration",
37316
+ capScope: "system",
37317
+ addonId: null,
37318
+ access: "create"
37319
+ },
37320
+ "storageMigration.movers": {
37321
+ capName: "storage-migration",
37322
+ capScope: "system",
37323
+ addonId: null,
37324
+ access: "view"
37325
+ },
36915
37326
  "storageMigration.plan": {
36916
37327
  capName: "storage-migration",
36917
37328
  capScope: "system",
36918
37329
  addonId: null,
36919
37330
  access: "view"
36920
37331
  },
37332
+ "storageMigration.residue": {
37333
+ capName: "storage-migration",
37334
+ capScope: "system",
37335
+ addonId: null,
37336
+ access: "view"
37337
+ },
36921
37338
  "storageMigration.start": {
36922
37339
  capName: "storage-migration",
36923
37340
  capScope: "system",
@@ -37752,6 +38169,12 @@ Object.freeze({
37752
38169
  addonId: null,
37753
38170
  access: "delete"
37754
38171
  },
38172
+ "vectorStore.fetchByIds": {
38173
+ capName: "vector-store",
38174
+ capScope: "system",
38175
+ addonId: null,
38176
+ access: "view"
38177
+ },
37755
38178
  "vectorStore.getByIds": {
37756
38179
  capName: "vector-store",
37757
38180
  capScope: "system",
@@ -37764,6 +38187,12 @@ Object.freeze({
37764
38187
  addonId: null,
37765
38188
  access: "view"
37766
38189
  },
38190
+ "vectorStore.scan": {
38191
+ capName: "vector-store",
38192
+ capScope: "system",
38193
+ addonId: null,
38194
+ access: "view"
38195
+ },
37767
38196
  "vectorStore.stats": {
37768
38197
  capName: "vector-store",
37769
38198
  capScope: "system",
@@ -3,7 +3,7 @@ Object.defineProperties(exports, {
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
5
  //#endregion
6
- const require_dist = require("../dist-Dt7YuyK3.js");
6
+ const require_dist = require("../dist-DjxuSmvp.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/ha-export/topics.ts
9
9
  /**
@@ -1,4 +1,4 @@
1
- import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-BpQG6lq7.mjs";
1
+ import { At as EventCategory, C as buildAddonRouteProvider, Et as string, N as deviceExportCapability, X as oauthIntegrationCapability, a as COCO_TO_MACRO, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, pt as BaseAddon, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema, vt as nodePin } from "../dist-CCHqsqE6.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  //#region src/ha-export/topics.ts
4
4
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.55",
3
+ "version": "1.2.58",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",