@signalsandsorcery/plugin-sdk 1.3.3 → 2.0.1
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 +15 -9
- package/dist/index.d.ts +15 -9
- package/dist/index.js +1 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -31
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -163,6 +163,19 @@ interface PluginHost {
|
|
|
163
163
|
shufflePreset(trackId: string): Promise<ShufflePresetResult>;
|
|
164
164
|
/** Duplicate track: copy MIDI + role to a new track with a different preset. Only works on owned tracks. */
|
|
165
165
|
duplicateTrack(trackId: string): Promise<PluginTrackHandle>;
|
|
166
|
+
/**
|
|
167
|
+
* Return the canonical list of valid role tokens that the host's
|
|
168
|
+
* classifier and UI understand. Plugins should use this list when
|
|
169
|
+
* building LLM prompts or validating role values before calling
|
|
170
|
+
* {@link setTrackRole}.
|
|
171
|
+
*
|
|
172
|
+
* The assistant owns the canonical taxonomy — plugins MUST NOT ship
|
|
173
|
+
* their own hardcoded list, which would drift from the host. Pair with
|
|
174
|
+
* {@link setTrackRole} to persist a classified role.
|
|
175
|
+
*
|
|
176
|
+
* @since SDK 2.0.0
|
|
177
|
+
*/
|
|
178
|
+
getValidRoles(): readonly string[];
|
|
166
179
|
/** Get detailed FX state for a track (enabled, preset, dry/wet per category). */
|
|
167
180
|
getTrackFxState(trackId: string): Promise<PluginTrackFxDetailState>;
|
|
168
181
|
/** Toggle an FX category on/off for a track. */
|
|
@@ -1327,13 +1340,6 @@ type SetSceneState<T> = (value: T | ((prev: T) => T)) => void;
|
|
|
1327
1340
|
type SetSceneStateForScene<T> = (sceneId: string, value: T | ((prev: T) => T)) => void;
|
|
1328
1341
|
declare function useSceneState<T>(activeSceneId: string | null, initialValue: T): [T, SetSceneState<T>, SetSceneStateForScene<T>];
|
|
1329
1342
|
|
|
1330
|
-
/**
|
|
1331
|
-
* Valid instrument roles for synth track generation.
|
|
1332
|
-
* Used in LLM prompts and preset selection.
|
|
1333
|
-
* Canonical source — imported by both plugin SDK and core services.
|
|
1334
|
-
*/
|
|
1335
|
-
declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
1336
|
-
|
|
1337
1343
|
/**
|
|
1338
1344
|
* Plugin SDK Version
|
|
1339
1345
|
*
|
|
@@ -1342,7 +1348,7 @@ declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
|
1342
1348
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
1343
1349
|
* during activation and marks incompatible plugins accordingly.
|
|
1344
1350
|
*/
|
|
1345
|
-
declare const PLUGIN_SDK_VERSION = "
|
|
1351
|
+
declare const PLUGIN_SDK_VERSION = "2.0.0";
|
|
1346
1352
|
|
|
1347
1353
|
/**
|
|
1348
1354
|
* FX Preset Definitions
|
|
@@ -1396,4 +1402,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1396
1402
|
*/
|
|
1397
1403
|
declare function dbToSlider(db: number): number;
|
|
1398
1404
|
|
|
1399
|
-
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, type ExportMidiBundleOptions, type ExportMidiBundleResult, type ExportedPluginData, FX_CATEGORIES, FX_CHAIN_ORDER, FX_DISPLAY_LABELS, FX_ENGINE_PLUGIN_NAMES, FX_PRESET_CONFIGS, type FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAppTool, type PluginAppToolInputSchema, type PluginAppToolResult, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, type PluginDownloadOptions, PluginError, type PluginErrorCode, type PluginFileDialogOptions, type PluginFxCategoryDetailState, type PluginGenerationContext, type PluginHost, type PluginHttpRequestOptions, type PluginHttpResponse, type PluginManifest, type PluginMidiNote, type PluginPresetData, type PluginPresetInfo, type PluginRegistration, type PluginSampleFilter, type PluginSampleImportResult, type PluginSampleInfo, type PluginSampleTrackInfo, type PluginSceneContext, type PluginSceneInfo, type PluginSettingsSchema, type PluginSettingsStore, type PluginSkill, type PluginSkillInputSchema, type PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn,
|
|
1405
|
+
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, type ExportMidiBundleOptions, type ExportMidiBundleResult, type ExportedPluginData, FX_CATEGORIES, FX_CHAIN_ORDER, FX_DISPLAY_LABELS, FX_ENGINE_PLUGIN_NAMES, FX_PRESET_CONFIGS, type FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAppTool, type PluginAppToolInputSchema, type PluginAppToolResult, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, type PluginDownloadOptions, PluginError, type PluginErrorCode, type PluginFileDialogOptions, type PluginFxCategoryDetailState, type PluginGenerationContext, type PluginHost, type PluginHttpRequestOptions, type PluginHttpResponse, type PluginManifest, type PluginMidiNote, type PluginPresetData, type PluginPresetInfo, type PluginRegistration, type PluginSampleFilter, type PluginSampleImportResult, type PluginSampleInfo, type PluginSampleTrackInfo, type PluginSceneContext, type PluginSceneInfo, type PluginSettingsSchema, type PluginSettingsStore, type PluginSkill, type PluginSkillInputSchema, type PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
package/dist/index.d.ts
CHANGED
|
@@ -163,6 +163,19 @@ interface PluginHost {
|
|
|
163
163
|
shufflePreset(trackId: string): Promise<ShufflePresetResult>;
|
|
164
164
|
/** Duplicate track: copy MIDI + role to a new track with a different preset. Only works on owned tracks. */
|
|
165
165
|
duplicateTrack(trackId: string): Promise<PluginTrackHandle>;
|
|
166
|
+
/**
|
|
167
|
+
* Return the canonical list of valid role tokens that the host's
|
|
168
|
+
* classifier and UI understand. Plugins should use this list when
|
|
169
|
+
* building LLM prompts or validating role values before calling
|
|
170
|
+
* {@link setTrackRole}.
|
|
171
|
+
*
|
|
172
|
+
* The assistant owns the canonical taxonomy — plugins MUST NOT ship
|
|
173
|
+
* their own hardcoded list, which would drift from the host. Pair with
|
|
174
|
+
* {@link setTrackRole} to persist a classified role.
|
|
175
|
+
*
|
|
176
|
+
* @since SDK 2.0.0
|
|
177
|
+
*/
|
|
178
|
+
getValidRoles(): readonly string[];
|
|
166
179
|
/** Get detailed FX state for a track (enabled, preset, dry/wet per category). */
|
|
167
180
|
getTrackFxState(trackId: string): Promise<PluginTrackFxDetailState>;
|
|
168
181
|
/** Toggle an FX category on/off for a track. */
|
|
@@ -1327,13 +1340,6 @@ type SetSceneState<T> = (value: T | ((prev: T) => T)) => void;
|
|
|
1327
1340
|
type SetSceneStateForScene<T> = (sceneId: string, value: T | ((prev: T) => T)) => void;
|
|
1328
1341
|
declare function useSceneState<T>(activeSceneId: string | null, initialValue: T): [T, SetSceneState<T>, SetSceneStateForScene<T>];
|
|
1329
1342
|
|
|
1330
|
-
/**
|
|
1331
|
-
* Valid instrument roles for synth track generation.
|
|
1332
|
-
* Used in LLM prompts and preset selection.
|
|
1333
|
-
* Canonical source — imported by both plugin SDK and core services.
|
|
1334
|
-
*/
|
|
1335
|
-
declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
1336
|
-
|
|
1337
1343
|
/**
|
|
1338
1344
|
* Plugin SDK Version
|
|
1339
1345
|
*
|
|
@@ -1342,7 +1348,7 @@ declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
|
1342
1348
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
1343
1349
|
* during activation and marks incompatible plugins accordingly.
|
|
1344
1350
|
*/
|
|
1345
|
-
declare const PLUGIN_SDK_VERSION = "
|
|
1351
|
+
declare const PLUGIN_SDK_VERSION = "2.0.0";
|
|
1346
1352
|
|
|
1347
1353
|
/**
|
|
1348
1354
|
* FX Preset Definitions
|
|
@@ -1396,4 +1402,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1396
1402
|
*/
|
|
1397
1403
|
declare function dbToSlider(db: number): number;
|
|
1398
1404
|
|
|
1399
|
-
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, type ExportMidiBundleOptions, type ExportMidiBundleResult, type ExportedPluginData, FX_CATEGORIES, FX_CHAIN_ORDER, FX_DISPLAY_LABELS, FX_ENGINE_PLUGIN_NAMES, FX_PRESET_CONFIGS, type FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAppTool, type PluginAppToolInputSchema, type PluginAppToolResult, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, type PluginDownloadOptions, PluginError, type PluginErrorCode, type PluginFileDialogOptions, type PluginFxCategoryDetailState, type PluginGenerationContext, type PluginHost, type PluginHttpRequestOptions, type PluginHttpResponse, type PluginManifest, type PluginMidiNote, type PluginPresetData, type PluginPresetInfo, type PluginRegistration, type PluginSampleFilter, type PluginSampleImportResult, type PluginSampleInfo, type PluginSampleTrackInfo, type PluginSceneContext, type PluginSceneInfo, type PluginSettingsSchema, type PluginSettingsStore, type PluginSkill, type PluginSkillInputSchema, type PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn,
|
|
1405
|
+
export { type BulkAddPlaceholderTrack, type ComposeProgressEvent, type ComposeProgressListener, type ComposeSceneOptions, type ComposeSceneResult, type CreateTrackOptions, DB_MAX, DB_MIN, DEFAULT_FX_CATEGORY_DETAIL, DEFAULT_FX_DRY_WET, type DeckBoundaryEvent, type DeckBoundaryListener, EMPTY_FX_DETAIL_STATE, EMPTY_FX_STATE, type ExportMidiBundleOptions, type ExportMidiBundleResult, type ExportedPluginData, FX_CATEGORIES, FX_CHAIN_ORDER, FX_DISPLAY_LABELS, FX_ENGINE_PLUGIN_NAMES, FX_PRESET_CONFIGS, type FxCategory, type FxCategoryDetailState, type FxPreset, type FxPresetConfig, type FxPresetData, type FxPresetDataEntry, FxToggleBar, type FxToggleBarProps, type GeneratorPlugin, type GeneratorType, type InstrumentDescriptor, InstrumentDrawer, type InstrumentDrawerProps, type LLMGenerationRequest, type LLMGenerationResult, type MidiClipData, type MidiWriteResult, type MixInterpolation, type MusicalContext, PLUGIN_SDK_VERSION, PanSlider, type PluginAppTool, type PluginAppToolInputSchema, type PluginAppToolResult, type PluginAudioTextureRequest, type PluginAudioTextureResult, type PluginCapabilities, type PluginChordSegment, type PluginChordTiming, type PluginConcurrentTrackInfo, type PluginDownloadOptions, PluginError, type PluginErrorCode, type PluginFileDialogOptions, type PluginFxCategoryDetailState, type PluginGenerationContext, type PluginHost, type PluginHttpRequestOptions, type PluginHttpResponse, type PluginManifest, type PluginMidiNote, type PluginPresetData, type PluginPresetInfo, type PluginRegistration, type PluginSampleFilter, type PluginSampleImportResult, type PluginSampleInfo, type PluginSampleTrackInfo, type PluginSceneContext, type PluginSceneInfo, type PluginSettingsSchema, type PluginSettingsStore, type PluginSkill, type PluginSkillInputSchema, type PluginStatus, type PluginStemSplitResult, type PluginStemTrackInfo, type PluginSynthInfo, type PluginTrackFxDetailState, type PluginTrackHandle, type PluginTrackInfo, type PluginTrackRuntimeState, type PluginTransportState, type PluginUIProps, type PostProcessOptions, type SDKTrackRowProps, SLIDER_UNITY, type SavePluginPresetOptions, type SceneChangeListener, type SettingDefinition, type ShufflePresetResult, SorceryProgressBar, type StemType, type TrackFxDetailState, type TrackFxState, TrackRow, type TrackStateChangeListener, type TransportEvent, type TransportEventListener, type UnsubscribeFn, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
package/dist/index.js
CHANGED
|
@@ -39,7 +39,6 @@ __export(index_exports, {
|
|
|
39
39
|
SLIDER_UNITY: () => SLIDER_UNITY,
|
|
40
40
|
SorceryProgressBar: () => SorceryProgressBar,
|
|
41
41
|
TrackRow: () => TrackRow,
|
|
42
|
-
VALID_INSTRUMENT_ROLES: () => VALID_INSTRUMENT_ROLES,
|
|
43
42
|
VolumeSlider: () => VolumeSlider,
|
|
44
43
|
calculateTimeBasedTarget: () => calculateTimeBasedTarget,
|
|
45
44
|
dbToSlider: () => dbToSlider,
|
|
@@ -1293,37 +1292,8 @@ function useSceneState(activeSceneId, initialValue) {
|
|
|
1293
1292
|
return [currentValue, setForCurrentScene, setForScene];
|
|
1294
1293
|
}
|
|
1295
1294
|
|
|
1296
|
-
// src/constants/instrument-roles.ts
|
|
1297
|
-
var VALID_INSTRUMENT_ROLES = [
|
|
1298
|
-
"bass",
|
|
1299
|
-
"kick",
|
|
1300
|
-
"snare",
|
|
1301
|
-
"hat",
|
|
1302
|
-
"808",
|
|
1303
|
-
"percussion",
|
|
1304
|
-
"lead",
|
|
1305
|
-
"pad",
|
|
1306
|
-
"keys",
|
|
1307
|
-
"piano",
|
|
1308
|
-
"organ",
|
|
1309
|
-
"pluck",
|
|
1310
|
-
"strings",
|
|
1311
|
-
"brass",
|
|
1312
|
-
"winds",
|
|
1313
|
-
"bell",
|
|
1314
|
-
"mallet",
|
|
1315
|
-
"guitar",
|
|
1316
|
-
"synth",
|
|
1317
|
-
"atmosphere",
|
|
1318
|
-
"drone",
|
|
1319
|
-
"rhythm",
|
|
1320
|
-
"soundscape",
|
|
1321
|
-
"vocal",
|
|
1322
|
-
"fx"
|
|
1323
|
-
];
|
|
1324
|
-
|
|
1325
1295
|
// src/constants/sdk-version.ts
|
|
1326
|
-
var PLUGIN_SDK_VERSION = "
|
|
1296
|
+
var PLUGIN_SDK_VERSION = "2.0.0";
|
|
1327
1297
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1328
1298
|
0 && (module.exports = {
|
|
1329
1299
|
DB_MAX,
|
|
@@ -1345,7 +1315,6 @@ var PLUGIN_SDK_VERSION = "1.2.0";
|
|
|
1345
1315
|
SLIDER_UNITY,
|
|
1346
1316
|
SorceryProgressBar,
|
|
1347
1317
|
TrackRow,
|
|
1348
|
-
VALID_INSTRUMENT_ROLES,
|
|
1349
1318
|
VolumeSlider,
|
|
1350
1319
|
calculateTimeBasedTarget,
|
|
1351
1320
|
dbToSlider,
|