@camstack/addon-pipeline 1.2.137 → 1.2.139
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.
- package/dist/audio-analyzer/index.js +38 -86
- package/dist/audio-analyzer/index.mjs +36 -84
- package/dist/detection-pipeline/index.js +12 -12
- package/dist/detection-pipeline/index.mjs +5 -5
- package/dist/{dist-g0Or5_pR.mjs → dist-CTmOaCwF.mjs} +163 -3
- package/dist/{dist-4EMKvxCp.js → dist-WUZH-lAM.js} +168 -2
- package/dist/{event-loop-stall-monitor-CskL9Lgu.mjs → event-loop-stall-monitor-BMtR9qZR.mjs} +1 -1
- package/dist/{event-loop-stall-monitor-DDm07Ei6.js → event-loop-stall-monitor-CoM21UjL.js} +1 -1
- package/dist/{lazy-sharp-BlA9PxWk.js → lazy-sharp-1WF7ZnxZ.js} +1 -1
- package/dist/motion-wasm/index.js +2 -2
- package/dist/motion-wasm/index.mjs +1 -1
- package/dist/{node-BOHn8gpk.js → node-BAo2ivVu.js} +1 -1
- package/dist/{node-Bo1g8hLO.mjs → node-CQcgxO8l.mjs} +1 -1
- package/dist/pipeline-runner/index.js +55 -12
- package/dist/pipeline-runner/index.mjs +54 -11
- package/dist/{process-memory-DmrHWybb.mjs → process-memory-BPEKERfe.mjs} +1 -1
- package/dist/{process-memory-C3084DOt.js → process-memory-BZvkQCLP.js} +1 -1
- package/dist/recorder/index.js +6 -6
- package/dist/recorder/index.mjs +3 -3
- package/dist/{segment-demux-js-BrQ_A0oi.js → segment-demux-js-B1L1pfoc.js} +1 -1
- package/dist/{segment-demux-js-C-a2pghM.mjs → segment-demux-js-CubhFNwb.mjs} +1 -1
- package/dist/session-decode/decode-worker-child.js +115 -5
- package/dist/session-decode/decode-worker-child.mjs +114 -4
- package/dist/stream-broker/_stub.js +2 -2
- package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-AH6OJ3hJ.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DJ4k5ZBb.mjs} +3 -3
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-xdmO8wYp.mjs +26 -0
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-DPpl_mtg.mjs +26 -0
- package/dist/stream-broker/demux-worker-child.js +1 -1
- package/dist/stream-broker/demux-worker-child.mjs +1 -1
- package/dist/stream-broker/{hostInit-XNyn-FTM.mjs → hostInit-oy-XDnw6.mjs} +3 -3
- package/dist/stream-broker/index.js +170 -62
- package/dist/stream-broker/index.mjs +170 -62
- package/dist/stream-broker/remoteEntry.js +1 -1
- package/dist/{worker-protocol-BLfaD5uC.js → worker-protocol-C-0LYdSt.js} +2 -1
- package/dist/{worker-protocol-vc8WWhjx.mjs → worker-protocol-DsuI4ifI.mjs} +2 -1
- package/package.json +5 -3
- package/dist/addon-utils-C6b5Tnia.js +0 -625
- package/dist/addon-utils-C8KTuPdE.mjs +0 -583
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-CQyiEd0l.mjs +0 -26
- package/dist/stream-broker/_virtual_mf___mfe_internal__addon_stream_broker_widgets__loadShare___mf_0_camstack_mf_1_ui_mf_2_library__loadShare__.js-BrTM_tsb.mjs +0 -26
|
@@ -2,13 +2,13 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_process_memory = require("../process-memory-
|
|
7
|
-
const require_addon_utils = require("../addon-utils-C6b5Tnia.js");
|
|
5
|
+
const require_dist = require("../dist-WUZH-lAM.js");
|
|
6
|
+
const require_process_memory = require("../process-memory-BZvkQCLP.js");
|
|
8
7
|
let node_fs = require("node:fs");
|
|
9
8
|
node_fs = require_dist.__toESM(node_fs);
|
|
10
9
|
let node_path = require("node:path");
|
|
11
10
|
node_path = require_dist.__toESM(node_path);
|
|
11
|
+
let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
|
|
12
12
|
//#region src/audio-analyzer/audio-pipeline.ts
|
|
13
13
|
/**
|
|
14
14
|
* Create the appropriate audio pipeline.
|
|
@@ -83,7 +83,7 @@ var YamnetPythonPipeline = class {
|
|
|
83
83
|
url: YAMNET_MODEL_URL,
|
|
84
84
|
dest: modelPath
|
|
85
85
|
} });
|
|
86
|
-
await
|
|
86
|
+
await (0, _camstack_system_addon_utils.downloadFile)(YAMNET_MODEL_URL, modelPath);
|
|
87
87
|
this.log.info("YAMNet ONNX model downloaded", { meta: { sizeBytes: node_fs.statSync(modelPath).size } });
|
|
88
88
|
}
|
|
89
89
|
if (!node_fs.existsSync(labelsPath)) {
|
|
@@ -91,7 +91,7 @@ var YamnetPythonPipeline = class {
|
|
|
91
91
|
url: YAMNET_LABELS_URL,
|
|
92
92
|
dest: labelsPath
|
|
93
93
|
} });
|
|
94
|
-
await
|
|
94
|
+
await (0, _camstack_system_addon_utils.downloadFile)(YAMNET_LABELS_URL, labelsPath);
|
|
95
95
|
}
|
|
96
96
|
const pythonDir = resolveAudioPythonDir();
|
|
97
97
|
if (this.installPythonRequirements) await this.installPythonRequirements(node_path.join(pythonDir, "requirements-audio.txt"));
|
|
@@ -394,25 +394,6 @@ function resampleMono16k(chunk) {
|
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region src/audio-analyzer/addons/analyzer/index.ts
|
|
396
396
|
/**
|
|
397
|
-
* Choices presented in the Audio Model dropdown. YAMNet runs via ONNX
|
|
398
|
-
* when backend=yamnet-onnx; Apple SoundAnalysis is a built-in macOS
|
|
399
|
-
* model and has no swappable modelId — the backend IS the model.
|
|
400
|
-
*/
|
|
401
|
-
var AUDIO_MODEL_OPTIONS = [
|
|
402
|
-
{
|
|
403
|
-
value: "",
|
|
404
|
-
label: "Auto (matches backend)"
|
|
405
|
-
},
|
|
406
|
-
{
|
|
407
|
-
value: "yamnet-onnx",
|
|
408
|
-
label: "YAMNet (ONNX)"
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
value: "apple-soundanalysis",
|
|
412
|
-
label: "Apple SoundAnalysis (built-in)"
|
|
413
|
-
}
|
|
414
|
-
];
|
|
415
|
-
/**
|
|
416
397
|
* AudioAnalyzerProvider — implements IAudioAnalyzer.
|
|
417
398
|
*
|
|
418
399
|
* Computes dB/RMS on every chunk and classifies via the in-process
|
|
@@ -831,57 +812,41 @@ var AudioAnalyzerAddon = class extends require_dist.BaseAddon {
|
|
|
831
812
|
tab: "engine",
|
|
832
813
|
order: 10,
|
|
833
814
|
description: "Audio classification backend (Apple SoundAnalysis or YAMNet ONNX). Independent from the vision-detection engine above. \"Auto\" picks Apple SoundAnalysis on macOS, YAMNet on Linux. Click the refresh icon next to \"Probed best\" to re-run the probe.",
|
|
834
|
-
fields: [
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
immediate: true
|
|
859
|
-
},
|
|
860
|
-
{
|
|
861
|
-
type: "select",
|
|
862
|
-
key: "selectedAudioModel",
|
|
863
|
-
label: "Classification model",
|
|
864
|
-
description: "Empty = auto (matches backend). Device-level settings can only inherit / enable / disable this step; model + class filters live here at the node level.",
|
|
865
|
-
options: AUDIO_MODEL_OPTIONS.map((o) => ({
|
|
866
|
-
value: o.value,
|
|
867
|
-
label: o.label
|
|
868
|
-
})),
|
|
869
|
-
default: require_dist.DEFAULT_AUDIO_ANALYZER_CONFIG.selectedAudioModel,
|
|
870
|
-
immediate: true
|
|
871
|
-
}
|
|
872
|
-
]
|
|
815
|
+
fields: [{
|
|
816
|
+
type: "text",
|
|
817
|
+
key: "probedBestAudioBackend",
|
|
818
|
+
label: "Probed best",
|
|
819
|
+
description: "Auto-detected best audio backend on this host. Click the refresh icon to re-run the probe.",
|
|
820
|
+
readonlyField: true,
|
|
821
|
+
default: "",
|
|
822
|
+
perNode: true,
|
|
823
|
+
actions: [{
|
|
824
|
+
action: "reprobe-audio-engine",
|
|
825
|
+
icon: "refresh-cw",
|
|
826
|
+
tooltip: "Re-probe audio engine"
|
|
827
|
+
}]
|
|
828
|
+
}, {
|
|
829
|
+
type: "select",
|
|
830
|
+
key: "audioBackend",
|
|
831
|
+
label: "Audio backend",
|
|
832
|
+
options: require_dist.AUDIO_BACKEND_CHOICES.map((o) => ({
|
|
833
|
+
value: o.value,
|
|
834
|
+
label: o.label
|
|
835
|
+
})),
|
|
836
|
+
default: require_dist.DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend,
|
|
837
|
+
immediate: true
|
|
838
|
+
}]
|
|
873
839
|
}] };
|
|
874
840
|
}
|
|
875
841
|
/**
|
|
876
|
-
*
|
|
877
|
-
*
|
|
842
|
+
* Platform override — narrow the `audioBackend` options to the subset
|
|
843
|
+
* that can actually run on the TARGET node.
|
|
878
844
|
*
|
|
879
|
-
*
|
|
880
|
-
*
|
|
881
|
-
*
|
|
882
|
-
*
|
|
883
|
-
*
|
|
884
|
-
* every flip and the model dropdown updates instantly.
|
|
845
|
+
* The base schema ships every backend (Auto + YAMNet + Apple SA); this
|
|
846
|
+
* override drops Apple SoundAnalysis on a node that is not macOS, and
|
|
847
|
+
* collapses a stored choice that is no longer runnable there back to
|
|
848
|
+
* `auto` — so the form never offers, nor displays, an impossible
|
|
849
|
+
* selection.
|
|
885
850
|
*
|
|
886
851
|
* `overlay` carries the operator's tentative choices for benchmark/
|
|
887
852
|
* preview mode (operator typed but didn't save yet) — same
|
|
@@ -897,14 +862,9 @@ var AudioAnalyzerAddon = class extends require_dist.BaseAddon {
|
|
|
897
862
|
const backendOptions = require_dist.AUDIO_BACKEND_CHOICES.filter((o) => o.value !== "apple-soundanalysis" || isDarwin);
|
|
898
863
|
const operatorChoiceRaw = typeof merged.audioBackend === "string" ? merged.audioBackend : require_dist.DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend;
|
|
899
864
|
const operatorChoice = backendOptions.some((o) => o.value === operatorChoiceRaw) ? operatorChoiceRaw : require_dist.DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend;
|
|
900
|
-
const effectiveBackend = operatorChoice === "apple-soundanalysis" ? "apple-soundanalysis" : operatorChoice === "yamnet-onnx" ? "yamnet-onnx" : isDarwin ? "apple-soundanalysis" : "yamnet-onnx";
|
|
901
|
-
const filteredModels = AUDIO_MODEL_OPTIONS.filter((o) => (o.value === "" || o.value === effectiveBackend) && (o.value !== "apple-soundanalysis" || isDarwin));
|
|
902
|
-
const storedModel = typeof merged.selectedAudioModel === "string" ? merged.selectedAudioModel : "";
|
|
903
|
-
const validModel = filteredModels.find((o) => o.value === storedModel)?.value ?? "";
|
|
904
865
|
const raw = {
|
|
905
866
|
...merged,
|
|
906
|
-
audioBackend: operatorChoice
|
|
907
|
-
selectedAudioModel: validModel
|
|
867
|
+
audioBackend: operatorChoice
|
|
908
868
|
};
|
|
909
869
|
const schema = this.globalSettingsSchema();
|
|
910
870
|
return require_dist.hydrateSchema({
|
|
@@ -919,13 +879,6 @@ var AudioAnalyzerAddon = class extends require_dist.BaseAddon {
|
|
|
919
879
|
label: o.label
|
|
920
880
|
}))
|
|
921
881
|
};
|
|
922
|
-
if (field.type === "select" && field.key === "selectedAudioModel") return {
|
|
923
|
-
...field,
|
|
924
|
-
options: filteredModels.map((o) => ({
|
|
925
|
-
value: o.value,
|
|
926
|
-
label: o.label
|
|
927
|
-
}))
|
|
928
|
-
};
|
|
929
882
|
return field;
|
|
930
883
|
})
|
|
931
884
|
}))
|
|
@@ -1020,8 +973,7 @@ var AudioAnalyzerAddon = class extends require_dist.BaseAddon {
|
|
|
1020
973
|
const modelsDir = await this.resolveModelsDir();
|
|
1021
974
|
logger.info("audio-analyzer: resolving pipeline", { meta: {
|
|
1022
975
|
operatorChoice: this.config.audioBackend,
|
|
1023
|
-
effectiveBackend: backend
|
|
1024
|
-
selectedModel: this.config.selectedAudioModel || null
|
|
976
|
+
effectiveBackend: backend
|
|
1025
977
|
} });
|
|
1026
978
|
const p = await createAudioPipeline(modelsDir, logger, {
|
|
1027
979
|
backend,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { A as audioAnalysisCapability, Ct as errMsg,
|
|
3
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
4
|
-
import { i as downloadFile } from "../addon-utils-C8KTuPdE.mjs";
|
|
2
|
+
import { A as audioAnalysisCapability, At as BaseAddon, Ct as errMsg, Ft as hydrateSchema, S as PoolMemoryWatchdog, gt as resolvePoolMemoryPolicy, j as audioAnalyzerCapability, n as AUDIO_BACKEND_CHOICES, s as DEFAULT_AUDIO_ANALYZER_CONFIG, tt as mapAudioLabelToMacro, v as HF_BASE_URL } from "../dist-CTmOaCwF.mjs";
|
|
3
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BPEKERfe.mjs";
|
|
5
4
|
import * as fs from "node:fs";
|
|
6
5
|
import * as path$1 from "node:path";
|
|
6
|
+
import { downloadFile } from "@camstack/system/addon-utils";
|
|
7
7
|
//#region src/audio-analyzer/audio-pipeline.ts
|
|
8
8
|
/**
|
|
9
9
|
* Create the appropriate audio pipeline.
|
|
@@ -389,25 +389,6 @@ function resampleMono16k(chunk) {
|
|
|
389
389
|
//#endregion
|
|
390
390
|
//#region src/audio-analyzer/addons/analyzer/index.ts
|
|
391
391
|
/**
|
|
392
|
-
* Choices presented in the Audio Model dropdown. YAMNet runs via ONNX
|
|
393
|
-
* when backend=yamnet-onnx; Apple SoundAnalysis is a built-in macOS
|
|
394
|
-
* model and has no swappable modelId — the backend IS the model.
|
|
395
|
-
*/
|
|
396
|
-
var AUDIO_MODEL_OPTIONS = [
|
|
397
|
-
{
|
|
398
|
-
value: "",
|
|
399
|
-
label: "Auto (matches backend)"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
value: "yamnet-onnx",
|
|
403
|
-
label: "YAMNet (ONNX)"
|
|
404
|
-
},
|
|
405
|
-
{
|
|
406
|
-
value: "apple-soundanalysis",
|
|
407
|
-
label: "Apple SoundAnalysis (built-in)"
|
|
408
|
-
}
|
|
409
|
-
];
|
|
410
|
-
/**
|
|
411
392
|
* AudioAnalyzerProvider — implements IAudioAnalyzer.
|
|
412
393
|
*
|
|
413
394
|
* Computes dB/RMS on every chunk and classifies via the in-process
|
|
@@ -826,57 +807,41 @@ var AudioAnalyzerAddon = class extends BaseAddon {
|
|
|
826
807
|
tab: "engine",
|
|
827
808
|
order: 10,
|
|
828
809
|
description: "Audio classification backend (Apple SoundAnalysis or YAMNet ONNX). Independent from the vision-detection engine above. \"Auto\" picks Apple SoundAnalysis on macOS, YAMNet on Linux. Click the refresh icon next to \"Probed best\" to re-run the probe.",
|
|
829
|
-
fields: [
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
immediate: true
|
|
854
|
-
},
|
|
855
|
-
{
|
|
856
|
-
type: "select",
|
|
857
|
-
key: "selectedAudioModel",
|
|
858
|
-
label: "Classification model",
|
|
859
|
-
description: "Empty = auto (matches backend). Device-level settings can only inherit / enable / disable this step; model + class filters live here at the node level.",
|
|
860
|
-
options: AUDIO_MODEL_OPTIONS.map((o) => ({
|
|
861
|
-
value: o.value,
|
|
862
|
-
label: o.label
|
|
863
|
-
})),
|
|
864
|
-
default: DEFAULT_AUDIO_ANALYZER_CONFIG.selectedAudioModel,
|
|
865
|
-
immediate: true
|
|
866
|
-
}
|
|
867
|
-
]
|
|
810
|
+
fields: [{
|
|
811
|
+
type: "text",
|
|
812
|
+
key: "probedBestAudioBackend",
|
|
813
|
+
label: "Probed best",
|
|
814
|
+
description: "Auto-detected best audio backend on this host. Click the refresh icon to re-run the probe.",
|
|
815
|
+
readonlyField: true,
|
|
816
|
+
default: "",
|
|
817
|
+
perNode: true,
|
|
818
|
+
actions: [{
|
|
819
|
+
action: "reprobe-audio-engine",
|
|
820
|
+
icon: "refresh-cw",
|
|
821
|
+
tooltip: "Re-probe audio engine"
|
|
822
|
+
}]
|
|
823
|
+
}, {
|
|
824
|
+
type: "select",
|
|
825
|
+
key: "audioBackend",
|
|
826
|
+
label: "Audio backend",
|
|
827
|
+
options: AUDIO_BACKEND_CHOICES.map((o) => ({
|
|
828
|
+
value: o.value,
|
|
829
|
+
label: o.label
|
|
830
|
+
})),
|
|
831
|
+
default: DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend,
|
|
832
|
+
immediate: true
|
|
833
|
+
}]
|
|
868
834
|
}] };
|
|
869
835
|
}
|
|
870
836
|
/**
|
|
871
|
-
*
|
|
872
|
-
*
|
|
837
|
+
* Platform override — narrow the `audioBackend` options to the subset
|
|
838
|
+
* that can actually run on the TARGET node.
|
|
873
839
|
*
|
|
874
|
-
*
|
|
875
|
-
*
|
|
876
|
-
*
|
|
877
|
-
*
|
|
878
|
-
*
|
|
879
|
-
* every flip and the model dropdown updates instantly.
|
|
840
|
+
* The base schema ships every backend (Auto + YAMNet + Apple SA); this
|
|
841
|
+
* override drops Apple SoundAnalysis on a node that is not macOS, and
|
|
842
|
+
* collapses a stored choice that is no longer runnable there back to
|
|
843
|
+
* `auto` — so the form never offers, nor displays, an impossible
|
|
844
|
+
* selection.
|
|
880
845
|
*
|
|
881
846
|
* `overlay` carries the operator's tentative choices for benchmark/
|
|
882
847
|
* preview mode (operator typed but didn't save yet) — same
|
|
@@ -892,14 +857,9 @@ var AudioAnalyzerAddon = class extends BaseAddon {
|
|
|
892
857
|
const backendOptions = AUDIO_BACKEND_CHOICES.filter((o) => o.value !== "apple-soundanalysis" || isDarwin);
|
|
893
858
|
const operatorChoiceRaw = typeof merged.audioBackend === "string" ? merged.audioBackend : DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend;
|
|
894
859
|
const operatorChoice = backendOptions.some((o) => o.value === operatorChoiceRaw) ? operatorChoiceRaw : DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend;
|
|
895
|
-
const effectiveBackend = operatorChoice === "apple-soundanalysis" ? "apple-soundanalysis" : operatorChoice === "yamnet-onnx" ? "yamnet-onnx" : isDarwin ? "apple-soundanalysis" : "yamnet-onnx";
|
|
896
|
-
const filteredModels = AUDIO_MODEL_OPTIONS.filter((o) => (o.value === "" || o.value === effectiveBackend) && (o.value !== "apple-soundanalysis" || isDarwin));
|
|
897
|
-
const storedModel = typeof merged.selectedAudioModel === "string" ? merged.selectedAudioModel : "";
|
|
898
|
-
const validModel = filteredModels.find((o) => o.value === storedModel)?.value ?? "";
|
|
899
860
|
const raw = {
|
|
900
861
|
...merged,
|
|
901
|
-
audioBackend: operatorChoice
|
|
902
|
-
selectedAudioModel: validModel
|
|
862
|
+
audioBackend: operatorChoice
|
|
903
863
|
};
|
|
904
864
|
const schema = this.globalSettingsSchema();
|
|
905
865
|
return hydrateSchema({
|
|
@@ -914,13 +874,6 @@ var AudioAnalyzerAddon = class extends BaseAddon {
|
|
|
914
874
|
label: o.label
|
|
915
875
|
}))
|
|
916
876
|
};
|
|
917
|
-
if (field.type === "select" && field.key === "selectedAudioModel") return {
|
|
918
|
-
...field,
|
|
919
|
-
options: filteredModels.map((o) => ({
|
|
920
|
-
value: o.value,
|
|
921
|
-
label: o.label
|
|
922
|
-
}))
|
|
923
|
-
};
|
|
924
877
|
return field;
|
|
925
878
|
})
|
|
926
879
|
}))
|
|
@@ -1015,8 +968,7 @@ var AudioAnalyzerAddon = class extends BaseAddon {
|
|
|
1015
968
|
const modelsDir = await this.resolveModelsDir();
|
|
1016
969
|
logger.info("audio-analyzer: resolving pipeline", { meta: {
|
|
1017
970
|
operatorChoice: this.config.audioBackend,
|
|
1018
|
-
effectiveBackend: backend
|
|
1019
|
-
selectedModel: this.config.selectedAudioModel || null
|
|
971
|
+
effectiveBackend: backend
|
|
1020
972
|
} });
|
|
1021
973
|
const p = await createAudioPipeline(modelsDir, logger, {
|
|
1022
974
|
backend,
|
|
@@ -2,12 +2,11 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
-
const require_dist = require("../dist-
|
|
6
|
-
const require_node = require("../node-
|
|
7
|
-
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-
|
|
8
|
-
const require_lazy_sharp = require("../lazy-sharp-
|
|
9
|
-
const require_process_memory = require("../process-memory-
|
|
10
|
-
const require_addon_utils = require("../addon-utils-C6b5Tnia.js");
|
|
5
|
+
const require_dist = require("../dist-WUZH-lAM.js");
|
|
6
|
+
const require_node = require("../node-BAo2ivVu.js");
|
|
7
|
+
const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-CoM21UjL.js");
|
|
8
|
+
const require_lazy_sharp = require("../lazy-sharp-1WF7ZnxZ.js");
|
|
9
|
+
const require_process_memory = require("../process-memory-BZvkQCLP.js");
|
|
11
10
|
let node_fs = require("node:fs");
|
|
12
11
|
node_fs = require_dist.__toESM(node_fs);
|
|
13
12
|
let node_path = require("node:path");
|
|
@@ -17,6 +16,7 @@ let sharp = require("sharp");
|
|
|
17
16
|
sharp = require_dist.__toESM(sharp);
|
|
18
17
|
let node_os = require("node:os");
|
|
19
18
|
node_os = require_dist.__toESM(node_os);
|
|
19
|
+
let _camstack_system_addon_utils = require("@camstack/system/addon-utils");
|
|
20
20
|
//#region src/detection-pipeline/runtimes.ts
|
|
21
21
|
var KNOWN_PLATFORMS = [
|
|
22
22
|
"darwin",
|
|
@@ -6898,7 +6898,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
6898
6898
|
if (!step.enabled) continue;
|
|
6899
6899
|
const modelEntry = await this.resolveModelEntry(step.addonId, step.modelId);
|
|
6900
6900
|
if (!modelEntry) continue;
|
|
6901
|
-
if (
|
|
6901
|
+
if ((0, _camstack_system_addon_utils.isModelDownloaded)(this.modelsDir, modelEntry, format)) continue;
|
|
6902
6902
|
await this.downloadWithRetry(modelEntry, format, 3);
|
|
6903
6903
|
}
|
|
6904
6904
|
}
|
|
@@ -7275,7 +7275,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
7275
7275
|
const formats = {};
|
|
7276
7276
|
for (const [formatKey, entry] of Object.entries(m.formats)) {
|
|
7277
7277
|
if (!entry) continue;
|
|
7278
|
-
const downloaded =
|
|
7278
|
+
const downloaded = (0, _camstack_system_addon_utils.isModelDownloaded)(this.modelsDir, m, formatKey);
|
|
7279
7279
|
formats[formatKey] = {
|
|
7280
7280
|
url: entry.url,
|
|
7281
7281
|
sizeMB: entry.sizeMB,
|
|
@@ -7398,7 +7398,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
7398
7398
|
const { modelId, format, addonId } = input;
|
|
7399
7399
|
const modelEntry = await this.resolveModelEntry(addonId, modelId);
|
|
7400
7400
|
if (!modelEntry) throw new Error(`Model "${modelId}" not found in step "${addonId}" catalog`);
|
|
7401
|
-
if (!
|
|
7401
|
+
if (!(0, _camstack_system_addon_utils.deleteModelFromDisk)(this.modelsDir, modelEntry, format)) throw new Error(`Model "${modelId}" (${format}) is not downloaded — nothing to delete`);
|
|
7402
7402
|
this.log.info("Model deleted from disk", { meta: {
|
|
7403
7403
|
modelId,
|
|
7404
7404
|
format
|
|
@@ -8215,7 +8215,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
8215
8215
|
const work = (async () => {
|
|
8216
8216
|
for (const step of needed) {
|
|
8217
8217
|
const modelEntry = await this.resolveModelEntry(step.addonId, step.modelId);
|
|
8218
|
-
if (modelEntry && !
|
|
8218
|
+
if (modelEntry && !(0, _camstack_system_addon_utils.isModelDownloaded)(this.modelsDir, modelEntry, format)) {
|
|
8219
8219
|
if (modelEntry.formats[format] === void 0) throw new Error(`Model "${modelEntry.id}" has no ${format} format build (available: ${Object.keys(modelEntry.formats).join(", ") || "none"}) — not retrying a permanent format mismatch`);
|
|
8220
8220
|
if (modelEntry.formats[format]?.url.startsWith("camstack-local://") === true) throw new Error(`Custom model "${modelEntry.id}" (${format}) is not present in this node's models directory — distribute it to this node from Model Studio before selecting it here`);
|
|
8221
8221
|
this.log.info("Downloading model for step", { meta: {
|
|
@@ -8242,7 +8242,7 @@ var DetectionPipelineProvider = class DetectionPipelineProvider {
|
|
|
8242
8242
|
/** Download a model with retry + exponential backoff */
|
|
8243
8243
|
async downloadWithRetry(entry, format, maxRetries, onProgress) {
|
|
8244
8244
|
for (let attempt = 1; attempt <= maxRetries; attempt++) try {
|
|
8245
|
-
await
|
|
8245
|
+
await (0, _camstack_system_addon_utils.ensureModel)(this.modelsDir, entry, format, onProgress);
|
|
8246
8246
|
this.log.info("Model downloaded successfully", { meta: { modelId: entry.id } });
|
|
8247
8247
|
return;
|
|
8248
8248
|
} catch (err) {
|
|
@@ -9237,7 +9237,7 @@ function buildSchemaSlots(formats, modelsDir, customByStep) {
|
|
|
9237
9237
|
id: m.id,
|
|
9238
9238
|
name: m.name,
|
|
9239
9239
|
formats: Object.fromEntries(Object.entries(m.formats).map(([f, entry]) => [f, {
|
|
9240
|
-
downloaded:
|
|
9240
|
+
downloaded: (0, _camstack_system_addon_utils.isModelDownloaded)(modelsDir, m, f),
|
|
9241
9241
|
sizeMB: entry.sizeMB
|
|
9242
9242
|
}])),
|
|
9243
9243
|
...m.group ? { group: m.group } : {},
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as __require } from "../chunk-DnnnRqeS.mjs";
|
|
2
|
-
import { $ as loadContributionCapability, $t as
|
|
3
|
-
import { a as readProcessCost } from "../node-
|
|
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-
|
|
2
|
+
import { $ as loadContributionCapability, $t as string, At as BaseAddon, Bt as parseJsonUnknown, Ct as errMsg, Ft as hydrateSchema, Gt as array, O as YAMNET_TO_MACRO, Pt as createEvent, S as PoolMemoryWatchdog, Ut as sleep, W as detectionPipelineCapability, Y as evaluateZoneRules, Z as inferModelProvider, Zt as object, c as DEFAULT_CLUSTER_STEP_MODELS, en as union, gt as resolvePoolMemoryPolicy, it as overlayClusterStepSettings, l as DEFAULT_CLUSTER_STEP_SETTINGS, m as DEVICE_BACKEND_TO_FORMAT, mt as resolveClusterStepModelId, ot as pickClusterStepModels, q as enumerateInferenceDevices, st as pickClusterStepSettings, t as APPLE_SA_TO_MACRO, tn as EventCategory, ut as pipelineExecutorCapability, vt as runtimeDevices$1, xt as supportedRuntimes$1, z as defaultDeviceFor$1, zt as nodePin } from "../dist-CTmOaCwF.mjs";
|
|
3
|
+
import { a as readProcessCost } from "../node-CQcgxO8l.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-BMtR9qZR.mjs";
|
|
5
5
|
import { t as getSharp } from "../lazy-sharp-DXsqwpph.mjs";
|
|
6
|
-
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-
|
|
7
|
-
import { a as ensureModel, o as isModelDownloaded, r as deleteModelFromDisk } from "../addon-utils-C8KTuPdE.mjs";
|
|
6
|
+
import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BPEKERfe.mjs";
|
|
8
7
|
import * as fs from "node:fs";
|
|
9
8
|
import * as path$1 from "node:path";
|
|
10
9
|
import { spawn } from "node:child_process";
|
|
11
10
|
import sharp from "sharp";
|
|
12
11
|
import * as os from "node:os";
|
|
12
|
+
import { deleteModelFromDisk, ensureModel, isModelDownloaded } from "@camstack/system/addon-utils";
|
|
13
13
|
//#region src/detection-pipeline/runtimes.ts
|
|
14
14
|
var KNOWN_PLATFORMS = [
|
|
15
15
|
"darwin",
|