mcp-probe-kit 1.11.0 → 1.15.0
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 +215 -21
- package/build/index.js +21 -1
- package/build/schemas/index.d.ts +234 -0
- package/build/schemas/index.js +4 -0
- package/build/schemas/interview-tools.d.ts +72 -0
- package/build/schemas/interview-tools.js +64 -0
- package/build/schemas/orchestration-tools.d.ts +58 -0
- package/build/schemas/orchestration-tools.js +59 -0
- package/build/schemas/ui-ux-schemas.d.ts +248 -0
- package/build/schemas/ui-ux-schemas.js +147 -0
- package/build/tools/__tests__/start_ui.integration.test.d.ts +6 -0
- package/build/tools/__tests__/start_ui.integration.test.js +179 -0
- package/build/tools/__tests__/start_ui.property.test.d.ts +6 -0
- package/build/tools/__tests__/start_ui.property.test.js +263 -0
- package/build/tools/__tests__/start_ui.unit.test.d.ts +6 -0
- package/build/tools/__tests__/start_ui.unit.test.js +109 -0
- package/build/tools/ask_user.d.ts +17 -0
- package/build/tools/ask_user.js +124 -0
- package/build/tools/index.d.ts +7 -0
- package/build/tools/index.js +9 -0
- package/build/tools/init_component_catalog.d.ts +22 -0
- package/build/tools/init_component_catalog.js +809 -0
- package/build/tools/interview.d.ts +18 -0
- package/build/tools/interview.js +418 -0
- package/build/tools/render_ui.d.ts +22 -0
- package/build/tools/render_ui.js +384 -0
- package/build/tools/start_ralph.d.ts +16 -0
- package/build/tools/start_ralph.js +779 -0
- package/build/tools/start_ui.d.ts +25 -0
- package/build/tools/start_ui.js +299 -0
- package/build/tools/ui-ux-tools.d.ts +116 -0
- package/build/tools/ui-ux-tools.js +756 -0
- package/build/tools/ui-ux-tools.test.d.ts +6 -0
- package/build/tools/ui-ux-tools.test.js +132 -0
- package/build/utils/ascii-box-formatter.d.ts +29 -0
- package/build/utils/ascii-box-formatter.js +195 -0
- package/build/utils/bm25.d.ts +60 -0
- package/build/utils/bm25.js +139 -0
- package/build/utils/cache-manager.d.ts +65 -0
- package/build/utils/cache-manager.js +156 -0
- package/build/utils/design-docs-generator.d.ts +1 -0
- package/build/utils/design-docs-generator.js +1 -0
- package/build/utils/design-reasoning-engine.d.ts +158 -0
- package/build/utils/design-reasoning-engine.js +363 -0
- package/build/utils/design-system-json-formatter.d.ts +41 -0
- package/build/utils/design-system-json-formatter.js +165 -0
- package/build/utils/ui-data-loader.d.ts +56 -0
- package/build/utils/ui-data-loader.js +164 -0
- package/build/utils/ui-search-engine.d.ts +57 -0
- package/build/utils/ui-search-engine.js +123 -0
- package/build/utils/ui-sync.d.ts +13 -0
- package/build/utils/ui-sync.js +241 -0
- package/docs/BEST_PRACTICES.md +456 -6
- package/docs/HOW_TO_TRIGGER.md +195 -64
- package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.html +158 -63
- package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.md +872 -34
- package/package.json +18 -5
- package/docs/HOW_TO_TRIGGER.html +0 -243
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 访谈工具的 Schema 定义
|
|
3
|
+
*/
|
|
4
|
+
export const interviewToolSchemas = [
|
|
5
|
+
{
|
|
6
|
+
name: "interview",
|
|
7
|
+
description: "当用户需求不明确、需要澄清需求时使用。需求访谈工具,在开发前通过结构化提问澄清需求,避免理解偏差和返工;生成访谈记录文件供后续 start_feature/add_feature 使用;仅支持 feature 类型",
|
|
8
|
+
inputSchema: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
description: {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "功能描述(如'实现用户登录功能'),用于开始访谈。可以是简短的自然语言描述",
|
|
14
|
+
},
|
|
15
|
+
feature_name: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "功能名称(kebab-case 格式,如 user-login)。可选,会自动从描述中提取",
|
|
18
|
+
},
|
|
19
|
+
answers: {
|
|
20
|
+
type: "object",
|
|
21
|
+
description: "访谈问题的回答(JSON 对象,key 为问题 ID,value 为回答内容)。用于提交访谈结果",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
required: [],
|
|
25
|
+
additionalProperties: true,
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: "ask_user",
|
|
30
|
+
description: "当 AI 需要更多信息、遇到不确定因素时使用。向用户提问工具,AI 可主动向用户提问;支持单个或多个问题、提供选项、标注重要性;可在任何时候使用",
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: "object",
|
|
33
|
+
properties: {
|
|
34
|
+
question: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "单个问题(如'你希望支持哪些支付方式?')",
|
|
37
|
+
},
|
|
38
|
+
questions: {
|
|
39
|
+
type: "array",
|
|
40
|
+
description: "多个问题列表,每个问题可包含 question、context、options、required 字段",
|
|
41
|
+
items: {
|
|
42
|
+
type: "object",
|
|
43
|
+
properties: {
|
|
44
|
+
question: { type: "string" },
|
|
45
|
+
context: { type: "string" },
|
|
46
|
+
options: { type: "array", items: { type: "string" } },
|
|
47
|
+
required: { type: "boolean" },
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
context: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "问题的背景信息或上下文",
|
|
54
|
+
},
|
|
55
|
+
reason: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "为什么要问这个问题(提问原因)",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
required: [],
|
|
61
|
+
additionalProperties: true,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
];
|
|
@@ -183,4 +183,62 @@ export declare const orchestrationToolSchemas: readonly [{
|
|
|
183
183
|
readonly required: readonly [];
|
|
184
184
|
readonly additionalProperties: true;
|
|
185
185
|
};
|
|
186
|
+
}, {
|
|
187
|
+
readonly name: "start_ralph";
|
|
188
|
+
readonly description: "当用户需要启动 Ralph Wiggum Loop 循环开发时使用。生成 .ralph/ 目录结构、安全模式脚本和执行指南。默认启用多重安全保护,防止无人值守时费用失控";
|
|
189
|
+
readonly inputSchema: {
|
|
190
|
+
readonly type: "object";
|
|
191
|
+
readonly properties: {
|
|
192
|
+
readonly goal: {
|
|
193
|
+
readonly type: "string";
|
|
194
|
+
readonly description: "本次要完成的目标/需求描述。例如:'实现用户认证功能'、'修复登录 bug'";
|
|
195
|
+
};
|
|
196
|
+
readonly mode: {
|
|
197
|
+
readonly type: "string";
|
|
198
|
+
readonly description: "运行模式:safe(安全模式,默认)、normal(普通模式)。安全模式包含多重保护机制";
|
|
199
|
+
};
|
|
200
|
+
readonly completion_promise: {
|
|
201
|
+
readonly type: "string";
|
|
202
|
+
readonly description: "完成条件描述。默认:'tests passing + requirements met'";
|
|
203
|
+
};
|
|
204
|
+
readonly test_command: {
|
|
205
|
+
readonly type: "string";
|
|
206
|
+
readonly description: "每轮执行的测试命令。默认:'npm test'(会在首轮由 agent 识别正确命令)";
|
|
207
|
+
};
|
|
208
|
+
readonly cli_command: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly description: "Claude Code CLI 命令名。默认:'claude-code'(可能需要改为 'claude')";
|
|
211
|
+
};
|
|
212
|
+
readonly max_iterations: {
|
|
213
|
+
readonly type: "number";
|
|
214
|
+
readonly description: "最大迭代轮数。safe 模式默认:8";
|
|
215
|
+
};
|
|
216
|
+
readonly max_minutes: {
|
|
217
|
+
readonly type: "number";
|
|
218
|
+
readonly description: "最大运行分钟数。safe 模式默认:25";
|
|
219
|
+
};
|
|
220
|
+
readonly confirm_every: {
|
|
221
|
+
readonly type: "number";
|
|
222
|
+
readonly description: "每几轮要求人工确认。safe 模式默认:1(每轮都确认)";
|
|
223
|
+
};
|
|
224
|
+
readonly confirm_timeout: {
|
|
225
|
+
readonly type: "number";
|
|
226
|
+
readonly description: "确认等待秒数,超时自动停止。safe 模式默认:20";
|
|
227
|
+
};
|
|
228
|
+
readonly max_same_output: {
|
|
229
|
+
readonly type: "number";
|
|
230
|
+
readonly description: "输出重复多少次停止(防卡死)。safe 模式默认:2";
|
|
231
|
+
};
|
|
232
|
+
readonly max_diff_lines: {
|
|
233
|
+
readonly type: "number";
|
|
234
|
+
readonly description: "git diff 变更行数超过此值停止(防失控)。safe 模式默认:300";
|
|
235
|
+
};
|
|
236
|
+
readonly cooldown_seconds: {
|
|
237
|
+
readonly type: "number";
|
|
238
|
+
readonly description: "每轮后冷却秒数。safe 模式默认:8";
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
readonly required: readonly [];
|
|
242
|
+
readonly additionalProperties: true;
|
|
243
|
+
};
|
|
186
244
|
}];
|
|
@@ -193,4 +193,63 @@ export const orchestrationToolSchemas = [
|
|
|
193
193
|
additionalProperties: true,
|
|
194
194
|
},
|
|
195
195
|
},
|
|
196
|
+
{
|
|
197
|
+
name: "start_ralph",
|
|
198
|
+
description: "当用户需要启动 Ralph Wiggum Loop 循环开发时使用。生成 .ralph/ 目录结构、安全模式脚本和执行指南。默认启用多重安全保护,防止无人值守时费用失控",
|
|
199
|
+
inputSchema: {
|
|
200
|
+
type: "object",
|
|
201
|
+
properties: {
|
|
202
|
+
goal: {
|
|
203
|
+
type: "string",
|
|
204
|
+
description: "本次要完成的目标/需求描述。例如:'实现用户认证功能'、'修复登录 bug'",
|
|
205
|
+
},
|
|
206
|
+
mode: {
|
|
207
|
+
type: "string",
|
|
208
|
+
description: "运行模式:safe(安全模式,默认)、normal(普通模式)。安全模式包含多重保护机制",
|
|
209
|
+
},
|
|
210
|
+
completion_promise: {
|
|
211
|
+
type: "string",
|
|
212
|
+
description: "完成条件描述。默认:'tests passing + requirements met'",
|
|
213
|
+
},
|
|
214
|
+
test_command: {
|
|
215
|
+
type: "string",
|
|
216
|
+
description: "每轮执行的测试命令。默认:'npm test'(会在首轮由 agent 识别正确命令)",
|
|
217
|
+
},
|
|
218
|
+
cli_command: {
|
|
219
|
+
type: "string",
|
|
220
|
+
description: "Claude Code CLI 命令名。默认:'claude-code'(可能需要改为 'claude')",
|
|
221
|
+
},
|
|
222
|
+
max_iterations: {
|
|
223
|
+
type: "number",
|
|
224
|
+
description: "最大迭代轮数。safe 模式默认:8",
|
|
225
|
+
},
|
|
226
|
+
max_minutes: {
|
|
227
|
+
type: "number",
|
|
228
|
+
description: "最大运行分钟数。safe 模式默认:25",
|
|
229
|
+
},
|
|
230
|
+
confirm_every: {
|
|
231
|
+
type: "number",
|
|
232
|
+
description: "每几轮要求人工确认。safe 模式默认:1(每轮都确认)",
|
|
233
|
+
},
|
|
234
|
+
confirm_timeout: {
|
|
235
|
+
type: "number",
|
|
236
|
+
description: "确认等待秒数,超时自动停止。safe 模式默认:20",
|
|
237
|
+
},
|
|
238
|
+
max_same_output: {
|
|
239
|
+
type: "number",
|
|
240
|
+
description: "输出重复多少次停止(防卡死)。safe 模式默认:2",
|
|
241
|
+
},
|
|
242
|
+
max_diff_lines: {
|
|
243
|
+
type: "number",
|
|
244
|
+
description: "git diff 变更行数超过此值停止(防失控)。safe 模式默认:300",
|
|
245
|
+
},
|
|
246
|
+
cooldown_seconds: {
|
|
247
|
+
type: "number",
|
|
248
|
+
description: "每轮后冷却秒数。safe 模式默认:8",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
required: [],
|
|
252
|
+
additionalProperties: true,
|
|
253
|
+
},
|
|
254
|
+
},
|
|
196
255
|
];
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI/UX Pro Max 工具的 Schema 定义
|
|
3
|
+
*/
|
|
4
|
+
export declare const uiDesignSystemSchema: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
product_type: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
13
|
+
};
|
|
14
|
+
description: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
stack: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
target_audience: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
keywords: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
required: string[];
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const initComponentCatalogSchema: {
|
|
35
|
+
name: string;
|
|
36
|
+
description: string;
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: string;
|
|
39
|
+
properties: {};
|
|
40
|
+
required: never[];
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
export declare const uiSearchSchema: {
|
|
44
|
+
name: string;
|
|
45
|
+
description: string;
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: string;
|
|
48
|
+
properties: {
|
|
49
|
+
mode: {
|
|
50
|
+
type: string;
|
|
51
|
+
description: string;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
54
|
+
query: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
category: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
stack: {
|
|
63
|
+
type: string;
|
|
64
|
+
description: string;
|
|
65
|
+
};
|
|
66
|
+
limit: {
|
|
67
|
+
type: string;
|
|
68
|
+
description: string;
|
|
69
|
+
default: number;
|
|
70
|
+
};
|
|
71
|
+
min_score: {
|
|
72
|
+
type: string;
|
|
73
|
+
description: string;
|
|
74
|
+
default: number;
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export declare const syncUiDataSchema: {
|
|
80
|
+
name: string;
|
|
81
|
+
description: string;
|
|
82
|
+
inputSchema: {
|
|
83
|
+
type: string;
|
|
84
|
+
properties: {
|
|
85
|
+
force: {
|
|
86
|
+
type: string;
|
|
87
|
+
description: string;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
90
|
+
verbose: {
|
|
91
|
+
type: string;
|
|
92
|
+
description: string;
|
|
93
|
+
default: boolean;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export declare const renderUiSchema: {
|
|
99
|
+
name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: string;
|
|
103
|
+
properties: {
|
|
104
|
+
template: {
|
|
105
|
+
type: string;
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
108
|
+
framework: {
|
|
109
|
+
type: string;
|
|
110
|
+
description: string;
|
|
111
|
+
default: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
required: string[];
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
export declare const startUiSchema: {
|
|
118
|
+
name: string;
|
|
119
|
+
description: string;
|
|
120
|
+
inputSchema: {
|
|
121
|
+
type: string;
|
|
122
|
+
properties: {
|
|
123
|
+
description: {
|
|
124
|
+
type: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
framework: {
|
|
128
|
+
type: string;
|
|
129
|
+
description: string;
|
|
130
|
+
default: string;
|
|
131
|
+
};
|
|
132
|
+
template: {
|
|
133
|
+
type: string;
|
|
134
|
+
description: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
required: string[];
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
export declare const uiUxSchemas: ({
|
|
141
|
+
name: string;
|
|
142
|
+
description: string;
|
|
143
|
+
inputSchema: {
|
|
144
|
+
type: string;
|
|
145
|
+
properties: {
|
|
146
|
+
product_type: {
|
|
147
|
+
type: string;
|
|
148
|
+
description: string;
|
|
149
|
+
};
|
|
150
|
+
description: {
|
|
151
|
+
type: string;
|
|
152
|
+
description: string;
|
|
153
|
+
};
|
|
154
|
+
stack: {
|
|
155
|
+
type: string;
|
|
156
|
+
description: string;
|
|
157
|
+
};
|
|
158
|
+
target_audience: {
|
|
159
|
+
type: string;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
keywords: {
|
|
163
|
+
type: string;
|
|
164
|
+
description: string;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
required: string[];
|
|
168
|
+
};
|
|
169
|
+
} | {
|
|
170
|
+
name: string;
|
|
171
|
+
description: string;
|
|
172
|
+
inputSchema: {
|
|
173
|
+
type: string;
|
|
174
|
+
properties: {};
|
|
175
|
+
required: never[];
|
|
176
|
+
};
|
|
177
|
+
} | {
|
|
178
|
+
name: string;
|
|
179
|
+
description: string;
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: string;
|
|
182
|
+
properties: {
|
|
183
|
+
mode: {
|
|
184
|
+
type: string;
|
|
185
|
+
description: string;
|
|
186
|
+
default: string;
|
|
187
|
+
};
|
|
188
|
+
query: {
|
|
189
|
+
type: string;
|
|
190
|
+
description: string;
|
|
191
|
+
};
|
|
192
|
+
category: {
|
|
193
|
+
type: string;
|
|
194
|
+
description: string;
|
|
195
|
+
};
|
|
196
|
+
stack: {
|
|
197
|
+
type: string;
|
|
198
|
+
description: string;
|
|
199
|
+
};
|
|
200
|
+
limit: {
|
|
201
|
+
type: string;
|
|
202
|
+
description: string;
|
|
203
|
+
default: number;
|
|
204
|
+
};
|
|
205
|
+
min_score: {
|
|
206
|
+
type: string;
|
|
207
|
+
description: string;
|
|
208
|
+
default: number;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
};
|
|
212
|
+
} | {
|
|
213
|
+
name: string;
|
|
214
|
+
description: string;
|
|
215
|
+
inputSchema: {
|
|
216
|
+
type: string;
|
|
217
|
+
properties: {
|
|
218
|
+
force: {
|
|
219
|
+
type: string;
|
|
220
|
+
description: string;
|
|
221
|
+
default: boolean;
|
|
222
|
+
};
|
|
223
|
+
verbose: {
|
|
224
|
+
type: string;
|
|
225
|
+
description: string;
|
|
226
|
+
default: boolean;
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
} | {
|
|
231
|
+
name: string;
|
|
232
|
+
description: string;
|
|
233
|
+
inputSchema: {
|
|
234
|
+
type: string;
|
|
235
|
+
properties: {
|
|
236
|
+
template: {
|
|
237
|
+
type: string;
|
|
238
|
+
description: string;
|
|
239
|
+
};
|
|
240
|
+
framework: {
|
|
241
|
+
type: string;
|
|
242
|
+
description: string;
|
|
243
|
+
default: string;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
required: string[];
|
|
247
|
+
};
|
|
248
|
+
})[];
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* UI/UX Pro Max 工具的 Schema 定义
|
|
3
|
+
*/
|
|
4
|
+
export const uiDesignSystemSchema = {
|
|
5
|
+
name: "ui_design_system",
|
|
6
|
+
description: "智能设计系统生成器 - 基于产品类型和需求,使用 AI 推理引擎生成完整的设计系统推荐。包括 UI 风格、配色方案、字体配对、落地页模式、效果建议、反模式警告和交付检查清单。输出 Markdown 文档、JSON 配置和完整设计规范文档集。",
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
product_type: {
|
|
11
|
+
type: "string",
|
|
12
|
+
description: "产品类型(必填):SaaS, E-commerce, Healthcare, Fintech, Government(政府), Education(教育), Portfolio, Agency 等。这是推理引擎的核心输入。",
|
|
13
|
+
},
|
|
14
|
+
description: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "系统说明(推荐):详细描述产品功能、特点、使用场景。例如:'政府类网站,需要权威、可信、易用的设计风格,面向公众提供政务服务'。这将帮助推理引擎生成更准确的设计方案。",
|
|
17
|
+
},
|
|
18
|
+
stack: {
|
|
19
|
+
type: "string",
|
|
20
|
+
description: "技术栈(推荐):react, vue, nextjs, nuxtjs, tailwind, html, svelte, astro 等。用于生成特定技术栈的实现建议和配置代码。",
|
|
21
|
+
},
|
|
22
|
+
target_audience: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "目标用户(可选):如 'B2B企业', 'C端消费者', '政府公务员', '普通市民', '开发者' 等。帮助推理引擎选择合适的设计风格。",
|
|
25
|
+
},
|
|
26
|
+
keywords: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "关键词(可选):逗号分隔的关键词,如 'professional, modern, trustworthy, authoritative'(专业、现代、可信、权威)。用于辅助匹配设计风格。",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
required: ["product_type"],
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
export const initComponentCatalogSchema = {
|
|
35
|
+
name: "init_component_catalog",
|
|
36
|
+
description: "初始化组件目录 - 基于设计系统规范(design-system.json)生成组件目录文件。定义可用的 UI 组件及其属性,组件定义包含占位符,渲染时自动替换为设计规范中的实际值,确保样式统一。",
|
|
37
|
+
inputSchema: {
|
|
38
|
+
type: "object",
|
|
39
|
+
properties: {},
|
|
40
|
+
required: [],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
export const uiSearchSchema = {
|
|
44
|
+
name: "ui_search",
|
|
45
|
+
description: "搜索 UI/UX 数据库,包括颜色、图标、图表、组件、设计模式等。支持三种模式:search(搜索数据)、catalog(查看组件目录)、template(搜索 UI 模板)。使用 BM25 算法进行智能搜索,支持按类别和技术栈过滤。数据来源:uipro-cli npm 包(v2.2.0+)。",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
type: "object",
|
|
48
|
+
properties: {
|
|
49
|
+
mode: {
|
|
50
|
+
type: "string",
|
|
51
|
+
description: "搜索模式:search(搜索 UI/UX 数据,默认)、catalog(查看组件目录)、template(搜索 UI 模板)",
|
|
52
|
+
default: "search",
|
|
53
|
+
},
|
|
54
|
+
query: {
|
|
55
|
+
type: "string",
|
|
56
|
+
description: "搜索关键词(支持中英文,如 'button'、'按钮'、'primary color'、'主色调')。catalog 模式不需要此参数。",
|
|
57
|
+
},
|
|
58
|
+
category: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "数据类别(仅 search 模式):colors(颜色)、icons(图标)、charts(图表)、landing(落地页)、products(产品)、typography(字体)、styles(样式)、ux-guidelines(UX 指南)、web-interface(Web 界面)等",
|
|
61
|
+
},
|
|
62
|
+
stack: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "技术栈过滤(仅 search 模式):react、vue、nextjs、nuxtjs、svelte、astro、flutter、react-native、swiftui、jetpack-compose 等",
|
|
65
|
+
},
|
|
66
|
+
limit: {
|
|
67
|
+
type: "number",
|
|
68
|
+
description: "返回结果数量(默认 10,范围 1-50)",
|
|
69
|
+
default: 10,
|
|
70
|
+
},
|
|
71
|
+
min_score: {
|
|
72
|
+
type: "number",
|
|
73
|
+
description: "最小相关性得分(默认 0,范围 0-100)",
|
|
74
|
+
default: 0,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
export const syncUiDataSchema = {
|
|
80
|
+
name: "sync_ui_data",
|
|
81
|
+
description: "同步 UI/UX 数据到本地缓存。从 npm 包 uipro-cli 下载最新数据,支持自动检查更新和强制同步。数据存储在 ~/.mcp-probe-kit/ui-ux-data/。",
|
|
82
|
+
inputSchema: {
|
|
83
|
+
type: "object",
|
|
84
|
+
properties: {
|
|
85
|
+
force: {
|
|
86
|
+
type: "boolean",
|
|
87
|
+
description: "是否强制同步(忽略版本检查,默认 false)",
|
|
88
|
+
default: false,
|
|
89
|
+
},
|
|
90
|
+
verbose: {
|
|
91
|
+
type: "boolean",
|
|
92
|
+
description: "是否显示详细日志(默认 false)",
|
|
93
|
+
default: false,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
export const renderUiSchema = {
|
|
99
|
+
name: "render_ui",
|
|
100
|
+
description: "UI 渲染引擎 - 将 JSON 模板渲染为最终代码。自动读取设计规范(design-system.json)和组件目录(component-catalog.json),替换占位符,生成完整的 React/Vue/HTML 代码。确保所有组件样式统一。",
|
|
101
|
+
inputSchema: {
|
|
102
|
+
type: "object",
|
|
103
|
+
properties: {
|
|
104
|
+
template: {
|
|
105
|
+
type: "string",
|
|
106
|
+
description: "模板文件路径(JSON 格式,如 docs/ui/login-form.json)",
|
|
107
|
+
},
|
|
108
|
+
framework: {
|
|
109
|
+
type: "string",
|
|
110
|
+
description: "目标框架:react、vue、html(默认 react)",
|
|
111
|
+
default: "react",
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
required: ["template"],
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
export const startUiSchema = {
|
|
118
|
+
name: "start_ui",
|
|
119
|
+
description: "统一 UI 开发编排工具 - 一键完成整个 UI 开发流程。自动检查设计系统、生成组件目录、搜索/生成模板、渲染最终代码。适合快速原型开发,保证整个项目样式统一。",
|
|
120
|
+
inputSchema: {
|
|
121
|
+
type: "object",
|
|
122
|
+
properties: {
|
|
123
|
+
description: {
|
|
124
|
+
type: "string",
|
|
125
|
+
description: "UI 需求描述(如 '登录页面'、'用户列表'、'设置页面')",
|
|
126
|
+
},
|
|
127
|
+
framework: {
|
|
128
|
+
type: "string",
|
|
129
|
+
description: "目标框架:react、vue、html(默认 react)",
|
|
130
|
+
default: "react",
|
|
131
|
+
},
|
|
132
|
+
template: {
|
|
133
|
+
type: "string",
|
|
134
|
+
description: "模板名称(可选,不提供则自动生成)",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
required: ["description"],
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
export const uiUxSchemas = [
|
|
141
|
+
uiDesignSystemSchema,
|
|
142
|
+
initComponentCatalogSchema,
|
|
143
|
+
uiSearchSchema,
|
|
144
|
+
syncUiDataSchema,
|
|
145
|
+
renderUiSchema,
|
|
146
|
+
startUiSchema,
|
|
147
|
+
];
|