@infimind/video-mcp-cli 1.0.11 → 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.
@@ -1,37 +1,69 @@
1
- export const MCP_SERVER_VERSION = "1.0.10";
1
+ export const MCP_SERVER_VERSION = "1.0.13";
2
2
  export const MCP_VIDEO_STATUS_HINT = "任务已创建后,使用 get_video_status 并传入 taskId 查询生成进度和视频链接。";
3
3
  export const MCP_VIDEO_DRY_RUN_HINT = "dryRun 仅完成参数、权限、积分和素材规则预检,不会创建任务或扣费。";
4
4
  export const MCP_VIDEO_ENGINES = {
5
5
  S2: {
6
- engineName: "极睿Sa专业版",
6
+ engineName: "极睿SA专业版",
7
7
  model: "sora-2",
8
8
  defaultTaskMode: "standard",
9
9
  taskModes: ["standard"],
10
10
  },
11
11
  S5: {
12
- engineName: "极睿Sd专业版",
12
+ engineName: "极睿SD专业版",
13
13
  model: "doubao-seedance-2-0-260128",
14
14
  defaultTaskMode: "allinone",
15
- taskModes: ["allinone", "firstlast"],
15
+ taskModes: ["allinone", "firstlast", "edit"],
16
16
  },
17
17
  S6: {
18
- engineName: "极睿Ha专业版",
18
+ engineName: "极睿HA专业版",
19
19
  model: "happyhorse-1.1",
20
20
  defaultTaskMode: "standard",
21
21
  taskModes: ["standard", "reference", "edit"],
22
22
  },
23
+ S7: {
24
+ engineName: "极睿H3专业版",
25
+ model: "MiniMax-H3",
26
+ defaultTaskMode: "allinone",
27
+ taskModes: ["allinone", "firstlast", "reference"],
28
+ },
29
+ S8: {
30
+ engineName: "极睿SD2.5专业版",
31
+ model: "doubao-seedance-2-5-260628",
32
+ defaultTaskMode: "allinone",
33
+ taskModes: ["allinone", "firstlast", "edit"],
34
+ },
35
+ S9: {
36
+ engineName: "极睿WA专业版",
37
+ model: "wan3.0-video",
38
+ defaultTaskMode: "allinone",
39
+ taskModes: ["allinone", "firstlast", "edit"],
40
+ },
41
+ S10: {
42
+ engineName: "极睿SA专业版",
43
+ model: "sora-2",
44
+ defaultTaskMode: "standard",
45
+ taskModes: ["standard"],
46
+ },
23
47
  };
24
48
  export function isMcpRoute(value) {
25
- return value === "S2" || value === "S5" || value === "S6";
49
+ return (value === "S2" ||
50
+ value === "S5" ||
51
+ value === "S6" ||
52
+ value === "S7" ||
53
+ value === "S8" ||
54
+ value === "S9" ||
55
+ value === "S10");
26
56
  }
27
57
  export function getMcpEngineName(route) {
28
- return isMcpRoute(route) ? MCP_VIDEO_ENGINES[route].engineName : MCP_VIDEO_ENGINES.S2.engineName;
58
+ return isMcpRoute(route)
59
+ ? MCP_VIDEO_ENGINES[route].engineName
60
+ : MCP_VIDEO_ENGINES.S9.engineName;
29
61
  }
30
62
  export function getMcpTaskModel(route) {
31
63
  return MCP_VIDEO_ENGINES[route].model;
32
64
  }
