@camstack/addon-pipeline 1.2.145 → 1.2.148

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 (39) 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 +36 -33
  4. package/dist/detection-pipeline/index.mjs +8 -5
  5. package/dist/{dist-DML3mpn9.js → dist-DLy_uz82.js} +121 -13
  6. package/dist/{dist-cZopp8Xm.mjs → dist-DjplinYP.mjs} +121 -13
  7. package/dist/event-loop-stall-monitor-DXLNBMkY.mjs +138 -0
  8. package/dist/event-loop-stall-monitor-DaUBcb13.js +149 -0
  9. package/dist/{lazy-sharp-BzXIjfN8.js → lazy-sharp-BI4LsfMM.js} +1 -1
  10. package/dist/{event-loop-stall-monitor-DH_vFYWu.mjs → local-frame-registry-77FL9ua_.mjs} +2 -139
  11. package/dist/{event-loop-stall-monitor-DaV4Zdsz.js → local-frame-registry-Dr_U_xCG.js} +1 -150
  12. package/dist/motion-wasm/index.js +2 -2
  13. package/dist/motion-wasm/index.mjs +1 -1
  14. package/dist/{node-OvVqe9eh.js → node-BHFLhfkh.js} +1 -1
  15. package/dist/{node-Br6p9KvD.mjs → node-D7uxWSXD.mjs} +1 -1
  16. package/dist/pipeline-runner/index.js +14 -13
  17. package/dist/pipeline-runner/index.mjs +5 -4
  18. package/dist/{process-memory-DX25Z60Q.mjs → process-memory-B2tApNua.mjs} +1 -1
  19. package/dist/{process-memory-NWKrKfmi.js → process-memory-M8WiR3qj.js} +1 -1
  20. package/dist/recorder/index.js +633 -381
  21. package/dist/recorder/index.mjs +633 -381
  22. package/dist/{segment-demux-js-DGmFQ1Zj.mjs → segment-demux-js-3niBZUpJ.mjs} +1 -1
  23. package/dist/{segment-demux-js-CerfMroc.js → segment-demux-js-Cc_If7C_.js} +1 -1
  24. package/dist/session-decode/decode-worker-child.js +2 -2
  25. package/dist/session-decode/decode-worker-child.mjs +1 -1
  26. package/dist/stream-broker/_stub.js +2 -2
  27. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DQNgiTjz.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-QfvsYvjB.mjs} +3 -3
  28. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DXrU11Bz.mjs +26 -0
  29. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-bjYJYwAq.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CgIcw5Wl.mjs} +1 -1
  30. package/dist/stream-broker/demux-worker-child.js +1 -1
  31. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  32. package/dist/stream-broker/{hostInit-NShcJE25.mjs → hostInit-Dd2CEvDK.mjs} +3 -3
  33. package/dist/stream-broker/index.js +3 -3
  34. package/dist/stream-broker/index.mjs +3 -3
  35. package/dist/stream-broker/remoteEntry.js +1 -1
  36. package/dist/{worker-protocol-CUCQ1IPR.mjs → worker-protocol-Cvln9GmS.mjs} +1 -1
  37. package/dist/{worker-protocol-Dt3zWCQY.js → worker-protocol-basMNc_q.js} +1 -1
  38. package/package.json +1 -1
  39. package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-D4-thZGg.mjs +0 -26
