@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.mjs CHANGED
@@ -8113,6 +8113,20 @@ var RelocateJobSchema = object({
8113
8113
  * in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
8114
8114
  */
8115
8115
  rowsReconciled: number().int().nonnegative().optional(),
8116
+ /**
8117
+ * Rows this run FORGOT because the file they name is not on disk.
8118
+ *
8119
+ * The mover derived the path from the row's own fields and `stat`ed it; an
8120
+ * ENOENT there is a per-path confirmation that the segment is gone (D296),
8121
+ * and the durable row is dropped through the same channel eviction uses. It
8122
+ * is reported for the same reason `rowsReconciled` is: this is a durable
8123
+ * mutation nobody asked for, and a migration that quietly erases hour rows is
8124
+ * the same failure as one that quietly skips them (D295).
8125
+ *
8126
+ * The production drain of 2026-08-30 would have reported 11 074 here — the
8127
+ * ledger claimed 5.65 GB of footage that no longer existed.
8128
+ */
8129
+ rowsForgotten: number().int().nonnegative().optional(),
8116
8130
  startedAt: number(),
8117
8131
  finishedAt: number().nullable(),
8118
8132
  error: string().nullable()
@@ -8177,6 +8191,13 @@ var MediaRelocateModeSchema = _enum([
8177
8191
  ]);
8178
8192
  var RelocateMediaInputSchema = object({
8179
8193
  toLocationId: string(),
8194
+ /**
8195
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
8196
+ * every row that is not already on `toLocationId` (the historical
8197
+ * behaviour). A named source is what a from→to migration needs: without it
8198
+ * "move events off disk 2" also emptied disk 1.
8199
+ */
8200
+ fromLocationId: string().optional(),
8180
8201
  throttleMbps: number().min(1).max(1e3).optional(),
8181
8202
  /** Omitted = `move`, the pre-existing behaviour. */
8182
8203
  mode: MediaRelocateModeSchema.optional()
@@ -8244,6 +8265,19 @@ var StorageMigrationDestinationsSchema = object({
8244
8265
  galleryMedia: string().min(1).optional()
8245
8266
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
8246
8267
  /**
8268
+ * Optional named source per class. Omitted = the class's current default
8269
+ * (the historical behaviour). A named source that is NOT the default is a
8270
+ * drain of that disk: bytes move, the default stays, and the source is
8271
+ * disabled when the move finishes.
8272
+ */
8273
+ var StorageMigrationSourcesSchema = object({
8274
+ recordings: string().min(1).optional(),
8275
+ recordingsLow: string().min(1).optional(),
8276
+ eventMedia: string().min(1).optional(),
8277
+ backups: string().min(1).optional(),
8278
+ galleryMedia: string().min(1).optional()
8279
+ }).optional();
8280
+ /**
8247
8281
  * How a migration sequences the cutover against the byte move.
8248
8282
  *
8249
8283
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -8265,6 +8299,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
8265
8299
  /** Shared input for planning and starting an orchestrated storage migration. */
8266
8300
  var StorageMigrationInputSchema = object({
8267
8301
  destinations: StorageMigrationDestinationsSchema,
8302
+ /** Omitted = each class's current default. */
8303
+ sources: StorageMigrationSourcesSchema,
8268
8304
  throttleMbps: number().min(1).max(1e3).optional(),
8269
8305
  /** Omitted = `blocking`, which stays the default. */
8270
8306
  mode: StorageMigrationModeSchema.optional()
@@ -8344,6 +8380,13 @@ var StorageMigrationMoveSchema = object({
8344
8380
  storageClass: StorageMigrationClassSchema,
8345
8381
  fromLocationId: string(),
8346
8382
  toLocationId: string(),
8383
+ /**
8384
+ * True when `from` was NOT the class default at plan time. The move still
8385
+ * copies bytes, but the default is left alone and the source is disabled
8386
+ * once the copy verifies. Absent on jobs planned before this field existed
8387
+ * — those jobs always repointed, which is `false`.
8388
+ */
8389
+ freezeSource: boolean().optional(),
8347
8390
  moverJobId: string().nullable(),
8348
8391
  state: RelocateJobStateSchema.nullable(),
8349
8392
  error: string().nullable(),
@@ -8357,6 +8400,7 @@ var StorageMigrationJobSchema = object({
8357
8400
  * can tell a seconds-long cutover from a thirty-hour one. */
8358
8401
  mode: StorageMigrationModeSchema,
8359
8402
  destinations: StorageMigrationDestinationsSchema,
8403
+ sources: StorageMigrationSourcesSchema,
8360
8404
  throttleMbps: number(),
8361
8405
  moves: array(StorageMigrationMoveSchema),
8362
8406
  pauseLeaseId: string().nullable(),
@@ -8382,6 +8426,7 @@ var StorageMigrationFindingSchema = object({
8382
8426
  });
8383
8427
  var StorageMigrationPlanSchema = object({
8384
8428
  destinations: StorageMigrationDestinationsSchema,
8429
+ sources: StorageMigrationSourcesSchema,
8385
8430
  /** The mode this plan was built for. A plan is only valid for its mode: the
8386
8431
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
8387
8432
  * it. */
@@ -8389,7 +8434,8 @@ var StorageMigrationPlanSchema = object({
8389
8434
  moves: array(object({
8390
8435
  storageClass: StorageMigrationClassSchema,
8391
8436
  fromLocationId: string(),
8392
- toLocationId: string()
8437
+ toLocationId: string(),
8438
+ freezeSource: boolean().optional()
8393
8439
  })),
8394
8440
  findings: array(StorageMigrationFindingSchema)
8395
8441
  });
@@ -8476,16 +8522,142 @@ var RelocateResidueSchema = object({
8476
8522
  segments: number().int().nonnegative(),
8477
8523
  bytes: number().int().nonnegative()
8478
8524
  }).nullable();
8525
+ /**
8526
+ * Ask one location whether its durable hour rows describe the disk — the walk
8527
+ * (D319).
8528
+ *
8529
+ * `apply` DEFAULTS TO FALSE and that default is the product: the operator's
8530
+ * missing tool is the question, and the dry run is how they sanity-check the
8531
+ * destructive run before authorising it.
8532
+ */
8533
+ var LedgerWalkInputSchema = object({
8534
+ locationId: string().min(1),
8535
+ /** Forget the confirmed-absent rows, rather than only counting them. */
8536
+ apply: boolean().optional(),
8537
+ /** Narrow to one camera. */
8538
+ deviceId: number().int().positive().optional(),
8539
+ /** Narrow to these recording profiles; empty/absent = every profile. */
8540
+ profiles: array(string().min(1)).optional()
8541
+ });
8542
+ /** Why a whole walk did nothing. Every one leaves the ledger untouched. */
8543
+ var LedgerWalkRefusalSchema = _enum([
8544
+ "location-unknown",
8545
+ "source-writable",
8546
+ "no-ledger",
8547
+ "archive-unreadable",
8548
+ "anchor-absent",
8549
+ "anchor-unreadable",
8550
+ "anchor-moved"
8551
+ ]);
8552
+ _enum([
8553
+ "live-tail",
8554
+ "listing-error",
8555
+ "path-mismatch",
8556
+ "durable-refused"
8557
+ ]);
8558
+ /** Every skip reason, always present, always a number — so a reason that never
8559
+ * fired reports as zero rather than absent and the report shape is constant
8560
+ * between passes. Spelled out rather than `z.record` for exactly that. */
8561
+ var LedgerWalkSkipCountsSchema = object({
8562
+ "live-tail": number().int().nonnegative(),
8563
+ "listing-error": number().int().nonnegative(),
8564
+ "path-mismatch": number().int().nonnegative(),
8565
+ "durable-refused": number().int().nonnegative()
8566
+ });
8567
+ /** One camera's share of a walk, so a report names cameras and not rows. */
8568
+ var LedgerWalkDeviceReportSchema = object({
8569
+ deviceId: number().int(),
8570
+ hoursWalked: number().int().nonnegative(),
8571
+ hoursMissing: number().int().nonnegative(),
8572
+ ghostSegments: number().int().nonnegative(),
8573
+ ghostBytes: number().int().nonnegative(),
8574
+ forgottenSegments: number().int().nonnegative(),
8575
+ orphanFiles: number().int().nonnegative()
8576
+ });
8577
+ /**
8578
+ * What one walk claimed, listed, found and (only when armed) forgot.
8579
+ *
8580
+ * `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
8581
+ * walk that saw a fraction of the location is visible in its own report rather
8582
+ * than in the absence of one.
8583
+ */
8584
+ var LedgerWalkReportSchema = object({
8585
+ locationId: string(),
8586
+ applied: boolean(),
8587
+ refused: LedgerWalkRefusalSchema.nullable(),
8588
+ archiveSegments: number().int().nonnegative().nullable(),
8589
+ archiveBytes: number().int().nonnegative().nullable(),
8590
+ hoursClaimed: number().int().nonnegative(),
8591
+ hoursWalked: number().int().nonnegative(),
8592
+ hoursMissing: number().int().nonnegative(),
8593
+ /** `readdir` calls issued — the cost, stated in the unit that is paid. */
8594
+ listings: number().int().nonnegative(),
8595
+ segmentsClaimed: number().int().nonnegative(),
8596
+ ghostSegments: number().int().nonnegative(),
8597
+ ghostBytes: number().int().nonnegative(),
8598
+ ghostHoursWhole: number().int().nonnegative(),
8599
+ forgottenSegments: number().int().nonnegative(),
8600
+ forgottenBytes: number().int().nonnegative(),
8601
+ /** Files under a claimed hour that no durable row names. Never deleted. */
8602
+ orphanFiles: number().int().nonnegative(),
8603
+ orphanSample: array(string()).readonly(),
8604
+ hoursSkipped: number().int().nonnegative(),
8605
+ skippedByReason: LedgerWalkSkipCountsSchema,
8606
+ /** The walk stopped at its per-pass hour bound with claims unwalked. */
8607
+ bounded: boolean(),
8608
+ byDevice: array(LedgerWalkDeviceReportSchema).readonly()
8609
+ });
8479
8610
  /** How many rows a media pass would still act on against a given target — the
8480
8611
  * media lane's denominator AND its residue, from ONE derivation so the two can
8481
8612
  * never disagree. `null` = the count could not be taken. */
8482
8613
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
8483
8614
  var RelocatableMediaCountInputSchema = object({
8484
8615
  toLocationId: string().min(1),
8616
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
8617
+ fromLocationId: string().optional(),
8485
8618
  /** Omitted = `move`. */
8486
8619
  mode: MediaRelocateModeSchema.optional()
8487
8620
  });
8488
8621
  /**
8622
+ * Operator cleanup of leftover analytics rows, optional debug media, and
8623
+ * ghost ledger entries on frozen footage locations.
8624
+ *
8625
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
8626
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
8627
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
8628
+ * with no operator-visible status.
8629
+ */
8630
+ var StorageCleanupPhaseSchema = _enum([
8631
+ "orphans",
8632
+ "debug-media",
8633
+ "ghost-ledger",
8634
+ "done",
8635
+ "failed",
8636
+ "cancelled"
8637
+ ]);
8638
+ var StorageCleanupInputSchema = object({
8639
+ /** Also walk motion stills / track filmstrips. Off by default. */
8640
+ includeDebugMedia: boolean().optional() });
8641
+ var StorageCleanupJobSchema = object({
8642
+ jobId: string(),
8643
+ phase: StorageCleanupPhaseSchema,
8644
+ includeDebugMedia: boolean(),
8645
+ orphansReclaimed: number().int().nonnegative(),
8646
+ orphanBytesReclaimed: number().int().nonnegative(),
8647
+ debugMediaReclaimed: number().int().nonnegative(),
8648
+ debugMediaBytesReclaimed: number().int().nonnegative(),
8649
+ ghostsForgotten: number().int().nonnegative(),
8650
+ ghostBytesForgotten: number().int().nonnegative(),
8651
+ /** Short operator-facing line: current collection, pass, or location. */
8652
+ detail: string().nullable(),
8653
+ cancelRequested: boolean(),
8654
+ startedAt: number(),
8655
+ updatedAt: number(),
8656
+ finishedAt: number().nullable(),
8657
+ error: string().nullable()
8658
+ });
8659
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
8660
+ /**
8489
8661
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
8490
8662
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
8491
8663
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -8513,11 +8685,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
8513
8685
  * The default location for a type uses `id === <type>:default` by
8514
8686
  * convention (the bare type ref like `'backups'` resolves to it).
8515
8687
  *
8516
- * `isSystem: true` marks a location as orchestrator-seeded and
8517
- * undeletable. The bootstrap-installed defaults (one per type) carry
8518
- * this flag; operator-added locations don't. Editing the config of
8519
- * a system location is allowed (path migration, provider swap) but
8520
- * deleting it is rejected at the cap level.
8688
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
8689
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
8690
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
8691
+ * / last-enabled, not on this bit.
8521
8692
  */
8522
8693
  var StorageLocationSchema = object({
8523
8694
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -21612,13 +21783,15 @@ var ListGroupsPageSchema = object({
21612
21783
  groups: array(AnalyticsGroupRecordSchema).readonly(),
21613
21784
  nextCursor: string().nullable()
21614
21785
  });
21786
+ var KEY_EVENTS_DEFAULT_LIMIT = 50;
21787
+ var KEY_EVENTS_MAX_LIMIT = 200;
21615
21788
  var KeyEventQueryInput = object({
21616
21789
  deviceId: number(),
21617
21790
  /** Window lower bound (track firstSeen ≥ since). */
21618
21791
  since: number(),
21619
21792
  /** Window upper bound (track firstSeen ≤ until). */
21620
21793
  until: number(),
21621
- limit: number().int().min(1).max(200).default(50),
21794
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
21622
21795
  /** Drop tracks scoring below this importance. */
21623
21796
  minImportance: number().min(0).max(1).optional(),
21624
21797
  /** Restrict to a single class (e.g. 'person'). */
@@ -21640,6 +21813,32 @@ var KeyEventSchema = object({
21640
21813
  ...TrackFlagFields,
21641
21814
  ...TrackRetrainFields
21642
21815
  });
21816
+ /** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
21817
+ var KeyEventBatchQueryInput = object({
21818
+ deviceIds: array(number()).min(1).max(200),
21819
+ since: number(),
21820
+ until: number(),
21821
+ /** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
21822
+ * across the set, which would let a busy camera starve a quiet one of its
21823
+ * rows and change what the merged feed contains. */
21824
+ limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
21825
+ minImportance: number().min(0).max(1).optional(),
21826
+ classFilter: string().optional()
21827
+ });
21828
+ /**
21829
+ * One camera's key events in a batch answer.
21830
+ *
21831
+ * The row exists for every requested id. `getKeyEvents` degrades to `[]` on
21832
+ * error rather than throwing, so a camera whose store read failed and one with
21833
+ * no events in the window were ALREADY indistinguishable per camera — the
21834
+ * batch does not make that worse, and the row keeps the deviceId the single
21835
+ * method's output never carried (the caller used to stamp it from the fan-out
21836
+ * key, which only worked because there was one query per camera).
21837
+ */
21838
+ var KeyEventsForDeviceSchema = object({
21839
+ deviceId: number(),
21840
+ events: array(KeyEventSchema).readonly()
21841
+ });
21643
21842
  object({
21644
21843
  trackId: string(),
21645
21844
  className: string(),
@@ -21859,6 +22058,47 @@ var RebuildStatusSchema = object({
21859
22058
  /** Present when the pass ended by throwing. */
21860
22059
  error: string().nullable()
21861
22060
  });
22061
+ /**
22062
+ * Acknowledgement that a debug-media reclaim STARTED.
22063
+ *
22064
+ * The pass is paced at ~2 MB/s over a standing 100 GB — tens of minutes — so
22065
+ * it runs detached and this returns immediately. Awaiting it is how the
22066
+ * `addons.custom` door hit the 60 s UDS deadline while the walk carried on
22067
+ * with no status. Poll {@link pipelineAnalyticsCapability.methods.getMediaReclaimStatus}.
22068
+ */
22069
+ var MediaReclaimStartResultSchema = object({
22070
+ started: boolean(),
22071
+ /** True when a pass was already running; the new request is ignored. */
22072
+ alreadyRunning: boolean()
22073
+ });
22074
+ var MediaReclaimInputSchema = object({
22075
+ mode: _enum(["report", "reclaim"]).default("report"),
22076
+ scopes: array(_enum(["motion-still", "track-filmstrip"])).min(1).optional(),
22077
+ deviceIds: array(number().int()).min(1).optional(),
22078
+ restart: boolean().optional(),
22079
+ pageSize: number().int().min(50).max(5e3).optional(),
22080
+ maxRowsPerDevice: number().int().min(1).max(5e5).optional(),
22081
+ maxReclaimPerDevice: number().int().min(1).max(5e5).optional(),
22082
+ maxBytesPerRun: number().int().min(1).optional(),
22083
+ budgetMinutes: number().int().min(1).max(720).optional(),
22084
+ throttleBytesPerSec: number().int().min(64 * 1024).optional(),
22085
+ graceMinutes: number().int().min(1).max(10080).optional()
22086
+ });
22087
+ var MediaReclaimStatusSchema = object({
22088
+ running: boolean(),
22089
+ mode: _enum(["report", "reclaim"]).nullable(),
22090
+ totalExamined: number(),
22091
+ totalEligible: number(),
22092
+ totalReclaimed: number(),
22093
+ totalBytesReclaimed: number(),
22094
+ totalRefused: number(),
22095
+ /** Device+scope windows finished in this pass. */
22096
+ devicesDone: number(),
22097
+ complete: boolean().nullable(),
22098
+ startedAtMs: number().nullable(),
22099
+ finishedAtMs: number().nullable(),
22100
+ error: string().nullable()
22101
+ });
21862
22102
  var ReplayFrameInputSchema = object({
21863
22103
  timestamp: number(),
21864
22104
  frame: PipelineRunResultBridge
@@ -21988,6 +22228,21 @@ var pipelineAnalyticsCapability = {
21988
22228
  * scored on-read (no write). Degrades to `[]` on error.
21989
22229
  */
21990
22230
  getKeyEvents: method(KeyEventQueryInput, array(KeyEventSchema).readonly()),
22231
+ /**
22232
+ * The same ranking, for a SET of cameras, in one round trip.
22233
+ *
22234
+ * The Detection Intelligence events feed asks this of every selected
22235
+ * camera and re-asks on a 30s timer. Fanned out client-side that is N
22236
+ * round trips — browser → hub → post-analysis — for N independent,
22237
+ * already-indexed store queries. Batched, the queries are unchanged and
22238
+ * run concurrently INSIDE the owner; only the transport collapses.
22239
+ *
22240
+ * Deliberately per-device rather than pre-merged: `limit` stays per
22241
+ * camera (a total would let a busy camera starve a quiet one), and a
22242
+ * caller that renders one camera's lane needs to know which camera a row
22243
+ * came from. `getKeyEvents` stays for single-device callers.
22244
+ */
22245
+ getKeyEventsBatch: method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()),
21991
22246
  /** Server-side bucketed event counts for the 24-hour timeline.
21992
22247
  * Returns one entry per non-empty bucket; empty buckets are omitted. */
21993
22248
  getEventDensity: method(object({
@@ -22266,6 +22521,20 @@ var pipelineAnalyticsCapability = {
22266
22521
  auth: "admin"
22267
22522
  }),
22268
22523
  /**
22524
+ * Reclaim the standing debug-media backlog (motion-visit stills + track
22525
+ * filmstrips). DETACHED: returns `{ started }` immediately. The pass is
22526
+ * tens of minutes; awaiting it is a timeout, not a verdict. Dry-run unless
22527
+ * `mode: 'reclaim'`. Poll `getMediaReclaimStatus`.
22528
+ */
22529
+ reclaimDebugMedia: method(MediaReclaimInputSchema, MediaReclaimStartResultSchema, {
22530
+ kind: "mutation",
22531
+ auth: "admin"
22532
+ }),
22533
+ getMediaReclaimStatus: method(object({}), MediaReclaimStatusSchema, {
22534
+ kind: "query",
22535
+ auth: "admin"
22536
+ }),
22537
+ /**
22269
22538
  * The CHEAP QUESTION, asked before any media moves: how big is the dataset
22270
22539
  * the marked (`markForTrain`) tracks would produce?
22271
22540
  *
@@ -25218,7 +25487,23 @@ var storageMigrationCapability = {
25218
25487
  drain: method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
25219
25488
  kind: "mutation",
25220
25489
  auth: "admin"
25221
- })
25490
+ }),
25491
+ /**
25492
+ * One operator cleanup of leftover analytics (DB + blobs) and ghost
25493
+ * ledger rows on frozen footage locations. Optional debug-media sweep.
25494
+ * Returns immediately; poll {@link cleanupStatus}.
25495
+ */
25496
+ cleanupStart: method(StorageCleanupInputSchema, object({ jobId: string() }), {
25497
+ kind: "mutation",
25498
+ auth: "admin"
25499
+ }),
25500
+ cleanupStatus: method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }),
25501
+ cleanupCancel: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
25502
+ kind: "mutation",
25503
+ auth: "admin"
25504
+ }),
25505
+ /** Recent finished migration jobs, newest first. The live job is `status`. */
25506
+ history: method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" })
25222
25507
  }
25223
25508
  };
25224
25509
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
@@ -33371,6 +33656,33 @@ var RecordingRebalanceInputSchema = object({
33371
33656
  minMoveGb: number().min(0).optional()
33372
33657
  });
33373
33658
  /**
33659
+ * Operator-facing placement of one camera onto a recordings location.
33660
+ *
33661
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
33662
+ * Auto (the planner may move this camera). `locationId` is where high/mid
33663
+ * currently write — the plan, which may disagree with the pin when Auto.
33664
+ */
33665
+ var RecordingDevicePlacementSchema = object({
33666
+ deviceId: number().int(),
33667
+ profile: string(),
33668
+ locationId: string()
33669
+ });
33670
+ var RecordingDevicePinSchema = object({
33671
+ deviceId: number().int(),
33672
+ /** Recordings-class location this camera is pinned to. */
33673
+ locationId: string()
33674
+ });
33675
+ var RecordingPlacementViewSchema = object({
33676
+ assignments: array(RecordingDevicePlacementSchema),
33677
+ pins: array(RecordingDevicePinSchema),
33678
+ defaultLocations: record(string(), string())
33679
+ });
33680
+ var RecordingSetDevicePlacementInputSchema = object({
33681
+ deviceId: number().int(),
33682
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
33683
+ locationId: string().nullable()
33684
+ });
33685
+ /**
33374
33686
  * Result of locating footage at a wall-clock instant for one device/profile.
33375
33687
  * `segment` carries the covering segment's window; `gap` reports the forward
33376
33688
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -33692,6 +34004,23 @@ var recordingCapability = {
33692
34004
  kind: "query",
33693
34005
  auth: "admin"
33694
34006
  }),
34007
+ /**
34008
+ * Does this location's LEDGER tell the truth about its disk? (D319)
34009
+ *
34010
+ * One `readdir` per claimed hour, diffed both ways: durable rows whose file
34011
+ * is not there, and files no durable row names. `apply` defaults to FALSE —
34012
+ * the report is the product, and the dry run is how an operator
34013
+ * sanity-checks the destructive run before authorising it.
34014
+ *
34015
+ * REFUSES a source that is still a write target: a listing of a live
34016
+ * location is a lower bound, which is not the strong evidence that lets
34017
+ * this pass forget without a budget. A live location is reconciled by the
34018
+ * mover, under D318's bound.
34019
+ */
34020
+ reconcileLedgerAgainstDisk: method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
34021
+ kind: "mutation",
34022
+ auth: "admin"
34023
+ }),
33695
34024
  /** Cancel a running or queued relocate job. A queued job never runs. */
33696
34025
  cancelRelocateJob: method(object({ jobId: string() }), object({ cancelled: boolean() }), {
33697
34026
  kind: "mutation",
@@ -33706,6 +34035,22 @@ var recordingCapability = {
33706
34035
  startStorageRebalance: method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
33707
34036
  kind: "mutation",
33708
34037
  auth: "admin"
34038
+ }),
34039
+ /**
34040
+ * The placement plan in force plus operator pins. Drives the Locations
34041
+ * admin page: Auto vs a named recordings location, per camera.
34042
+ */
34043
+ getPlacement: method(object({}), RecordingPlacementViewSchema, {
34044
+ kind: "query",
34045
+ auth: "admin"
34046
+ }),
34047
+ /**
34048
+ * Pin a camera to a recordings location, or clear the pin (Auto). High and
34049
+ * mid follow the pin; low stays with the recordingsLow planner.
34050
+ */
34051
+ setDevicePlacement: method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
34052
+ kind: "mutation",
34053
+ auth: "admin"
33709
34054
  })
33710
34055
  }
33711
34056
  };
@@ -34126,6 +34471,25 @@ var SceneMonitorStatusSchema = object({
34126
34471
  monitors: array(SceneMonitorSchema),
34127
34472
  lastFetchedAt: number()
34128
34473
  });
34474
+ /**
34475
+ * One camera's row in a `listScenesBatch` answer.
34476
+ *
34477
+ * `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
34478
+ * is a `defaultActive` wrapper, so every camera is asked; a camera whose
34479
+ * provider is absent (pipeline-analytics not deployed, the post-processing node
34480
+ * down) cannot answer, and that is not the same fact as a camera with no scenes
34481
+ * configured. Fanned out per camera the difference was visible — one query
34482
+ * errored while the others resolved — and a batch that returned only the rows
34483
+ * it managed would have destroyed it, silently, by making an unreachable camera
34484
+ * indistinguishable from one that answered `monitors: []`.
34485
+ *
34486
+ * So: EVERY requested deviceId gets a row. `status: null` means "this camera
34487
+ * could not be read"; `status.monitors: []` means "read, and it has none".
34488
+ */
34489
+ var SceneMonitorStatusForDeviceSchema = object({
34490
+ deviceId: number(),
34491
+ status: SceneMonitorStatusSchema.nullable()
34492
+ });
34129
34493
  var sceneMonitorCapability = {
34130
34494
  name: "scene-monitor",
34131
34495
  scope: "device",
@@ -34135,6 +34499,22 @@ var sceneMonitorCapability = {
34135
34499
  deviceTypes: [DeviceType.Camera],
34136
34500
  methods: {
34137
34501
  listScenes: method(object({ deviceId: number() }), SceneMonitorStatusSchema),
34502
+ /**
34503
+ * The same answer, for a SET of cameras, in one round trip.
34504
+ *
34505
+ * `/scenes` renders every camera and re-reads them on a 30s safety-net
34506
+ * poll behind the push slice. Fanned out client-side that was one query
34507
+ * per camera — 29 round trips through the browser, the hub and the
34508
+ * post-analysis runner every 30 seconds to read an in-memory map the
34509
+ * owner had already merged. The work is unchanged (`statusFor` per
34510
+ * device, all in-process at the owner); what collapses is the transport.
34511
+ *
34512
+ * A camera that cannot answer still gets a row, with `status: null` —
34513
+ * see {@link SceneMonitorStatusForDeviceSchema}. Never fewer rows than
34514
+ * ids: a caller that asked for twenty-nine and got twenty-seven cannot
34515
+ * tell which two are missing, or that any are.
34516
+ */
34517
+ listScenesBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()),
34138
34518
  createScene: method(object({
34139
34519
  deviceId: number(),
34140
34520
  label: string(),
@@ -36121,6 +36501,27 @@ var CameraOccupancySnapshotSchema = object({
36121
36501
  stationaryObjects: array(StationaryObjectSchema).readonly().optional()
36122
36502
  });
36123
36503
  /**
36504
+ * One camera's row in a `getCurrentSnapshotBatch` answer.
36505
+ *
36506
+ * THREE outcomes, and the single-camera method could only express two of them
36507
+ * because `snapshot: null` was already spoken for:
36508
+ *
36509
+ * - `read: 'read'`, `snapshot` present — the live occupancy reading.
36510
+ * - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
36511
+ * yet: no frame since boot, and no parked-object registry to hydrate from.
36512
+ * - `read: 'unreadable'` — the owner could not answer for this
36513
+ * camera. `snapshot` is null, and it does NOT mean "nothing parked here".
36514
+ *
36515
+ * Collapsing the last two is the failure this field exists to prevent: a
36516
+ * hydration that threw would otherwise render as an empty Stationary section,
36517
+ * which is a definite claim about a camera nobody could read.
36518
+ */
36519
+ var CameraOccupancySnapshotForDeviceSchema = object({
36520
+ deviceId: number(),
36521
+ read: _enum(["read", "unreadable"]),
36522
+ snapshot: CameraOccupancySnapshotSchema.nullable()
36523
+ });
36524
+ /**
36124
36525
  * Time-series resolution. The history methods return one bucket per
36125
36526
  * step over the requested range. Smaller resolutions cost more
36126
36527
  * memory + bandwidth; bound to discrete steps so caller cannot ask
@@ -36177,6 +36578,20 @@ var zoneAnalyticsCapability = {
36177
36578
  * (no inference result emitted since boot or since binding was
36178
36579
  * activated). */
36179
36580
  getCurrentSnapshot: method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()),
36581
+ /**
36582
+ * The same snapshot, for a SET of cameras, in one round trip.
36583
+ *
36584
+ * The Events page's Stationary section polls this every 15s for every
36585
+ * selected camera. Fanned out client-side that is one query per camera to
36586
+ * read a `Map.get` at the owner — the answer costs nothing, the round trip
36587
+ * costs everything. Batched, N transports become one and the per-device
36588
+ * work is unchanged.
36589
+ *
36590
+ * Every requested deviceId gets a row, tagged `read` — see
36591
+ * {@link CameraOccupancySnapshotForDeviceSchema}. A camera the owner could
36592
+ * not answer for is `'unreadable'`, never an empty reading.
36593
+ */
36594
+ getCurrentSnapshotBatch: method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()),
36180
36595
  /** Time-series object count inside one zone. `className` optional —
36181
36596
  * omit to count every class in the zone. */
36182
36597
  getZoneHistory: method(object({
@@ -39778,6 +40193,18 @@ Object.freeze({
39778
40193
  addonId: null,
39779
40194
  access: "view"
39780
40195
  },
40196
+ "pipelineAnalytics.getKeyEventsBatch": {
40197
+ capName: "pipeline-analytics",
40198
+ capScope: "device",
40199
+ addonId: null,
40200
+ access: "view"
40201
+ },
40202
+ "pipelineAnalytics.getMediaReclaimStatus": {
40203
+ capName: "pipeline-analytics",
40204
+ capScope: "device",
40205
+ addonId: null,
40206
+ access: "view"
40207
+ },
39781
40208
  "pipelineAnalytics.getMotionEvents": {
39782
40209
  capName: "pipeline-analytics",
39783
40210
  capScope: "device",
@@ -39952,6 +40379,12 @@ Object.freeze({
39952
40379
  addonId: null,
39953
40380
  access: "create"
39954
40381
  },
40382
+ "pipelineAnalytics.reclaimDebugMedia": {
40383
+ capName: "pipeline-analytics",
40384
+ capScope: "device",
40385
+ addonId: null,
40386
+ access: "create"
40387
+ },
39955
40388
  "pipelineAnalytics.reconcileFromDisk": {
39956
40389
  capName: "pipeline-analytics",
39957
40390
  capScope: "device",
@@ -40876,6 +41309,12 @@ Object.freeze({
40876
41309
  addonId: null,
40877
41310
  access: "view"
40878
41311
  },
41312
+ "recording.getPlacement": {
41313
+ capName: "recording",
41314
+ capScope: "system",
41315
+ addonId: null,
41316
+ access: "view"
41317
+ },
40879
41318
  "recording.getPlaybackManifest": {
40880
41319
  capName: "recording",
40881
41320
  capScope: "system",
@@ -40954,6 +41393,12 @@ Object.freeze({
40954
41393
  addonId: null,
40955
41394
  access: "view"
40956
41395
  },
41396
+ "recording.reconcileLedgerAgainstDisk": {
41397
+ capName: "recording",
41398
+ capScope: "system",
41399
+ addonId: null,
41400
+ access: "create"
41401
+ },
40957
41402
  "recording.refreshStorageLocationsForMigration": {
40958
41403
  capName: "recording",
40959
41404
  capScope: "system",
@@ -40996,6 +41441,12 @@ Object.freeze({
40996
41441
  addonId: null,
40997
41442
  access: "create"
40998
41443
  },
41444
+ "recording.setDevicePlacement": {
41445
+ capName: "recording",
41446
+ capScope: "system",
41447
+ addonId: null,
41448
+ access: "create"
41449
+ },
40999
41450
  "recording.startStorageMigrationMove": {
41000
41451
  capName: "recording",
41001
41452
  capScope: "system",
@@ -41080,6 +41531,12 @@ Object.freeze({
41080
41531
  addonId: null,
41081
41532
  access: "view"
41082
41533
  },
41534
+ "sceneMonitor.listScenesBatch": {
41535
+ capName: "scene-monitor",
41536
+ capScope: "device",
41537
+ addonId: null,
41538
+ access: "view"
41539
+ },
41083
41540
  "sceneMonitor.recheckNow": {
41084
41541
  capName: "scene-monitor",
41085
41542
  capScope: "device",
@@ -41434,12 +41891,36 @@ Object.freeze({
41434
41891
  addonId: null,
41435
41892
  access: "create"
41436
41893
  },
41894
+ "storageMigration.cleanupCancel": {
41895
+ capName: "storage-migration",
41896
+ capScope: "system",
41897
+ addonId: null,
41898
+ access: "create"
41899
+ },
41900
+ "storageMigration.cleanupStart": {
41901
+ capName: "storage-migration",
41902
+ capScope: "system",
41903
+ addonId: null,
41904
+ access: "create"
41905
+ },
41906
+ "storageMigration.cleanupStatus": {
41907
+ capName: "storage-migration",
41908
+ capScope: "system",
41909
+ addonId: null,
41910
+ access: "view"
41911
+ },
41437
41912
  "storageMigration.drain": {
41438
41913
  capName: "storage-migration",
41439
41914
  capScope: "system",
41440
41915
  addonId: null,
41441
41916
  access: "create"
41442
41917
  },
41918
+ "storageMigration.history": {
41919
+ capName: "storage-migration",
41920
+ capScope: "system",
41921
+ addonId: null,
41922
+ access: "view"
41923
+ },
41443
41924
  "storageMigration.movers": {
41444
41925
  capName: "storage-migration",
41445
41926
  capScope: "system",
@@ -42436,6 +42917,12 @@ Object.freeze({
42436
42917
  addonId: null,
42437
42918
  access: "view"
42438
42919
  },
42920
+ "zoneAnalytics.getCurrentSnapshotBatch": {
42921
+ capName: "zone-analytics",
42922
+ capScope: "device",
42923
+ addonId: null,
42924
+ access: "view"
42925
+ },
42439
42926
  "zoneAnalytics.getUnzonedHistory": {
42440
42927
  capName: "zone-analytics",
42441
42928
  capScope: "device",
@@ -43440,6 +43927,11 @@ Object.freeze({
43440
43927
  form: "single",
43441
43928
  optional: false
43442
43929
  }],
43930
+ "pipelineAnalytics.getKeyEventsBatch": [{
43931
+ name: "deviceIds",
43932
+ form: "array",
43933
+ optional: false
43934
+ }],
43443
43935
  "pipelineAnalytics.getMotionEvents": [{
43444
43936
  name: "deviceId",
43445
43937
  form: "single",
@@ -43545,6 +44037,11 @@ Object.freeze({
43545
44037
  form: "single",
43546
44038
  optional: true
43547
44039
  }],
44040
+ "pipelineAnalytics.reclaimDebugMedia": [{
44041
+ name: "deviceIds",
44042
+ form: "array",
44043
+ optional: true
44044
+ }],
43548
44045
  "pipelineAnalytics.reconcileFromDisk": [{
43549
44046
  name: "deviceId",
43550
44047
  form: "single",
@@ -43880,6 +44377,11 @@ Object.freeze({
43880
44377
  form: "single",
43881
44378
  optional: false
43882
44379
  }],
44380
+ "recording.reconcileLedgerAgainstDisk": [{
44381
+ name: "deviceId",
44382
+ form: "single",
44383
+ optional: true
44384
+ }],
43883
44385
  "recording.relocateFootage": [{
43884
44386
  name: "deviceId",
43885
44387
  form: "single",
@@ -43905,6 +44407,11 @@ Object.freeze({
43905
44407
  form: "single",
43906
44408
  optional: false
43907
44409
  }],
44410
+ "recording.setDevicePlacement": [{
44411
+ name: "deviceId",
44412
+ form: "single",
44413
+ optional: false
44414
+ }],
43908
44415
  "recording.startStorageMigrationMove": [{
43909
44416
  name: "deviceId",
43910
44417
  form: "single",
@@ -43945,6 +44452,11 @@ Object.freeze({
43945
44452
  form: "single",
43946
44453
  optional: false
43947
44454
  }],
44455
+ "sceneMonitor.listScenesBatch": [{
44456
+ name: "deviceIds",
44457
+ form: "array",
44458
+ optional: false
44459
+ }],
43948
44460
  "sceneMonitor.recheckNow": [{
43949
44461
  name: "deviceId",
43950
44462
  form: "single",
@@ -44206,6 +44718,11 @@ Object.freeze({
44206
44718
  form: "single",
44207
44719
  optional: false
44208
44720
  }],
44721
+ "zoneAnalytics.getCurrentSnapshotBatch": [{
44722
+ name: "deviceIds",
44723
+ form: "array",
44724
+ optional: false
44725
+ }],
44209
44726
  "zoneAnalytics.getUnzonedHistory": [{
44210
44727
  name: "deviceId",
44211
44728
  form: "single",