@camstack/addon-export-alexa 1.2.54 → 1.2.56

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.
@@ -8186,6 +8186,20 @@ var RelocateJobSchema = object({
8186
8186
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8187
8187
  */
8188
8188
  rowsReconciled: number().int().nonnegative().optional(),
8189
+ /**
8190
+ * Rows this run FORGOT because the file they name is not on disk.
8191
+ *
8192
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8193
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8194
+ * and the durable row is dropped through the same channel eviction uses. It
8195
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8196
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8197
+ * the same failure as one that quietly skips them (D295).
8198
+ *
8199
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8200
+ * ledger claimed 5.65 GB of footage that no longer existed.
8201
+ */
8202
+ rowsForgotten: number().int().nonnegative().optional(),
8189
8203
  startedAt: number(),
8190
8204
  finishedAt: number().nullable(),
8191
8205
  error: string().nullable()
@@ -8250,6 +8264,13 @@ var MediaRelocateModeSchema = _enum([
8250
8264
  ]);
8251
8265
  var RelocateMediaInputSchema = object({
8252
8266
  toLocationId: string(),
8267
+ /**
8268
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8269
+ * every row that is not already on `toLocationId` (the historical
8270
+ * behaviour). A named source is what a from→to migration needs: without it
8271
+ * "move events off disk 2" also emptied disk 1.
8272
+ */
8273
+ fromLocationId: string().optional(),
8253
8274
  throttleMbps: number().min(1).max(1e3).optional(),
8254
8275
  /** Omitted = `move`, the pre-existing behaviour. */
8255
8276
  mode: MediaRelocateModeSchema.optional()
@@ -8317,6 +8338,19 @@ var StorageMigrationDestinationsSchema = object({
8317
8338
  galleryMedia: string().min(1).optional()
8318
8339
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8319
8340
  /**
8341
+ * Optional named source per class. Omitted = the class's current default
8342
+ * (the historical behaviour). A named source that is NOT the default is a
8343
+ * drain of that disk: bytes move, the default stays, and the source is
8344
+ * disabled when the move finishes.
8345
+ */
8346
+ var StorageMigrationSourcesSchema = object({
8347
+ recordings: string().min(1).optional(),
8348
+ recordingsLow: string().min(1).optional(),
8349
+ eventMedia: string().min(1).optional(),
8350
+ backups: string().min(1).optional(),
8351
+ galleryMedia: string().min(1).optional()
8352
+ }).optional();
8353
+ /**
8320
8354
  * How a migration sequences the cutover against the byte move.
8321
8355
  *
8322
8356
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8338,6 +8372,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8338
8372
  /** Shared input for planning and starting an orchestrated storage migration. */
8339
8373
  var StorageMigrationInputSchema = object({
8340
8374
  destinations: StorageMigrationDestinationsSchema,
8375
+ /** Omitted = each class's current default. */
8376
+ sources: StorageMigrationSourcesSchema,
8341
8377
  throttleMbps: number().min(1).max(1e3).optional(),
8342
8378
  /** Omitted = `blocking`, which stays the default. */
8343
8379
  mode: StorageMigrationModeSchema.optional()
@@ -8417,6 +8453,13 @@ var StorageMigrationMoveSchema = object({
8417
8453
  storageClass: StorageMigrationClassSchema,
8418
8454
  fromLocationId: string(),
8419
8455
  toLocationId: string(),
8456
+ /**
8457
+ * True when `from` was NOT the class default at plan time. The move still
8458
+ * copies bytes, but the default is left alone and the source is disabled
8459
+ * once the copy verifies. Absent on jobs planned before this field existed
8460
+ * — those jobs always repointed, which is `false`.
8461
+ */
8462
+ freezeSource: boolean().optional(),
8420
8463
  moverJobId: string().nullable(),
8421
8464
  state: RelocateJobStateSchema.nullable(),
8422
8465
  error: string().nullable(),
@@ -8430,6 +8473,7 @@ var StorageMigrationJobSchema = object({
8430
8473
  * can tell a seconds-long cutover from a thirty-hour one. */
8431
8474
  mode: StorageMigrationModeSchema,
8432
8475
  destinations: StorageMigrationDestinationsSchema,
8476
+ sources: StorageMigrationSourcesSchema,
8433
8477
  throttleMbps: number(),
8434
8478
  moves: array(StorageMigrationMoveSchema),
8435
8479
  pauseLeaseId: string().nullable(),
@@ -8455,6 +8499,7 @@ var StorageMigrationFindingSchema = object({
8455
8499
  });
8456
8500
  var StorageMigrationPlanSchema = object({
8457
8501
  destinations: StorageMigrationDestinationsSchema,
8502
+ sources: StorageMigrationSourcesSchema,
8458
8503
  /** The mode this plan was built for. A plan is only valid for its mode: the
8459
8504
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8460
8505
  * it. */
@@ -8462,7 +8507,8 @@ var StorageMigrationPlanSchema = object({
8462
8507
  moves: array(object({
8463
8508
  storageClass: StorageMigrationClassSchema,
8464
8509
  fromLocationId: string(),
8465
- toLocationId: string()
8510
+ toLocationId: string(),
8511
+ freezeSource: boolean().optional()
8466
8512
  })),
8467
8513
  findings: array(StorageMigrationFindingSchema)
8468
8514
  });
@@ -8549,16 +8595,142 @@ var RelocateResidueSchema = object({
8549
8595
  segments: number().int().nonnegative(),
8550
8596
  bytes: number().int().nonnegative()
8551
8597
  }).nullable();
8598
+ /**
8599
+ * Ask one location whether its durable hour rows describe the disk — the walk
8600
+ * (D319).
8601
+ *
8602
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8603
+ * missing tool is the question, and the dry run is how they sanity-check the
8604
+ * destructive run before authorising it.
8605
+ */
8606
+ var LedgerWalkInputSchema = object({
8607
+ locationId: string().min(1),
8608
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8609
+ apply: boolean().optional(),
8610
+ /** Narrow to one camera. */
8611
+ deviceId: number().int().positive().optional(),
8612
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8613
+ profiles: array(string().min(1)).optional()
8614
+ });
8615
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8616
+ var LedgerWalkRefusalSchema = _enum([
8617
+ "location-unknown",
8618
+ "source-writable",
8619
+ "no-ledger",
8620
+ "archive-unreadable",
8621
+ "anchor-absent",
8622
+ "anchor-unreadable",
8623
+ "anchor-moved"
8624
+ ]);
8625
+ _enum([
8626
+ "live-tail",
8627
+ "listing-error",
8628
+ "path-mismatch",
8629
+ "durable-refused"
8630
+ ]);
8631
+ /** Every skip reason, always present, always a number — so a reason that never
8632
+ * fired reports as zero rather than absent and the report shape is constant
8633
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8634
+ var LedgerWalkSkipCountsSchema = object({
8635
+ "live-tail": number().int().nonnegative(),
8636
+ "listing-error": number().int().nonnegative(),
8637
+ "path-mismatch": number().int().nonnegative(),
8638
+ "durable-refused": number().int().nonnegative()
8639
+ });
8640
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8641
+ var LedgerWalkDeviceReportSchema = object({
8642
+ deviceId: number().int(),
8643
+ hoursWalked: number().int().nonnegative(),
8644
+ hoursMissing: number().int().nonnegative(),
8645
+ ghostSegments: number().int().nonnegative(),
8646
+ ghostBytes: number().int().nonnegative(),
8647
+ forgottenSegments: number().int().nonnegative(),
8648
+ orphanFiles: number().int().nonnegative()
8649
+ });
8650
+ /**
8651
+ * What one walk claimed, listed, found and (only when armed) forgot.
8652
+ *
8653
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8654
+ * walk that saw a fraction of the location is visible in its own report rather
8655
+ * than in the absence of one.
8656
+ */
8657
+ var LedgerWalkReportSchema = object({
8658
+ locationId: string(),
8659
+ applied: boolean(),
8660
+ refused: LedgerWalkRefusalSchema.nullable(),
8661
+ archiveSegments: number().int().nonnegative().nullable(),
8662
+ archiveBytes: number().int().nonnegative().nullable(),
8663
+ hoursClaimed: number().int().nonnegative(),
8664
+ hoursWalked: number().int().nonnegative(),
8665
+ hoursMissing: number().int().nonnegative(),
8666
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8667
+ listings: number().int().nonnegative(),
8668
+ segmentsClaimed: number().int().nonnegative(),
8669
+ ghostSegments: number().int().nonnegative(),
8670
+ ghostBytes: number().int().nonnegative(),
8671
+ ghostHoursWhole: number().int().nonnegative(),
8672
+ forgottenSegments: number().int().nonnegative(),
8673
+ forgottenBytes: number().int().nonnegative(),
8674
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8675
+ orphanFiles: number().int().nonnegative(),
8676
+ orphanSample: array(string()).readonly(),
8677
+ hoursSkipped: number().int().nonnegative(),
8678
+ skippedByReason: LedgerWalkSkipCountsSchema,
8679
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8680
+ bounded: boolean(),
8681
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8682
+ });
8552
8683
  /** How many rows a media pass would still act on against a given target — the
8553
8684
  * media lane's denominator AND its residue, from ONE derivation so the two can
8554
8685
  * never disagree. `null` = the count could not be taken. */
8555
8686
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8556
8687
  var RelocatableMediaCountInputSchema = object({
8557
8688
  toLocationId: string().min(1),
8689
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8690
+ fromLocationId: string().optional(),
8558
8691
  /** Omitted = `move`. */
8559
8692
  mode: MediaRelocateModeSchema.optional()
8560
8693
  });
8561
8694
  /**
8695
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8696
+ * ghost ledger entries on frozen footage locations.
8697
+ *
8698
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8699
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8700
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8701
+ * with no operator-visible status.
8702
+ */
8703
+ var StorageCleanupPhaseSchema = _enum([
8704
+ "orphans",
8705
+ "debug-media",
8706
+ "ghost-ledger",
8707
+ "done",
8708
+ "failed",
8709
+ "cancelled"
8710
+ ]);
8711
+ var StorageCleanupInputSchema = object({
8712
+ /** Also walk motion stills / track filmstrips. Off by default. */
8713
+ includeDebugMedia: boolean().optional() });
8714
+ var StorageCleanupJobSchema = object({
8715
+ jobId: string(),
8716
+ phase: StorageCleanupPhaseSchema,
8717
+ includeDebugMedia: boolean(),
8718
+ orphansReclaimed: number().int().nonnegative(),
8719
+ orphanBytesReclaimed: number().int().nonnegative(),
8720
+ debugMediaReclaimed: number().int().nonnegative(),
8721
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8722
+ ghostsForgotten: number().int().nonnegative(),
8723
+ ghostBytesForgotten: number().int().nonnegative(),
8724
+ /** Short operator-facing line: current collection, pass, or location. */
8725
+ detail: string().nullable(),
8726
+ cancelRequested: boolean(),
8727
+ startedAt: number(),
8728
+ updatedAt: number(),
8729
+ finishedAt: number().nullable(),
8730
+ error: string().nullable()
8731
+ });
8732
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8733
+ /**
8562
8734
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8563
8735
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8564
8736
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8586,11 +8758,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8586
8758
  * The default location for a type uses `id === <type>:default` by
8587
8759
  * convention (the bare type ref like `'backups'` resolves to it).
8588
8760
  *
8589
- * `isSystem: true` marks a location as orchestrator-seeded and
8590
- * undeletable. The bootstrap-installed defaults (one per type) carry
8591
- * this flag; operator-added locations don't. Editing the config of
8592
- * a system location is allowed (path migration, provider swap) but
8593
- * deleting it is rejected at the cap level.
8761
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8762
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8763
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8764
+ * / last-enabled, not on this bit.
8594
8765
  */
8595
8766
  var StorageLocationSchema = object({
8596
8767
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -12979,6 +13150,12 @@ method(object({
12979
13150
  }), _void(), {
12980
13151
  kind: "mutation",
12981
13152
  auth: "admin"
13153
+ }), method(object({
13154
+ from: string(),
13155
+ to: string()
13156
+ }), object({ moved: number() }), {
13157
+ kind: "mutation",
13158
+ auth: "admin"
12982
13159
  }), method(object({
12983
13160
  deviceId: number(),
12984
13161
  disabled: boolean()
@@ -18925,53 +19102,15 @@ var RecentTracksPageSchema = object({
18925
19102
  /** Cursor for the next page, or null when this page is the last. */
18926
19103
  nextCursor: string().nullable()
18927
19104
  });
18928
- var LIST_GROUPS_DEFAULT_LIMIT = 40;
18929
- var LIST_GROUPS_MAX_LIMIT = 100;
18930
- var AnalyticsGroupRecordSchema = object({
18931
- id: string(),
18932
- deviceId: number().int(),
18933
- openedAt: number().int(),
18934
- closedAt: number().int(),
18935
- timestamp: number().int(),
18936
- memberCount: number().int(),
18937
- memberTrackIds: array(string()).readonly(),
18938
- className: string(),
18939
- classes: array(string()).readonly(),
18940
- /** Relative event-media path, or null when the group has no picture yet. */
18941
- mediaUrl: string().nullable(),
18942
- singleton: boolean()
18943
- });
18944
- var AnalyticsGroupMemberSchema = object({
18945
- trackId: string(),
18946
- deviceId: number().int(),
18947
- className: string(),
18948
- firstSeen: number().int(),
18949
- lastSeen: number().int(),
18950
- mediaUrl: string().nullable()
18951
- });
18952
- var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
18953
- var ListGroupsQueryInput = object({
18954
- /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
18955
- deviceIds: array(number()),
18956
- /** Window lower bound on `closedAt` (inclusive). */
18957
- since: number().optional(),
18958
- /** Window upper bound on `openedAt` (inclusive). */
18959
- until: number().optional(),
18960
- limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
18961
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
18962
- cursor: string().optional()
18963
- });
18964
- var ListGroupsPageSchema = object({
18965
- groups: array(AnalyticsGroupRecordSchema).readonly(),
18966
- nextCursor: string().nullable()
18967
- });
19105
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
19106
+ var KEY_EVENTS_MAX_LIMIT = 200;
18968
19107
  var KeyEventQueryInput = object({
18969
19108
  deviceId: number(),
18970
19109
  /** Window lower bound (track firstSeen ≥ since). */
18971
19110
  since: number(),
18972
19111
  /** Window upper bound (track firstSeen ≤ until). */
18973
19112
  until: number(),
18974
- limit: number().int().min(1).max(200).default(50),
19113
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18975
19114
  /** Drop tracks scoring below this importance. */
18976
19115
  minImportance: number().min(0).max(1).optional(),
18977
19116
  /** Restrict to a single class (e.g. 'person'). */
@@ -18993,6 +19132,32 @@ var KeyEventSchema = object({
18993
19132
  ...TrackFlagFields,
18994
19133
  ...TrackRetrainFields
18995
19134
  });
19135
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
19136
+ var KeyEventBatchQueryInput = object({
19137
+ deviceIds: array(number()).min(1).max(200),
19138
+ since: number(),
19139
+ until: number(),
19140
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
19141
+ * across the set, which would let a busy camera starve a quiet one of its
19142
+ * rows and change what the merged feed contains. */
19143
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
19144
+ minImportance: number().min(0).max(1).optional(),
19145
+ classFilter: string().optional()
19146
+ });
19147
+ /**
19148
+ * One camera's key events in a batch answer.
19149
+ *
19150
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19151
+ * error rather than throwing, so a camera whose store read failed and one with
19152
+ * no events in the window were ALREADY indistinguishable per camera — the
19153
+ * batch does not make that worse, and the row keeps the deviceId the single
19154
+ * method's output never carried (the caller used to stamp it from the fan-out
19155
+ * key, which only worked because there was one query per camera).
19156
+ */
19157
+ var KeyEventsForDeviceSchema = object({
19158
+ deviceId: number(),
19159
+ events: array(KeyEventSchema).readonly()
19160
+ });
18996
19161
  object({
18997
19162
  trackId: string(),
18998
19163
  className: string(),
@@ -19040,9 +19205,7 @@ var TrackCascadeCountsSchema = object({
19040
19205
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
19041
19206
  plates: number().int(),
19042
19207
  /** Per-track CLIP search vectors removed (best-effort). */
19043
- embeddings: number().int(),
19044
- /** Group membership + group rows removed with their last member (best-effort). */
19045
- groups: number().int()
19208
+ embeddings: number().int()
19046
19209
  });
19047
19210
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
19048
19211
  var DiskReconcileCountsSchema = object({
@@ -19212,6 +19375,47 @@ var RebuildStatusSchema = object({
19212
19375
  /** Present when the pass ended by throwing. */
19213
19376
  error: string().nullable()
19214
19377
  });
19378
+ /**
19379
+ * Acknowledgement that a debug-media reclaim STARTED.
19380
+ *
19381
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
19382
+ * it runs detached and this returns immediately. Awaiting it is how the
19383
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
19384
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
19385
+ */
19386
+ var MediaReclaimStartResultSchema = object({
19387
+ started: boolean(),
19388
+ /** True when a pass was already running; the new request is ignored. */
19389
+ alreadyRunning: boolean()
19390
+ });
19391
+ var MediaReclaimInputSchema = object({
19392
+ mode: _enum(["report", "reclaim"]).default("report"),
19393
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
19394
+ deviceIds: array(number().int()).min(1).optional(),
19395
+ restart: boolean().optional(),
19396
+ pageSize: number().int().min(50).max(5e3).optional(),
19397
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
19398
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
19399
+ maxBytesPerRun: number().int().min(1).optional(),
19400
+ budgetMinutes: number().int().min(1).max(720).optional(),
19401
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
19402
+ graceMinutes: number().int().min(1).max(10080).optional()
19403
+ });
19404
+ var MediaReclaimStatusSchema = object({
19405
+ running: boolean(),
19406
+ mode: _enum(["report", "reclaim"]).nullable(),
19407
+ totalExamined: number(),
19408
+ totalEligible: number(),
19409
+ totalReclaimed: number(),
19410
+ totalBytesReclaimed: number(),
19411
+ totalRefused: number(),
19412
+ /** Device+scope windows finished in this pass. */
19413
+ devicesDone: number(),
19414
+ complete: boolean().nullable(),
19415
+ startedAtMs: number().nullable(),
19416
+ finishedAtMs: number().nullable(),
19417
+ error: string().nullable()
19418
+ });
19215
19419
  var ReplayFrameInputSchema = object({
19216
19420
  timestamp: number(),
19217
19421
  frame: PipelineRunResultBridge
@@ -19250,10 +19454,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19250
19454
  * stationary registry). Default false: the timeline lists passages,
19251
19455
  * not parking records (operator decision, 2026-08-15). */
19252
19456
  includeStationary: boolean().optional()
19253
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
19254
- deviceId: number(),
19255
- groupId: string().min(1)
19256
- }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19457
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19257
19458
  kind: "mutation",
19258
19459
  auth: "admin"
19259
19460
  }), 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({
@@ -19262,7 +19463,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19262
19463
  until: number().optional(),
19263
19464
  kinds: array(string()).optional(),
19264
19465
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19265
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19466
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19266
19467
  deviceId: number(),
19267
19468
  since: number(),
19268
19469
  until: number(),
@@ -19353,6 +19554,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19353
19554
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19354
19555
  kind: "query",
19355
19556
  auth: "admin"
19557
+ }), method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
19558
+ kind: "mutation",
19559
+ auth: "admin"
19560
+ }), method(object({}), MediaReclaimStatusSchema, {
19561
+ kind: "query",
19562
+ auth: "admin"
19356
19563
  }), method(object({ deviceIds: array(number()).optional() }), TrainingExportSummarySchema, {
19357
19564
  kind: "query",
19358
19565
  auth: "admin"
@@ -21323,7 +21530,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21323
21530
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21324
21531
  kind: "mutation",
21325
21532
  auth: "admin"
21326
- });
21533
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
21534
+ kind: "mutation",
21535
+ auth: "admin"
21536
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21537
+ kind: "mutation",
21538
+ auth: "admin"
21539
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21327
21540
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21328
21541
  providerId: string().min(1),
21329
21542
  displayName: string().min(1),
@@ -26701,6 +26914,33 @@ var RecordingRebalanceInputSchema = object({
26701
26914
  minMoveGb: number().min(0).optional()
26702
26915
  });
26703
26916
  /**
26917
+ * Operator-facing placement of one camera onto a recordings location.
26918
+ *
26919
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
26920
+ * Auto (the planner may move this camera). `locationId` is where high/mid
26921
+ * currently write — the plan, which may disagree with the pin when Auto.
26922
+ */
26923
+ var RecordingDevicePlacementSchema = object({
26924
+ deviceId: number().int(),
26925
+ profile: string(),
26926
+ locationId: string()
26927
+ });
26928
+ var RecordingDevicePinSchema = object({
26929
+ deviceId: number().int(),
26930
+ /** Recordings-class location this camera is pinned to. */
26931
+ locationId: string()
26932
+ });
26933
+ var RecordingPlacementViewSchema = object({
26934
+ assignments: array(RecordingDevicePlacementSchema),
26935
+ pins: array(RecordingDevicePinSchema),
26936
+ defaultLocations: record(string(), string())
26937
+ });
26938
+ var RecordingSetDevicePlacementInputSchema = object({
26939
+ deviceId: number().int(),
26940
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
26941
+ locationId: string().nullable()
26942
+ });
26943
+ /**
26704
26944
  * Result of locating footage at a wall-clock instant for one device/profile.
26705
26945
  * `segment` carries the covering segment's window; `gap` reports the forward
26706
26946
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -26914,6 +27154,9 @@ method(object({
26914
27154
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26915
27155
  kind: "query",
26916
27156
  auth: "admin"
27157
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
27158
+ kind: "mutation",
27159
+ auth: "admin"
26917
27160
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26918
27161
  kind: "mutation",
26919
27162
  auth: "admin"
@@ -26923,6 +27166,12 @@ method(object({
26923
27166
  }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
26924
27167
  kind: "mutation",
26925
27168
  auth: "admin"
27169
+ }), method(object({}), RecordingPlacementViewSchema, {
27170
+ kind: "query",
27171
+ auth: "admin"
27172
+ }), method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
27173
+ kind: "mutation",
27174
+ auth: "admin"
26926
27175
  });
26927
27176
  /**
26928
27177
  * `recording-export` cap — render a footage time range into a single downloadable
@@ -27305,7 +27554,26 @@ var SceneMonitorStatusSchema = object({
27305
27554
  monitors: array(SceneMonitorSchema),
27306
27555
  lastFetchedAt: number()
27307
27556
  });
27308
- DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({
27557
+ /**
27558
+ * One camera's row in a `listScenesBatch` answer.
27559
+ *
27560
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
27561
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
27562
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
27563
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
27564
+ * configured. Fanned out per camera the difference was visible — one query
27565
+ * errored while the others resolved — and a batch that returned only the rows
27566
+ * it managed would have destroyed it, silently, by making an unreachable camera
27567
+ * indistinguishable from one that answered `monitors: []`.
27568
+ *
27569
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
27570
+ * could not be read"; `status.monitors: []` means "read, and it has none".
27571
+ */
27572
+ var SceneMonitorStatusForDeviceSchema = object({
27573
+ deviceId: number(),
27574
+ status: SceneMonitorStatusSchema.nullable()
27575
+ });
27576
+ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
27309
27577
  deviceId: number(),
27310
27578
  label: string(),
27311
27579
  roi: MaskRectShapeSchema,
@@ -28629,6 +28897,27 @@ var CameraOccupancySnapshotSchema = object({
28629
28897
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
28630
28898
  });
28631
28899
  /**
28900
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
28901
+ *
28902
+ * THREE outcomes, and the single-camera method could only express two of them
28903
+ * because `snapshot: null` was already spoken for:
28904
+ *
28905
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
28906
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
28907
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
28908
+ * - `read: 'unreadable'` — the owner could not answer for this
28909
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
28910
+ *
28911
+ * Collapsing the last two is the failure this field exists to prevent: a
28912
+ * hydration that threw would otherwise render as an empty Stationary section,
28913
+ * which is a definite claim about a camera nobody could read.
28914
+ */
28915
+ var CameraOccupancySnapshotForDeviceSchema = object({
28916
+ deviceId: number(),
28917
+ read: _enum(["read", "unreadable"]),
28918
+ snapshot: CameraOccupancySnapshotSchema.nullable()
28919
+ });
28920
+ /**
28632
28921
  * Time-series resolution. The history methods return one bucket per
28633
28922
  * step over the requested range. Smaller resolutions cost more
28634
28923
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -28652,7 +28941,7 @@ var HistoryPointSchema = object({
28652
28941
  /** Object count averaged over the bucket (rounded to nearest integer). */
28653
28942
  count: number().int().nonnegative()
28654
28943
  });
28655
- DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
28944
+ DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
28656
28945
  deviceId: number(),
28657
28946
  zoneId: string(),
28658
28947
  className: string().optional()
@@ -30253,6 +30542,12 @@ Object.freeze({
30253
30542
  addonId: null,
30254
30543
  access: "delete"
30255
30544
  },
30545
+ "deviceManager.renameLocation": {
30546
+ capName: "device-manager",
30547
+ capScope: "system",
30548
+ addonId: null,
30549
+ access: "create"
30550
+ },
30256
30551
  "deviceManager.runDeviceAction": {
30257
30552
  capName: "device-manager",
30258
30553
  capScope: "system",
@@ -31945,13 +32240,19 @@ Object.freeze({
31945
32240
  addonId: null,
31946
32241
  access: "view"
31947
32242
  },
31948
- "pipelineAnalytics.getGroup": {
32243
+ "pipelineAnalytics.getKeyEvents": {
31949
32244
  capName: "pipeline-analytics",
31950
32245
  capScope: "device",
31951
32246
  addonId: null,
31952
32247
  access: "view"
31953
32248
  },
31954
- "pipelineAnalytics.getKeyEvents": {
32249
+ "pipelineAnalytics.getKeyEventsBatch": {
32250
+ capName: "pipeline-analytics",
32251
+ capScope: "device",
32252
+ addonId: null,
32253
+ access: "view"
32254
+ },
32255
+ "pipelineAnalytics.getMediaReclaimStatus": {
31955
32256
  capName: "pipeline-analytics",
31956
32257
  capScope: "device",
31957
32258
  addonId: null,
@@ -32041,12 +32342,6 @@ Object.freeze({
32041
32342
  addonId: null,
32042
32343
  access: "view"
32043
32344
  },
32044
- "pipelineAnalytics.listGroups": {
32045
- capName: "pipeline-analytics",
32046
- capScope: "device",
32047
- addonId: null,
32048
- access: "view"
32049
- },
32050
32345
  "pipelineAnalytics.listOpsLog": {
32051
32346
  capName: "pipeline-analytics",
32052
32347
  capScope: "device",
@@ -32131,6 +32426,12 @@ Object.freeze({
32131
32426
  addonId: null,
32132
32427
  access: "create"
32133
32428
  },
32429
+ "pipelineAnalytics.reclaimDebugMedia": {
32430
+ capName: "pipeline-analytics",
32431
+ capScope: "device",
32432
+ addonId: null,
32433
+ access: "create"
32434
+ },
32134
32435
  "pipelineAnalytics.reconcileFromDisk": {
32135
32436
  capName: "pipeline-analytics",
32136
32437
  capScope: "device",
@@ -33055,6 +33356,12 @@ Object.freeze({
33055
33356
  addonId: null,
33056
33357
  access: "view"
33057
33358
  },
33359
+ "recording.getPlacement": {
33360
+ capName: "recording",
33361
+ capScope: "system",
33362
+ addonId: null,
33363
+ access: "view"
33364
+ },
33058
33365
  "recording.getPlaybackManifest": {
33059
33366
  capName: "recording",
33060
33367
  capScope: "system",
@@ -33133,6 +33440,12 @@ Object.freeze({
33133
33440
  addonId: null,
33134
33441
  access: "view"
33135
33442
  },
33443
+ "recording.reconcileLedgerAgainstDisk": {
33444
+ capName: "recording",
33445
+ capScope: "system",
33446
+ addonId: null,
33447
+ access: "create"
33448
+ },
33136
33449
  "recording.refreshStorageLocationsForMigration": {
33137
33450
  capName: "recording",
33138
33451
  capScope: "system",
@@ -33175,6 +33488,12 @@ Object.freeze({
33175
33488
  addonId: null,
33176
33489
  access: "create"
33177
33490
  },
33491
+ "recording.setDevicePlacement": {
33492
+ capName: "recording",
33493
+ capScope: "system",
33494
+ addonId: null,
33495
+ access: "create"
33496
+ },
33178
33497
  "recording.startStorageMigrationMove": {
33179
33498
  capName: "recording",
33180
33499
  capScope: "system",
@@ -33259,6 +33578,12 @@ Object.freeze({
33259
33578
  addonId: null,
33260
33579
  access: "view"
33261
33580
  },
33581
+ "sceneMonitor.listScenesBatch": {
33582
+ capName: "scene-monitor",
33583
+ capScope: "device",
33584
+ addonId: null,
33585
+ access: "view"
33586
+ },
33262
33587
  "sceneMonitor.recheckNow": {
33263
33588
  capName: "scene-monitor",
33264
33589
  capScope: "device",
@@ -33613,12 +33938,36 @@ Object.freeze({
33613
33938
  addonId: null,
33614
33939
  access: "create"
33615
33940
  },
33941
+ "storageMigration.cleanupCancel": {
33942
+ capName: "storage-migration",
33943
+ capScope: "system",
33944
+ addonId: null,
33945
+ access: "create"
33946
+ },
33947
+ "storageMigration.cleanupStart": {
33948
+ capName: "storage-migration",
33949
+ capScope: "system",
33950
+ addonId: null,
33951
+ access: "create"
33952
+ },
33953
+ "storageMigration.cleanupStatus": {
33954
+ capName: "storage-migration",
33955
+ capScope: "system",
33956
+ addonId: null,
33957
+ access: "view"
33958
+ },
33616
33959
  "storageMigration.drain": {
33617
33960
  capName: "storage-migration",
33618
33961
  capScope: "system",
33619
33962
  addonId: null,
33620
33963
  access: "create"
33621
33964
  },
33965
+ "storageMigration.history": {
33966
+ capName: "storage-migration",
33967
+ capScope: "system",
33968
+ addonId: null,
33969
+ access: "view"
33970
+ },
33622
33971
  "storageMigration.movers": {
33623
33972
  capName: "storage-migration",
33624
33973
  capScope: "system",
@@ -34615,6 +34964,12 @@ Object.freeze({
34615
34964
  addonId: null,
34616
34965
  access: "view"
34617
34966
  },
34967
+ "zoneAnalytics.getCurrentSnapshotBatch": {
34968
+ capName: "zone-analytics",
34969
+ capScope: "device",
34970
+ addonId: null,
34971
+ access: "view"
34972
+ },
34618
34973
  "zoneAnalytics.getUnzonedHistory": {
34619
34974
  capName: "zone-analytics",
34620
34975
  capScope: "device",
@@ -35609,14 +35964,14 @@ Object.freeze({
35609
35964
  form: "single",
35610
35965
  optional: true
35611
35966
  }],
35612
- "pipelineAnalytics.getGroup": [{
35967
+ "pipelineAnalytics.getKeyEvents": [{
35613
35968
  name: "deviceId",
35614
35969
  form: "single",
35615
35970
  optional: false
35616
35971
  }],
35617
- "pipelineAnalytics.getKeyEvents": [{
35618
- name: "deviceId",
35619
- form: "single",
35972
+ "pipelineAnalytics.getKeyEventsBatch": [{
35973
+ name: "deviceIds",
35974
+ form: "array",
35620
35975
  optional: false
35621
35976
  }],
35622
35977
  "pipelineAnalytics.getMotionEvents": [{
@@ -35674,11 +36029,6 @@ Object.freeze({
35674
36029
  form: "single",
35675
36030
  optional: false
35676
36031
  }],
35677
- "pipelineAnalytics.listGroups": [{
35678
- name: "deviceIds",
35679
- form: "array",
35680
- optional: false
35681
- }],
35682
36032
  "pipelineAnalytics.listOpsLog": [{
35683
36033
  name: "deviceId",
35684
36034
  form: "single",
@@ -35724,6 +36074,11 @@ Object.freeze({
35724
36074
  form: "single",
35725
36075
  optional: true
35726
36076
  }],
36077
+ "pipelineAnalytics.reclaimDebugMedia": [{
36078
+ name: "deviceIds",
36079
+ form: "array",
36080
+ optional: true
36081
+ }],
35727
36082
  "pipelineAnalytics.reconcileFromDisk": [{
35728
36083
  name: "deviceId",
35729
36084
  form: "single",
@@ -36059,6 +36414,11 @@ Object.freeze({
36059
36414
  form: "single",
36060
36415
  optional: false
36061
36416
  }],
36417
+ "recording.reconcileLedgerAgainstDisk": [{
36418
+ name: "deviceId",
36419
+ form: "single",
36420
+ optional: true
36421
+ }],
36062
36422
  "recording.relocateFootage": [{
36063
36423
  name: "deviceId",
36064
36424
  form: "single",
@@ -36084,6 +36444,11 @@ Object.freeze({
36084
36444
  form: "single",
36085
36445
  optional: false
36086
36446
  }],
36447
+ "recording.setDevicePlacement": [{
36448
+ name: "deviceId",
36449
+ form: "single",
36450
+ optional: false
36451
+ }],
36087
36452
  "recording.startStorageMigrationMove": [{
36088
36453
  name: "deviceId",
36089
36454
  form: "single",
@@ -36124,6 +36489,11 @@ Object.freeze({
36124
36489
  form: "single",
36125
36490
  optional: false
36126
36491
  }],
36492
+ "sceneMonitor.listScenesBatch": [{
36493
+ name: "deviceIds",
36494
+ form: "array",
36495
+ optional: false
36496
+ }],
36127
36497
  "sceneMonitor.recheckNow": [{
36128
36498
  name: "deviceId",
36129
36499
  form: "single",
@@ -36385,6 +36755,11 @@ Object.freeze({
36385
36755
  form: "single",
36386
36756
  optional: false
36387
36757
  }],
36758
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
36759
+ name: "deviceIds",
36760
+ form: "array",
36761
+ optional: false
36762
+ }],
36388
36763
  "zoneAnalytics.getUnzonedHistory": [{
36389
36764
  name: "deviceId",
36390
36765
  form: "single",