@signalsandsorcery/plugin-sdk 2.35.3 → 2.35.4

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/index.d.mts CHANGED
@@ -637,6 +637,16 @@ interface PluginHost {
637
637
  * picker components consume one type.
638
638
  */
639
639
  getAvailableFx?(): Promise<InstrumentDescriptor[]>;
640
+ /**
641
+ * Force a plugin re-scan and return the refreshed FX list. Unlike
642
+ * `getAvailableFx` (served from a cache), this re-walks the plugin
643
+ * directories AND clears the engine's failed-probe blacklist, so a plugin
644
+ * installed mid-session, or one that crashed a previous scan and was
645
+ * blacklisted, reappears without an app restart. Backs the FX picker's
646
+ * "Rescan" button. Slow (20-60s). Absent on pre-2.40 hosts — callers should
647
+ * fall back to `getAvailableFx`. @since SDK 2.40.0
648
+ */
649
+ rescanAvailableFx?(): Promise<InstrumentDescriptor[]>;
640
650
  /**
641
651
  * The panel's bus state for a scene. `{ engaged: false, … }` when the
642
652
  * panel has no bus there — reading NEVER creates one. When engaged, this
@@ -4944,7 +4954,7 @@ declare function useAnySolo(host: Pick<PluginHost, 'isAnySoloActive' | 'onTrackS
4944
4954
  * Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
4945
4955
  * during activation and marks incompatible plugins accordingly.
4946
4956
  */
4947
- declare const PLUGIN_SDK_VERSION = "2.39.0";
4957
+ declare const PLUGIN_SDK_VERSION = "2.40.0";
4948
4958
 
4949
4959
  /**
4950
4960
  * FX Preset Definitions
package/dist/index.d.ts CHANGED
@@ -637,6 +637,16 @@ interface PluginHost {
637
637
  * picker components consume one type.
638
638
  */
639
639
  getAvailableFx?(): Promise<InstrumentDescriptor[]>;
640
+ /**
641
+ * Force a plugin re-scan and return the refreshed FX list. Unlike
642
+ * `getAvailableFx` (served from a cache), this re-walks the plugin
643
+ * directories AND clears the engine's failed-probe blacklist, so a plugin
644
+ * installed mid-session, or one that crashed a previous scan and was
645
+ * blacklisted, reappears without an app restart. Backs the FX picker's
646
+ * "Rescan" button. Slow (20-60s). Absent on pre-2.40 hosts — callers should
647
+ * fall back to `getAvailableFx`. @since SDK 2.40.0
648
+ */
649
+ rescanAvailableFx?(): Promise<InstrumentDescriptor[]>;
640
650
  /**
641
651
  * The panel's bus state for a scene. `{ engaged: false, … }` when the
642
652
  * panel has no bus there — reading NEVER creates one. When engaged, this
@@ -4944,7 +4954,7 @@ declare function useAnySolo(host: Pick<PluginHost, 'isAnySoloActive' | 'onTrackS
4944
4954
  * Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
4945
4955
  * during activation and marks incompatible plugins accordingly.
4946
4956
  */
4947
- declare const PLUGIN_SDK_VERSION = "2.39.0";
4957
+ declare const PLUGIN_SDK_VERSION = "2.40.0";
4948
4958
 
4949
4959
  /**
4950
4960
  * FX Preset Definitions
package/dist/index.js CHANGED
@@ -963,12 +963,12 @@ function useTrackExternalFx(host, trackId) {
963
963
  void reload();
964
964
  }, [reload]);
965
965
  const loadFxList = (0, import_react2.useCallback)(
966
- async (force) => {
966
+ async (opts) => {
967
967
  if (!supported || !host.getAvailableFx) return;
968
- if (fxLoadedRef.current && !force) return;
968
+ if (fxLoadedRef.current && !opts.force && !opts.rescan) return;
969
969
  setFxLoading(true);
970
970
  try {
971
- const list = await host.getAvailableFx();
971
+ const list = opts.rescan && host.rescanAvailableFx ? await host.rescanAvailableFx() : await host.getAvailableFx();
972
972
  setAvailableFx(list);
973
973
  fxLoadedRef.current = true;
974
974
  } catch {
@@ -981,7 +981,7 @@ function useTrackExternalFx(host, trackId) {
981
981
  const openPicker = (0, import_react2.useCallback)(
982
982
  (open) => {
983
983
  setPickerOpen(open);
984
- if (open) void loadFxList(false);
984
+ if (open) void loadFxList({});
985
985
  },
986
986
  [loadFxList]
987
987
  );
@@ -1005,7 +1005,7 @@ function useTrackExternalFx(host, trackId) {
1005
1005
  fxLoading,
1006
1006
  pickerOpen,
1007
1007
  setPickerOpen: openPicker,
1008
- refreshFx: () => void loadFxList(true),
1008
+ refreshFx: () => void loadFxList({ rescan: true }),
1009
1009
  reload,
1010
1010
  onAddFx: (pluginId) => mutate(host.loadTrackExternalFx && (async () => {
1011
1011
  await host.loadTrackExternalFx(trackId, pluginId);
@@ -1142,7 +1142,7 @@ function TrackExternalFxSection({
1142
1142
  onClick: () => refreshFx(),
1143
1143
  disabled: fxLoading,
1144
1144
  className: "px-2 py-1 text-xs rounded-sm border border-sas-border text-sas-muted hover:text-sas-accent hover:border-sas-accent transition-colors disabled:opacity-50",
1145
- title: "Re-scan plugins",
1145
+ title: "Re-scan plugins \u2014 picks up newly installed FX and retries any that failed a previous scan",
1146
1146
  children: fxLoading ? "..." : "Refresh"
1147
1147
  }
1148
1148
  )
@@ -4686,7 +4686,7 @@ function PanelMasterStrip({
4686
4686
  onClick: () => onRefreshFx(),
4687
4687
  disabled: fxLoading,
4688
4688
  className: "px-2 py-1 text-xs rounded-sm border border-sas-border text-sas-muted hover:text-sas-accent hover:border-sas-accent transition-colors disabled:opacity-50",
4689
- title: "Re-scan plugins",
4689
+ title: "Re-scan plugins \u2014 picks up newly installed FX and retries any that failed a previous scan",
4690
4690
  children: fxLoading ? "..." : "Refresh"
4691
4691
  }
4692
4692
  )
@@ -4766,12 +4766,12 @@ function usePanelBus(host, activeSceneId) {
4766
4766
  };
4767
4767
  }, [supported, activeSceneId, bus?.engaged, host]);
4768
4768
  const loadFxList = (0, import_react20.useCallback)(
4769
- async (force) => {
4769
+ async (opts) => {
4770
4770
  if (!supported || !host.getAvailableFx) return;
4771
- if (fxLoadedRef.current && !force) return;
4771
+ if (fxLoadedRef.current && !opts.force && !opts.rescan) return;
4772
4772
  setFxLoading(true);
4773
4773
  try {
4774
- const list = await host.getAvailableFx();
4774
+ const list = opts.rescan && host.rescanAvailableFx ? await host.rescanAvailableFx() : await host.getAvailableFx();
4775
4775
  setAvailableFx(list);
4776
4776
  fxLoadedRef.current = true;
4777
4777
  } catch {
@@ -4784,7 +4784,7 @@ function usePanelBus(host, activeSceneId) {
4784
4784
  const openPicker = (0, import_react20.useCallback)(
4785
4785
  (open) => {
4786
4786
  setFxPickerOpen(open);
4787
- if (open) void loadFxList(false);
4787
+ if (open) void loadFxList({});
4788
4788
  },
4789
4789
  [loadFxList]
4790
4790
  );
@@ -4809,7 +4809,7 @@ function usePanelBus(host, activeSceneId) {
4809
4809
  fxLoading,
4810
4810
  fxPickerOpen,
4811
4811
  setFxPickerOpen: openPicker,
4812
- refreshFx: () => void loadFxList(true),
4812
+ refreshFx: () => void loadFxList({ rescan: true }),
4813
4813
  reload,
4814
4814
  onVolumeChange: (volumeDb) => mutate(host.setPanelBusVolume && (() => host.setPanelBusVolume(activeSceneId, volumeDb))),
4815
4815
  onMuteToggle: () => mutate(
@@ -7963,7 +7963,7 @@ function createSurgeSoundAdapter(host, overrides = {}) {
7963
7963
  }
7964
7964
 
7965
7965
  // src/constants/sdk-version.ts
7966
- var PLUGIN_SDK_VERSION = "2.39.0";
7966
+ var PLUGIN_SDK_VERSION = "2.40.0";
7967
7967
 
7968
7968
  // src/utils/format-concurrent-tracks.ts
7969
7969
  function formatConcurrentTracks(ctx) {