@camstack/addon-pipeline 1.2.156 → 1.2.159

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 (36) hide show
  1. package/dist/audio-analyzer/index.js +2 -2
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/detection-pipeline/index.js +5 -5
  4. package/dist/detection-pipeline/index.mjs +4 -4
  5. package/dist/{dist-C499qEUf.js → dist-bBqjZ7fo.js} +169 -7
  6. package/dist/{dist-C9ohtgTQ.mjs → dist-p8ruahJy.mjs} +169 -7
  7. package/dist/{lazy-sharp-D5uApbbe.js → lazy-sharp-Ct1Ow2zO.js} +1 -1
  8. package/dist/{local-frame-registry-VkzIezFI.js → local-frame-registry-Bua7Qg7A.js} +1 -1
  9. package/dist/{local-frame-registry-DAVug-jA.mjs → local-frame-registry-Ce3h-QcZ.mjs} +1 -1
  10. package/dist/motion-wasm/index.js +2 -2
  11. package/dist/motion-wasm/index.mjs +1 -1
  12. package/dist/{node-DEq8mutP.js → node-DRc0Vqkz.js} +1 -1
  13. package/dist/{node-CwIlVFyz.mjs → node-kVYpLOax.mjs} +1 -1
  14. package/dist/pipeline-runner/index.js +5 -5
  15. package/dist/pipeline-runner/index.mjs +4 -4
  16. package/dist/{process-memory-DzycAIEm.js → process-memory-B4Id9YAE.js} +1 -1
  17. package/dist/{process-memory-DWw7FrV5.mjs → process-memory-D9s145SO.mjs} +1 -1
  18. package/dist/recorder/index.js +535 -27
  19. package/dist/recorder/index.mjs +532 -29
  20. package/dist/{segment-demux-js-Df1rAqNh.js → segment-demux-js-DAgunuXf.js} +1 -1
  21. package/dist/{segment-demux-js-D2InpBpa.mjs → segment-demux-js-VrM03R0O.mjs} +1 -1
  22. package/dist/session-decode/decode-worker-child.js +2 -2
  23. package/dist/session-decode/decode-worker-child.mjs +1 -1
  24. package/dist/stream-broker/_stub.js +2 -2
  25. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-BJlcLzCs.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-B-FG8Phz.mjs} +2 -2
  26. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-lMPlG5w5.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-OnimCf2v.mjs} +1 -1
  27. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-yWrVN7u8.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-_e_Px_mR.mjs} +1 -1
  28. package/dist/stream-broker/demux-worker-child.js +1 -1
  29. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  30. package/dist/stream-broker/{hostInit-QpJx-TgK.mjs → hostInit-DePWOWOH.mjs} +2 -2
  31. package/dist/stream-broker/index.js +3 -3
  32. package/dist/stream-broker/index.mjs +3 -3
  33. package/dist/stream-broker/remoteEntry.js +1 -1
  34. package/dist/{worker-protocol-CFHcqXoS.mjs → worker-protocol-BN0Q-eeu.mjs} +1 -1
  35. package/dist/{worker-protocol-ge8Ce0Bo.js → worker-protocol-CjWhvUMn.js} +1 -1
  36. package/package.json +1 -1
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-C499qEUf.js");
6
- const require_process_memory = require("../process-memory-DzycAIEm.js");
5
+ const require_dist = require("../dist-bBqjZ7fo.js");
6
+ const require_process_memory = require("../process-memory-B4Id9YAE.js");
7
7
  let node_fs = require("node:fs");
8
8
  node_fs = require_dist.__toESM(node_fs);
9
9
  let node_path = require("node:path");
@@ -1,6 +1,6 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { A as audioAnalysisCapability, It as hydrateSchema, S as PoolMemoryWatchdog, _t as resolvePoolMemoryPolicy, j as audioAnalyzerCapability, jt as BaseAddon, n as AUDIO_BACKEND_CHOICES, nt as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL, wt as errMsg } from "../dist-C9ohtgTQ.mjs";
3
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-DWw7FrV5.mjs";
2
+ import { A as audioAnalysisCapability, It as hydrateSchema, S as PoolMemoryWatchdog, _t as resolvePoolMemoryPolicy, j as audioAnalyzerCapability, jt as BaseAddon, n as AUDIO_BACKEND_CHOICES, nt as mapAudioLabelToMacro, s as DEFAULT_AUDIO_ANALYZER_CONFIG, v as HF_BASE_URL, wt as errMsg } from "../dist-p8ruahJy.mjs";
3
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-D9s145SO.mjs";
4
4
  import * as fs from "node:fs";
5
5
  import * as path$1 from "node:path";
6
6
  import { downloadFile } from "@camstack/system/addon-utils";
