@zzp123/mcp-zentao 1.17.4 → 1.17.6
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 +41 -0
- package/README.md +11 -11
- package/dist/index-dev.js +0 -63
- package/dist/index-pm.js +0 -63
- package/dist/index-qa.js +0 -63
- package/dist/index.js +0 -64
- 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,47 @@ 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
|
+
|
|
29
|
+
## [1.17.5] - 2025-11-10
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
- **评论工具简化** 💬
|
|
33
|
+
- 移除 `addBugComment` 和 `addTaskComment` 便捷工具
|
|
34
|
+
- 只保留通用的 `addComment` 工具和产品经理专用的 `addStoryComment`
|
|
35
|
+
- 简化工具集,用户使用 `addComment` 可以为任何对象添加评论
|
|
36
|
+
|
|
37
|
+
### Impact
|
|
38
|
+
- **完整版**: 94工具 → 92工具 (-2个)
|
|
39
|
+
- **产品经理版**: 42工具 → 40工具 (-2个)
|
|
40
|
+
- **测试工程师版**: 29工具 → 27工具 (-2个)
|
|
41
|
+
- **开发工程师版**: 41工具 → 39工具 (-2个)
|
|
42
|
+
- **总计**: 减少 6个工具定义,简化约 200行代码
|
|
43
|
+
|
|
44
|
+
### Technical
|
|
45
|
+
- 更新 `src/roleConfig.ts` 中的 comment 工具列表
|
|
46
|
+
- 从 `src/index.ts` 删除 `addTaskComment` 和 `addBugComment` 定义
|
|
47
|
+
- 重新生成所有角色版本源文件
|
|
48
|
+
|
|
8
49
|
## [1.17.4] - 2025-11-10
|
|
9
50
|
|
|
10
51
|
### 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.
|
|
93
|
-
- v1.17.
|
|
94
|
-
- v1.17.
|
|
92
|
+
- v1.17.5 - 评论工具简化(移除 addBugComment 和 addTaskComment)
|
|
93
|
+
- v1.17.4 - 产品经理版移除工单管理(42个工具)
|
|
94
|
+
- v1.17.3 - 测试工程师版移除构建和工单管理(29个工具)
|
|
95
95
|
|
|
96
96
|
## 使用方法
|
|
97
97
|
|
package/dist/index-dev.js
CHANGED
|
@@ -828,69 +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
|
-
server.tool("addTaskComment", "为任务添加评论", {
|
|
853
|
-
taskId: z.number().describe("任务ID"),
|
|
854
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
855
|
-
}, async ({ taskId, comment }) => {
|
|
856
|
-
if (!zentaoApi)
|
|
857
|
-
throw new Error("Please initialize Zentao API first");
|
|
858
|
-
const result = await zentaoApi.addComment({
|
|
859
|
-
objectType: 'task',
|
|
860
|
-
objectID: taskId,
|
|
861
|
-
comment
|
|
862
|
-
});
|
|
863
|
-
return {
|
|
864
|
-
content: [{
|
|
865
|
-
type: "text",
|
|
866
|
-
text: JSON.stringify({
|
|
867
|
-
message: `已为任务 #${taskId} 添加评论`,
|
|
868
|
-
comment: result
|
|
869
|
-
}, null, 2)
|
|
870
|
-
}]
|
|
871
|
-
};
|
|
872
|
-
});
|
|
873
|
-
server.tool("addBugComment", "为Bug添加评论", {
|
|
874
|
-
bugId: z.number().describe("Bug ID"),
|
|
875
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
876
|
-
}, async ({ bugId, comment }) => {
|
|
877
|
-
if (!zentaoApi)
|
|
878
|
-
throw new Error("Please initialize Zentao API first");
|
|
879
|
-
const result = await zentaoApi.addComment({
|
|
880
|
-
objectType: 'bug',
|
|
881
|
-
objectID: bugId,
|
|
882
|
-
comment
|
|
883
|
-
});
|
|
884
|
-
return {
|
|
885
|
-
content: [{
|
|
886
|
-
type: "text",
|
|
887
|
-
text: JSON.stringify({
|
|
888
|
-
message: `已为Bug #${bugId} 添加评论`,
|
|
889
|
-
comment: result
|
|
890
|
-
}, null, 2)
|
|
891
|
-
}]
|
|
892
|
-
};
|
|
893
|
-
});
|
|
894
831
|
// Start receiving messages on stdin and sending messages on stdout
|
|
895
832
|
const transport = new StdioServerTransport();
|
|
896
833
|
await server.connect(transport).catch(console.error);
|
package/dist/index-pm.js
CHANGED
|
@@ -949,69 +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
|
-
server.tool("addTaskComment", "为任务添加评论", {
|
|
974
|
-
taskId: z.number().describe("任务ID"),
|
|
975
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
976
|
-
}, async ({ taskId, comment }) => {
|
|
977
|
-
if (!zentaoApi)
|
|
978
|
-
throw new Error("Please initialize Zentao API first");
|
|
979
|
-
const result = await zentaoApi.addComment({
|
|
980
|
-
objectType: 'task',
|
|
981
|
-
objectID: taskId,
|
|
982
|
-
comment
|
|
983
|
-
});
|
|
984
|
-
return {
|
|
985
|
-
content: [{
|
|
986
|
-
type: "text",
|
|
987
|
-
text: JSON.stringify({
|
|
988
|
-
message: `已为任务 #${taskId} 添加评论`,
|
|
989
|
-
comment: result
|
|
990
|
-
}, null, 2)
|
|
991
|
-
}]
|
|
992
|
-
};
|
|
993
|
-
});
|
|
994
|
-
server.tool("addBugComment", "为Bug添加评论", {
|
|
995
|
-
bugId: z.number().describe("Bug ID"),
|
|
996
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
997
|
-
}, async ({ bugId, comment }) => {
|
|
998
|
-
if (!zentaoApi)
|
|
999
|
-
throw new Error("Please initialize Zentao API first");
|
|
1000
|
-
const result = await zentaoApi.addComment({
|
|
1001
|
-
objectType: 'bug',
|
|
1002
|
-
objectID: bugId,
|
|
1003
|
-
comment
|
|
1004
|
-
});
|
|
1005
|
-
return {
|
|
1006
|
-
content: [{
|
|
1007
|
-
type: "text",
|
|
1008
|
-
text: JSON.stringify({
|
|
1009
|
-
message: `已为Bug #${bugId} 添加评论`,
|
|
1010
|
-
comment: result
|
|
1011
|
-
}, null, 2)
|
|
1012
|
-
}]
|
|
1013
|
-
};
|
|
1014
|
-
});
|
|
1015
952
|
// Start receiving messages on stdin and sending messages on stdout
|
|
1016
953
|
const transport = new StdioServerTransport();
|
|
1017
954
|
await server.connect(transport).catch(console.error);
|
package/dist/index-qa.js
CHANGED
|
@@ -765,69 +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
|
-
server.tool("addTaskComment", "为任务添加评论", {
|
|
790
|
-
taskId: z.number().describe("任务ID"),
|
|
791
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
792
|
-
}, async ({ taskId, comment }) => {
|
|
793
|
-
if (!zentaoApi)
|
|
794
|
-
throw new Error("Please initialize Zentao API first");
|
|
795
|
-
const result = await zentaoApi.addComment({
|
|
796
|
-
objectType: 'task',
|
|
797
|
-
objectID: taskId,
|
|
798
|
-
comment
|
|
799
|
-
});
|
|
800
|
-
return {
|
|
801
|
-
content: [{
|
|
802
|
-
type: "text",
|
|
803
|
-
text: JSON.stringify({
|
|
804
|
-
message: `已为任务 #${taskId} 添加评论`,
|
|
805
|
-
comment: result
|
|
806
|
-
}, null, 2)
|
|
807
|
-
}]
|
|
808
|
-
};
|
|
809
|
-
});
|
|
810
|
-
server.tool("addBugComment", "为Bug添加评论", {
|
|
811
|
-
bugId: z.number().describe("Bug ID"),
|
|
812
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
813
|
-
}, async ({ bugId, comment }) => {
|
|
814
|
-
if (!zentaoApi)
|
|
815
|
-
throw new Error("Please initialize Zentao API first");
|
|
816
|
-
const result = await zentaoApi.addComment({
|
|
817
|
-
objectType: 'bug',
|
|
818
|
-
objectID: bugId,
|
|
819
|
-
comment
|
|
820
|
-
});
|
|
821
|
-
return {
|
|
822
|
-
content: [{
|
|
823
|
-
type: "text",
|
|
824
|
-
text: JSON.stringify({
|
|
825
|
-
message: `已为Bug #${bugId} 添加评论`,
|
|
826
|
-
comment: result
|
|
827
|
-
}, null, 2)
|
|
828
|
-
}]
|
|
829
|
-
};
|
|
830
|
-
});
|
|
831
768
|
// Start receiving messages on stdin and sending messages on stdout
|
|
832
769
|
const transport = new StdioServerTransport();
|
|
833
770
|
await server.connect(transport).catch(console.error);
|
package/dist/index.js
CHANGED
|
@@ -1622,70 +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
|
-
server.tool("addTaskComment", "为任务添加评论", {
|
|
1648
|
-
taskId: z.number().describe("任务ID"),
|
|
1649
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
1650
|
-
}, async ({ taskId, comment }) => {
|
|
1651
|
-
if (!zentaoApi)
|
|
1652
|
-
throw new Error("Please initialize Zentao API first");
|
|
1653
|
-
const result = await zentaoApi.addComment({
|
|
1654
|
-
objectType: 'task',
|
|
1655
|
-
objectID: taskId,
|
|
1656
|
-
comment
|
|
1657
|
-
});
|
|
1658
|
-
return {
|
|
1659
|
-
content: [{
|
|
1660
|
-
type: "text",
|
|
1661
|
-
text: JSON.stringify({
|
|
1662
|
-
message: `已为任务 #${taskId} 添加评论`,
|
|
1663
|
-
comment: result
|
|
1664
|
-
}, null, 2)
|
|
1665
|
-
}]
|
|
1666
|
-
};
|
|
1667
|
-
});
|
|
1668
|
-
server.tool("addBugComment", "为Bug添加评论", {
|
|
1669
|
-
bugId: z.number().describe("Bug ID"),
|
|
1670
|
-
comment: z.string().describe("评论内容,支持HTML格式")
|
|
1671
|
-
}, async ({ bugId, comment }) => {
|
|
1672
|
-
if (!zentaoApi)
|
|
1673
|
-
throw new Error("Please initialize Zentao API first");
|
|
1674
|
-
const result = await zentaoApi.addComment({
|
|
1675
|
-
objectType: 'bug',
|
|
1676
|
-
objectID: bugId,
|
|
1677
|
-
comment
|
|
1678
|
-
});
|
|
1679
|
-
return {
|
|
1680
|
-
content: [{
|
|
1681
|
-
type: "text",
|
|
1682
|
-
text: JSON.stringify({
|
|
1683
|
-
message: `已为Bug #${bugId} 添加评论`,
|
|
1684
|
-
comment: result
|
|
1685
|
-
}, null, 2)
|
|
1686
|
-
}]
|
|
1687
|
-
};
|
|
1688
|
-
});
|
|
1689
1625
|
// Start receiving messages on stdin and sending messages on stdout
|
|
1690
1626
|
const transport = new StdioServerTransport();
|
|
1691
1627
|
await server.connect(transport).catch(console.error);
|
package/dist/roleConfig.js
CHANGED
|
@@ -72,7 +72,7 @@ export const TOOL_CATEGORIES = {
|
|
|
72
72
|
// 评论功能(所有角色)
|
|
73
73
|
comment: [
|
|
74
74
|
'getComments', 'getCommentDetail', 'addComment',
|
|
75
|
-
'updateComment', 'deleteComment'
|
|
75
|
+
'updateComment', 'deleteComment'
|
|
76
76
|
],
|
|
77
77
|
// 模块和文件(所有角色)
|
|
78
78
|
utility: [
|
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
|
};
|