@elizaos/plugin-suno 2.0.3-beta.5 → 2.0.3-beta.7

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,34 @@
1
+ import { IAgentRuntime, Memory, State, HandlerCallback, ActionResult, Provider, Plugin } from '@elizaos/core';
2
+
3
+ type SunoMusicSubaction = 'generate' | 'custom_generate' | 'extend';
4
+ /**
5
+ * Handler that performs Suno music generation, extension, or custom generation.
6
+ *
7
+ * Used as the implementation of the MUSIC umbrella subactions `generate`,
8
+ * `extend`, and `custom_generate` exposed by `@elizaos/plugin-music`.
9
+ *
10
+ * Returns `success: false` with a clear error message when `SUNO_API_KEY` is
11
+ * not configured or the upstream request fails — callers (including the
12
+ * MUSIC dispatcher) should surface this to the user verbatim.
13
+ */
14
+ declare const sunoGenerateMusicHandler: (runtime: IAgentRuntime, message: Memory, state: State, options: Record<string, unknown> | undefined, callback?: HandlerCallback) => Promise<ActionResult>;
15
+
16
+ interface SunoConfig {
17
+ apiKey: string;
18
+ baseUrl?: string;
19
+ }
20
+ declare class SunoProvider {
21
+ private apiKey;
22
+ private baseUrl;
23
+ static get(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<SunoProvider>;
24
+ constructor(config: SunoConfig);
25
+ get(_runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<{
26
+ status: string;
27
+ }>;
28
+ request(runtime: IAgentRuntime, endpoint: string, options?: RequestInit): Promise<any>;
29
+ }
30
+ declare const sunoStatusProvider: Provider;
31
+
32
+ declare const sunoPlugin: Plugin;
33
+
34
+ export { type SunoMusicSubaction, SunoProvider, sunoPlugin as default, sunoGenerateMusicHandler, sunoPlugin, sunoStatusProvider };
package/dist/index.js ADDED
@@ -0,0 +1,232 @@
1
+ // src/providers/suno.ts
2
+ import {
3
+ recordLlmCall
4
+ } from "@elizaos/core";
5
+ var SunoProvider = class _SunoProvider {
6
+ apiKey;
7
+ baseUrl;
8
+ static async get(runtime, _message, _state) {
9
+ const apiKey = runtime.getSetting("SUNO_API_KEY");
10
+ if (typeof apiKey !== "string" || !apiKey) {
11
+ throw new Error("SUNO_API_KEY is required");
12
+ }
13
+ return new _SunoProvider({ apiKey });
14
+ }
15
+ constructor(config) {
16
+ this.apiKey = config.apiKey;
17
+ this.baseUrl = config.baseUrl || "https://api.suno.ai/v1";
18
+ }
19
+ async get(_runtime, _message, _state) {
20
+ return { status: "ready" };
21
+ }
22
+ async request(runtime, endpoint, options = {}) {
23
+ const url = `${this.baseUrl}${endpoint}`;
24
+ const headers = {
25
+ Authorization: `Bearer ${this.apiKey}`,
26
+ "Content-Type": "application/json",
27
+ ...options.headers
28
+ };
29
+ const body = typeof options.body === "string" ? options.body : "";
30
+ const details = {
31
+ model: "suno",
32
+ modelVersion: "api-v1",
33
+ systemPrompt: "Suno music generation API request",
34
+ userPrompt: body,
35
+ temperature: readTemperature(body),
36
+ maxTokens: 0,
37
+ purpose: "action",
38
+ actionType: `suno.fetch${endpoint}`
39
+ };
40
+ return recordLlmCall(runtime, details, async () => {
41
+ const response = await fetch(url, {
42
+ ...options,
43
+ headers
44
+ });
45
+ if (!response.ok) {
46
+ throw new Error(`Suno API error: ${response.statusText}`);
47
+ }
48
+ const data = await response.json();
49
+ details.response = JSON.stringify({ suno_response: data });
50
+ return data;
51
+ });
52
+ }
53
+ };
54
+ function readTemperature(body) {
55
+ if (!body) return 0;
56
+ try {
57
+ const parsed = JSON.parse(body);
58
+ return typeof parsed.temperature === "number" ? parsed.temperature : 0;
59
+ } catch {
60
+ return 0;
61
+ }
62
+ }
63
+ var sunoStatusProvider = {
64
+ name: "SUNO_STATUS",
65
+ description: "Suno music generation status",
66
+ descriptionCompressed: "Suno generation availability.",
67
+ contexts: ["media"],
68
+ contextGate: { anyOf: ["media"] },
69
+ cacheStable: false,
70
+ cacheScope: "turn",
71
+ get: async (runtime) => {
72
+ const configured = Boolean(runtime.getSetting("SUNO_API_KEY"));
73
+ return {
74
+ text: JSON.stringify(
75
+ {
76
+ suno: {
77
+ configured,
78
+ status: configured ? "ready" : "missing_api_key",
79
+ action: "MUSIC",
80
+ subactions: ["generate", "custom_generate", "extend"]
81
+ }
82
+ },
83
+ null,
84
+ 2
85
+ ),
86
+ data: { configured },
87
+ values: { sunoConfigured: configured }
88
+ };
89
+ }
90
+ };
91
+
92
+ // src/actions/musicGeneration.ts
93
+ var SUNO_ACTION_TIMEOUT_MS = 3e4;
94
+ var MAX_SUNO_RESPONSE_BYTES = 4e3;
95
+ function paramsFromMessageAndOptions(message, options) {
96
+ const content = message.content && typeof message.content === "object" ? message.content : {};
97
+ const parameters = (options == null ? void 0 : options.parameters) && typeof options.parameters === "object" ? options.parameters : {};
98
+ return { ...content, ...options, ...parameters };
99
+ }
100
+ function normalizeSubaction(value) {
101
+ const normalized = typeof value === "string" ? value.trim().toLowerCase() : "";
102
+ if (normalized === "generate" || normalized === "extend") return normalized;
103
+ if (normalized === "custom_generate" || normalized === "custom-generate" || normalized === "custom") {
104
+ return "custom_generate";
105
+ }
106
+ if (normalized === "extend_audio" || normalized === "extend-audio") return "extend";
107
+ return null;
108
+ }
109
+ function inferSubaction(message, params) {
110
+ var _a;
111
+ const explicit = normalizeSubaction(params.action ?? params.subaction ?? params.operation);
112
+ if (explicit) return explicit;
113
+ const text = (((_a = message.content) == null ? void 0 : _a.text) ?? "").toLowerCase();
114
+ if (params.audio_id || /\b(extend|lengthen|longer|add \d+.*seconds?)\b/.test(text)) {
115
+ return "extend";
116
+ }
117
+ if (params.reference_audio || params.style || params.bpm || params.key || params.mode || /\b(custom|style|bpm|key|mode|reference)\b/.test(text)) {
118
+ return "custom_generate";
119
+ }
120
+ return "generate";
121
+ }
122
+ function promptFromParams(message, params) {
123
+ var _a;
124
+ const prompt = typeof params.prompt === "string" ? params.prompt.trim() : "";
125
+ if (prompt) return prompt;
126
+ return (((_a = message.content) == null ? void 0 : _a.text) ?? "").trim();
127
+ }
128
+ function numberOrDefault(value, fallback) {
129
+ return typeof value === "number" && Number.isFinite(value) ? value : fallback;
130
+ }
131
+ function generationBody(params, prompt) {
132
+ return {
133
+ prompt,
134
+ duration: numberOrDefault(params.duration, 30),
135
+ temperature: numberOrDefault(params.temperature, 1),
136
+ top_k: numberOrDefault(params.topK, 250),
137
+ top_p: numberOrDefault(params.topP, 0.95),
138
+ classifier_free_guidance: numberOrDefault(params.classifier_free_guidance, 3)
139
+ };
140
+ }
141
+ var sunoGenerateMusicHandler = async (runtime, message, state, options, callback) => {
142
+ const params = paramsFromMessageAndOptions(message, options);
143
+ const subaction = inferSubaction(message, params);
144
+ let provider;
145
+ try {
146
+ provider = await SunoProvider.get(runtime, message, state);
147
+ } catch (error) {
148
+ const text2 = `Music generation unavailable: ${error instanceof Error ? error.message : String(error)}`;
149
+ await (callback == null ? void 0 : callback({ text: text2, error: text2 }));
150
+ return { success: false, text: text2, error: text2 };
151
+ }
152
+ let endpoint = "/generate";
153
+ let body;
154
+ if (subaction === "extend") {
155
+ if (!params.audio_id || !params.duration) {
156
+ const text2 = "Missing required parameters: audio_id and duration";
157
+ await (callback == null ? void 0 : callback({ text: text2 }));
158
+ return { success: false, text: text2, error: text2 };
159
+ }
160
+ endpoint = "/extend";
161
+ body = {
162
+ audio_id: params.audio_id,
163
+ duration: params.duration
164
+ };
165
+ } else {
166
+ const prompt = promptFromParams(message, params);
167
+ if (!prompt) {
168
+ const text2 = "Missing required parameter: prompt";
169
+ await (callback == null ? void 0 : callback({ text: text2 }));
170
+ return { success: false, text: text2, error: text2 };
171
+ }
172
+ body = generationBody(params, prompt);
173
+ if (subaction === "custom_generate") {
174
+ endpoint = "/custom-generate";
175
+ body = {
176
+ ...body,
177
+ reference_audio: params.reference_audio,
178
+ style: params.style,
179
+ bpm: params.bpm,
180
+ key: params.key,
181
+ mode: params.mode
182
+ };
183
+ }
184
+ }
185
+ const controller = new AbortController();
186
+ const timeout = setTimeout(() => controller.abort(), SUNO_ACTION_TIMEOUT_MS);
187
+ const response = await provider.request(runtime, endpoint, {
188
+ method: "POST",
189
+ body: JSON.stringify(body),
190
+ signal: controller.signal
191
+ }).finally(() => clearTimeout(timeout));
192
+ const cappedResponse = JSON.stringify(response).length > MAX_SUNO_RESPONSE_BYTES ? {
193
+ truncated: true,
194
+ preview: JSON.stringify(response).slice(0, MAX_SUNO_RESPONSE_BYTES)
195
+ } : response;
196
+ const text = subaction === "extend" ? `Successfully extended audio ${params.audio_id}` : `Successfully submitted ${subaction} music generation`;
197
+ await (callback == null ? void 0 : callback({ text, content: cappedResponse }));
198
+ return {
199
+ success: true,
200
+ text,
201
+ data: { action: subaction, subaction, response: cappedResponse }
202
+ };
203
+ };
204
+
205
+ // src/index.ts
206
+ var sunoPlugin = {
207
+ name: "suno",
208
+ description: "Suno AI music generation backend for Eliza. Generation is dispatched through the MUSIC umbrella (action=generate|extend|custom_generate); this plugin contributes only the Suno client and status provider.",
209
+ providers: [sunoStatusProvider],
210
+ // Self-declared auto-enable: activate when SUNO_API_KEY is set OR when
211
+ // media.audio is configured to use the suno provider with own-key mode.
212
+ autoEnable: {
213
+ shouldEnable: (env, config) => {
214
+ const key = env.SUNO_API_KEY;
215
+ if (typeof key === "string" && key.trim() !== "") return true;
216
+ const media = config == null ? void 0 : config.media;
217
+ const audio = media == null ? void 0 : media.audio;
218
+ return Boolean(
219
+ audio && audio.enabled !== false && audio.mode === "own-key" && audio.provider === "suno"
220
+ );
221
+ }
222
+ }
223
+ };
224
+ var index_default = sunoPlugin;
225
+ export {
226
+ SunoProvider,
227
+ index_default as default,
228
+ sunoGenerateMusicHandler,
229
+ sunoPlugin,
230
+ sunoStatusProvider
231
+ };
232
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/providers/suno.ts","../src/actions/musicGeneration.ts","../src/index.ts"],"sourcesContent":["import {\n type IAgentRuntime,\n type Memory,\n type Provider,\n type RecordLlmCallDetails,\n recordLlmCall,\n type State,\n} from '@elizaos/core';\n\nexport interface SunoConfig {\n apiKey: string;\n baseUrl?: string;\n}\n\nexport class SunoProvider {\n private apiKey: string;\n private baseUrl: string;\n\n static async get(\n runtime: IAgentRuntime,\n _message: Memory,\n _state?: State\n ): Promise<SunoProvider> {\n const apiKey = runtime.getSetting('SUNO_API_KEY');\n if (typeof apiKey !== 'string' || !apiKey) {\n throw new Error('SUNO_API_KEY is required');\n }\n return new SunoProvider({ apiKey });\n }\n\n constructor(config: SunoConfig) {\n this.apiKey = config.apiKey;\n this.baseUrl = config.baseUrl || 'https://api.suno.ai/v1';\n }\n\n async get(\n _runtime: IAgentRuntime,\n _message: Memory,\n _state?: State\n ): Promise<{ status: string }> {\n return { status: 'ready' };\n }\n\n async request(runtime: IAgentRuntime, endpoint: string, options: RequestInit = {}) {\n const url = `${this.baseUrl}${endpoint}`;\n const headers = {\n Authorization: `Bearer ${this.apiKey}`,\n 'Content-Type': 'application/json',\n ...options.headers,\n };\n\n const body = typeof options.body === 'string' ? options.body : '';\n const details: RecordLlmCallDetails = {\n model: 'suno',\n modelVersion: 'api-v1',\n systemPrompt: 'Suno music generation API request',\n userPrompt: body,\n temperature: readTemperature(body),\n maxTokens: 0,\n purpose: 'action',\n actionType: `suno.fetch${endpoint}`,\n };\n\n return recordLlmCall(runtime, details, async () => {\n const response = await fetch(url, {\n ...options,\n headers,\n });\n\n if (!response.ok) {\n throw new Error(`Suno API error: ${response.statusText}`);\n }\n\n const data = await response.json();\n details.response = JSON.stringify({ suno_response: data });\n return data;\n });\n }\n}\n\nfunction readTemperature(body: string): number {\n if (!body) return 0;\n try {\n const parsed = JSON.parse(body) as { temperature?: unknown };\n return typeof parsed.temperature === 'number' ? parsed.temperature : 0;\n } catch {\n return 0;\n }\n}\n\nexport const sunoStatusProvider: Provider = {\n name: 'SUNO_STATUS',\n description: 'Suno music generation status',\n descriptionCompressed: 'Suno generation availability.',\n contexts: ['media'],\n contextGate: { anyOf: ['media'] },\n cacheStable: false,\n cacheScope: 'turn',\n get: async (runtime: IAgentRuntime) => {\n const configured = Boolean(runtime.getSetting('SUNO_API_KEY'));\n return {\n text: JSON.stringify(\n {\n suno: {\n configured,\n status: configured ? 'ready' : 'missing_api_key',\n action: 'MUSIC',\n subactions: ['generate', 'custom_generate', 'extend'],\n },\n },\n null,\n 2\n ),\n data: { configured },\n values: { sunoConfigured: configured },\n };\n },\n};\n\nexport interface GenerateParams {\n prompt: string;\n duration?: number;\n temperature?: number;\n topK?: number;\n topP?: number;\n classifier_free_guidance?: number;\n}\n\nexport interface CustomGenerateParams extends GenerateParams {\n reference_audio?: string;\n style?: string;\n bpm?: number;\n key?: string;\n mode?: string;\n}\n\nexport interface ExtendParams {\n audio_id: string;\n duration: number;\n}\n\nexport interface GenerationResponse {\n id: string;\n status: 'pending' | 'processing' | 'completed' | 'failed';\n audio_url?: string;\n error?: string;\n}\n","import type { ActionResult, HandlerCallback, IAgentRuntime, Memory, State } from '@elizaos/core';\nimport { SunoProvider } from '../providers/suno';\n\nexport type SunoMusicSubaction = 'generate' | 'custom_generate' | 'extend';\n\ninterface SunoMusicGenerationParams {\n action?: SunoMusicSubaction | string;\n subaction?: SunoMusicSubaction | string;\n operation?: SunoMusicSubaction | string;\n prompt?: string;\n duration?: number;\n temperature?: number;\n topK?: number;\n topP?: number;\n classifier_free_guidance?: number;\n reference_audio?: string;\n style?: string;\n bpm?: number;\n key?: string;\n mode?: string;\n audio_id?: string;\n}\n\nconst SUNO_ACTION_TIMEOUT_MS = 30_000;\nconst MAX_SUNO_RESPONSE_BYTES = 4000;\n\nfunction paramsFromMessageAndOptions(\n message: Memory,\n options?: Record<string, unknown>\n): SunoMusicGenerationParams {\n const content =\n message.content && typeof message.content === 'object'\n ? (message.content as Record<string, unknown>)\n : {};\n const parameters =\n options?.parameters && typeof options.parameters === 'object'\n ? (options.parameters as Record<string, unknown>)\n : {};\n return { ...content, ...options, ...parameters } as SunoMusicGenerationParams;\n}\n\nfunction normalizeSubaction(value: unknown): SunoMusicSubaction | null {\n const normalized = typeof value === 'string' ? value.trim().toLowerCase() : '';\n if (normalized === 'generate' || normalized === 'extend') return normalized;\n if (\n normalized === 'custom_generate' ||\n normalized === 'custom-generate' ||\n normalized === 'custom'\n ) {\n return 'custom_generate';\n }\n if (normalized === 'extend_audio' || normalized === 'extend-audio') return 'extend';\n return null;\n}\n\nfunction inferSubaction(message: Memory, params: SunoMusicGenerationParams): SunoMusicSubaction {\n const explicit = normalizeSubaction(params.action ?? params.subaction ?? params.operation);\n if (explicit) return explicit;\n const text = (message.content?.text ?? '').toLowerCase();\n if (params.audio_id || /\\b(extend|lengthen|longer|add \\d+.*seconds?)\\b/.test(text)) {\n return 'extend';\n }\n if (\n params.reference_audio ||\n params.style ||\n params.bpm ||\n params.key ||\n params.mode ||\n /\\b(custom|style|bpm|key|mode|reference)\\b/.test(text)\n ) {\n return 'custom_generate';\n }\n return 'generate';\n}\n\nfunction promptFromParams(message: Memory, params: SunoMusicGenerationParams): string {\n const prompt = typeof params.prompt === 'string' ? params.prompt.trim() : '';\n if (prompt) return prompt;\n return (message.content?.text ?? '').trim();\n}\n\nfunction numberOrDefault(value: unknown, fallback: number): number {\n return typeof value === 'number' && Number.isFinite(value) ? value : fallback;\n}\n\nfunction generationBody(\n params: SunoMusicGenerationParams,\n prompt: string\n): Record<string, unknown> {\n return {\n prompt,\n duration: numberOrDefault(params.duration, 30),\n temperature: numberOrDefault(params.temperature, 1.0),\n top_k: numberOrDefault(params.topK, 250),\n top_p: numberOrDefault(params.topP, 0.95),\n classifier_free_guidance: numberOrDefault(params.classifier_free_guidance, 3.0),\n };\n}\n\n/**\n * Handler that performs Suno music generation, extension, or custom generation.\n *\n * Used as the implementation of the MUSIC umbrella subactions `generate`,\n * `extend`, and `custom_generate` exposed by `@elizaos/plugin-music`.\n *\n * Returns `success: false` with a clear error message when `SUNO_API_KEY` is\n * not configured or the upstream request fails — callers (including the\n * MUSIC dispatcher) should surface this to the user verbatim.\n */\nexport const sunoGenerateMusicHandler = async (\n runtime: IAgentRuntime,\n message: Memory,\n state: State,\n options: Record<string, unknown> | undefined,\n callback?: HandlerCallback\n): Promise<ActionResult> => {\n const params = paramsFromMessageAndOptions(message, options);\n const subaction = inferSubaction(message, params);\n\n let provider: SunoProvider;\n try {\n provider = await SunoProvider.get(runtime, message, state);\n } catch (error) {\n const text = `Music generation unavailable: ${\n error instanceof Error ? error.message : String(error)\n }`;\n await callback?.({ text, error: text });\n return { success: false, text, error: text };\n }\n\n let endpoint = '/generate';\n let body: Record<string, unknown>;\n\n if (subaction === 'extend') {\n if (!params.audio_id || !params.duration) {\n const text = 'Missing required parameters: audio_id and duration';\n await callback?.({ text });\n return { success: false, text, error: text };\n }\n endpoint = '/extend';\n body = {\n audio_id: params.audio_id,\n duration: params.duration,\n };\n } else {\n const prompt = promptFromParams(message, params);\n if (!prompt) {\n const text = 'Missing required parameter: prompt';\n await callback?.({ text });\n return { success: false, text, error: text };\n }\n body = generationBody(params, prompt);\n if (subaction === 'custom_generate') {\n endpoint = '/custom-generate';\n body = {\n ...body,\n reference_audio: params.reference_audio,\n style: params.style,\n bpm: params.bpm,\n key: params.key,\n mode: params.mode,\n };\n }\n }\n\n const controller = new AbortController();\n const timeout = setTimeout(() => controller.abort(), SUNO_ACTION_TIMEOUT_MS);\n const response = await provider\n .request(runtime, endpoint, {\n method: 'POST',\n body: JSON.stringify(body),\n signal: controller.signal,\n })\n .finally(() => clearTimeout(timeout));\n const cappedResponse =\n JSON.stringify(response).length > MAX_SUNO_RESPONSE_BYTES\n ? {\n truncated: true,\n preview: JSON.stringify(response).slice(0, MAX_SUNO_RESPONSE_BYTES),\n }\n : response;\n\n const text =\n subaction === 'extend'\n ? `Successfully extended audio ${params.audio_id}`\n : `Successfully submitted ${subaction} music generation`;\n await callback?.({ text, content: cappedResponse });\n\n return {\n success: true,\n text,\n data: { action: subaction, subaction, response: cappedResponse },\n };\n};\n\nexport default sunoGenerateMusicHandler;\n","import type { Plugin } from '@elizaos/core';\nimport { sunoGenerateMusicHandler, type SunoMusicSubaction } from './actions/musicGeneration';\nimport { SunoProvider, sunoStatusProvider } from './providers/suno';\n\nexport { SunoProvider, sunoGenerateMusicHandler, sunoStatusProvider, type SunoMusicSubaction };\n\nexport const sunoPlugin: Plugin = {\n name: 'suno',\n description:\n 'Suno AI music generation backend for Eliza. Generation is dispatched through the MUSIC umbrella (action=generate|extend|custom_generate); this plugin contributes only the Suno client and status provider.',\n providers: [sunoStatusProvider],\n // Self-declared auto-enable: activate when SUNO_API_KEY is set OR when\n // media.audio is configured to use the suno provider with own-key mode.\n autoEnable: {\n shouldEnable: (env, config) => {\n const key = env.SUNO_API_KEY;\n if (typeof key === 'string' && key.trim() !== '') return true;\n const media = config?.media as Record<string, unknown> | undefined;\n const audio = media?.audio as\n | { enabled?: unknown; mode?: unknown; provider?: unknown }\n | undefined;\n return Boolean(\n audio &&\n audio.enabled !== false &&\n audio.mode === 'own-key' &&\n audio.provider === 'suno'\n );\n },\n },\n};\n\nexport default sunoPlugin;\n"],"mappings":";AAAA;AAAA,EAKI;AAAA,OAEG;AAOA,IAAM,eAAN,MAAM,cAAa;AAAA,EACd;AAAA,EACA;AAAA,EAER,aAAa,IACT,SACA,UACA,QACqB;AACrB,UAAM,SAAS,QAAQ,WAAW,cAAc;AAChD,QAAI,OAAO,WAAW,YAAY,CAAC,QAAQ;AACvC,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC9C;AACA,WAAO,IAAI,cAAa,EAAE,OAAO,CAAC;AAAA,EACtC;AAAA,EAEA,YAAY,QAAoB;AAC5B,SAAK,SAAS,OAAO;AACrB,SAAK,UAAU,OAAO,WAAW;AAAA,EACrC;AAAA,EAEA,MAAM,IACF,UACA,UACA,QAC2B;AAC3B,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC7B;AAAA,EAEA,MAAM,QAAQ,SAAwB,UAAkB,UAAuB,CAAC,GAAG;AAC/E,UAAM,MAAM,GAAG,KAAK,OAAO,GAAG,QAAQ;AACtC,UAAM,UAAU;AAAA,MACZ,eAAe,UAAU,KAAK,MAA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kBAAkB;AAAA;AAAA;AAAA,EAG9B,YAAY;AAAA,IACR,cAAc,CAAC,KAAK,WAAW;AAC3B,YAAM,MAAM,IAAI;AAChB,UAAI,OAAO,QAAQ,YAAY,IAAI,KAAK,MAAM,GAAI,QAAO;AACzD,YAAM,QAAQ,iCAAQ;AACtB,YAAM,QAAQ,+BAAO;AAGrB,aAAO;AAAA,QACH,SACI,MAAM,YAAY,SAClB,MAAM,SAAS,aACf,MAAM,aAAa;AAAA,MAC3B;AAAA,IACJ;AAAA,EACJ;AACJ;AAEA,IAAO,gBAAQ;","names":["text"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/plugin-suno",
3
- "version": "2.0.3-beta.5",
3
+ "version": "2.0.3-beta.7",
4
4
  "description": "Suno AI Music Generation Plugin for Eliza",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -74,7 +74,7 @@
74
74
  "access": "public"
75
75
  },
76
76
  "dependencies": {
77
- "@elizaos/core": "2.0.3-beta.5"
77
+ "@elizaos/core": "2.0.3-beta.7"
78
78
  },
79
- "gitHead": "ff6157011c9459670021cc28a6797592a78b8817"
79
+ "gitHead": "61094f10458d11055c75b3dd0bae374e3f66bac5"
80
80
  }