@camstack/addon-osd-manager 0.1.41 → 0.1.43

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 (18) hide show
  1. package/dist/{MotionZonesSettings-hMNx3Qpj.mjs → MotionZonesSettings-ByZQuMlB.mjs} +2 -2
  2. package/dist/{PrivacyMaskSettings-MIhKDmPK.mjs → PrivacyMaskSettings-1NYFcVP6.mjs} +4 -4
  3. package/dist/{SceneMonitorEditor-B8pt-jD2.mjs → SceneMonitorEditor-DYvMXsWV.mjs} +3 -3
  4. package/dist/_stub.js +2208 -2209
  5. package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-rT4-eHVE.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_osd_manager_page-DY3AcYMO.mjs} +4 -4
  6. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-B50VOT0N.mjs +26 -0
  7. package/dist/{hostInit-z_uCJFvY.mjs → hostInit-C3-qQFzl.mjs} +3 -3
  8. package/dist/index.js +525 -8
  9. package/dist/index.mjs +525 -8
  10. package/dist/{player-overlays-HnQaIRs1.mjs → player-overlays-D6utOkrV.mjs} +1 -1
  11. package/dist/remoteEntry.js +1 -1
  12. package/dist/{responsive-BL3-GUiC.mjs → responsive-C3oms3c6.mjs} +1 -1
  13. package/dist/{square-DRMyGlbx.mjs → square-DVaU5ocy.mjs} +1 -1
  14. package/dist/{trash-2-XOIFr3OP.mjs → trash-2-CLc1DhEB.mjs} +1 -1
  15. package/dist/{use-device-snapshot-BbvCpg91.mjs → use-device-snapshot-oIHpD07U.mjs} +1 -1
  16. package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-C3kUCA_S.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_osd_manager_page__remoteEntry_js-Cfa0UZmk.mjs} +1 -1
  17. package/package.json +1 -1
  18. package/dist/_virtual_mf___mfe_internal__addon_osd_manager_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DlF8X-2e.mjs +0 -26