33
65
  export function getMcpDefaultTaskMode(route, isFirstLastMode) {
34
- if (route === "S5" && isFirstLastMode === true) {
66
+ if ((route === "S5" || route === "S8") && isFirstLastMode === true) {
35
67
  return "firstlast";
36
68
  }
37
69
  return MCP_VIDEO_ENGINES[route].defaultTaskMode;
@@ -39,36 +71,86 @@ export function getMcpDefaultTaskMode(route, isFirstLastMode) {
39
71
  export function isValidMcpTaskMode(route, taskMode) {
40
72
  return MCP_VIDEO_ENGINES[route].taskModes.includes(taskMode);
41
73
  }
74
+ /**
75
+ * 面向 MCP 客户端的可选模型短码(工具 schema 只暴露这一组):
76
+ * WA = S9(极睿WA专业版,wan3.0-video;默认模型)
77
+ * SD = S5(极睿SD专业版,Seedance 2.0)
78
+ * SD25 = S8(极睿SD2.5专业版,Seedance 2.5 独立通道;480p/720p/1080p,支持 Edit)
79
+ * HA = S6(极睿HA专业版,HappyHorse 1.1)
80
+ * H3 = S7(极睿H3专业版,MiniMax-H3 视频生成 V2;2K 输出,多模态参考生视频 r2va)
81
+ */
82
+ export const MCP_PUBLIC_MODELS = ["WA", "SD", "SD25", "HA", "H3"];
42
83
  export const MCP_VIDEO_MODELS = {
43
- SA: { route: "S2", engineName: "极睿Sa专业版", providerModel: "sora-2" },
44
- SD: { route: "S5", engineName: "极睿Sd专业版", providerModel: "doubao-seedance-2-0-260128" },
45
- HA: { route: "S6", engineName: "极睿Ha专业版", providerModel: "happyhorse-1.1" },
84
+ // 已下线:保留映射只为识别旧请求并拒绝,不在 MCP_PUBLIC_MODELS 中暴露。
85
+ SA: { route: "S2", engineName: "极睿SA专业版", providerModel: "sora-2" },
86
+ SD: {
87
+ route: "S5",
88
+ engineName: "极睿SD专业版",
89
+ providerModel: "doubao-seedance-2-0-260128",
90
+ },
91
+ SD25: {
92
+ route: "S8",
93
+ engineName: "极睿SD2.5专业版",
94
+ providerModel: "doubao-seedance-2-5-260628",
95
+ },
96
+ HA: {
97
+ route: "S6",
98
+ engineName: "极睿HA专业版",
99
+ providerModel: "happyhorse-1.1",
100
+ },
101
+ H3: { route: "S7", engineName: "极睿H3专业版", providerModel: "MiniMax-H3" },
102
+ WA: {
103
+ route: "S9",
104
+ engineName: "极睿WA专业版",
105
+ providerModel: "wan3.0-video",
106
+ },
46
107
  };
47
108
  export function isMcpModel(value) {
48
- return value === "SA" || value === "SD" || value === "HA";
109
+ return (value === "SA" ||
110
+ value === "SD" ||
111
+ value === "SD25" ||
112
+ value === "HA" ||
113
+ value === "H3" ||
114
+ value === "WA");
115
+ }
116
+ /** SA(sora-2)已下线,只用于返回明确的 MODEL_RETIRED。 */
117
+ export function isRetiredSaModel(value) {
118
+ return value === "SA";
119
+ }
120
+ /** S2/S10 是 SA 的历史路由,创建接口不再接受;仅保留用于历史任务查询。 */
121
+ export function isRetiredSaRoute(value) {
122
+ return value === "S2" || value === "S10";
49
123
  }
50
124
  export function getMcpModelForRoute(route) {
51
- if (route === "S2")
125
+ if (route === "S2" || route === "S10")
52
126
  return "SA";
53
127
  if (route === "S5")
54
128
  return "SD";
55
129
  if (route === "S6")
56
130
  return "HA";
57
- return "SA"; // 默认回退
131
+ if (route === "S7")
132
+ return "H3";
133
+ if (route === "S8")
134
+ return "SD25";
135
+ if (route === "S9")
136
+ return "WA";
137
+ return "WA"; // 默认回退
58
138
  }
59
139
  /**
60
140
  * 把客户端传入的 model / route 值解析成内部 route。
61
141
  * - 如果 model 有效,直接用对应的内部 route。
62
142
  * - 否则如果 route 是有效 McpRoute,返回该 route。
63
- * - 否则返回 "SA"(与现有默认行为保持一致)。
143
+ * - 否则返回 "WA"(默认模型;SA 已下线不再作为回退)。
64
144
  *
65
145
  * 第二返回值 true 表示 route 走的是 deprecated alias(仅使用 route 而非 model)。
66
146
  */
67
- export function resolveMcpEngine(args) {
147
+ export function resolveMcpEngine(args, options = {}) {
68
148
  if (isMcpModel(args.model)) {
69
149
  const entry = MCP_VIDEO_MODELS[args.model];
70
150
  return {
71
- route: entry.route,
151
+ route: args.model === "SA" && options.videoProviderMode === "sandbase"
152
+ ? "S10"
153
+ : entry.route,
72
154
  model: args.model,
73
155
  engineName: entry.engineName,
74
156
  providerModel: entry.providerModel,
@@ -87,11 +169,11 @@ export function resolveMcpEngine(args) {
87
169
  usedRouteAlias: true,
88
170
  };
89
171
  }
90
- // 默认 SA
91
- const entry = MCP_VIDEO_MODELS.SA;
172
+ // 默认 WA(SA/sora-2 上游已停服;WA 已对非 VIP 开放)
173
+ const entry = MCP_VIDEO_MODELS.WA;
92
174
  return {
93
175
  route: entry.route,
94
- model: "SA",
176
+ model: "WA",
95
177
  engineName: entry.engineName,
96
178
  providerModel: entry.providerModel,
97
179
  usedRouteAlias: false,
package/package.json CHANGED
@@ -1,14 +1,35 @@
1
1
  {
2
2
  "name": "@infimind/video-mcp-cli",
3
- "version": "1.0.11",
4
- "description": "MCP Server for Sora AI Video Generator - Access video generation features through Claude Desktop",
3
+ "version": "1.0.13",
4
+ "description": "MCP Server / WorkBuddy CLI for Sora AI Video Generator (1.0.13 with browser-based OAuth).",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
- "sora-mcp": "./dist/index.js"
8
+ "sora-mcp": "dist/index.js"
9
9
  },
10
10
  "files": [
11
- "dist",
11
+ "dist/index.js",
12
+ "dist/server.js",
13
+ "dist/creativeTools.js",
14
+ "dist/auth/index.js",
15
+ "dist/auth/credentialWriter.js",
16
+ "dist/auth/exchange.js",
17
+ "dist/auth/installationId.js",
18
+ "dist/auth/login.js",
19
+ "dist/auth/logout.js",
20
+ "dist/auth/loopback.js",
21
+ "dist/auth/paths.js",
22
+ "dist/auth/pkce.js",
23
+ "dist/auth/profile.js",
24
+ "dist/auth/redact.js",
25
+ "dist/auth/status.js",
26
+ "dist/auth/token.js",
27
+ "dist/oauthWorkbuddy/transaction.js",
28
+ "dist/oauthWorkbuddy/redirectUri.js",
29
+ "dist/oauthWorkbuddy/hash.js",
30
+ "dist/oauthWorkbuddy/redact.js",
31
+ "dist/oauthWorkbuddy/client.js",
32
+ "dist/videoRules.js",
12
33
  "README.md"
13
34
  ],
14
35
  "scripts": {
@@ -17,14 +38,19 @@
17
38
  "test:smoke": "node scripts/smoke-test.mjs",
18
39
  "test:smoke:package": "MCP_SMOKE_TARGET=package node scripts/smoke-test.mjs",
19
40
  "test:smoke:published": "MCP_SMOKE_TARGET=published node scripts/smoke-test.mjs",
20
- "prepublishOnly": "npm run build && npm run test:smoke:package"
41
+ "prepublishOnly": "npm run build && npm run test:smoke:package",
42
+ "check:workbuddy": "node -e \"import(\"./dist/index.js\").catch(e=>{console.error(e);process.exit(1)})\""
21
43
  },
22
44
  "keywords": [
45
+ "claude",
46
+ "workbuddy",
47
+ "sora",
48
+ "oauth",
23
49
  "mcp",
50
+ "pkce",
51
+ "browser-auth",
24
52
  "model-context-protocol",
25
- "claude",
26
- "video-generation",
27
- "sora"
53
+ "video-generation"
28
54
  ],
29
55
  "author": "INFIMIND",
30
56
  "license": "MIT",
@@ -34,6 +60,7 @@
34
60
  },
35
61
  "devDependencies": {
36
62
  "@types/node": "^20.17.10",
63
+ "ajv": "^8.17.1",
37
64
  "typescript": "^5.7.2"
38
65
  },
39
66
  "engines": {
package/dist/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
package/dist/server.d.ts DELETED
@@ -1,11 +0,0 @@
1
- /**
2
- * MCP Server Implementation for Sora AI Video Generator
3
- *
4
- * This server implements the Model Context Protocol to allow Claude Desktop
5
- * to interact with the Sora AI Video Generator API.
6
- */
7
- import { Server } from "@modelcontextprotocol/sdk/server/index.js";
8
- /**
9
- * Create and configure the MCP Server
10
- */
11
- export declare function createServer(token: string, apiBaseUrl: string): Server;
@@ -1,49 +0,0 @@
1
- export type McpRoute = "S2" | "S5" | "S6";
2
- export type McpTaskMode = "allinone" | "firstlast" | "standard" | "reference" | "edit";
3
- export declare const MCP_SERVER_VERSION = "1.0.10";
4
- export declare const MCP_VIDEO_STATUS_HINT = "\u4EFB\u52A1\u5DF2\u521B\u5EFA\u540E\uFF0C\u4F7F\u7528 get_video_status \u5E76\u4F20\u5165 taskId \u67E5\u8BE2\u751F\u6210\u8FDB\u5EA6\u548C\u89C6\u9891\u94FE\u63A5\u3002";
5
- export declare const MCP_VIDEO_DRY_RUN_HINT = "dryRun \u4EC5\u5B8C\u6210\u53C2\u6570\u3001\u6743\u9650\u3001\u79EF\u5206\u548C\u7D20\u6750\u89C4\u5219\u9884\u68C0\uFF0C\u4E0D\u4F1A\u521B\u5EFA\u4EFB\u52A1\u6216\u6263\u8D39\u3002";
6
- export declare const MCP_VIDEO_ENGINES: Record<McpRoute, {
7
- engineName: string;
8
- model: string;
9
- defaultTaskMode: McpTaskMode;
10
- taskModes: McpTaskMode[];
11
- }>;
12
- export declare function isMcpRoute(value: string): value is McpRoute;
13
- export declare function getMcpEngineName(route: string): string;
14
- export declare function getMcpTaskModel(route: McpRoute): string;
15
- export declare function getMcpDefaultTaskMode(route: McpRoute, isFirstLastMode?: boolean): McpTaskMode;
16
- export declare function isValidMcpTaskMode(route: McpRoute, taskMode: string): taskMode is McpTaskMode;
17
- /**
18
- * 面向 MCP 客户端的引擎短码:
19
- * SA = S2(极睿Sa专业版,Sora 2 模型,自动 S2→S4 兜底)
20
- * SD = S5(极睿Sd专业版,Seedance 2.0)
21
- * HA = S6(极睿Ha专业版,HappyHorse 1.1)
22
- */
23
- export type McpModel = "SA" | "SD" | "HA";
24
- export declare const MCP_VIDEO_MODELS: Record<McpModel, {
25
- route: McpRoute;
26
- engineName: string;
27
- providerModel: string;
28
- }>;
29
- export declare function isMcpModel(value: unknown): value is McpModel;
30
- export declare function getMcpModelForRoute(route: McpRoute): McpModel;
31
- /**
32
- * 把客户端传入的 model / route 值解析成内部 route。
33
- * - 如果 model 有效,直接用对应的内部 route。
34
- * - 否则如果 route 是有效 McpRoute,返回该 route。
35
- * - 否则返回 "SA"(与现有默认行为保持一致)。
36
- *
37
- * 第二返回值 true 表示 route 走的是 deprecated alias(仅使用 route 而非 model)。
38
- */
39
- export declare function resolveMcpEngine(args: {
40
- model?: unknown;
41
- route?: unknown;
42
- }): {
43
- route: McpRoute;
44
- model: McpModel;
45
- engineName: string;
46
- providerModel: string;
47
- usedRouteAlias: boolean;
48
- };
49
- export declare function getMcpVideoStatusHint(dryRun?: boolean): string;