@elizaos/plugin-suno 0.1.9

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.
@@ -0,0 +1,23 @@
1
+
2
+ 
3
+ > @elizaos/plugin-suno@0.1.9 build /Users/Shakker/WorkSpace/ShakkerNerd/ai16z/eliza/packages/plugin-suno
4
+ > tsup
5
+
6
+ CLI Building entry: src/index.ts
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v7.3.0
9
+ CLI Using tsup config: /Users/Shakker/WorkSpace/ShakkerNerd/ai16z/eliza/packages/plugin-suno/tsup.config.ts
10
+ CLI Target: es2020
11
+ CLI Cleaning output folder
12
+ CJS Build start
13
+ ESM Build start
14
+ CJS dist/index.js 12.09 KB
15
+ CJS dist/index.js.map 24.46 KB
16
+ CJS ⚡️ Build success in 17ms
17
+ ESM dist/index.mjs 11.00 KB
18
+ ESM dist/index.mjs.map 24.40 KB
19
+ ESM ⚡️ Build success in 18ms
20
+ DTS Build start
21
+ DTS ⚡️ Build success in 1587ms
22
+ DTS dist/index.d.ts 878.00 B
23
+ DTS dist/index.d.mts 878.00 B
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Shaw Walters, aka Moon aka @lalalune
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,207 @@
1
+ @elizaos/plugin-suno
2
+
3
+ A Suno AI music generation plugin for ElizaOS that enables AI-powered music creation and audio manipulation.
4
+
5
+ OVERVIEW
6
+
7
+ The Suno plugin integrates Suno AI's powerful music generation capabilities into ElizaOS, providing a seamless way to:
8
+ - Generate music from text prompts with fine-tuned parameters
9
+ - Create custom music with advanced control over style, tempo, and key
10
+ - Extend existing audio tracks
11
+
12
+ Original Plugin: https://github.com/gcui-art/suno-api?tab=readme-ov-file
13
+
14
+ INSTALLATION
15
+
16
+ npm install @elizaos/plugin-suno
17
+
18
+ QUICK START
19
+
20
+ 1. Register the plugin with ElizaOS:
21
+
22
+ import { sunoPlugin } from '@elizaos/plugin-suno';
23
+ import { Eliza } from '@elizaos/core';
24
+
25
+ const eliza = new Eliza();
26
+ eliza.registerPlugin(sunoPlugin);
27
+
28
+ 2. Configure the Suno provider with your API credentials:
29
+
30
+ import { sunoProvider } from '@elizaos/plugin-suno';
31
+
32
+ sunoProvider.configure({
33
+ apiKey: 'your-suno-api-key'
34
+ });
35
+
36
+ FEATURES
37
+
38
+ 1. Generate Music (suno.generate-music)
39
+ Generate music using a text prompt with basic control parameters. This is ideal for quick music generation when you need less fine-grained control:
40
+
41
+ - Simple text-to-music generation
42
+ - Consistent output quality with default parameters
43
+ - Suitable for most common use cases
44
+
45
+ await eliza.execute('suno.generate-music', {
46
+ prompt: "An upbeat electronic dance track with energetic beats",
47
+ duration: 30,
48
+ temperature: 1.0,
49
+ topK: 250,
50
+ topP: 0.95,
51
+ classifier_free_guidance: 3.0
52
+ });
53
+
54
+ 2. Custom Music Generation (suno.custom-generate-music)
55
+ Create music with detailed control over generation parameters. Perfect for when you need precise control over the musical output:
56
+
57
+ - Fine-grained control over musical style and structure
58
+ - Reference-based generation using existing audio
59
+ - Control over musical attributes:
60
+ * Style: Specify genres like "classical", "electronic", "rock"
61
+ * Tempo: Set exact BPM (beats per minute)
62
+ * Key and Mode: Define musical key (e.g., "C") and mode ("major"/"minor")
63
+ - Advanced parameter tuning for generation quality
64
+
65
+ await eliza.execute('suno.custom-generate-music', {
66
+ prompt: "A melodic piano piece with soft strings",
67
+ duration: 30,
68
+ temperature: 0.8,
69
+ topK: 250,
70
+ topP: 0.95,
71
+ classifier_free_guidance: 3.0,
72
+ reference_audio: "path/to/reference.mp3",
73
+ style: "classical",
74
+ bpm: 120,
75
+ key: "C",
76
+ mode: "major"
77
+ });
78
+
79
+ 3. Extend Audio (suno.extend-audio)
80
+ Extend existing audio tracks to create longer compositions. Useful for:
81
+
82
+ - Lengthening existing music pieces
83
+ - Creating seamless loops
84
+ - Generating variations of existing tracks
85
+
86
+ await eliza.execute('suno.extend-audio', {
87
+ audio_id: "your-audio-id",
88
+ duration: 60
89
+ });
90
+
91
+ Generation Parameters Explained:
92
+
93
+ - temperature: Controls randomness in generation (0.0-1.0+)
94
+ * Lower values (0.1-0.5): More conservative, consistent output
95
+ * Higher values (1.0+): More creative, varied output
96
+
97
+ - classifier_free_guidance: Controls how closely the output follows the prompt (1.0-20.0)
98
+ * Lower values: More creative interpretation
99
+ * Higher values: Stricter adherence to prompt
100
+
101
+ - topK/topP: Control the diversity of the generation
102
+ * topK: Limits the number of tokens considered
103
+ * topP: Controls the cumulative probability threshold
104
+
105
+ API REFERENCE
106
+
107
+ SunoProvider Configuration
108
+ The Suno provider accepts the following configuration options:
109
+
110
+ interface SunoConfig {
111
+ apiKey: string;
112
+ }
113
+
114
+ Action Parameters:
115
+
116
+ 1. Generate Music (suno.generate-music)
117
+ interface GenerateParams {
118
+ prompt: string;
119
+ duration?: number; // Duration in seconds
120
+ temperature?: number; // Controls randomness
121
+ topK?: number; // Top K sampling
122
+ topP?: number; // Top P sampling
123
+ classifier_free_guidance?: number; // Guidance scale
124
+ }
125
+
126
+ 2. Custom Generate Music (suno.custom-generate-music)
127
+ interface CustomGenerateParams {
128
+ prompt: string;
129
+ duration?: number;
130
+ temperature?: number;
131
+ topK?: number;
132
+ topP?: number;
133
+ classifier_free_guidance?: number;
134
+ reference_audio?: string; // Path to reference audio file
135
+ style?: string; // Musical style
136
+ bpm?: number; // Beats per minute
137
+ key?: string; // Musical key
138
+ mode?: string; // Musical mode (e.g., "major", "minor")
139
+ }
140
+
141
+ 3. Extend Audio (suno.extend-audio)
142
+ interface ExtendParams {
143
+ audio_id: string; // ID of the audio to extend
144
+ duration: number; // Additional duration in seconds
145
+ }
146
+
147
+ Response Type:
148
+ interface GenerationResponse {
149
+ id: string; // Generated audio ID
150
+ status: string; // Status of the generation
151
+ url?: string; // URL to download the generated audio
152
+ error?: string; // Error message if generation failed
153
+ }
154
+
155
+ ERROR HANDLING
156
+
157
+ The plugin includes built-in error handling for common scenarios:
158
+
159
+ try {
160
+ await eliza.execute('suno.generate', params);
161
+ } catch (error) {
162
+ if (error.code === 'SUNO_API_ERROR') {
163
+ // Handle API-specific errors
164
+ }
165
+ // Handle other errors
166
+ }
167
+
168
+ EXAMPLES
169
+
170
+ Creating a Pop Song:
171
+
172
+ const result = await eliza.execute('suno.generate-music', {
173
+ prompt: "Create a pop song with vocals, drums, and guitar",
174
+ duration: 180,
175
+ temperature: 1.0,
176
+ classifier_free_guidance: 3.5
177
+ });
178
+
179
+ Creating a Custom Classical Piece:
180
+
181
+ const result = await eliza.execute('suno.custom-generate-music', {
182
+ prompt: "A classical piano sonata in the style of Mozart",
183
+ duration: 120,
184
+ temperature: 0.8,
185
+ style: "classical",
186
+ bpm: 120,
187
+ key: "C",
188
+ mode: "major"
189
+ });
190
+
191
+ Extending an Existing Track:
192
+
193
+ const extended = await eliza.execute('suno.extend-audio', {
194
+ audio_id: "existing-track-id",
195
+ duration: 60
196
+ });
197
+
198
+ LICENSE
199
+
200
+ MIT
201
+
202
+ SUPPORT
203
+
204
+ For issues and feature requests, please open an issue on our GitHub repository.
205
+
206
+ ---
207
+ Built with ❤️ for ElizaOS
@@ -0,0 +1,26 @@
1
+ import { Action, Provider, IAgentRuntime, Memory, State, Plugin } from '@elizaos/core';
2
+
3
+ declare const generateMusic: Action;
4
+
5
+ declare const customGenerateMusic: Action;
6
+
7
+ declare const extendAudio: Action;
8
+
9
+ interface SunoConfig {
10
+ apiKey: string;
11
+ baseUrl?: string;
12
+ }
13
+ declare class SunoProvider implements Provider {
14
+ private apiKey;
15
+ private baseUrl;
16
+ static get(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<SunoProvider>;
17
+ constructor(config: SunoConfig);
18
+ get(_runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<{
19
+ status: string;
20
+ }>;
21
+ request(endpoint: string, options?: RequestInit): Promise<any>;
22
+ }
23
+
24
+ declare const sunoPlugin: Plugin;
25
+
26
+ export { customGenerateMusic as CustomGenerateMusic, extendAudio as ExtendAudio, generateMusic as GenerateMusic, SunoProvider, sunoPlugin as default, sunoPlugin };
@@ -0,0 +1,26 @@
1
+ import { Action, Provider, IAgentRuntime, Memory, State, Plugin } from '@elizaos/core';
2
+
3
+ declare const generateMusic: Action;
4
+
5
+ declare const customGenerateMusic: Action;
6
+
7
+ declare const extendAudio: Action;
8
+
9
+ interface SunoConfig {
10
+ apiKey: string;
11
+ baseUrl?: string;
12
+ }
13
+ declare class SunoProvider implements Provider {
14
+ private apiKey;
15
+ private baseUrl;
16
+ static get(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<SunoProvider>;
17
+ constructor(config: SunoConfig);
18
+ get(_runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<{
19
+ status: string;
20
+ }>;
21
+ request(endpoint: string, options?: RequestInit): Promise<any>;
22
+ }
23
+
24
+ declare const sunoPlugin: Plugin;
25
+
26
+ export { customGenerateMusic as CustomGenerateMusic, extendAudio as ExtendAudio, generateMusic as GenerateMusic, SunoProvider, sunoPlugin as default, sunoPlugin };