@@ -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-DML3mpn9.js");
6
- const require_process_memory = require("../process-memory-NWKrKfmi.js");
5
+ const require_dist = require("../dist-DLy_uz82.js");
6
+ const require_process_memory = require("../process-memory-M8WiR3qj.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-cZopp8Xm.mjs";
3
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-DX25Z60Q.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-DjplinYP.mjs";
3
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-B2tApNua.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,11 +2,12 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-DML3mpn9.js");
6
- const require_node = require("../node-OvVqe9eh.js");
7
- const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaV4Zdsz.js");
8
- const require_lazy_sharp = require("../lazy-sharp-BzXIjfN8.js");
9
- const require_process_memory = require("../process-memory-NWKrKfmi.js");
5
+ const require_dist = require("../dist-DLy_uz82.js");
6
+ const require_node = require("../node-BHFLhfkh.js");
7
+ const require_local_frame_registry = require("../local-frame-registry-Dr_U_xCG.js");
8
+ const require_lazy_sharp = require("../lazy-sharp-BI4LsfMM.js");
9
+ const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-DaUBcb13.js");
10
+ const require_process_memory = require("../process-memory-M8WiR3qj.js");
10
11
  let node_fs = require("node:fs");
11
12
  node_fs = require_dist.__toESM(node_fs);
12
13
  let node_path = require("node:path");
@@ -519,7 +520,7 @@ function classifyAccelerator(backend, device) {
519
520
  * missing-build fallback branch is unit-testable without a live catalog —
520
521
  * mirrors `collectZeroBuildIssues`' injection seam.
521
522
  */
522
- function resolveDefaultDetectionModel(backend, device, format, getStepDef = require_event_loop_stall_monitor.getStepDefinition) {
523
+ function resolveDefaultDetectionModel(backend, device, format, getStepDef = require_local_frame_registry.getStepDefinition) {
523
524
  let def;
524
525
  try {
525
526
  def = getStepDef(OBJECT_DETECTION_STEP_ID);
@@ -531,7 +532,7 @@ function resolveDefaultDetectionModel(backend, device, format, getStepDef = requ
531
532
  const entry = def.models.find((m) => m.id === candidate);
532
533
  if (entry && entry.formats[format] !== void 0) return candidate;
533
534
  }
534
- return require_event_loop_stall_monitor.getDefaultModelForFormatFromDef(def, format);
535
+ return require_local_frame_registry.getDefaultModelForFormatFromDef(def, format);
535
536
  }
536
537
  //#endregion
537
538
  //#region src/detection-pipeline/device-override-mirror.ts
@@ -2524,7 +2525,7 @@ var EngineFactory = class {
2524
2525
  * to `buildConfig`, which throws the message naming the step and the model.
2525
2526
  */
2526
2527
  resolveDecode(stepId, modelId, settings) {
2527
- const def = require_event_loop_stall_monitor.getStepDefinition(stepId);
2528
+ const def = require_local_frame_registry.getStepDefinition(stepId);
2528
2529
  const modelEntry = def.models.find((m) => m.id === modelId) ?? this.opts.resolveCustomModel?.(stepId, modelId);
2529
2530
  if (!modelEntry) return null;
2530
2531
  return resolvePoolDecodeSettings({
@@ -2568,7 +2569,7 @@ var EngineFactory = class {
2568
2569
  */
2569
2570
  function buildPoolModelConfigForStep(inputs) {
2570
2571
  const { stepId, modelId, poolRuntime, modelsDir } = inputs;
2571
- const def = require_event_loop_stall_monitor.getStepDefinition(stepId);
2572
+ const def = require_local_frame_registry.getStepDefinition(stepId);
2572
2573
  const modelEntry = def.models.find((m) => m.id === modelId) ?? inputs.resolveCustomModel?.(stepId, modelId);
2573
2574
  if (!modelEntry) throw new Error(`Model "${modelId}" not found in step "${stepId}" catalog (static or custom registry)`);
2574
2575
  const format = RUNTIME_TO_FORMAT[poolRuntime];
@@ -5427,7 +5428,7 @@ var PipelineExecutor = class {
5427
5428
  this.warnFaceTooSmall(child, detShortSide, minFaceSize, void 0, deviceId);
5428
5429
  continue;
5429
5430
  }
5430
- const precision = require_event_loop_stall_monitor.landmarkPrecisionVerdict({
5431
+ const precision = require_local_frame_registry.landmarkPrecisionVerdict({
5431
5432
  detectionShortSidePx: detShortSide,
5432
5433
  floorPx: numericSetting(child.settings, "minLandmarkFaceSize", 24)
5433
5434
  });
@@ -5690,7 +5691,7 @@ function buildExecutableTree(steps, getEngine, resolveModel) {
5690
5691
  return { roots: steps.filter((s) => s.enabled).filter((s) => s.slot !== "audio-classifier").map((s) => buildNode(s, getEngine, resolveModel)) };
5691
5692
  }
5692
5693
  function buildNode(step, getEngine, resolveModel) {
5693
- const definition = require_event_loop_stall_monitor.getStepDefinition(step.addonId);
5694
+ const definition = require_local_frame_registry.getStepDefinition(step.addonId);
5694
5695
  const engine = getEngine(step.addonId);
5695
5696
  const children = (step.children ?? []).filter((c) => c.enabled).map((c) => buildNode(c, getEngine, resolveModel));
5696
5697
  const mergedSettings = {
@@ -5717,7 +5718,7 @@ function buildNode(step, getEngine, resolveModel) {
5717
5718
  * entered recursively. Fields without a declared default are skipped.
5718
5719
  */
5719
5720
  function collectSchemaDefaults(stepId) {
5720
- const schema = require_event_loop_stall_monitor.getStep(stepId).getConfigSchema();
5721
+ const schema = require_local_frame_registry.getStep(stepId).getConfigSchema();
5721
5722
  const out = {};
5722
5723
  walkFieldsForDefaults(schema, out);
5723
5724
  return out;
@@ -5811,7 +5812,7 @@ function mergeCustomModels(staticModels, customModels) {
5811
5812
  */
5812
5813
  var defaultLookup = (stepId) => {
5813
5814
  try {
5814
- return require_event_loop_stall_monitor.getStepDefinition(stepId);
5815
+ return require_local_frame_registry.getStepDefinition(stepId);
5815
5816
  } catch {
5816
5817
  return null;
5817
5818
  }
@@ -5860,7 +5861,7 @@ function collectSubstitutions(steps, format) {
5860
5861
  for (const step of steps) {
5861
5862
  const chosen = step.modelId;
5862
5863
  if (chosen != null) {
5863
- const running = require_event_loop_stall_monitor.resolveModelForFormat(step.addonId, chosen, format);
5864
+ const running = require_local_frame_registry.resolveModelForFormat(step.addonId, chosen, format);
5864
5865
  if (running !== chosen) result.push({
5865
5866
  addonId: step.addonId,
5866
5867
  chosen,
@@ -5886,7 +5887,7 @@ function collectSubstitutions(steps, format) {
5886
5887
  * black-box test. Unknown/custom addonIds (no registered `StepDefinition`)
5887
5888
  * are skipped, never thrown.
5888
5889
  */
5889
- function collectZeroBuildIssues(steps, format, getStepDef = require_event_loop_stall_monitor.getStepDefinition) {
5890
+ function collectZeroBuildIssues(steps, format, getStepDef = require_local_frame_registry.getStepDefinition) {
5890
5891
  const result = [];
5891
5892
  for (const step of steps) {
5892
5893
  let def;
@@ -5912,7 +5913,7 @@ function collectZeroBuildIssues(steps, format, getStepDef = require_event_loop_s
5912
5913
  * tests can exercise the unknown-addon branch with a fabricated resolver
5913
5914
  * without `vi.mock`.
5914
5915
  */
5915
- function collectUnknownAddonIssues(steps, getStepDef = require_event_loop_stall_monitor.getStepDefinition) {
5916
+ function collectUnknownAddonIssues(steps, getStepDef = require_local_frame_registry.getStepDefinition) {
5916
5917
  const result = [];
5917
5918
  for (const step of steps) {
5918
5919
  try {
@@ -5953,7 +5954,7 @@ function resolveInputSteps(steps, format, engine, clusterModels, clusterSettings
5953
5954
  for (const s of steps) {
5954
5955
  let def;
5955
5956
  try {
5956
- def = require_event_loop_stall_monitor.getStepDefinition(s.addonId);
5957
+ def = require_local_frame_registry.getStepDefinition(s.addonId);
5957
5958
  } catch {
5958
5959
  unknownAddonIds.push(s.addonId);
5959
5960
  continue;
@@ -5989,7 +5990,7 @@ function resolveInputSteps(steps, format, engine, clusterModels, clusterSettings
5989
5990
  }
5990
5991
  }
5991
5992
  const chosenModelId = s.modelId ?? null;
5992
- const runningModelId = chosenModelId === null && engine !== void 0 && s.addonId === "object-detection" ? resolveDefaultDetectionModel(engine.backend, engine.device, format) : require_event_loop_stall_monitor.resolveModelForFormat(s.addonId, chosenModelId, format);
5993
+ const runningModelId = chosenModelId === null && engine !== void 0 && s.addonId === "object-detection" ? resolveDefaultDetectionModel(engine.backend, engine.device, format) : require_local_frame_registry.resolveModelForFormat(s.addonId, chosenModelId, format);
5993
5994
  if (chosenModelId !== null && runningModelId !== chosenModelId) substitutions.push({
5994
5995
  addonId: s.addonId,
5995
5996
  chosen: chosenModelId,
@@ -7004,7 +7005,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7004
7005
  * first, then the custom registry. Returns undefined if neither has it.
7005
7006
  */
7006
7007
  async resolveModelEntry(addonId, modelId) {
7007
- const fromCatalog = require_event_loop_stall_monitor.getStepDefinition(addonId).models.find((m) => m.id === modelId);
7008
+ const fromCatalog = require_local_frame_registry.getStepDefinition(addonId).models.find((m) => m.id === modelId);
7008
7009
  if (fromCatalog) return fromCatalog;
7009
7010
  return (await this.getCustomModels()).get(addonId)?.find((m) => m.id === modelId);
7010
7011
  }
@@ -7100,7 +7101,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7100
7101
  /** Pure recursive resolver — builds the resolved step tree without touching `modelSubstitutions`. */
7101
7102
  resolveStepModelTree(steps, format) {
7102
7103
  return steps.map((step) => {
7103
- const resolved = require_event_loop_stall_monitor.resolveModelForFormat(step.addonId, step.modelId ?? null, format);
7104
+ const resolved = require_local_frame_registry.resolveModelForFormat(step.addonId, step.modelId ?? null, format);
7104
7105
  const children = step.children?.length ? this.resolveStepModelTree([...step.children], format) : step.children;
7105
7106
  return resolved === step.modelId && children === step.children ? step : {
7106
7107
  ...step,
@@ -7248,7 +7249,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7248
7249
  for (const step of nodes) {
7249
7250
  if (!step.enabled) continue;
7250
7251
  try {
7251
- if (require_event_loop_stall_monitor.getStepDefinition(step.addonId).slot === "audio-classifier") continue;
7252
+ if (require_local_frame_registry.getStepDefinition(step.addonId).slot === "audio-classifier") continue;
7252
7253
  } catch {
7253
7254
  continue;
7254
7255
  }
@@ -7268,7 +7269,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7268
7269
  async getCapabilities(_forceRefresh) {
7269
7270
  const agentId = (this.addonCtx?.kernel?.cluster?.broker)?.nodeID ?? node_os.hostname();
7270
7271
  const agentName = agentId;
7271
- const addons = require_event_loop_stall_monitor.ALL_PIPELINE_STEPS.map((s) => ({
7272
+ const addons = require_local_frame_registry.ALL_PIPELINE_STEPS.map((s) => ({
7272
7273
  id: s.definition.id,
7273
7274
  name: s.definition.name,
7274
7275
  models: s.definition.models.filter((m) => m.legacy !== true).map((m) => {
@@ -7495,8 +7496,11 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7495
7496
  await this.clusterModels.refresh(this.addonCtx?.api);
7496
7497
  const nodeId = this.addonCtx?.kernel?.localNodeId ?? "hub";
7497
7498
  const sessionId = input.sessionId ?? `run-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
7499
+ const isRuntime = Boolean(input.frame || input.frameRef);
7500
+ const progressToBus = !isRuntime || input.sessionId !== void 0;
7498
7501
  const emit = (message, extra) => {
7499
7502
  onProgress?.(message);
7503
+ if (!progressToBus) return;
7500
7504
  this.eventBus?.emit(require_dist.createEvent(require_dist.EventCategory.PipelineProgress, {
7501
7505
  type: "pipeline",
7502
7506
  id: "pipeline-test"
@@ -7752,7 +7756,6 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7752
7756
  emit("Running inference...");
7753
7757
  const tree = buildExecutableTree(benchmarkSteps, (stepId) => dispatchFactory.getEngine(stepId), this.customModelResolver);
7754
7758
  setupMs = performance.now() - wallT0 - decodeMs;
7755
- const isRuntime = Boolean(runtimeFrame || runtimeFrameRef);
7756
7759
  const effectiveDeviceId = input.deviceId ?? 0;
7757
7760
  const deviceOverrides = effectiveDeviceId > 0 ? await this.deviceOverrides.resolve(effectiveDeviceId) : {};
7758
7761
  const effectiveTree = Object.keys(deviceOverrides).length > 0 ? applyDeviceOverridesToTree(tree, "object-detection", deviceOverrides) : tree;
@@ -7766,7 +7769,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7766
7769
  let frameViewResolver;
7767
7770
  let rootInputViewProvider;
7768
7771
  if (runtimeFrameRef) {
7769
- frameViewResolver = createRootFrameViewResolver(require_event_loop_stall_monitor.localFrameRegistry, runtimeFrameRef);
7772
+ frameViewResolver = createRootFrameViewResolver(require_local_frame_registry.localFrameRegistry, runtimeFrameRef);
7770
7773
  rootInputViewProvider = async (root, crop) => {
7771
7774
  const view = await frameViewResolver(root, crop ? {
7772
7775
  left: crop[0],
@@ -9213,7 +9216,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
9213
9216
  function buildSchemaSlots(formats, modelsDir, customByStep) {
9214
9217
  const slotMap = /* @__PURE__ */ new Map();
9215
9218
  const formatList = [...formats];
9216
- for (const pipelineStep of require_event_loop_stall_monitor.ALL_PIPELINE_STEPS) {
9219
+ for (const pipelineStep of require_local_frame_registry.ALL_PIPELINE_STEPS) {
9217
9220
  const step = pipelineStep.definition;
9218
9221
  const availableModels = mergeCustomModels(step.models, customByStep?.get(step.id) ?? []).filter((m) => m.legacy !== true && formatList.some((f) => m.formats[f]));
9219
9222
  if (availableModels.length === 0) continue;
@@ -9307,7 +9310,7 @@ function resolveChildSlots(slot) {
9307
9310
  */
9308
9311
  function buildDefaultStepTree(format, objectDetectionModelId) {
9309
9312
  const makeStep = (stepId, children, opts) => {
9310
- const def = require_event_loop_stall_monitor.getStepDefinition(stepId);
9313
+ const def = require_local_frame_registry.getStepDefinition(stepId);
9311
9314
  if (!def.models.some((m) => m.formats[format])) return null;
9312
9315
  return {
9313
9316
  addonId: def.id,
@@ -9316,7 +9319,7 @@ function buildDefaultStepTree(format, objectDetectionModelId) {
9316
9319
  inputClasses: def.inputClasses ?? [],
9317
9320
  outputClasses: def.outputClasses,
9318
9321
  enabled: opts?.enabled ?? true,
9319
- modelId: opts?.modelId ?? require_event_loop_stall_monitor.getDefaultModelForFormat(stepId, format),
9322
+ modelId: opts?.modelId ?? require_local_frame_registry.getDefaultModelForFormat(stepId, format),
9320
9323
  children,
9321
9324
  ...def.group ? { group: def.group } : {}
9322
9325
  };
@@ -9373,7 +9376,7 @@ function flattenSteps(steps) {
9373
9376
  */
9374
9377
  function isDetailPlaneStep(addonId) {
9375
9378
  try {
9376
- return require_event_loop_stall_monitor.getStepDefinition(addonId).inputClasses !== null;
9379
+ return require_local_frame_registry.getStepDefinition(addonId).inputClasses !== null;
9377
9380
  } catch {
9378
9381
  return false;
9379
9382
  }
@@ -9394,7 +9397,7 @@ function stepHasZeroBuildsFor(addonId, format) {
9394
9397
  */
9395
9398
  function availableFormatsForStep(addonId) {
9396
9399
  try {
9397
- const def = require_event_loop_stall_monitor.getStepDefinition(addonId);
9400
+ const def = require_local_frame_registry.getStepDefinition(addonId);
9398
9401
  const formats = /* @__PURE__ */ new Set();
9399
9402
  for (const model of def.models) for (const format of Object.keys(model.formats)) formats.add(format);
9400
9403
  return Array.from(formats).toSorted();
@@ -9963,7 +9966,7 @@ var DetectionPipelineAddon = class extends require_dist.BaseAddon {
9963
9966
  }).catch(() => {});
9964
9967
  }
9965
9968
  getModelCatalog() {
9966
- return require_event_loop_stall_monitor.ALL_STEPS.flatMap((s) => s.models.filter((m) => m.legacy !== true));
9969
+ return require_local_frame_registry.ALL_STEPS.flatMap((s) => s.models.filter((m) => m.legacy !== true));
9967
9970
  }
9968
9971
  /**
9969
9972
  * Proactively install the OpenVINO Python package when Intel hardware
@@ -10049,9 +10052,9 @@ var DetectionPipelineAddon = class extends require_dist.BaseAddon {
10049
10052
  }
10050
10053
  };
10051
10054
  //#endregion
10052
- exports.ALL_STEPS = require_event_loop_stall_monitor.ALL_STEPS;
10055
+ exports.ALL_STEPS = require_local_frame_registry.ALL_STEPS;
10053
10056
  exports.DetectionPipelineProvider = DetectionPipelineProvider;
10054
10057
  exports.default = DetectionPipelineAddon;
10055
- exports.getDefaultModelForFormat = require_event_loop_stall_monitor.getDefaultModelForFormat;
10056
- exports.getStepDefinition = require_event_loop_stall_monitor.getStepDefinition;
10058
+ exports.getDefaultModelForFormat = require_local_frame_registry.getDefaultModelForFormat;
10059
+ exports.getStepDefinition = require_local_frame_registry.getStepDefinition;
10057
10060
  exports.shouldInstallOpenvino = shouldInstallOpenvino;
@@ -1,9 +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-cZopp8Xm.mjs";
3
- import { a as readProcessCost } from "../node-Br6p9KvD.mjs";
4
- import { a as ALL_PIPELINE_STEPS, c as getDefaultModelForFormatFromDef, d as resolveModelForFormat, f as landmarkPrecisionVerdict, l as getStep, n as startEventLoopStallMonitor, o as ALL_STEPS, r as localFrameRegistry, s as getDefaultModelForFormat, u as getStepDefinition } from "../event-loop-stall-monitor-DH_vFYWu.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-DjplinYP.mjs";
3
+ import { a as readProcessCost } from "../node-D7uxWSXD.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-77FL9ua_.mjs";
5
5
  import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
6
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-DX25Z60Q.mjs";
6
+ import { n as startEventLoopStallMonitor } from "../event-loop-stall-monitor-DXLNBMkY.mjs";
7
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-B2tApNua.mjs";
7
8
  import * as fs from "node:fs";
8
9
  import * as path$1 from "node:path";
9
10
  import { spawn } from "node:child_process";
@@ -7488,8 +7489,11 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7488
7489
  await this.clusterModels.refresh(this.addonCtx?.api);
7489
7490
  const nodeId = this.addonCtx?.kernel?.localNodeId ?? "hub";
7490
7491
  const sessionId = input.sessionId ?? `run-${Date.now()}-${Math.random().toString(36).slice(2, 10)}`;
7492
+ const isRuntime = Boolean(input.frame || input.frameRef);
7493
+ const progressToBus = !isRuntime || input.sessionId !== void 0;
7491
7494
  const emit = (message, extra) => {
7492
7495
  onProgress?.(message);
7496
+ if (!progressToBus) return;
7493
7497
  this.eventBus?.emit(createEvent(EventCategory.PipelineProgress, {
7494
7498
  type: "pipeline",
7495
7499
  id: "pipeline-test"
@@ -7745,7 +7749,6 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
7745
7749
  emit("Running inference...");
7746
7750
  const tree = buildExecutableTree(benchmarkSteps, (stepId) => dispatchFactory.getEngine(stepId), this.customModelResolver);
7747
7751
  setupMs = performance.now() - wallT0 - decodeMs;
7748
- const isRuntime = Boolean(runtimeFrame || runtimeFrameRef);
7749
7752
  const effectiveDeviceId = input.deviceId ?? 0;
7750
7753
  const deviceOverrides = effectiveDeviceId > 0 ? await this.deviceOverrides.resolve(effectiveDeviceId) : {};
7751
7754
  const effectiveTree = Object.keys(deviceOverrides).length > 0 ? applyDeviceOverridesToTree(tree, "object-detection", deviceOverrides) : tree;
@@ -9374,18 +9374,61 @@ var RelocateFootageInputSchema = object({
9374
9374
  * `RecordingConfig.enabled` or camera wrapper bindings. */
9375
9375
  var StorageMigrationLeaseInputSchema = object({ leaseId: string().min(1) });
9376
9376
  var StorageMigrationFootageMoveInputSchema = RelocateFootageInputSchema.extend({ leaseId: string().min(1) });
9377
+ /**
9378
+ * What a `relocateMedia` pass DOES. One engine, three passes — never a second
9379
+ * mover (the engine already walks both collections with a timestamp cursor and
9380
+ * already has a stamp-without-copy path).
9381
+ *
9382
+ * - `move` — the default and the historical behaviour: event-media and
9383
+ * retrain blobs move to `toLocationId` and their rows are
9384
+ * stamped. The enrolled gallery is skipped (D197).
9385
+ * - `seal` — ROWS ONLY, no bytes. Every row whose `locationId` is NULL is
9386
+ * stamped with `toLocationId`. `toLocationId` here is the id the
9387
+ * bytes ALREADY sit on — today's `eventMedia` default — because
9388
+ * a NULL row means "wherever `eventMedia` points *now*", and the
9389
+ * instant a repoint moves that pointer the row reads from the
9390
+ * new disk while its bytes are on the old one.
9391
+ * - `gallery` — the inverse selection of `move`: ONLY the retention-exempt
9392
+ * (enrolled-gallery) rows, which `move` deliberately skips.
9393
+ * `galleryMedia` is `cardinality: 'single'`, so this pass can
9394
+ * never run beside a live second location: it is stop-the-world
9395
+ * by construction, which is acceptable only because the gallery
9396
+ * is a few KB per enrolled sample.
9397
+ */
9398
+ var MediaRelocateModeSchema = _enum([
9399
+ "move",
9400
+ "seal",
9401
+ "gallery"
9402
+ ]);
9377
9403
  var RelocateMediaInputSchema = object({
9378
9404
  toLocationId: string(),
9379
- throttleMbps: number().min(1).max(1e3).optional()
9405
+ throttleMbps: number().min(1).max(1e3).optional(),
9406
+ /** Omitted = `move`, the pre-existing behaviour. */
9407
+ mode: MediaRelocateModeSchema.optional()
9408
+ });
9409
+ /** How many rows still carry NO `locationId` — the population a repoint would
9410
+ * silently re-aim at a disk that does not hold their bytes. Zero is the only
9411
+ * value that permits a non-blocking `eventMedia` cutover. */
9412
+ var UnstampedEventMediaCountSchema = object({
9413
+ media: number().int().nonnegative(),
9414
+ retrainFrames: number().int().nonnegative(),
9415
+ total: number().int().nonnegative()
9380
9416
  });
9381
9417
  var StorageMigrationMediaMoveInputSchema = RelocateMediaInputSchema.extend({ leaseId: string().min(1) });
9382
- /** The independently selectable logical storage classes. `recordings`
9383
- * encompasses the high and mid segment profiles; `recordingsLow` is low
9384
- * segments; `eventMedia` is post-analysis blobs. */
9418
+ /** The independently selectable logical storage classes — every class
9419
+ * `storage.listLocationDeclarations` reports, so an operator never meets a
9420
+ * Zod enum error where they should meet an explanation.
9421
+ *
9422
+ * `recordings` encompasses the high and mid segment profiles; `recordingsLow`
9423
+ * is low segments; `eventMedia` is post-analysis blobs; `galleryMedia` is the
9424
+ * enrolled gallery; `backups` is the system backup archive. The last two have
9425
+ * their own rules — see {@link StorageMigrationFindingCodeSchema}. */
9385
9426
  var StorageMigrationClassSchema = _enum([
9386
9427
  "recordings",
9387
9428
  "recordingsLow",
9388
- "eventMedia"
9429
+ "eventMedia",
9430
+ "backups",
9431
+ "galleryMedia"
9389
9432
  ]);
9390
9433
  /** A destination is always an existing, fully-qualified location id. The
9391
9434
  * migration API intentionally never changes a source location's `basePath`:
@@ -9393,20 +9436,56 @@ var StorageMigrationClassSchema = _enum([
9393
9436
  var StorageMigrationDestinationsSchema = object({
9394
9437
  recordings: string().min(1).optional(),
9395
9438
  recordingsLow: string().min(1).optional(),
9396
- eventMedia: string().min(1).optional()
9439
+ eventMedia: string().min(1).optional(),
9440
+ backups: string().min(1).optional(),
9441
+ galleryMedia: string().min(1).optional()
9397
9442
  }).refine((value) => Object.keys(value).length > 0, { message: "select at least one storage class" });
9443
+ /**
9444
+ * How a migration sequences the cutover against the byte move.
9445
+ *
9446
+ * - `blocking` — the historical order: pause, move every byte, repoint,
9447
+ * resume. Recording is stopped for the whole move. Right
9448
+ * for a small or a cold class, and the only legal mode for
9449
+ * a `cardinality: 'single'` class.
9450
+ * - `nonBlocking` — repoint FIRST, drain behind: seal, pause, repoint,
9451
+ * refresh, resume, then move the past with everything
9452
+ * running. The pause is three bounded instants (a detach +
9453
+ * attach round, a write-gate drain, a lease) instead of one
9454
+ * bounded by bytes. 1.09 TB at 7–14 MB/s is thirty hours of
9455
+ * stopped recording under `blocking`; the same move is
9456
+ * seconds of stopped recording under `nonBlocking`.
9457
+ *
9458
+ * The mode is on the JOB, not only on the input, because `status` is where an
9459
+ * operator finds out which one is running.
9460
+ */
9461
+ var StorageMigrationModeSchema = _enum(["blocking", "nonBlocking"]);
9398
9462
  /** Shared input for planning and starting an orchestrated storage migration. */
9399
9463
  var StorageMigrationInputSchema = object({
9400
9464
  destinations: StorageMigrationDestinationsSchema,
9401
- throttleMbps: number().min(1).max(1e3).optional()
9465
+ throttleMbps: number().min(1).max(1e3).optional(),
9466
+ /** Omitted = `blocking`, which stays the default. */
9467
+ mode: StorageMigrationModeSchema.optional()
9402
9468
  });
9403
- /** The durable coordinator state machine. The only phase that changes default
9404
- * locations is `repointing`, after every selected mover has completed and been
9405
- * verified. */
9469
+ /**
9470
+ * The durable coordinator state machine.
9471
+ *
9472
+ * `blocking`:
9473
+ * planning → pausing → moving → verifying → repointing → refreshing → resuming → done
9474
+ *
9475
+ * `nonBlocking`:
9476
+ * planning → sealing → pausing → repointing → refreshing → resuming → draining → verifying → done
9477
+ *
9478
+ * Same phases, different order plus two new ones — not a second mover.
9479
+ * `sealing` closes the `eventMedia` NULL-row hole BEFORE anything is paused;
9480
+ * `draining` runs the same movers UNLEASED, after every writer is back up.
9481
+ * `repointing` is still the only phase that changes a default location.
9482
+ */
9406
9483
  var StorageMigrationPhaseSchema = _enum([
9407
9484
  "planning",
9485
+ "sealing",
9408
9486
  "pausing",
9409
9487
  "moving",
9488
+ "draining",
9410
9489
  "verifying",
9411
9490
  "repointing",
9412
9491
  "refreshing",
@@ -9431,6 +9510,9 @@ var StorageMigrationMoveSchema = object({
9431
9510
  var StorageMigrationJobSchema = object({
9432
9511
  jobId: string(),
9433
9512
  phase: StorageMigrationPhaseSchema,
9513
+ /** Which order this job is running. `status` is the only place an operator
9514
+ * can tell a seconds-long cutover from a thirty-hour one. */
9515
+ mode: StorageMigrationModeSchema,
9434
9516
  destinations: StorageMigrationDestinationsSchema,
9435
9517
  throttleMbps: number(),
9436
9518
  moves: array(StorageMigrationMoveSchema),
@@ -9443,13 +9525,30 @@ var StorageMigrationJobSchema = object({
9443
9525
  finishedAt: number().nullable(),
9444
9526
  error: string().nullable()
9445
9527
  });
9528
+ var StorageMigrationFindingSchema = object({
9529
+ code: _enum([
9530
+ "sharesDeviceWithSource",
9531
+ "deviceIdentityUnknown",
9532
+ "unstampedEventMediaRows",
9533
+ "blockingOnly",
9534
+ "noMover"
9535
+ ]),
9536
+ storageClass: StorageMigrationClassSchema,
9537
+ /** Human-readable, already carrying the ids and counts. */
9538
+ message: string()
9539
+ });
9446
9540
  var StorageMigrationPlanSchema = object({
9447
9541
  destinations: StorageMigrationDestinationsSchema,
9542
+ /** The mode this plan was built for. A plan is only valid for its mode: the
9543
+ * `eventMedia` seal gate and the single-cardinality refusal both depend on
9544
+ * it. */
9545
+ mode: StorageMigrationModeSchema,
9448
9546
  moves: array(object({
9449
9547
  storageClass: StorageMigrationClassSchema,
9450
9548
  fromLocationId: string(),
9451
9549
  toLocationId: string()
9452
- }))
9550
+ })),
9551
+ findings: array(StorageMigrationFindingSchema)
9453
9552
  });
9454
9553
  /**
9455
9554
  * `StorageLocationType` — an addon-declared id that identifies the *kind* of
@@ -21122,7 +21221,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
21122
21221
  }), method(RelocateMediaInputSchema, object({ jobId: string() }), {
21123
21222
  kind: "mutation",
21124
21223
  auth: "admin"
21125
- }), method(object({}), array(RelocateJobSchema).readonly(), {
21224
+ }), method(object({}), UnstampedEventMediaCountSchema, { auth: "admin" }), method(object({}), array(RelocateJobSchema).readonly(), {
21126
21225
  kind: "query",
21127
21226
  auth: "admin"
21128
21227
  }), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
@@ -23171,7 +23270,10 @@ method(object({
23171
23270
  }), StorageLocationSchema, {
23172
23271
  kind: "mutation",
23173
23272
  auth: "admin"
23174
- }), method(object({ id: string() }), _void(), {
23273
+ }), method(object({
23274
+ id: string(),
23275
+ force: boolean().optional()
23276
+ }), _void(), {
23175
23277
  kind: "mutation",
23176
23278
  auth: "admin"
23177
23279
  }), method(object({ id: string() }), object({
@@ -34131,6 +34233,12 @@ Object.freeze({
34131
34233
  addonId: null,
34132
34234
  access: "create"
34133
34235
  },
34236
+ "pipelineAnalytics.countUnstampedEventMedia": {
34237
+ capName: "pipeline-analytics",
34238
+ capScope: "device",
34239
+ addonId: null,
34240
+ access: "view"
34241
+ },
34134
34242
  "pipelineAnalytics.deleteDeviceEvents": {
34135
34243
  capName: "pipeline-analytics",
34136
34244
  capScope: "device",