@camstack/addon-pipeline 1.0.6 → 1.0.7

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 (34) hide show
  1. package/dist/audio-analyzer/index.js +6 -7
  2. package/dist/audio-analyzer/index.mjs +2 -2
  3. package/dist/audio-codec-nodeav/index.js +1 -1
  4. package/dist/audio-codec-nodeav/index.mjs +1 -1
  5. package/dist/decoder-nodeav/index.js +1 -1
  6. package/dist/decoder-nodeav/index.mjs +1 -1
  7. package/dist/detection-pipeline/index.js +14 -15
  8. package/dist/detection-pipeline/index.mjs +2 -2
  9. package/dist/{dist-DsDFrG0I.mjs → dist-CjrjeaDd.mjs} +1681 -1644
  10. package/dist/{dist-BiUtYscO.js → dist-G45MVm6i.js} +1680 -1643
  11. package/dist/model-download-service-C7AjBsX9-B0ekM6dF.mjs +301 -0
  12. package/dist/model-download-service-C7AjBsX9-rXY-VFDk.js +358 -0
  13. package/dist/motion-wasm/index.js +1 -1
  14. package/dist/motion-wasm/index.mjs +1 -1
  15. package/dist/pipeline-runner/index.js +1 -1
  16. package/dist/pipeline-runner/index.mjs +1 -1
  17. package/dist/recorder/index.js +4 -5
  18. package/dist/recorder/index.mjs +2 -2
  19. package/dist/stream-broker/_stub.js +2 -2
  20. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-CbTGCEnd.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Tbqpu0v3.mjs} +3 -3
  21. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-3STWM0yI.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-DCsgcqTa.mjs} +1 -1
  22. package/dist/stream-broker/{_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-Dsz9DmNr.mjs → _virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-CHcXI1Wf.mjs} +1 -1
  23. package/dist/stream-broker/{hostInit-BJ3QDdFs.mjs → hostInit-tIev5Gd9.mjs} +3 -3
  24. package/dist/stream-broker/index.js +9 -10
  25. package/dist/stream-broker/index.mjs +3 -3
  26. package/dist/stream-broker/remoteEntry.js +1 -1
  27. package/embed-dist/assets/{MaskShapeCanvas-DI4BY7W2-B4oJIlgF.js → MaskShapeCanvas-DI4BY7W2-C0kKwNX_.js} +1 -1
  28. package/embed-dist/assets/{MotionZonesSettings-C1EEbk2V-CUopGB1R.js → MotionZonesSettings-C1EEbk2V-CYtJc892.js} +1 -1
  29. package/embed-dist/assets/{PrivacyMaskSettings-APgPLF7p-CyTsHaor.js → PrivacyMaskSettings-APgPLF7p-C2SRtNe6.js} +1 -1
  30. package/embed-dist/assets/index-B2LRyXWh.js +80 -0
  31. package/embed-dist/index.html +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunk-D6vf50IK.js +0 -28
  34. package/embed-dist/assets/index-hwJEVIPM.js +0 -80
@@ -2,13 +2,12 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_chunk = require("../chunk-D6vf50IK.js");
6
- const require_dist = require("../dist-BiUtYscO.js");
5
+ const require_model_download_service_C7AjBsX9 = require("../model-download-service-C7AjBsX9-rXY-VFDk.js");
6
+ const require_dist = require("../dist-G45MVm6i.js");
7
7
  let node_fs = require("node:fs");
8
- node_fs = require_chunk.__toESM(node_fs);
8
+ node_fs = require_model_download_service_C7AjBsX9.__toESM(node_fs);
9
9
  let node_path = require("node:path");
10
- node_path = require_chunk.__toESM(node_path);
11
- let _camstack_system = require("@camstack/system");
10
+ node_path = require_model_download_service_C7AjBsX9.__toESM(node_path);
12
11
  //#region src/audio-analyzer/audio-pipeline.ts
