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