@camstack/addon-pipeline 1.2.138 → 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.
Files changed (36) hide show
  1. package/dist/audio-analyzer/index.js +35 -83
  2. package/dist/audio-analyzer/index.mjs +35 -83
  3. package/dist/detection-pipeline/index.js +5 -5
  4. package/dist/detection-pipeline/index.mjs +4 -4
  5. package/dist/{dist-CmEYRK7G.mjs → dist-CTmOaCwF.mjs} +128 -2
  6. package/dist/{dist-BuIP0499.js → dist-WUZH-lAM.js} +128 -2
  7. package/dist/{event-loop-stall-monitor-JGTFb0Uv.mjs → event-loop-stall-monitor-BMtR9qZR.mjs} +1 -1
  8. package/dist/{event-loop-stall-monitor-Bef2jXMX.js → event-loop-stall-monitor-CoM21UjL.js} +1 -1
  9. package/dist/{lazy-sharp-DH2eVehm.js → lazy-sharp-1WF7ZnxZ.js} +1 -1
  10. package/dist/motion-wasm/index.js +2 -2
  11. package/dist/motion-wasm/index.mjs +1 -1
  12. package/dist/{node-ChdX9lv7.js → node-BAo2ivVu.js} +1 -1
  13. package/dist/{node-J07GBWT3.mjs → node-CQcgxO8l.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-DAKxUb9d.mjs → process-memory-BPEKERfe.mjs} +1 -1
  17. package/dist/{process-memory-CJoZemF4.js → process-memory-BZvkQCLP.js} +1 -1
  18. package/dist/recorder/index.js +2 -2
  19. package/dist/recorder/index.mjs +2 -2
  20. package/dist/{segment-demux-js-BgXbXZnp.js → segment-demux-js-B1L1pfoc.js} +1 -1
  21. package/dist/{segment-demux-js-Ck9ly4bX.mjs → segment-demux-js-CubhFNwb.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 +1 -1
  25. package/dist/stream-broker/{_virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-Cad8960O.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_stream_broker_widgets-DJ4k5ZBb.mjs} +3 -3
  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-DPpl_mtg.mjs +26 -0
  27. package/dist/stream-broker/demux-worker-child.js +1 -1
  28. package/dist/stream-broker/demux-worker-child.mjs +1 -1
  29. package/dist/stream-broker/{hostInit-Gd3OcDIa.mjs → hostInit-oy-XDnw6.mjs} +3 -3
  30. package/dist/stream-broker/index.js +13 -42
  31. package/dist/stream-broker/index.mjs +13 -42
  32. package/dist/stream-broker/remoteEntry.js +1 -1
  33. package/dist/{worker-protocol-Bpz62eyB.js → worker-protocol-C-0LYdSt.js} +1 -1
  34. package/dist/{worker-protocol-wMS29PG9.mjs → worker-protocol-DsuI4ifI.mjs} +1 -1
  35. package/package.json +1 -1
  36. 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,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-BuIP0499.js");
6
- const require_process_memory = require("../process-memory-CJoZemF4.js");
5
+ const require_dist = require("../dist-WUZH-lAM.js");
6
+ const require_process_memory = require("../process-memory-BZvkQCLP.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");
@@ -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
- type: "text",
837
- key: "probedBestAudioBackend",
838
- label: "Probed best",
839
- description: "Auto-detected best audio backend on this host. Click the refresh icon to re-run the probe.",
840
- readonlyField: true,
841
- default: "",
842
- perNode: true,
843
- actions: [{
844
- action: "reprobe-audio-engine",
845
- icon: "refresh-cw",
846
- tooltip: "Re-probe audio engine"
847
- }]
848
- },
849
- {
850
- type: "select",
851
- key: "audioBackend",
852
- label: "Audio backend",
853
- options: require_dist.AUDIO_BACKEND_CHOICES.map((o) => ({
854
- value: o.value,
855
- label: o.label
856
- })),
857
- default: require_dist.DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend,
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
- * Cascade override — narrow the `selectedAudioModel` options to the
877
- * subset compatible with the currently-selected `audioBackend`.
842
+ * Platform override — narrow the `audioBackend` options to the subset
843
+ * that can actually run on the TARGET node.
878
844
  *
879
- * Same pattern as detection-pipeline's `engineRuntime engineBackend
880
- * engineDevice` cascade: the base schema ships every option
881
- * (Auto + YAMNet + Apple SA); this override drops the rows that
882
- * belong to a backend the operator didn't pick. With `immediate:
883
- * true` on the `audioBackend` select, the UI refetches schema after
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,6 +1,6 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.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-CmEYRK7G.mjs";
3
- import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-DAKxUb9d.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";
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";
@@ -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
- type: "text",
832
- key: "probedBestAudioBackend",
833
- label: "Probed best",
834
- description: "Auto-detected best audio backend on this host. Click the refresh icon to re-run the probe.",
835
- readonlyField: true,
836
- default: "",
837
- perNode: true,
838
- actions: [{
839
- action: "reprobe-audio-engine",
840
- icon: "refresh-cw",
841
- tooltip: "Re-probe audio engine"
842
- }]
843
- },
844
- {
845
- type: "select",
846
- key: "audioBackend",
847
- label: "Audio backend",
848
- options: AUDIO_BACKEND_CHOICES.map((o) => ({
849
- value: o.value,
850
- label: o.label
851
- })),
852
- default: DEFAULT_AUDIO_ANALYZER_CONFIG.audioBackend,
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
- * Cascade override — narrow the `selectedAudioModel` options to the
872
- * subset compatible with the currently-selected `audioBackend`.
837
+ * Platform override — narrow the `audioBackend` options to the subset
838
+ * that can actually run on the TARGET node.
873
839
  *
874
- * Same pattern as detection-pipeline's `engineRuntime engineBackend
875
- * engineDevice` cascade: the base schema ships every option
876
- * (Auto + YAMNet + Apple SA); this override drops the rows that
877
- * belong to a backend the operator didn't pick. With `immediate:
878
- * true` on the `audioBackend` select, the UI refetches schema after
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,11 +2,11 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_dist = require("../dist-BuIP0499.js");
6
- const require_node = require("../node-ChdX9lv7.js");
7
- const require_event_loop_stall_monitor = require("../event-loop-stall-monitor-Bef2jXMX.js");
8
- const require_lazy_sharp = require("../lazy-sharp-DH2eVehm.js");
9
- const require_process_memory = require("../process-memory-CJoZemF4.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");
10
10
  let node_fs = require("node:fs");
11
11
  node_fs = require_dist.__toESM(node_fs);
12
12
  let node_path = require("node:path");
@@ -1,9 +1,9 @@
1
1
  import { n as __require } from "../chunk-DnnnRqeS.mjs";
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-CmEYRK7G.mjs";
3
- import { a as readProcessCost } from "../node-J07GBWT3.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-JGTFb0Uv.mjs";
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-DAKxUb9d.mjs";
6
+ import { n as pickNodePlatformArch, t as readProcessMemory } from "../process-memory-BPEKERfe.mjs";
7
7
  import * as fs from "node:fs";
8
8
  import * as path$1 from "node:path";
9
9
  import { spawn } from "node:child_process";
@@ -5932,6 +5932,40 @@ var BaseAddon = class {
5932
5932
  deviceSettingsSchema() {
5933
5933
  return null;
5934
5934
  }
5935
+ /**
5936
+ * INTEGRATION-LEVEL SETTINGS — declare which of this addon's global sections
5937
+ * ARE the configuration of its integration.
5938
+ *
5939
+ * Return the `ConfigSection.id`s, from {@link globalSettingsSchema}, that an
5940
+ * operator should find on the addon's integration page (System →
5941
+ * Integrations → <name>) rather than only in the cluster-wide list of every
5942
+ * addon. Empty (the default) means the addon has no integration-level
5943
+ * settings and no such surface is offered — this is opt-in, because whether
5944
+ * an addon's configuration IS its integration's configuration depends on the
5945
+ * nature of the integration.
5946
+ *
5947
+ * WHAT THIS IS NOT. It is not a scope. The selected sections keep living in
5948
+ * the ONE global schema, in the ONE addon store, written by the ONE
5949
+ * `updateGlobalSettings` path. There is deliberately no
5950
+ * `updateIntegrationSettings`: a second write path is how a surface acquires
5951
+ * a second store key, and this repo has shipped that twice (`btmPath@hub`,
5952
+ * D266). Selecting sections cannot introduce a key that selecting cannot.
5953
+ *
5954
+ * WHY IT IS A LIST OF SECTION IDS AND NOT A MARKER ON THE SECTION.
5955
+ * `ConfigFieldBase` used to carry `scope?: 'device' | 'global'` and it was
5956
+ * removed with the reason recorded at
5957
+ * `packages/types/src/interfaces/config-ui.ts:249` — *"a field's scope is
5958
+ * determined by WHICH schema it lives in, not by a field-level marker."* A
5959
+ * marker sprinkled across sections also has to borrow a field that already
5960
+ * means something else; borrowing `section.tab` put the literal word
5961
+ * "integration" into an operator-facing tab bar, because `tab` means "how to
5962
+ * GROUP this visually" and cannot also mean "where this lives" (D269
5963
+ * supersedes D268). One declaration, in one place, next to the schema whose
5964
+ * ids it names.
5965
+ */
5966
+ integrationSettingSections() {
5967
+ return [];
5968
+ }
5935
5969
  async getGlobalSettings(overlay, cap, nodeId) {
5936
5970
  const schema = this.globalSettingsSchema(cap);
5937
5971
  if (!schema) return { sections: [] };
@@ -5942,6 +5976,55 @@ var BaseAddon = class {
5942
5976
  } : projected);
5943
5977
  }
5944
5978
  /**
5979
+ * The integration-level view of this addon's settings: exactly the sections
5980
+ * named by {@link integrationSettingSections}, hydrated from the SAME store
5981
+ * `getGlobalSettings` reads, and narrowed to cluster-scoped fields.
5982
+ *
5983
+ * Returns `null` when the addon declared nothing — an addon that opts out has
5984
+ * no integration settings surface at all, rather than an empty one that reads
5985
+ * as a failed load.
5986
+ *
5987
+ * Three properties hold BY CONSTRUCTION, which is why they are here in core
5988
+ * and not in whichever UI happens to render this:
5989
+ *
5990
+ * 1. **One key.** The payload is a SUBSET of the global schema, so a field
5991
+ * shown here is the same field, with the same bare key, that the addon's
5992
+ * own page shows. There is no integration-specific writer — callers save
5993
+ * through `updateGlobalSettings` — so a second store key is unreachable,
5994
+ * not merely discouraged.
5995
+ * 2. **No node scope.** `perNode: true` fields are DROPPED. Their store key
5996
+ * is `<key>@<nodeId>` and an integration is not a node; whichever node
5997
+ * such a field silently picked would be a wrong answer for the operator
5998
+ * who opened the page (D266).
5999
+ * 3. **No silent typo.** A declared id that names no section throws. The
6000
+ * alternative — skip it — turns a rename into a surface that quietly
6001
+ * empties, which looks exactly like an addon with nothing to configure.
6002
+ */
6003
+ async getIntegrationSettings(nodeId) {
6004
+ const declared = this.integrationSettingSections();
6005
+ if (declared.length === 0) return null;
6006
+ const schema = this.globalSettingsSchema();
6007
+ if (!schema) throw new Error(`${this.constructor.name}: integrationSettingSections() names [${declared.join(", ")}] but globalSettingsSchema() returns null.`);
6008
+ const byId = new Map(schema.sections.map((section) => [section.id, section]));
6009
+ const sections = [];
6010
+ for (const id of declared) {
6011
+ const section = byId.get(id);
6012
+ if (!section) throw new Error(`${this.constructor.name}: integrationSettingSections() names unknown section "${id}". Known sections: [${[...byId.keys()].join(", ")}].`);
6013
+ const fields = dropPerNodeFields(section.fields);
6014
+ if (fields.length === 0) continue;
6015
+ sections.push({
6016
+ ...section,
6017
+ fields
6018
+ });
6019
+ }
6020
+ if (sections.length === 0) return null;
6021
+ const projected = await this.resolveGlobalStore(nodeId);
6022
+ return hydrateSchema({
6023
+ ...schema,
6024
+ sections
6025
+ }, projected);
6026
+ }
6027
+ /**
5945
6028
  * The raw addon store PROJECTED onto the target node's bare per-node keys:
5946
6029
  * every `perNode: true` field carries THAT node's scoped value on its bare
5947
6030
  * key (absent scoped key ⇒ key absent, so the schema `default` wins — no
@@ -6245,6 +6328,41 @@ var BaseAddon = class {
6245
6328
  * `hydrateSchema` does. Valueless structural fields (separator/info/…)
6246
6329
  * don't declare `perNode` and are excluded by the `in` narrowing.
6247
6330
  */
6331
+ /**
6332
+ * The same fields with every `perNode: true` one removed, recursing into layout
6333
+ * containers exactly as {@link collectPerNodeFieldKeys} does. A container left
6334
+ * with no child is dropped rather than rendered empty.
6335
+ *
6336
+ * Used by `getIntegrationSettings`: an integration is not a node, so a field
6337
+ * whose store key is `<key>@<nodeId>` has no node to belong to there.
6338
+ */
6339
+ function dropPerNodeFields(fields) {
6340
+ const kept = [];
6341
+ for (const field of fields) {
6342
+ if (field.type === "group") {
6343
+ const inner = dropPerNodeFields(field.fields);
6344
+ if (inner.length > 0) kept.push({
6345
+ ...field,
6346
+ fields: inner
6347
+ });
6348
+ continue;
6349
+ }
6350
+ if (field.type === "sub-tabs") {
6351
+ const tabs = field.tabs.map((tab) => ({
6352
+ ...tab,
6353
+ fields: dropPerNodeFields(tab.fields)
6354
+ })).filter((tab) => tab.fields.length > 0);
6355
+ if (tabs.length > 0) kept.push({
6356
+ ...field,
6357
+ tabs
6358
+ });
6359
+ continue;
6360
+ }
6361
+ if ("perNode" in field && field.perNode === true) continue;
6362
+ kept.push(field);
6363
+ }
6364
+ return kept;
6365
+ }
6248
6366
  function collectPerNodeFieldKeys(fields) {
6249
6367
  const collected = [];
6250
6368
  for (const field of fields) {
@@ -10742,6 +10860,9 @@ method(object({
10742
10860
  kind: "mutation",
10743
10861
  auth: "admin"
10744
10862
  }), method(object({
10863
+ addonId: string(),
10864
+ nodeId: string().optional()
10865
+ }), SettingsSchemaWithValuesSchema.nullable()), method(object({
10745
10866
  addonId: string(),
10746
10867
  deviceId: number(),
10747
10868
  nodeId: string().optional()
@@ -11129,8 +11250,7 @@ var AUDIO_BACKEND_CHOICES = [
11129
11250
  ];
11130
11251
  var DEFAULT_AUDIO_ANALYZER_CONFIG = {
11131
11252
  audioBackend: "auto",
11132
- probedBestAudioBackend: "",
11133
- selectedAudioModel: ""
11253
+ probedBestAudioBackend: ""
11134
11254
  };
11135
11255
  var audioAnalyzerCapability = {
11136
11256
  name: "audio-analyzer",
@@ -30790,6 +30910,12 @@ Object.freeze({
30790
30910
  addonId: null,
30791
30911
  access: "view"
30792
30912
  },
30913
+ "addonSettings.getIntegrationSettings": {
30914
+ capName: "addon-settings",
30915
+ capScope: "system",
30916
+ addonId: null,
30917
+ access: "view"
30918
+ },
30793
30919
  "addonSettings.updateDeviceSettings": {
30794
30920
  capName: "addon-settings",
30795
30921
  capScope: "system",