13
12
  /**
14
13
  * Create the appropriate audio pipeline.
@@ -83,7 +82,7 @@ var YamnetPythonPipeline = class {
83
82
  url: YAMNET_MODEL_URL,
84
83
  dest: modelPath
85
84
  } });
86
- await (0, _camstack_system.downloadFile)(YAMNET_MODEL_URL, modelPath);
85
+ await require_model_download_service_C7AjBsX9.downloadFile(YAMNET_MODEL_URL, modelPath);
87
86
  this.log.info("YAMNet ONNX model downloaded", { meta: { sizeBytes: node_fs.statSync(modelPath).size } });
88
87
  }
89
88
  if (!node_fs.existsSync(labelsPath)) {
@@ -91,7 +90,7 @@ var YamnetPythonPipeline = class {
91
90
  url: YAMNET_LABELS_URL,
92
91
  dest: labelsPath
93
92
  } });
94
- await (0, _camstack_system.downloadFile)(YAMNET_LABELS_URL, labelsPath);
93
+ await require_model_download_service_C7AjBsX9.downloadFile(YAMNET_LABELS_URL, labelsPath);
95
94
  }
96
95
  const pythonDir = resolveAudioPythonDir();
97
96
  if (this.installPythonRequirements) await this.installPythonRequirements(node_path.join(pythonDir, "requirements-audio.txt"));
@@ -1,8 +1,8 @@
1
1
  import { t as __require } from "../chunk-BdkLduGY.mjs";
2
- import { L as mapAudioLabelToMacro, P as hydrateSchema, S as audioAnalyzerCapability, c as DEFAULT_AUDIO_ANALYZER_CONFIG, i as BaseAddon, j as errMsg, m as HF_BASE_URL, n as AUDIO_BACKEND_CHOICES, x as audioAnalysisCapability } from "../dist-DsDFrG0I.mjs";
2
+ import { F as errMsg, I as BaseAddon, T as mapAudioLabelToMacro, W as hydrateSchema, g as audioAnalyzerCapability, h as audioAnalysisCapability, l as HF_BASE_URL, n as AUDIO_BACKEND_CHOICES, o as DEFAULT_AUDIO_ANALYZER_CONFIG } from "../dist-CjrjeaDd.mjs";
3
+ import { r as downloadFile } from "../model-download-service-C7AjBsX9-B0ekM6dF.mjs";
3
4
  import * as fs from "node:fs";
4
5
  import * as path$1 from "node:path";
5
- import { downloadFile } from "@camstack/system";
6
6
  //#region src/audio-analyzer/audio-pipeline.ts
7
7
  /**
8
8
  * Create the appropriate audio pipeline.
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BiUtYscO.js");
5
+ const require_dist = require("../dist-G45MVm6i.js");
6
6
  const require_codec_runtime = require("../codec-runtime-BOk-13PN.js");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/audio-codec-nodeav/addon/index.ts
@@ -1,4 +1,4 @@
1
- import { C as audioCodecCapability, i as BaseAddon, j as errMsg } from "../dist-DsDFrG0I.mjs";
1
+ import { F as errMsg, I as BaseAddon, _ as audioCodecCapability } from "../dist-CjrjeaDd.mjs";
2
2
  import { t as DecodeRuntime } from "../codec-runtime-BsqlEjPi.mjs";
3
3
  import { randomUUID } from "node:crypto";
4
4
  //#region src/audio-codec-nodeav/addon/index.ts
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BiUtYscO.js");
5
+ const require_dist = require("../dist-G45MVm6i.js");
6
6
  let _camstack_shm_ring = require("@camstack/shm-ring");
7
7
  let node_crypto = require("node:crypto");
8
8
  //#region src/decoder-nodeav/frame-ring-sink.ts
@@ -1,4 +1,4 @@
1
- import { O as decoderCapability, _ as RingBuffer, h as HWACCEL_OPTIONS, i as BaseAddon, j as errMsg, l as DEFAULT_DECODER_HWACCEL_CONFIG } from "../dist-DsDFrG0I.mjs";
1
+ import { F as errMsg, I as BaseAddon, b as decoderCapability, f as RingBuffer, s as DEFAULT_DECODER_HWACCEL_CONFIG, u as HWACCEL_OPTIONS } from "../dist-CjrjeaDd.mjs";
2
2
  import { FrameRingReaderCache, FrameRingWriter, MIN_RING_SLOTS, computeSegmentSize, computeSlotByteLength, createSegment, deriveSlotCount } from "@camstack/shm-ring";
3
3
  import { randomUUID } from "node:crypto";
4
4
  //#region src/decoder-nodeav/frame-ring-sink.ts
@@ -2,18 +2,17 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_chunk = require("../chunk-D6vf50IK.js");
6
- const require_dist = require("../dist-BiUtYscO.js");
5
+ const require_model_download_service_C7AjBsX9 = require("../model-download-service-C7AjBsX9-rXY-VFDk.js");
6
+ const require_dist = require("../dist-G45MVm6i.js");
7
7
  let node_fs = require("node:fs");
8
- node_fs = require_chunk.__toESM(node_fs);
8
+ node_fs = require_model_download_service_C7AjBsX9.__toESM(node_fs);
9
9
  let node_path = require("node:path");
10
- node_path = require_chunk.__toESM(node_path);
10
+ node_path = require_model_download_service_C7AjBsX9.__toESM(node_path);
11
11
  let node_os = require("node:os");
12
- node_os = require_chunk.__toESM(node_os);
13
- let _camstack_system = require("@camstack/system");
12
+ node_os = require_model_download_service_C7AjBsX9.__toESM(node_os);
14
13
  let node_child_process = require("node:child_process");
15
14
  let sharp = require("sharp");
16
- sharp = require_chunk.__toESM(sharp);
15
+ sharp = require_model_download_service_C7AjBsX9.__toESM(sharp);
17
16
  //#region src/detection-pipeline/engine/shared-inference-pool.ts
18
17
  var MSG_COMMAND = 0;
19
18
  var MSG_INFER_JPEG = 1;
@@ -4354,7 +4353,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
4354
4353
  if (!step.enabled) continue;
4355
4354
  const modelEntry = getStepDefinition(step.addonId).models.find((m) => m.id === step.modelId);
4356
4355
  if (!modelEntry) continue;
4357
- if ((0, _camstack_system.isModelDownloaded)(this.modelsDir, modelEntry, format)) continue;
4356
+ if (require_model_download_service_C7AjBsX9.isModelDownloaded(this.modelsDir, modelEntry, format)) continue;
4358
4357
  await this.downloadWithRetry(modelEntry, format, 3);
4359
4358
  }
4360
4359
  }
@@ -4551,7 +4550,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
4551
4550
  const formats = {};
4552
4551
  for (const [formatKey, entry] of Object.entries(m.formats)) {
4553
4552
  if (!entry) continue;
4554
- const downloaded = (0, _camstack_system.isModelDownloaded)(this.modelsDir, m, formatKey);
4553
+ const downloaded = require_model_download_service_C7AjBsX9.isModelDownloaded(this.modelsDir, m, formatKey);
4555
4554
  formats[formatKey] = {
4556
4555
  url: entry.url,
4557
4556
  sizeMB: entry.sizeMB,
@@ -4674,7 +4673,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
4674
4673
  const { modelId, format, addonId } = input;
4675
4674
  const modelEntry = getStepDefinition(addonId).models.find((m) => m.id === modelId);
4676
4675
  if (!modelEntry) throw new Error(`Model "${modelId}" not found in step "${addonId}" catalog`);
4677
- if (!(0, _camstack_system.deleteModelFromDisk)(this.modelsDir, modelEntry, format)) throw new Error(`Model "${modelId}" (${format}) is not downloaded — nothing to delete`);
4676
+ if (!require_model_download_service_C7AjBsX9.deleteModelFromDisk(this.modelsDir, modelEntry, format)) throw new Error(`Model "${modelId}" (${format}) is not downloaded — nothing to delete`);
4678
4677
  this.log.info("Model deleted from disk", { meta: {
4679
4678
  modelId,
4680
4679
  format
@@ -5129,7 +5128,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
5129
5128
  const format = this.currentEngine?.format ?? "onnx";
5130
5129
  for (const step of needed) {
5131
5130
  const modelEntry = getStepDefinition(step.addonId).models.find((m) => m.id === step.modelId);
5132
- if (modelEntry && !(0, _camstack_system.isModelDownloaded)(this.modelsDir, modelEntry, format)) {
5131
+ if (modelEntry && !require_model_download_service_C7AjBsX9.isModelDownloaded(this.modelsDir, modelEntry, format)) {
5133
5132
  this.log.info("Downloading model for step", { meta: {
5134
5133
  modelId: step.modelId,
5135
5134
  format,
@@ -5154,7 +5153,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
5154
5153
  /** Download a model with retry + exponential backoff */
