@starreel/mcp 0.1.120 → 0.1.122
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/SKILL.md +2 -1
- package/dist/client.js +25 -0
- package/dist/tools/produce.js +20 -0
- package/openapi.json +185 -2
- package/package.json +1 -1
- package/server.json +2 -2
package/SKILL.md
CHANGED
|
@@ -92,7 +92,8 @@ announces a condensed version as MCP `instructions` at connect time.
|
|
|
92
92
|
| A song + lyrics | `create_drama` (`project_type: "mv"`) → `set_mv_lyrics` → `generate_mv_story` → `generate_mv_script` | `rewrite_script` (blocked for MV) |
|
|
93
93
|
| A product / brand | `create_drama` (`project_type: "ad"` or `"brand_film"`) → `add_product` → `generate_product_sheet` | writing brand copy as dialogue (it gets spoken) |
|
|
94
94
|
| Generated shots / a cut that needs changes | `scan_dialogue_coverage` / `scan_intra_shot_cuts` first, then `get_shot_prompts` · `update_shot` · `replace_shot_dialogue` · `repair_episode_dialogue` · `split_shot` · `trim_shot` · `regenerate_shot_video` · `edit_video_shot` → `rerender_episode` | re-composing to fix what a clip *says* |
|
|
95
|
-
| Wants old portraits / sheets / a shot's old tail frame "deleted" | `set_character_portrait` (old assets listed in `old_assets`) · `clear_shot_frame` (old tail frame) → `regenerate_shot_video
|
|
95
|
+
| Wants old portraits / sheets / a shot's old tail frame "deleted" | `set_character_portrait` (old assets listed in `old_assets`) · `clear_shot_frame` (old tail frame) → `regenerate_shot_video`; `list_unlinked_assets` lists the drama's unlinked old assets (a history list, not proof of ownership). Both only **unlink** — files are not deleted (`physically_deleted` is always empty; `in_history: false` means the platform kept no record, so save that URL if it matters). Tell the customer exactly that | telling the customer the old image was deleted; writing `last_frame_image: null` through the internal API |
|
|
96
|
+
| Wants an old image **permanently** deleted from storage (not just unlinked) | `preview_delete_asset` → show the customer exactly what it says (blocking references, history that will break, copies) → only after an explicit "confirm delete" → `delete_asset` with the `confirm_token`. Irreversible; only the drama owner; only files with trusted provenance (generated for this drama, or uploaded through the platform with a grant record) | deleting without showing the preview; retrying automatically; treating `list_unlinked_assets` as proof the file is unused |
|
|
96
97
|
| Cross-era drama (scenes in different periods) — checking props fit their period | `get_props` → read each prop's `era_audit` (`form_consistent`, `conflicting_scopes`, `violations`); `audit_prop_era` to re-check after a new sheet. On a conflict: `update_prop` with a precise `era_lock` (dynasty + physical form) → `generate_prop_sheet`, or bind a different prop to those shots. `run_precheck` also lists shots whose bound prop conflicts (`prop-era-conflict`) | trusting the prop's name or description alone; regenerating shot frames before the prop sheet is fixed |
|
|
97
98
|
| Wants to assemble the cut themselves | `export_handoff_pack` → `get_handoff_toolchain` → **`register_external_delivery`** when the cut is final | `compose_episode` (pick one); delivering a cut the platform has no record of |
|
|
98
99
|
| A multi-language release | `translate_subtitles` · `subtitle_secondary_lang` in project settings | — |
|
package/dist/client.js
CHANGED
|
@@ -119,6 +119,31 @@ export class StarReelClient {
|
|
|
119
119
|
throw new Error(body?.message ?? body?.error ?? `HTTP ${res.status} on ${path}`);
|
|
120
120
|
return (body?.data ?? body); // StarReel 信封 {code,data,message}
|
|
121
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* 非 2xx 也不抛错:把状态码和完整响应体原样返回。给那些失败响应本身带结构化回执的端点用
|
|
124
|
+
* (如真删除的部分失败 502 回执——produce() 抛错只留 message,回执会被丢掉)。
|
|
125
|
+
*/
|
|
126
|
+
async producePostRaw(path, body) {
|
|
127
|
+
let res;
|
|
128
|
+
try {
|
|
129
|
+
res = await this.authedFetch(`${AUTH_BASE}/v1/produce${path}`, {
|
|
130
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
131
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
catch (e) {
|
|
135
|
+
throw new Error(`StarReel production pipeline unreachable (${AUTH_BASE}): ${e?.cause?.code ?? e?.message ?? e}. Retry later or check with StarReel.`);
|
|
136
|
+
}
|
|
137
|
+
const text = await res.text();
|
|
138
|
+
let parsed;
|
|
139
|
+
try {
|
|
140
|
+
parsed = JSON.parse(text);
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
parsed = { raw: text.slice(0, 300) };
|
|
144
|
+
}
|
|
145
|
+
return { http_status: res.status, ok: res.ok, body: parsed };
|
|
146
|
+
}
|
|
122
147
|
produceGet(path) {
|
|
123
148
|
return this.produce(path, { method: 'GET' });
|
|
124
149
|
}
|
package/dist/tools/produce.js
CHANGED
|
@@ -1145,6 +1145,26 @@ export function registerProduceTools(server, client) {
|
|
|
1145
1145
|
const video_url = await client.uploadLocalFile(file_path, 'footage');
|
|
1146
1146
|
return jsonResult(await client.producePost(`/storyboards/${storyboard_id}/footage`, { video_url }));
|
|
1147
1147
|
});
|
|
1148
|
+
server.tool('list_unlinked_assets', '列出本剧「已解除引用」的旧资产(免费):清尾帧、换定妆图时被摘下来的旧尾帧/旧定妆图/旧设定图/发型·身体参考/视频锚,每个 URL 一条。' +
|
|
1149
|
+
'这些文件仍然存在于存储里。清单会尽量排除已被重新用上的图,但不保证完全排除——某张图是否还在别处被引用,' +
|
|
1150
|
+
'以平台的全库检查为准。客户问「旧图还在不在」时用它。', { drama_id: z.number().int().positive() }, async ({ drama_id }) => jsonResult(await client.produceGet(`/dramas/${drama_id}/unlinked-assets`)));
|
|
1151
|
+
server.tool('preview_delete_asset', '预览「真删除」某个旧资产文件(免费、只读)。真删除会从存储里**永久删除**这张图的全部版本,不可撤销。' +
|
|
1152
|
+
'返回 deletable(能不能删)、reasons(不能删的原因,如 still-referenced 仍被引用 / no-trusted-provenance 无法证明归属 / not-drama-owner 不是剧主)、' +
|
|
1153
|
+
'blocking(还在引用它的位置)、history(会失效的历史记录条数)、copies(各存储桶里的版本数),能删时附 confirm_token(10 分钟内有效、只能用一次)。' +
|
|
1154
|
+
'★必须把预览结果原样告诉客户,客户明确说「确认删除」后才能调 delete_asset;不要替客户做决定。' +
|
|
1155
|
+
'只有剧主能删;只能删能证明归属的文件——平台为本剧生成的图,或客户通过平台上传(上传时有签发记录)的图;更早上传、没有签发记录的图删不了,只能解除引用。', { drama_id: z.number().int().positive(), url: z.string().describe('要删除的图片地址(通常来自 list_unlinked_assets 或解除引用回执)') }, async ({ drama_id, url }) => jsonResult(await client.producePost(`/dramas/${drama_id}/asset-delete/preview`, { url })));
|
|
1156
|
+
server.tool('delete_asset', '★不可撤销:永久删除某个旧资产文件的全部版本(两个存储桶)。必须先 preview_delete_asset,把结果给客户看,客户明确确认后,' +
|
|
1157
|
+
'带上同一个 url 与预览返回的 confirm_token 调用。执行前平台会重跑全部检查,影响范围和预览时不一致会拒绝(409),需要重新预览。' +
|
|
1158
|
+
'部分副本删除失败会返回 502 与回执,文件可能还在,可重新预览后重试。不要自动重试、不要批量删除客户没逐个确认过的文件。', {
|
|
1159
|
+
drama_id: z.number().int().positive(),
|
|
1160
|
+
url: z.string(),
|
|
1161
|
+
confirm_token: z.string().describe('preview_delete_asset 返回的一次性确认凭证'),
|
|
1162
|
+
},
|
|
1163
|
+
// 失败响应自带结构化回执(哪个桶删了几个版本、哪些失败)——用不抛错的调用原样交给 agent(#684 review)
|
|
1164
|
+
async ({ drama_id, url, confirm_token }) => {
|
|
1165
|
+
const r = await client.producePostRaw(`/dramas/${drama_id}/asset-delete`, { url, confirm_token });
|
|
1166
|
+
return jsonResult(r.ok ? (r.body?.data ?? r.body) : { http_status: r.http_status, ...r.body });
|
|
1167
|
+
});
|
|
1148
1168
|
server.tool('clear_shot_frame', '清除某镜的尾帧(解除引用,免费)。用于换了定妆图/改了剧情后,旧尾帧会把旧人物/旧画面带进重生的视频时,先清掉它再 regenerate_shot_video。' +
|
|
1149
1169
|
'只能清尾帧:首帧是出视频的起点,要换首帧用 generate_shot_frame 重生或 upload_shot_frame 替换。' +
|
|
1150
1170
|
'★这是解除引用,不是删除:文件不会被删,响应里 unlinked[].in_history=true 的可在 get_asset_versions 找回,physically_deleted 恒为空——如实告诉客户。' +
|
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.
|
|
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.
|
|
5
|
+
"version": "0.1.122",
|
|
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.122 tool surface (operationIds match MCP tool names 1:1)."
|
|
7
7
|
},
|
|
8
8
|
"servers": [
|
|
9
9
|
{
|
|
@@ -1358,6 +1358,142 @@
|
|
|
1358
1358
|
}
|
|
1359
1359
|
}
|
|
1360
1360
|
},
|
|
1361
|
+
"/dramas/{drama_id}/asset-delete": {
|
|
1362
|
+
"post": {
|
|
1363
|
+
"operationId": "delete_asset",
|
|
1364
|
+
"summary": "★不可撤销:永久删除某个旧资产文件的全部版本(两个存储桶)",
|
|
1365
|
+
"description": "★不可撤销:永久删除某个旧资产文件的全部版本(两个存储桶)。必须先 preview_delete_asset,把结果给客户看,客户明确确认后,带上同一个 url 与预览返回的 confirm_token 调用。执行前平台会重跑全部检查,影响范围和预览时不一致会拒绝(409),需要重新预览。部分副本删除失败会返回 502 与回执,文件可能还在,可重新预览后重试。不要自动重试、不要批量删除客户没逐个确认过的文件。",
|
|
1366
|
+
"tags": [
|
|
1367
|
+
"dramas"
|
|
1368
|
+
],
|
|
1369
|
+
"parameters": [
|
|
1370
|
+
{
|
|
1371
|
+
"name": "drama_id",
|
|
1372
|
+
"in": "path",
|
|
1373
|
+
"required": true,
|
|
1374
|
+
"schema": {
|
|
1375
|
+
"type": "integer",
|
|
1376
|
+
"exclusiveMinimum": 0
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
],
|
|
1380
|
+
"requestBody": {
|
|
1381
|
+
"required": true,
|
|
1382
|
+
"content": {
|
|
1383
|
+
"application/json": {
|
|
1384
|
+
"schema": {
|
|
1385
|
+
"type": "object",
|
|
1386
|
+
"properties": {
|
|
1387
|
+
"url": {
|
|
1388
|
+
"type": "string"
|
|
1389
|
+
},
|
|
1390
|
+
"confirm_token": {
|
|
1391
|
+
"type": "string",
|
|
1392
|
+
"description": "preview_delete_asset 返回的一次性确认凭证"
|
|
1393
|
+
}
|
|
1394
|
+
},
|
|
1395
|
+
"required": [
|
|
1396
|
+
"url",
|
|
1397
|
+
"confirm_token"
|
|
1398
|
+
]
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
},
|
|
1403
|
+
"responses": {
|
|
1404
|
+
"200": {
|
|
1405
|
+
"description": "StarReel envelope",
|
|
1406
|
+
"content": {
|
|
1407
|
+
"application/json": {
|
|
1408
|
+
"schema": {
|
|
1409
|
+
"type": "object",
|
|
1410
|
+
"properties": {
|
|
1411
|
+
"code": {
|
|
1412
|
+
"type": "integer"
|
|
1413
|
+
},
|
|
1414
|
+
"message": {
|
|
1415
|
+
"type": "string"
|
|
1416
|
+
},
|
|
1417
|
+
"data": {
|
|
1418
|
+
"description": "Operation result payload"
|
|
1419
|
+
}
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
}
|
|
1423
|
+
}
|
|
1424
|
+
},
|
|
1425
|
+
"402": {
|
|
1426
|
+
"description": "Insufficient prepaid balance (never overdrafts); response carries `needed` points"
|
|
1427
|
+
}
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
},
|
|
1431
|
+
"/dramas/{drama_id}/asset-delete/preview": {
|
|
1432
|
+
"post": {
|
|
1433
|
+
"operationId": "preview_delete_asset",
|
|
1434
|
+
"summary": "预览「真删除」某个旧资产文件(免费、只读)",
|
|
1435
|
+
"description": "预览「真删除」某个旧资产文件(免费、只读)。真删除会从存储里**永久删除**这张图的全部版本,不可撤销。返回 deletable(能不能删)、reasons(不能删的原因,如 still-referenced 仍被引用 / no-trusted-provenance 无法证明归属 / not-drama-owner 不是剧主)、blocking(还在引用它的位置)、history(会失效的历史记录条数)、copies(各存储桶里的版本数),能删时附 confirm_token(10 分钟内有效、只能用一次)。★必须把预览结果原样告诉客户,客户明确说「确认删除」后才能调 delete_asset;不要替客户做决定。只有剧主能删;只能删能证明归属的文件——平台为本剧生成的图,或客户通过平台上传(上传时有签发记录)的图;更早上传、没有签发记录的图删不了,只能解除引用。",
|
|
1436
|
+
"tags": [
|
|
1437
|
+
"dramas"
|
|
1438
|
+
],
|
|
1439
|
+
"parameters": [
|
|
1440
|
+
{
|
|
1441
|
+
"name": "drama_id",
|
|
1442
|
+
"in": "path",
|
|
1443
|
+
"required": true,
|
|
1444
|
+
"schema": {
|
|
1445
|
+
"type": "integer",
|
|
1446
|
+
"exclusiveMinimum": 0
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
],
|
|
1450
|
+
"requestBody": {
|
|
1451
|
+
"required": true,
|
|
1452
|
+
"content": {
|
|
1453
|
+
"application/json": {
|
|
1454
|
+
"schema": {
|
|
1455
|
+
"type": "object",
|
|
1456
|
+
"properties": {
|
|
1457
|
+
"url": {
|
|
1458
|
+
"type": "string",
|
|
1459
|
+
"description": "要删除的图片地址(通常来自 list_unlinked_assets 或解除引用回执)"
|
|
1460
|
+
}
|
|
1461
|
+
},
|
|
1462
|
+
"required": [
|
|
1463
|
+
"url"
|
|
1464
|
+
]
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
},
|
|
1469
|
+
"responses": {
|
|
1470
|
+
"200": {
|
|
1471
|
+
"description": "StarReel envelope",
|
|
1472
|
+
"content": {
|
|
1473
|
+
"application/json": {
|
|
1474
|
+
"schema": {
|
|
1475
|
+
"type": "object",
|
|
1476
|
+
"properties": {
|
|
1477
|
+
"code": {
|
|
1478
|
+
"type": "integer"
|
|
1479
|
+
},
|
|
1480
|
+
"message": {
|
|
1481
|
+
"type": "string"
|
|
1482
|
+
},
|
|
1483
|
+
"data": {
|
|
1484
|
+
"description": "Operation result payload"
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
},
|
|
1491
|
+
"402": {
|
|
1492
|
+
"description": "Insufficient prepaid balance (never overdrafts); response carries `needed` points"
|
|
1493
|
+
}
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
},
|
|
1361
1497
|
"/dramas/{drama_id}/assets": {
|
|
1362
1498
|
"get": {
|
|
1363
1499
|
"operationId": "get_assets",
|
|
@@ -2732,6 +2868,53 @@
|
|
|
2732
2868
|
}
|
|
2733
2869
|
}
|
|
2734
2870
|
},
|
|
2871
|
+
"/dramas/{drama_id}/unlinked-assets": {
|
|
2872
|
+
"get": {
|
|
2873
|
+
"operationId": "list_unlinked_assets",
|
|
2874
|
+
"summary": "列出本剧「已解除引用」的旧资产(免费):清尾帧、换定妆图时被摘下来的旧尾帧/旧定妆图/旧设定图/发型·身体参考/视频锚,每个 URL 一条",
|
|
2875
|
+
"description": "列出本剧「已解除引用」的旧资产(免费):清尾帧、换定妆图时被摘下来的旧尾帧/旧定妆图/旧设定图/发型·身体参考/视频锚,每个 URL 一条。这些文件仍然存在于存储里。清单会尽量排除已被重新用上的图,但不保证完全排除——某张图是否还在别处被引用,以平台的全库检查为准。客户问「旧图还在不在」时用它。",
|
|
2876
|
+
"tags": [
|
|
2877
|
+
"dramas"
|
|
2878
|
+
],
|
|
2879
|
+
"parameters": [
|
|
2880
|
+
{
|
|
2881
|
+
"name": "drama_id",
|
|
2882
|
+
"in": "path",
|
|
2883
|
+
"required": true,
|
|
2884
|
+
"schema": {
|
|
2885
|
+
"type": "integer",
|
|
2886
|
+
"exclusiveMinimum": 0
|
|
2887
|
+
}
|
|
2888
|
+
}
|
|
2889
|
+
],
|
|
2890
|
+
"responses": {
|
|
2891
|
+
"200": {
|
|
2892
|
+
"description": "StarReel envelope",
|
|
2893
|
+
"content": {
|
|
2894
|
+
"application/json": {
|
|
2895
|
+
"schema": {
|
|
2896
|
+
"type": "object",
|
|
2897
|
+
"properties": {
|
|
2898
|
+
"code": {
|
|
2899
|
+
"type": "integer"
|
|
2900
|
+
},
|
|
2901
|
+
"message": {
|
|
2902
|
+
"type": "string"
|
|
2903
|
+
},
|
|
2904
|
+
"data": {
|
|
2905
|
+
"description": "Operation result payload"
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
}
|
|
2909
|
+
}
|
|
2910
|
+
}
|
|
2911
|
+
},
|
|
2912
|
+
"402": {
|
|
2913
|
+
"description": "Insufficient prepaid balance (never overdrafts); response carries `needed` points"
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
}
|
|
2917
|
+
},
|
|
2735
2918
|
"/dramas/{drama_id}/video-style": {
|
|
2736
2919
|
"post": {
|
|
2737
2920
|
"operationId": "generate_video_style",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@starreel/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.122",
|
|
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.122",
|
|
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.122",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
},
|