@camstack/addon-decoder-nodeav 1.2.48 → 1.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/index.js +450 -75
  2. package/dist/index.mjs +450 -75
  3. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -8014,6 +8014,20 @@ var RelocateJobSchema = object({
8014
8014
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8015
8015
  */
8016
8016
  rowsReconciled: number().int().nonnegative().optional(),
8017
+ /**
8018
+ * Rows this run FORGOT because the file they name is not on disk.
8019
+ *
8020
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8021
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8022
+ * and the durable row is dropped through the same channel eviction uses. It
8023
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8024
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8025
+ * the same failure as one that quietly skips them (D295).
8026
+ *
8027
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8028
+ * ledger claimed 5.65 GB of footage that no longer existed.
8029
+ */
8030
+ rowsForgotten: number().int().nonnegative().optional(),
8017
8031
  startedAt: number(),
8018
8032
  finishedAt: number().nullable(),
8019
8033
  error: string().nullable()
@@ -8078,6 +8092,13 @@ var MediaRelocateModeSchema = _enum([
8078
8092
  ]);
8079
8093
  var RelocateMediaInputSchema = object({
8080
8094
  toLocationId: string(),
8095
+ /**
8096
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8097
+ * every row that is not already on `toLocationId` (the historical
8098
+ * behaviour). A named source is what a from→to migration needs: without it
8099
+ * "move events off disk 2" also emptied disk 1.
8100
+ */
8101
+ fromLocationId: string().optional(),
8081
8102
  throttleMbps: number().min(1).max(1e3).optional(),
8082
8103
  /** Omitted = `move`, the pre-existing behaviour. */
8083
8104
  mode: MediaRelocateModeSchema.optional()
@@ -8145,6 +8166,19 @@ var StorageMigrationDestinationsSchema = object({
8145
8166
  galleryMedia: string().min(1).optional()
8146
8167
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8147
8168
  /**
8169
+ * Optional named source per class. Omitted = the class's current default
8170
+ * (the historical behaviour). A named source that is NOT the default is a
8171
+ * drain of that disk: bytes move, the default stays, and the source is
8172
+ * disabled when the move finishes.
8173
+ */
8174
+ var StorageMigrationSourcesSchema = object({
8175
+ recordings: string().min(1).optional(),
8176
+ recordingsLow: string().min(1).optional(),
8177
+ eventMedia: string().min(1).optional(),
8178
+ backups: string().min(1).optional(),
8179
+ galleryMedia: string().min(1).optional()
8180
+ }).optional();
8181
+ /**
8148
8182
  * How a migration sequences the cutover against the byte move.
8149
8183
  *
8150
8184
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8166,6 +8200,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8166
8200
  /** Shared input for planning and starting an orchestrated storage migration. */
8167
8201
  var StorageMigrationInputSchema = object({
8168
8202
  destinations: StorageMigrationDestinationsSchema,
8203
+ /** Omitted = each class's current default. */
8204
+ sources: StorageMigrationSourcesSchema,
8169
8205
  throttleMbps: number().min(1).max(1e3).optional(),
8170
8206
  /** Omitted = `blocking`, which stays the default. */
8171
8207
  mode: StorageMigrationModeSchema.optional()
@@ -8245,6 +8281,13 @@ var StorageMigrationMoveSchema = object({
8245
8281
  storageClass: StorageMigrationClassSchema,
8246
8282
  fromLocationId: string(),
8247
8283
  toLocationId: string(),
8284
+ /**
8285
+ * True when `from` was NOT the class default at plan time. The move still
8286
+ * copies bytes, but the default is left alone and the source is disabled
8287
+ * once the copy verifies. Absent on jobs planned before this field existed
8288
+ * — those jobs always repointed, which is `false`.
8289
+ */
8290
+ freezeSource: boolean().optional(),
8248
8291
  moverJobId: string().nullable(),
8249
8292
  state: RelocateJobStateSchema.nullable(),
8250
8293
  error: string().nullable(),
@@ -8258,6 +8301,7 @@ var StorageMigrationJobSchema = object({
8258
8301
  * can tell a seconds-long cutover from a thirty-hour one. */
8259
8302
  mode: StorageMigrationModeSchema,
8260
8303
  destinations: StorageMigrationDestinationsSchema,
8304
+ sources: StorageMigrationSourcesSchema,
8261
8305
  throttleMbps: number(),
8262
8306
  moves: array(StorageMigrationMoveSchema),
8263
8307
  pauseLeaseId: string().nullable(),
@@ -8283,6 +8327,7 @@ var StorageMigrationFindingSchema = object({
8283
8327
  });
8284
8328
  var StorageMigrationPlanSchema = object({
8285
8329
  destinations: StorageMigrationDestinationsSchema,
8330
+ sources: StorageMigrationSourcesSchema,
8286
8331
  /** The mode this plan was built for. A plan is only valid for its mode: the
8287
8332
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8288
8333
  * it. */
@@ -8290,7 +8335,8 @@ var StorageMigrationPlanSchema = object({
8290
8335
  moves: array(object({
8291
8336
  storageClass: StorageMigrationClassSchema,
8292
8337
  fromLocationId: string(),
8293
- toLocationId: string()
8338
+ toLocationId: string(),
8339
+ freezeSource: boolean().optional()
8294
8340
  })),
8295
8341
  findings: array(StorageMigrationFindingSchema)
8296
8342
  });
@@ -8377,16 +8423,142 @@ var RelocateResidueSchema = object({
8377
8423
  segments: number().int().nonnegative(),
8378
8424
  bytes: number().int().nonnegative()
8379
8425
  }).nullable();
8426
+ /**
8427
+ * Ask one location whether its durable hour rows describe the disk — the walk
8428
+ * (D319).
8429
+ *
8430
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8431
+ * missing tool is the question, and the dry run is how they sanity-check the
8432
+ * destructive run before authorising it.
8433
+ */
8434
+ var LedgerWalkInputSchema = object({
8435
+ locationId: string().min(1),
8436
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8437
+ apply: boolean().optional(),
8438
+ /** Narrow to one camera. */
8439
+ deviceId: number().int().positive().optional(),
8440
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8441
+ profiles: array(string().min(1)).optional()
8442
+ });
8443
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8444
+ var LedgerWalkRefusalSchema = _enum([
8445
+ "location-unknown",
8446
+ "source-writable",
8447
+ "no-ledger",
8448
+ "archive-unreadable",
8449
+ "anchor-absent",
8450
+ "anchor-unreadable",
8451
+ "anchor-moved"
8452
+ ]);
8453
+ _enum([
8454
+ "live-tail",
8455
+ "listing-error",
8456
+ "path-mismatch",
8457
+ "durable-refused"
8458
+ ]);
8459
+ /** Every skip reason, always present, always a number — so a reason that never
8460
+ * fired reports as zero rather than absent and the report shape is constant
8461
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8462
+ var LedgerWalkSkipCountsSchema = object({
8463
+ "live-tail": number().int().nonnegative(),
8464
+ "listing-error": number().int().nonnegative(),
8465
+ "path-mismatch": number().int().nonnegative(),
8466
+ "durable-refused": number().int().nonnegative()
8467
+ });
8468
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8469
+ var LedgerWalkDeviceReportSchema = object({
8470
+ deviceId: number().int(),
8471
+ hoursWalked: number().int().nonnegative(),
8472
+ hoursMissing: number().int().nonnegative(),
8473
+ ghostSegments: number().int().nonnegative(),
8474
+ ghostBytes: number().int().nonnegative(),
8475
+ forgottenSegments: number().int().nonnegative(),
8476
+ orphanFiles: number().int().nonnegative()
8477
+ });
8478
+ /**
8479
+ * What one walk claimed, listed, found and (only when armed) forgot.
8480
+ *
8481
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8482
+ * walk that saw a fraction of the location is visible in its own report rather
8483
+ * than in the absence of one.
8484
+ */
8485
+ var LedgerWalkReportSchema = object({
8486
+ locationId: string(),
8487
+ applied: boolean(),
8488
+ refused: LedgerWalkRefusalSchema.nullable(),
8489
+ archiveSegments: number().int().nonnegative().nullable(),
8490
+ archiveBytes: number().int().nonnegative().nullable(),
8491
+ hoursClaimed: number().int().nonnegative(),
8492
+ hoursWalked: number().int().nonnegative(),
8493
+ hoursMissing: number().int().nonnegative(),
8494
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8495
+ listings: number().int().nonnegative(),
8496
+ segmentsClaimed: number().int().nonnegative(),
8497
+ ghostSegments: number().int().nonnegative(),
8498
+ ghostBytes: number().int().nonnegative(),
8499
+ ghostHoursWhole: number().int().nonnegative(),
8500
+ forgottenSegments: number().int().nonnegative(),
8501
+ forgottenBytes: number().int().nonnegative(),
8502
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8503
+ orphanFiles: number().int().nonnegative(),
8504
+ orphanSample: array(string()).readonly(),
8505
+ hoursSkipped: number().int().nonnegative(),
8506
+ skippedByReason: LedgerWalkSkipCountsSchema,
8507
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8508
+ bounded: boolean(),
8509
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8510
+ });
8380
8511
  /** How many rows a media pass would still act on against a given target — the
8381
8512
  * media lane's denominator AND its residue, from ONE derivation so the two can
8382
8513
  * never disagree. `null` = the count could not be taken. */
8383
8514
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8384
8515
  var RelocatableMediaCountInputSchema = object({
8385
8516
  toLocationId: string().min(1),
8517
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8518
+ fromLocationId: string().optional(),
8386
8519
  /** Omitted = `move`. */
8387
8520
  mode: MediaRelocateModeSchema.optional()
8388
8521
  });
8389
8522
  /**
8523
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8524
+ * ghost ledger entries on frozen footage locations.
8525
+ *
8526
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8527
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8528
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8529
+ * with no operator-visible status.
8530
+ */
8531
+ var StorageCleanupPhaseSchema = _enum([
8532
+ "orphans",
8533
+ "debug-media",
8534
+ "ghost-ledger",
8535
+ "done",
8536
+ "failed",
8537
+ "cancelled"
8538
+ ]);
8539
+ var StorageCleanupInputSchema = object({
8540
+ /** Also walk motion stills / track filmstrips. Off by default. */
8541
+ includeDebugMedia: boolean().optional() });
8542
+ var StorageCleanupJobSchema = object({
8543
+ jobId: string(),
8544
+ phase: StorageCleanupPhaseSchema,
8545
+ includeDebugMedia: boolean(),
8546
+ orphansReclaimed: number().int().nonnegative(),
8547
+ orphanBytesReclaimed: number().int().nonnegative(),
8548
+ debugMediaReclaimed: number().int().nonnegative(),
8549
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8550
+ ghostsForgotten: number().int().nonnegative(),
8551
+ ghostBytesForgotten: number().int().nonnegative(),
8552
+ /** Short operator-facing line: current collection, pass, or location. */
8553
+ detail: string().nullable(),
8554
+ cancelRequested: boolean(),
8555
+ startedAt: number(),
8556
+ updatedAt: number(),
8557
+ finishedAt: number().nullable(),
8558
+ error: string().nullable()
8559
+ });
8560
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8561
+ /**
8390
8562
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8391
8563
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8392
8564
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8414,11 +8586,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8414
8586
  * The default location for a type uses `id === <type>:default` by
8415
8587
  * convention (the bare type ref like `'backups'` resolves to it).
8416
8588
  *
8417
- * `isSystem: true` marks a location as orchestrator-seeded and
8418
- * undeletable. The bootstrap-installed defaults (one per type) carry
8419
- * this flag; operator-added locations don't. Editing the config of
8420
- * a system location is allowed (path migration, provider swap) but
8421
- * deleting it is rejected at the cap level.
8589
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8590
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8591
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8592
+ * / last-enabled, not on this bit.
8422
8593
  */
8423
8594
  var StorageLocationSchema = object({
8424
8595
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -12810,6 +12981,12 @@ method(object({
12810
12981
  }), _void(), {
12811
12982
  kind: "mutation",
12812
12983
  auth: "admin"
12984
+ }), method(object({
12985
+ from: string(),
12986
+ to: string()
12987
+ }), object({ moved: number() }), {
12988
+ kind: "mutation",
12989
+ auth: "admin"
12813
12990
  }), method(object({
12814
12991
  deviceId: number(),
12815
12992
  disabled: boolean()
@@ -18740,53 +18917,15 @@ var RecentTracksPageSchema = object({
18740
18917
  /** Cursor for the next page, or null when this page is the last. */
18741
18918
  nextCursor: string().nullable()
18742
18919
  });
18743
- var LIST_GROUPS_DEFAULT_LIMIT = 40;
18744
- var LIST_GROUPS_MAX_LIMIT = 100;
18745
- var AnalyticsGroupRecordSchema = object({
18746
- id: string(),
18747
- deviceId: number().int(),
18748
- openedAt: number().int(),
18749
- closedAt: number().int(),
18750
- timestamp: number().int(),
18751
- memberCount: number().int(),
18752
- memberTrackIds: array(string()).readonly(),
18753
- className: string(),
18754
- classes: array(string()).readonly(),
18755
- /** Relative event-media path, or null when the group has no picture yet. */
18756
- mediaUrl: string().nullable(),
18757
- singleton: boolean()
18758
- });
18759
- var AnalyticsGroupMemberSchema = object({
18760
- trackId: string(),
18761
- deviceId: number().int(),
18762
- className: string(),
18763
- firstSeen: number().int(),
18764
- lastSeen: number().int(),
18765
- mediaUrl: string().nullable()
18766
- });
18767
- var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
18768
- var ListGroupsQueryInput = object({
18769
- /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
18770
- deviceIds: array(number()),
18771
- /** Window lower bound on `closedAt` (inclusive). */
18772
- since: number().optional(),
18773
- /** Window upper bound on `openedAt` (inclusive). */
18774
- until: number().optional(),
18775
- limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
18776
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
18777
- cursor: string().optional()
18778
- });
18779
- var ListGroupsPageSchema = object({
18780
- groups: array(AnalyticsGroupRecordSchema).readonly(),
18781
- nextCursor: string().nullable()
18782
- });
18920
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
18921
+ var KEY_EVENTS_MAX_LIMIT = 200;
18783
18922
  var KeyEventQueryInput = object({
18784
18923
  deviceId: number(),
18785
18924
  /** Window lower bound (track firstSeen ≥ since). */
18786
18925
  since: number(),
18787
18926
  /** Window upper bound (track firstSeen ≤ until). */
18788
18927
  until: number(),
18789
- limit: number().int().min(1).max(200).default(50),
18928
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18790
18929
  /** Drop tracks scoring below this importance. */
18791
18930
  minImportance: number().min(0).max(1).optional(),
18792
18931
  /** Restrict to a single class (e.g. 'person'). */
@@ -18808,6 +18947,32 @@ var KeyEventSchema = object({
18808
18947
  ...TrackFlagFields,
18809
18948
  ...TrackRetrainFields
18810
18949
  });
18950
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
18951
+ var KeyEventBatchQueryInput = object({
18952
+ deviceIds: array(number()).min(1).max(200),
18953
+ since: number(),
18954
+ until: number(),
18955
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
18956
+ * across the set, which would let a busy camera starve a quiet one of its
18957
+ * rows and change what the merged feed contains. */
18958
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18959
+ minImportance: number().min(0).max(1).optional(),
18960
+ classFilter: string().optional()
18961
+ });
18962
+ /**
18963
+ * One camera's key events in a batch answer.
18964
+ *
18965
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
18966
+ * error rather than throwing, so a camera whose store read failed and one with
18967
+ * no events in the window were ALREADY indistinguishable per camera — the
18968
+ * batch does not make that worse, and the row keeps the deviceId the single
18969
+ * method's output never carried (the caller used to stamp it from the fan-out
18970
+ * key, which only worked because there was one query per camera).
18971
+ */
18972
+ var KeyEventsForDeviceSchema = object({
18973
+ deviceId: number(),
18974
+ events: array(KeyEventSchema).readonly()
18975
+ });
18811
18976
  object({
18812
18977
  trackId: string(),
18813
18978
  className: string(),
@@ -18855,9 +19020,7 @@ var TrackCascadeCountsSchema = object({
18855
19020
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
18856
19021
  plates: number().int(),
18857
19022
  /** Per-track CLIP search vectors removed (best-effort). */
18858
- embeddings: number().int(),
18859
- /** Group membership + group rows removed with their last member (best-effort). */
18860
- groups: number().int()
19023
+ embeddings: number().int()
18861
19024
  });
18862
19025
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
18863
19026
  var DiskReconcileCountsSchema = object({
@@ -19027,6 +19190,47 @@ var RebuildStatusSchema = object({
19027
19190
  /** Present when the pass ended by throwing. */
19028
19191
  error: string().nullable()
19029
19192
  });
19193
+ /**
19194
+ * Acknowledgement that a debug-media reclaim STARTED.
19195
+ *
19196
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
19197
+ * it runs detached and this returns immediately. Awaiting it is how the
19198
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
19199
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
19200
+ */
19201
+ var MediaReclaimStartResultSchema = object({
19202
+ started: boolean(),
19203
+ /** True when a pass was already running; the new request is ignored. */
19204
+ alreadyRunning: boolean()
19205
+ });
19206
+ var MediaReclaimInputSchema = object({
19207
+ mode: _enum(["report", "reclaim"]).default("report"),
19208
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
19209
+ deviceIds: array(number().int()).min(1).optional(),
19210
+ restart: boolean().optional(),
19211
+ pageSize: number().int().min(50).max(5e3).optional(),
19212
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
19213
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
19214
+ maxBytesPerRun: number().int().min(1).optional(),
19215
+ budgetMinutes: number().int().min(1).max(720).optional(),
19216
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
19217
+ graceMinutes: number().int().min(1).max(10080).optional()
19218
+ });
19219
+ var MediaReclaimStatusSchema = object({
19220
+ running: boolean(),
19221
+ mode: _enum(["report", "reclaim"]).nullable(),
19222
+ totalExamined: number(),
19223
+ totalEligible: number(),
19224
+ totalReclaimed: number(),
19225
+ totalBytesReclaimed: number(),
19226
+ totalRefused: number(),
19227
+ /** Device+scope windows finished in this pass. */
19228
+ devicesDone: number(),
19229
+ complete: boolean().nullable(),
19230
+ startedAtMs: number().nullable(),
19231
+ finishedAtMs: number().nullable(),
19232
+ error: string().nullable()
19233
+ });
19030
19234
  var ReplayFrameInputSchema = object({
19031
19235
  timestamp: number(),
19032
19236
  frame: PipelineRunResultBridge
@@ -19065,10 +19269,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19065
19269
  * stationary registry). Default false: the timeline lists passages,
19066
19270
  * not parking records (operator decision, 2026-08-15). */
19067
19271
  includeStationary: boolean().optional()
19068
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
19069
- deviceId: number(),
19070
- groupId: string().min(1)
19071
- }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19272
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19072
19273
  kind: "mutation",
19073
19274
  auth: "admin"
19074
19275
  }), 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({
@@ -19077,7 +19278,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19077
19278
  until: number().optional(),
19078
19279
  kinds: array(string()).optional(),
19079
19280
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19080
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19281
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19081
19282
  deviceId: number(),
19082
19283
  since: number(),
19083
19284
  until: number(),
@@ -19168,6 +19369,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19168
19369
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19169
19370
  kind: "query",
19170
19371
  auth: "admin"
19372
+ }), method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
19373
+ kind: "mutation",
19374
+ auth: "admin"
19375
+ }), method(object({}), MediaReclaimStatusSchema, {
19376
+ kind: "query",
19377
+ auth: "admin"
19171
19378
  }), method(object({ deviceIds: array(number()).optional() }), TrainingExportSummarySchema, {
19172
19379
  kind: "query",
19173
19380
  auth: "admin"
@@ -21138,7 +21345,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21138
21345
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21139
21346
  kind: "mutation",
21140
21347
  auth: "admin"
21141
- });
21348
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
21349
+ kind: "mutation",
21350
+ auth: "admin"
21351
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21352
+ kind: "mutation",
21353
+ auth: "admin"
21354
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21142
21355
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21143
21356
  providerId: string().min(1),
21144
21357
  displayName: string().min(1),
@@ -26516,6 +26729,33 @@ var RecordingRebalanceInputSchema = object({
26516
26729
  minMoveGb: number().min(0).optional()
26517
26730
  });
26518
26731
  /**
26732
+ * Operator-facing placement of one camera onto a recordings location.
26733
+ *
26734
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
26735
+ * Auto (the planner may move this camera). `locationId` is where high/mid
26736
+ * currently write — the plan, which may disagree with the pin when Auto.
26737
+ */
26738
+ var RecordingDevicePlacementSchema = object({
26739
+ deviceId: number().int(),
26740
+ profile: string(),
26741
+ locationId: string()
26742
+ });
26743
+ var RecordingDevicePinSchema = object({
26744
+ deviceId: number().int(),
26745
+ /** Recordings-class location this camera is pinned to. */
26746
+ locationId: string()
26747
+ });
26748
+ var RecordingPlacementViewSchema = object({
26749
+ assignments: array(RecordingDevicePlacementSchema),
26750
+ pins: array(RecordingDevicePinSchema),
26751
+ defaultLocations: record(string(), string())
26752
+ });
26753
+ var RecordingSetDevicePlacementInputSchema = object({
26754
+ deviceId: number().int(),
26755
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
26756
+ locationId: string().nullable()
26757
+ });
26758
+ /**
26519
26759
  * Result of locating footage at a wall-clock instant for one device/profile.
26520
26760
  * `segment` carries the covering segment's window; `gap` reports the forward
26521
26761
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -26729,6 +26969,9 @@ method(object({
26729
26969
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26730
26970
  kind: "query",
26731
26971
  auth: "admin"
26972
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
26973
+ kind: "mutation",
26974
+ auth: "admin"
26732
26975
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26733
26976
  kind: "mutation",
26734
26977
  auth: "admin"
@@ -26738,6 +26981,12 @@ method(object({
26738
26981
  }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
26739
26982
  kind: "mutation",
26740
26983
  auth: "admin"
26984
+ }), method(object({}), RecordingPlacementViewSchema, {
26985
+ kind: "query",
26986
+ auth: "admin"
26987
+ }), method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
26988
+ kind: "mutation",
26989
+ auth: "admin"
26741
26990
  });
26742
26991
  /**
26743
26992
  * `recording-export` cap — render a footage time range into a single downloadable
@@ -27120,7 +27369,26 @@ var SceneMonitorStatusSchema = object({
27120
27369
  monitors: array(SceneMonitorSchema),
27121
27370
  lastFetchedAt: number()
27122
27371
  });
27123
- DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({
27372
+ /**
27373
+ * One camera's row in a `listScenesBatch` answer.
27374
+ *
27375
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
27376
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
27377
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
27378
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
27379
+ * configured. Fanned out per camera the difference was visible — one query
27380
+ * errored while the others resolved — and a batch that returned only the rows
27381
+ * it managed would have destroyed it, silently, by making an unreachable camera
27382
+ * indistinguishable from one that answered `monitors: []`.
27383
+ *
27384
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
27385
+ * could not be read"; `status.monitors: []` means "read, and it has none".
27386
+ */
27387
+ var SceneMonitorStatusForDeviceSchema = object({
27388
+ deviceId: number(),
27389
+ status: SceneMonitorStatusSchema.nullable()
27390
+ });
27391
+ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
27124
27392
  deviceId: number(),
27125
27393
  label: string(),
27126
27394
  roi: MaskRectShapeSchema,
@@ -28444,6 +28712,27 @@ var CameraOccupancySnapshotSchema = object({
28444
28712
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
28445
28713
  });
28446
28714
  /**
28715
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
28716
+ *
28717
+ * THREE outcomes, and the single-camera method could only express two of them
28718
+ * because `snapshot: null` was already spoken for:
28719
+ *
28720
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
28721
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
28722
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
28723
+ * - `read: 'unreadable'` — the owner could not answer for this
28724
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
28725
+ *
28726
+ * Collapsing the last two is the failure this field exists to prevent: a
28727
+ * hydration that threw would otherwise render as an empty Stationary section,
28728
+ * which is a definite claim about a camera nobody could read.
28729
+ */
28730
+ var CameraOccupancySnapshotForDeviceSchema = object({
28731
+ deviceId: number(),
28732
+ read: _enum(["read", "unreadable"]),
28733
+ snapshot: CameraOccupancySnapshotSchema.nullable()
28734
+ });
28735
+ /**
28447
28736
  * Time-series resolution. The history methods return one bucket per
28448
28737
  * step over the requested range. Smaller resolutions cost more
28449
28738
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -28467,7 +28756,7 @@ var HistoryPointSchema = object({
28467
28756
  /** Object count averaged over the bucket (rounded to nearest integer). */
28468
28757
  count: number().int().nonnegative()
28469
28758
  });
28470
- DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
28759
+ DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
28471
28760
  deviceId: number(),
28472
28761
  zoneId: string(),
28473
28762
  className: string().optional()
@@ -30068,6 +30357,12 @@ Object.freeze({
30068
30357
  addonId: null,
30069
30358
  access: "delete"
30070
30359
  },
30360
+ "deviceManager.renameLocation": {
30361
+ capName: "device-manager",
30362
+ capScope: "system",
30363
+ addonId: null,
30364
+ access: "create"
30365
+ },
30071
30366
  "deviceManager.runDeviceAction": {
30072
30367
  capName: "device-manager",
30073
30368
  capScope: "system",
@@ -31760,13 +32055,19 @@ Object.freeze({
31760
32055
  addonId: null,
31761
32056
  access: "view"
31762
32057
  },
31763
- "pipelineAnalytics.getGroup": {
32058
+ "pipelineAnalytics.getKeyEvents": {
31764
32059
  capName: "pipeline-analytics",
31765
32060
  capScope: "device",
31766
32061
  addonId: null,
31767
32062
  access: "view"
31768
32063
  },
31769
- "pipelineAnalytics.getKeyEvents": {
32064
+ "pipelineAnalytics.getKeyEventsBatch": {
32065
+ capName: "pipeline-analytics",
32066
+ capScope: "device",
32067
+ addonId: null,
32068
+ access: "view"
32069
+ },
32070
+ "pipelineAnalytics.getMediaReclaimStatus": {
31770
32071
  capName: "pipeline-analytics",
31771
32072
  capScope: "device",
31772
32073
  addonId: null,
@@ -31856,12 +32157,6 @@ Object.freeze({
31856
32157
  addonId: null,
31857
32158
  access: "view"
31858
32159
  },
31859
- "pipelineAnalytics.listGroups": {
31860
- capName: "pipeline-analytics",
31861
- capScope: "device",
31862
- addonId: null,
31863
- access: "view"
31864
- },
31865
32160
  "pipelineAnalytics.listOpsLog": {
31866
32161
  capName: "pipeline-analytics",
31867
32162
  capScope: "device",
@@ -31946,6 +32241,12 @@ Object.freeze({
31946
32241
  addonId: null,
31947
32242
  access: "create"
31948
32243
  },
32244
+ "pipelineAnalytics.reclaimDebugMedia": {
32245
+ capName: "pipeline-analytics",
32246
+ capScope: "device",
32247
+ addonId: null,
32248
+ access: "create"
32249
+ },
31949
32250
  "pipelineAnalytics.reconcileFromDisk": {
31950
32251
  capName: "pipeline-analytics",
31951
32252
  capScope: "device",
@@ -32870,6 +33171,12 @@ Object.freeze({
32870
33171
  addonId: null,
32871
33172
  access: "view"
32872
33173
  },
33174
+ "recording.getPlacement": {
33175
+ capName: "recording",
33176
+ capScope: "system",
33177
+ addonId: null,
33178
+ access: "view"
33179
+ },
32873
33180
  "recording.getPlaybackManifest": {
32874
33181
  capName: "recording",
32875
33182
  capScope: "system",
@@ -32948,6 +33255,12 @@ Object.freeze({
32948
33255
  addonId: null,
32949
33256
  access: "view"
32950
33257
  },
33258
+ "recording.reconcileLedgerAgainstDisk": {
33259
+ capName: "recording",
33260
+ capScope: "system",
33261
+ addonId: null,
33262
+ access: "create"
33263
+ },
32951
33264
  "recording.refreshStorageLocationsForMigration": {
32952
33265
  capName: "recording",
32953
33266
  capScope: "system",
@@ -32990,6 +33303,12 @@ Object.freeze({
32990
33303
  addonId: null,
32991
33304
  access: "create"
32992
33305
  },
33306
+ "recording.setDevicePlacement": {
33307
+ capName: "recording",
33308
+ capScope: "system",
33309
+ addonId: null,
33310
+ access: "create"
33311
+ },
32993
33312
  "recording.startStorageMigrationMove": {
32994
33313
  capName: "recording",
32995
33314
  capScope: "system",
@@ -33074,6 +33393,12 @@ Object.freeze({
33074
33393
  addonId: null,
33075
33394
  access: "view"
33076
33395
  },
33396
+ "sceneMonitor.listScenesBatch": {
33397
+ capName: "scene-monitor",
33398
+ capScope: "device",
33399
+ addonId: null,
33400
+ access: "view"
33401
+ },
33077
33402
  "sceneMonitor.recheckNow": {
33078
33403
  capName: "scene-monitor",
33079
33404
  capScope: "device",
@@ -33428,12 +33753,36 @@ Object.freeze({
33428
33753
  addonId: null,
33429
33754
  access: "create"
33430
33755
  },
33756
+ "storageMigration.cleanupCancel": {
33757
+ capName: "storage-migration",
33758
+ capScope: "system",
33759
+ addonId: null,
33760
+ access: "create"
33761
+ },
33762
+ "storageMigration.cleanupStart": {
33763
+ capName: "storage-migration",
33764
+ capScope: "system",
33765
+ addonId: null,
33766
+ access: "create"
33767
+ },
33768
+ "storageMigration.cleanupStatus": {
33769
+ capName: "storage-migration",
33770
+ capScope: "system",
33771
+ addonId: null,
33772
+ access: "view"
33773
+ },
33431
33774
  "storageMigration.drain": {
33432
33775
  capName: "storage-migration",
33433
33776
  capScope: "system",
33434
33777
  addonId: null,
33435
33778
  access: "create"
33436
33779
  },
33780
+ "storageMigration.history": {
33781
+ capName: "storage-migration",
33782
+ capScope: "system",
33783
+ addonId: null,
33784
+ access: "view"
33785
+ },
33437
33786
  "storageMigration.movers": {
33438
33787
  capName: "storage-migration",
33439
33788
  capScope: "system",
@@ -34430,6 +34779,12 @@ Object.freeze({
34430
34779
  addonId: null,
34431
34780
  access: "view"
34432
34781
  },
34782
+ "zoneAnalytics.getCurrentSnapshotBatch": {
34783
+ capName: "zone-analytics",
34784
+ capScope: "device",
34785
+ addonId: null,
34786
+ access: "view"
34787
+ },
34433
34788
  "zoneAnalytics.getUnzonedHistory": {
34434
34789
  capName: "zone-analytics",
34435
34790
  capScope: "device",
@@ -35424,14 +35779,14 @@ Object.freeze({
35424
35779
  form: "single",
35425
35780
  optional: true
35426
35781
  }],
35427
- "pipelineAnalytics.getGroup": [{
35782
+ "pipelineAnalytics.getKeyEvents": [{
35428
35783
  name: "deviceId",
35429
35784
  form: "single",
35430
35785
  optional: false
35431
35786
  }],
35432
- "pipelineAnalytics.getKeyEvents": [{
35433
- name: "deviceId",
35434
- form: "single",
35787
+ "pipelineAnalytics.getKeyEventsBatch": [{
35788
+ name: "deviceIds",
35789
+ form: "array",
35435
35790
  optional: false
35436
35791
  }],
35437
35792
  "pipelineAnalytics.getMotionEvents": [{
@@ -35489,11 +35844,6 @@ Object.freeze({
35489
35844
  form: "single",
35490
35845
  optional: false
35491
35846
  }],
35492
- "pipelineAnalytics.listGroups": [{
35493
- name: "deviceIds",
35494
- form: "array",
35495
- optional: false
35496
- }],
35497
35847
  "pipelineAnalytics.listOpsLog": [{
35498
35848
  name: "deviceId",
35499
35849
  form: "single",
@@ -35539,6 +35889,11 @@ Object.freeze({
35539
35889
  form: "single",
35540
35890
  optional: true
35541
35891
  }],
35892
+ "pipelineAnalytics.reclaimDebugMedia": [{
35893
+ name: "deviceIds",
35894
+ form: "array",
35895
+ optional: true
35896
+ }],
35542
35897
  "pipelineAnalytics.reconcileFromDisk": [{
35543
35898
  name: "deviceId",
35544
35899
  form: "single",
@@ -35874,6 +36229,11 @@ Object.freeze({
35874
36229
  form: "single",
35875
36230
  optional: false
35876
36231
  }],
36232
+ "recording.reconcileLedgerAgainstDisk": [{
36233
+ name: "deviceId",
36234
+ form: "single",
36235
+ optional: true
36236
+ }],
35877
36237
  "recording.relocateFootage": [{
35878
36238
  name: "deviceId",
35879
36239
  form: "single",
@@ -35899,6 +36259,11 @@ Object.freeze({
35899
36259
  form: "single",
35900
36260
  optional: false
35901
36261
  }],
36262
+ "recording.setDevicePlacement": [{
36263
+ name: "deviceId",
36264
+ form: "single",
36265
+ optional: false
36266
+ }],
35902
36267
  "recording.startStorageMigrationMove": [{
35903
36268
  name: "deviceId",
35904
36269
  form: "single",
@@ -35939,6 +36304,11 @@ Object.freeze({
35939
36304
  form: "single",
35940
36305
  optional: false
35941
36306
  }],
36307
+ "sceneMonitor.listScenesBatch": [{
36308
+ name: "deviceIds",
36309
+ form: "array",
36310
+ optional: false
36311
+ }],
35942
36312
  "sceneMonitor.recheckNow": [{
35943
36313
  name: "deviceId",
35944
36314
  form: "single",
@@ -36200,6 +36570,11 @@ Object.freeze({
36200
36570
  form: "single",
36201
36571
  optional: false
36202
36572
  }],
36573
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
36574
+ name: "deviceIds",
36575
+ form: "array",
36576
+ optional: false
36577
+ }],
36203
36578
  "zoneAnalytics.getUnzonedHistory": [{
36204
36579
  name: "deviceId",
36205
36580
  form: "single",