5155
5154
  async downloadWithRetry(entry, format, maxRetries, onProgress) {
5156
5155
  for (let attempt = 1; attempt <= maxRetries; attempt++) try {
5157
- await (0, _camstack_system.ensureModel)(this.modelsDir, entry, format, onProgress);
5156
+ await require_model_download_service_C7AjBsX9.ensureModel(this.modelsDir, entry, format, onProgress);
5158
5157
  this.log.info("Model downloaded successfully", { meta: { modelId: entry.id } });
5159
5158
  return;
5160
5159
  } catch (err) {
@@ -5631,11 +5630,11 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
5631
5630
  } });
5632
5631
  continue;
5633
5632
  }
5634
- if (!(0, _camstack_system.isModelDownloaded)(this.modelsDir, modelEntry, format)) this.log.info("Downloading model", { meta: {
5633
+ if (!require_model_download_service_C7AjBsX9.isModelDownloaded(this.modelsDir, modelEntry, format)) this.log.info("Downloading model", { meta: {
5635
5634
  modelId: step.modelId,
5636
5635
  format
5637
5636
  } });
5638
- downloads.push((0, _camstack_system.ensureModel)(this.modelsDir, modelEntry, format).then(() => {}));
5637
+ downloads.push(require_model_download_service_C7AjBsX9.ensureModel(this.modelsDir, modelEntry, format).then(() => {}));
5639
5638
  }
5640
5639
  await Promise.all(downloads);
5641
5640
  await this.ensureBackendDeps(this.currentEngine);
@@ -6047,7 +6046,7 @@ function buildSchemaSlots(format, modelsDir) {
6047
6046
  id: m.id,
6048
6047
  name: m.name,
6049
6048
  formats: Object.fromEntries(Object.entries(m.formats).map(([f, entry]) => [f, {
6050
- downloaded: (0, _camstack_system.isModelDownloaded)(modelsDir, m, f),
6049
+ downloaded: require_model_download_service_C7AjBsX9.isModelDownloaded(modelsDir, m, f),
6051
6050
  sizeMB: entry.sizeMB
6052
6051
  }]))
6053
6052
  })),
