@starreel/mcp 0.1.131 → 0.1.132

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 CHANGED
@@ -129,7 +129,7 @@ See the [API docs](https://api.shortreelai.com/docs/mcp).
129
129
  | Identity anchors | `generate_portraits_and_sheets` (portraits + character sheets = the consistency anchor) |
130
130
  | Storyboards | `quote_storyboards` → `generate_storyboards` → `get_storyboards` |
131
131
  | Frames & video | `quote_frames` → `generate_frames` · `quote_videos` → `generate_videos` |
132
- | Audio | `generate_tts` · `generate_bgm` (steerable via `prompt`) · `get_bgm_prompt_guide` · `generate_sfx` · voice cloning · `design_voice` (a new voice from one sentence) |
132
+ | Audio | `generate_tts` · `generate_bgm` (steerable via `prompt`; lock mood / instruments / BPM / key per act via `director`) · `get_bgm_prompt_guide` · `generate_sfx` · voice cloning · `design_voice` (a new voice from one sentence) |
133
133
  | Finishing | `compose_episode` (free) · `get_final_cut` · `render_multi_aspect` · posters & covers |
134
134
  | Localization | `translate_subtitles` · localization jobs |
135
135
  | Ads / MV modes | product library & product sheets · MV lyrics → story → script |
package/SKILL.md CHANGED
@@ -1103,7 +1103,7 @@ to close") tells the vendor to fit that entire sequence into each 3-second shot.
1103
1103
  - **Audio**: `generate_tts` (required before final cut), `clone_voice`,
1104
1104
  `design_voice` → `get_voice_design` → `save_designed_voice` (no sample needed),
1105
1105
  `speak_with_voice`, `set_character_voice`, `list_voices`, `delete_voice`,
1106
- `generate_bgm` (optional `prompt` steers the music; read `get_bgm_prompt_guide` first),
1106
+ `generate_bgm` (optional `prompt` steers the music; read `get_bgm_prompt_guide` first; optional `director` hard-locks mood / instruments / bpm / tonality for the whole episode or per act — call with `plan_only=true` first to see the acts),
1107
1107
  `get_bgm_prompt_guide`, `replace_shot_dialogue`, `revoice_narration`
1108
1108
  - **Mix** (free; settings only — `compose_episode` again to hear them, `rerender_episode`
1109
1109
  reuses the old timeline): whole drama via `update_project_settings`
@@ -290,7 +290,7 @@ export const OPTIONAL_BOOSTS = [
290
290
  { what: '口型同步', tool: 'lipsync_episode', when: 'TTS 配音项目需要对口型时' },
291
291
  { what: '海报 / 封面', tool: 'generate_episode_poster', when: '成片后;`generate_drama_poster` / `generate_cover` 同族' },
292
292
  { what: '音效 / 特效 / 转场(本地库匹配)', tool: 'generate_sfx', when: '免费;`generate_effects` / `generate_transitions` 同族' },
293
- { what: '配乐', tool: 'generate_bgm', when: '按整集情绪弧线生成;终拼自动接管。客户想指定音乐方向就带 prompt(整集一条),写法先读 `get_bgm_prompt_guide`(免费);不带 prompt 就是全自动' },
293
+ { what: '配乐', tool: 'generate_bgm', when: '按整集情绪弧线生成;终拼自动接管。客户想指定音乐方向就带 prompt(整集一条),写法先读 `get_bgm_prompt_guide`(免费);不带 prompt 就是全自动。客户给了明确参数(情绪/主奏配器/BPM/大小调)用 director 锁定(硬约束,可按幕;按幕前先 plan_only=true 看分幕)' },
294
294
  { what: '字幕翻译', tool: 'translate_subtitles', when: '出海;双语烧录在项目设定里开' },
295
295
  ];
296
296
  export const BILLING = {
@@ -212,6 +212,13 @@ const ETHNICITY_CODES = [
212
212
  // 与后端发现接口 produce-options.ts 的 ASPECT_RATIO_OPTIONS / VIDEO_RESOLUTION_OPTIONS 键集一致
213
213
  // (video_resolution 与后端 VIDEO_RES_WHITELIST 钉死;aspect_ratio 后端柔性,这里给同一策展集)。
214
214
  // 帧类型(与后端 produce-facade.parseFrameParam 同一枚举):整集/单镜出帧共用。
215
+ /** generate_bgm 的结构化锁定字段(整集与按幕共用;校验与上限以后端为准)。 */
216
+ const BGM_LOCK_FIELDS = {
217
+ mood: z.array(z.string()).max(3).optional().describe('情绪词,最多 3 个,每个 ≤12 字(如 压抑、苍凉)'),
218
+ instruments: z.array(z.string()).max(3).optional().describe('主奏乐器,最多 3 件,每件 ≤16 字(如 古筝、大提琴);人声/环境声会被丢掉'),
219
+ bpm: z.number().min(40).max(160).optional().describe('速度 40~160'),
220
+ tonality: z.enum(['major', 'minor', 'modal']).optional().describe('major 大调明亮 / minor 小调暗色 / modal 调式色彩'),
221
+ };
215
222
  const FRAME_TYPE_ARG = z.enum(['first_frame', 'last_frame', 'both']);
216
223
  const ASPECT_RATIOS = ['9:16', '16:9', '1:1', '4:5', '4:3', '21:9'];
217
224
  const VIDEO_RESOLUTIONS = ['480p', '720p', '1080p', '4k'];
@@ -1477,14 +1484,31 @@ export function registerProduceTools(server, client) {
1477
1484
  '只出纯器乐:要人声/歌词/拟音当乐器都不会生效,会在 prompt_warnings 里点名但**不拦生成**。\n' +
1478
1485
  '★prompt_mode: guide(默认)=你的要求与平台专业护栏(时代与题材匹配/配器节制/高潮保规模/段间差异)一起生效;' +
1479
1486
  'override=直通,跳过护栏,只保留技术底线(纯器乐/时长/可循环)。override 效果自负,' +
1480
- '**先用 guide 试**,确实拧不过来再换。不传 prompt 时沿用该集上次填的(get_bgm_status 可查)。', {
1487
+ '**先用 guide 试**,确实拧不过来再换。不传 prompt 时沿用该集上次填的(get_bgm_status 可查)。\n' +
1488
+ '★director 可选=结构化锁定(硬约束):逐项指定 mood 情绪 / instruments 主奏配器 / bpm / tonality 大小调,' +
1489
+ '生成时**强制覆盖**配乐总监的判断(不像 prompt 只是方向,可能被护栏或 AI 取舍改写);没锁的项仍自动判断。' +
1490
+ '整集锁写在 director 顶层;只锁某一幕写进 director.acts[{act,…}](同名字段覆盖整集的)。' +
1491
+ '幕是按情绪弧线自动分的:按幕锁之前先调一次 plan_only=true(免费,不生成)看本集分几幕、每幕覆盖哪些镜。' +
1492
+ '参数拼错(bpm 越界、调性不是 major/minor/modal、幕号不存在)会 400;配器里写人声/环境声会被丢掉并在 director_warnings 点名。' +
1493
+ '客户说「要慢一点、小调、用古筝」这类**明确参数**用 director;说「整体更压抑」这类**方向**用 prompt;两者可同时用。', {
1481
1494
  episode_id: z.number().int().positive(),
1482
1495
  prompt: z.string().optional().describe('配乐方向,整集一条,≤800 字。只写音乐维度,别写剧情。传空字符串=清除已存的提示词。'
1483
1496
  + '不传=沿用该集上次填的(没填过就是全自动)。'),
1484
1497
  prompt_mode: z.enum(['guide', 'override']).optional().describe('guide(默认)=提示词与平台护栏一起生效;override=直通跳过审美护栏(技术底线仍在)。'),
1485
- }, async ({ episode_id, prompt, prompt_mode }) => jsonResult(await client.producePost(`/episodes/${episode_id}/bgm`, {
1498
+ director: z.object({
1499
+ ...BGM_LOCK_FIELDS,
1500
+ acts: z.array(z.object({
1501
+ act: z.number().int().positive().describe('幕序号,从 1 开始(plan_only=true 可查)'),
1502
+ ...BGM_LOCK_FIELDS,
1503
+ }).strict()).optional().describe('按幕锁定;同名字段覆盖整集的,没写的继承整集'),
1504
+ // strict:拼错的字段(如 tempo)要报校验错误;zod 默认会静默剥掉它,转发出去的就是空锁 ⇒ 一次不受控的扣费生成
1505
+ }).strict().optional().describe('结构化锁定(硬约束)。顶层字段整集生效;不传=全由配乐总监判断'),
1506
+ plan_only: z.boolean().optional().describe('true=只返回本集分幕(幕号/镜号范围/时长),不生成、不扣费'),
1507
+ }, async ({ episode_id, prompt, prompt_mode, director, plan_only }) => jsonResult(await client.producePost(`/episodes/${episode_id}/bgm`, {
1486
1508
  ...(prompt === undefined ? {} : { prompt }),
1487
1509
  ...(prompt_mode ? { prompt_mode } : {}),
1510
+ ...(director ? { director } : {}),
1511
+ ...(plan_only ? { plan_only: true } : {}),
1488
1512
  })));
1489
1513
  server.tool('set_episode_audio', '设置**本集**配乐音量(覆盖整剧设定,免费)。整剧统一的用 update_project_settings。' +
1490
1514
  '★只改设置:成片要 compose_episode 重新合成才变(rerender_episode 用旧时间线,不带上)。' +
package/openapi.json CHANGED
@@ -2,8 +2,8 @@
2
2
  "openapi": "3.1.0",
3
3
  "info": {
4
4
  "title": "StarReel Production API",
5
- "version": "0.1.131",
6
- "description": "Turn a script into a finished, downloadable short-drama episode over REST.\n\nPipeline: script → AI rewrite → cast/scenes/props extraction → storyboards → portraits & sheets + scene plates → keyframes → video shots → TTS → final cut (.mp4).\n\n**Billing is prepaid and agent-safe**: big-ticket stages are quote-then-generate (`quote_*` returns a `quote_id`). For video, quote == actual charge. For images the quote is a *range* — models billed per reference image are priced before those are assembled, so `estimated_points` is the upper bound (size the balance by it and a run never dies half-way) and `typical_points` is the usual cost; fixed-price models return the two equal. Insufficient balance returns 402 — nothing half-runs and the account never goes negative.\n\nAuth: exchange your API key at `POST /v1/agent/token` for a 15-minute bearer token.\n\nGenerated from the @starreel/mcp v0.1.131 tool surface (operationIds match MCP tool names 1:1)."
5
+ "version": "0.1.132",
6
+ "description": "Turn a script into a finished, downloadable short-drama episode over REST.\n\nPipeline: script → AI rewrite → cast/scenes/props extraction → storyboards → portraits & sheets + scene plates → keyframes → video shots → TTS → final cut (.mp4).\n\n**Billing is prepaid and agent-safe**: big-ticket stages are quote-then-generate (`quote_*` returns a `quote_id`). For video, quote == actual charge. For images the quote is a *range* — models billed per reference image are priced before those are assembled, so `estimated_points` is the upper bound (size the balance by it and a run never dies half-way) and `typical_points` is the usual cost; fixed-price models return the two equal. Insufficient balance returns 402 — nothing half-runs and the account never goes negative.\n\nAuth: exchange your API key at `POST /v1/agent/token` for a 15-minute bearer token.\n\nGenerated from the @starreel/mcp v0.1.132 tool surface (operationIds match MCP tool names 1:1)."
7
7
  },
8
8
  "servers": [
9
9
  {
@@ -3669,7 +3669,7 @@
3669
3669
  "post": {
3670
3670
  "operationId": "generate_bgm",
3671
3671
  "summary": "给整集生成/更换 AI 配乐(按情绪弧线)",
3672
- "description": "给整集生成/更换 AI 配乐(按情绪弧线)。后台异步,按用量后付不欠费。返回情绪弧线段数与预估耗时;用 get_bgm_status 轮询生成进度。★配乐生成/改动**不会自动进已有成片**——完成后必须重新 compose_episode(免费)才能听到;get_final_cut 的 bgm_stale=true 就是在提示这一步。别用 re-render(吃旧时间线,不含新配乐)。\n★prompt 可选:不传=全自动(和以前一样)。传了就是在自动结果上再加方向,整集一条,系统仍按情绪弧线分幕。怎么写见 get_bgm_prompt_guide(免费);要点=只写音乐维度(情绪气质/主奏配器/速度动态/厚薄空间/风格参照),别写剧情(「主角发现真相时要紧张」→写「紧张,节奏推进感强」)。只出纯器乐:要人声/歌词/拟音当乐器都不会生效,会在 prompt_warnings 里点名但**不拦生成**。\n★prompt_mode: guide(默认)=你的要求与平台专业护栏(时代与题材匹配/配器节制/高潮保规模/段间差异)一起生效;override=直通,跳过护栏,只保留技术底线(纯器乐/时长/可循环)。override 效果自负,**先用 guide 试**,确实拧不过来再换。不传 prompt 时沿用该集上次填的(get_bgm_status 可查)。",
3672
+ "description": "给整集生成/更换 AI 配乐(按情绪弧线)。后台异步,按用量后付不欠费。返回情绪弧线段数与预估耗时;用 get_bgm_status 轮询生成进度。★配乐生成/改动**不会自动进已有成片**——完成后必须重新 compose_episode(免费)才能听到;get_final_cut 的 bgm_stale=true 就是在提示这一步。别用 re-render(吃旧时间线,不含新配乐)。\n★prompt 可选:不传=全自动(和以前一样)。传了就是在自动结果上再加方向,整集一条,系统仍按情绪弧线分幕。怎么写见 get_bgm_prompt_guide(免费);要点=只写音乐维度(情绪气质/主奏配器/速度动态/厚薄空间/风格参照),别写剧情(「主角发现真相时要紧张」→写「紧张,节奏推进感强」)。只出纯器乐:要人声/歌词/拟音当乐器都不会生效,会在 prompt_warnings 里点名但**不拦生成**。\n★prompt_mode: guide(默认)=你的要求与平台专业护栏(时代与题材匹配/配器节制/高潮保规模/段间差异)一起生效;override=直通,跳过护栏,只保留技术底线(纯器乐/时长/可循环)。override 效果自负,**先用 guide 试**,确实拧不过来再换。不传 prompt 时沿用该集上次填的(get_bgm_status 可查)。\n★director 可选=结构化锁定(硬约束):逐项指定 mood 情绪 / instruments 主奏配器 / bpm / tonality 大小调,生成时**强制覆盖**配乐总监的判断(不像 prompt 只是方向,可能被护栏或 AI 取舍改写);没锁的项仍自动判断。整集锁写在 director 顶层;只锁某一幕写进 director.acts[{act,…}](同名字段覆盖整集的)。幕是按情绪弧线自动分的:按幕锁之前先调一次 plan_only=true(免费,不生成)看本集分几幕、每幕覆盖哪些镜。参数拼错(bpm 越界、调性不是 major/minor/modal、幕号不存在)会 400;配器里写人声/环境声会被丢掉并在 director_warnings 点名。客户说「要慢一点、小调、用古筝」这类**明确参数**用 director;说「整体更压抑」这类**方向**用 prompt;两者可同时用。",
3673
3673
  "tags": [
3674
3674
  "episodes"
3675
3675
  ],
@@ -3700,6 +3700,95 @@
3700
3700
  "guide",
3701
3701
  "override"
3702
3702
  ]
3703
+ },
3704
+ "director": {
3705
+ "type": "object",
3706
+ "properties": {
3707
+ "mood": {
3708
+ "type": "array",
3709
+ "items": {
3710
+ "type": "string"
3711
+ },
3712
+ "maxItems": 3,
3713
+ "description": "情绪词,最多 3 个,每个 ≤12 字(如 压抑、苍凉)"
3714
+ },
3715
+ "instruments": {
3716
+ "type": "array",
3717
+ "items": {
3718
+ "type": "string"
3719
+ },
3720
+ "maxItems": 3,
3721
+ "description": "主奏乐器,最多 3 件,每件 ≤16 字(如 古筝、大提琴);人声/环境声会被丢掉"
3722
+ },
3723
+ "bpm": {
3724
+ "type": "number",
3725
+ "minimum": 40,
3726
+ "maximum": 160,
3727
+ "description": "速度 40~160"
3728
+ },
3729
+ "tonality": {
3730
+ "type": "string",
3731
+ "enum": [
3732
+ "major",
3733
+ "minor",
3734
+ "modal"
3735
+ ],
3736
+ "description": "major 大调明亮 / minor 小调暗色 / modal 调式色彩"
3737
+ },
3738
+ "acts": {
3739
+ "type": "array",
3740
+ "items": {
3741
+ "type": "object",
3742
+ "properties": {
3743
+ "act": {
3744
+ "type": "integer",
3745
+ "exclusiveMinimum": 0,
3746
+ "description": "幕序号,从 1 开始(plan_only=true 可查)"
3747
+ },
3748
+ "mood": {
3749
+ "type": "array",
3750
+ "items": {
3751
+ "type": "string"
3752
+ },
3753
+ "maxItems": 3,
3754
+ "description": "情绪词,最多 3 个,每个 ≤12 字(如 压抑、苍凉)"
3755
+ },
3756
+ "instruments": {
3757
+ "type": "array",
3758
+ "items": {
3759
+ "type": "string"
3760
+ },
3761
+ "maxItems": 3,
3762
+ "description": "主奏乐器,最多 3 件,每件 ≤16 字(如 古筝、大提琴);人声/环境声会被丢掉"
3763
+ },
3764
+ "bpm": {
3765
+ "type": "number",
3766
+ "minimum": 40,
3767
+ "maximum": 160,
3768
+ "description": "速度 40~160"
3769
+ },
3770
+ "tonality": {
3771
+ "type": "string",
3772
+ "enum": [
3773
+ "major",
3774
+ "minor",
3775
+ "modal"
3776
+ ],
3777
+ "description": "major 大调明亮 / minor 小调暗色 / modal 调式色彩"
3778
+ }
3779
+ },
3780
+ "required": [
3781
+ "act"
3782
+ ],
3783
+ "additionalProperties": false
3784
+ },
3785
+ "description": "按幕锁定;同名字段覆盖整集的,没写的继承整集"
3786
+ }
3787
+ },
3788
+ "additionalProperties": false
3789
+ },
3790
+ "plan_only": {
3791
+ "type": "boolean"
3703
3792
  }
3704
3793
  }
3705
3794
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@starreel/mcp",
3
- "version": "0.1.131",
3
+ "version": "0.1.132",
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.131",
5
+ "version": "0.1.132",
6
6
  "websiteUrl": "https://starreel.ai",
7
7
  "packages": [
8
8
  {
9
9
  "registryType": "npm",
10
10
  "identifier": "@starreel/mcp",
11
- "version": "0.1.131",
11
+ "version": "0.1.132",
12
12
  "transport": {
13
13
  "type": "stdio"
14
14
  },