@@ -2,12 +2,12 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-C499qEUf.js");
6
- const require_node = require("../node-DEq8mutP.js");
7
- const require_local_frame_registry = require("../local-frame-registry-VkzIezFI.js");
8
- const require_lazy_sharp = require("../lazy-sharp-D5uApbbe.js");
5
+ const require_dist = require("../dist-bBqjZ7fo.js");
6
+ const require_node = require("../node-DRc0Vqkz.js");
7
+ const require_local_frame_registry = require("../local-frame-registry-Bua7Qg7A.js");
8
+ const require_lazy_sharp = require("../lazy-sharp-Ct1Ow2zO.js");
9
9
  const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
10
- const require_process_memory = require("../process-memory-DzycAIEm.js");
10
+ const require_process_memory = require("../process-memory-B4Id9YAE.js");
11
11
  let node_fs = require("node:fs");
12
12
  node_fs = require_dist.__toESM(node_fs);
13
13
  let node_path = require("node:path");
@@ -1,10 +1,10 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
2
- import { Bt as nodePin, Ft as createEvent, It as hydrateSchema, Kt as array, O as YAMNET_TO_MACRO, Q as inferModelProvider, Qt as object, S as PoolMemoryWatchdog, St as supportedRuntimes$1, Vt as parseJsonUnknown, W as detectionPipelineCapability, Wt as sleep, Y as evaluateZoneRules, _t as resolvePoolMemoryPolicy, at as overlayClusterStepSettings, c as DEFAULT_CLUSTER_STEP_MODELS, ct as pickClusterStepSettings, dt as pipelineExecutorCapability, en as string, et as loadContributionCapability, ht as resolveClusterStepModelId, jt as BaseAddon, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, q as enumerateInferenceDevices, st as pickClusterStepModels, t as APPLE_SA_TO_MACRO, tn as union, wt as errMsg, yt as runtimeDevices$1, z as defaultDeviceFor$1 } from "../dist-C9ohtgTQ.mjs";
3
- import { a as readProcessCost } from "../node-CwIlVFyz.mjs";
4
- import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep, t as localFrameRegistry, u as landmarkPrecisionVerdict } from "../local-frame-registry-DAVug-jA.mjs";
2
+ import { Bt as nodePin, Ft as createEvent, It as hydrateSchema, Kt as array, O as YAMNET_TO_MACRO, Q as inferModelProvider, Qt as object, S as PoolMemoryWatchdog, St as supportedRuntimes$1, Vt as parseJsonUnknown, W as detectionPipelineCapability, Wt as sleep, Y as evaluateZoneRules, _t as resolvePoolMemoryPolicy, at as overlayClusterStepSettings, c as DEFAULT_CLUSTER_STEP_MODELS, ct as pickClusterStepSettings, dt as pipelineExecutorCapability, en as string, et as loadContributionCapability, ht as resolveClusterStepModelId, jt as BaseAddon, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, nn as EventCategory, q as enumerateInferenceDevices, st as pickClusterStepModels, t as APPLE_SA_TO_MACRO, tn as union, wt as errMsg, yt as runtimeDevices$1, z as defaultDeviceFor$1 } from "../dist-p8ruahJy.mjs";
3
+ import { a as readProcessCost } from "../node-kVYpLOax.mjs";
4
+ import { a as getDefaultModelForFormat, c as getStepDefinition, i as ALL_STEPS, l as resolveModelForFormat, o as getDefaultModelForFormatFromDef, r as ALL_PIPELINE_STEPS, s as getStep, t as localFrameRegistry, u as landmarkPrecisionVerdict } from "../local-frame-registry-Ce3h-QcZ.mjs";
5
5
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
6
6
  import { n as startEventLoopStallMonitor } from "../event-loop-stall-monitor-DXLNBMkY.mjs";
7
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-DWw7FrV5.mjs";
7
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-D9s145SO.mjs";
8
8
  import * as fs from "node:fs";
9
9
  import * as path$1 from "node:path";
10
10
  import { spawn } from "node:child_process";
@@ -9431,6 +9431,13 @@ var MediaRelocateModeSchema = _enum([
9431
9431
  ]);