@@ -1,9 +1,9 @@
1
1
  import { t as __require } from "../chunk-BdkLduGY.mjs";
2
- import { A as detectionPipelineCapability, E as createEvent, M as evaluateZoneRules, N as hfModelUrl, P as hydrateSchema, U as pipelineExecutorCapability, V as parseJsonUnknown, i as BaseAddon, j as errMsg, o as COCO_80_LABELS, p as EventCategory, q as sleep, r as AUDIO_MACRO_LABELS, s as COCO_TO_MACRO, t as APPLE_SA_TO_MACRO, v as YAMNET_TO_MACRO } from "../dist-DsDFrG0I.mjs";
2
+ import { B as EventCategory, C as evaluateZoneRules, F as errMsg, I as BaseAddon, S as detectionPipelineCapability, U as createEvent, W as hydrateSchema, X as sleep, a as COCO_TO_MACRO, i as COCO_80_LABELS, k as pipelineExecutorCapability, p as YAMNET_TO_MACRO, q as parseJsonUnknown, r as AUDIO_MACRO_LABELS, t as APPLE_SA_TO_MACRO, w as hfModelUrl } from "../dist-CjrjeaDd.mjs";
3
+ import { a as isModelDownloaded, i as ensureModel, n as deleteModelFromDisk } from "../model-download-service-C7AjBsX9-B0ekM6dF.mjs";
3
4
  import * as fs from "node:fs";
4
5
  import * as path$1 from "node:path";
5
6
  import * as os from "node:os";
6
- import { deleteModelFromDisk, ensureModel, isModelDownloaded } from "@camstack/system";
7
7
  import { spawn } from "node:child_process";
8
8
  import sharp from "sharp";
9
9
  //#region src/detection-pipeline/engine/shared-inference-pool.ts