@infimind/video-mcp-cli 1.0.12 → 1.0.13

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.
@@ -10,9 +10,21 @@ const statusAnnotations = {
10
10
  idempotentHint: true,
11
11
  openWorldHint: false,
12
12
  };
13
- const nullableString = (title, description) => ({ type: ["string", "null"], title, description });
14
- const nullableBoolean = (title, description) => ({ type: ["boolean", "null"], title, description });
15
- const nullableNumber = (title, description) => ({ type: ["number", "null"], title, description });
13
+ const nullableString = (title, description) => ({
14
+ type: ["string", "null"],
15
+ title,
16
+ description,
17
+ });
18
+ const nullableBoolean = (title, description) => ({
19
+ type: ["boolean", "null"],
20
+ title,
21
+ description,
22
+ });
23
+ const nullableNumber = (title, description) => ({
24
+ type: ["number", "null"],
25
+ title,
26
+ description,
27
+ });
16
28
  const structuredErrorProperties = {
17
29
  errorCode: nullableString("错误代码", "处理失败时的机器可读错误代码;未失败时为空。"),
18
30
  errorCategory: nullableString("错误分类", "处理失败时的错误类别;未失败时为空。"),
@@ -30,11 +42,38 @@ export const MCP_CREATIVE_TOOLS = [
30
42
  title: "人物动作模仿参数",
31
43
  description: "创建人物动作模仿或人物替换视频任务所需的参考素材和生成配置。",
32
44
  properties: {
33
- sourceImage: { type: "string", title: "人物参考图片", description: "必填。包含目标人物的本地 JPG/PNG 图片路径或公网 URL。" },
34
- referenceVideo: { type: "string", title: "动作参考视频", description: "必填。包含需要模仿动作的本地 MP4 视频路径或公网 URL。" },
35
- mode: { type: "string", title: "模仿模式", enum: ["move", "mix"], default: "move", description: "可选。move=让图片人物模仿参考动作,mix=用图片人物替换参考视频中的人物;默认 move。" },
36
- quality: { type: "string", title: "生成质量", enum: ["std", "pro"], default: "std", description: "可选。std=标准质量,pro=更高质量;默认 std。" },
37
- count: { type: "integer", title: "生成数量", minimum: 1, maximum: 10, default: 1, description: "可选。需要生成的视频数量,范围 1–10,默认 1。" },
45
+ sourceImage: {
46
+ type: "string",
47
+ title: "人物参考图片",
48
+ description: "必填。包含目标人物的本地 JPG/PNG 图片路径或公网 URL。",
49
+ },
50
+ referenceVideo: {
51
+ type: "string",
52
+ title: "动作参考视频",
53
+ description: "必填。包含需要模仿动作的本地 MP4 视频路径或公网 URL。",
54
+ },
55
+ mode: {
56
+ type: "string",
57
+ title: "模仿模式",
58
+ enum: ["move", "mix"],
59
+ default: "move",
60
+ description: "可选。move=让图片人物模仿参考动作,mix=用图片人物替换参考视频中的人物;默认 move。",
61
+ },
62
+ quality: {
63
+ type: "string",
64
+ title: "生成质量",
65
+ enum: ["std", "pro"],
66
+ default: "std",
67
+ description: "可选。std=标准质量,pro=更高质量;默认 std。",
68
+ },
69
+ count: {
70
+ type: "integer",
71
+ title: "生成数量",
72
+ minimum: 1,
73
+ maximum: 10,
74
+ default: 1,
75
+ description: "可选。需要生成的视频数量,范围 1–10,默认 1。",
76
+ },
38
77
  referenceVideoDurationSeconds: {
39
78
  type: "number",
40
79
  title: "参考视频时长",
@@ -42,7 +81,12 @@ export const MCP_CREATIVE_TOOLS = [
42
81
  maximum: 30,
43
82
  description: "可选。仅在 dryRun 预检时用于估算积分,单位为秒,须大于 0 且不超过 30;正式创建时由服务检测素材时长。",
44
83
  },
45
- dryRun: { type: "boolean", title: "仅预检", default: false, description: "可选。设为 true 时仅校验素材,并在提供 referenceVideoDurationSeconds 时估算积分,不创建任务且不扣费;默认 false。" },
84
+ dryRun: {
85
+ type: "boolean",
86
+ title: "仅预检",
87
+ default: false,
88
+ description: "可选。设为 true 时仅校验素材,并在提供 referenceVideoDurationSeconds 时估算积分,不创建任务且不扣费;默认 false。",
89
+ },
46
90
  },
47
91
  required: ["sourceImage", "referenceVideo"],
48
92
  additionalProperties: false,
@@ -52,28 +96,81 @@ export const MCP_CREATIVE_TOOLS = [
52
96
  title: "动作模仿任务创建结果",
53
97
  description: "返回任务标识、生成配置、积分信息和后续查询提示;预检或失败时部分字段可能为空或不返回。",
54
98
  properties: {
55
- success: { type: "boolean", title: "是否成功", description: "表示任务创建或预检请求是否成功。" },
56
- dryRun: { type: "boolean", title: "是否仅预检", description: "表示本次请求是否只进行了预检而未创建任务。" },
57
- taskId: { type: "number", title: "任务 ID", description: "创建成功后返回的动作模仿任务 ID;dryRun 或失败时可能不返回,请用于调用 get_motion_video_remake_status。" },
58
- mode: { type: "string", title: "模仿模式", description: "本次任务实际使用的模仿模式。" },
59
- quality: { type: "string", title: "生成质量", description: "本次任务实际使用的生成质量。" },
60
- count: { type: "number", title: "生成数量", description: "本次任务计划生成的视频数量。" },
99
+ success: {
100
+ type: "boolean",
101
+ title: "是否成功",
102
+ description: "表示任务创建或预检请求是否成功。",
103
+ },
104
+ dryRun: {
105
+ type: "boolean",
106
+ title: "是否仅预检",
107
+ description: "表示本次请求是否只进行了预检而未创建任务。",
108
+ },
109
+ taskId: {
110
+ type: "number",
111
+ title: "任务 ID",
112
+ description: "创建成功后返回的动作模仿任务 ID;dryRun 或失败时可能不返回,请用于调用 get_motion_video_remake_status。",
113
+ },
114
+ mode: {
115
+ type: "string",
116
+ title: "模仿模式",
117
+ description: "本次任务实际使用的模仿模式。",
118
+ },
119
+ quality: {
120
+ type: "string",
121
+ title: "生成质量",
122
+ description: "本次任务实际使用的生成质量。",
123
+ },
124
+ count: {
125
+ type: "number",
126
+ title: "生成数量",
127
+ description: "本次任务计划生成的视频数量。",
128
+ },
61
129
  detectedDurationSeconds: nullableNumber("检测视频时长", "服务检测到的参考视频时长,单位为秒;预检或尚未检测时可能为空。"),
62
130
  durationHintSeconds: nullableNumber("提示视频时长", "dryRun 请求提供的参考视频时长,单位为秒;未提供时为空。"),
63
131
  creditsPerVideo: nullableNumber("单个视频积分", "预计生成单个视频所需的积分;无法估算时为空。"),
64
132
  estimatedCredits: nullableNumber("预估总积分", "预计完成全部视频所需的积分;无法估算时为空。"),
65
- estimateSource: { type: "string", title: "估算依据", description: "积分估算依据:server_validated=服务检测素材,duration_hint=采用时长提示,unavailable=暂时无法估算。", enum: ["server_validated", "duration_hint", "unavailable"] },
66
- creditsDeducted: { type: "number", title: "已扣积分", description: "本次请求实际扣除的积分;dryRun 时为 0。" },
67
- remainingCredits: { type: "number", title: "剩余积分", description: "请求处理后的账户剩余积分。" },
133
+ estimateSource: {
134
+ type: "string",
135
+ title: "估算依据",
136
+ description: "积分估算依据:server_validated=服务检测素材,duration_hint=采用时长提示,unavailable=暂时无法估算。",
137
+ enum: ["server_validated", "duration_hint", "unavailable"],
138
+ },
139
+ creditsDeducted: {
140
+ type: "number",
141
+ title: "已扣积分",
142
+ description: "本次请求实际扣除的积分;dryRun 时为 0。",
143
+ },
144
+ remainingCredits: {
145
+ type: "number",
146
+ title: "剩余积分",
147
+ description: "请求处理后的账户剩余积分。",
148
+ },
68
149
  validationWarnings: {
69
150
  type: "array",
70
151
  title: "预检警告",
71
152
  description: "参数或素材预检产生的非阻断性提示列表。",
72
- items: { type: "string", title: "预检警告项", description: "一条需要关注但不阻断请求的预检提示。" },
153
+ items: {
154
+ type: "string",
155
+ title: "预检警告项",
156
+ description: "一条需要关注但不阻断请求的预检提示。",
157
+ },
158
+ },
159
+ statusHint: {
160
+ type: "string",
161
+ title: "后续操作提示",
162
+ description: "提示是否应使用 taskId 调用 get_motion_video_remake_status 查询任务进度。",
163
+ },
164
+ code: {
165
+ type: "string",
166
+ title: "错误代码",
167
+ description: "请求失败时返回的机器可读错误代码,成功时可能不返回。",
168
+ },
169
+ message: {
170
+ type: "string",
171
+ title: "结果消息",
172
+ description: "请求结果或失败原因的可读说明。",
73
173
  },
74
- statusHint: { type: "string", title: "后续操作提示", description: "提示是否应使用 taskId 调用 get_motion_video_remake_status 查询任务进度。" },
75
- code: { type: "string", title: "错误代码", description: "请求失败时返回的机器可读错误代码,成功时可能不返回。" },
76
- message: { type: "string", title: "结果消息", description: "请求结果或失败原因的可读说明。" },
77
174
  },
78
175
  required: ["success"],
79
176
  additionalProperties: false,
@@ -89,7 +186,11 @@ export const MCP_CREATIVE_TOOLS = [
89
186
  title: "动作模仿任务查询参数",
90
187
  description: "指定需要查询的人物动作模仿任务。",
91
188
  properties: {
92
- taskId: { type: "integer", title: "任务 ID", description: "必填。由 create_motion_video_remake_task 返回的任务 ID,请原样传入并用于后续轮询。" },
189
+ taskId: {
190
+ type: "integer",
191
+ title: "任务 ID",
192
+ description: "必填。由 create_motion_video_remake_task 返回的任务 ID,请原样传入并用于后续轮询。",
193
+ },
93
194
  },
94
195
  required: ["taskId"],
95
196
  additionalProperties: false,
@@ -99,16 +200,56 @@ export const MCP_CREATIVE_TOOLS = [
99
200
  title: "动作模仿视频状态与结果",
100
201
  description: "返回任务进度、视频结果和错误信息;任务未完成时结果链接和完成时间可能为空。",
101
202
  properties: {
102
- success: { type: "boolean", title: "是否成功", description: "表示查询请求是否成功。" },
103
- taskId: { type: "number", title: "任务 ID", description: "当前查询的动作模仿任务 ID。" },
104
- status: { type: "string", title: "任务状态", description: "任务当前的处理状态;未完成时应稍后继续查询。" },
105
- progress: { type: "number", title: "总体进度", description: "任务总体处理进度,通常为 0–100 的数值。" },
106
- mode: { type: "string", title: "模仿模式", description: "任务使用的模仿模式。" },
107
- quality: { type: "string", title: "生成质量", description: "任务使用的生成质量。" },
108
- count: { type: "number", title: "视频数量", description: "任务计划生成的视频数量。" },
109
- videoDuration: { type: "number", title: "参考视频时长", description: "参考动作视频的时长,单位为秒。" },
110
- createdAt: { type: ["string", "null"], title: "创建时间", description: "任务创建时间;不可用时为空。" },
111
- completedAt: { type: ["string", "null"], title: "完成时间", description: "任务完成时间;未完成时为空。" },
203
+ success: {
204
+ type: "boolean",
205
+ title: "是否成功",
206
+ description: "表示查询请求是否成功。",
207
+ },
208
+ taskId: {
209
+ type: "number",
210
+ title: "任务 ID",
211
+ description: "当前查询的动作模仿任务 ID。",
212
+ },
213
+ status: {
214
+ type: "string",
215
+ title: "任务状态",
216
+ description: "任务当前的处理状态;未完成时应稍后继续查询。",
217
+ },
218
+ progress: {
219
+ type: "number",
220
+ title: "总体进度",
221
+ description: "任务总体处理进度,通常为 0–100 的数值。",
222
+ },
223
+ mode: {
224
+ type: "string",
225
+ title: "模仿模式",
226
+ description: "任务使用的模仿模式。",
227
+ },
228
+ quality: {
229
+ type: "string",
230
+ title: "生成质量",
231
+ description: "任务使用的生成质量。",
232
+ },
233
+ count: {
234
+ type: "number",
235
+ title: "视频数量",
236
+ description: "任务计划生成的视频数量。",
237
+ },
238
+ videoDuration: {
239
+ type: "number",
240
+ title: "参考视频时长",
241
+ description: "参考动作视频的时长,单位为秒。",
242
+ },
243
+ createdAt: {
244
+ type: ["string", "null"],
245
+ title: "创建时间",
246
+ description: "任务创建时间;不可用时为空。",
247
+ },
248
+ completedAt: {
249
+ type: ["string", "null"],
250
+ title: "完成时间",
251
+ description: "任务完成时间;未完成时为空。",
252
+ },
112
253
  ...structuredErrorProperties,
113
254
  results: {
114
255
  type: "array",
@@ -119,8 +260,16 @@ export const MCP_CREATIVE_TOOLS = [
119
260
  title: "动作模仿视频结果",
120
261
  description: "一个动作模仿视频的处理状态、访问链接、时间和错误信息。",
121
262
  properties: {
122
- resultId: { type: "number", title: "视频结果 ID", description: "该视频结果在任务中的唯一标识。" },
123
- status: { type: "string", title: "视频状态", description: "该视频当前的生成状态。" },
263
+ resultId: {
264
+ type: "number",
265
+ title: "视频结果 ID",
266
+ description: "该视频结果在任务中的唯一标识。",
267
+ },
268
+ status: {
269
+ type: "string",
270
+ title: "视频状态",
271
+ description: "该视频当前的生成状态。",
272
+ },
124
273
  videoUrl: nullableString("视频 URL", "生成完成后的视频访问 URL;未完成或失败时为空。"),
125
274
  thumbnailUrl: nullableString("缩略图 URL", "视频缩略图访问 URL;尚未生成时为空。"),
126
275
  createdAt: nullableString("创建时间", "该视频结果的创建时间;不可用时为空。"),
@@ -131,8 +280,16 @@ export const MCP_CREATIVE_TOOLS = [
131
280
  additionalProperties: false,
132
281
  },
133
282
  },
134
- code: { type: "string", title: "查询错误代码", description: "查询请求失败时返回的机器可读错误代码,成功时可能不返回。" },
135
- message: { type: "string", title: "查询消息", description: "查询结果或失败原因的可读说明。" },
283
+ code: {
284
+ type: "string",
285
+ title: "查询错误代码",
286
+ description: "查询请求失败时返回的机器可读错误代码,成功时可能不返回。",
287
+ },
288
+ message: {
289
+ type: "string",
290
+ title: "查询消息",
291
+ description: "查询结果或失败原因的可读说明。",
292
+ },
136
293
  },
137
294
  required: ["success"],
138
295
  additionalProperties: false,
@@ -148,15 +305,58 @@ export const MCP_CREATIVE_TOOLS = [
148
305
  title: "电商视频分镜参数",
149
306
  description: "创建电商视频分镜任务所需的商品信息和内容配置。",
150
307
  properties: {
151
- productName: { type: "string", title: "商品名称", description: "必填。需要创作电商视频分镜的商品名称。" },
152
- productDescription: { type: "string", title: "商品描述", description: "必填。描述商品功能、核心卖点、使用场景和希望强调的信息。" },
153
- targetAudience: { type: "string", title: "目标受众", description: "可选。视频希望触达的人群特征,用于调整剧情和表达方式。" },
154
- videoStyle: { type: "string", title: "视频风格", description: "可选。期望的视觉、叙事或营销风格。" },
155
- productImage: { type: "string", title: "商品图片", description: "可选。展示商品的本地 JPG/PNG/WebP 图片路径或公网 URL。" },
156
- targetDuration: { type: "integer", title: "目标时长", enum: [30, 60, 90, 120], default: 60, description: "可选。计划成片的目标时长,单位为秒,可选 30、60、90 或 120,默认 60。" },
157
- language: { type: "string", title: "内容输出语言", enum: ["zh-CN", "en"], default: "zh-CN", description: "可选。剧情、镜头描述和提示词的输出语言;zh-CN=简体中文,en=英文,默认 zh-CN。" },
158
- orientation: { type: "string", title: "画面方向", enum: ["horizontal", "vertical"], default: "horizontal", description: "可选。horizontal=横屏,vertical=竖屏;默认 horizontal。" },
159
- dryRun: { type: "boolean", title: "仅预检", default: false, description: "可选。设为 true 时仅校验参数并预估 2 积分,不创建任务且不扣费;默认 false。" },
308
+ productName: {
309
+ type: "string",
310
+ title: "商品名称",
311
+ description: "必填。需要创作电商视频分镜的商品名称。",
312
+ },
313
+ productDescription: {
314
+ type: "string",
315
+ title: "商品描述",
316
+ description: "必填。描述商品功能、核心卖点、使用场景和希望强调的信息。",
317
+ },
318
+ targetAudience: {
319
+ type: "string",
320
+ title: "目标受众",
321
+ description: "可选。视频希望触达的人群特征,用于调整剧情和表达方式。",
322
+ },
323
+ videoStyle: {
324
+ type: "string",
325
+ title: "视频风格",
326
+ description: "可选。期望的视觉、叙事或营销风格。",
327
+ },
328
+ productImage: {
329
+ type: "string",
330
+ title: "商品图片",
331
+ description: "可选。展示商品的本地 JPG/PNG/WebP 图片路径或公网 URL。",
332
+ },
333
+ targetDuration: {
334
+ type: "integer",
335
+ title: "目标时长",
336
+ enum: [30, 60, 90, 120],
337
+ default: 60,
338
+ description: "可选。计划成片的目标时长,单位为秒,可选 30、60、90 或 120,默认 60。",
339
+ },
340
+ language: {
341
+ type: "string",
342
+ title: "内容输出语言",
343
+ enum: ["zh-CN", "en"],
344
+ default: "zh-CN",
345
+ description: "可选。剧情、镜头描述和提示词的输出语言;zh-CN=简体中文,en=英文,默认 zh-CN。",
346
+ },
347
+ orientation: {
348
+ type: "string",
349
+ title: "画面方向",
350
+ enum: ["horizontal", "vertical"],
351
+ default: "horizontal",
352
+ description: "可选。horizontal=横屏,vertical=竖屏;默认 horizontal。",
353
+ },
354
+ dryRun: {
355
+ type: "boolean",
356
+ title: "仅预检",
357
+ default: false,
358
+ description: "可选。设为 true 时仅校验参数并预估 2 积分,不创建任务且不扣费;默认 false。",
359
+ },
160
360
  },
161
361
  required: ["productName", "productDescription"],
162
362
  additionalProperties: false,
@@ -166,21 +366,61 @@ export const MCP_CREATIVE_TOOLS = [
166
366
  title: "电商分镜任务创建结果",
167
367
  description: "返回任务标识、积分信息和后续查询提示;预检或失败时部分字段可能不返回。",
168
368
  properties: {
169
- success: { type: "boolean", title: "是否成功", description: "表示任务创建或预检请求是否成功。" },
170
- dryRun: { type: "boolean", title: "是否仅预检", description: "表示本次请求是否只进行了预检而未创建任务。" },
171
- taskId: { type: "number", title: "任务 ID", description: "创建成功后返回的电商分镜任务 ID;dryRun 或失败时可能不返回,请用于调用 get_ecommerce_storyboard_status。" },
172
- estimatedCredits: { type: "number", title: "预估积分", description: "完成本次分镜任务预计需要的积分。" },
173
- creditsDeducted: { type: "number", title: "已扣积分", description: "本次请求实际扣除的积分;dryRun 时为 0。" },
174
- remainingCredits: { type: "number", title: "剩余积分", description: "请求处理后的账户剩余积分。" },
369
+ success: {
370
+ type: "boolean",
371
+ title: "是否成功",
372
+ description: "表示任务创建或预检请求是否成功。",
373
+ },
374
+ dryRun: {
375
+ type: "boolean",
376
+ title: "是否仅预检",
377
+ description: "表示本次请求是否只进行了预检而未创建任务。",
378
+ },
379
+ taskId: {
380
+ type: "number",
381
+ title: "任务 ID",
382
+ description: "创建成功后返回的电商分镜任务 ID;dryRun 或失败时可能不返回,请用于调用 get_ecommerce_storyboard_status。",
383
+ },
384
+ estimatedCredits: {
385
+ type: "number",
386
+ title: "预估积分",
387
+ description: "完成本次分镜任务预计需要的积分。",
388
+ },
389
+ creditsDeducted: {
390
+ type: "number",
391
+ title: "已扣积分",
392
+ description: "本次请求实际扣除的积分;dryRun 时为 0。",
393
+ },
394
+ remainingCredits: {
395
+ type: "number",
396
+ title: "剩余积分",
397
+ description: "请求处理后的账户剩余积分。",
398
+ },
175
399
  validationWarnings: {
176
400
  type: "array",
177
401
  title: "预检警告",
178
402
  description: "参数或素材预检产生的非阻断性提示列表。",
179
- items: { type: "string", title: "预检警告项", description: "一条需要关注但不阻断请求的预检提示。" },
403
+ items: {
404
+ type: "string",
405
+ title: "预检警告项",
406
+ description: "一条需要关注但不阻断请求的预检提示。",
407
+ },
408
+ },
409
+ statusHint: {
410
+ type: "string",
411
+ title: "后续操作提示",
412
+ description: "提示是否应使用 taskId 调用 get_ecommerce_storyboard_status 查询分镜进度。",
413
+ },
414
+ code: {
415
+ type: "string",
416
+ title: "错误代码",
417
+ description: "请求失败时返回的机器可读错误代码,成功时可能不返回。",
418
+ },
419
+ message: {
420
+ type: "string",
421
+ title: "结果消息",
422
+ description: "请求结果或失败原因的可读说明。",
180
423
  },
181
- statusHint: { type: "string", title: "后续操作提示", description: "提示是否应使用 taskId 调用 get_ecommerce_storyboard_status 查询分镜进度。" },
182
- code: { type: "string", title: "错误代码", description: "请求失败时返回的机器可读错误代码,成功时可能不返回。" },
183
- message: { type: "string", title: "结果消息", description: "请求结果或失败原因的可读说明。" },
184
424
  },
185
425
  required: ["success"],
186
426
  additionalProperties: false,
@@ -196,7 +436,11 @@ export const MCP_CREATIVE_TOOLS = [
196
436
  title: "电商分镜任务查询参数",
197
437
  description: "指定需要查询的电商视频分镜任务。",
198
438
  properties: {
199
- taskId: { type: "integer", title: "任务 ID", description: "必填。由 create_ecommerce_storyboard_task 返回的任务 ID,请原样传入并用于后续轮询。" },
439
+ taskId: {
440
+ type: "integer",
441
+ title: "任务 ID",
442
+ description: "必填。由 create_ecommerce_storyboard_task 返回的任务 ID,请原样传入并用于后续轮询。",
443
+ },
200
444
  },
201
445
  required: ["taskId"],
202
446
  additionalProperties: false,
@@ -206,16 +450,56 @@ export const MCP_CREATIVE_TOOLS = [
206
450
  title: "电商视频分镜状态与结果",
207
451
  description: "返回分镜任务进度、剧情、逐镜内容、插图和错误信息;任务未完成时内容可能为空。",
208
452
  properties: {
209
- success: { type: "boolean", title: "是否成功", description: "表示查询请求是否成功。" },
210
- taskId: { type: "number", title: "任务 ID", description: "当前查询的电商分镜任务 ID。" },
211
- status: { type: "string", title: "任务状态", description: "分镜任务当前的处理状态;未完成时应稍后继续查询。" },
212
- progress: { type: "number", title: "总体进度", description: "任务总体处理进度,通常为 0–100 的数值。" },
213
- fullStory: { type: ["string", "null"], title: "完整剧情", description: "根据商品信息生成的完整视频剧情;任务未完成时为空。" },
214
- targetDuration: { type: "number", title: "目标时长", description: "计划成片的目标时长,单位为秒。" },
215
- language: { type: "string", title: "内容输出语言", description: "剧情、镜头描述和提示词使用的语言。" },
216
- orientation: { type: "string", title: "画面方向", description: "分镜采用的横屏或竖屏方向。" },
217
- createdAt: { type: ["string", "null"], title: "创建时间", description: "任务创建时间;不可用时为空。" },
218
- completedAt: { type: ["string", "null"], title: "完成时间", description: "任务完成时间;未完成时为空。" },
453
+ success: {
454
+ type: "boolean",
455
+ title: "是否成功",
456
+ description: "表示查询请求是否成功。",
457
+ },
458
+ taskId: {
459
+ type: "number",
460
+ title: "任务 ID",
461
+ description: "当前查询的电商分镜任务 ID。",
462
+ },
463
+ status: {
464
+ type: "string",
465
+ title: "任务状态",
466
+ description: "分镜任务当前的处理状态;未完成时应稍后继续查询。",
467
+ },
468
+ progress: {
469
+ type: "number",
470
+ title: "总体进度",
471
+ description: "任务总体处理进度,通常为 0–100 的数值。",
472
+ },
473
+ fullStory: {
474
+ type: ["string", "null"],
475
+ title: "完整剧情",
476
+ description: "根据商品信息生成的完整视频剧情;任务未完成时为空。",
477
+ },
478
+ targetDuration: {
479
+ type: "number",
480
+ title: "目标时长",
481
+ description: "计划成片的目标时长,单位为秒。",
482
+ },
483
+ language: {
484
+ type: "string",
485
+ title: "内容输出语言",
486
+ description: "剧情、镜头描述和提示词使用的语言。",
487
+ },
488
+ orientation: {
489
+ type: "string",
490
+ title: "画面方向",
491
+ description: "分镜采用的横屏或竖屏方向。",
492
+ },
493
+ createdAt: {
494
+ type: ["string", "null"],
495
+ title: "创建时间",
496
+ description: "任务创建时间;不可用时为空。",
497
+ },
498
+ completedAt: {
499
+ type: ["string", "null"],
500
+ title: "完成时间",
501
+ description: "任务完成时间;未完成时为空。",
502
+ },
219
503
  scenes: {
220
504
  type: "array",
221
505
  title: "分镜列表",
@@ -225,24 +509,74 @@ export const MCP_CREATIVE_TOOLS = [
225
509
  title: "分镜场景",
226
510
  description: "一个分镜场景的描述、时长、生成提示词、插图和错误信息。",
227
511
  properties: {
228
- sceneIndex: { type: "number", title: "场景序号", description: "该分镜场景在完整剧情中的顺序编号。" },
229
- description: { type: "string", title: "场景描述", description: "该场景的画面内容、人物动作和叙事说明。" },
230
- duration: { type: "number", title: "场景时长", description: "该场景建议持续的时间,单位为秒。" },
231
- prompt: { type: "string", title: "镜头提示词", description: "用于后续生成该场景画面的提示词。" },
512
+ sceneIndex: {
513
+ type: "number",
514
+ title: "场景序号",
515
+ description: "该分镜场景在完整剧情中的顺序编号。",
516
+ },
517
+ description: {
518
+ type: "string",
519
+ title: "场景描述",
520
+ description: "该场景的画面内容、人物动作和叙事说明。",
521
+ },
522
+ duration: {
523
+ type: "number",
524
+ title: "场景时长",
525
+ description: "该场景建议持续的时间,单位为秒。",
526
+ },
527
+ prompt: {
528
+ type: "string",
529
+ title: "镜头提示词",
530
+ description: "用于后续生成该场景画面的提示词。",
531
+ },
232
532
  sketchImageUrl: nullableString("分镜插图 URL", "该场景分镜插图的访问 URL;插图未完成或失败时为空。"),
233
- imageGenerationStatus: { type: "string", title: "插图生成状态", description: "该场景分镜插图当前的生成状态。" },
533
+ imageGenerationStatus: {
534
+ type: "string",
535
+ title: "插图生成状态",
536
+ description: "该场景分镜插图当前的生成状态。",
537
+ },
234
538
  ...structuredErrorProperties,
235
539
  },
236
- required: ["sceneIndex", "description", "duration", "prompt", "imageGenerationStatus"],
540
+ required: [
541
+ "sceneIndex",
542
+ "description",
543
+ "duration",
544
+ "prompt",
545
+ "imageGenerationStatus",
546
+ ],
237
547
  additionalProperties: false,
238
548
  },
239
549
  },
240
- errorMessage: { type: ["string", "null"], title: "任务错误信息", description: "分镜任务失败时的可读原因;未失败时为空。" },
241
- errorCode: { type: ["string", "null"], title: "任务错误代码", description: "分镜任务失败时的机器可读错误代码;未失败时为空。" },
242
- errorCategory: { type: ["string", "null"], title: "任务错误分类", description: "分镜任务失败时的错误类别;未失败时为空。" },
243
- retryable: { type: ["boolean", "null"], title: "任务是否可重试", description: "表示任务失败后是否建议重新创建;未失败时为空。" },
244
- code: { type: "string", title: "查询错误代码", description: "查询请求失败时返回的机器可读错误代码,成功时可能不返回。" },
245
- message: { type: "string", title: "查询消息", description: "查询结果或失败原因的可读说明。" },
550
+ errorMessage: {
551
+ type: ["string", "null"],
552
+ title: "任务错误信息",
553
+ description: "分镜任务失败时的可读原因;未失败时为空。",
554
+ },
555
+ errorCode: {
556
+ type: ["string", "null"],
557
+ title: "任务错误代码",
558
+ description: "分镜任务失败时的机器可读错误代码;未失败时为空。",
559
+ },
560
+ errorCategory: {
561
+ type: ["string", "null"],
562
+ title: "任务错误分类",
563
+ description: "分镜任务失败时的错误类别;未失败时为空。",
564
+ },
565
+ retryable: {
566
+ type: ["boolean", "null"],
567
+ title: "任务是否可重试",
568
+ description: "表示任务失败后是否建议重新创建;未失败时为空。",
569
+ },
570
+ code: {
571
+ type: "string",
572
+ title: "查询错误代码",
573
+ description: "查询请求失败时返回的机器可读错误代码,成功时可能不返回。",
574
+ },
575
+ message: {
576
+ type: "string",
577
+ title: "查询消息",
578
+ description: "查询结果或失败原因的可读说明。",
579
+ },
246
580
  },
247
581
  required: ["success"],
248
582
  additionalProperties: false,
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * sora-mcp CLI entry point (1.0.12).
3
+ * sora-mcp CLI entry point (1.0.13).
4
4
  *
5
5
  * Subcommands:
6
6
  * - `auth login` — open the browser to authorize WorkBuddy
@@ -78,7 +78,7 @@ async function mainServe(args) {
78
78
  const apiBaseUrl = process.env.SORA_API_URL || "https://aigc-next.iclip.cn/api";
79
79
  const server = createServer(token, apiBaseUrl, {
80
80
  profile,
81
- filterTools: (tools) => filterToolsForProfile(tools, profile),
81
+ filterTools: tools => filterToolsForProfile(tools, profile),
82
82
  workbuddyToolNames: [...WORKBUDDY_TOOL_NAMES],
83
83
  });
84
84
  if (profile === "workbuddy") {
@@ -144,7 +144,7 @@ async function main() {
144
144
  }
145
145
  await mainServe(args);
146
146
  }
147
- main().catch((err) => {
147
+ main().catch(err => {
148
148
  process.stderr.write(`Fatal: ${err.message ?? String(err)}\n`);
149
149
  process.exit(1);
150
150
  });