@camstack/addon-provider-velux 0.2.48 → 0.2.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +478 -73
  2. package/dist/addon.mjs +478 -73
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -8017,6 +8017,20 @@ var RelocateJobSchema = object({
8017
8017
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8018
8018
  */
8019
8019
  rowsReconciled: number().int().nonnegative().optional(),
8020
+ /**
8021
+ * Rows this run FORGOT because the file they name is not on disk.
8022
+ *
8023
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8024
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8025
+ * and the durable row is dropped through the same channel eviction uses. It
8026
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8027
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8028
+ * the same failure as one that quietly skips them (D295).
8029
+ *
8030
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8031
+ * ledger claimed 5.65 GB of footage that no longer existed.
8032
+ */
8033
+ rowsForgotten: number().int().nonnegative().optional(),
8020
8034
  startedAt: number(),
8021
8035
  finishedAt: number().nullable(),
8022
8036
  error: string().nullable()
@@ -8081,6 +8095,13 @@ var MediaRelocateModeSchema = _enum([
8081
8095
  ]);
8082
8096
  var RelocateMediaInputSchema = object({
8083
8097
  toLocationId: string(),
8098
+ /**
8099
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8100
+ * every row that is not already on `toLocationId` (the historical
8101
+ * behaviour). A named source is what a from→to migration needs: without it
8102
+ * "move events off disk 2" also emptied disk 1.
8103
+ */
8104
+ fromLocationId: string().optional(),
8084
8105
  throttleMbps: number().min(1).max(1e3).optional(),
8085
8106
  /** Omitted = `move`, the pre-existing behaviour. */
8086
8107
  mode: MediaRelocateModeSchema.optional()
@@ -8148,6 +8169,19 @@ var StorageMigrationDestinationsSchema = object({
8148
8169
  galleryMedia: string().min(1).optional()
8149
8170
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8150
8171
  /**
8172
+ * Optional named source per class. Omitted = the class's current default
8173
+ * (the historical behaviour). A named source that is NOT the default is a
8174
+ * drain of that disk: bytes move, the default stays, and the source is
8175
+ * disabled when the move finishes.
8176
+ */
8177
+ var StorageMigrationSourcesSchema = object({
8178
+ recordings: string().min(1).optional(),
8179
+ recordingsLow: string().min(1).optional(),
8180
+ eventMedia: string().min(1).optional(),
8181
+ backups: string().min(1).optional(),
8182
+ galleryMedia: string().min(1).optional()
8183
+ }).optional();
8184
+ /**
8151
8185
  * How a migration sequences the cutover against the byte move.
8152
8186
  *
8153
8187
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8169,6 +8203,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8169
8203
  /** Shared input for planning and starting an orchestrated storage migration. */
8170
8204
  var StorageMigrationInputSchema = object({
8171
8205
  destinations: StorageMigrationDestinationsSchema,
8206
+ /** Omitted = each class's current default. */
8207
+ sources: StorageMigrationSourcesSchema,
8172
8208
  throttleMbps: number().min(1).max(1e3).optional(),
8173
8209
  /** Omitted = `blocking`, which stays the default. */
8174
8210
  mode: StorageMigrationModeSchema.optional()
@@ -8248,6 +8284,13 @@ var StorageMigrationMoveSchema = object({
8248
8284
  storageClass: StorageMigrationClassSchema,
8249
8285
  fromLocationId: string(),
8250
8286
  toLocationId: string(),
8287
+ /**
8288
+ * True when `from` was NOT the class default at plan time. The move still
8289
+ * copies bytes, but the default is left alone and the source is disabled
8290
+ * once the copy verifies. Absent on jobs planned before this field existed
8291
+ * — those jobs always repointed, which is `false`.
8292
+ */
8293
+ freezeSource: boolean().optional(),
8251
8294
  moverJobId: string().nullable(),
8252
8295
  state: RelocateJobStateSchema.nullable(),
8253
8296
  error: string().nullable(),
@@ -8261,6 +8304,7 @@ var StorageMigrationJobSchema = object({
8261
8304
  * can tell a seconds-long cutover from a thirty-hour one. */
8262
8305
  mode: StorageMigrationModeSchema,
8263
8306
  destinations: StorageMigrationDestinationsSchema,
8307
+ sources: StorageMigrationSourcesSchema,
8264
8308
  throttleMbps: number(),
8265
8309
  moves: array(StorageMigrationMoveSchema),
8266
8310
  pauseLeaseId: string().nullable(),
@@ -8286,6 +8330,7 @@ var StorageMigrationFindingSchema = object({
8286
8330
  });
8287
8331
  var StorageMigrationPlanSchema = object({
8288
8332
  destinations: StorageMigrationDestinationsSchema,
8333
+ sources: StorageMigrationSourcesSchema,
8289
8334
  /** The mode this plan was built for. A plan is only valid for its mode: the
8290
8335
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8291
8336
  * it. */
@@ -8293,7 +8338,8 @@ var StorageMigrationPlanSchema = object({
8293
8338
  moves: array(object({
8294
8339
  storageClass: StorageMigrationClassSchema,
8295
8340
  fromLocationId: string(),
8296
- toLocationId: string()
8341
+ toLocationId: string(),
8342
+ freezeSource: boolean().optional()
8297
8343
  })),
8298
8344
  findings: array(StorageMigrationFindingSchema)
8299
8345
  });
@@ -8380,16 +8426,142 @@ var RelocateResidueSchema = object({
8380
8426
  segments: number().int().nonnegative(),
8381
8427
  bytes: number().int().nonnegative()
8382
8428
  }).nullable();
8429
+ /**
8430
+ * Ask one location whether its durable hour rows describe the disk — the walk
8431
+ * (D319).
8432
+ *
8433
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8434
+ * missing tool is the question, and the dry run is how they sanity-check the
8435
+ * destructive run before authorising it.
8436
+ */
8437
+ var LedgerWalkInputSchema = object({
8438
+ locationId: string().min(1),
8439
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8440
+ apply: boolean().optional(),
8441
+ /** Narrow to one camera. */
8442
+ deviceId: number().int().positive().optional(),
8443
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8444
+ profiles: array(string().min(1)).optional()
8445
+ });
8446
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8447
+ var LedgerWalkRefusalSchema = _enum([
8448
+ "location-unknown",
8449
+ "source-writable",
8450
+ "no-ledger",
8451
+ "archive-unreadable",
8452
+ "anchor-absent",
8453
+ "anchor-unreadable",
8454
+ "anchor-moved"
8455
+ ]);
8456
+ _enum([
8457
+ "live-tail",
8458
+ "listing-error",
8459
+ "path-mismatch",
8460
+ "durable-refused"
8461
+ ]);
8462
+ /** Every skip reason, always present, always a number — so a reason that never
8463
+ * fired reports as zero rather than absent and the report shape is constant
8464
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8465
+ var LedgerWalkSkipCountsSchema = object({
8466
+ "live-tail": number().int().nonnegative(),
8467
+ "listing-error": number().int().nonnegative(),
8468
+ "path-mismatch": number().int().nonnegative(),
8469
+ "durable-refused": number().int().nonnegative()
8470
+ });
8471
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8472
+ var LedgerWalkDeviceReportSchema = object({
8473
+ deviceId: number().int(),
8474
+ hoursWalked: number().int().nonnegative(),
8475
+ hoursMissing: number().int().nonnegative(),
8476
+ ghostSegments: number().int().nonnegative(),
8477
+ ghostBytes: number().int().nonnegative(),
8478
+ forgottenSegments: number().int().nonnegative(),
8479
+ orphanFiles: number().int().nonnegative()
8480
+ });
8481
+ /**
8482
+ * What one walk claimed, listed, found and (only when armed) forgot.
8483
+ *
8484
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8485
+ * walk that saw a fraction of the location is visible in its own report rather
8486
+ * than in the absence of one.
8487
+ */
8488
+ var LedgerWalkReportSchema = object({
8489
+ locationId: string(),
8490
+ applied: boolean(),
8491
+ refused: LedgerWalkRefusalSchema.nullable(),
8492
+ archiveSegments: number().int().nonnegative().nullable(),
8493
+ archiveBytes: number().int().nonnegative().nullable(),
8494
+ hoursClaimed: number().int().nonnegative(),
8495
+ hoursWalked: number().int().nonnegative(),
8496
+ hoursMissing: number().int().nonnegative(),
8497
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8498
+ listings: number().int().nonnegative(),
8499
+ segmentsClaimed: number().int().nonnegative(),
8500
+ ghostSegments: number().int().nonnegative(),
8501
+ ghostBytes: number().int().nonnegative(),
8502
+ ghostHoursWhole: number().int().nonnegative(),
8503
+ forgottenSegments: number().int().nonnegative(),
8504
+ forgottenBytes: number().int().nonnegative(),
8505
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8506
+ orphanFiles: number().int().nonnegative(),
8507
+ orphanSample: array(string()).readonly(),
8508
+ hoursSkipped: number().int().nonnegative(),
8509
+ skippedByReason: LedgerWalkSkipCountsSchema,
8510
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8511
+ bounded: boolean(),
8512
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8513
+ });
8383
8514
  /** How many rows a media pass would still act on against a given target — the
8384
8515
  * media lane's denominator AND its residue, from ONE derivation so the two can
8385
8516
  * never disagree. `null` = the count could not be taken. */
8386
8517
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8387
8518
  var RelocatableMediaCountInputSchema = object({
8388
8519
  toLocationId: string().min(1),
8520
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8521
+ fromLocationId: string().optional(),
8389
8522
  /** Omitted = `move`. */
8390
8523
  mode: MediaRelocateModeSchema.optional()
8391
8524
  });
8392
8525
  /**
8526
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8527
+ * ghost ledger entries on frozen footage locations.
8528
+ *
8529
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8530
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8531
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8532
+ * with no operator-visible status.
8533
+ */
8534
+ var StorageCleanupPhaseSchema = _enum([
8535
+ "orphans",
8536
+ "debug-media",
8537
+ "ghost-ledger",
8538
+ "done",
8539
+ "failed",
8540
+ "cancelled"
8541
+ ]);
8542
+ var StorageCleanupInputSchema = object({
8543
+ /** Also walk motion stills / track filmstrips. Off by default. */
8544
+ includeDebugMedia: boolean().optional() });
8545
+ var StorageCleanupJobSchema = object({
8546
+ jobId: string(),
8547
+ phase: StorageCleanupPhaseSchema,
8548
+ includeDebugMedia: boolean(),
8549
+ orphansReclaimed: number().int().nonnegative(),
8550
+ orphanBytesReclaimed: number().int().nonnegative(),
8551
+ debugMediaReclaimed: number().int().nonnegative(),
8552
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8553
+ ghostsForgotten: number().int().nonnegative(),
8554
+ ghostBytesForgotten: number().int().nonnegative(),
8555
+ /** Short operator-facing line: current collection, pass, or location. */
8556
+ detail: string().nullable(),
8557
+ cancelRequested: boolean(),
8558
+ startedAt: number(),
8559
+ updatedAt: number(),
8560
+ finishedAt: number().nullable(),
8561
+ error: string().nullable()
8562
+ });
8563
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8564
+ /**
8393
8565
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8394
8566
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8395
8567
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8417,11 +8589,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8417
8589
  * The default location for a type uses `id === <type>:default` by
8418
8590
  * convention (the bare type ref like `'backups'` resolves to it).
8419
8591
  *
8420
- * `isSystem: true` marks a location as orchestrator-seeded and
8421
- * undeletable. The bootstrap-installed defaults (one per type) carry
8422
- * this flag; operator-added locations don't. Editing the config of
8423
- * a system location is allowed (path migration, provider swap) but
8424
- * deleting it is rejected at the cap level.
8592
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8593
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8594
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8595
+ * / last-enabled, not on this bit.
8425
8596
  */
8426
8597
  var StorageLocationSchema = object({
8427
8598
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -12947,6 +13118,12 @@ method(object({
12947
13118
  }), _void(), {
12948
13119
  kind: "mutation",
12949
13120
  auth: "admin"
13121
+ }), method(object({
13122
+ from: string(),
13123
+ to: string()
13124
+ }), object({ moved: number() }), {
13125
+ kind: "mutation",
13126
+ auth: "admin"
12950
13127
  }), method(object({
12951
13128
  deviceId: number(),
12952
13129
  disabled: boolean()
@@ -18955,53 +19132,15 @@ var RecentTracksPageSchema = object({
18955
19132
  /** Cursor for the next page, or null when this page is the last. */
18956
19133
  nextCursor: string().nullable()
18957
19134
  });
18958
- var LIST_GROUPS_DEFAULT_LIMIT = 40;
18959
- var LIST_GROUPS_MAX_LIMIT = 100;
18960
- var AnalyticsGroupRecordSchema = object({
18961
- id: string(),
18962
- deviceId: number().int(),
18963
- openedAt: number().int(),
18964
- closedAt: number().int(),
18965
- timestamp: number().int(),
18966
- memberCount: number().int(),
18967
- memberTrackIds: array(string()).readonly(),
18968
- className: string(),
18969
- classes: array(string()).readonly(),
18970
- /** Relative event-media path, or null when the group has no picture yet. */
18971
- mediaUrl: string().nullable(),
18972
- singleton: boolean()
18973
- });
18974
- var AnalyticsGroupMemberSchema = object({
18975
- trackId: string(),
18976
- deviceId: number().int(),
18977
- className: string(),
18978
- firstSeen: number().int(),
18979
- lastSeen: number().int(),
18980
- mediaUrl: string().nullable()
18981
- });
18982
- var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
18983
- var ListGroupsQueryInput = object({
18984
- /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
18985
- deviceIds: array(number()),
18986
- /** Window lower bound on `closedAt` (inclusive). */
18987
- since: number().optional(),
18988
- /** Window upper bound on `openedAt` (inclusive). */
18989
- until: number().optional(),
18990
- limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
18991
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
18992
- cursor: string().optional()
18993
- });
18994
- var ListGroupsPageSchema = object({
18995
- groups: array(AnalyticsGroupRecordSchema).readonly(),
18996
- nextCursor: string().nullable()
18997
- });
19135
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19136
+ var KEY_EVENTS_MAX_LIMIT = 200;
18998
19137
  var KeyEventQueryInput = object({
18999
19138
  deviceId: number(),
19000
19139
  /** Window lower bound (track firstSeen ≥ since). */
19001
19140
  since: number(),
19002
19141
  /** Window upper bound (track firstSeen ≤ until). */
19003
19142
  until: number(),
19004
- limit: number().int().min(1).max(200).default(50),
19143
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19005
19144
  /** Drop tracks scoring below this importance. */
19006
19145
  minImportance: number().min(0).max(1).optional(),
19007
19146
  /** Restrict to a single class (e.g. 'person'). */
@@ -19023,6 +19162,32 @@ var KeyEventSchema = object({
19023
19162
  ...TrackFlagFields,
19024
19163
  ...TrackRetrainFields
19025
19164
  });
19165
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19166
+ var KeyEventBatchQueryInput = object({
19167
+ deviceIds: array(number()).min(1).max(200),
19168
+ since: number(),
19169
+ until: number(),
19170
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19171
+ * across the set, which would let a busy camera starve a quiet one of its
19172
+ * rows and change what the merged feed contains. */
19173
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19174
+ minImportance: number().min(0).max(1).optional(),
19175
+ classFilter: string().optional()
19176
+ });
19177
+ /**
19178
+ * One camera's key events in a batch answer.
19179
+ *
19180
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19181
+ * error rather than throwing, so a camera whose store read failed and one with
19182
+ * no events in the window were ALREADY indistinguishable per camera — the
19183
+ * batch does not make that worse, and the row keeps the deviceId the single
19184
+ * method's output never carried (the caller used to stamp it from the fan-out
19185
+ * key, which only worked because there was one query per camera).
19186
+ */
19187
+ var KeyEventsForDeviceSchema = object({
19188
+ deviceId: number(),
19189
+ events: array(KeyEventSchema).readonly()
19190
+ });
19026
19191
  object({
19027
19192
  trackId: string(),
19028
19193
  className: string(),
@@ -19070,9 +19235,7 @@ var TrackCascadeCountsSchema = object({
19070
19235
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
19071
19236
  plates: number().int(),
19072
19237
  /** Per-track CLIP search vectors removed (best-effort). */
19073
- embeddings: number().int(),
19074
- /** Group membership + group rows removed with their last member (best-effort). */
19075
- groups: number().int()
19238
+ embeddings: number().int()
19076
19239
  });
19077
19240
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
19078
19241
  var DiskReconcileCountsSchema = object({
@@ -19242,6 +19405,47 @@ var RebuildStatusSchema = object({
19242
19405
  /** Present when the pass ended by throwing. */
19243
19406
  error: string().nullable()
19244
19407
  });
19408
+ /**
19409
+ * Acknowledgement that a debug-media reclaim STARTED.
19410
+ *
19411
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
19412
+ * it runs detached and this returns immediately. Awaiting it is how the
19413
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
19414
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
19415
+ */
19416
+ var MediaReclaimStartResultSchema = object({
19417
+ started: boolean(),
19418
+ /** True when a pass was already running; the new request is ignored. */
19419
+ alreadyRunning: boolean()
19420
+ });
19421
+ var MediaReclaimInputSchema = object({
19422
+ mode: _enum(["report", "reclaim"]).default("report"),
19423
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
19424
+ deviceIds: array(number().int()).min(1).optional(),
19425
+ restart: boolean().optional(),
19426
+ pageSize: number().int().min(50).max(5e3).optional(),
19427
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
19428
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
19429
+ maxBytesPerRun: number().int().min(1).optional(),
19430
+ budgetMinutes: number().int().min(1).max(720).optional(),
19431
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
19432
+ graceMinutes: number().int().min(1).max(10080).optional()
19433
+ });
19434
+ var MediaReclaimStatusSchema = object({
19435
+ running: boolean(),
19436
+ mode: _enum(["report", "reclaim"]).nullable(),
19437
+ totalExamined: number(),
19438
+ totalEligible: number(),
19439
+ totalReclaimed: number(),
19440
+ totalBytesReclaimed: number(),
19441
+ totalRefused: number(),
19442
+ /** Device+scope windows finished in this pass. */
19443
+ devicesDone: number(),
19444
+ complete: boolean().nullable(),
19445
+ startedAtMs: number().nullable(),
19446
+ finishedAtMs: number().nullable(),
19447
+ error: string().nullable()
19448
+ });
19245
19449
  var ReplayFrameInputSchema = object({
19246
19450
  timestamp: number(),
19247
19451
  frame: PipelineRunResultBridge
@@ -19280,10 +19484,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19280
19484
  * stationary registry). Default false: the timeline lists passages,
19281
19485
  * not parking records (operator decision, 2026-08-15). */
19282
19486
  includeStationary: boolean().optional()
19283
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
19284
- deviceId: number(),
19285
- groupId: string().min(1)
19286
- }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19487
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19287
19488
  kind: "mutation",
19288
19489
  auth: "admin"
19289
19490
  }), method(DeviceEventQueryInput, array(MotionEventSchema).readonly()), method(ObjectEventQueryInput, array(ObjectEventSchema).readonly()), method(DeviceEventQueryInput, array(AudioEventSchema).readonly()), method(object({ deviceId: number() }), array(EventKindDescriptorSchema).readonly()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(EventKindsForDeviceSchema).readonly()), method(object({
@@ -19292,7 +19493,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19292
19493
  until: number().optional(),
19293
19494
  kinds: array(string()).optional(),
19294
19495
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19295
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19496
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19296
19497
  deviceId: number(),
19297
19498
  since: number(),
19298
19499
  until: number(),
@@ -19383,6 +19584,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19383
19584
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19384
19585
  kind: "query",
19385
19586
  auth: "admin"
19587
+ }), method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
19588
+ kind: "mutation",
19589
+ auth: "admin"
19590
+ }), method(object({}), MediaReclaimStatusSchema, {
19591
+ kind: "query",
19592
+ auth: "admin"
19386
19593
  }), method(object({ deviceIds: array(number()).optional() }), TrainingExportSummarySchema, {
19387
19594
  kind: "query",
19388
19595
  auth: "admin"
@@ -21353,7 +21560,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21353
21560
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21354
21561
  kind: "mutation",
21355
21562
  auth: "admin"
21356
- });
21563
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
21564
+ kind: "mutation",
21565
+ auth: "admin"
21566
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21567
+ kind: "mutation",
21568
+ auth: "admin"
21569
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21357
21570
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21358
21571
  providerId: string().min(1),
21359
21572
  displayName: string().min(1),
@@ -28446,6 +28659,33 @@ var RecordingRebalanceInputSchema = object({
28446
28659
  minMoveGb: number().min(0).optional()
28447
28660
  });
28448
28661
  /**
28662
+ * Operator-facing placement of one camera onto a recordings location.
28663
+ *
28664
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
28665
+ * Auto (the planner may move this camera). `locationId` is where high/mid
28666
+ * currently write — the plan, which may disagree with the pin when Auto.
28667
+ */
28668
+ var RecordingDevicePlacementSchema = object({
28669
+ deviceId: number().int(),
28670
+ profile: string(),
28671
+ locationId: string()
28672
+ });
28673
+ var RecordingDevicePinSchema = object({
28674
+ deviceId: number().int(),
28675
+ /** Recordings-class location this camera is pinned to. */
28676
+ locationId: string()
28677
+ });
28678
+ var RecordingPlacementViewSchema = object({
28679
+ assignments: array(RecordingDevicePlacementSchema),
28680
+ pins: array(RecordingDevicePinSchema),
28681
+ defaultLocations: record(string(), string())
28682
+ });
28683
+ var RecordingSetDevicePlacementInputSchema = object({
28684
+ deviceId: number().int(),
28685
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
28686
+ locationId: string().nullable()
28687
+ });
28688
+ /**
28449
28689
  * Result of locating footage at a wall-clock instant for one device/profile.
28450
28690
  * `segment` carries the covering segment's window; `gap` reports the forward
28451
28691
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -28659,6 +28899,9 @@ method(object({
28659
28899
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
28660
28900
  kind: "query",
28661
28901
  auth: "admin"
28902
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
28903
+ kind: "mutation",
28904
+ auth: "admin"
28662
28905
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
28663
28906
  kind: "mutation",
28664
28907
  auth: "admin"
@@ -28668,6 +28911,12 @@ method(object({
28668
28911
  }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
28669
28912
  kind: "mutation",
28670
28913
  auth: "admin"
28914
+ }), method(object({}), RecordingPlacementViewSchema, {
28915
+ kind: "query",
28916
+ auth: "admin"
28917
+ }), method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
28918
+ kind: "mutation",
28919
+ auth: "admin"
28671
28920
  });
28672
28921
  /**
28673
28922
  * `recording-export` cap — render a footage time range into a single downloadable
@@ -29050,6 +29299,25 @@ var SceneMonitorStatusSchema = object({
29050
29299
  monitors: array(SceneMonitorSchema),
29051
29300
  lastFetchedAt: number()
29052
29301
  });
29302
+ /**
29303
+ * One camera's row in a `listScenesBatch` answer.
29304
+ *
29305
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
29306
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
29307
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
29308
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
29309
+ * configured. Fanned out per camera the difference was visible — one query
29310
+ * errored while the others resolved — and a batch that returned only the rows
29311
+ * it managed would have destroyed it, silently, by making an unreachable camera
29312
+ * indistinguishable from one that answered `monitors: []`.
29313
+ *
29314
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
29315
+ * could not be read"; `status.monitors: []` means "read, and it has none".
29316
+ */
29317
+ var SceneMonitorStatusForDeviceSchema = object({
29318
+ deviceId: number(),
29319
+ status: SceneMonitorStatusSchema.nullable()
29320
+ });
29053
29321
  var sceneMonitorCapability = {
29054
29322
  name: "scene-monitor",
29055
29323
  scope: "device",
@@ -29059,6 +29327,22 @@ var sceneMonitorCapability = {
29059
29327
  deviceTypes: [DeviceType.Camera],
29060
29328
  methods: {
29061
29329
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
29330
+ /**
29331
+ * The same answer, for a SET of cameras, in one round trip.
29332
+ *
29333
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
29334
+ * poll behind the push slice. Fanned out client-side that was one query
29335
+ * per camera — 29 round trips through the browser, the hub and the
29336
+ * post-analysis runner every 30 seconds to read an in-memory map the
29337
+ * owner had already merged. The work is unchanged (`statusFor` per
29338
+ * device, all in-process at the owner); what collapses is the transport.
29339
+ *
29340
+ * A camera that cannot answer still gets a row, with `status: null` —
29341
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
29342
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
29343
+ * tell which two are missing, or that any are.
29344
+ */
29345
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
29062
29346
  createScene: method(object({
29063
29347
  deviceId: number(),
29064
29348
  label: string(),
@@ -30894,6 +31178,27 @@ var CameraOccupancySnapshotSchema = object({
30894
31178
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
30895
31179
  });
30896
31180
  /**
31181
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
31182
+ *
31183
+ * THREE outcomes, and the single-camera method could only express two of them
31184
+ * because `snapshot: null` was already spoken for:
31185
+ *
31186
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
31187
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
31188
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
31189
+ * - `read: 'unreadable'` — the owner could not answer for this
31190
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
31191
+ *
31192
+ * Collapsing the last two is the failure this field exists to prevent: a
31193
+ * hydration that threw would otherwise render as an empty Stationary section,
31194
+ * which is a definite claim about a camera nobody could read.
31195
+ */
31196
+ var CameraOccupancySnapshotForDeviceSchema = object({
31197
+ deviceId: number(),
31198
+ read: _enum(["read", "unreadable"]),
31199
+ snapshot: CameraOccupancySnapshotSchema.nullable()
31200
+ });
31201
+ /**
30897
31202
  * Time-series resolution. The history methods return one bucket per
30898
31203
  * step over the requested range. Smaller resolutions cost more
30899
31204
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -30950,6 +31255,20 @@ var zoneAnalyticsCapability = {
30950
31255
  * (no inference result emitted since boot or since binding was
30951
31256
  * activated). */
30952
31257
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
31258
+ /**
31259
+ * The same snapshot, for a SET of cameras, in one round trip.
31260
+ *
31261
+ * The Events page's Stationary section polls this every 15s for every
31262
+ * selected camera. Fanned out client-side that is one query per camera to
31263
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
31264
+ * costs everything. Batched, N transports become one and the per-device
31265
+ * work is unchanged.
31266
+ *
31267
+ * Every requested deviceId gets a row, tagged `read` — see
31268
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
31269
+ * not answer for is `'unreadable'`, never an empty reading.
31270
+ */
31271
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
30953
31272
  /** Time-series object count inside one zone. `className` optional —
30954
31273
  * omit to count every class in the zone. */
30955
31274
  getZoneHistory: method(object({
@@ -33667,6 +33986,12 @@ Object.freeze({
33667
33986
  addonId: null,
33668
33987
  access: "delete"
33669
33988
  },
33989
+ "deviceManager.renameLocation": {
33990
+ capName: "device-manager",
33991
+ capScope: "system",
33992
+ addonId: null,
33993
+ access: "create"
33994
+ },
33670
33995
  "deviceManager.runDeviceAction": {
33671
33996
  capName: "device-manager",
33672
33997
  capScope: "system",
@@ -35359,13 +35684,19 @@ Object.freeze({
35359
35684
  addonId: null,
35360
35685
  access: "view"
35361
35686
  },
35362
- "pipelineAnalytics.getGroup": {
35687
+ "pipelineAnalytics.getKeyEvents": {
35363
35688
  capName: "pipeline-analytics",
35364
35689
  capScope: "device",
35365
35690
  addonId: null,
35366
35691
  access: "view"
35367
35692
  },
35368
- "pipelineAnalytics.getKeyEvents": {
35693
+ "pipelineAnalytics.getKeyEventsBatch": {
35694
+ capName: "pipeline-analytics",
35695
+ capScope: "device",
35696
+ addonId: null,
35697
+ access: "view"
35698
+ },
35699
+ "pipelineAnalytics.getMediaReclaimStatus": {
35369
35700
  capName: "pipeline-analytics",
35370
35701
  capScope: "device",
35371
35702
  addonId: null,
@@ -35455,12 +35786,6 @@ Object.freeze({
35455
35786
  addonId: null,
35456
35787
  access: "view"
35457
35788
  },
35458
- "pipelineAnalytics.listGroups": {
35459
- capName: "pipeline-analytics",
35460
- capScope: "device",
35461
- addonId: null,
35462
- access: "view"
35463
- },
35464
35789
  "pipelineAnalytics.listOpsLog": {
35465
35790
  capName: "pipeline-analytics",
35466
35791
  capScope: "device",
@@ -35545,6 +35870,12 @@ Object.freeze({
35545
35870
  addonId: null,
35546
35871
  access: "create"
35547
35872
  },
35873
+ "pipelineAnalytics.reclaimDebugMedia": {
35874
+ capName: "pipeline-analytics",
35875
+ capScope: "device",
35876
+ addonId: null,
35877
+ access: "create"
35878
+ },
35548
35879
  "pipelineAnalytics.reconcileFromDisk": {
35549
35880
  capName: "pipeline-analytics",
35550
35881
  capScope: "device",
@@ -36469,6 +36800,12 @@ Object.freeze({
36469
36800
  addonId: null,
36470
36801
  access: "view"
36471
36802
  },
36803
+ "recording.getPlacement": {
36804
+ capName: "recording",
36805
+ capScope: "system",
36806
+ addonId: null,
36807
+ access: "view"
36808
+ },
36472
36809
  "recording.getPlaybackManifest": {
36473
36810
  capName: "recording",
36474
36811
  capScope: "system",
@@ -36547,6 +36884,12 @@ Object.freeze({
36547
36884
  addonId: null,
36548
36885
  access: "view"
36549
36886
  },
36887
+ "recording.reconcileLedgerAgainstDisk": {
36888
+ capName: "recording",
36889
+ capScope: "system",
36890
+ addonId: null,
36891
+ access: "create"
36892
+ },
36550
36893
  "recording.refreshStorageLocationsForMigration": {
36551
36894
  capName: "recording",
36552
36895
  capScope: "system",
@@ -36589,6 +36932,12 @@ Object.freeze({
36589
36932
  addonId: null,
36590
36933
  access: "create"
36591
36934
  },
36935
+ "recording.setDevicePlacement": {
36936
+ capName: "recording",
36937
+ capScope: "system",
36938
+ addonId: null,
36939
+ access: "create"
36940
+ },
36592
36941
  "recording.startStorageMigrationMove": {
36593
36942
  capName: "recording",
36594
36943
  capScope: "system",
@@ -36673,6 +37022,12 @@ Object.freeze({
36673
37022
  addonId: null,
36674
37023
  access: "view"
36675
37024
  },
37025
+ "sceneMonitor.listScenesBatch": {
37026
+ capName: "scene-monitor",
37027
+ capScope: "device",
37028
+ addonId: null,
37029
+ access: "view"
37030
+ },
36676
37031
  "sceneMonitor.recheckNow": {
36677
37032
  capName: "scene-monitor",
36678
37033
  capScope: "device",
@@ -37027,12 +37382,36 @@ Object.freeze({
37027
37382
  addonId: null,
37028
37383
  access: "create"
37029
37384
  },
37385
+ "storageMigration.cleanupCancel": {
37386
+ capName: "storage-migration",
37387
+ capScope: "system",
37388
+ addonId: null,
37389
+ access: "create"
37390
+ },
37391
+ "storageMigration.cleanupStart": {
37392
+ capName: "storage-migration",
37393
+ capScope: "system",
37394
+ addonId: null,
37395
+ access: "create"
37396
+ },
37397
+ "storageMigration.cleanupStatus": {
37398
+ capName: "storage-migration",
37399
+ capScope: "system",
37400
+ addonId: null,
37401
+ access: "view"
37402
+ },
37030
37403
  "storageMigration.drain": {
37031
37404
  capName: "storage-migration",
37032
37405
  capScope: "system",
37033
37406
  addonId: null,
37034
37407
  access: "create"
37035
37408
  },
37409
+ "storageMigration.history": {
37410
+ capName: "storage-migration",
37411
+ capScope: "system",
37412
+ addonId: null,
37413
+ access: "view"
37414
+ },
37036
37415
  "storageMigration.movers": {
37037
37416
  capName: "storage-migration",
37038
37417
  capScope: "system",
@@ -38029,6 +38408,12 @@ Object.freeze({
38029
38408
  addonId: null,
38030
38409
  access: "view"
38031
38410
  },
38411
+ "zoneAnalytics.getCurrentSnapshotBatch": {
38412
+ capName: "zone-analytics",
38413
+ capScope: "device",
38414
+ addonId: null,
38415
+ access: "view"
38416
+ },
38032
38417
  "zoneAnalytics.getUnzonedHistory": {
38033
38418
  capName: "zone-analytics",
38034
38419
  capScope: "device",
@@ -39023,14 +39408,14 @@ Object.freeze({
39023
39408
  form: "single",
39024
39409
  optional: true
39025
39410
  }],
39026
- "pipelineAnalytics.getGroup": [{
39411
+ "pipelineAnalytics.getKeyEvents": [{
39027
39412
  name: "deviceId",
39028
39413
  form: "single",
39029
39414
  optional: false
39030
39415
  }],
39031
- "pipelineAnalytics.getKeyEvents": [{
39032
- name: "deviceId",
39033
- form: "single",
39416
+ "pipelineAnalytics.getKeyEventsBatch": [{
39417
+ name: "deviceIds",
39418
+ form: "array",
39034
39419
  optional: false
39035
39420
  }],
39036
39421
  "pipelineAnalytics.getMotionEvents": [{
@@ -39088,11 +39473,6 @@ Object.freeze({
39088
39473
  form: "single",
39089
39474
  optional: false
39090
39475
  }],
39091
- "pipelineAnalytics.listGroups": [{
39092
- name: "deviceIds",
39093
- form: "array",
39094
- optional: false
39095
- }],
39096
39476
  "pipelineAnalytics.listOpsLog": [{
39097
39477
  name: "deviceId",
39098
39478
  form: "single",
@@ -39138,6 +39518,11 @@ Object.freeze({
39138
39518
  form: "single",
39139
39519
  optional: true
39140
39520
  }],
39521
+ "pipelineAnalytics.reclaimDebugMedia": [{
39522
+ name: "deviceIds",
39523
+ form: "array",
39524
+ optional: true
39525
+ }],
39141
39526
  "pipelineAnalytics.reconcileFromDisk": [{
39142
39527
  name: "deviceId",
39143
39528
  form: "single",
@@ -39473,6 +39858,11 @@ Object.freeze({
39473
39858
  form: "single",
39474
39859
  optional: false
39475
39860
  }],
39861
+ "recording.reconcileLedgerAgainstDisk": [{
39862
+ name: "deviceId",
39863
+ form: "single",
39864
+ optional: true
39865
+ }],
39476
39866
  "recording.relocateFootage": [{
39477
39867
  name: "deviceId",
39478
39868
  form: "single",
@@ -39498,6 +39888,11 @@ Object.freeze({
39498
39888
  form: "single",
39499
39889
  optional: false
39500
39890
  }],
39891
+ "recording.setDevicePlacement": [{
39892
+ name: "deviceId",
39893
+ form: "single",
39894
+ optional: false
39895
+ }],
39501
39896
  "recording.startStorageMigrationMove": [{
39502
39897
  name: "deviceId",
39503
39898
  form: "single",
@@ -39538,6 +39933,11 @@ Object.freeze({
39538
39933
  form: "single",
39539
39934
  optional: false
39540
39935
  }],
39936
+ "sceneMonitor.listScenesBatch": [{
39937
+ name: "deviceIds",
39938
+ form: "array",
39939
+ optional: false
39940
+ }],
39541
39941
  "sceneMonitor.recheckNow": [{
39542
39942
  name: "deviceId",
39543
39943
  form: "single",
@@ -39799,6 +40199,11 @@ Object.freeze({
39799
40199
  form: "single",
39800
40200
  optional: false
39801
40201
  }],
40202
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
40203
+ name: "deviceIds",
40204
+ form: "array",
40205
+ optional: false
40206
+ }],
39802
40207
  "zoneAnalytics.getUnzonedHistory": [{
39803
40208
  name: "deviceId",
39804
40209
  form: "single",