@signalsandsorcery/plugin-sdk 1.2.3 → 1.3.2
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/README.md +18 -0
- package/dist/index.d.mts +137 -2
- package/dist/index.d.ts +137 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Plugin SDK for building custom generator plugins for [Signals & Sorcery](https://signalsandsorcery.com) — an AI-powered music production workstation.
|
|
4
4
|
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="assets/signals-and-sorcery.png" alt="Signals & Sorcery" width="420" />
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
> Part of the **[Signals & Sorcery](https://signalsandsorcery.com)** ecosystem.
|
|
10
|
+
|
|
5
11
|
Plugins extend the Loop Workstation with custom input generators that create MIDI patterns, manage audio samples, generate AI audio textures, or combine all three. Each plugin gets its own accordion section in the workstation UI and a scoped `PluginHost` API for interacting with tracks, MIDI, audio, and more.
|
|
6
12
|
|
|
7
13
|
## Installation
|
|
@@ -363,6 +369,18 @@ All errors are `PluginError` instances with a typed `code` property:
|
|
|
363
369
|
- **Secret isolation** — Each plugin's secrets are encrypted and scoped per plugin
|
|
364
370
|
- **Track limits** — 16 tracks per plugin per scene (configurable)
|
|
365
371
|
|
|
372
|
+
## The Signals & Sorcery Ecosystem
|
|
373
|
+
|
|
374
|
+
- **[Signals & Sorcery](https://signalsandsorcery.com)** — the flagship AI music production workstation
|
|
375
|
+
- **[sas-synth-plugin](https://github.com/shiehn/sas-synth-plugin)** — AI MIDI generation with Surge XT
|
|
376
|
+
- **[sas-sample-plugin](https://github.com/shiehn/sas-sample-plugin)** — Sample library browser with time-stretching
|
|
377
|
+
- **[sas-audio-plugin](https://github.com/shiehn/sas-audio-plugin)** — AI audio texture generation
|
|
378
|
+
- **[DeclarAgent](https://github.com/shiehn/DeclarAgent)** — Declarative agent + MCP transport for S&S
|
|
379
|
+
|
|
380
|
+
<p align="center">
|
|
381
|
+
<a href="https://signalsandsorcery.com">signalsandsorcery.com</a>
|
|
382
|
+
</p>
|
|
383
|
+
|
|
366
384
|
## License
|
|
367
385
|
|
|
368
386
|
MIT
|
package/dist/index.d.mts
CHANGED
|
@@ -183,6 +183,27 @@ interface PluginHost {
|
|
|
183
183
|
postProcessMidi(notes: PluginMidiNote[], options: PostProcessOptions): Promise<PluginMidiNote[]>;
|
|
184
184
|
/** Place an audio file on a track this plugin owns. */
|
|
185
185
|
writeAudioClip(trackId: string, filePath: string, position?: number): Promise<void>;
|
|
186
|
+
/**
|
|
187
|
+
* Render a single track to a temporary WAV file and return its path.
|
|
188
|
+
* Only works on owned tracks. For MIDI/synth tracks the host mutes siblings
|
|
189
|
+
* and renders the scene. For single-clip audio tracks the host MAY take a
|
|
190
|
+
* copy-source fast path.
|
|
191
|
+
* @since SDK 1.2.0
|
|
192
|
+
*/
|
|
193
|
+
exportTrackAudio?(trackId: string): Promise<ExportTrackAudioResult>;
|
|
194
|
+
/**
|
|
195
|
+
* Run a chain of audio operations on an input WAV via the bundled
|
|
196
|
+
* sas-audio-processor binary. Unsupported ops throw NOT_IMPLEMENTED.
|
|
197
|
+
* @since SDK 1.2.0
|
|
198
|
+
*/
|
|
199
|
+
processAudio?(inputPath: string, operations: AudioProcessingOp[]): Promise<ProcessAudioResult>;
|
|
200
|
+
/**
|
|
201
|
+
* Replace a track's audio content. For audio tracks, clears clips and
|
|
202
|
+
* adds the new audio. For MIDI/synth tracks, the original row is stashed
|
|
203
|
+
* in plugin_data and a new audio_tracks row is inserted (MIDI is lost).
|
|
204
|
+
* @since SDK 1.2.0
|
|
205
|
+
*/
|
|
206
|
+
replaceTrackAudio?(trackId: string, audioPath: string): Promise<void>;
|
|
186
207
|
/** Load a VST3/AU plugin onto a track this plugin owns. */
|
|
187
208
|
loadSynthPlugin(trackId: string, pluginName: string): Promise<number>;
|
|
188
209
|
/** Set plugin state (base64-encoded preset data). */
|
|
@@ -225,6 +246,31 @@ interface PluginHost {
|
|
|
225
246
|
generateWithLLM(request: LLMGenerationRequest): Promise<LLMGenerationResult>;
|
|
226
247
|
/** Check if LLM access is available (user authenticated + gateway reachable). */
|
|
227
248
|
isLLMAvailable(): Promise<boolean>;
|
|
249
|
+
/**
|
|
250
|
+
* List the host's registered app tools. Used by plugins (e.g. the chat
|
|
251
|
+
* panel) that want to expose the same surface external AI agents have.
|
|
252
|
+
*
|
|
253
|
+
* `opts.scope` filters by scope tag — scene-scoped consumers pass
|
|
254
|
+
* `'scene'` to hide project-level tools they shouldn't call. When omitted,
|
|
255
|
+
* every tool regardless of scope is returned.
|
|
256
|
+
*
|
|
257
|
+
* @since SDK 1.2.0
|
|
258
|
+
*/
|
|
259
|
+
listAppTools(opts?: {
|
|
260
|
+
scope?: 'scene' | 'project';
|
|
261
|
+
}): Promise<PluginAppTool[]>;
|
|
262
|
+
/**
|
|
263
|
+
* Execute a host app tool by name. Delegates to the in-process
|
|
264
|
+
* ToolRegistry — every mutation broadcasts to the UI automatically.
|
|
265
|
+
*
|
|
266
|
+
* For scene-scoped tools tagged with `autoBindSceneId`, the host
|
|
267
|
+
* overrides the caller's `sceneId` param with the currently-active
|
|
268
|
+
* scene. That keeps a scene-bound caller from accidentally targeting
|
|
269
|
+
* another scene.
|
|
270
|
+
*
|
|
271
|
+
* @since SDK 1.2.0
|
|
272
|
+
*/
|
|
273
|
+
executeAppTool(name: string, params: Record<string, unknown>): Promise<PluginAppToolResult>;
|
|
228
274
|
/** Get available preset categories for a synth plugin. */
|
|
229
275
|
getPresetCategories(pluginName: string): Promise<string[]>;
|
|
230
276
|
/** Get a random preset from a category. */
|
|
@@ -477,6 +523,69 @@ type ExportMidiBundleResult = {
|
|
|
477
523
|
canceled?: false;
|
|
478
524
|
error: string;
|
|
479
525
|
};
|
|
526
|
+
/** @since SDK 1.2.0 */
|
|
527
|
+
interface ExportTrackAudioResult {
|
|
528
|
+
path: string;
|
|
529
|
+
bpm: number;
|
|
530
|
+
durationMs: number;
|
|
531
|
+
fromCopyFastPath?: boolean;
|
|
532
|
+
}
|
|
533
|
+
/** @since SDK 1.2.0 */
|
|
534
|
+
interface ProcessAudioResult {
|
|
535
|
+
outputPath: string;
|
|
536
|
+
}
|
|
537
|
+
/** @since SDK 1.2.0 */
|
|
538
|
+
type AudioProcessingOp = {
|
|
539
|
+
tool: 'normalize';
|
|
540
|
+
} | {
|
|
541
|
+
tool: 'compress';
|
|
542
|
+
params?: {
|
|
543
|
+
threshold?: number;
|
|
544
|
+
ratio?: number;
|
|
545
|
+
};
|
|
546
|
+
} | {
|
|
547
|
+
tool: 'eq';
|
|
548
|
+
params?: {
|
|
549
|
+
low_gain?: number;
|
|
550
|
+
mid_gain?: number;
|
|
551
|
+
high_gain?: number;
|
|
552
|
+
};
|
|
553
|
+
} | {
|
|
554
|
+
tool: 'reverb';
|
|
555
|
+
params?: {
|
|
556
|
+
room_size?: number;
|
|
557
|
+
dry_wet?: number;
|
|
558
|
+
};
|
|
559
|
+
} | {
|
|
560
|
+
tool: 'pitch-shift';
|
|
561
|
+
params: {
|
|
562
|
+
semitones: number;
|
|
563
|
+
};
|
|
564
|
+
} | {
|
|
565
|
+
tool: 'time-stretch';
|
|
566
|
+
params: {
|
|
567
|
+
target_bpm: number;
|
|
568
|
+
};
|
|
569
|
+
} | {
|
|
570
|
+
tool: 'filter';
|
|
571
|
+
params: {
|
|
572
|
+
type: 'lowpass' | 'highpass';
|
|
573
|
+
cutoff: number;
|
|
574
|
+
};
|
|
575
|
+
} | {
|
|
576
|
+
tool: 'gain';
|
|
577
|
+
params: {
|
|
578
|
+
db: number;
|
|
579
|
+
};
|
|
580
|
+
} | {
|
|
581
|
+
tool: 'limit';
|
|
582
|
+
} | {
|
|
583
|
+
tool: 'trim';
|
|
584
|
+
params?: {
|
|
585
|
+
start?: number;
|
|
586
|
+
end?: number;
|
|
587
|
+
};
|
|
588
|
+
};
|
|
480
589
|
interface PostProcessOptions {
|
|
481
590
|
/** Snap notes to grid (default: true) */
|
|
482
591
|
quantize?: boolean;
|
|
@@ -811,6 +920,32 @@ interface SavePluginPresetOptions {
|
|
|
811
920
|
category?: string;
|
|
812
921
|
data: Record<string, unknown>;
|
|
813
922
|
}
|
|
923
|
+
/** JSON Schema shape for a tool's input params. */
|
|
924
|
+
interface PluginAppToolInputSchema {
|
|
925
|
+
type: 'object';
|
|
926
|
+
properties?: Record<string, unknown>;
|
|
927
|
+
required?: string[];
|
|
928
|
+
}
|
|
929
|
+
/** Lightweight descriptor returned by `PluginHost.listAppTools`. */
|
|
930
|
+
interface PluginAppTool {
|
|
931
|
+
name: string;
|
|
932
|
+
description: string;
|
|
933
|
+
inputSchema: PluginAppToolInputSchema;
|
|
934
|
+
/** `'scene'` = safe for scene-scoped callers. `'project'` = cross-scene. */
|
|
935
|
+
scope?: 'scene' | 'project';
|
|
936
|
+
}
|
|
937
|
+
/** Result shape returned by `PluginHost.executeAppTool`. */
|
|
938
|
+
interface PluginAppToolResult {
|
|
939
|
+
success: boolean;
|
|
940
|
+
action: string;
|
|
941
|
+
message?: string;
|
|
942
|
+
error?: string;
|
|
943
|
+
/**
|
|
944
|
+
* Tool-specific payload. Concrete shape depends on the tool — callers
|
|
945
|
+
* should treat this as opaque unless they know the tool.
|
|
946
|
+
*/
|
|
947
|
+
data?: unknown;
|
|
948
|
+
}
|
|
814
949
|
type PluginStatus = 'pending' | 'active' | 'failed' | 'disabled' | 'incompatible';
|
|
815
950
|
interface PluginRegistration {
|
|
816
951
|
/** The loaded plugin instance */
|
|
@@ -1193,7 +1328,7 @@ declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
|
1193
1328
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
1194
1329
|
* during activation and marks incompatible plugins accordingly.
|
|
1195
1330
|
*/
|
|
1196
|
-
declare const PLUGIN_SDK_VERSION = "1.
|
|
1331
|
+
declare const PLUGIN_SDK_VERSION = "1.2.0";
|
|
1197
1332
|
|
|
1198
1333
|
/**
|
|
1199
1334
|
* FX Preset Definitions
|
|
@@ -1247,4 +1382,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1247
1382
|
*/
|
|
1248
1383
|
declare function dbToSlider(db: number): number;
|
|
1249
1384
|
|
|
1250
|
-
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 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, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
|
1385
|
+
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, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
package/dist/index.d.ts
CHANGED
|
@@ -183,6 +183,27 @@ interface PluginHost {
|
|
|
183
183
|
postProcessMidi(notes: PluginMidiNote[], options: PostProcessOptions): Promise<PluginMidiNote[]>;
|
|
184
184
|
/** Place an audio file on a track this plugin owns. */
|
|
185
185
|
writeAudioClip(trackId: string, filePath: string, position?: number): Promise<void>;
|
|
186
|
+
/**
|
|
187
|
+
* Render a single track to a temporary WAV file and return its path.
|
|
188
|
+
* Only works on owned tracks. For MIDI/synth tracks the host mutes siblings
|
|
189
|
+
* and renders the scene. For single-clip audio tracks the host MAY take a
|
|
190
|
+
* copy-source fast path.
|
|
191
|
+
* @since SDK 1.2.0
|
|
192
|
+
*/
|
|
193
|
+
exportTrackAudio?(trackId: string): Promise<ExportTrackAudioResult>;
|
|
194
|
+
/**
|
|
195
|
+
* Run a chain of audio operations on an input WAV via the bundled
|
|
196
|
+
* sas-audio-processor binary. Unsupported ops throw NOT_IMPLEMENTED.
|
|
197
|
+
* @since SDK 1.2.0
|
|
198
|
+
*/
|
|
199
|
+
processAudio?(inputPath: string, operations: AudioProcessingOp[]): Promise<ProcessAudioResult>;
|
|
200
|
+
/**
|
|
201
|
+
* Replace a track's audio content. For audio tracks, clears clips and
|
|
202
|
+
* adds the new audio. For MIDI/synth tracks, the original row is stashed
|
|
203
|
+
* in plugin_data and a new audio_tracks row is inserted (MIDI is lost).
|
|
204
|
+
* @since SDK 1.2.0
|
|
205
|
+
*/
|
|
206
|
+
replaceTrackAudio?(trackId: string, audioPath: string): Promise<void>;
|
|
186
207
|
/** Load a VST3/AU plugin onto a track this plugin owns. */
|
|
187
208
|
loadSynthPlugin(trackId: string, pluginName: string): Promise<number>;
|
|
188
209
|
/** Set plugin state (base64-encoded preset data). */
|
|
@@ -225,6 +246,31 @@ interface PluginHost {
|
|
|
225
246
|
generateWithLLM(request: LLMGenerationRequest): Promise<LLMGenerationResult>;
|
|
226
247
|
/** Check if LLM access is available (user authenticated + gateway reachable). */
|
|
227
248
|
isLLMAvailable(): Promise<boolean>;
|
|
249
|
+
/**
|
|
250
|
+
* List the host's registered app tools. Used by plugins (e.g. the chat
|
|
251
|
+
* panel) that want to expose the same surface external AI agents have.
|
|
252
|
+
*
|
|
253
|
+
* `opts.scope` filters by scope tag — scene-scoped consumers pass
|
|
254
|
+
* `'scene'` to hide project-level tools they shouldn't call. When omitted,
|
|
255
|
+
* every tool regardless of scope is returned.
|
|
256
|
+
*
|
|
257
|
+
* @since SDK 1.2.0
|
|
258
|
+
*/
|
|
259
|
+
listAppTools(opts?: {
|
|
260
|
+
scope?: 'scene' | 'project';
|
|
261
|
+
}): Promise<PluginAppTool[]>;
|
|
262
|
+
/**
|
|
263
|
+
* Execute a host app tool by name. Delegates to the in-process
|
|
264
|
+
* ToolRegistry — every mutation broadcasts to the UI automatically.
|
|
265
|
+
*
|
|
266
|
+
* For scene-scoped tools tagged with `autoBindSceneId`, the host
|
|
267
|
+
* overrides the caller's `sceneId` param with the currently-active
|
|
268
|
+
* scene. That keeps a scene-bound caller from accidentally targeting
|
|
269
|
+
* another scene.
|
|
270
|
+
*
|
|
271
|
+
* @since SDK 1.2.0
|
|
272
|
+
*/
|
|
273
|
+
executeAppTool(name: string, params: Record<string, unknown>): Promise<PluginAppToolResult>;
|
|
228
274
|
/** Get available preset categories for a synth plugin. */
|
|
229
275
|
getPresetCategories(pluginName: string): Promise<string[]>;
|
|
230
276
|
/** Get a random preset from a category. */
|
|
@@ -477,6 +523,69 @@ type ExportMidiBundleResult = {
|
|
|
477
523
|
canceled?: false;
|
|
478
524
|
error: string;
|
|
479
525
|
};
|
|
526
|
+
/** @since SDK 1.2.0 */
|
|
527
|
+
interface ExportTrackAudioResult {
|
|
528
|
+
path: string;
|
|
529
|
+
bpm: number;
|
|
530
|
+
durationMs: number;
|
|
531
|
+
fromCopyFastPath?: boolean;
|
|
532
|
+
}
|
|
533
|
+
/** @since SDK 1.2.0 */
|
|
534
|
+
interface ProcessAudioResult {
|
|
535
|
+
outputPath: string;
|
|
536
|
+
}
|
|
537
|
+
/** @since SDK 1.2.0 */
|
|
538
|
+
type AudioProcessingOp = {
|
|
539
|
+
tool: 'normalize';
|
|
540
|
+
} | {
|
|
541
|
+
tool: 'compress';
|
|
542
|
+
params?: {
|
|
543
|
+
threshold?: number;
|
|
544
|
+
ratio?: number;
|
|
545
|
+
};
|
|
546
|
+
} | {
|
|
547
|
+
tool: 'eq';
|
|
548
|
+
params?: {
|
|
549
|
+
low_gain?: number;
|
|
550
|
+
mid_gain?: number;
|
|
551
|
+
high_gain?: number;
|
|
552
|
+
};
|
|
553
|
+
} | {
|
|
554
|
+
tool: 'reverb';
|
|
555
|
+
params?: {
|
|
556
|
+
room_size?: number;
|
|
557
|
+
dry_wet?: number;
|
|
558
|
+
};
|
|
559
|
+
} | {
|
|
560
|
+
tool: 'pitch-shift';
|
|
561
|
+
params: {
|
|
562
|
+
semitones: number;
|
|
563
|
+
};
|
|
564
|
+
} | {
|
|
565
|
+
tool: 'time-stretch';
|
|
566
|
+
params: {
|
|
567
|
+
target_bpm: number;
|
|
568
|
+
};
|
|
569
|
+
} | {
|
|
570
|
+
tool: 'filter';
|
|
571
|
+
params: {
|
|
572
|
+
type: 'lowpass' | 'highpass';
|
|
573
|
+
cutoff: number;
|
|
574
|
+
};
|
|
575
|
+
} | {
|
|
576
|
+
tool: 'gain';
|
|
577
|
+
params: {
|
|
578
|
+
db: number;
|
|
579
|
+
};
|
|
580
|
+
} | {
|
|
581
|
+
tool: 'limit';
|
|
582
|
+
} | {
|
|
583
|
+
tool: 'trim';
|
|
584
|
+
params?: {
|
|
585
|
+
start?: number;
|
|
586
|
+
end?: number;
|
|
587
|
+
};
|
|
588
|
+
};
|
|
480
589
|
interface PostProcessOptions {
|
|
481
590
|
/** Snap notes to grid (default: true) */
|
|
482
591
|
quantize?: boolean;
|
|
@@ -811,6 +920,32 @@ interface SavePluginPresetOptions {
|
|
|
811
920
|
category?: string;
|
|
812
921
|
data: Record<string, unknown>;
|
|
813
922
|
}
|
|
923
|
+
/** JSON Schema shape for a tool's input params. */
|
|
924
|
+
interface PluginAppToolInputSchema {
|
|
925
|
+
type: 'object';
|
|
926
|
+
properties?: Record<string, unknown>;
|
|
927
|
+
required?: string[];
|
|
928
|
+
}
|
|
929
|
+
/** Lightweight descriptor returned by `PluginHost.listAppTools`. */
|
|
930
|
+
interface PluginAppTool {
|
|
931
|
+
name: string;
|
|
932
|
+
description: string;
|
|
933
|
+
inputSchema: PluginAppToolInputSchema;
|
|
934
|
+
/** `'scene'` = safe for scene-scoped callers. `'project'` = cross-scene. */
|
|
935
|
+
scope?: 'scene' | 'project';
|
|
936
|
+
}
|
|
937
|
+
/** Result shape returned by `PluginHost.executeAppTool`. */
|
|
938
|
+
interface PluginAppToolResult {
|
|
939
|
+
success: boolean;
|
|
940
|
+
action: string;
|
|
941
|
+
message?: string;
|
|
942
|
+
error?: string;
|
|
943
|
+
/**
|
|
944
|
+
* Tool-specific payload. Concrete shape depends on the tool — callers
|
|
945
|
+
* should treat this as opaque unless they know the tool.
|
|
946
|
+
*/
|
|
947
|
+
data?: unknown;
|
|
948
|
+
}
|
|
814
949
|
type PluginStatus = 'pending' | 'active' | 'failed' | 'disabled' | 'incompatible';
|
|
815
950
|
interface PluginRegistration {
|
|
816
951
|
/** The loaded plugin instance */
|
|
@@ -1193,7 +1328,7 @@ declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
|
1193
1328
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
1194
1329
|
* during activation and marks incompatible plugins accordingly.
|
|
1195
1330
|
*/
|
|
1196
|
-
declare const PLUGIN_SDK_VERSION = "1.
|
|
1331
|
+
declare const PLUGIN_SDK_VERSION = "1.2.0";
|
|
1197
1332
|
|
|
1198
1333
|
/**
|
|
1199
1334
|
* FX Preset Definitions
|
|
@@ -1247,4 +1382,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1247
1382
|
*/
|
|
1248
1383
|
declare function dbToSlider(db: number): number;
|
|
1249
1384
|
|
|
1250
|
-
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 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, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
|
1385
|
+
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, VALID_INSTRUMENT_ROLES, VolumeSlider, calculateTimeBasedTarget, dbToSlider, sliderToDb, useSceneState };
|
package/dist/index.js
CHANGED
|
@@ -1323,7 +1323,7 @@ var VALID_INSTRUMENT_ROLES = [
|
|
|
1323
1323
|
];
|
|
1324
1324
|
|
|
1325
1325
|
// src/constants/sdk-version.ts
|
|
1326
|
-
var PLUGIN_SDK_VERSION = "1.
|
|
1326
|
+
var PLUGIN_SDK_VERSION = "1.2.0";
|
|
1327
1327
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1328
1328
|
0 && (module.exports = {
|
|
1329
1329
|
DB_MAX,
|