@signalsandsorcery/plugin-sdk 1.2.2 → 1.3.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 +164 -2
- package/dist/index.d.ts +164 -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/dist/index.d.mts
CHANGED
|
@@ -70,6 +70,33 @@ interface GeneratorPlugin {
|
|
|
70
70
|
* (chords updated, tracks added/removed, BPM changed).
|
|
71
71
|
*/
|
|
72
72
|
onContextChanged?(context: MusicalContext): void;
|
|
73
|
+
/**
|
|
74
|
+
* Optional: Declare LLM-callable skills this plugin provides.
|
|
75
|
+
* Skills are registered as namespaced tools (plugin:<pluginId>:<skillId>)
|
|
76
|
+
* and become available to AI agents for orchestration.
|
|
77
|
+
*
|
|
78
|
+
* Example: the chat-panel plugin declares a `chat` skill so external
|
|
79
|
+
* agents (Claude Code, OpenClaw) can delegate scene-scoped natural
|
|
80
|
+
* language work to the in-app agent via a single call.
|
|
81
|
+
*/
|
|
82
|
+
getSkills?(): PluginSkill[];
|
|
83
|
+
}
|
|
84
|
+
/** An LLM-callable action declared by a plugin. */
|
|
85
|
+
interface PluginSkill {
|
|
86
|
+
/** Unique skill id within this plugin (e.g., 'chat', 'generate_bassline') */
|
|
87
|
+
id: string;
|
|
88
|
+
/** Human-readable description — drives LLM tool selection */
|
|
89
|
+
description: string;
|
|
90
|
+
/** JSON Schema for the skill's input parameters */
|
|
91
|
+
inputSchema: PluginSkillInputSchema;
|
|
92
|
+
/** Whether this skill only reads state (no mutations). Default: false */
|
|
93
|
+
isReadOnly?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** JSON Schema shape for skill input parameters. */
|
|
96
|
+
interface PluginSkillInputSchema {
|
|
97
|
+
type: 'object';
|
|
98
|
+
properties?: Record<string, unknown>;
|
|
99
|
+
required?: string[];
|
|
73
100
|
}
|
|
74
101
|
/** Props passed to every plugin's React component by the host */
|
|
75
102
|
interface PluginUIProps {
|
|
@@ -156,6 +183,27 @@ interface PluginHost {
|
|
|
156
183
|
postProcessMidi(notes: PluginMidiNote[], options: PostProcessOptions): Promise<PluginMidiNote[]>;
|
|
157
184
|
/** Place an audio file on a track this plugin owns. */
|
|
158
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>;
|
|
159
207
|
/** Load a VST3/AU plugin onto a track this plugin owns. */
|
|
160
208
|
loadSynthPlugin(trackId: string, pluginName: string): Promise<number>;
|
|
161
209
|
/** Set plugin state (base64-encoded preset data). */
|
|
@@ -198,6 +246,31 @@ interface PluginHost {
|
|
|
198
246
|
generateWithLLM(request: LLMGenerationRequest): Promise<LLMGenerationResult>;
|
|
199
247
|
/** Check if LLM access is available (user authenticated + gateway reachable). */
|
|
200
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>;
|
|
201
274
|
/** Get available preset categories for a synth plugin. */
|
|
202
275
|
getPresetCategories(pluginName: string): Promise<string[]>;
|
|
203
276
|
/** Get a random preset from a category. */
|
|
@@ -450,6 +523,69 @@ type ExportMidiBundleResult = {
|
|
|
450
523
|
canceled?: false;
|
|
451
524
|
error: string;
|
|
452
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
|
+
};
|
|
453
589
|
interface PostProcessOptions {
|
|
454
590
|
/** Snap notes to grid (default: true) */
|
|
455
591
|
quantize?: boolean;
|
|
@@ -784,6 +920,32 @@ interface SavePluginPresetOptions {
|
|
|
784
920
|
category?: string;
|
|
785
921
|
data: Record<string, unknown>;
|
|
786
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
|
+
}
|
|
787
949
|
type PluginStatus = 'pending' | 'active' | 'failed' | 'disabled' | 'incompatible';
|
|
788
950
|
interface PluginRegistration {
|
|
789
951
|
/** The loaded plugin instance */
|
|
@@ -1166,7 +1328,7 @@ declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
|
1166
1328
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
1167
1329
|
* during activation and marks incompatible plugins accordingly.
|
|
1168
1330
|
*/
|
|
1169
|
-
declare const PLUGIN_SDK_VERSION = "1.
|
|
1331
|
+
declare const PLUGIN_SDK_VERSION = "1.2.0";
|
|
1170
1332
|
|
|
1171
1333
|
/**
|
|
1172
1334
|
* FX Preset Definitions
|
|
@@ -1220,4 +1382,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1220
1382
|
*/
|
|
1221
1383
|
declare function dbToSlider(db: number): number;
|
|
1222
1384
|
|
|
1223
|
-
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 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
|
@@ -70,6 +70,33 @@ interface GeneratorPlugin {
|
|
|
70
70
|
* (chords updated, tracks added/removed, BPM changed).
|
|
71
71
|
*/
|
|
72
72
|
onContextChanged?(context: MusicalContext): void;
|
|
73
|
+
/**
|
|
74
|
+
* Optional: Declare LLM-callable skills this plugin provides.
|
|
75
|
+
* Skills are registered as namespaced tools (plugin:<pluginId>:<skillId>)
|
|
76
|
+
* and become available to AI agents for orchestration.
|
|
77
|
+
*
|
|
78
|
+
* Example: the chat-panel plugin declares a `chat` skill so external
|
|
79
|
+
* agents (Claude Code, OpenClaw) can delegate scene-scoped natural
|
|
80
|
+
* language work to the in-app agent via a single call.
|
|
81
|
+
*/
|
|
82
|
+
getSkills?(): PluginSkill[];
|
|
83
|
+
}
|
|
84
|
+
/** An LLM-callable action declared by a plugin. */
|
|
85
|
+
interface PluginSkill {
|
|
86
|
+
/** Unique skill id within this plugin (e.g., 'chat', 'generate_bassline') */
|
|
87
|
+
id: string;
|
|
88
|
+
/** Human-readable description — drives LLM tool selection */
|
|
89
|
+
description: string;
|
|
90
|
+
/** JSON Schema for the skill's input parameters */
|
|
91
|
+
inputSchema: PluginSkillInputSchema;
|
|
92
|
+
/** Whether this skill only reads state (no mutations). Default: false */
|
|
93
|
+
isReadOnly?: boolean;
|
|
94
|
+
}
|
|
95
|
+
/** JSON Schema shape for skill input parameters. */
|
|
96
|
+
interface PluginSkillInputSchema {
|
|
97
|
+
type: 'object';
|
|
98
|
+
properties?: Record<string, unknown>;
|
|
99
|
+
required?: string[];
|
|
73
100
|
}
|
|
74
101
|
/** Props passed to every plugin's React component by the host */
|
|
75
102
|
interface PluginUIProps {
|
|
@@ -156,6 +183,27 @@ interface PluginHost {
|
|
|
156
183
|
postProcessMidi(notes: PluginMidiNote[], options: PostProcessOptions): Promise<PluginMidiNote[]>;
|
|
157
184
|
/** Place an audio file on a track this plugin owns. */
|
|
158
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>;
|
|
159
207
|
/** Load a VST3/AU plugin onto a track this plugin owns. */
|
|
160
208
|
loadSynthPlugin(trackId: string, pluginName: string): Promise<number>;
|
|
161
209
|
/** Set plugin state (base64-encoded preset data). */
|
|
@@ -198,6 +246,31 @@ interface PluginHost {
|
|
|
198
246
|
generateWithLLM(request: LLMGenerationRequest): Promise<LLMGenerationResult>;
|
|
199
247
|
/** Check if LLM access is available (user authenticated + gateway reachable). */
|
|
200
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>;
|
|
201
274
|
/** Get available preset categories for a synth plugin. */
|
|
202
275
|
getPresetCategories(pluginName: string): Promise<string[]>;
|
|
203
276
|
/** Get a random preset from a category. */
|
|
@@ -450,6 +523,69 @@ type ExportMidiBundleResult = {
|
|
|
450
523
|
canceled?: false;
|
|
451
524
|
error: string;
|
|
452
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
|
+
};
|
|
453
589
|
interface PostProcessOptions {
|
|
454
590
|
/** Snap notes to grid (default: true) */
|
|
455
591
|
quantize?: boolean;
|
|
@@ -784,6 +920,32 @@ interface SavePluginPresetOptions {
|
|
|
784
920
|
category?: string;
|
|
785
921
|
data: Record<string, unknown>;
|
|
786
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
|
+
}
|
|
787
949
|
type PluginStatus = 'pending' | 'active' | 'failed' | 'disabled' | 'incompatible';
|
|
788
950
|
interface PluginRegistration {
|
|
789
951
|
/** The loaded plugin instance */
|
|
@@ -1166,7 +1328,7 @@ declare const VALID_INSTRUMENT_ROLES: readonly string[];
|
|
|
1166
1328
|
* Registry checks semver.gte(PLUGIN_SDK_VERSION, manifest.minHostVersion)
|
|
1167
1329
|
* during activation and marks incompatible plugins accordingly.
|
|
1168
1330
|
*/
|
|
1169
|
-
declare const PLUGIN_SDK_VERSION = "1.
|
|
1331
|
+
declare const PLUGIN_SDK_VERSION = "1.2.0";
|
|
1170
1332
|
|
|
1171
1333
|
/**
|
|
1172
1334
|
* FX Preset Definitions
|
|
@@ -1220,4 +1382,4 @@ declare function sliderToDb(slider: number): number;
|
|
|
1220
1382
|
*/
|
|
1221
1383
|
declare function dbToSlider(db: number): number;
|
|
1222
1384
|
|
|
1223
|
-
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 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,
|