@camstack/addon-decoder-ffmpeg 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.js CHANGED
@@ -8019,6 +8019,20 @@ var RelocateJobSchema = object({
8019
8019
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8020
8020
  */
8021
8021
  rowsReconciled: number().int().nonnegative().optional(),
8022
+ /**
8023
+ * Rows this run FORGOT because the file they name is not on disk.
8024
+ *
8025
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8026
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8027
+ * and the durable row is dropped through the same channel eviction uses. It
8028
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8029
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8030
+ * the same failure as one that quietly skips them (D295).
8031
+ *
8032
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8033
+ * ledger claimed 5.65 GB of footage that no longer existed.
8034
+ */
8035
+ rowsForgotten: number().int().nonnegative().optional(),
8022
8036
  startedAt: number(),
8023
8037
  finishedAt: number().nullable(),
8024
8038
  error: string().nullable()
@@ -8083,6 +8097,13 @@ var MediaRelocateModeSchema = _enum([
8083
8097
  ]);
8084
8098
  var RelocateMediaInputSchema = object({
8085
8099
  toLocationId: string(),
8100
+ /**
8101
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8102
+ * every row that is not already on `toLocationId` (the historical
8103
+ * behaviour). A named source is what a from→to migration needs: without it
8104
+ * "move events off disk 2" also emptied disk 1.
8105
+ */
8106
+ fromLocationId: string().optional(),
8086
8107
  throttleMbps: number().min(1).max(1e3).optional(),
8087
8108
  /** Omitted = `move`, the pre-existing behaviour. */
8088
8109
  mode: MediaRelocateModeSchema.optional()
@@ -8150,6 +8171,19 @@ var StorageMigrationDestinationsSchema = object({
8150
8171
  galleryMedia: string().min(1).optional()
8151
8172
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8152
8173
  /**
8174
+ * Optional named source per class. Omitted = the class's current default
8175
+ * (the historical behaviour). A named source that is NOT the default is a
8176
+ * drain of that disk: bytes move, the default stays, and the source is
8177
+ * disabled when the move finishes.
8178
+ */
8179
+ var StorageMigrationSourcesSchema = object({
8180
+ recordings: string().min(1).optional(),
8181
+ recordingsLow: string().min(1).optional(),
8182
+ eventMedia: string().min(1).optional(),
8183
+ backups: string().min(1).optional(),
8184
+ galleryMedia: string().min(1).optional()
8185
+ }).optional();
8186
+ /**
8153
8187
  * How a migration sequences the cutover against the byte move.
8154
8188
  *
8155
8189
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8171,6 +8205,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8171
8205
  /** Shared input for planning and starting an orchestrated storage migration. */
8172
8206
  var StorageMigrationInputSchema = object({
8173
8207
  destinations: StorageMigrationDestinationsSchema,
8208
+ /** Omitted = each class's current default. */
8209
+ sources: StorageMigrationSourcesSchema,
8174
8210
  throttleMbps: number().min(1).max(1e3).optional(),
8175
8211
  /** Omitted = `blocking`, which stays the default. */
8176
8212
  mode: StorageMigrationModeSchema.optional()
@@ -8250,6 +8286,13 @@ var StorageMigrationMoveSchema = object({
8250
8286
  storageClass: StorageMigrationClassSchema,
8251
8287
  fromLocationId: string(),
8252
8288
  toLocationId: string(),
8289
+ /**
8290
+ * True when `from` was NOT the class default at plan time. The move still
8291
+ * copies bytes, but the default is left alone and the source is disabled
8292
+ * once the copy verifies. Absent on jobs planned before this field existed
8293
+ * — those jobs always repointed, which is `false`.
8294
+ */
8295
+ freezeSource: boolean().optional(),
8253
8296
  moverJobId: string().nullable(),
8254
8297
  state: RelocateJobStateSchema.nullable(),
8255
8298
  error: string().nullable(),
@@ -8263,6 +8306,7 @@ var StorageMigrationJobSchema = object({
8263
8306
  * can tell a seconds-long cutover from a thirty-hour one. */
8264
8307
  mode: StorageMigrationModeSchema,
8265
8308
  destinations: StorageMigrationDestinationsSchema,
8309
+ sources: StorageMigrationSourcesSchema,
8266
8310
  throttleMbps: number(),
8267
8311
  moves: array(StorageMigrationMoveSchema),
8268
8312
  pauseLeaseId: string().nullable(),
@@ -8288,6 +8332,7 @@ var StorageMigrationFindingSchema = object({
8288
8332
  });
8289
8333
  var StorageMigrationPlanSchema = object({
8290
8334
  destinations: StorageMigrationDestinationsSchema,
8335
+ sources: StorageMigrationSourcesSchema,
8291
8336
  /** The mode this plan was built for. A plan is only valid for its mode: the
8292
8337
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8293
8338
  * it. */
@@ -8295,7 +8340,8 @@ var StorageMigrationPlanSchema = object({
8295
8340
  moves: array(object({
8296
8341
  storageClass: StorageMigrationClassSchema,
8297
8342
  fromLocationId: string(),
8298
- toLocationId: string()
8343
+ toLocationId: string(),
8344
+ freezeSource: boolean().optional()
8299
8345
  })),
8300
8346
  findings: array(StorageMigrationFindingSchema)
8301
8347
  });
@@ -8382,16 +8428,142 @@ var RelocateResidueSchema = object({
8382
8428
  segments: number().int().nonnegative(),
8383
8429
  bytes: number().int().nonnegative()
8384
8430
  }).nullable();
8431
+ /**
8432
+ * Ask one location whether its durable hour rows describe the disk — the walk
8433
+ * (D319).
8434
+ *
8435
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8436
+ * missing tool is the question, and the dry run is how they sanity-check the
8437
+ * destructive run before authorising it.
8438
+ */
8439
+ var LedgerWalkInputSchema = object({
8440
+ locationId: string().min(1),
8441
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8442
+ apply: boolean().optional(),
8443
+ /** Narrow to one camera. */
8444
+ deviceId: number().int().positive().optional(),
8445
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8446
+ profiles: array(string().min(1)).optional()
8447
+ });
8448
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8449
+ var LedgerWalkRefusalSchema = _enum([
8450
+ "location-unknown",
8451
+ "source-writable",
8452
+ "no-ledger",
8453
+ "archive-unreadable",
8454
+ "anchor-absent",
8455
+ "anchor-unreadable",
8456
+ "anchor-moved"
8457
+ ]);
8458
+ _enum([
8459
+ "live-tail",
8460
+ "listing-error",
8461
+ "path-mismatch",
8462
+ "durable-refused"
8463
+ ]);
8464
+ /** Every skip reason, always present, always a number — so a reason that never
8465
+ * fired reports as zero rather than absent and the report shape is constant
8466
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8467
+ var LedgerWalkSkipCountsSchema = object({
8468
+ "live-tail": number().int().nonnegative(),
8469
+ "listing-error": number().int().nonnegative(),
8470
+ "path-mismatch": number().int().nonnegative(),
8471
+ "durable-refused": number().int().nonnegative()
8472
+ });
8473
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8474
+ var LedgerWalkDeviceReportSchema = object({
8475
+ deviceId: number().int(),
8476
+ hoursWalked: number().int().nonnegative(),
8477
+ hoursMissing: number().int().nonnegative(),
8478
+ ghostSegments: number().int().nonnegative(),
8479
+ ghostBytes: number().int().nonnegative(),
8480
+ forgottenSegments: number().int().nonnegative(),
8481
+ orphanFiles: number().int().nonnegative()
8482
+ });
8483
+ /**
8484
+ * What one walk claimed, listed, found and (only when armed) forgot.
8485
+ *
8486
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8487
+ * walk that saw a fraction of the location is visible in its own report rather
8488
+ * than in the absence of one.
8489
+ */
8490
+ var LedgerWalkReportSchema = object({
8491
+ locationId: string(),
8492
+ applied: boolean(),
8493
+ refused: LedgerWalkRefusalSchema.nullable(),
8494
+ archiveSegments: number().int().nonnegative().nullable(),
8495
+ archiveBytes: number().int().nonnegative().nullable(),
8496
+ hoursClaimed: number().int().nonnegative(),
8497
+ hoursWalked: number().int().nonnegative(),
8498
+ hoursMissing: number().int().nonnegative(),
8499
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8500
+ listings: number().int().nonnegative(),
8501
+ segmentsClaimed: number().int().nonnegative(),
8502
+ ghostSegments: number().int().nonnegative(),
8503
+ ghostBytes: number().int().nonnegative(),
8504
+ ghostHoursWhole: number().int().nonnegative(),
8505
+ forgottenSegments: number().int().nonnegative(),
8506
+ forgottenBytes: number().int().nonnegative(),
8507
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8508
+ orphanFiles: number().int().nonnegative(),
8509
+ orphanSample: array(string()).readonly(),
8510
+ hoursSkipped: number().int().nonnegative(),
8511
+ skippedByReason: LedgerWalkSkipCountsSchema,
8512
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8513
+ bounded: boolean(),
8514
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8515
+ });
8385
8516
  /** How many rows a media pass would still act on against a given target — the
8386
8517
  * media lane's denominator AND its residue, from ONE derivation so the two can
8387
8518
  * never disagree. `null` = the count could not be taken. */
8388
8519
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8389
8520
  var RelocatableMediaCountInputSchema = object({
8390
8521
  toLocationId: string().min(1),
8522
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8523
+ fromLocationId: string().optional(),
8391
8524
  /** Omitted = `move`. */
8392
8525
  mode: MediaRelocateModeSchema.optional()
8393
8526
  });
8394
8527
  /**
8528
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8529
+ * ghost ledger entries on frozen footage locations.
8530
+ *
8531
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8532
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8533
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8534
+ * with no operator-visible status.
8535
+ */
8536
+ var StorageCleanupPhaseSchema = _enum([
8537
+ "orphans",
8538
+ "debug-media",
8539
+ "ghost-ledger",
8540
+ "done",
8541
+ "failed",
8542
+ "cancelled"
8543
+ ]);
8544
+ var StorageCleanupInputSchema = object({
8545
+ /** Also walk motion stills / track filmstrips. Off by default. */
8546
+ includeDebugMedia: boolean().optional() });
8547
+ var StorageCleanupJobSchema = object({
8548
+ jobId: string(),
8549
+ phase: StorageCleanupPhaseSchema,
8550
+ includeDebugMedia: boolean(),
8551
+ orphansReclaimed: number().int().nonnegative(),
8552
+ orphanBytesReclaimed: number().int().nonnegative(),
8553
+ debugMediaReclaimed: number().int().nonnegative(),
8554
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8555
+ ghostsForgotten: number().int().nonnegative(),
8556
+ ghostBytesForgotten: number().int().nonnegative(),
8557
+ /** Short operator-facing line: current collection, pass, or location. */
8558
+ detail: string().nullable(),
8559
+ cancelRequested: boolean(),
8560
+ startedAt: number(),
8561
+ updatedAt: number(),
8562
+ finishedAt: number().nullable(),
8563
+ error: string().nullable()
8564
+ });
8565
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8566
+ /**
8395
8567
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8396
8568
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8397
8569
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8419,11 +8591,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8419
8591
  * The default location for a type uses `id === <type>:default` by
8420
8592
  * convention (the bare type ref like `'backups'` resolves to it).
8421
8593
  *
8422
- * `isSystem: true` marks a location as orchestrator-seeded and
8423
- * undeletable. The bootstrap-installed defaults (one per type) carry
8424
- * this flag; operator-added locations don't. Editing the config of
8425
- * a system location is allowed (path migration, provider swap) but
8426
- * deleting it is rejected at the cap level.
8594
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8595
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8596
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8597
+ * / last-enabled, not on this bit.
8427
8598
  */
8428
8599
  var StorageLocationSchema = object({
8429
8600
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -12815,6 +12986,12 @@ method(object({
12815
12986
  }), _void(), {
12816
12987
  kind: "mutation",
12817
12988
  auth: "admin"
12989
+ }), method(object({
12990
+ from: string(),
12991
+ to: string()
12992
+ }), object({ moved: number() }), {
12993
+ kind: "mutation",
12994
+ auth: "admin"
12818
12995
  }), method(object({
12819
12996
  deviceId: number(),
12820
12997
  disabled: boolean()
@@ -18745,53 +18922,15 @@ var RecentTracksPageSchema = object({
18745
18922
  /** Cursor for the next page, or null when this page is the last. */
18746
18923
  nextCursor: string().nullable()
18747
18924
  });
18748
- var LIST_GROUPS_DEFAULT_LIMIT = 40;
18749
- var LIST_GROUPS_MAX_LIMIT = 100;
18750
- var AnalyticsGroupRecordSchema = object({
18751
- id: string(),
18752
- deviceId: number().int(),
18753
- openedAt: number().int(),
18754
- closedAt: number().int(),
18755
- timestamp: number().int(),
18756
- memberCount: number().int(),
18757
- memberTrackIds: array(string()).readonly(),
18758
- className: string(),
18759
- classes: array(string()).readonly(),
18760
- /** Relative event-media path, or null when the group has no picture yet. */
18761
- mediaUrl: string().nullable(),
18762
- singleton: boolean()
18763
- });
18764
- var AnalyticsGroupMemberSchema = object({
18765
- trackId: string(),
18766
- deviceId: number().int(),
18767
- className: string(),
18768
- firstSeen: number().int(),
18769
- lastSeen: number().int(),
18770
- mediaUrl: string().nullable()
18771
- });
18772
- var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
18773
- var ListGroupsQueryInput = object({
18774
- /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
18775
- deviceIds: array(number()),
18776
- /** Window lower bound on `closedAt` (inclusive). */
18777
- since: number().optional(),
18778
- /** Window upper bound on `openedAt` (inclusive). */
18779
- until: number().optional(),
18780
- limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
18781
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
18782
- cursor: string().optional()
18783
- });
18784
- var ListGroupsPageSchema = object({
18785
- groups: array(AnalyticsGroupRecordSchema).readonly(),
18786
- nextCursor: string().nullable()
18787
- });
18925
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
18926
+ var KEY_EVENTS_MAX_LIMIT = 200;
18788
18927
  var KeyEventQueryInput = object({
18789
18928
  deviceId: number(),
18790
18929
  /** Window lower bound (track firstSeen ≥ since). */
18791
18930
  since: number(),
18792
18931
  /** Window upper bound (track firstSeen ≤ until). */
18793
18932
  until: number(),
18794
- limit: number().int().min(1).max(200).default(50),
18933
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18795
18934
  /** Drop tracks scoring below this importance. */
18796
18935
  minImportance: number().min(0).max(1).optional(),
18797
18936
  /** Restrict to a single class (e.g. 'person'). */
@@ -18813,6 +18952,32 @@ var KeyEventSchema = object({
18813
18952
  ...TrackFlagFields,
18814
18953
  ...TrackRetrainFields
18815
18954
  });
18955
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
18956
+ var KeyEventBatchQueryInput = object({
18957
+ deviceIds: array(number()).min(1).max(200),
18958
+ since: number(),
18959
+ until: number(),
18960
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
18961
+ * across the set, which would let a busy camera starve a quiet one of its
18962
+ * rows and change what the merged feed contains. */
18963
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18964
+ minImportance: number().min(0).max(1).optional(),
18965
+ classFilter: string().optional()
18966
+ });
18967
+ /**
18968
+ * One camera's key events in a batch answer.
18969
+ *
18970
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
18971
+ * error rather than throwing, so a camera whose store read failed and one with
18972
+ * no events in the window were ALREADY indistinguishable per camera — the
18973
+ * batch does not make that worse, and the row keeps the deviceId the single
18974
+ * method's output never carried (the caller used to stamp it from the fan-out
18975
+ * key, which only worked because there was one query per camera).
18976
+ */
18977
+ var KeyEventsForDeviceSchema = object({
18978
+ deviceId: number(),
18979
+ events: array(KeyEventSchema).readonly()
18980
+ });
18816
18981
  object({
18817
18982
  trackId: string(),
18818
18983
  className: string(),
@@ -18860,9 +19025,7 @@ var TrackCascadeCountsSchema = object({
18860
19025
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
18861
19026
  plates: number().int(),
18862
19027
  /** Per-track CLIP search vectors removed (best-effort). */
18863
- embeddings: number().int(),
18864
- /** Group membership + group rows removed with their last member (best-effort). */
18865
- groups: number().int()
19028
+ embeddings: number().int()
18866
19029
  });
18867
19030
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
18868
19031
  var DiskReconcileCountsSchema = object({
@@ -19032,6 +19195,47 @@ var RebuildStatusSchema = object({
19032
19195
  /** Present when the pass ended by throwing. */
19033
19196
  error: string().nullable()
19034
19197
  });
19198
+ /**
19199
+ * Acknowledgement that a debug-media reclaim STARTED.
19200
+ *
19201
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
19202
+ * it runs detached and this returns immediately. Awaiting it is how the
19203
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
19204
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
19205
+ */
19206
+ var MediaReclaimStartResultSchema = object({
19207
+ started: boolean(),
19208
+ /** True when a pass was already running; the new request is ignored. */
19209
+ alreadyRunning: boolean()
19210
+ });
19211
+ var MediaReclaimInputSchema = object({
19212
+ mode: _enum(["report", "reclaim"]).default("report"),
19213
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
19214
+ deviceIds: array(number().int()).min(1).optional(),
19215
+ restart: boolean().optional(),
19216
+ pageSize: number().int().min(50).max(5e3).optional(),
19217
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
19218
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
19219
+ maxBytesPerRun: number().int().min(1).optional(),
19220
+ budgetMinutes: number().int().min(1).max(720).optional(),
19221
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
19222
+ graceMinutes: number().int().min(1).max(10080).optional()
19223
+ });
19224
+ var MediaReclaimStatusSchema = object({
19225
+ running: boolean(),
19226
+ mode: _enum(["report", "reclaim"]).nullable(),
19227
+ totalExamined: number(),
19228
+ totalEligible: number(),
19229
+ totalReclaimed: number(),
19230
+ totalBytesReclaimed: number(),
19231
+ totalRefused: number(),
19232
+ /** Device+scope windows finished in this pass. */
19233
+ devicesDone: number(),
19234
+ complete: boolean().nullable(),
19235
+ startedAtMs: number().nullable(),
19236
+ finishedAtMs: number().nullable(),
19237
+ error: string().nullable()
19238
+ });
19035
19239
  var ReplayFrameInputSchema = object({
19036
19240
  timestamp: number(),
19037
19241
  frame: PipelineRunResultBridge
@@ -19070,10 +19274,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19070
19274
  * stationary registry). Default false: the timeline lists passages,
19071
19275
  * not parking records (operator decision, 2026-08-15). */
19072
19276
  includeStationary: boolean().optional()
19073
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
19074
- deviceId: number(),
19075
- groupId: string().min(1)
19076
- }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19277
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19077
19278
  kind: "mutation",
19078
19279
  auth: "admin"
19079
19280
  }), 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({
@@ -19082,7 +19283,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19082
19283
  until: number().optional(),
19083
19284
  kinds: array(string()).optional(),
19084
19285
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19085
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19286
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19086
19287
  deviceId: number(),
19087
19288
  since: number(),
19088
19289
  until: number(),
@@ -19173,6 +19374,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19173
19374
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19174
19375
  kind: "query",
19175
19376
  auth: "admin"
19377
+ }), method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
19378
+ kind: "mutation",
19379
+ auth: "admin"
19380
+ }), method(object({}), MediaReclaimStatusSchema, {
19381
+ kind: "query",
19382
+ auth: "admin"
19176
19383
  }), method(object({ deviceIds: array(number()).optional() }), TrainingExportSummarySchema, {
19177
19384
  kind: "query",
19178
19385
  auth: "admin"
@@ -21143,7 +21350,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21143
21350
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21144
21351
  kind: "mutation",
21145
21352
  auth: "admin"
21146
- });
21353
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
21354
+ kind: "mutation",
21355
+ auth: "admin"
21356
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21357
+ kind: "mutation",
21358
+ auth: "admin"
21359
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21147
21360
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21148
21361
  providerId: string().min(1),
21149
21362
  displayName: string().min(1),
@@ -26521,6 +26734,33 @@ var RecordingRebalanceInputSchema = object({
26521
26734
  minMoveGb: number().min(0).optional()
26522
26735
  });
26523
26736
  /**
26737
+ * Operator-facing placement of one camera onto a recordings location.
26738
+ *
26739
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
26740
+ * Auto (the planner may move this camera). `locationId` is where high/mid
26741
+ * currently write — the plan, which may disagree with the pin when Auto.
26742
+ */
26743
+ var RecordingDevicePlacementSchema = object({
26744
+ deviceId: number().int(),
26745
+ profile: string(),
26746
+ locationId: string()
26747
+ });
26748
+ var RecordingDevicePinSchema = object({
26749
+ deviceId: number().int(),
26750
+ /** Recordings-class location this camera is pinned to. */
26751
+ locationId: string()
26752
+ });
26753
+ var RecordingPlacementViewSchema = object({
26754
+ assignments: array(RecordingDevicePlacementSchema),
26755
+ pins: array(RecordingDevicePinSchema),
26756
+ defaultLocations: record(string(), string())
26757
+ });
26758
+ var RecordingSetDevicePlacementInputSchema = object({
26759
+ deviceId: number().int(),
26760
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
26761
+ locationId: string().nullable()
26762
+ });
26763
+ /**
26524
26764
  * Result of locating footage at a wall-clock instant for one device/profile.
26525
26765
  * `segment` carries the covering segment's window; `gap` reports the forward
26526
26766
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -26734,6 +26974,9 @@ method(object({
26734
26974
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26735
26975
  kind: "query",
26736
26976
  auth: "admin"
26977
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
26978
+ kind: "mutation",
26979
+ auth: "admin"
26737
26980
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26738
26981
  kind: "mutation",
26739
26982
  auth: "admin"
@@ -26743,6 +26986,12 @@ method(object({
26743
26986
  }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
26744
26987
  kind: "mutation",
26745
26988
  auth: "admin"
26989
+ }), method(object({}), RecordingPlacementViewSchema, {
26990
+ kind: "query",
26991
+ auth: "admin"
26992
+ }), method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
26993
+ kind: "mutation",
26994
+ auth: "admin"
26746
26995
  });
26747
26996
  /**
26748
26997
  * `recording-export` cap — render a footage time range into a single downloadable
@@ -27125,7 +27374,26 @@ var SceneMonitorStatusSchema = object({
27125
27374
  monitors: array(SceneMonitorSchema),
27126
27375
  lastFetchedAt: number()
27127
27376
  });
27128
- DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({
27377
+ /**
27378
+ * One camera's row in a `listScenesBatch` answer.
27379
+ *
27380
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
27381
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
27382
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
27383
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
27384
+ * configured. Fanned out per camera the difference was visible — one query
27385
+ * errored while the others resolved — and a batch that returned only the rows
27386
+ * it managed would have destroyed it, silently, by making an unreachable camera
27387
+ * indistinguishable from one that answered `monitors: []`.
27388
+ *
27389
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
27390
+ * could not be read"; `status.monitors: []` means "read, and it has none".
27391
+ */
27392
+ var SceneMonitorStatusForDeviceSchema = object({
27393
+ deviceId: number(),
27394
+ status: SceneMonitorStatusSchema.nullable()
27395
+ });
27396
+ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
27129
27397
  deviceId: number(),
27130
27398
  label: string(),
27131
27399
  roi: MaskRectShapeSchema,
@@ -28449,6 +28717,27 @@ var CameraOccupancySnapshotSchema = object({
28449
28717
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
28450
28718
  });
28451
28719
  /**
28720
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
28721
+ *
28722
+ * THREE outcomes, and the single-camera method could only express two of them
28723
+ * because `snapshot: null` was already spoken for:
28724
+ *
28725
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
28726
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
28727
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
28728
+ * - `read: 'unreadable'` — the owner could not answer for this
28729
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
28730
+ *
28731
+ * Collapsing the last two is the failure this field exists to prevent: a
28732
+ * hydration that threw would otherwise render as an empty Stationary section,
28733
+ * which is a definite claim about a camera nobody could read.
28734
+ */
28735
+ var CameraOccupancySnapshotForDeviceSchema = object({
28736
+ deviceId: number(),
28737
+ read: _enum(["read", "unreadable"]),
28738
+ snapshot: CameraOccupancySnapshotSchema.nullable()
28739
+ });
28740
+ /**
28452
28741
  * Time-series resolution. The history methods return one bucket per
28453
28742
  * step over the requested range. Smaller resolutions cost more
28454
28743
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -28472,7 +28761,7 @@ var HistoryPointSchema = object({
28472
28761
  /** Object count averaged over the bucket (rounded to nearest integer). */
28473
28762
  count: number().int().nonnegative()
28474
28763
  });
28475
- DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
28764
+ DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
28476
28765
  deviceId: number(),
28477
28766
  zoneId: string(),
28478
28767
  className: string().optional()
@@ -30073,6 +30362,12 @@ Object.freeze({
30073
30362
  addonId: null,
30074
30363
  access: "delete"
30075
30364
  },
30365
+ "deviceManager.renameLocation": {
30366
+ capName: "device-manager",
30367
+ capScope: "system",
30368
+ addonId: null,
30369
+ access: "create"
30370
+ },
30076
30371
  "deviceManager.runDeviceAction": {
30077
30372
  capName: "device-manager",
30078
30373
  capScope: "system",
@@ -31765,13 +32060,19 @@ Object.freeze({
31765
32060
  addonId: null,
31766
32061
  access: "view"
31767
32062
  },
31768
- "pipelineAnalytics.getGroup": {
32063
+ "pipelineAnalytics.getKeyEvents": {
31769
32064
  capName: "pipeline-analytics",
31770
32065
  capScope: "device",
31771
32066
  addonId: null,
31772
32067
  access: "view"
31773
32068
  },
31774
- "pipelineAnalytics.getKeyEvents": {
32069
+ "pipelineAnalytics.getKeyEventsBatch": {
32070
+ capName: "pipeline-analytics",
32071
+ capScope: "device",
32072
+ addonId: null,
32073
+ access: "view"
32074
+ },
32075
+ "pipelineAnalytics.getMediaReclaimStatus": {
31775
32076
  capName: "pipeline-analytics",
31776
32077
  capScope: "device",
31777
32078
  addonId: null,
@@ -31861,12 +32162,6 @@ Object.freeze({
31861
32162
  addonId: null,
31862
32163
  access: "view"
31863
32164
  },
31864
- "pipelineAnalytics.listGroups": {
31865
- capName: "pipeline-analytics",
31866
- capScope: "device",
31867
- addonId: null,
31868
- access: "view"
31869
- },
31870
32165
  "pipelineAnalytics.listOpsLog": {
31871
32166
  capName: "pipeline-analytics",
31872
32167
  capScope: "device",
@@ -31951,6 +32246,12 @@ Object.freeze({
31951
32246
  addonId: null,
31952
32247
  access: "create"
31953
32248
  },
32249
+ "pipelineAnalytics.reclaimDebugMedia": {
32250
+ capName: "pipeline-analytics",
32251
+ capScope: "device",
32252
+ addonId: null,
32253
+ access: "create"
32254
+ },
31954
32255
  "pipelineAnalytics.reconcileFromDisk": {
31955
32256
  capName: "pipeline-analytics",
31956
32257
  capScope: "device",
@@ -32875,6 +33176,12 @@ Object.freeze({
32875
33176
  addonId: null,
32876
33177
  access: "view"
32877
33178
  },
33179
+ "recording.getPlacement": {
33180
+ capName: "recording",
33181
+ capScope: "system",
33182
+ addonId: null,
33183
+ access: "view"
33184
+ },
32878
33185
  "recording.getPlaybackManifest": {
32879
33186
  capName: "recording",
32880
33187
  capScope: "system",
@@ -32953,6 +33260,12 @@ Object.freeze({
32953
33260
  addonId: null,
32954
33261
  access: "view"
32955
33262
  },
33263
+ "recording.reconcileLedgerAgainstDisk": {
33264
+ capName: "recording",
33265
+ capScope: "system",
33266
+ addonId: null,
33267
+ access: "create"
33268
+ },
32956
33269
  "recording.refreshStorageLocationsForMigration": {
32957
33270
  capName: "recording",
32958
33271
  capScope: "system",
@@ -32995,6 +33308,12 @@ Object.freeze({
32995
33308
  addonId: null,
32996
33309
  access: "create"
32997
33310
  },
33311
+ "recording.setDevicePlacement": {
33312
+ capName: "recording",
33313
+ capScope: "system",
33314
+ addonId: null,
33315
+ access: "create"
33316
+ },
32998
33317
  "recording.startStorageMigrationMove": {
32999
33318
  capName: "recording",
33000
33319
  capScope: "system",
@@ -33079,6 +33398,12 @@ Object.freeze({
33079
33398
  addonId: null,
33080
33399
  access: "view"
33081
33400
  },
33401
+ "sceneMonitor.listScenesBatch": {
33402
+ capName: "scene-monitor",
33403
+ capScope: "device",
33404
+ addonId: null,
33405
+ access: "view"
33406
+ },
33082
33407
  "sceneMonitor.recheckNow": {
33083
33408
  capName: "scene-monitor",
33084
33409
  capScope: "device",
@@ -33433,12 +33758,36 @@ Object.freeze({
33433
33758
  addonId: null,
33434
33759
  access: "create"
33435
33760
  },
33761
+ "storageMigration.cleanupCancel": {
33762
+ capName: "storage-migration",
33763
+ capScope: "system",
33764
+ addonId: null,
33765
+ access: "create"
33766
+ },
33767
+ "storageMigration.cleanupStart": {
33768
+ capName: "storage-migration",
33769
+ capScope: "system",
33770
+ addonId: null,
33771
+ access: "create"
33772
+ },
33773
+ "storageMigration.cleanupStatus": {
33774
+ capName: "storage-migration",
33775
+ capScope: "system",
33776
+ addonId: null,
33777
+ access: "view"
33778
+ },
33436
33779
  "storageMigration.drain": {
33437
33780
  capName: "storage-migration",
33438
33781
  capScope: "system",
33439
33782
  addonId: null,
33440
33783
  access: "create"
33441
33784
  },
33785
+ "storageMigration.history": {
33786
+ capName: "storage-migration",
33787
+ capScope: "system",
33788
+ addonId: null,
33789
+ access: "view"
33790
+ },
33442
33791
  "storageMigration.movers": {
33443
33792
  capName: "storage-migration",
33444
33793
  capScope: "system",
@@ -34435,6 +34784,12 @@ Object.freeze({
34435
34784
  addonId: null,
34436
34785
  access: "view"
34437
34786
  },
34787
+ "zoneAnalytics.getCurrentSnapshotBatch": {
34788
+ capName: "zone-analytics",
34789
+ capScope: "device",
34790
+ addonId: null,
34791
+ access: "view"
34792
+ },
34438
34793
  "zoneAnalytics.getUnzonedHistory": {
34439
34794
  capName: "zone-analytics",
34440
34795
  capScope: "device",
@@ -35429,14 +35784,14 @@ Object.freeze({
35429
35784
  form: "single",
35430
35785
  optional: true
35431
35786
  }],
35432
- "pipelineAnalytics.getGroup": [{
35787
+ "pipelineAnalytics.getKeyEvents": [{
35433
35788
  name: "deviceId",
35434
35789
  form: "single",
35435
35790
  optional: false
35436
35791
  }],
35437
- "pipelineAnalytics.getKeyEvents": [{
35438
- name: "deviceId",
35439
- form: "single",
35792
+ "pipelineAnalytics.getKeyEventsBatch": [{
35793
+ name: "deviceIds",
35794
+ form: "array",
35440
35795
  optional: false
35441
35796
  }],
35442
35797
  "pipelineAnalytics.getMotionEvents": [{
@@ -35494,11 +35849,6 @@ Object.freeze({
35494
35849
  form: "single",
35495
35850
  optional: false
35496
35851
  }],
35497
- "pipelineAnalytics.listGroups": [{
35498
- name: "deviceIds",
35499
- form: "array",
35500
- optional: false
35501
- }],
35502
35852
  "pipelineAnalytics.listOpsLog": [{
35503
35853
  name: "deviceId",
35504
35854
  form: "single",
@@ -35544,6 +35894,11 @@ Object.freeze({
35544
35894
  form: "single",
35545
35895
  optional: true
35546
35896
  }],
35897
+ "pipelineAnalytics.reclaimDebugMedia": [{
35898
+ name: "deviceIds",
35899
+ form: "array",
35900
+ optional: true
35901
+ }],
35547
35902
  "pipelineAnalytics.reconcileFromDisk": [{
35548
35903
  name: "deviceId",
35549
35904
  form: "single",
@@ -35879,6 +36234,11 @@ Object.freeze({
35879
36234
  form: "single",
35880
36235
  optional: false
35881
36236
  }],
36237
+ "recording.reconcileLedgerAgainstDisk": [{
36238
+ name: "deviceId",
36239
+ form: "single",
36240
+ optional: true
36241
+ }],
35882
36242
  "recording.relocateFootage": [{
35883
36243
  name: "deviceId",
35884
36244
  form: "single",
@@ -35904,6 +36264,11 @@ Object.freeze({
35904
36264
  form: "single",
35905
36265
  optional: false
35906
36266
  }],
36267
+ "recording.setDevicePlacement": [{
36268
+ name: "deviceId",
36269
+ form: "single",
36270
+ optional: false
36271
+ }],
35907
36272
  "recording.startStorageMigrationMove": [{
35908
36273
  name: "deviceId",
35909
36274
  form: "single",
@@ -35944,6 +36309,11 @@ Object.freeze({
35944
36309
  form: "single",
35945
36310
  optional: false
35946
36311
  }],
36312
+ "sceneMonitor.listScenesBatch": [{
36313
+ name: "deviceIds",
36314
+ form: "array",
36315
+ optional: false
36316
+ }],
35947
36317
  "sceneMonitor.recheckNow": [{
35948
36318
  name: "deviceId",
35949
36319
  form: "single",
@@ -36205,6 +36575,11 @@ Object.freeze({
36205
36575
  form: "single",
36206
36576
  optional: false
36207
36577
  }],
36578
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
36579
+ name: "deviceIds",
36580
+ form: "array",
36581
+ optional: false
36582
+ }],
36208
36583
  "zoneAnalytics.getUnzonedHistory": [{
36209
36584
  name: "deviceId",
36210
36585
  form: "single",