package/dist/index.js CHANGED
@@ -8117,6 +8117,20 @@ var RelocateJobSchema = object({
8117
8117
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8118
8118
  */
8119
8119
  rowsReconciled: number().int().nonnegative().optional(),
8120
+ /**
8121
+ * Rows this run FORGOT because the file they name is not on disk.
8122
+ *
8123
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8124
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8125
+ * and the durable row is dropped through the same channel eviction uses. It
8126
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8127
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8128
+ * the same failure as one that quietly skips them (D295).
8129
+ *
8130
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8131
+ * ledger claimed 5.65 GB of footage that no longer existed.
8132
+ */
8133
+ rowsForgotten: number().int().nonnegative().optional(),
8120
8134
  startedAt: number(),
8121
8135
  finishedAt: number().nullable(),
8122
8136
  error: string().nullable()
@@ -8181,6 +8195,13 @@ var MediaRelocateModeSchema = _enum([
8181
8195
  ]);
8182
8196
  var RelocateMediaInputSchema = object({
8183
8197
  toLocationId: string(),
8198
+ /**
8199
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8200
+ * every row that is not already on `toLocationId` (the historical
8201
+ * behaviour). A named source is what a from→to migration needs: without it
8202
+ * "move events off disk 2" also emptied disk 1.
8203
+ */
8204
+ fromLocationId: string().optional(),
8184
8205
  throttleMbps: number().min(1).max(1e3).optional(),
8185
8206
  /** Omitted = `move`, the pre-existing behaviour. */
8186
8207
  mode: MediaRelocateModeSchema.optional()
@@ -8248,6 +8269,19 @@ var StorageMigrationDestinationsSchema = object({
8248
8269
  galleryMedia: string().min(1).optional()
8249
8270
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8250
8271
  /**
8272
+ * Optional named source per class. Omitted = the class's current default
8273
+ * (the historical behaviour). A named source that is NOT the default is a
8274
+ * drain of that disk: bytes move, the default stays, and the source is
8275
+ * disabled when the move finishes.
8276
+ */
8277
+ var StorageMigrationSourcesSchema = object({
8278
+ recordings: string().min(1).optional(),
8279
+ recordingsLow: string().min(1).optional(),
8280
+ eventMedia: string().min(1).optional(),
8281
+ backups: string().min(1).optional(),
8282
+ galleryMedia: string().min(1).optional()
8283
+ }).optional();
8284
+ /**
8251
8285
  * How a migration sequences the cutover against the byte move.
8252
8286
  *
8253
8287
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8269,6 +8303,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8269
8303
  /** Shared input for planning and starting an orchestrated storage migration. */
8270
8304
  var StorageMigrationInputSchema = object({
8271
8305
  destinations: StorageMigrationDestinationsSchema,
8306
+ /** Omitted = each class's current default. */
8307
+ sources: StorageMigrationSourcesSchema,
8272
8308
  throttleMbps: number().min(1).max(1e3).optional(),
8273
8309
  /** Omitted = `blocking`, which stays the default. */
8274
8310
  mode: StorageMigrationModeSchema.optional()
@@ -8348,6 +8384,13 @@ var StorageMigrationMoveSchema = object({
8348
8384
  storageClass: StorageMigrationClassSchema,
8349
8385
  fromLocationId: string(),
8350
8386
  toLocationId: string(),
8387
+ /**
8388
+ * True when `from` was NOT the class default at plan time. The move still
8389
+ * copies bytes, but the default is left alone and the source is disabled
8390
+ * once the copy verifies. Absent on jobs planned before this field existed
8391
+ * — those jobs always repointed, which is `false`.
8392
+ */
8393
+ freezeSource: boolean().optional(),
8351
8394
  moverJobId: string().nullable(),
8352
8395
  state: RelocateJobStateSchema.nullable(),
8353
8396
  error: string().nullable(),
@@ -8361,6 +8404,7 @@ var StorageMigrationJobSchema = object({
8361
8404
  * can tell a seconds-long cutover from a thirty-hour one. */
8362
8405
  mode: StorageMigrationModeSchema,
8363
8406
  destinations: StorageMigrationDestinationsSchema,
8407
+ sources: StorageMigrationSourcesSchema,
8364
8408
  throttleMbps: number(),
8365
8409
  moves: array(StorageMigrationMoveSchema),
8366
8410
  pauseLeaseId: string().nullable(),
@@ -8386,6 +8430,7 @@ var StorageMigrationFindingSchema = object({
8386
8430
  });
8387
8431
  var StorageMigrationPlanSchema = object({
8388
8432
  destinations: StorageMigrationDestinationsSchema,
8433
+ sources: StorageMigrationSourcesSchema,
8389
8434
  /** The mode this plan was built for. A plan is only valid for its mode: the
8390
8435
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8391
8436
  * it. */
@@ -8393,7 +8438,8 @@ var StorageMigrationPlanSchema = object({
8393
8438
  moves: array(object({
8394
8439
  storageClass: StorageMigrationClassSchema,
8395
8440
  fromLocationId: string(),
8396
- toLocationId: string()
8441
+ toLocationId: string(),
8442
+ freezeSource: boolean().optional()
8397
8443
  })),
8398
8444
  findings: array(StorageMigrationFindingSchema)
8399
8445
  });
@@ -8480,16 +8526,142 @@ var RelocateResidueSchema = object({
8480
8526
  segments: number().int().nonnegative(),
8481
8527
  bytes: number().int().nonnegative()
8482
8528
  }).nullable();
8529
+ /**
8530
+ * Ask one location whether its durable hour rows describe the disk — the walk
8531
+ * (D319).
8532
+ *
8533
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8534
+ * missing tool is the question, and the dry run is how they sanity-check the
8535
+ * destructive run before authorising it.
8536
+ */
8537
+ var LedgerWalkInputSchema = object({
8538
+ locationId: string().min(1),
8539
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8540
+ apply: boolean().optional(),
8541
+ /** Narrow to one camera. */
8542
+ deviceId: number().int().positive().optional(),
8543
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8544
+ profiles: array(string().min(1)).optional()
8545
+ });
8546
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8547
+ var LedgerWalkRefusalSchema = _enum([
8548
+ "location-unknown",
8549
+ "source-writable",
8550
+ "no-ledger",
8551
+ "archive-unreadable",
8552
+ "anchor-absent",
8553
+ "anchor-unreadable",
8554
+ "anchor-moved"
8555
+ ]);
8556
+ _enum([
8557
+ "live-tail",
8558
+ "listing-error",
8559
+ "path-mismatch",
8560
+ "durable-refused"
8561
+ ]);
8562
+ /** Every skip reason, always present, always a number — so a reason that never
8563
+ * fired reports as zero rather than absent and the report shape is constant
8564
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8565
+ var LedgerWalkSkipCountsSchema = object({
8566
+ "live-tail": number().int().nonnegative(),
8567
+ "listing-error": number().int().nonnegative(),
8568
+ "path-mismatch": number().int().nonnegative(),
8569
+ "durable-refused": number().int().nonnegative()
8570
+ });
8571
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8572
+ var LedgerWalkDeviceReportSchema = object({
8573
+ deviceId: number().int(),
8574
+ hoursWalked: number().int().nonnegative(),
8575
+ hoursMissing: number().int().nonnegative(),
8576
+ ghostSegments: number().int().nonnegative(),
8577
+ ghostBytes: number().int().nonnegative(),
8578
+ forgottenSegments: number().int().nonnegative(),
8579
+ orphanFiles: number().int().nonnegative()
8580
+ });
8581
+ /**
8582
+ * What one walk claimed, listed, found and (only when armed) forgot.
8583
+ *
8584
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8585
+ * walk that saw a fraction of the location is visible in its own report rather
8586
+ * than in the absence of one.
8587
+ */
8588
+ var LedgerWalkReportSchema = object({
8589
+ locationId: string(),
8590
+ applied: boolean(),
8591
+ refused: LedgerWalkRefusalSchema.nullable(),
8592
+ archiveSegments: number().int().nonnegative().nullable(),
8593
+ archiveBytes: number().int().nonnegative().nullable(),
8594
+ hoursClaimed: number().int().nonnegative(),
8595
+ hoursWalked: number().int().nonnegative(),
8596
+ hoursMissing: number().int().nonnegative(),
8597
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8598
+ listings: number().int().nonnegative(),
8599
+ segmentsClaimed: number().int().nonnegative(),
8600
+ ghostSegments: number().int().nonnegative(),
8601
+ ghostBytes: number().int().nonnegative(),
8602
+ ghostHoursWhole: number().int().nonnegative(),
8603
+ forgottenSegments: number().int().nonnegative(),
8604
+ forgottenBytes: number().int().nonnegative(),
8605
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8606
+ orphanFiles: number().int().nonnegative(),
8607
+ orphanSample: array(string()).readonly(),
8608
+ hoursSkipped: number().int().nonnegative(),
8609
+ skippedByReason: LedgerWalkSkipCountsSchema,
8610
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8611
+ bounded: boolean(),
8612
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8613
+ });
8483
8614
  /** How many rows a media pass would still act on against a given target — the
8484
8615
  * media lane's denominator AND its residue, from ONE derivation so the two can
8485
8616
  * never disagree. `null` = the count could not be taken. */
8486
8617
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8487
8618
  var RelocatableMediaCountInputSchema = object({
8488
8619
  toLocationId: string().min(1),
8620
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8621
+ fromLocationId: string().optional(),
8489
8622
  /** Omitted = `move`. */
8490
8623
  mode: MediaRelocateModeSchema.optional()
8491
8624
  });
8492
8625
  /**
8626
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8627
+ * ghost ledger entries on frozen footage locations.
8628
+ *
8629
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8630
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8631
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8632
+ * with no operator-visible status.
8633
+ */
8634
+ var StorageCleanupPhaseSchema = _enum([
8635
+ "orphans",
8636
+ "debug-media",
8637
+ "ghost-ledger",
8638
+ "done",
8639
+ "failed",
8640
+ "cancelled"
8641
+ ]);
8642
+ var StorageCleanupInputSchema = object({
8643
+ /** Also walk motion stills / track filmstrips. Off by default. */
8644
+ includeDebugMedia: boolean().optional() });
8645
+ var StorageCleanupJobSchema = object({
8646
+ jobId: string(),
8647
+ phase: StorageCleanupPhaseSchema,
8648
+ includeDebugMedia: boolean(),
8649
+ orphansReclaimed: number().int().nonnegative(),
8650
+ orphanBytesReclaimed: number().int().nonnegative(),
8651
+ debugMediaReclaimed: number().int().nonnegative(),
8652
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8653
+ ghostsForgotten: number().int().nonnegative(),
8654
+ ghostBytesForgotten: number().int().nonnegative(),
8655
+ /** Short operator-facing line: current collection, pass, or location. */
8656
+ detail: string().nullable(),
8657
+ cancelRequested: boolean(),
8658
+ startedAt: number(),
8659
+ updatedAt: number(),
8660
+ finishedAt: number().nullable(),
8661
+ error: string().nullable()
8662
+ });
8663
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8664
+ /**
8493
8665
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8494
8666
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8495
8667
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8517,11 +8689,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8517
8689
  * The default location for a type uses `id === <type>:default` by
8518
8690
  * convention (the bare type ref like `'backups'` resolves to it).
8519
8691
  *
8520
- * `isSystem: true` marks a location as orchestrator-seeded and
8521
- * undeletable. The bootstrap-installed defaults (one per type) carry
8522
- * this flag; operator-added locations don't. Editing the config of
8523
- * a system location is allowed (path migration, provider swap) but
8524
- * deleting it is rejected at the cap level.
8692
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8693
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8694
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8695
+ * / last-enabled, not on this bit.
8525
8696
  */
8526
8697
  var StorageLocationSchema = object({
8527
8698
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -21616,13 +21787,15 @@ var ListGroupsPageSchema = object({
21616
21787
  groups: array(AnalyticsGroupRecordSchema).readonly(),
21617
21788
  nextCursor: string().nullable()
21618
21789
  });
21790
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
21791
+ var KEY_EVENTS_MAX_LIMIT = 200;
21619
21792
  var KeyEventQueryInput = object({
21620
21793
  deviceId: number(),
21621
21794
  /** Window lower bound (track firstSeen ≥ since). */
21622
21795
  since: number(),
21623
21796
  /** Window upper bound (track firstSeen ≤ until). */
21624
21797
  until: number(),
21625
- limit: number().int().min(1).max(200).default(50),
21798
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
21626
21799
  /** Drop tracks scoring below this importance. */
21627
21800
  minImportance: number().min(0).max(1).optional(),
21628
21801
  /** Restrict to a single class (e.g. 'person'). */
@@ -21644,6 +21817,32 @@ var KeyEventSchema = object({
21644
21817
  ...TrackFlagFields,
21645
21818
  ...TrackRetrainFields
21646
21819
  });
21820
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
21821
+ var KeyEventBatchQueryInput = object({
21822
+ deviceIds: array(number()).min(1).max(200),
21823
+ since: number(),
21824
+ until: number(),
21825
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
21826
+ * across the set, which would let a busy camera starve a quiet one of its
21827
+ * rows and change what the merged feed contains. */
21828
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
21829
+ minImportance: number().min(0).max(1).optional(),
21830
+ classFilter: string().optional()
21831
+ });
21832
+ /**
21833
+ * One camera's key events in a batch answer.
21834
+ *
21835
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
21836
+ * error rather than throwing, so a camera whose store read failed and one with
21837
+ * no events in the window were ALREADY indistinguishable per camera — the
21838
+ * batch does not make that worse, and the row keeps the deviceId the single
21839
+ * method's output never carried (the caller used to stamp it from the fan-out
21840
+ * key, which only worked because there was one query per camera).
21841
+ */
21842
+ var KeyEventsForDeviceSchema = object({
21843
+ deviceId: number(),
21844
+ events: array(KeyEventSchema).readonly()
21845
+ });
21647
21846
  object({
21648
21847
  trackId: string(),
21649
21848
  className: string(),
@@ -21863,6 +22062,47 @@ var RebuildStatusSchema = object({
21863
22062
  /** Present when the pass ended by throwing. */
21864
22063
  error: string().nullable()
21865
22064
  });
22065
+ /**
22066
+ * Acknowledgement that a debug-media reclaim STARTED.
22067
+ *
22068
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
22069
+ * it runs detached and this returns immediately. Awaiting it is how the
22070
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
22071
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
22072
+ */
22073
+ var MediaReclaimStartResultSchema = object({
22074
+ started: boolean(),
22075
+ /** True when a pass was already running; the new request is ignored. */
22076
+ alreadyRunning: boolean()
22077
+ });
22078
+ var MediaReclaimInputSchema = object({
22079
+ mode: _enum(["report", "reclaim"]).default("report"),
22080
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
22081
+ deviceIds: array(number().int()).min(1).optional(),
22082
+ restart: boolean().optional(),
22083
+ pageSize: number().int().min(50).max(5e3).optional(),
22084
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
22085
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
22086
+ maxBytesPerRun: number().int().min(1).optional(),
22087
+ budgetMinutes: number().int().min(1).max(720).optional(),
22088
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
22089
+ graceMinutes: number().int().min(1).max(10080).optional()
22090
+ });
22091
+ var MediaReclaimStatusSchema = object({
22092
+ running: boolean(),
22093
+ mode: _enum(["report", "reclaim"]).nullable(),
22094
+ totalExamined: number(),
22095
+ totalEligible: number(),
22096
+ totalReclaimed: number(),
22097
+ totalBytesReclaimed: number(),
22098
+ totalRefused: number(),
22099
+ /** Device+scope windows finished in this pass. */
22100
+ devicesDone: number(),
22101
+ complete: boolean().nullable(),
22102
+ startedAtMs: number().nullable(),
22103
+ finishedAtMs: number().nullable(),
22104
+ error: string().nullable()
22105
+ });
21866
22106
  var ReplayFrameInputSchema = object({
21867
22107
  timestamp: number(),
21868
22108
  frame: PipelineRunResultBridge
@@ -21992,6 +22232,21 @@ var pipelineAnalyticsCapability = {
21992
22232
  * scored on-read (no write). Degrades to `[]` on error.
21993
22233
  */
21994
22234
  getKeyEvents: method(KeyEventQueryInput, array(KeyEventSchema).readonly()),
22235
+ /**
22236
+ * The same ranking, for a SET of cameras, in one round trip.
22237
+ *
22238
+ * The Detection Intelligence events feed asks this of every selected
22239
+ * camera and re-asks on a 30s timer. Fanned out client-side that is N
22240
+ * round trips — browser → hub → post-analysis — for N independent,
22241
+ * already-indexed store queries. Batched, the queries are unchanged and
22242
+ * run concurrently INSIDE the owner; only the transport collapses.
22243
+ *
22244
+ * Deliberately per-device rather than pre-merged: `limit` stays per
22245
+ * camera (a total would let a busy camera starve a quiet one), and a
22246
+ * caller that renders one camera's lane needs to know which camera a row
22247
+ * came from. `getKeyEvents` stays for single-device callers.
22248
+ */
22249
+ getKeyEventsBatch: method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()),
21995
22250
  /** Server-side bucketed event counts for the 24-hour timeline.
21996
22251
  * Returns one entry per non-empty bucket; empty buckets are omitted. */
21997
22252
  getEventDensity: method(object({
@@ -22270,6 +22525,20 @@ var pipelineAnalyticsCapability = {
22270
22525
  auth: "admin"
22271
22526
  }),
22272
22527
  /**
22528
+ * Reclaim the standing debug-media backlog (motion-visit stills + track
22529
+ * filmstrips). DETACHED: returns `{ started }` immediately. The pass is
22530
+ * tens of minutes; awaiting it is a timeout, not a verdict. Dry-run unless
22531
+ * `mode: 'reclaim'`. Poll `getMediaReclaimStatus`.
22532
+ */
22533
+ reclaimDebugMedia: method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
22534
+ kind: "mutation",
22535
+ auth: "admin"
22536
+ }),
22537
+ getMediaReclaimStatus: method(object({}), MediaReclaimStatusSchema, {
22538
+ kind: "query",
22539
+ auth: "admin"
22540
+ }),
22541
+ /**
22273
22542
  * The CHEAP QUESTION, asked before any media moves: how big is the dataset
22274
22543
  * the marked (`markForTrain`) tracks would produce?
22275
22544
  *
@@ -25222,7 +25491,23 @@ var storageMigrationCapability = {
25222
25491
  drain: method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
25223
25492
  kind: "mutation",
25224
25493
  auth: "admin"
25225
- })
25494
+ }),
25495
+ /**
25496
+ * One operator cleanup of leftover analytics (DB + blobs) and ghost
25497
+ * ledger rows on frozen footage locations. Optional debug-media sweep.
25498
+ * Returns immediately; poll {@link cleanupStatus}.
25499
+ */
25500
+ cleanupStart: method(StorageCleanupInputSchema, object({ jobId: string() }), {
25501
+ kind: "mutation",
25502
+ auth: "admin"
25503
+ }),
25504
+ cleanupStatus: method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }),
25505
+ cleanupCancel: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
25506
+ kind: "mutation",
25507
+ auth: "admin"
25508
+ }),
25509
+ /** Recent finished migration jobs, newest first. The live job is `status`. */
25510
+ history: method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" })
25226
25511
  }
25227
25512
  };
25228
25513
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
@@ -33375,6 +33660,33 @@ var RecordingRebalanceInputSchema = object({
33375
33660
  minMoveGb: number().min(0).optional()
33376
33661
  });
33377
33662
  /**
33663
+ * Operator-facing placement of one camera onto a recordings location.
33664
+ *
33665
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
33666
+ * Auto (the planner may move this camera). `locationId` is where high/mid
33667
+ * currently write — the plan, which may disagree with the pin when Auto.
33668
+ */
33669
+ var RecordingDevicePlacementSchema = object({
33670
+ deviceId: number().int(),
33671
+ profile: string(),
33672
+ locationId: string()
33673
+ });
33674
+ var RecordingDevicePinSchema = object({
33675
+ deviceId: number().int(),
33676
+ /** Recordings-class location this camera is pinned to. */
33677
+ locationId: string()
33678
+ });
33679
+ var RecordingPlacementViewSchema = object({
33680
+ assignments: array(RecordingDevicePlacementSchema),
33681
+ pins: array(RecordingDevicePinSchema),
33682
+ defaultLocations: record(string(), string())
33683
+ });
33684
+ var RecordingSetDevicePlacementInputSchema = object({
33685
+ deviceId: number().int(),
33686
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
33687
+ locationId: string().nullable()
33688
+ });
33689
+ /**
33378
33690
  * Result of locating footage at a wall-clock instant for one device/profile.
33379
33691
  * `segment` carries the covering segment's window; `gap` reports the forward
33380
33692
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -33696,6 +34008,23 @@ var recordingCapability = {
33696
34008
  kind: "query",
33697
34009
  auth: "admin"
33698
34010
  }),
34011
+ /**
34012
+ * Does this location's LEDGER tell the truth about its disk? (D319)
34013
+ *
34014
+ * One `readdir` per claimed hour, diffed both ways: durable rows whose file
34015
+ * is not there, and files no durable row names. `apply` defaults to FALSE —
34016
+ * the report is the product, and the dry run is how an operator
34017
+ * sanity-checks the destructive run before authorising it.
34018
+ *
34019
+ * REFUSES a source that is still a write target: a listing of a live
34020
+ * location is a lower bound, which is not the strong evidence that lets
34021
+ * this pass forget without a budget. A live location is reconciled by the
34022
+ * mover, under D318's bound.
34023
+ */
34024
+ reconcileLedgerAgainstDisk: method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
34025
+ kind: "mutation",
34026
+ auth: "admin"
34027
+ }),
33699
34028
  /** Cancel a running or queued relocate job. A queued job never runs. */
33700
34029
  cancelRelocateJob: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
33701
34030
  kind: "mutation",
@@ -33710,6 +34039,22 @@ var recordingCapability = {
33710
34039
  startStorageRebalance: method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
33711
34040
  kind: "mutation",
33712
34041
  auth: "admin"
34042
+ }),
34043
+ /**
34044
+ * The placement plan in force plus operator pins. Drives the Locations
34045
+ * admin page: Auto vs a named recordings location, per camera.
34046
+ */
34047
+ getPlacement: method(object({}), RecordingPlacementViewSchema, {
34048
+ kind: "query",
34049
+ auth: "admin"
34050
+ }),
34051
+ /**
34052
+ * Pin a camera to a recordings location, or clear the pin (Auto). High and
34053
+ * mid follow the pin; low stays with the recordingsLow planner.
34054
+ */
34055
+ setDevicePlacement: method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
34056
+ kind: "mutation",
34057
+ auth: "admin"
33713
34058
  })
33714
34059
  }
33715
34060
  };
@@ -34130,6 +34475,25 @@ var SceneMonitorStatusSchema = object({
34130
34475
  monitors: array(SceneMonitorSchema),
34131
34476
  lastFetchedAt: number()
34132
34477
  });
34478
+ /**
34479
+ * One camera's row in a `listScenesBatch` answer.
34480
+ *
34481
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
34482
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
34483
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
34484
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
34485
+ * configured. Fanned out per camera the difference was visible — one query
34486
+ * errored while the others resolved — and a batch that returned only the rows
34487
+ * it managed would have destroyed it, silently, by making an unreachable camera
34488
+ * indistinguishable from one that answered `monitors: []`.
34489
+ *
34490
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
34491
+ * could not be read"; `status.monitors: []` means "read, and it has none".
34492
+ */
34493
+ var SceneMonitorStatusForDeviceSchema = object({
34494
+ deviceId: number(),
34495
+ status: SceneMonitorStatusSchema.nullable()
34496
+ });
34133
34497
  var sceneMonitorCapability = {
34134
34498
  name: "scene-monitor",
34135
34499
  scope: "device",
@@ -34139,6 +34503,22 @@ var sceneMonitorCapability = {
34139
34503
  deviceTypes: [DeviceType.Camera],
34140
34504
  methods: {
34141
34505
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
34506
+ /**
34507
+ * The same answer, for a SET of cameras, in one round trip.
34508
+ *
34509
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
34510
+ * poll behind the push slice. Fanned out client-side that was one query
34511
+ * per camera — 29 round trips through the browser, the hub and the
34512
+ * post-analysis runner every 30 seconds to read an in-memory map the
34513
+ * owner had already merged. The work is unchanged (`statusFor` per
34514
+ * device, all in-process at the owner); what collapses is the transport.
34515
+ *
34516
+ * A camera that cannot answer still gets a row, with `status: null` —
34517
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
34518
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
34519
+ * tell which two are missing, or that any are.
34520
+ */
34521
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
34142
34522
  createScene: method(object({
34143
34523
  deviceId: number(),
34144
34524
  label: string(),
@@ -36125,6 +36505,27 @@ var CameraOccupancySnapshotSchema = object({
36125
36505
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
36126
36506
  });
36127
36507
  /**
36508
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
36509
+ *
36510
+ * THREE outcomes, and the single-camera method could only express two of them
36511
+ * because `snapshot: null` was already spoken for:
36512
+ *
36513
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
36514
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
36515
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
36516
+ * - `read: 'unreadable'` — the owner could not answer for this
36517
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
36518
+ *
36519
+ * Collapsing the last two is the failure this field exists to prevent: a
36520
+ * hydration that threw would otherwise render as an empty Stationary section,
36521
+ * which is a definite claim about a camera nobody could read.
36522
+ */
36523
+ var CameraOccupancySnapshotForDeviceSchema = object({
36524
+ deviceId: number(),
36525
+ read: _enum(["read", "unreadable"]),
36526
+ snapshot: CameraOccupancySnapshotSchema.nullable()
36527
+ });
36528
+ /**
36128
36529
  * Time-series resolution. The history methods return one bucket per
36129
36530
  * step over the requested range. Smaller resolutions cost more
36130
36531
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -36181,6 +36582,20 @@ var zoneAnalyticsCapability = {
36181
36582
  * (no inference result emitted since boot or since binding was
36182
36583
  * activated). */
36183
36584
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
36585
+ /**
36586
+ * The same snapshot, for a SET of cameras, in one round trip.
36587
+ *
36588
+ * The Events page's Stationary section polls this every 15s for every
36589
+ * selected camera. Fanned out client-side that is one query per camera to
36590
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
36591
+ * costs everything. Batched, N transports become one and the per-device
36592
+ * work is unchanged.
36593
+ *
36594
+ * Every requested deviceId gets a row, tagged `read` — see
36595
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
36596
+ * not answer for is `'unreadable'`, never an empty reading.
36597
+ */
36598
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
36184
36599
  /** Time-series object count inside one zone. `className` optional —
36185
36600
  * omit to count every class in the zone. */
36186
36601
  getZoneHistory: method(object({
@@ -39782,6 +40197,18 @@ Object.freeze({
39782
40197
  addonId: null,
39783
40198
  access: "view"
39784
40199
  },
40200
+ "pipelineAnalytics.getKeyEventsBatch": {
40201
+ capName: "pipeline-analytics",
40202
+ capScope: "device",
40203
+ addonId: null,
40204
+ access: "view"
40205
+ },
40206
+ "pipelineAnalytics.getMediaReclaimStatus": {
40207
+ capName: "pipeline-analytics",
40208
+ capScope: "device",
40209
+ addonId: null,
40210
+ access: "view"
40211
+ },
39785
40212
  "pipelineAnalytics.getMotionEvents": {
39786
40213
  capName: "pipeline-analytics",
39787
40214
  capScope: "device",
@@ -39956,6 +40383,12 @@ Object.freeze({
39956
40383
  addonId: null,
39957
40384
  access: "create"
39958
40385
  },
40386
+ "pipelineAnalytics.reclaimDebugMedia": {
40387
+ capName: "pipeline-analytics",
40388
+ capScope: "device",
40389
+ addonId: null,
40390
+ access: "create"
40391
+ },
39959
40392
  "pipelineAnalytics.reconcileFromDisk": {
39960
40393
  capName: "pipeline-analytics",
39961
40394
  capScope: "device",
@@ -40880,6 +41313,12 @@ Object.freeze({
40880
41313
  addonId: null,
40881
41314
  access: "view"
40882
41315
  },
41316
+ "recording.getPlacement": {
41317
+ capName: "recording",
41318
+ capScope: "system",
41319
+ addonId: null,
41320
+ access: "view"
41321
+ },
40883
41322
  "recording.getPlaybackManifest": {
40884
41323
  capName: "recording",
40885
41324
  capScope: "system",
@@ -40958,6 +41397,12 @@ Object.freeze({
40958
41397
  addonId: null,
40959
41398
  access: "view"
40960
41399
  },
41400
+ "recording.reconcileLedgerAgainstDisk": {
41401
+ capName: "recording",
41402
+ capScope: "system",
41403
+ addonId: null,
41404
+ access: "create"
41405
+ },
40961
41406
  "recording.refreshStorageLocationsForMigration": {
40962
41407
  capName: "recording",
40963
41408
  capScope: "system",
@@ -41000,6 +41445,12 @@ Object.freeze({
41000
41445
  addonId: null,
41001
41446
  access: "create"
41002
41447
  },
41448
+ "recording.setDevicePlacement": {
41449
+ capName: "recording",
41450
+ capScope: "system",
41451
+ addonId: null,
41452
+ access: "create"
41453
+ },
41003
41454
  "recording.startStorageMigrationMove": {
41004
41455
  capName: "recording",
41005
41456
  capScope: "system",
@@ -41084,6 +41535,12 @@ Object.freeze({
41084
41535
  addonId: null,
41085
41536
  access: "view"
41086
41537
  },
41538
+ "sceneMonitor.listScenesBatch": {
41539
+ capName: "scene-monitor",
41540
+ capScope: "device",
41541
+ addonId: null,
41542
+ access: "view"
41543
+ },
41087
41544
  "sceneMonitor.recheckNow": {
41088
41545
  capName: "scene-monitor",
41089
41546
  capScope: "device",
@@ -41438,12 +41895,36 @@ Object.freeze({
41438
41895
  addonId: null,
41439
41896
  access: "create"
41440
41897
  },
41898
+ "storageMigration.cleanupCancel": {
41899
+ capName: "storage-migration",
41900
+ capScope: "system",
41901
+ addonId: null,
41902
+ access: "create"
41903
+ },
41904
+ "storageMigration.cleanupStart": {
41905
+ capName: "storage-migration",
41906
+ capScope: "system",
41907
+ addonId: null,
41908
+ access: "create"
41909
+ },
41910
+ "storageMigration.cleanupStatus": {
41911
+ capName: "storage-migration",
41912
+ capScope: "system",
41913
+ addonId: null,
41914
+ access: "view"
41915
+ },
41441
41916
  "storageMigration.drain": {
41442
41917
  capName: "storage-migration",
41443
41918
  capScope: "system",
41444
41919
  addonId: null,
41445
41920
  access: "create"
41446
41921
  },
41922
+ "storageMigration.history": {
41923
+ capName: "storage-migration",
41924
+ capScope: "system",
41925
+ addonId: null,
41926
+ access: "view"
41927
+ },
41447
41928
  "storageMigration.movers": {
41448
41929
  capName: "storage-migration",
41449
41930
  capScope: "system",
@@ -42440,6 +42921,12 @@ Object.freeze({
42440
42921
  addonId: null,
42441
42922
  access: "view"
42442
42923
  },
42924
+ "zoneAnalytics.getCurrentSnapshotBatch": {
42925
+ capName: "zone-analytics",
42926
+ capScope: "device",
42927
+ addonId: null,
42928
+ access: "view"
42929
+ },
42443
42930
  "zoneAnalytics.getUnzonedHistory": {
42444
42931
  capName: "zone-analytics",
42445
42932
  capScope: "device",
@@ -43444,6 +43931,11 @@ Object.freeze({
43444
43931
  form: "single",
43445
43932
  optional: false
43446
43933
  }],
43934
+ "pipelineAnalytics.getKeyEventsBatch": [{
43935
+ name: "deviceIds",
43936
+ form: "array",
43937
+ optional: false
43938
+ }],
43447
43939
  "pipelineAnalytics.getMotionEvents": [{
43448
43940
  name: "deviceId",
43449
43941
  form: "single",
@@ -43549,6 +44041,11 @@ Object.freeze({
43549
44041
  form: "single",
43550
44042
  optional: true
43551
44043
  }],
44044
+ "pipelineAnalytics.reclaimDebugMedia": [{
44045
+ name: "deviceIds",
44046
+ form: "array",
44047
+ optional: true
44048
+ }],
43552
44049
  "pipelineAnalytics.reconcileFromDisk": [{
43553
44050
  name: "deviceId",
43554
44051
  form: "single",
@@ -43884,6 +44381,11 @@ Object.freeze({
43884
44381
  form: "single",
43885
44382
  optional: false
43886
44383
  }],
44384
+ "recording.reconcileLedgerAgainstDisk": [{
44385
+ name: "deviceId",
44386
+ form: "single",
44387
+ optional: true
44388
+ }],
43887
44389
  "recording.relocateFootage": [{
43888
44390
  name: "deviceId",
43889
44391
  form: "single",
@@ -43909,6 +44411,11 @@ Object.freeze({
43909
44411
  form: "single",
43910
44412
  optional: false
43911
44413
  }],
44414
+ "recording.setDevicePlacement": [{
44415
+ name: "deviceId",
44416
+ form: "single",
44417
+ optional: false
44418
+ }],
43912
44419
  "recording.startStorageMigrationMove": [{
43913
44420
  name: "deviceId",
43914
44421
  form: "single",
@@ -43949,6 +44456,11 @@ Object.freeze({
43949
44456
  form: "single",
43950
44457
  optional: false
43951
44458
  }],
44459
+ "sceneMonitor.listScenesBatch": [{
44460
+ name: "deviceIds",
44461
+ form: "array",
44462
+ optional: false
44463
+ }],
43952
44464
  "sceneMonitor.recheckNow": [{
43953
44465
  name: "deviceId",
43954
44466
  form: "single",
@@ -44210,6 +44722,11 @@ Object.freeze({
44210
44722
  form: "single",
44211
44723
  optional: false
44212
44724
  }],
44725
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
44726
+ name: "deviceIds",
44727
+ form: "array",
44728
+ optional: false
44729
+ }],
44213
44730
  "zoneAnalytics.getUnzonedHistory": [{
44214
44731
  name: "deviceId",
44215
44732
  form: "single",