mcp-probe-kit 1.13.0 → 1.15.1
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 +54 -3
- package/build/index.js +14 -1
- package/build/schemas/index.d.ts +108 -0
- package/build/schemas/index.js +2 -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/index.d.ts +4 -0
- package/build/tools/index.js +5 -0
- package/build/tools/init_component_catalog.d.ts +22 -0
- package/build/tools/init_component_catalog.js +809 -0
- package/build/tools/render_ui.d.ts +22 -0
- package/build/tools/render_ui.js +384 -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-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 +257 -1
- package/docs/HOW_TO_TRIGGER.md +71 -1
- package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.html +89 -29
- package/docs/MCP-Probe-Kit-/344/275/277/347/224/250/346/211/213/345/206/214.md +582 -1
- package/package.json +19 -6
- package/docs/HOW_TO_TRIGGER.html +0 -255
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
> 🚀 AI 开发增强工具集 - 让 AI 更懂你的开发流程
|
|
9
9
|
|
|
10
|
-
一个强大的 MCP (Model Context Protocol) 服务器,提供 **
|
|
10
|
+
一个强大的 MCP (Model Context Protocol) 服务器,提供 **49 个实用工具**(37 个基础工具 + 9 个智能编排 + 3 个 UI/UX 新增),覆盖代码质量、开发效率、项目管理、UI/UX 设计全流程。
|
|
11
11
|
|
|
12
|
-
**✨ v1.
|
|
12
|
+
**✨ v1.14.0 新增**: UI/UX Pro Max - 完整 UI 开发工作流,从设计系统到最终代码,支持 React、Vue、Tailwind 等多种技术栈!
|
|
13
13
|
|
|
14
14
|
**支持所有 MCP 客户端**:Cursor、Claude Desktop、Cline、Continue 等
|
|
15
15
|
|
|
@@ -19,7 +19,58 @@
|
|
|
19
19
|
|
|
20
20
|
## ✨ 功能特性
|
|
21
21
|
|
|
22
|
-
###
|
|
22
|
+
### 🎨 UI/UX Pro Max(6 个工具)🆕
|
|
23
|
+
- **`ui_design_system`** - 设计系统生成器:基于 100 条行业规则的智能推荐,生成设计推荐和创作指导,AI 根据指导自由创作文档(输出 ASCII Box + JSON + 创作指导)
|
|
24
|
+
- **`init_component_catalog`** - 组件目录生成器:基于设计系统生成组件目录,定义可用的 UI 组件及其属性(占位符语法)
|
|
25
|
+
- **`render_ui`** - UI 渲染引擎:将 JSON 模板渲染为最终代码,自动应用设计规范(占位符替换)
|
|
26
|
+
- **`start_ui`** - 统一 UI 开发编排:一键完成整个 UI 开发流程(支持 `auto` 智能模式,自动推导设计参数)
|
|
27
|
+
- **`ui_search`** - UI/UX 智能搜索:BM25 算法搜索颜色、图标、图表、组件、设计模式等 24 类数据(支持 catalog/template 模式)
|
|
28
|
+
- **`sync_ui_data`** - 数据同步工具:从 npm 包 `uipro-cli` 自动同步最新 UI/UX 数据(来源:[ui-ux-pro-max-skill](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill))
|
|
29
|
+
|
|
30
|
+
**完整工作流**:
|
|
31
|
+
```bash
|
|
32
|
+
# 🚀 方式一:智能模式(推荐)
|
|
33
|
+
# 一句话描述需求,AI 自动推导设计风格、配色和技术栈
|
|
34
|
+
start_ui "SaaS 后台管理系统" --mode=auto
|
|
35
|
+
|
|
36
|
+
# 📦 方式二:手动模式
|
|
37
|
+
# 1. 生成设计系统 (可省略 product_type,AI 会自动从描述推导)
|
|
38
|
+
ui_design_system --stack="react" --description="企业级 CRM 客户管理系统"
|
|
39
|
+
|
|
40
|
+
# 2. 生成页面(自动应用设计规范)
|
|
41
|
+
start_ui "登录页面"
|
|
42
|
+
start_ui "用户列表"
|
|
43
|
+
|
|
44
|
+
# 结果:所有页面样式完全统一 ✨
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 🤖 智能模式 vs 手动模式
|
|
48
|
+
|
|
49
|
+
`start_ui` 支持两种模式,满足不同场景需求:
|
|
50
|
+
|
|
51
|
+
#### 1. 自动模式 (`--mode=auto`) - **推荐**
|
|
52
|
+
AI 自动分析你的自然语言描述,推导最佳参数并生成执行计划。
|
|
53
|
+
```bash
|
|
54
|
+
start_ui "加密货币交易看板" --mode=auto
|
|
55
|
+
```
|
|
56
|
+
**特点**:
|
|
57
|
+
- ✅ 自动推导产品类型 (Fintech)
|
|
58
|
+
- ✅ 自动推导设计风格 (Dark Mode, High Contrast)
|
|
59
|
+
- ✅ 自动推导技术栈
|
|
60
|
+
- ✅ 直接生成可执行命令
|
|
61
|
+
|
|
62
|
+
#### 2. 手动模式 (`--mode=manual`)
|
|
63
|
+
生成详细的分步指南,由你手动控制每一步的执行。
|
|
64
|
+
```bash
|
|
65
|
+
start_ui "登录页面" --mode=manual
|
|
66
|
+
```
|
|
67
|
+
**特点**:
|
|
68
|
+
- ✅ 返回 4 个标准步骤的执行指南
|
|
69
|
+
- ✅ 适合需要精细控制参数的场景
|
|
70
|
+
- ✅ 适合学习和理解工作流
|
|
71
|
+
- ✅ 默认模式(如果不指定 --mode)
|
|
72
|
+
|
|
73
|
+
### �🎯 访谈工具(2 个工具)
|
|
23
74
|
- **`interview`** - 需求访谈模式:在开发前通过结构化提问澄清需求,避免理解偏差和返工
|
|
24
75
|
- **`ask_user`** - 通用提问工具:AI 可随时向用户提问,澄清不确定的信息
|
|
25
76
|
|
package/build/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
|
5
|
-
import { detectShell, initSetting, initProject, gencommit, debug, genapi, codeReview, gentest, genpr, checkDeps, gendoc, genchangelog, refactor, perf, fix, gensql, resolveConflict, genui, explain, convert, cssOrder, genreadme, split, analyzeProject, initProjectContext, addFeature, securityScan, fixBug, estimate, genMock, design2code, startFeature, startBugfix, startReview, startRelease, startRefactor, startOnboard, startApi, startDoc, genSkill, startRalph, interview, askUser } from "./tools/index.js";
|
|
5
|
+
import { detectShell, initSetting, initProject, gencommit, debug, genapi, codeReview, gentest, genpr, checkDeps, gendoc, genchangelog, refactor, perf, fix, gensql, resolveConflict, genui, explain, convert, cssOrder, genreadme, split, analyzeProject, initProjectContext, addFeature, securityScan, fixBug, estimate, genMock, design2code, startFeature, startBugfix, startReview, startRelease, startRefactor, startOnboard, startApi, startDoc, genSkill, startRalph, interview, askUser, uiDesignSystem, initComponentCatalog, uiSearch, syncUiData, renderUi, startUi } from "./tools/index.js";
|
|
6
6
|
import { VERSION, NAME } from "./version.js";
|
|
7
7
|
import { allToolSchemas } from "./schemas/index.js";
|
|
8
8
|
import { getToolParamsGuide } from "./resources/index.js";
|
|
@@ -115,6 +115,19 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
115
115
|
return await interview(args);
|
|
116
116
|
case "ask_user":
|
|
117
117
|
return await askUser(args);
|
|
118
|
+
// UI/UX Pro Max 工具
|
|
119
|
+
case "ui_design_system":
|
|
120
|
+
return await uiDesignSystem(args);
|
|
121
|
+
case "init_component_catalog":
|
|
122
|
+
return await initComponentCatalog(args);
|
|
123
|
+
case "ui_search":
|
|
124
|
+
return await uiSearch(args);
|
|
125
|
+
case "sync_ui_data":
|
|
126
|
+
return await syncUiData(args);
|
|
127
|
+
case "render_ui":
|
|
128
|
+
return await renderUi(args);
|
|
129
|
+
case "start_ui":
|
|
130
|
+
return await startUi(args);
|
|
118
131
|
default:
|
|
119
132
|
throw new Error(`未知工具: ${name}`);
|
|
120
133
|
}
|
package/build/schemas/index.d.ts
CHANGED
|
@@ -890,4 +890,112 @@ export declare const allToolSchemas: ({
|
|
|
890
890
|
readonly required: readonly [];
|
|
891
891
|
readonly additionalProperties: true;
|
|
892
892
|
};
|
|
893
|
+
} | {
|
|
894
|
+
name: string;
|
|
895
|
+
description: string;
|
|
896
|
+
inputSchema: {
|
|
897
|
+
type: string;
|
|
898
|
+
properties: {
|
|
899
|
+
product_type: {
|
|
900
|
+
type: string;
|
|
901
|
+
description: string;
|
|
902
|
+
};
|
|
903
|
+
description: {
|
|
904
|
+
type: string;
|
|
905
|
+
description: string;
|
|
906
|
+
};
|
|
907
|
+
stack: {
|
|
908
|
+
type: string;
|
|
909
|
+
description: string;
|
|
910
|
+
};
|
|
911
|
+
target_audience: {
|
|
912
|
+
type: string;
|
|
913
|
+
description: string;
|
|
914
|
+
};
|
|
915
|
+
keywords: {
|
|
916
|
+
type: string;
|
|
917
|
+
description: string;
|
|
918
|
+
};
|
|
919
|
+
};
|
|
920
|
+
required: string[];
|
|
921
|
+
};
|
|
922
|
+
} | {
|
|
923
|
+
name: string;
|
|
924
|
+
description: string;
|
|
925
|
+
inputSchema: {
|
|
926
|
+
type: string;
|
|
927
|
+
properties: {};
|
|
928
|
+
required: never[];
|
|
929
|
+
};
|
|
930
|
+
} | {
|
|
931
|
+
name: string;
|
|
932
|
+
description: string;
|
|
933
|
+
inputSchema: {
|
|
934
|
+
type: string;
|
|
935
|
+
properties: {
|
|
936
|
+
mode: {
|
|
937
|
+
type: string;
|
|
938
|
+
description: string;
|
|
939
|
+
default: string;
|
|
940
|
+
};
|
|
941
|
+
query: {
|
|
942
|
+
type: string;
|
|
943
|
+
description: string;
|
|
944
|
+
};
|
|
945
|
+
category: {
|
|
946
|
+
type: string;
|
|
947
|
+
description: string;
|
|
948
|
+
};
|
|
949
|
+
stack: {
|
|
950
|
+
type: string;
|
|
951
|
+
description: string;
|
|
952
|
+
};
|
|
953
|
+
limit: {
|
|
954
|
+
type: string;
|
|
955
|
+
description: string;
|
|
956
|
+
default: number;
|
|
957
|
+
};
|
|
958
|
+
min_score: {
|
|
959
|
+
type: string;
|
|
960
|
+
description: string;
|
|
961
|
+
default: number;
|
|
962
|
+
};
|
|
963
|
+
};
|
|
964
|
+
};
|
|
965
|
+
} | {
|
|
966
|
+
name: string;
|
|
967
|
+
description: string;
|
|
968
|
+
inputSchema: {
|
|
969
|
+
type: string;
|
|
970
|
+
properties: {
|
|
971
|
+
force: {
|
|
972
|
+
type: string;
|
|
973
|
+
description: string;
|
|
974
|
+
default: boolean;
|
|
975
|
+
};
|
|
976
|
+
verbose: {
|
|
977
|
+
type: string;
|
|
978
|
+
description: string;
|
|
979
|
+
default: boolean;
|
|
980
|
+
};
|
|
981
|
+
};
|
|
982
|
+
};
|
|
983
|
+
} | {
|
|
984
|
+
name: string;
|
|
985
|
+
description: string;
|
|
986
|
+
inputSchema: {
|
|
987
|
+
type: string;
|
|
988
|
+
properties: {
|
|
989
|
+
template: {
|
|
990
|
+
type: string;
|
|
991
|
+
description: string;
|
|
992
|
+
};
|
|
993
|
+
framework: {
|
|
994
|
+
type: string;
|
|
995
|
+
description: string;
|
|
996
|
+
default: string;
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
required: string[];
|
|
1000
|
+
};
|
|
893
1001
|
})[];
|
package/build/schemas/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { docUtilToolSchemas } from "./doc-util-tools.js";
|
|
|
9
9
|
import { projectToolSchemas } from "./project-tools.js";
|
|
10
10
|
import { orchestrationToolSchemas } from "./orchestration-tools.js";
|
|
11
11
|
import { interviewToolSchemas } from "./interview-tools.js";
|
|
12
|
+
import { uiUxSchemas } from "./ui-ux-schemas.js";
|
|
12
13
|
// 合并所有工具 schemas
|
|
13
14
|
export const allToolSchemas = [
|
|
14
15
|
...basicToolSchemas,
|
|
@@ -19,4 +20,5 @@ export const allToolSchemas = [
|
|
|
19
20
|
...projectToolSchemas,
|
|
20
21
|
...orchestrationToolSchemas,
|
|
21
22
|
...interviewToolSchemas,
|
|
23
|
+
...uiUxSchemas,
|
|
22
24
|
];
|
|
@@ -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
|
+
];
|