9432
9432
  var RelocateMediaInputSchema = object({
9433
9433
  toLocationId: string(),
9434
+ /**
9435
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
9436
+ * every row that is not already on `toLocationId` (the historical
9437
+ * behaviour). A named source is what a from→to migration needs: without it
9438
+ * "move events off disk 2" also emptied disk 1.
9439
+ */
9440
+ fromLocationId: string().optional(),
9434
9441
  throttleMbps: number().min(1).max(1e3).optional(),
9435
9442
  /** Omitted = `move`, the pre-existing behaviour. */
9436
9443
  mode: MediaRelocateModeSchema.optional()
@@ -9498,6 +9505,19 @@ var StorageMigrationDestinationsSchema = object({
9498
9505
  galleryMedia: string().min(1).optional()
9499
9506
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
9500
9507
  /**
9508
+ * Optional named source per class. Omitted = the class's current default
9509
+ * (the historical behaviour). A named source that is NOT the default is a
9510
+ * drain of that disk: bytes move, the default stays, and the source is
9511
+ * disabled when the move finishes.
9512
+ */
9513
+ var StorageMigrationSourcesSchema = object({
9514
+ recordings: string().min(1).optional(),
9515
+ recordingsLow: string().min(1).optional(),
9516
+ eventMedia: string().min(1).optional(),
9517
+ backups: string().min(1).optional(),
9518
+ galleryMedia: string().min(1).optional()
9519
+ }).optional();
9520
+ /**
9501
9521
  * How a migration sequences the cutover against the byte move.
9502
9522
  *
9503
9523
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -9519,6 +9539,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
9519
9539
  /** Shared input for planning and starting an orchestrated storage migration. */
9520
9540
  var StorageMigrationInputSchema = object({
9521
9541
  destinations: StorageMigrationDestinationsSchema,
9542
+ /** Omitted = each class's current default. */
9543
+ sources: StorageMigrationSourcesSchema,
9522
9544
  throttleMbps: number().min(1).max(1e3).optional(),
9523
9545
  /** Omitted = `blocking`, which stays the default. */
9524
9546
  mode: StorageMigrationModeSchema.optional()
@@ -9598,6 +9620,13 @@ var StorageMigrationMoveSchema = object({
9598
9620
  storageClass: StorageMigrationClassSchema,
9599
9621
  fromLocationId: string(),
9600
9622
  toLocationId: string(),
9623
+ /**
9624
+ * True when `from` was NOT the class default at plan time. The move still
9625
+ * copies bytes, but the default is left alone and the source is disabled
9626
+ * once the copy verifies. Absent on jobs planned before this field existed
9627
+ * — those jobs always repointed, which is `false`.
9628
+ */
9629
+ freezeSource: boolean().optional(),
9601
9630
  moverJobId: string().nullable(),
9602
9631
  state: RelocateJobStateSchema.nullable(),
9603
9632
  error: string().nullable(),
@@ -9611,6 +9640,7 @@ var StorageMigrationJobSchema = object({
9611
9640
  * can tell a seconds-long cutover from a thirty-hour one. */
9612
9641
  mode: StorageMigrationModeSchema,
9613
9642
  destinations: StorageMigrationDestinationsSchema,
9643
+ sources: StorageMigrationSourcesSchema,
9614
9644
  throttleMbps: number(),
9615
9645
  moves: array(StorageMigrationMoveSchema),
9616
9646
  pauseLeaseId: string().nullable(),
@@ -9636,6 +9666,7 @@ var StorageMigrationFindingSchema = object({
9636
9666
  });
9637
9667
  var StorageMigrationPlanSchema = object({
9638
9668
  destinations: StorageMigrationDestinationsSchema,
9669
+ sources: StorageMigrationSourcesSchema,
9639
9670
  /** The mode this plan was built for. A plan is only valid for its mode: the
9640
9671
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
9641
9672
  * it. */
@@ -9643,7 +9674,8 @@ var StorageMigrationPlanSchema = object({
9643
9674
  moves: array(object({
9644
9675
  storageClass: StorageMigrationClassSchema,
9645
9676
  fromLocationId: string(),
9646
- toLocationId: string()
9677
+ toLocationId: string(),
9678
+ freezeSource: boolean().optional()
9647
9679
  })),
9648
9680
  findings: array(StorageMigrationFindingSchema)
9649
9681
  });
@@ -9821,10 +9853,51 @@ var LedgerWalkReportSchema = object({
9821
9853
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
9822
9854
  var RelocatableMediaCountInputSchema = object({
9823
9855
  toLocationId: string().min(1),
9856
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
9857
+ fromLocationId: string().optional(),
9824
9858
  /** Omitted = `move`. */
9825
9859
  mode: MediaRelocateModeSchema.optional()
9826
9860
  });
9827
9861
  /**
9862
+ * Operator cleanup of leftover analytics rows, optional debug media, and
9863
+ * ghost ledger entries on frozen footage locations.
9864
+ *
9865
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
9866
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
9867
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
9868
+ * with no operator-visible status.
9869
+ */
9870
+ var StorageCleanupPhaseSchema = _enum([
9871
+ "orphans",
9872
+ "debug-media",
9873
+ "ghost-ledger",
9874
+ "done",
9875
+ "failed",
9876
+ "cancelled"
9877
+ ]);
9878
+ var StorageCleanupInputSchema = object({
9879
+ /** Also walk motion stills / track filmstrips. Off by default. */
9880
+ includeDebugMedia: boolean().optional() });
9881
+ var StorageCleanupJobSchema = object({
9882
+ jobId: string(),
9883
+ phase: StorageCleanupPhaseSchema,
9884
+ includeDebugMedia: boolean(),
9885
+ orphansReclaimed: number().int().nonnegative(),
9886
+ orphanBytesReclaimed: number().int().nonnegative(),
9887
+ debugMediaReclaimed: number().int().nonnegative(),
9888
+ debugMediaBytesReclaimed: number().int().nonnegative(),
9889
+ ghostsForgotten: number().int().nonnegative(),
9890
+ ghostBytesForgotten: number().int().nonnegative(),
9891
+ /** Short operator-facing line: current collection, pass, or location. */
9892
+ detail: string().nullable(),
9893
+ cancelRequested: boolean(),
9894
+ startedAt: number(),
9895
+ updatedAt: number(),
9896
+ finishedAt: number().nullable(),
9897
+ error: string().nullable()
9898
+ });
9899
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9900
+ /**
9828
9901
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9829
9902
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9830
9903
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9852,11 +9925,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
9852
9925
  * The default location for a type uses `id === <type>:default` by
9853
9926
  * convention (the bare type ref like `'backups'` resolves to it).
9854
9927
  *
9855
- * `isSystem: true` marks a location as orchestrator-seeded and
9856
- * undeletable. The bootstrap-installed defaults (one per type) carry
9857
- * this flag; operator-added locations don't. Editing the config of
9858
- * a system location is allowed (path migration, provider swap) but
9859
- * deleting it is rejected at the cap level.
9928
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
9929
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
9930
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
9931
+ * / last-enabled, not on this bit.
9860
9932
  */
9861
9933
  var StorageLocationSchema = object({
9862
9934
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -23847,7 +23919,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
23847
23919
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
23848
23920
  kind: "mutation",
23849
23921
  auth: "admin"
23850
- });
23922
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
23923
+ kind: "mutation",
23924
+ auth: "admin"
23925
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23926
+ kind: "mutation",
23927
+ auth: "admin"
23928
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
23851
23929
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
23852
23930
  providerId: string().min(1),
23853
23931
  displayName: string().min(1),
@@ -29372,6 +29450,33 @@ var RecordingRebalanceInputSchema = object({
29372
29450
  minMoveGb: number().min(0).optional()
29373
29451
  });
29374
29452
  /**
29453
+ * Operator-facing placement of one camera onto a recordings location.
29454
+ *
29455
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
29456
+ * Auto (the planner may move this camera). `locationId` is where high/mid
29457
+ * currently write — the plan, which may disagree with the pin when Auto.
29458
+ */
29459
+ var RecordingDevicePlacementSchema = object({
29460
+ deviceId: number().int(),
29461
+ profile: string(),
29462
+ locationId: string()
29463
+ });
29464
+ var RecordingDevicePinSchema = object({
29465
+ deviceId: number().int(),
29466
+ /** Recordings-class location this camera is pinned to. */
29467
+ locationId: string()
29468
+ });
29469
+ var RecordingPlacementViewSchema = object({
29470
+ assignments: array(RecordingDevicePlacementSchema),
29471
+ pins: array(RecordingDevicePinSchema),
29472
+ defaultLocations: record(string(), string())
29473
+ });
29474
+ var RecordingSetDevicePlacementInputSchema = object({
29475
+ deviceId: number().int(),
29476
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
29477
+ locationId: string().nullable()
29478
+ });
29479
+ /**
29375
29480
  * Result of locating footage at a wall-clock instant for one device/profile.
29376
29481
  * `segment` carries the covering segment's window; `gap` reports the forward
29377
29482
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -29724,6 +29829,22 @@ var recordingCapability = {
29724
29829
  startStorageRebalance: method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
29725
29830
  kind: "mutation",
29726
29831
  auth: "admin"
29832
+ }),
29833
+ /**
29834
+ * The placement plan in force plus operator pins. Drives the Locations
29835
+ * admin page: Auto vs a named recordings location, per camera.
29836
+ */
29837
+ getPlacement: method(object({}), RecordingPlacementViewSchema, {
29838
+ kind: "query",
29839
+ auth: "admin"
29840
+ }),
29841
+ /**
29842
+ * Pin a camera to a recordings location, or clear the pin (Auto). High and
29843
+ * mid follow the pin; low stays with the recordingsLow planner.
29844
+ */
29845
+ setDevicePlacement: method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
29846
+ kind: "mutation",
29847
+ auth: "admin"
29727
29848
  })
29728
29849
  }
29729
29850
  };
@@ -36130,6 +36251,12 @@ Object.freeze({
36130
36251
  addonId: null,
36131
36252
  access: "view"
36132
36253
  },
36254
+ "recording.getPlacement": {
36255
+ capName: "recording",
36256
+ capScope: "system",
36257
+ addonId: null,
36258
+ access: "view"
36259
+ },
36133
36260
  "recording.getPlaybackManifest": {
36134
36261
  capName: "recording",
36135
36262
  capScope: "system",
@@ -36256,6 +36383,12 @@ Object.freeze({
36256
36383
  addonId: null,
36257
36384
  access: "create"
36258
36385
  },
36386
+ "recording.setDevicePlacement": {
36387
+ capName: "recording",
36388
+ capScope: "system",
36389
+ addonId: null,
36390
+ access: "create"
36391
+ },
36259
36392
  "recording.startStorageMigrationMove": {
36260
36393
  capName: "recording",
36261
36394
  capScope: "system",
@@ -36700,12 +36833,36 @@ Object.freeze({
36700
36833
  addonId: null,
36701
36834
  access: "create"
36702
36835
  },
36836
+ "storageMigration.cleanupCancel": {
36837
+ capName: "storage-migration",
36838
+ capScope: "system",
36839
+ addonId: null,
36840
+ access: "create"
36841
+ },
36842
+ "storageMigration.cleanupStart": {
36843
+ capName: "storage-migration",
36844
+ capScope: "system",
36845
+ addonId: null,
36846
+ access: "create"
36847
+ },
36848
+ "storageMigration.cleanupStatus": {
36849
+ capName: "storage-migration",
36850
+ capScope: "system",
36851
+ addonId: null,
36852
+ access: "view"
36853
+ },
36703
36854
  "storageMigration.drain": {
36704
36855
  capName: "storage-migration",
36705
36856
  capScope: "system",
36706
36857
  addonId: null,
36707
36858
  access: "create"
36708
36859
  },
36860
+ "storageMigration.history": {
36861
+ capName: "storage-migration",
36862
+ capScope: "system",
36863
+ addonId: null,
36864
+ access: "view"
36865
+ },
36709
36866
  "storageMigration.movers": {
36710
36867
  capName: "storage-migration",
36711
36868
  capScope: "system",
@@ -39192,6 +39349,11 @@ Object.freeze({
39192
39349
  form: "single",
39193
39350
  optional: false
39194
39351
  }],
39352
+ "recording.setDevicePlacement": [{
39353
+ name: "deviceId",
39354
+ form: "single",
39355
+ optional: false
39356
+ }],
39195
39357
  "recording.startStorageMigrationMove": [{
39196
39358
  name: "deviceId",
39197
39359
  form: "single",
@@ -9408,6 +9408,13 @@ var MediaRelocateModeSchema = _enum([
9408
9408
  ]);
9409
9409
  var RelocateMediaInputSchema = object({
9410
9410
  toLocationId: string(),
9411
+ /**
9412
+ * Restrict the pass to rows currently on this location. Omitted / `'*'` =
9413
+ * every row that is not already on `toLocationId` (the historical
9414
+ * behaviour). A named source is what a from→to migration needs: without it
9415
+ * "move events off disk 2" also emptied disk 1.
9416
+ */
9417
+ fromLocationId: string().optional(),
9411
9418
  throttleMbps: number().min(1).max(1e3).optional(),
9412
9419
  /** Omitted = `move`, the pre-existing behaviour. */
9413
9420
  mode: MediaRelocateModeSchema.optional()
@@ -9475,6 +9482,19 @@ var StorageMigrationDestinationsSchema = object({
9475
9482
  galleryMedia: string().min(1).optional()
9476
9483
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
9477
9484
  /**
9485
+ * Optional named source per class. Omitted = the class's current default
9486
+ * (the historical behaviour). A named source that is NOT the default is a
9487
+ * drain of that disk: bytes move, the default stays, and the source is
9488
+ * disabled when the move finishes.
9489
+ */
9490
+ var StorageMigrationSourcesSchema = object({
9491
+ recordings: string().min(1).optional(),
9492
+ recordingsLow: string().min(1).optional(),
9493
+ eventMedia: string().min(1).optional(),
9494
+ backups: string().min(1).optional(),
9495
+ galleryMedia: string().min(1).optional()
9496
+ }).optional();
9497
+ /**
9478
9498
  * How a migration sequences the cutover against the byte move.
9479
9499
  *
9480
9500
  * - `blocking` — the historical order: pause, move every byte, repoint,
@@ -9496,6 +9516,8 @@ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
9496
9516
  /** Shared input for planning and starting an orchestrated storage migration. */
9497
9517
  var StorageMigrationInputSchema = object({
9498
9518
  destinations: StorageMigrationDestinationsSchema,
9519
+ /** Omitted = each class's current default. */
9520
+ sources: StorageMigrationSourcesSchema,
9499
9521
  throttleMbps: number().min(1).max(1e3).optional(),
9500
9522
  /** Omitted = `blocking`, which stays the default. */
9501
9523
  mode: StorageMigrationModeSchema.optional()
@@ -9575,6 +9597,13 @@ var StorageMigrationMoveSchema = object({
9575
9597
  storageClass: StorageMigrationClassSchema,
9576
9598
  fromLocationId: string(),
9577
9599
  toLocationId: string(),
9600
+ /**
9601
+ * True when `from` was NOT the class default at plan time. The move still
9602
+ * copies bytes, but the default is left alone and the source is disabled
9603
+ * once the copy verifies. Absent on jobs planned before this field existed
9604
+ * — those jobs always repointed, which is `false`.
9605
+ */
9606
+ freezeSource: boolean().optional(),
9578
9607
  moverJobId: string().nullable(),
9579
9608
  state: RelocateJobStateSchema.nullable(),
9580
9609
  error: string().nullable(),
@@ -9588,6 +9617,7 @@ var StorageMigrationJobSchema = object({
9588
9617
  * can tell a seconds-long cutover from a thirty-hour one. */
9589
9618
  mode: StorageMigrationModeSchema,
9590
9619
  destinations: StorageMigrationDestinationsSchema,
9620
+ sources: StorageMigrationSourcesSchema,
9591
9621
  throttleMbps: number(),
9592
9622
  moves: array(StorageMigrationMoveSchema),
9593
9623
  pauseLeaseId: string().nullable(),
@@ -9613,6 +9643,7 @@ var StorageMigrationFindingSchema = object({
9613
9643
  });
9614
9644
  var StorageMigrationPlanSchema = object({
9615
9645
  destinations: StorageMigrationDestinationsSchema,
9646
+ sources: StorageMigrationSourcesSchema,
9616
9647
  /** The mode this plan was built for. A plan is only valid for its mode: the
9617
9648
  * `eventMedia` seal gate and the single-cardinality refusal both depend on
9618
9649
  * it. */
@@ -9620,7 +9651,8 @@ var StorageMigrationPlanSchema = object({
9620
9651
  moves: array(object({
9621
9652
  storageClass: StorageMigrationClassSchema,
9622
9653
  fromLocationId: string(),
9623
- toLocationId: string()
9654
+ toLocationId: string(),
9655
+ freezeSource: boolean().optional()
9624
9656
  })),
9625
9657
  findings: array(StorageMigrationFindingSchema)
9626
9658
  });
@@ -9798,10 +9830,51 @@ var LedgerWalkReportSchema = object({
9798
9830
  var RelocatableMediaCountSchema = object({ rows: number().int().nonnegative() }).nullable();
9799
9831
  var RelocatableMediaCountInputSchema = object({
9800
9832
  toLocationId: string().min(1),
9833
+ /** Restrict the count to one source; omitted / `'*'` = every non-target row. */
9834
+ fromLocationId: string().optional(),
9801
9835
  /** Omitted = `move`. */
9802
9836
  mode: MediaRelocateModeSchema.optional()
9803
9837
  });
9804
9838
  /**
9839
+ * Operator cleanup of leftover analytics rows, optional debug media, and
9840
+ * ghost ledger entries on frozen footage locations.
9841
+ *
9842
+ * A pass is tens of minutes on a standing backlog. The hub method RETURNS
9843
+ * `{ jobId }` immediately; progress is `cleanupStatus`. Awaiting the work
9844
+ * is how `addons.custom` hit the 60 s UDS deadline while reclaim continued
9845
+ * with no operator-visible status.
9846
+ */
9847
+ var StorageCleanupPhaseSchema = _enum([
9848
+ "orphans",
9849
+ "debug-media",
9850
+ "ghost-ledger",
9851
+ "done",
9852
+ "failed",
9853
+ "cancelled"
9854
+ ]);
9855
+ var StorageCleanupInputSchema = object({
9856
+ /** Also walk motion stills / track filmstrips. Off by default. */
9857
+ includeDebugMedia: boolean().optional() });
9858
+ var StorageCleanupJobSchema = object({
9859
+ jobId: string(),
9860
+ phase: StorageCleanupPhaseSchema,
9861
+ includeDebugMedia: boolean(),
9862
+ orphansReclaimed: number().int().nonnegative(),
9863
+ orphanBytesReclaimed: number().int().nonnegative(),
9864
+ debugMediaReclaimed: number().int().nonnegative(),
9865
+ debugMediaBytesReclaimed: number().int().nonnegative(),
9866
+ ghostsForgotten: number().int().nonnegative(),
9867
+ ghostBytesForgotten: number().int().nonnegative(),
9868
+ /** Short operator-facing line: current collection, pass, or location. */
9869
+ detail: string().nullable(),
9870
+ cancelRequested: boolean(),
9871
+ startedAt: number(),
9872
+ updatedAt: number(),
9873
+ finishedAt: number().nullable(),
9874
+ error: string().nullable()
9875
+ });
9876
+ var StorageCleanupStatusInputSchema = object({ jobId: string().optional() });
9877
+ /**
9805
9878
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
9806
9879
  * storage a location serves. Defined here (not in `capabilities/storage.cap.ts`)
9807
9880
  * so the persisted record schema and the consumer-facing cap can both consume it
@@ -9829,11 +9902,10 @@ var StorageLocationTypeSchema = string().regex(/^[a-z][a-zA-Z0-9-]*$/);
9829
9902
  * The default location for a type uses `id === <type>:default` by
9830
9903
  * convention (the bare type ref like `'backups'` resolves to it).
9831
9904
  *
9832
- * `isSystem: true` marks a location as orchestrator-seeded and
9833
- * undeletable. The bootstrap-installed defaults (one per type) carry
9834
- * this flag; operator-added locations don't. Editing the config of
9835
- * a system location is allowed (path migration, provider swap) but
9836
- * deleting it is rejected at the cap level.
9905
+ * `isSystem` is a legacy persisted flag. Seed still creates the initial
9906
+ * `<type>:default` locations; the flag is no longer a lock, a badge, or a
9907
+ * prune selector. New writes leave it false. Deletion is gated on uniqueness
9908
+ * / last-enabled, not on this bit.
9837
9909
  */
9838
9910
  var StorageLocationSchema = object({
9839
9911
  id: string().regex(/^[a-z][a-zA-Z0-9-]*:[a-zA-Z0-9-]+$/),
@@ -23824,7 +23896,13 @@ method(StorageMigrationInputSchema, StorageMigrationPlanSchema, { auth: "admin"
23824
23896
  }), method(object({}), array(StorageMigrationMoverSchema).readonly(), { auth: "admin" }), method(object({}), array(StorageMigrationResidueSchema).readonly(), { auth: "admin" }), method(StorageMigrationDrainInputSchema, object({ jobId: string() }), {
23825
23897
  kind: "mutation",
23826
23898
  auth: "admin"
23827
- });
23899
+ }), method(StorageCleanupInputSchema, object({ jobId: string() }), {
23900
+ kind: "mutation",
23901
+ auth: "admin"
23902
+ }), method(StorageCleanupStatusInputSchema, StorageCleanupJobSchema.nullable(), { auth: "admin" }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
23903
+ kind: "mutation",
23904
+ auth: "admin"
23905
+ }), method(object({}), array(StorageMigrationJobSchema).readonly(), { auth: "admin" });
23828
23906
  var ProviderInfoSchema = discriminatedUnion("shouldSaveDiskSpace", [object({
23829
23907
  providerId: string().min(1),
23830
23908
  displayName: string().min(1),
@@ -29349,6 +29427,33 @@ var RecordingRebalanceInputSchema = object({
29349
29427
  minMoveGb: number().min(0).optional()
29350
29428
  });
29351
29429
  /**
29430
+ * Operator-facing placement of one camera onto a recordings location.
29431
+ *
29432
+ * `pinLocationId` is the operator instruction: a location id, or `null` for
29433
+ * Auto (the planner may move this camera). `locationId` is where high/mid
29434
+ * currently write — the plan, which may disagree with the pin when Auto.
29435
+ */
29436
+ var RecordingDevicePlacementSchema = object({
29437
+ deviceId: number().int(),
29438
+ profile: string(),
29439
+ locationId: string()
29440
+ });
29441
+ var RecordingDevicePinSchema = object({
29442
+ deviceId: number().int(),
29443
+ /** Recordings-class location this camera is pinned to. */
29444
+ locationId: string()
29445
+ });
29446
+ var RecordingPlacementViewSchema = object({
29447
+ assignments: array(RecordingDevicePlacementSchema),
29448
+ pins: array(RecordingDevicePinSchema),
29449
+ defaultLocations: record(string(), string())
29450
+ });
29451
+ var RecordingSetDevicePlacementInputSchema = object({
29452
+ deviceId: number().int(),
29453
+ /** `null` = Auto. Otherwise a `recordings:*` location id. */
29454
+ locationId: string().nullable()
29455
+ });
29456
+ /**
29352
29457
  * Result of locating footage at a wall-clock instant for one device/profile.
29353
29458
  * `segment` carries the covering segment's window; `gap` reports the forward
29354
29459
  * nearest covered edge (`null` past the end of footage / when none exists)
@@ -29701,6 +29806,22 @@ var recordingCapability = {
29701
29806
  startStorageRebalance: method(RecordingRebalanceInputSchema, RecordingRebalancePlanSchema, {
29702
29807
  kind: "mutation",
29703
29808
  auth: "admin"
29809
+ }),
29810
+ /**
29811
+ * The placement plan in force plus operator pins. Drives the Locations
29812
+ * admin page: Auto vs a named recordings location, per camera.
29813
+ */
29814
+ getPlacement: method(object({}), RecordingPlacementViewSchema, {
29815
+ kind: "query",
29816
+ auth: "admin"
29817
+ }),
29818
+ /**
29819
+ * Pin a camera to a recordings location, or clear the pin (Auto). High and
29820
+ * mid follow the pin; low stays with the recordingsLow planner.
29821
+ */
29822
+ setDevicePlacement: method(RecordingSetDevicePlacementInputSchema, object({ ok: literal(true) }), {
29823
+ kind: "mutation",
29824
+ auth: "admin"
29704
29825
  })
29705
29826
  }
29706
29827
  };
@@ -36107,6 +36228,12 @@ Object.freeze({
36107
36228
  addonId: null,
36108
36229
  access: "view"
36109
36230
  },
36231
+ "recording.getPlacement": {
36232
+ capName: "recording",
36233
+ capScope: "system",
36234
+ addonId: null,
36235
+ access: "view"
36236
+ },
36110
36237
  "recording.getPlaybackManifest": {
36111
36238
  capName: "recording",
36112
36239
  capScope: "system",
@@ -36233,6 +36360,12 @@ Object.freeze({
36233
36360
  addonId: null,
36234
36361
  access: "create"
36235
36362
  },
36363
+ "recording.setDevicePlacement": {
36364
+ capName: "recording",
36365
+ capScope: "system",
36366
+ addonId: null,
36367
+ access: "create"
36368
+ },
36236
36369
  "recording.startStorageMigrationMove": {
36237
36370
  capName: "recording",
36238
36371
  capScope: "system",
@@ -36677,12 +36810,36 @@ Object.freeze({
36677
36810
  addonId: null,
36678
36811
  access: "create"
36679
36812
  },
36813
+ "storageMigration.cleanupCancel": {
36814
+ capName: "storage-migration",
36815
+ capScope: "system",
36816
+ addonId: null,
36817
+ access: "create"
36818
+ },
36819
+ "storageMigration.cleanupStart": {
36820
+ capName: "storage-migration",
36821
+ capScope: "system",
36822
+ addonId: null,
36823
+ access: "create"
36824
+ },
36825
+ "storageMigration.cleanupStatus": {
36826
+ capName: "storage-migration",
36827
+ capScope: "system",
36828
+ addonId: null,
36829
+ access: "view"
36830
+ },
36680
36831
  "storageMigration.drain": {
36681
36832
  capName: "storage-migration",
36682
36833
  capScope: "system",
36683
36834
  addonId: null,
36684
36835
  access: "create"
36685
36836
  },
36837
+ "storageMigration.history": {
36838
+ capName: "storage-migration",
36839
+ capScope: "system",
36840
+ addonId: null,
36841
+ access: "view"
36842
+ },
36686
36843
  "storageMigration.movers": {
36687
36844
  capName: "storage-migration",
36688
36845
  capScope: "system",
@@ -39169,6 +39326,11 @@ Object.freeze({
39169
39326
  form: "single",
39170
39327
  optional: false
39171
39328
  }],
39329
+ "recording.setDevicePlacement": [{
39330
+ name: "deviceId",
39331
+ form: "single",
39332
+ optional: false
39333
+ }],
39172
39334
  "recording.startStorageMigrationMove": [{
39173
39335
  name: "deviceId",
39174
39336
  form: "single",
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-C499qEUf.js");
1
+ const require_dist = require("./dist-bBqjZ7fo.js");
2
2
  let node_path = require("node:path");
3
3
  node_path = require_dist.__toESM(node_path);
4
4
  let node_url = require("node:url");
@@ -1,4 +1,4 @@
1
- const require_dist = require("./dist-C499qEUf.js");
1
+ const require_dist = require("./dist-bBqjZ7fo.js");
2
2
  let node_crypto = require("node:crypto");
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";
@@ -1,4 +1,4 @@
1
- import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-C9ohtgTQ.mjs";
1
+ import { M as audioKindId, Z as hfModelUrl, a as COCO_80_LABELS, o as COCO_TO_MACRO, r as AUDIO_MACRO_LABELS } from "./dist-p8ruahJy.mjs";
2
2
  import { randomUUID } from "node:crypto";
3
3
  //#region src/detection-pipeline/registry/model-catalogs.ts
4
4
  var HF_REPO = "camstack/camstack-models";