@starreel/mcp 0.1.8 → 0.1.10

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.
@@ -105,7 +105,11 @@ export function registerProduceTools(server, client) {
105
105
  server.tool('quote_storyboards', '报价:把某一集的剧本拆成分镜(storyboards)要多少点。返回 estimated_points 与 quote_id。零扣费。' +
106
106
  '拿到后把点数告诉用户征求同意,再用 quote_id 调 generate_storyboards。', { episode_id: z.number().int().positive() }, async ({ episode_id }) => jsonResult(await client.producePost(`/episodes/${episode_id}/storyboards/quote`)));
107
107
  server.tool('generate_storyboards', '确认后拆镜:后台跑(分钟级),立即返回 status:generating。用 get_storyboards 轮询,分镜出现即在生成、数量稳定即完成。' + CONFIRM_HINT, { episode_id: z.number().int().positive(), quote_id: z.string().describe('来自 quote_storyboards') }, async ({ episode_id, quote_id }) => jsonResult(await client.producePost(`/episodes/${episode_id}/storyboards/generate`, { quote_id })));
108
- server.tool('get_storyboards', '读某一集的分镜列表(供审阅/查进度)。含每镜首帧(first_frame_image)与视频(video_url)是否就绪。免费。', { episode_id: z.number().int().positive() }, async ({ episode_id }) => jsonResult(await client.produceGet(`/episodes/${episode_id}/storyboards`)));
108
+ server.tool('get_storyboards', '读某一集的分镜列表(供审阅/查进度)。含每镜首帧(first_frame_image)与视频(video_url)是否就绪。' +
109
+ '★每镜还带**结构化状态**:frame_status/video_status(ready/pending/authorizing/rejected/failed/none)、' +
110
+ 'fail_reason(sensitive/text_sensitive/copyright/face_mismatch/account_overdue/quota_full/authorizing/' +
111
+ 'insufficient_credits/transient)、retryable(true=可重试;false=改内容换图,重试无效)、fail_hint(人读文案)。' +
112
+ '照 retryable 判该重试还是该改内容,别解析中文。免费。', { episode_id: z.number().int().positive() }, async ({ episode_id }) => jsonResult(await client.produceGet(`/episodes/${episode_id}/storyboards`)));
109
113
  // ---------- 出首帧(frames) ----------
110
114
  server.tool('quote_frames', '报价:给某一集缺首帧的分镜批量出首帧要多少点。返回 frames_to_generate、estimated_points、quote_id。零扣费。', { episode_id: z.number().int().positive() }, async ({ episode_id }) => jsonResult(await client.producePost(`/episodes/${episode_id}/frames/quote`)));
111
115
  server.tool('generate_frames', '确认后批量出首帧:后台异步。用 get_storyboards 轮询,first_frame_image 逐镜填充即完成。' +
@@ -310,4 +314,23 @@ export function registerProduceTools(server, client) {
310
314
  image_url: z.string().optional().describe('商品图 URL(先 upload_image 拿)'),
311
315
  }, async ({ drama_id, ...fields }) => jsonResult(await client.producePost(`/dramas/${drama_id}/products`, fields)));
312
316
  server.tool('list_products', '广告项目:列出商品库。免费。', { drama_id: z.number().int().positive() }, async ({ drama_id }) => jsonResult(await client.produceGet(`/dramas/${drama_id}/products`)));
317
+ // ========== AI 声音克隆(voice cloning)==========
318
+ server.tool('clone_voice', '从一段**已授权**的音频样本克隆音色,存入你的音色库,返回音色 id。' +
319
+ '⚠️ 样本必须是本人/持权人**同意授权**的声音(否则侵权,与真人/版权门同理)。' +
320
+ '按平台价计费(每个音色一口价);失败自动退款。之后 set_character_voice 绑到角色,generate_tts 即用它配音。', {
321
+ name: z.string().min(1).describe('音色命名(便于管理)'),
322
+ sample_file_path: z.string().optional().describe('本地授权音频样本路径(mp3/wav/m4a,自动上传;与 sample_url 二选一)'),
323
+ sample_url: z.string().optional().describe('已上传到 COS 的样本 URL(与 sample_file_path 二选一)'),
324
+ notes: z.string().optional().describe('备注(可选)'),
325
+ }, async ({ name, sample_file_path, sample_url, notes }) => {
326
+ let url = sample_url;
327
+ if (!url && sample_file_path)
328
+ url = await client.uploadLocalFile(sample_file_path, 'audio');
329
+ if (!url)
330
+ throw new Error('需要 sample_file_path(本地样本自动上传)或 sample_url(已上传的 URL)');
331
+ return jsonResult(await client.producePost('/voice-clones', notes ? { name, sample_url: url, notes } : { name, sample_url: url }));
332
+ });
333
+ server.tool('list_voices', '列出我音色库里的克隆音色(id/名字/状态)。免费。', {}, async () => jsonResult(await client.produceGet('/voice-clones')));
334
+ server.tool('delete_voice', '删除音色库里的一个克隆音色。免费。', { voice_clone_id: z.number().int().positive() }, async ({ voice_clone_id }) => jsonResult(await client.produceDelete(`/voice-clones/${voice_clone_id}`)));
335
+ server.tool('set_character_voice', '把克隆音色绑到某角色(voice_clone_id 来自 clone_voice/list_voices)。绑定后 generate_tts 用它给该角色配音。免费。', { character_id: z.number().int().positive(), voice_clone_id: z.number().int().positive().describe('音色库 id') }, async ({ character_id, voice_clone_id }) => jsonResult(await client.producePost(`/characters/${character_id}/voice`, { library_id: voice_clone_id })));
313
336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starreel/mcp",
3
- "version": "0.1.8",
3
+ "version": "0.1.10",
4
4
  "mcpName": "ai.starreel/starreel",
5
5
  "description": "StarReel MCP server — drive the AI short-drama production pipeline (script → storyboards → frames → video → final cut) from Claude, Cursor, or any MCP client",
6
6
  "license": "MIT",
package/server.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-29/server.schema.json",
3
3
  "name": "ai.starreel/starreel",
4
4
  "description": "Turn a script into a finished, downloadable short-drama episode — via MCP or REST.",
5
- "version": "0.1.8",
5
+ "version": "0.1.10",
6
6
  "websiteUrl": "https://starreel.ai",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "@starreel/mcp",
11
- "version": "0.1.8",
11
+ "version": "0.1.10",
12
12
  "transport": { "type": "stdio" },
13
13
  "environmentVariables": [
14
14
  {