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