@elizaos/plugin-suno 1.0.6-alpha.2 → 1.0.6-alpha.4

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.
@@ -1,29 +1,14 @@
1
- import type { IAgentRuntime, Memory, Provider, ProviderResult, State } from "@elizaos/core";
2
- import { validateActionKeywords, validateActionRegex } from "@elizaos/core";
1
+ import type { IAgentRuntime, Memory, State } from "@elizaos/core"; // Added type keyword
2
+ import type { Provider } from "@elizaos/core"; // Added type keyword
3
3
 
4
4
  export interface SunoConfig {
5
5
  apiKey: string;
6
6
  baseUrl?: string;
7
7
  }
8
8
 
9
- export class SunoProvider implements Provider {
10
- name = "suno";
11
- dynamic = true;
12
- relevanceKeywords = [
13
- "suno",
14
- "music",
15
- "song",
16
- "audio",
17
- "generate",
18
- "lyrics",
19
- "melody",
20
- "track",
21
- "status",
22
- "state",
23
- "context",
24
- ];
25
- private apiKey: string;
26
- private baseUrl: string;
9
+ export class SunoProvider implements Provider {
10
+ private apiKey: string;
11
+ private baseUrl: string;
27
12
 
28
13
  static async get(runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<SunoProvider> {
29
14
  const apiKey = runtime.getSetting("SUNO_API_KEY");
@@ -38,34 +23,9 @@ export class SunoProvider implements Provider {
38
23
  this.baseUrl = config.baseUrl || 'https://api.suno.ai/v1';
39
24
  }
40
25
 
41
- async get(_runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<ProviderResult> {
42
- const __providerKeywords = [
43
- "suno",
44
- "music",
45
- "song",
46
- "audio",
47
- "generate",
48
- "lyrics",
49
- "melody",
50
- "track",
51
- "status",
52
- "state",
53
- "context",
54
- ];
55
- const __providerRegex = new RegExp(`\\b(${__providerKeywords.join("|")})\\b`, "i");
56
- const __recentMessages = _state?.recentMessagesData || [];
57
- const __isRelevant =
58
- validateActionKeywords(_message, __recentMessages, __providerKeywords) ||
59
- validateActionRegex(_message, __recentMessages, __providerRegex);
60
- if (!__isRelevant) {
61
- return { text: "" };
62
- }
63
-
64
- return {
65
- text: "Suno provider ready",
66
- data: { status: "ready" },
67
- };
68
- }
26
+ async get(_runtime: IAgentRuntime, _message: Memory, _state?: State): Promise<{ status: string }> {
27
+ return { status: 'ready' };
28
+ }
69
29
 
70
30
  async request(endpoint: string, options: RequestInit = {}) {
71
31
  const url = `${this.baseUrl}${endpoint}`;
@@ -115,4 +75,4 @@ export interface GenerationResponse {
115
75
  status: 'pending' | 'processing' | 'completed' | 'failed';
116
76
  audio_url?: string;
117
77
  error?: string;
118
- }
78
+ }
package/tsup.config.ts CHANGED
@@ -3,7 +3,7 @@ import { defineConfig } from "tsup";
3
3
  export default defineConfig({
4
4
  entry: ["src/index.ts"],
5
5
  format: ["cjs", "esm"],
6
- dts: true,
6
+ dts: false,
7
7
  splitting: false,
8
8
  sourcemap: true,
9
9
  clean: true,