@zzp123/mcp-zentao 1.17.5 → 1.17.7
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/CHANGELOG.md +21 -0
- package/README.md +9 -9
- package/dist/api/zentaoApi.d.ts +2 -2
- package/dist/api/zentaoApi.js +4 -4
- package/dist/index-dev.js +0 -21
- package/dist/index-pm.js +0 -21
- package/dist/index-qa.js +0 -21
- package/dist/index.js +2 -24
- package/dist/roleConfig.js +1 -1
- package/package.json +1 -1
- package/scripts/generate-role-versions.cjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.17.6] - 2025-11-10
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **评论工具完全统一** 💬
|
|
12
|
+
- 移除最后一个便捷工具 `addStoryComment`
|
|
13
|
+
- 现在所有评论统一使用 `addComment` 工具
|
|
14
|
+
- 支持11种对象类型:story, requirement, task, bug, testcase, testtask, todo, doc, doctemplate, execution, project
|
|
15
|
+
|
|
16
|
+
### Impact
|
|
17
|
+
- **完整版**: 92工具 → 91工具 (-1个)
|
|
18
|
+
- **产品经理版**: 40工具 → 39工具 (-1个)
|
|
19
|
+
- **测试工程师版**: 27工具 → 26工具 (-1个)
|
|
20
|
+
- **开发工程师版**: 39工具 → 38工具 (-1个)
|
|
21
|
+
- **总计**: 完全统一评论API,累计减少约 106行重复代码
|
|
22
|
+
|
|
23
|
+
### Technical
|
|
24
|
+
- 从 `src/roleConfig.ts` 中移除 `addStoryComment`
|
|
25
|
+
- 从 `src/index.ts` 删除 `addStoryComment` 工具定义
|
|
26
|
+
- 重新生成所有角色版本源文件
|
|
27
|
+
- 更新 `prepare-publish.cjs` 中的工具计数
|
|
28
|
+
|
|
8
29
|
## [1.17.5] - 2025-11-10
|
|
9
30
|
|
|
10
31
|
### Changed
|
package/README.md
CHANGED
|
@@ -17,10 +17,10 @@ npm install @zzp123/mcp-zentao -g
|
|
|
17
17
|
|
|
18
18
|
| 版本 | 命令 | 工具数量 | 文件大小 | 适用角色 |
|
|
19
19
|
|------|------|---------|---------|---------|
|
|
20
|
-
| **完整版** | `zentao` |
|
|
21
|
-
| **产品经理版** | `zentao-pm` |
|
|
22
|
-
| **测试工程师版** | `zentao-qa` |
|
|
23
|
-
| **开发工程师版** | `zentao-dev` |
|
|
20
|
+
| **完整版** | `zentao` | 91个 | 67 KB | 需要使用全部功能 |
|
|
21
|
+
| **产品经理版** | `zentao-pm` | 39个 | 39 KB (-57%) | 需求、产品、计划管理 |
|
|
22
|
+
| **测试工程师版** | `zentao-qa` | 26个 | 25 KB (-71%) | Bug、测试用例管理 |
|
|
23
|
+
| **开发工程师版** | `zentao-dev` | 38个 | 35 KB (-58%) | 任务、项目、Bug解决 |
|
|
24
24
|
|
|
25
25
|
### 如何选择版本?
|
|
26
26
|
|
|
@@ -83,15 +83,15 @@ npm install @zzp123/mcp-zentao -g
|
|
|
83
83
|
|
|
84
84
|
查看完整的版本更新历史,请访问 [CHANGELOG.md](./CHANGELOG.md)
|
|
85
85
|
|
|
86
|
-
**最新版本**: v1.17.
|
|
87
|
-
- 💬
|
|
88
|
-
- 📊 完整版
|
|
89
|
-
- 🎯
|
|
86
|
+
**最新版本**: v1.17.6 - 2025-11-10
|
|
87
|
+
- 💬 评论工具完全统一(移除所有便捷工具,统一使用 addComment)
|
|
88
|
+
- 📊 完整版 91个工具,PM版 39个,QA版 26个,Dev版 38个
|
|
89
|
+
- 🎯 累计减少约 106行重复代码,完全统一评论API
|
|
90
90
|
|
|
91
91
|
**近期版本**:
|
|
92
|
+
- v1.17.5 - 评论工具简化(移除 addBugComment 和 addTaskComment)
|
|
92
93
|
- v1.17.4 - 产品经理版移除工单管理(42个工具)
|
|
93
94
|
- v1.17.3 - 测试工程师版移除构建和工单管理(29个工具)
|
|
94
|
-
- v1.17.2 - 产品经理版移除反馈管理(47个工具)
|
|
95
95
|
|
|
96
96
|
## 使用方法
|
|
97
97
|
|
package/dist/api/zentaoApi.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export declare class ZentaoAPI {
|
|
|
41
41
|
* @param limit 每页数量(默认20,最大100)
|
|
42
42
|
* @param branch 分支筛选('all'所有分支/'0'主干/分支ID,默认'all')
|
|
43
43
|
* @param order 排序字段(如:'id_desc'、'pri_desc'等,默认'id_desc')
|
|
44
|
-
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'
|
|
44
|
+
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'basic')
|
|
45
45
|
* @returns Promise<Bug列表及分页信息>
|
|
46
46
|
*/
|
|
47
47
|
getMyBugs(status?: BugStatus, productId?: number, page?: number, limit?: number, branch?: string, order?: string, fields?: 'basic' | 'default' | 'full'): Promise<{
|
|
@@ -59,7 +59,7 @@ export declare class ZentaoAPI {
|
|
|
59
59
|
* @param status Bug状态筛选(支持多种状态,详见BugStatus类型)
|
|
60
60
|
* @param branch 分支筛选('all'所有分支/'0'主干/分支ID,默认'all')
|
|
61
61
|
* @param order 排序字段(如:'id_desc'、'pri_desc'等,默认'id_desc')
|
|
62
|
-
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'
|
|
62
|
+
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'basic')
|
|
63
63
|
* @returns Promise<Bug列表及分页信息>
|
|
64
64
|
*/
|
|
65
65
|
getProductBugs(productId: number, page?: number, limit?: number, status?: BugStatus, branch?: string, order?: string, fields?: 'basic' | 'default' | 'full'): Promise<{
|
package/dist/api/zentaoApi.js
CHANGED
|
@@ -240,7 +240,7 @@ export class ZentaoAPI {
|
|
|
240
240
|
* @param limit 每页数量(默认20,最大100)
|
|
241
241
|
* @param branch 分支筛选('all'所有分支/'0'主干/分支ID,默认'all')
|
|
242
242
|
* @param order 排序字段(如:'id_desc'、'pri_desc'等,默认'id_desc')
|
|
243
|
-
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'
|
|
243
|
+
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'basic')
|
|
244
244
|
* @returns Promise<Bug列表及分页信息>
|
|
245
245
|
*/
|
|
246
246
|
async getMyBugs(status, productId, page, limit, branch, order, fields) {
|
|
@@ -259,7 +259,7 @@ export class ZentaoAPI {
|
|
|
259
259
|
const finalPage = page || 1;
|
|
260
260
|
const finalBranch = branch || 'all';
|
|
261
261
|
const finalOrder = order || 'id_desc';
|
|
262
|
-
const finalFields = fields || '
|
|
262
|
+
const finalFields = fields || 'basic';
|
|
263
263
|
// 构建查询参数
|
|
264
264
|
const queryParams = new URLSearchParams();
|
|
265
265
|
queryParams.append('branch', finalBranch);
|
|
@@ -317,7 +317,7 @@ export class ZentaoAPI {
|
|
|
317
317
|
* @param status Bug状态筛选(支持多种状态,详见BugStatus类型)
|
|
318
318
|
* @param branch 分支筛选('all'所有分支/'0'主干/分支ID,默认'all')
|
|
319
319
|
* @param order 排序字段(如:'id_desc'、'pri_desc'等,默认'id_desc')
|
|
320
|
-
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'
|
|
320
|
+
* @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'basic')
|
|
321
321
|
* @returns Promise<Bug列表及分页信息>
|
|
322
322
|
*/
|
|
323
323
|
async getProductBugs(productId, page, limit, status, branch, order, fields) {
|
|
@@ -327,7 +327,7 @@ export class ZentaoAPI {
|
|
|
327
327
|
const finalPage = page || 1;
|
|
328
328
|
const finalBranch = branch || 'all';
|
|
329
329
|
const finalOrder = order || 'id_desc';
|
|
330
|
-
const finalFields = fields || '
|
|
330
|
+
const finalFields = fields || 'basic';
|
|
331
331
|
console.log(`正在获取产品 ${productId} 的Bug列表 (status=${status || 'all'}, branch=${finalBranch}, page=${finalPage}, limit=${finalLimit}, order=${finalOrder}, fields=${finalFields})...`);
|
|
332
332
|
// 构建查询参数
|
|
333
333
|
const queryParams = new URLSearchParams();
|
package/dist/index-dev.js
CHANGED
|
@@ -828,27 +828,6 @@ server.tool("deleteComment", "删除评论 - 只能删除自己的评论,管
|
|
|
828
828
|
}]
|
|
829
829
|
};
|
|
830
830
|
});
|
|
831
|
-
server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软件需求(story)和用户需求(requirement)", {
|
|
832
|
-
storyId: z.number().describe("需求ID"),
|
|
833
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
834
|
-
}, async ({ storyId, comment }) => {
|
|
835
|
-
if (!zentaoApi)
|
|
836
|
-
throw new Error("Please initialize Zentao API first");
|
|
837
|
-
const result = await zentaoApi.addComment({
|
|
838
|
-
objectType: 'story',
|
|
839
|
-
objectID: storyId,
|
|
840
|
-
comment
|
|
841
|
-
});
|
|
842
|
-
return {
|
|
843
|
-
content: [{
|
|
844
|
-
type: "text",
|
|
845
|
-
text: JSON.stringify({
|
|
846
|
-
message: `已为需求 #${storyId} 添加评论`,
|
|
847
|
-
comment: result
|
|
848
|
-
}, null, 2)
|
|
849
|
-
}]
|
|
850
|
-
};
|
|
851
|
-
});
|
|
852
831
|
// Start receiving messages on stdin and sending messages on stdout
|
|
853
832
|
const transport = new StdioServerTransport();
|
|
854
833
|
await server.connect(transport).catch(console.error);
|
package/dist/index-pm.js
CHANGED
|
@@ -949,27 +949,6 @@ server.tool("deleteComment", "删除评论 - 只能删除自己的评论,管
|
|
|
949
949
|
}]
|
|
950
950
|
};
|
|
951
951
|
});
|
|
952
|
-
server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软件需求(story)和用户需求(requirement)", {
|
|
953
|
-
storyId: z.number().describe("需求ID"),
|
|
954
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
955
|
-
}, async ({ storyId, comment }) => {
|
|
956
|
-
if (!zentaoApi)
|
|
957
|
-
throw new Error("Please initialize Zentao API first");
|
|
958
|
-
const result = await zentaoApi.addComment({
|
|
959
|
-
objectType: 'story',
|
|
960
|
-
objectID: storyId,
|
|
961
|
-
comment
|
|
962
|
-
});
|
|
963
|
-
return {
|
|
964
|
-
content: [{
|
|
965
|
-
type: "text",
|
|
966
|
-
text: JSON.stringify({
|
|
967
|
-
message: `已为需求 #${storyId} 添加评论`,
|
|
968
|
-
comment: result
|
|
969
|
-
}, null, 2)
|
|
970
|
-
}]
|
|
971
|
-
};
|
|
972
|
-
});
|
|
973
952
|
// Start receiving messages on stdin and sending messages on stdout
|
|
974
953
|
const transport = new StdioServerTransport();
|
|
975
954
|
await server.connect(transport).catch(console.error);
|
package/dist/index-qa.js
CHANGED
|
@@ -765,27 +765,6 @@ server.tool("deleteComment", "删除评论 - 只能删除自己的评论,管
|
|
|
765
765
|
}]
|
|
766
766
|
};
|
|
767
767
|
});
|
|
768
|
-
server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软件需求(story)和用户需求(requirement)", {
|
|
769
|
-
storyId: z.number().describe("需求ID"),
|
|
770
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
771
|
-
}, async ({ storyId, comment }) => {
|
|
772
|
-
if (!zentaoApi)
|
|
773
|
-
throw new Error("Please initialize Zentao API first");
|
|
774
|
-
const result = await zentaoApi.addComment({
|
|
775
|
-
objectType: 'story',
|
|
776
|
-
objectID: storyId,
|
|
777
|
-
comment
|
|
778
|
-
});
|
|
779
|
-
return {
|
|
780
|
-
content: [{
|
|
781
|
-
type: "text",
|
|
782
|
-
text: JSON.stringify({
|
|
783
|
-
message: `已为需求 #${storyId} 添加评论`,
|
|
784
|
-
comment: result
|
|
785
|
-
}, null, 2)
|
|
786
|
-
}]
|
|
787
|
-
};
|
|
788
|
-
});
|
|
789
768
|
// Start receiving messages on stdin and sending messages on stdout
|
|
790
769
|
const transport = new StdioServerTransport();
|
|
791
770
|
await server.connect(transport).catch(console.error);
|
package/dist/index.js
CHANGED
|
@@ -117,7 +117,7 @@ server.tool("getMyBugs", "获取Bug列表 - 支持多种状态筛选(指派给
|
|
|
117
117
|
limit: z.number().optional().describe("每页数量,默认20,最大100"),
|
|
118
118
|
branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
|
|
119
119
|
order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
|
|
120
|
-
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(
|
|
120
|
+
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
|
|
121
121
|
}, async ({ status, productId, page, limit, branch, order, fields }) => {
|
|
122
122
|
if (!zentaoApi)
|
|
123
123
|
throw new Error("Please initialize Zentao API first");
|
|
@@ -166,7 +166,7 @@ server.tool("getProductBugs", "获取指定产品的Bug列表 - 支持多种状
|
|
|
166
166
|
]).optional().describe("Bug状态筛选,默认返回所有状态"),
|
|
167
167
|
branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
|
|
168
168
|
order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
|
|
169
|
-
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(
|
|
169
|
+
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
|
|
170
170
|
}, async ({ productId, page, limit, status, branch, order, fields }) => {
|
|
171
171
|
if (!zentaoApi)
|
|
172
172
|
throw new Error("Please initialize Zentao API first");
|
|
@@ -1622,28 +1622,6 @@ server.tool("deleteComment", "删除评论 - 只能删除自己的评论,管
|
|
|
1622
1622
|
}]
|
|
1623
1623
|
};
|
|
1624
1624
|
});
|
|
1625
|
-
// 便捷工具 - 为特定类型对象添加评论
|
|
1626
|
-
server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软件需求(story)和用户需求(requirement)", {
|
|
1627
|
-
storyId: z.number().describe("需求ID"),
|
|
1628
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
1629
|
-
}, async ({ storyId, comment }) => {
|
|
1630
|
-
if (!zentaoApi)
|
|
1631
|
-
throw new Error("Please initialize Zentao API first");
|
|
1632
|
-
const result = await zentaoApi.addComment({
|
|
1633
|
-
objectType: 'story',
|
|
1634
|
-
objectID: storyId,
|
|
1635
|
-
comment
|
|
1636
|
-
});
|
|
1637
|
-
return {
|
|
1638
|
-
content: [{
|
|
1639
|
-
type: "text",
|
|
1640
|
-
text: JSON.stringify({
|
|
1641
|
-
message: `已为需求 #${storyId} 添加评论`,
|
|
1642
|
-
comment: result
|
|
1643
|
-
}, null, 2)
|
|
1644
|
-
}]
|
|
1645
|
-
};
|
|
1646
|
-
});
|
|
1647
1625
|
// Start receiving messages on stdin and sending messages on stdout
|
|
1648
1626
|
const transport = new StdioServerTransport();
|
|
1649
1627
|
await server.connect(transport).catch(console.error);
|
package/dist/roleConfig.js
CHANGED
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@ const TOOL_CATEGORIES = {
|
|
|
20
20
|
execution: ['getExecutionDetail', 'createExecution', 'updateExecution', 'deleteExecution', 'getExecutionBuilds'],
|
|
21
21
|
build: ['getBuildDetail', 'createBuild', 'updateBuild', 'deleteBuild'],
|
|
22
22
|
ticket: ['getTickets', 'getTicketDetail', 'createTicket', 'updateTicket', 'deleteTicket'],
|
|
23
|
-
comment: ['getComments', 'getCommentDetail', 'addComment', 'updateComment', 'deleteComment'
|
|
23
|
+
comment: ['getComments', 'getCommentDetail', 'addComment', 'updateComment', 'deleteComment'],
|
|
24
24
|
utility: ['getModules', 'uploadFile', 'uploadImageFromClipboard', 'downloadFile'],
|
|
25
25
|
user: ['getUsers', 'getUserDetail', 'getMyProfile', 'createUser', 'updateUser', 'deleteUser']
|
|
26
26
|
};
|