@camstack/addon-provider-onvif 1.2.47 → 1.2.49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/addon.js +450 -75
  2. package/dist/addon.mjs +450 -75
  3. package/package.json +1 -1
package/dist/addon.js CHANGED
@@ -8017,6 +8017,20 @@ var RelocateJobSchema = object({
8017
8017
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8018
8018
  */
8019
8019
  rowsReconciled: number().int().nonnegative().optional(),
8020
+ /**
8021
+ * Rows this run FORGOT because the file they name is not on disk.
8022
+ *
8023
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8024
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8025
+ * and the durable row is dropped through the same channel eviction uses. It
8026
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8027
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8028
+ * the same failure as one that quietly skips them (D295).
8029
+ *
8030
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8031
+ * ledger claimed 5.65 GB of footage that no longer existed.
8032
+ */
8033
+ rowsForgotten: number().int().nonnegative().optional(),
8020
8034
  startedAt: number(),
8021
8035
  finishedAt: number().nullable(),
8022
8036
  error: string().nullable()
@@ -8081,6 +8095,13 @@ var MediaRelocateModeSchema = _enum([
8081
8095
  ]);
8082
8096
  var RelocateMediaInputSchema = object({
8083
8097
  toLocationId: string(),
8098
+ /**
8099
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8100
+ * every row that is not already on `toLocationId` (the historical
8101
+ * behaviour). A named source is what a from→to migration needs: without it
8102
+ * "move events off disk 2" also emptied disk 1.
8103
+ */
8104
+ fromLocationId: string().optional(),
8084
8105
  throttleMbps: number().min(1).max(1e3).optional(),
8085
8106
  /** Omitted = `move`, the pre-existing behaviour. */
8086
8107
  mode: MediaRelocateModeSchema.optional()
@@ -8148,6 +8169,19 @@ var StorageMigrationDestinationsSchema = object({
8148
8169
  galleryMedia: string().min(1).optional()
8149
8170
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8150
8171
  /**
8172
+ * Optional named source per class. Omitted = the class's current default
8173
+ * (the historical behaviour). A named source that is NOT the default is a
8174
+ * drain of that disk: bytes move, the default stays, and the source is
8175
+ * disabled when the move finishes.
8176
+ */
8177
+ var StorageMigrationSourcesSchema = object({
8178
+ recordings: string().min(1).optional(),
8179
+ recordingsLow: string().min(1).optional(),
8180
+ eventMedia: string().min(1).optional(),
8181
+ backups: string().min(1).optional(),
8182
+ galleryMedia: string().min(1).optional()
8183
+ }).optional();
8184
+ /**
8151
8185
  * How a migration sequences the cutover against the byte move.
8152
8186
  *
8153
8187
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8169,6 +8203,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8169
8203
  /** Shared input for planning and starting an orchestrated storage migration. */
8170
8204
  var StorageMigrationInputSchema = object({
8171
8205
  destinations: StorageMigrationDestinationsSchema,
8206
+ /** Omitted = each class's current default. */
8207
+ sources: StorageMigrationSourcesSchema,
8172
8208
  throttleMbps: number().min(1).max(1e3).optional(),
8173
8209
  /** Omitted = `blocking`, which stays the default. */
8174
8210
  mode: StorageMigrationModeSchema.optional()
@@ -8248,6 +8284,13 @@ var StorageMigrationMoveSchema = object({
8248
8284
  storageClass: StorageMigrationClassSchema,
8249
8285
  fromLocationId: string(),
8250
8286
  toLocationId: string(),
8287
+ /**
8288
+ * True when `from` was NOT the class default at plan time. The move still
8289
+ * copies bytes, but the default is left alone and the source is disabled
8290
+ * once the copy verifies. Absent on jobs planned before this field existed
8291
+ * — those jobs always repointed, which is `false`.
8292
+ */
8293
+ freezeSource: boolean().optional(),
8251
8294
  moverJobId: string().nullable(),
8252
8295
  state: RelocateJobStateSchema.nullable(),
8253
8296
  error: string().nullable(),
@@ -8261,6 +8304,7 @@ var StorageMigrationJobSchema = object({
8261
8304
  * can tell a seconds-long cutover from a thirty-hour one. */
8262
8305
  mode: StorageMigrationModeSchema,
8263
8306
  destinations: StorageMigrationDestinationsSchema,
8307
+ sources: StorageMigrationSourcesSchema,
8264
8308
  throttleMbps: number(),
8265
8309
  moves: array(StorageMigrationMoveSchema),
8266
8310
  pauseLeaseId: string().nullable(),
@@ -8286,6 +8330,7 @@ var StorageMigrationFindingSchema = object({
8286
8330
  });
8287
8331
  var StorageMigrationPlanSchema = object({
8288
8332
  destinations: StorageMigrationDestinationsSchema,
8333
+ sources: StorageMigrationSourcesSchema,
8289
8334
  /** The mode this plan was built for. A plan is only valid for its mode: the
8290
8335
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8291
8336
  * it. */
@@ -8293,7 +8338,8 @@ var StorageMigrationPlanSchema = object({
8293
8338
  moves: array(object({
8294
8339
  storageClass: StorageMigrationClassSchema,
8295
8340
  fromLocationId: string(),
8296
- toLocationId: string()
8341
+ toLocationId: string(),
8342
+ freezeSource: boolean().optional()
8297
8343
  })),
8298
8344
  findings: array(StorageMigrationFindingSchema)
8299
8345
  });
@@ -8380,16 +8426,142 @@ var RelocateResidueSchema = object({
8380
8426
  segments: number().int().nonnegative(),
8381
8427
  bytes: number().int().nonnegative()
8382
8428
  }).nullable();
8429
+ /**
8430
+ * Ask one location whether its durable hour rows describe the disk — the walk
8431
+ * (D319).
8432
+ *
8433
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8434
+ * missing tool is the question, and the dry run is how they sanity-check the
8435
+ * destructive run before authorising it.
8436
+ */
8437
+ var LedgerWalkInputSchema = object({
8438
+ locationId: string().min(1),
8439
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8440
+ apply: boolean().optional(),
8441
+ /** Narrow to one camera. */
8442
+ deviceId: number().int().positive().optional(),
8443
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8444
+ profiles: array(string().min(1)).optional()
8445
+ });
8446
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8447
+ var LedgerWalkRefusalSchema = _enum([
8448
+ "location-unknown",
8449
+ "source-writable",
8450
+ "no-ledger",
8451
+ "archive-unreadable",
8452
+ "anchor-absent",
8453
+ "anchor-unreadable",
8454
+ "anchor-moved"
8455
+ ]);
8456
+ _enum([
8457
+ "live-tail",
8458
+ "listing-error",
8459
+ "path-mismatch",
8460
+ "durable-refused"
8461
+ ]);
8462
+ /** Every skip reason, always present, always a number — so a reason that never
8463
+ * fired reports as zero rather than absent and the report shape is constant
8464
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8465
+ var LedgerWalkSkipCountsSchema = object({
8466
+ "live-tail": number().int().nonnegative(),
8467
+ "listing-error": number().int().nonnegative(),
8468
+ "path-mismatch": number().int().nonnegative(),
8469
+ "durable-refused": number().int().nonnegative()
8470
+ });
8471
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8472
+ var LedgerWalkDeviceReportSchema = object({
8473
+ deviceId: number().int(),
8474
+ hoursWalked: number().int().nonnegative(),
8475
+ hoursMissing: number().int().nonnegative(),
8476
+ ghostSegments: number().int().nonnegative(),
8477
+ ghostBytes: number().int().nonnegative(),
8478
+ forgottenSegments: number().int().nonnegative(),
8479
+ orphanFiles: number().int().nonnegative()
8480
+ });
8481
+ /**
8482
+ * What one walk claimed, listed, found and (only when armed) forgot.
8483
+ *
8484
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8485
+ * walk that saw a fraction of the location is visible in its own report rather
8486
+ * than in the absence of one.
8487
+ */
8488
+ var LedgerWalkReportSchema = object({
8489
+ locationId: string(),
8490
+ applied: boolean(),
8491
+ refused: LedgerWalkRefusalSchema.nullable(),
8492
+ archiveSegments: number().int().nonnegative().nullable(),
8493
+ archiveBytes: number().int().nonnegative().nullable(),
8494
+ hoursClaimed: number().int().nonnegative(),
8495
+ hoursWalked: number().int().nonnegative(),
8496
+ hoursMissing: number().int().nonnegative(),
8497
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8498
+ listings: number().int().nonnegative(),
8499
+ segmentsClaimed: number().int().nonnegative(),
8500
+ ghostSegments: number().int().nonnegative(),
8501
+ ghostBytes: number().int().nonnegative(),
8502
+ ghostHoursWhole: number().int().nonnegative(),
8503
+ forgottenSegments: number().int().nonnegative(),
8504
+ forgottenBytes: number().int().nonnegative(),
8505
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8506
+ orphanFiles: number().int().nonnegative(),
8507
+ orphanSample: array(string()).readonly(),
8508
+ hoursSkipped: number().int().nonnegative(),
8509
+ skippedByReason: LedgerWalkSkipCountsSchema,
8510
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8511
+ bounded: boolean(),
8512
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8513
+ });
8383
8514
  /** How many rows a media pass would still act on against a given target — the
8384
8515
  * media lane's denominator AND its residue, from ONE derivation so the two can
8385
8516
  * never disagree. `null` = the count could not be taken. */
8386
8517
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8387
8518
  var RelocatableMediaCountInputSchema = object({
8388
8519
  toLocationId: string().min(1),
8520
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8521
+ fromLocationId: string().optional(),
8389
8522
  /** Omitted = `move`. */
8390
8523
  mode: MediaRelocateModeSchema.optional()
8391
8524
  });
8392
8525
  /**
8526
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8527
+ * ghost ledger entries on frozen footage locations.
8528
+ *
8529
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8530
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8531
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8532
+ * with no operator-visible status.
8533
+ */
8534
+ var StorageCleanupPhaseSchema = _enum([
8535
+ "orphans",
8536
+ "debug-media",
8537
+ "ghost-ledger",
8538
+ "done",
8539
+ "failed",
8540
+ "cancelled"
8541
+ ]);
8542
+ var StorageCleanupInputSchema = object({
8543
+ /** Also walk motion stills / track filmstrips. Off by default. */
8544
+ includeDebugMedia: boolean().optional() });
8545
+ var StorageCleanupJobSchema = object({
8546
+ jobId: string(),
8547
+ phase: StorageCleanupPhaseSchema,
8548
+ includeDebugMedia: boolean(),
8549
+ orphansReclaimed: number().int().nonnegative(),
8550
+ orphanBytesReclaimed: number().int().nonnegative(),
8551
+ debugMediaReclaimed: number().int().nonnegative(),
8552
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8553
+ ghostsForgotten: number().int().nonnegative(),
8554
+ ghostBytesForgotten: number().int().nonnegative(),
8555
+ /** Short operator-facing line: current collection, pass, or location. */
8556
+ detail: string().nullable(),
8557
+ cancelRequested: boolean(),
8558
+ startedAt: number(),
8559
+ updatedAt: number(),
8560
+ finishedAt: number().nullable(),
8561
+ error: string().nullable()
8562
+ });
8563
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8564
+ /**
8393
8565
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8394
8566
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8395
8567
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8417,11 +8589,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8417
8589
  * The default location for a type uses `id === <type>:default` by
8418
8590
  * convention (the bare type ref like `'backups'` resolves to it).
8419
8591
  *
8420
- * `isSystem: true` marks a location as orchestrator-seeded and
8421
- * undeletable. The bootstrap-installed defaults (one per type) carry
8422
- * this flag; operator-added locations don't. Editing the config of
8423
- * a system location is allowed (path migration, provider swap) but
8424
- * deleting it is rejected at the cap level.
8592
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8593
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8594
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8595
+ * / last-enabled, not on this bit.
8425
8596
  */
8426
8597
  var StorageLocationSchema = object({
8427
8598
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -12738,6 +12909,12 @@ method(object({
12738
12909
  }), _void(), {
12739
12910
  kind: "mutation",
12740
12911
  auth: "admin"
12912
+ }), method(object({
12913
+ from: string(),
12914
+ to: string()
12915
+ }), object({ moved: number() }), {
12916
+ kind: "mutation",
12917
+ auth: "admin"
12741
12918
  }), method(object({
12742
12919
  deviceId: number(),
12743
12920
  disabled: boolean()
@@ -18668,53 +18845,15 @@ var RecentTracksPageSchema = object({
18668
18845
  /** Cursor for the next page, or null when this page is the last. */
18669
18846
  nextCursor: string().nullable()
18670
18847
  });
18671
- var LIST_GROUPS_DEFAULT_LIMIT = 40;
18672
- var LIST_GROUPS_MAX_LIMIT = 100;
18673
- var AnalyticsGroupRecordSchema = object({
18674
- id: string(),
18675
- deviceId: number().int(),
18676
- openedAt: number().int(),
18677
- closedAt: number().int(),
18678
- timestamp: number().int(),
18679
- memberCount: number().int(),
18680
- memberTrackIds: array(string()).readonly(),
18681
- className: string(),
18682
- classes: array(string()).readonly(),
18683
- /** Relative event-media path, or null when the group has no picture yet. */
18684
- mediaUrl: string().nullable(),
18685
- singleton: boolean()
18686
- });
18687
- var AnalyticsGroupMemberSchema = object({
18688
- trackId: string(),
18689
- deviceId: number().int(),
18690
- className: string(),
18691
- firstSeen: number().int(),
18692
- lastSeen: number().int(),
18693
- mediaUrl: string().nullable()
18694
- });
18695
- var AnalyticsGroupDetailSchema = AnalyticsGroupRecordSchema.extend({ members: array(AnalyticsGroupMemberSchema).readonly() });
18696
- var ListGroupsQueryInput = object({
18697
- /** Devices to merge. An empty array yields `{ groups: [], nextCursor: null }`. */
18698
- deviceIds: array(number()),
18699
- /** Window lower bound on `closedAt` (inclusive). */
18700
- since: number().optional(),
18701
- /** Window upper bound on `openedAt` (inclusive). */
18702
- until: number().optional(),
18703
- limit: number().int().min(1).max(LIST_GROUPS_MAX_LIMIT).default(LIST_GROUPS_DEFAULT_LIMIT),
18704
- /** Opaque continuation cursor from a previous page's `nextCursor`. */
18705
- cursor: string().optional()
18706
- });
18707
- var ListGroupsPageSchema = object({
18708
- groups: array(AnalyticsGroupRecordSchema).readonly(),
18709
- nextCursor: string().nullable()
18710
- });
18848
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
18849
+ var KEY_EVENTS_MAX_LIMIT = 200;
18711
18850
  var KeyEventQueryInput = object({
18712
18851
  deviceId: number(),
18713
18852
  /** Window lower bound (track firstSeen ≥ since). */
18714
18853
  since: number(),
18715
18854
  /** Window upper bound (track firstSeen ≤ until). */
18716
18855
  until: number(),
18717
- limit: number().int().min(1).max(200).default(50),
18856
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18718
18857
  /** Drop tracks scoring below this importance. */
18719
18858
  minImportance: number().min(0).max(1).optional(),
18720
18859
  /** Restrict to a single class (e.g. 'person'). */
@@ -18736,6 +18875,32 @@ var KeyEventSchema = object({
18736
18875
  ...TrackFlagFields,
18737
18876
  ...TrackRetrainFields
18738
18877
  });
18878
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
18879
+ var KeyEventBatchQueryInput = object({
18880
+ deviceIds: array(number()).min(1).max(200),
18881
+ since: number(),
18882
+ until: number(),
18883
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
18884
+ * across the set, which would let a busy camera starve a quiet one of its
18885
+ * rows and change what the merged feed contains. */
18886
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
18887
+ minImportance: number().min(0).max(1).optional(),
18888
+ classFilter: string().optional()
18889
+ });
18890
+ /**
18891
+ * One camera's key events in a batch answer.
18892
+ *
18893
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
18894
+ * error rather than throwing, so a camera whose store read failed and one with
18895
+ * no events in the window were ALREADY indistinguishable per camera — the
18896
+ * batch does not make that worse, and the row keeps the deviceId the single
18897
+ * method's output never carried (the caller used to stamp it from the fan-out
18898
+ * key, which only worked because there was one query per camera).
18899
+ */
18900
+ var KeyEventsForDeviceSchema = object({
18901
+ deviceId: number(),
18902
+ events: array(KeyEventSchema).readonly()
18903
+ });
18739
18904
  object({
18740
18905
  trackId: string(),
18741
18906
  className: string(),
@@ -18783,9 +18948,7 @@ var TrackCascadeCountsSchema = object({
18783
18948
  /** Unassigned plate reads removed (best-effort; plate leg deferred to plate-intelligence). */
18784
18949
  plates: number().int(),
18785
18950
  /** Per-track CLIP search vectors removed (best-effort). */
18786
- embeddings: number().int(),
18787
- /** Group membership + group rows removed with their last member (best-effort). */
18788
- groups: number().int()
18951
+ embeddings: number().int()
18789
18952
  });
18790
18953
  /** Disk-wins reconcile: media rows whose blobs are gone, then empty tracks. */
18791
18954
  var DiskReconcileCountsSchema = object({
@@ -18955,6 +19118,47 @@ var RebuildStatusSchema = object({
18955
19118
  /** Present when the pass ended by throwing. */
18956
19119
  error: string().nullable()
18957
19120
  });
19121
+ /**
19122
+ * Acknowledgement that a debug-media reclaim STARTED.
19123
+ *
19124
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
19125
+ * it runs detached and this returns immediately. Awaiting it is how the
19126
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
19127
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
19128
+ */
19129
+ var MediaReclaimStartResultSchema = object({
19130
+ started: boolean(),
19131
+ /** True when a pass was already running; the new request is ignored. */
19132
+ alreadyRunning: boolean()
19133
+ });
19134
+ var MediaReclaimInputSchema = object({
19135
+ mode: _enum(["report", "reclaim"]).default("report"),
19136
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
19137
+ deviceIds: array(number().int()).min(1).optional(),
19138
+ restart: boolean().optional(),
19139
+ pageSize: number().int().min(50).max(5e3).optional(),
19140
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
19141
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
19142
+ maxBytesPerRun: number().int().min(1).optional(),
19143
+ budgetMinutes: number().int().min(1).max(720).optional(),
19144
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
19145
+ graceMinutes: number().int().min(1).max(10080).optional()
19146
+ });
19147
+ var MediaReclaimStatusSchema = object({
19148
+ running: boolean(),
19149
+ mode: _enum(["report", "reclaim"]).nullable(),
19150
+ totalExamined: number(),
19151
+ totalEligible: number(),
19152
+ totalReclaimed: number(),
19153
+ totalBytesReclaimed: number(),
19154
+ totalRefused: number(),
19155
+ /** Device+scope windows finished in this pass. */
19156
+ devicesDone: number(),
19157
+ complete: boolean().nullable(),
19158
+ startedAtMs: number().nullable(),
19159
+ finishedAtMs: number().nullable(),
19160
+ error: string().nullable()
19161
+ });
18958
19162
  var ReplayFrameInputSchema = object({
18959
19163
  timestamp: number(),
18960
19164
  frame: PipelineRunResultBridge
@@ -18993,10 +19197,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
18993
19197
  * stationary registry). Default false: the timeline lists passages,
18994
19198
  * not parking records (operator decision, 2026-08-15). */
18995
19199
  includeStationary: boolean().optional()
18996
- }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(ListGroupsQueryInput, ListGroupsPageSchema), method(object({
18997
- deviceId: number(),
18998
- groupId: string().min(1)
18999
- }), AnalyticsGroupDetailSchema.nullable()), method(object({ deviceId: number() }), _void(), {
19200
+ }), array(TrackSchema).readonly()), method(RecentTracksQueryInput, RecentTracksPageSchema), method(object({ deviceId: number() }), _void(), {
19000
19201
  kind: "mutation",
19001
19202
  auth: "admin"
19002
19203
  }), 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({
@@ -19005,7 +19206,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19005
19206
  until: number().optional(),
19006
19207
  kinds: array(string()).optional(),
19007
19208
  limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
19008
- }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
19209
+ }), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
19009
19210
  deviceId: number(),
19010
19211
  since: number(),
19011
19212
  until: number(),
@@ -19096,6 +19297,12 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
19096
19297
  }), method(OpsLogQueryInputSchema, array(OpsLogEntrySchema).readonly(), {
19097
19298
  kind: "query",
19098
19299
  auth: "admin"
19300
+ }), method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
19301
+ kind: "mutation",
19302
+ auth: "admin"
19303
+ }), method(object({}), MediaReclaimStatusSchema, {
19304
+ kind: "query",
19305
+ auth: "admin"
19099
19306
  }), method(object({ deviceIds: array(number()).optional() }), TrainingExportSummarySchema, {
19100
19307
  kind: "query",
19101
19308
  auth: "admin"
@@ -21170,7 +21377,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
21170
21377
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
21171
21378
  kind: "mutation",
21172
21379
  auth: "admin"
21173
- });
21380
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
21381
+ kind: "mutation",
21382
+ auth: "admin"
21383
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
21384
+ kind: "mutation",
21385
+ auth: "admin"
21386
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
21174
21387
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
21175
21388
  providerId: string().min(1),
21176
21389
  displayName: string().min(1),
@@ -26590,6 +26803,33 @@ var RecordingRebalanceInputSchema = object({
26590
26803
  minMoveGb: number().min(0).optional()
26591
26804
  });
26592
26805
  /**
26806
+ * Operator-facing placement of one camera onto a recordings location.
26807
+ *
26808
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
26809
+ * Auto (the planner may move this camera). `locationId` is where high/mid
26810
+ * currently write — the plan, which may disagree with the pin when Auto.
26811
+ */
26812
+ var RecordingDevicePlacementSchema = object({
26813
+ deviceId: number().int(),
26814
+ profile: string(),
26815
+ locationId: string()
26816
+ });
26817
+ var RecordingDevicePinSchema = object({
26818
+ deviceId: number().int(),
26819
+ /** Recordings-class location this camera is pinned to. */
26820
+ locationId: string()
26821
+ });
26822
+ var RecordingPlacementViewSchema = object({
26823
+ assignments: array(RecordingDevicePlacementSchema),
26824
+ pins: array(RecordingDevicePinSchema),
26825
+ defaultLocations: record(string(), string())
26826
+ });
26827
+ var RecordingSetDevicePlacementInputSchema = object({
26828
+ deviceId: number().int(),
26829
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
26830
+ locationId: string().nullable()
26831
+ });
26832
+ /**
26593
26833
  * Result of locating footage at a wall-clock instant for one device/profile.
26594
26834
  * `segment` carries the covering segment's window; `gap` reports the forward
26595
26835
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -26803,6 +27043,9 @@ method(object({
26803
27043
  }), method(RelocateResidueInputSchema, RelocateResidueSchema, {
26804
27044
  kind: "query",
26805
27045
  auth: "admin"
27046
+ }), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
27047
+ kind: "mutation",
27048
+ auth: "admin"
26806
27049
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
26807
27050
  kind: "mutation",
26808
27051
  auth: "admin"
@@ -26812,6 +27055,12 @@ method(object({
26812
27055
  }), method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
26813
27056
  kind: "mutation",
26814
27057
  auth: "admin"
27058
+ }), method(object({}), RecordingPlacementViewSchema, {
27059
+ kind: "query",
27060
+ auth: "admin"
27061
+ }), method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
27062
+ kind: "mutation",
27063
+ auth: "admin"
26815
27064
  });
26816
27065
  /**
26817
27066
  * `recording-export` cap — render a footage time range into a single downloadable
@@ -27194,7 +27443,26 @@ var SceneMonitorStatusSchema = object({
27194
27443
  monitors: array(SceneMonitorSchema),
27195
27444
  lastFetchedAt: number()
27196
27445
  });
27197
- DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({
27446
+ /**
27447
+ * One camera's row in a `listScenesBatch` answer.
27448
+ *
27449
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
27450
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
27451
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
27452
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
27453
+ * configured. Fanned out per camera the difference was visible — one query
27454
+ * errored while the others resolved — and a batch that returned only the rows
27455
+ * it managed would have destroyed it, silently, by making an unreachable camera
27456
+ * indistinguishable from one that answered `monitors: []`.
27457
+ *
27458
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
27459
+ * could not be read"; `status.monitors: []` means "read, and it has none".
27460
+ */
27461
+ var SceneMonitorStatusForDeviceSchema = object({
27462
+ deviceId: number(),
27463
+ status: SceneMonitorStatusSchema.nullable()
27464
+ });
27465
+ DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
27198
27466
  deviceId: number(),
27199
27467
  label: string(),
27200
27468
  roi: MaskRectShapeSchema,
@@ -28518,6 +28786,27 @@ var CameraOccupancySnapshotSchema = object({
28518
28786
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
28519
28787
  });
28520
28788
  /**
28789
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
28790
+ *
28791
+ * THREE outcomes, and the single-camera method could only express two of them
28792
+ * because `snapshot: null` was already spoken for:
28793
+ *
28794
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
28795
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
28796
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
28797
+ * - `read: 'unreadable'` — the owner could not answer for this
28798
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
28799
+ *
28800
+ * Collapsing the last two is the failure this field exists to prevent: a
28801
+ * hydration that threw would otherwise render as an empty Stationary section,
28802
+ * which is a definite claim about a camera nobody could read.
28803
+ */
28804
+ var CameraOccupancySnapshotForDeviceSchema = object({
28805
+ deviceId: number(),
28806
+ read: _enum(["read", "unreadable"]),
28807
+ snapshot: CameraOccupancySnapshotSchema.nullable()
28808
+ });
28809
+ /**
28521
28810
  * Time-series resolution. The history methods return one bucket per
28522
28811
  * step over the requested range. Smaller resolutions cost more
28523
28812
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -28541,7 +28830,7 @@ var HistoryPointSchema = object({
28541
28830
  /** Object count averaged over the bucket (rounded to nearest integer). */
28542
28831
  count: number().int().nonnegative()
28543
28832
  });
28544
- DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
28833
+ DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
28545
28834
  deviceId: number(),
28546
28835
  zoneId: string(),
28547
28836
  className: string().optional()
@@ -30552,6 +30841,12 @@ Object.freeze({
30552
30841
  addonId: null,
30553
30842
  access: "delete"
30554
30843
  },
30844
+ "deviceManager.renameLocation": {
30845
+ capName: "device-manager",
30846
+ capScope: "system",
30847
+ addonId: null,
30848
+ access: "create"
30849
+ },
30555
30850
  "deviceManager.runDeviceAction": {
30556
30851
  capName: "device-manager",
30557
30852
  capScope: "system",
@@ -32244,13 +32539,19 @@ Object.freeze({
32244
32539
  addonId: null,
32245
32540
  access: "view"
32246
32541
  },
32247
- "pipelineAnalytics.getGroup": {
32542
+ "pipelineAnalytics.getKeyEvents": {
32248
32543
  capName: "pipeline-analytics",
32249
32544
  capScope: "device",
32250
32545
  addonId: null,
32251
32546
  access: "view"
32252
32547
  },
32253
- "pipelineAnalytics.getKeyEvents": {
32548
+ "pipelineAnalytics.getKeyEventsBatch": {
32549
+ capName: "pipeline-analytics",
32550
+ capScope: "device",
32551
+ addonId: null,
32552
+ access: "view"
32553
+ },
32554
+ "pipelineAnalytics.getMediaReclaimStatus": {
32254
32555
  capName: "pipeline-analytics",
32255
32556
  capScope: "device",
32256
32557
  addonId: null,
@@ -32340,12 +32641,6 @@ Object.freeze({
32340
32641
  addonId: null,
32341
32642
  access: "view"
32342
32643
  },
32343
- "pipelineAnalytics.listGroups": {
32344
- capName: "pipeline-analytics",
32345
- capScope: "device",
32346
- addonId: null,
32347
- access: "view"
32348
- },
32349
32644
  "pipelineAnalytics.listOpsLog": {
32350
32645
  capName: "pipeline-analytics",
32351
32646
  capScope: "device",
@@ -32430,6 +32725,12 @@ Object.freeze({
32430
32725
  addonId: null,
32431
32726
  access: "create"
32432
32727
  },
32728
+ "pipelineAnalytics.reclaimDebugMedia": {
32729
+ capName: "pipeline-analytics",
32730
+ capScope: "device",
32731
+ addonId: null,
32732
+ access: "create"
32733
+ },
32433
32734
  "pipelineAnalytics.reconcileFromDisk": {
32434
32735
  capName: "pipeline-analytics",
32435
32736
  capScope: "device",
@@ -33354,6 +33655,12 @@ Object.freeze({
33354
33655
  addonId: null,
33355
33656
  access: "view"
33356
33657
  },
33658
+ "recording.getPlacement": {
33659
+ capName: "recording",
33660
+ capScope: "system",
33661
+ addonId: null,
33662
+ access: "view"
33663
+ },
33357
33664
  "recording.getPlaybackManifest": {
33358
33665
  capName: "recording",
33359
33666
  capScope: "system",
@@ -33432,6 +33739,12 @@ Object.freeze({
33432
33739
  addonId: null,
33433
33740
  access: "view"
33434
33741
  },
33742
+ "recording.reconcileLedgerAgainstDisk": {
33743
+ capName: "recording",
33744
+ capScope: "system",
33745
+ addonId: null,
33746
+ access: "create"
33747
+ },
33435
33748
  "recording.refreshStorageLocationsForMigration": {
33436
33749
  capName: "recording",
33437
33750
  capScope: "system",
@@ -33474,6 +33787,12 @@ Object.freeze({
33474
33787
  addonId: null,
33475
33788
  access: "create"
33476
33789
  },
33790
+ "recording.setDevicePlacement": {
33791
+ capName: "recording",
33792
+ capScope: "system",
33793
+ addonId: null,
33794
+ access: "create"
33795
+ },
33477
33796
  "recording.startStorageMigrationMove": {
33478
33797
  capName: "recording",
33479
33798
  capScope: "system",
@@ -33558,6 +33877,12 @@ Object.freeze({
33558
33877
  addonId: null,
33559
33878
  access: "view"
33560
33879
  },
33880
+ "sceneMonitor.listScenesBatch": {
33881
+ capName: "scene-monitor",
33882
+ capScope: "device",
33883
+ addonId: null,
33884
+ access: "view"
33885
+ },
33561
33886
  "sceneMonitor.recheckNow": {
33562
33887
  capName: "scene-monitor",
33563
33888
  capScope: "device",
@@ -33912,12 +34237,36 @@ Object.freeze({
33912
34237
  addonId: null,
33913
34238
  access: "create"
33914
34239
  },
34240
+ "storageMigration.cleanupCancel": {
34241
+ capName: "storage-migration",
34242
+ capScope: "system",
34243
+ addonId: null,
34244
+ access: "create"
34245
+ },
34246
+ "storageMigration.cleanupStart": {
34247
+ capName: "storage-migration",
34248
+ capScope: "system",
34249
+ addonId: null,
34250
+ access: "create"
34251
+ },
34252
+ "storageMigration.cleanupStatus": {
34253
+ capName: "storage-migration",
34254
+ capScope: "system",
34255
+ addonId: null,
34256
+ access: "view"
34257
+ },
33915
34258
  "storageMigration.drain": {
33916
34259
  capName: "storage-migration",
33917
34260
  capScope: "system",
33918
34261
  addonId: null,
33919
34262
  access: "create"
33920
34263
  },
34264
+ "storageMigration.history": {
34265
+ capName: "storage-migration",
34266
+ capScope: "system",
34267
+ addonId: null,
34268
+ access: "view"
34269
+ },
33921
34270
  "storageMigration.movers": {
33922
34271
  capName: "storage-migration",
33923
34272
  capScope: "system",
@@ -34914,6 +35263,12 @@ Object.freeze({
34914
35263
  addonId: null,
34915
35264
  access: "view"
34916
35265
  },
35266
+ "zoneAnalytics.getCurrentSnapshotBatch": {
35267
+ capName: "zone-analytics",
35268
+ capScope: "device",
35269
+ addonId: null,
35270
+ access: "view"
35271
+ },
34917
35272
  "zoneAnalytics.getUnzonedHistory": {
34918
35273
  capName: "zone-analytics",
34919
35274
  capScope: "device",
@@ -35908,14 +36263,14 @@ Object.freeze({
35908
36263
  form: "single",
35909
36264
  optional: true
35910
36265
  }],
35911
- "pipelineAnalytics.getGroup": [{
36266
+ "pipelineAnalytics.getKeyEvents": [{
35912
36267
  name: "deviceId",
35913
36268
  form: "single",
35914
36269
  optional: false
35915
36270
  }],
35916
- "pipelineAnalytics.getKeyEvents": [{
35917
- name: "deviceId",
35918
- form: "single",
36271
+ "pipelineAnalytics.getKeyEventsBatch": [{
36272
+ name: "deviceIds",
36273
+ form: "array",
35919
36274
  optional: false
35920
36275
  }],
35921
36276
  "pipelineAnalytics.getMotionEvents": [{
@@ -35973,11 +36328,6 @@ Object.freeze({
35973
36328
  form: "single",
35974
36329
  optional: false
35975
36330
  }],
35976
- "pipelineAnalytics.listGroups": [{
35977
- name: "deviceIds",
35978
- form: "array",
35979
- optional: false
35980
- }],
35981
36331
  "pipelineAnalytics.listOpsLog": [{
35982
36332
  name: "deviceId",
35983
36333
  form: "single",
@@ -36023,6 +36373,11 @@ Object.freeze({
36023
36373
  form: "single",
36024
36374
  optional: true
36025
36375
  }],
36376
+ "pipelineAnalytics.reclaimDebugMedia": [{
36377
+ name: "deviceIds",
36378
+ form: "array",
36379
+ optional: true
36380
+ }],
36026
36381
  "pipelineAnalytics.reconcileFromDisk": [{
36027
36382
  name: "deviceId",
36028
36383
  form: "single",
@@ -36358,6 +36713,11 @@ Object.freeze({
36358
36713
  form: "single",
36359
36714
  optional: false
36360
36715
  }],
36716
+ "recording.reconcileLedgerAgainstDisk": [{
36717
+ name: "deviceId",
36718
+ form: "single",
36719
+ optional: true
36720
+ }],
36361
36721
  "recording.relocateFootage": [{
36362
36722
  name: "deviceId",
36363
36723
  form: "single",
@@ -36383,6 +36743,11 @@ Object.freeze({
36383
36743
  form: "single",
36384
36744
  optional: false
36385
36745
  }],
36746
+ "recording.setDevicePlacement": [{
36747
+ name: "deviceId",
36748
+ form: "single",
36749
+ optional: false
36750
+ }],
36386
36751
  "recording.startStorageMigrationMove": [{
36387
36752
  name: "deviceId",
36388
36753
  form: "single",
@@ -36423,6 +36788,11 @@ Object.freeze({
36423
36788
  form: "single",
36424
36789
  optional: false
36425
36790
  }],
36791
+ "sceneMonitor.listScenesBatch": [{
36792
+ name: "deviceIds",
36793
+ form: "array",
36794
+ optional: false
36795
+ }],
36426
36796
  "sceneMonitor.recheckNow": [{
36427
36797
  name: "deviceId",
36428
36798
  form: "single",
@@ -36684,6 +37054,11 @@ Object.freeze({
36684
37054
  form: "single",
36685
37055
  optional: false
36686
37056
  }],
37057
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
37058
+ name: "deviceIds",
37059
+ form: "array",
37060
+ optional: false
37061
+ }],
36687
37062
  "zoneAnalytics.getUnzonedHistory": [{
36688
37063
  name: "deviceId",
36689
37064
  form: "single",