@camstack/addon-notifiers 1.2.52 → 1.2.54

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 +450 -75
  2. package/dist/addon.mjs +450 -75
  3. package/package.json +1 -1
package/dist/addon.mjs CHANGED
@@ -8124,6 +8124,20 @@ var RelocateJobSchema = object({
8124
8124
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8125
8125
  */
8126
8126
  rowsReconciled: number().int().nonnegative().optional(),
8127
+ /**
8128
+ * Rows this run FORGOT because the file they name is not on disk.
8129
+ *
8130
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8131
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8132
+ * and the durable row is dropped through the same channel eviction uses. It
8133
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8134
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8135
+ * the same failure as one that quietly skips them (D295).
8136
+ *
8137
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8138
+ * ledger claimed 5.65 GB of footage that no longer existed.
8139
+ */
8140
+ rowsForgotten: number().int().nonnegative().optional(),
8127
8141
  startedAt: number(),
8128
8142
  finishedAt: number().nullable(),
8129
8143
  error: string().nullable()
@@ -8188,6 +8202,13 @@ var MediaRelocateModeSchema = _enum([
8188
8202
  ]);
8189
8203
  var RelocateMediaInputSchema = object({
8190
8204
  toLocationId: string(),
8205
+ /**
8206
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8207
+ * every row that is not already on `toLocationId` (the historical
8208
+ * behaviour). A named source is what a from→to migration needs: without it
8209
+ * "move events off disk 2" also emptied disk 1.
8210
+ */
8211
+ fromLocationId: string().optional(),
8191
8212
  throttleMbps: number().min(1).max(1e3).optional(),
8192
8213
  /** Omitted = `move`, the pre-existing behaviour. */
8193
8214
  mode: MediaRelocateModeSchema.optional()
@@ -8255,6 +8276,19 @@ var StorageMigrationDestinationsSchema = object({
8255
8276
  galleryMedia: string().min(1).optional()
8256
8277
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8257
8278
  /**
8279
+ * Optional named source per class. Omitted = the class's current default
8280
+ * (the historical behaviour). A named source that is NOT the default is a
8281
+ * drain of that disk: bytes move, the default stays, and the source is
8282
+ * disabled when the move finishes.
8283
+ */
8284
+ var StorageMigrationSourcesSchema = object({
8285
+ recordings: string().min(1).optional(),
8286
+ recordingsLow: string().min(1).optional(),
8287
+ eventMedia: string().min(1).optional(),
8288
+ backups: string().min(1).optional(),
8289
+ galleryMedia: string().min(1).optional()
8290
+ }).optional();
8291
+ /**
8258
8292
  * How a migration sequences the cutover against the byte move.
8259
8293
  *
8260
8294
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8276,6 +8310,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8276
8310
  /** Shared input for planning and starting an orchestrated storage migration. */
8277
8311
  var StorageMigrationInputSchema = object({
8278
8312
  destinations: StorageMigrationDestinationsSchema,
8313
+ /** Omitted = each class's current default. */
8314
+ sources: StorageMigrationSourcesSchema,
8279
8315
  throttleMbps: number().min(1).max(1e3).optional(),
8280
8316
  /** Omitted = `blocking`, which stays the default. */
8281
8317
  mode: StorageMigrationModeSchema.optional()
@@ -8355,6 +8391,13 @@ var StorageMigrationMoveSchema = object({
8355
8391
  storageClass: StorageMigrationClassSchema,
8356
8392
  fromLocationId: string(),
8357
8393
  toLocationId: string(),
8394
+ /**
8395
+ * True when `from` was NOT the class default at plan time. The move still
8396
+ * copies bytes, but the default is left alone and the source is disabled
8397
+ * once the copy verifies. Absent on jobs planned before this field existed
8398
+ * — those jobs always repointed, which is `false`.
8399
+ */
8400
+ freezeSource: boolean().optional(),
8358
8401
  moverJobId: string().nullable(),
8359
8402
  state: RelocateJobStateSchema.nullable(),
8360
8403
  error: string().nullable(),
@@ -8368,6 +8411,7 @@ var StorageMigrationJobSchema = object({
8368
8411
  * can tell a seconds-long cutover from a thirty-hour one. */
8369
8412
  mode: StorageMigrationModeSchema,
8370
8413
  destinations: StorageMigrationDestinationsSchema,
8414
+ sources: StorageMigrationSourcesSchema,
8371
8415
  throttleMbps: number(),
8372
8416
  moves: array(StorageMigrationMoveSchema),
8373
8417
  pauseLeaseId: string().nullable(),
@@ -8393,6 +8437,7 @@ var StorageMigrationFindingSchema = object({
8393
8437
  });
8394
8438
  var StorageMigrationPlanSchema = object({
8395
8439
  destinations: StorageMigrationDestinationsSchema,
8440
+ sources: StorageMigrationSourcesSchema,
8396
8441
  /** The mode this plan was built for. A plan is only valid for its mode: the
8397
8442
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8398
8443
  * it. */
@@ -8400,7 +8445,8 @@ var StorageMigrationPlanSchema = object({
8400
8445
  moves: array(object({
8401
8446
  storageClass: StorageMigrationClassSchema,
8402
8447
  fromLocationId: string(),
8403
- toLocationId: string()
8448
+ toLocationId: string(),
8449
+ freezeSource: boolean().optional()
8404
8450
  })),
8405
8451
  findings: array(StorageMigrationFindingSchema)
8406
8452
  });
@@ -8487,16 +8533,142 @@ var RelocateResidueSchema = object({
8487
8533
  segments: number().int().nonnegative(),
8488
8534
  bytes: number().int().nonnegative()
8489
8535
  }).nullable();
8536
+ /**
8537
+ * Ask one location whether its durable hour rows describe the disk — the walk
8538
+ * (D319).
8539
+ *
8540
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8541
+ * missing tool is the question, and the dry run is how they sanity-check the
8542
+ * destructive run before authorising it.
8543
+ */
8544
+ var LedgerWalkInputSchema = object({
8545
+ locationId: string().min(1),
8546
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8547
+ apply: boolean().optional(),
8548
+ /** Narrow to one camera. */
8549
+ deviceId: number().int().positive().optional(),
8550
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8551
+ profiles: array(string().min(1)).optional()
8552
+ });
8553
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8554
+ var LedgerWalkRefusalSchema = _enum([
8555
+ "location-unknown",
8556
+ "source-writable",
8557
+ "no-ledger",
8558
+ "archive-unreadable",
8559
+ "anchor-absent",
8560
+ "anchor-unreadable",
8561
+ "anchor-moved"
8562
+ ]);
8563
+ _enum([
8564
+ "live-tail",
8565
+ "listing-error",
8566
+ "path-mismatch",
8567
+ "durable-refused"
8568
+ ]);
8569
+ /** Every skip reason, always present, always a number — so a reason that never
8570
+ * fired reports as zero rather than absent and the report shape is constant
8571
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8572
+ var LedgerWalkSkipCountsSchema = object({
8573
+ "live-tail": number().int().nonnegative(),
8574
+ "listing-error": number().int().nonnegative(),
8575
+ "path-mismatch": number().int().nonnegative(),
8576
+ "durable-refused": number().int().nonnegative()
8577
+ });
8578
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8579
+ var LedgerWalkDeviceReportSchema = object({
8580
+ deviceId: number().int(),
8581
+ hoursWalked: number().int().nonnegative(),
8582
+ hoursMissing: number().int().nonnegative(),
8583
+ ghostSegments: number().int().nonnegative(),
8584
+ ghostBytes: number().int().nonnegative(),
8585
+ forgottenSegments: number().int().nonnegative(),
8586
+ orphanFiles: number().int().nonnegative()
8587
+ });
8588
+ /**
8589
+ * What one walk claimed, listed, found and (only when armed) forgot.
8590
+ *
8591
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8592
+ * walk that saw a fraction of the location is visible in its own report rather
8593
+ * than in the absence of one.
8594
+ */
8595
+ var LedgerWalkReportSchema = object({
8596
+ locationId: string(),
8597
+ applied: boolean(),
8598
+ refused: LedgerWalkRefusalSchema.nullable(),
8599
+ archiveSegments: number().int().nonnegative().nullable(),
8600
+ archiveBytes: number().int().nonnegative().nullable(),
8601
+ hoursClaimed: number().int().nonnegative(),
8602
+ hoursWalked: number().int().nonnegative(),
8603
+ hoursMissing: number().int().nonnegative(),
8604
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8605
+ listings: number().int().nonnegative(),
8606
+ segmentsClaimed: number().int().nonnegative(),
8607
+ ghostSegments: number().int().nonnegative(),
8608
+ ghostBytes: number().int().nonnegative(),
8609
+ ghostHoursWhole: number().int().nonnegative(),
8610
+ forgottenSegments: number().int().nonnegative(),
8611
+ forgottenBytes: number().int().nonnegative(),
8612
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8613
+ orphanFiles: number().int().nonnegative(),
8614
+ orphanSample: array(string()).readonly(),
8615
+ hoursSkipped: number().int().nonnegative(),
8616
+ skippedByReason: LedgerWalkSkipCountsSchema,
8617
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8618
+ bounded: boolean(),
8619
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8620
+ });
8490
8621
  /** How many rows a media pass would still act on against a given target — the
8491
8622
  * media lane's denominator AND its residue, from ONE derivation so the two can
8492
8623
  * never disagree. `null` = the count could not be taken. */
8493
8624
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8494
8625
  var RelocatableMediaCountInputSchema = object({
8495
8626
  toLocationId: string().min(1),
8627
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8628
+ fromLocationId: string().optional(),
8496
8629
  /** Omitted = `move`. */
8497
8630
  mode: MediaRelocateModeSchema.optional()
8498
8631
  });
8499
8632
  /**
8633
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8634
+ * ghost ledger entries on frozen footage locations.
8635
+ *
8636
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8637
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8638
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8639
+ * with no operator-visible status.
8640
+ */
8641
+ var StorageCleanupPhaseSchema = _enum([
8642
+ "orphans",
8643
+ "debug-media",
8644
+ "ghost-ledger",
8645
+ "done",
8646
+ "failed",
8647
+ "cancelled"
8648
+ ]);
8649
+ var StorageCleanupInputSchema = object({
8650
+ /** Also walk motion stills / track filmstrips. Off by default. */
8651
+ includeDebugMedia: boolean().optional() });
8652
+ var StorageCleanupJobSchema = object({
8653
+ jobId: string(),
8654
+ phase: StorageCleanupPhaseSchema,
8655
+ includeDebugMedia: boolean(),
8656
+ orphansReclaimed: number().int().nonnegative(),
8657
+ orphanBytesReclaimed: number().int().nonnegative(),
8658
+ debugMediaReclaimed: number().int().nonnegative(),
8659
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8660
+ ghostsForgotten: number().int().nonnegative(),
8661
+ ghostBytesForgotten: number().int().nonnegative(),
8662
+ /** Short operator-facing line: current collection, pass, or location. */
8663
+ detail: string().nullable(),
8664
+ cancelRequested: boolean(),
8665
+ startedAt: number(),
8666
+ updatedAt: number(),
8667
+ finishedAt: number().nullable(),
8668
+ error: string().nullable()
8669
+ });
8670
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8671
+ /**
8500
8672
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8501
8673
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8502
8674
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8524,11 +8696,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8524
8696
  * The default location for a type uses `id === <type>:default` by
8525
8697
  * convention (the bare type ref like `'backups'` resolves to it).
8526
8698
  *
8527
- * `isSystem: true` marks a location as orchestrator-seeded and
8528
- * undeletable. The bootstrap-installed defaults (one per type) carry
8529
- * this flag; operator-added locations don't. Editing the config of
8530
- * a system location is allowed (path migration, provider swap) but
8531
- * deleting it is rejected at the cap level.
8699
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8700
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8701
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8702
+ * / last-enabled, not on this bit.
8532
8703
  */
8533
8704
  var StorageLocationSchema = object({
8534
8705
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -12831,6 +13002,12 @@ method(object({
12831
13002
  }), _void(), {
12832
13003
  kind: "mutation",
12833
13004
  auth: "admin"
13005
+ }), method(object({
13006
+ from: string(),
13007
+ to: string()
13008
+ }), object({ moved: number() }), {
13009
+ kind: "mutation",
13010
+ auth: "admin"
12834
13011
  }), method(object({
12835
13012
  deviceId: number(),
12836
13013
  disabled: boolean()
@@ -18775,53 +18952,15 @@ var RecentTracksPageSchema = object({
18775
18952
  /** Cursor for the next page, or null when this page is the last. */
18776
18953
  nextCursor: string().nullable()
18777
18954
  });
18778
- var LIST_GROUPS_DEFAULT_LIMIT = 40;
18779
- var LIST_GROUPS_MAX_LIMIT = 100;
18780
- var AnalyticsGroupRecordSchema = object({
18781
- id: string(),
18782
- deviceId: number().int(),
18783
- openedAt: number().int(),
18784
- closedAt: number().int(),
18785
- timestamp: number().int(),
18786
- memberCount: number().int(),
18787
- memberTrackIds: array(string()).readonly(),
18788
- className: string(),
18789
- classes: array(string()).readonly(),
18790
- /** Relative event-media path, or null when the group has no picture yet. */
18791
- mediaUrl: string().nullable(),
18792
- singleton: boolean()
18793
- });
18794
- var AnalyticsGroupMemberSchema = object({
18795
- trackId: string(),
18796
- deviceId: number().int(),
18797
- className: string(),
18798
- firstSeen: number().int(),
18799
- lastSeen: number().int(),
18800
- mediaUrl: string().nullable()
18801
- });
18802
- var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
18803
- var ListGroupsQueryInput = object({
18804
- /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
18805
- deviceIds: array(number()),
18806
- /** Window lower bound on `closedAt` (inclusive). */
18807
- since: number().optional(),
18808
- /** Window upper bound on `openedAt` (inclusive). */
18809
- until: number().optional(),
18810
- limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
18811
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
18812
- cursor: string().optional()
18813
- });
18814
- var ListGroupsPageSchema = object({
18815
- groups: array(AnalyticsGroupRecordSchema).readonly(),
18816
- nextCursor: string().nullable()
18817
- });
18955
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
18956
+ var KEY_EVENTS_MAX_LIMIT = 200;
18818
18957
  var KeyEventQueryInput = object({
18819
18958
  deviceId: number(),
18820
18959
  /** Window lower bound (track firstSeen ≥ since). */
18821
18960
  since: number(),
18822
18961
  /** Window upper bound (track firstSeen ≤ until). */
18823
18962
  until: number(),
18824
- limit: number().int().min(1).max(200).default(50),
18963
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18825
18964
  /** Drop tracks scoring below this importance. */
18826
18965
  minImportance: number().min(0).max(1).optional(),
18827
18966
  /** Restrict to a single class (e.g. 'person'). */
@@ -18843,6 +18982,32 @@ var KeyEventSchema = object({
18843
18982
  ...TrackFlagFields,
18844
18983
  ...TrackRetrainFields
18845
18984
  });
18985
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
18986
+ var KeyEventBatchQueryInput = object({
18987
+ deviceIds: array(number()).min(1).max(200),
18988
+ since: number(),
18989
+ until: number(),
18990
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
18991
+ * across the set, which would let a busy camera starve a quiet one of its
18992
+ * rows and change what the merged feed contains. */
18993
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18994
+ minImportance: number().min(0).max(1).optional(),
18995
+ classFilter: string().optional()
18996
+ });
18997
+ /**
18998
+ * One camera's key events in a batch answer.
18999
+ *
19000
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
19001
+ * error rather than throwing, so a camera whose store read failed and one with
19002
+ * no events in the window were ALREADY indistinguishable per camera — the
19003
+ * batch does not make that worse, and the row keeps the deviceId the single
19004
+ * method's output never carried (the caller used to stamp it from the fan-out
19005
+ * key, which only worked because there was one query per camera).
19006
+ */
19007
+ var KeyEventsForDeviceSchema = object({
19008
+ deviceId: number(),
19009
+ events: array(KeyEventSchema).readonly()
19010
+ });
18846
19011
  object({
18847
19012
  trackId: string(),
18848
19013
  className: string(),
@@ -18890,9 +19055,7 @@ var TrackCascadeCountsSchema = object({
18890
19055
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
18891
19056
  plates: number().int(),
18892
19057
  /** Per-track CLIP search vectors removed (best-effort). */
18893
- embeddings: number().int(),
18894
- /** Group membership + group rows removed with their last member (best-effort). */
18895
- groups: number().int()
19058
+ embeddings: number().int()
18896
19059
  });
18897
19060
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
18898
19061
  var DiskReconcileCountsSchema = object({
@@ -19062,6 +19225,47 @@ var RebuildStatusSchema = object({
19062
19225
  /** Present when the pass ended by throwing. */
19063
19226
  error: string().nullable()
19064
19227
  });
19228
+ /**
19229
+ * Acknowledgement that a debug-media reclaim STARTED.
19230
+ *
19231
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
19232
+ * it runs detached and this returns immediately. Awaiting it is how the
19233
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
19234
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
19235
+ */
19236
+ var MediaReclaimStartResultSchema = object({
19237
+ started: boolean(),
19238
+ /** True when a pass was already running; the new request is ignored. */
19239
+ alreadyRunning: boolean()
19240
+ });
19241
+ var MediaReclaimInputSchema = object({
19242
+ mode: _enum(["report", "reclaim"]).default("report"),
19243
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
19244
+ deviceIds: array(number().int()).min(1).optional(),
19245
+ restart: boolean().optional(),
19246
+ pageSize: number().int().min(50).max(5e3).optional(),
19247
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
19248
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
19249
+ maxBytesPerRun: number().int().min(1).optional(),
19250
+ budgetMinutes: number().int().min(1).max(720).optional(),
19251
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
19252
+ graceMinutes: number().int().min(1).max(10080).optional()
19253
+ });
19254
+ var MediaReclaimStatusSchema = object({
19255
+ running: boolean(),
19256
+ mode: _enum(["report", "reclaim"]).nullable(),
19257
+ totalExamined: number(),
19258
+ totalEligible: number(),
19259
+ totalReclaimed: number(),
19260
+ totalBytesReclaimed: number(),
19261
+ totalRefused: number(),
19262
+ /** Device+scope windows finished in this pass. */
19263
+ devicesDone: number(),
19264
+ complete: boolean().nullable(),
19265
+ startedAtMs: number().nullable(),
19266
+ finishedAtMs: number().nullable(),
19267
+ error: string().nullable()
19268
+ });
19065
19269
  var ReplayFrameInputSchema = object({
19066
19270
  timestamp: number(),
19067
19271
  frame: PipelineRunResultBridge
@@ -19100,10 +19304,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19100
19304
  * stationary registry). Default false: the timeline lists passages,
19101
19305
  * not parking records (operator decision, 2026-08-15). */
19102
19306
  includeStationary: boolean().optional()
19103
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
19104
- deviceId: number(),
19105
- groupId: string().min(1)
19106
- }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19307
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19107
19308
  kind: "mutation",
19108
19309
  auth: "admin"
19109
19310
  }), 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({
@@ -19112,7 +19313,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19112
19313
  until: number().optional(),
19113
19314
  kinds: array(string()).optional(),
19114
19315
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19115
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19316
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19116
19317
  deviceId: number(),
19117
19318
  since: number(),
19118
19319
  until: number(),
@@ -19203,6 +19404,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19203
19404
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19204
19405
  kind: "query",
19205
19406
  auth: "admin"
19407
+ }), method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
19408
+ kind: "mutation",
19409
+ auth: "admin"
19410
+ }), method(object({}), MediaReclaimStatusSchema, {
19411
+ kind: "query",
19412
+ auth: "admin"
19206
19413
  }), method(object({ deviceIds: array(number()).optional() }), TrainingExportSummarySchema, {
19207
19414
  kind: "query",
19208
19415
  auth: "admin"
@@ -21173,7 +21380,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21173
21380
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21174
21381
  kind: "mutation",
21175
21382
  auth: "admin"
21176
- });
21383
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
21384
+ kind: "mutation",
21385
+ auth: "admin"
21386
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21387
+ kind: "mutation",
21388
+ auth: "admin"
21389
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21177
21390
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21178
21391
  providerId: string().min(1),
21179
21392
  displayName: string().min(1),
@@ -26551,6 +26764,33 @@ var RecordingRebalanceInputSchema = object({
26551
26764
  minMoveGb: number().min(0).optional()
26552
26765
  });
26553
26766
  /**
26767
+ * Operator-facing placement of one camera onto a recordings location.
26768
+ *
26769
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
26770
+ * Auto (the planner may move this camera). `locationId` is where high/mid
26771
+ * currently write — the plan, which may disagree with the pin when Auto.
26772
+ */
26773
+ var RecordingDevicePlacementSchema = object({
26774
+ deviceId: number().int(),
26775
+ profile: string(),
26776
+ locationId: string()
26777
+ });
26778
+ var RecordingDevicePinSchema = object({
26779
+ deviceId: number().int(),
26780
+ /** Recordings-class location this camera is pinned to. */
26781
+ locationId: string()
26782
+ });
26783
+ var RecordingPlacementViewSchema = object({
26784
+ assignments: array(RecordingDevicePlacementSchema),
26785
+ pins: array(RecordingDevicePinSchema),
26786
+ defaultLocations: record(string(), string())
26787
+ });
26788
+ var RecordingSetDevicePlacementInputSchema = object({
26789
+ deviceId: number().int(),
26790
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
26791
+ locationId: string().nullable()
26792
+ });
26793
+ /**
26554
26794
  * Result of locating footage at a wall-clock instant for one device/profile.
26555
26795
  * `segment` carries the covering segment's window; `gap` reports the forward
26556
26796
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -26764,6 +27004,9 @@ method(object({
26764
27004
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26765
27005
  kind: "query",
26766
27006
  auth: "admin"
27007
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
27008
+ kind: "mutation",
27009
+ auth: "admin"
26767
27010
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26768
27011
  kind: "mutation",
26769
27012
  auth: "admin"
@@ -26773,6 +27016,12 @@ method(object({
26773
27016
  }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
26774
27017
  kind: "mutation",
26775
27018
  auth: "admin"
27019
+ }), method(object({}), RecordingPlacementViewSchema, {
27020
+ kind: "query",
27021
+ auth: "admin"
27022
+ }), method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
27023
+ kind: "mutation",
27024
+ auth: "admin"
26776
27025
  });
26777
27026
  /**
26778
27027
  * `recording-export` cap — render a footage time range into a single downloadable
@@ -27155,7 +27404,26 @@ var SceneMonitorStatusSchema = object({
27155
27404
  monitors: array(SceneMonitorSchema),
27156
27405
  lastFetchedAt: number()
27157
27406
  });
27158
- DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({
27407
+ /**
27408
+ * One camera's row in a `listScenesBatch` answer.
27409
+ *
27410
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
27411
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
27412
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
27413
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
27414
+ * configured. Fanned out per camera the difference was visible — one query
27415
+ * errored while the others resolved — and a batch that returned only the rows
27416
+ * it managed would have destroyed it, silently, by making an unreachable camera
27417
+ * indistinguishable from one that answered `monitors: []`.
27418
+ *
27419
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
27420
+ * could not be read"; `status.monitors: []` means "read, and it has none".
27421
+ */
27422
+ var SceneMonitorStatusForDeviceSchema = object({
27423
+ deviceId: number(),
27424
+ status: SceneMonitorStatusSchema.nullable()
27425
+ });
27426
+ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
27159
27427
  deviceId: number(),
27160
27428
  label: string(),
27161
27429
  roi: MaskRectShapeSchema,
@@ -28479,6 +28747,27 @@ var CameraOccupancySnapshotSchema = object({
28479
28747
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
28480
28748
  });
28481
28749
  /**
28750
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
28751
+ *
28752
+ * THREE outcomes, and the single-camera method could only express two of them
28753
+ * because `snapshot: null` was already spoken for:
28754
+ *
28755
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
28756
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
28757
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
28758
+ * - `read: 'unreadable'` — the owner could not answer for this
28759
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
28760
+ *
28761
+ * Collapsing the last two is the failure this field exists to prevent: a
28762
+ * hydration that threw would otherwise render as an empty Stationary section,
28763
+ * which is a definite claim about a camera nobody could read.
28764
+ */
28765
+ var CameraOccupancySnapshotForDeviceSchema = object({
28766
+ deviceId: number(),
28767
+ read: _enum(["read", "unreadable"]),
28768
+ snapshot: CameraOccupancySnapshotSchema.nullable()
28769
+ });
28770
+ /**
28482
28771
  * Time-series resolution. The history methods return one bucket per
28483
28772
  * step over the requested range. Smaller resolutions cost more
28484
28773
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -28502,7 +28791,7 @@ var HistoryPointSchema = object({
28502
28791
  /** Object count averaged over the bucket (rounded to nearest integer). */
28503
28792
  count: number().int().nonnegative()
28504
28793
  });
28505
- DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
28794
+ DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
28506
28795
  deviceId: number(),
28507
28796
  zoneId: string(),
28508
28797
  className: string().optional()
@@ -30103,6 +30392,12 @@ Object.freeze({
30103
30392
  addonId: null,
30104
30393
  access: "delete"
30105
30394
  },
30395
+ "deviceManager.renameLocation": {
30396
+ capName: "device-manager",
30397
+ capScope: "system",
30398
+ addonId: null,
30399
+ access: "create"
30400
+ },
30106
30401
  "deviceManager.runDeviceAction": {
30107
30402
  capName: "device-manager",
30108
30403
  capScope: "system",
@@ -31795,13 +32090,19 @@ Object.freeze({
31795
32090
  addonId: null,
31796
32091
  access: "view"
31797
32092
  },
31798
- "pipelineAnalytics.getGroup": {
32093
+ "pipelineAnalytics.getKeyEvents": {
31799
32094
  capName: "pipeline-analytics",
31800
32095
  capScope: "device",
31801
32096
  addonId: null,
31802
32097
  access: "view"
31803
32098
  },
31804
- "pipelineAnalytics.getKeyEvents": {
32099
+ "pipelineAnalytics.getKeyEventsBatch": {
32100
+ capName: "pipeline-analytics",
32101
+ capScope: "device",
32102
+ addonId: null,
32103
+ access: "view"
32104
+ },
32105
+ "pipelineAnalytics.getMediaReclaimStatus": {
31805
32106
  capName: "pipeline-analytics",
31806
32107
  capScope: "device",
31807
32108
  addonId: null,
@@ -31891,12 +32192,6 @@ Object.freeze({
31891
32192
  addonId: null,
31892
32193
  access: "view"
31893
32194
  },
31894
- "pipelineAnalytics.listGroups": {
31895
- capName: "pipeline-analytics",
31896
- capScope: "device",
31897
- addonId: null,
31898
- access: "view"
31899
- },
31900
32195
  "pipelineAnalytics.listOpsLog": {
31901
32196
  capName: "pipeline-analytics",
31902
32197
  capScope: "device",
@@ -31981,6 +32276,12 @@ Object.freeze({
31981
32276
  addonId: null,
31982
32277
  access: "create"
31983
32278
  },
32279
+ "pipelineAnalytics.reclaimDebugMedia": {
32280
+ capName: "pipeline-analytics",
32281
+ capScope: "device",
32282
+ addonId: null,
32283
+ access: "create"
32284
+ },
31984
32285
  "pipelineAnalytics.reconcileFromDisk": {
31985
32286
  capName: "pipeline-analytics",
31986
32287
  capScope: "device",
@@ -32905,6 +33206,12 @@ Object.freeze({
32905
33206
  addonId: null,
32906
33207
  access: "view"
32907
33208
  },
33209
+ "recording.getPlacement": {
33210
+ capName: "recording",
33211
+ capScope: "system",
33212
+ addonId: null,
33213
+ access: "view"
33214
+ },
32908
33215
  "recording.getPlaybackManifest": {
32909
33216
  capName: "recording",
32910
33217
  capScope: "system",
@@ -32983,6 +33290,12 @@ Object.freeze({
32983
33290
  addonId: null,
32984
33291
  access: "view"
32985
33292
  },
33293
+ "recording.reconcileLedgerAgainstDisk": {
33294
+ capName: "recording",
33295
+ capScope: "system",
33296
+ addonId: null,
33297
+ access: "create"
33298
+ },
32986
33299
  "recording.refreshStorageLocationsForMigration": {
32987
33300
  capName: "recording",
32988
33301
  capScope: "system",
@@ -33025,6 +33338,12 @@ Object.freeze({
33025
33338
  addonId: null,
33026
33339
  access: "create"
33027
33340
  },
33341
+ "recording.setDevicePlacement": {
33342
+ capName: "recording",
33343
+ capScope: "system",
33344
+ addonId: null,
33345
+ access: "create"
33346
+ },
33028
33347
  "recording.startStorageMigrationMove": {
33029
33348
  capName: "recording",
33030
33349
  capScope: "system",
@@ -33109,6 +33428,12 @@ Object.freeze({
33109
33428
  addonId: null,
33110
33429
  access: "view"
33111
33430
  },
33431
+ "sceneMonitor.listScenesBatch": {
33432
+ capName: "scene-monitor",
33433
+ capScope: "device",
33434
+ addonId: null,
33435
+ access: "view"
33436
+ },
33112
33437
  "sceneMonitor.recheckNow": {
33113
33438
  capName: "scene-monitor",
33114
33439
  capScope: "device",
@@ -33463,12 +33788,36 @@ Object.freeze({
33463
33788
  addonId: null,
33464
33789
  access: "create"
33465
33790
  },
33791
+ "storageMigration.cleanupCancel": {
33792
+ capName: "storage-migration",
33793
+ capScope: "system",
33794
+ addonId: null,
33795
+ access: "create"
33796
+ },
33797
+ "storageMigration.cleanupStart": {
33798
+ capName: "storage-migration",
33799
+ capScope: "system",
33800
+ addonId: null,
33801
+ access: "create"
33802
+ },
33803
+ "storageMigration.cleanupStatus": {
33804
+ capName: "storage-migration",
33805
+ capScope: "system",
33806
+ addonId: null,
33807
+ access: "view"
33808
+ },
33466
33809
  "storageMigration.drain": {
33467
33810
  capName: "storage-migration",
33468
33811
  capScope: "system",
33469
33812
  addonId: null,
33470
33813
  access: "create"
33471
33814
  },
33815
+ "storageMigration.history": {
33816
+ capName: "storage-migration",
33817
+ capScope: "system",
33818
+ addonId: null,
33819
+ access: "view"
33820
+ },
33472
33821
  "storageMigration.movers": {
33473
33822
  capName: "storage-migration",
33474
33823
  capScope: "system",
@@ -34465,6 +34814,12 @@ Object.freeze({
34465
34814
  addonId: null,
34466
34815
  access: "view"
34467
34816
  },
34817
+ "zoneAnalytics.getCurrentSnapshotBatch": {
34818
+ capName: "zone-analytics",
34819
+ capScope: "device",
34820
+ addonId: null,
34821
+ access: "view"
34822
+ },
34468
34823
  "zoneAnalytics.getUnzonedHistory": {
34469
34824
  capName: "zone-analytics",
34470
34825
  capScope: "device",
@@ -35459,14 +35814,14 @@ Object.freeze({
35459
35814
  form: "single",
35460
35815
  optional: true
35461
35816
  }],
35462
- "pipelineAnalytics.getGroup": [{
35817
+ "pipelineAnalytics.getKeyEvents": [{
35463
35818
  name: "deviceId",
35464
35819
  form: "single",
35465
35820
  optional: false
35466
35821
  }],
35467
- "pipelineAnalytics.getKeyEvents": [{
35468
- name: "deviceId",
35469
- form: "single",
35822
+ "pipelineAnalytics.getKeyEventsBatch": [{
35823
+ name: "deviceIds",
35824
+ form: "array",
35470
35825
  optional: false
35471
35826
  }],
35472
35827
  "pipelineAnalytics.getMotionEvents": [{
@@ -35524,11 +35879,6 @@ Object.freeze({
35524
35879
  form: "single",
35525
35880
  optional: false
35526
35881
  }],
35527
- "pipelineAnalytics.listGroups": [{
35528
- name: "deviceIds",
35529
- form: "array",
35530
- optional: false
35531
- }],
35532
35882
  "pipelineAnalytics.listOpsLog": [{
35533
35883
  name: "deviceId",
35534
35884
  form: "single",
@@ -35574,6 +35924,11 @@ Object.freeze({
35574
35924
  form: "single",
35575
35925
  optional: true
35576
35926
  }],
35927
+ "pipelineAnalytics.reclaimDebugMedia": [{
35928
+ name: "deviceIds",
35929
+ form: "array",
35930
+ optional: true
35931
+ }],
35577
35932
  "pipelineAnalytics.reconcileFromDisk": [{
35578
35933
  name: "deviceId",
35579
35934
  form: "single",
@@ -35909,6 +36264,11 @@ Object.freeze({
35909
36264
  form: "single",
35910
36265
  optional: false
35911
36266
  }],
36267
+ "recording.reconcileLedgerAgainstDisk": [{
36268
+ name: "deviceId",
36269
+ form: "single",
36270
+ optional: true
36271
+ }],
35912
36272
  "recording.relocateFootage": [{
35913
36273
  name: "deviceId",
35914
36274
  form: "single",
@@ -35934,6 +36294,11 @@ Object.freeze({
35934
36294
  form: "single",
35935
36295
  optional: false
35936
36296
  }],
36297
+ "recording.setDevicePlacement": [{
36298
+ name: "deviceId",
36299
+ form: "single",
36300
+ optional: false
36301
+ }],
35937
36302
  "recording.startStorageMigrationMove": [{
35938
36303
  name: "deviceId",
35939
36304
  form: "single",
@@ -35974,6 +36339,11 @@ Object.freeze({
35974
36339
  form: "single",
35975
36340
  optional: false
35976
36341
  }],
36342
+ "sceneMonitor.listScenesBatch": [{
36343
+ name: "deviceIds",
36344
+ form: "array",
36345
+ optional: false
36346
+ }],
35977
36347
  "sceneMonitor.recheckNow": [{
35978
36348
  name: "deviceId",
35979
36349
  form: "single",
@@ -36235,6 +36605,11 @@ Object.freeze({
36235
36605
  form: "single",
36236
36606
  optional: false
36237
36607
  }],
36608
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
36609
+ name: "deviceIds",
36610
+ form: "array",
36611
+ optional: false
36612
+ }],
36238
36613
  "zoneAnalytics.getUnzonedHistory": [{
36239
36614
  name: "deviceId",
36240
36615
  form: "single",