@starreel/mcp 0.1.7 → 0.1.9
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/dist/tools/produce.js +14 -11
- package/package.json +1 -1
- package/server.json +2 -2
package/dist/tools/produce.js
CHANGED
|
@@ -29,6 +29,11 @@ const ETHNICITY_CODES = [
|
|
|
29
29
|
'caucasian', 'middle_eastern', 'african', 'latin_american',
|
|
30
30
|
'native_american', 'aboriginal_australian', 'mixed', 'custom',
|
|
31
31
|
];
|
|
32
|
+
// 画幅/分辨率的可选值 —— create_drama 与 update_project_settings **共用同一源**,防两处漂移。
|
|
33
|
+
// 与后端发现接口 produce-options.ts 的 ASPECT_RATIO_OPTIONS / VIDEO_RESOLUTION_OPTIONS 键集一致
|
|
34
|
+
// (video_resolution 与后端 VIDEO_RES_WHITELIST 钉死;aspect_ratio 后端柔性,这里给同一策展集)。
|
|
35
|
+
const ASPECT_RATIOS = ['9:16', '16:9', '1:1', '4:5', '4:3', '21:9'];
|
|
36
|
+
const VIDEO_RESOLUTIONS = ['480p', '720p', '1080p', '4k'];
|
|
32
37
|
/** 把友好 ethnicity 枚举 + note 组装成后端认的结构化族裔锁 { code, note? }。 */
|
|
33
38
|
function buildEthnicityLock(ethnicity, note) {
|
|
34
39
|
if (!ethnicity)
|
|
@@ -49,14 +54,8 @@ export function registerProduceTools(server, client) {
|
|
|
49
54
|
genre: z.string().optional().describe('题材,如 都市/悬疑/古装'),
|
|
50
55
|
style: z.string().optional().describe('风格描述'),
|
|
51
56
|
description: z.string().optional(),
|
|
52
|
-
aspect_ratio: z
|
|
53
|
-
|
|
54
|
-
.optional()
|
|
55
|
-
.describe('画幅比例(默认 9:16 竖屏短剧)'),
|
|
56
|
-
video_resolution: z
|
|
57
|
-
.enum(['480p', '720p', '1080p', '4k'])
|
|
58
|
-
.optional()
|
|
59
|
-
.describe('视频分辨率(默认 720p;成本随分辨率上升)'),
|
|
57
|
+
aspect_ratio: z.enum(ASPECT_RATIOS).optional().describe('画幅比例(默认 9:16 竖屏短剧)'),
|
|
58
|
+
video_resolution: z.enum(VIDEO_RESOLUTIONS).optional().describe('视频分辨率(默认 720p;成本随分辨率上升)'),
|
|
60
59
|
setting_brief: z
|
|
61
60
|
.string()
|
|
62
61
|
.optional()
|
|
@@ -106,7 +105,11 @@ export function registerProduceTools(server, client) {
|
|
|
106
105
|
server.tool('quote_storyboards', '报价:把某一集的剧本拆成分镜(storyboards)要多少点。返回 estimated_points 与 quote_id。零扣费。' +
|
|
107
106
|
'拿到后把点数告诉用户征求同意,再用 quote_id 调 generate_storyboards。', { episode_id: z.number().int().positive() }, async ({ episode_id }) => jsonResult(await client.producePost(`/episodes/${episode_id}/storyboards/quote`)));
|
|
108
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 })));
|
|
109
|
-
server.tool('get_storyboards', '读某一集的分镜列表(供审阅/查进度)。含每镜首帧(first_frame_image)与视频(video_url)
|
|
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`)));
|
|
110
113
|
// ---------- 出首帧(frames) ----------
|
|
111
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`)));
|
|
112
115
|
server.tool('generate_frames', '确认后批量出首帧:后台异步。用 get_storyboards 轮询,first_frame_image 逐镜填充即完成。' +
|
|
@@ -129,8 +132,8 @@ export function registerProduceTools(server, client) {
|
|
|
129
132
|
style: z.string().optional(),
|
|
130
133
|
description: z.string().optional(),
|
|
131
134
|
tags: z.array(z.string()).optional(),
|
|
132
|
-
aspect_ratio: z.enum(
|
|
133
|
-
video_resolution: z.enum(
|
|
135
|
+
aspect_ratio: z.enum(ASPECT_RATIOS).optional(),
|
|
136
|
+
video_resolution: z.enum(VIDEO_RESOLUTIONS).optional(),
|
|
134
137
|
setting_brief: z.string().optional().describe('世界观 Brief(ERA LOCK)'),
|
|
135
138
|
ethnicity: z.enum(ETHNICITY_CODES).optional().describe('角色族裔锁'),
|
|
136
139
|
ethnicity_note: z.string().optional(),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starreel/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
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.
|
|
5
|
+
"version": "0.1.9",
|
|
6
6
|
"websiteUrl": "https://starreel.ai",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "@starreel/mcp",
|
|
11
|
-
"version": "0.1.
|
|
11
|
+
"version": "0.1.9",
|
|
12
12
|
"transport": { "type": "stdio" },
|
|
13
13
|
"environmentVariables": [
|
|
14
14
|
{
|