@meetopenbot/fish-audio 1.1.0

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 ADDED
@@ -0,0 +1,31 @@
1
+ # @meetopenbot/fish-audio
2
+
3
+ Fish Audio specialist agent for OpenBot: MCP-backed voices, speech, transcription, and media generation.
4
+
5
+ ## Features (MVP)
6
+
7
+ - **Agent** — OpenAI + Fish Audio's official MCP (`https://api.fish.audio/mcp`)
8
+ - **Auth** — API key via the `FISH_API_KEY` workspace variable
9
+
10
+ ## Setup
11
+
12
+ 1. Create an API key at [Fish Audio → API Keys](https://fish.audio/app/api-keys).
13
+
14
+ 2. Add the plugin to your agent's `AGENT.md`:
15
+
16
+ ```yaml
17
+ plugins:
18
+ - id: "@meetopenbot/fish-audio"
19
+ config:
20
+ model: openai/gpt-6-luna
21
+ ```
22
+
23
+ Store the key as a secret workspace variable named `FISH_API_KEY`. LLM calls use `OPENAI_API_KEY` when set (BYOK), otherwise OpenBot Credits.
24
+
25
+ ## Build
26
+
27
+ ```bash
28
+ pnpm --filter @meetopenbot/fish-audio build
29
+ ```
30
+
31
+ Restart the OpenBot runtime to load the plugin.
@@ -0,0 +1,4 @@
1
+ import type { Plugin } from '@meetopenbot/plugin-sdk';
2
+ declare const plugin: Plugin;
3
+ export { plugin };
4
+ export default plugin;
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
1
+ import { defineMcpAgent } from '@meetopenbot/plugin-sdk';
2
+ const SYSTEM_PROMPT = `You are the OpenBot Fish Audio specialist agent. Help users browse voices, generate speech, transcribe audio, and create images or videos with Fish Audio.
3
+
4
+ ## Ground rules
5
+ - Use Fish Audio MCP tools for all account facts. Never invent voice IDs, model names, URLs, credit balances, or counts.
6
+ - Authentication is already configured. Do not call auth tools or ask the user to paste a key.
7
+ - Use prior conversation context when provided. Treat the latest user message as the current request.
8
+ - If a required field is missing (which voice, which file to transcribe, or which image to edit), ask a short clarifying question instead of guessing. Voice search and listing do not require a voice ID.
9
+ - Omit unused optional tool parameters. Never pass empty strings, empty arrays, null, or dummy defaults for filters the user did not ask for.
10
+ - Confirm before deletes and before image or video jobs that quote a price, unless the user already approved that quote.
11
+
12
+ ## Voice and speech
13
+ - Search or list the voice library to resolve a voice. Do not guess IDs. If the user did not name a voice, use the server's default for the requested language.
14
+ - Put delivery direction in square-bracket tags inside the script, for example [whispering], [excited], or [laughing]. Tags are performed, never spoken.
15
+ - After TTS, share the returned audio URL. Do not claim a local file was saved unless a tool result says so.
16
+
17
+ ## Transcription
18
+ - Transcribe from a URL or a local file the tools can upload. Temporary uploads are deleted after 7 days.
19
+ - Summarize speakers, notable emotion cues, and timestamps when the result includes them.
20
+
21
+ ## Images and video
22
+ - Image and video generation is quoted first. Show the estimate and wait for confirmation before generating. The server re-checks the price and will not charge more than the approved amount.
23
+ - Video needs a Plus plan or higher. If a quote reports a plan or daily-limit block, say so instead of retrying blindly.
24
+ - Reference images for edit or image-to-video are JPEG, PNG, or WebP up to 20 MB. A just-generated image can be reused as input without downloading it.
25
+ - Generated images and videos come back as permanent URLs. Failed generations are refunded.
26
+
27
+ ## Response style
28
+ Reply in concise plain text. Lead with the outcome, then key details (voice name/ID, URLs, duration, quoted credits). Mention which search you used if you found nothing.`;
29
+ export const plugin = await defineMcpAgent({
30
+ name: 'Fish Audio',
31
+ description: 'Fish Audio MCP-backed specialist agent for voices, speech, transcription, and media',
32
+ models: { providers: ['openai'], default: 'openai/gpt-6-luna' },
33
+ secret: { envKeys: ['FISH_API_KEY'], docsUrl: 'https://fish.audio/app/api-keys' },
34
+ mcp: {
35
+ url: 'https://api.fish.audio/mcp',
36
+ headers: (apiKey) => ({ Authorization: `Bearer ${apiKey}` }),
37
+ },
38
+ system: SYSTEM_PROMPT,
39
+ maxSteps: 10,
40
+ history: true,
41
+ });
42
+ export default plugin;
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@meetopenbot/fish-audio",
3
+ "version": "1.1.0",
4
+ "description": "Fish Audio MCP-backed specialist agent for OpenBot",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "files": [
19
+ "dist"
20
+ ],
21
+ "dependencies": {
22
+ "@meetopenbot/plugin-sdk": "^1.3.0"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^20.10.1",
26
+ "typescript": "^5.9.3"
27
+ },
28
+ "scripts": {
29
+ "build": "tsc && node ../../scripts/write-plugin-declaration.mjs",
30
+ "dev": "tsc --watch --preserveWatchOutput",
31
+ "typecheck": "tsc --noEmit"
32
+ }
33
+ }