@zzp123/mcp-zentao 1.17.3 → 1.17.5

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 CHANGED
@@ -5,6 +5,39 @@ 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.5] - 2025-11-10
9
+
10
+ ### Changed
11
+ - **评论工具简化** 💬
12
+ - 移除 `addBugComment` 和 `addTaskComment` 便捷工具
13
+ - 只保留通用的 `addComment` 工具和产品经理专用的 `addStoryComment`
14
+ - 简化工具集,用户使用 `addComment` 可以为任何对象添加评论
15
+
16
+ ### Impact
17
+ - **完整版**: 94工具 → 92工具 (-2个)
18
+ - **产品经理版**: 42工具 → 40工具 (-2个)
19
+ - **测试工程师版**: 29工具 → 27工具 (-2个)
20
+ - **开发工程师版**: 41工具 → 39工具 (-2个)
21
+ - **总计**: 减少 6个工具定义,简化约 200行代码
22
+
23
+ ### Technical
24
+ - 更新 `src/roleConfig.ts` 中的 comment 工具列表
25
+ - 从 `src/index.ts` 删除 `addTaskComment` 和 `addBugComment` 定义
26
+ - 重新生成所有角色版本源文件
27
+
28
+ ## [1.17.4] - 2025-11-10
29
+
30
+ ### Changed
31
+ - **产品经理版再次优化** 📊
32
+ - 从产品经理版 (mcp-zentao-pm) 移除工单管理工具(5个工具)
33
+ - 工具数量从 47 个减少到 42 个
34
+ - 包大小从 44 KB 减少到约 40 KB
35
+ - 更专注于需求、产品和计划管理核心功能
36
+
37
+ ### Technical
38
+ - 更新 `roleConfig.ts` 中的 pm 角色配置
39
+ - 重新生成产品经理版源文件 (`src/index-pm.ts`)
40
+
8
41
  ## [1.17.3] - 2025-11-10
9
42
 
10
43
  ### Changed
package/README.md CHANGED
@@ -17,10 +17,10 @@ npm install @zzp123/mcp-zentao -g
17
17
 
18
18
  | 版本 | 命令 | 工具数量 | 文件大小 | 适用角色 |
19
19
  |------|------|---------|---------|---------|
20
- | **完整版** | `zentao` | 94个 | 69 KB | 需要使用全部功能 |
21
- | **产品经理版** | `zentao-pm` | 47个 | 44 KB (-36%) | 需求、产品、计划管理 |
22
- | **测试工程师版** | `zentao-qa` | 29个 | 27 KB (-61%) | Bug、测试用例管理 |
23
- | **开发工程师版** | `zentao-dev` | 41个 | 37 KB (-46%) | 任务、项目、Bug解决 |
20
+ | **完整版** | `zentao` | 92个 | 67 KB | 需要使用全部功能 |
21
+ | **产品经理版** | `zentao-pm` | 40个 | 39 KB (-57%) | 需求、产品、计划管理 |
22
+ | **测试工程师版** | `zentao-qa` | 27个 | 25 KB (-71%) | Bug、测试用例管理 |
23
+ | **开发工程师版** | `zentao-dev` | 39个 | 35 KB (-58%) | 任务、项目、Bug解决 |
24
24
 
25
25
  ### 如何选择版本?
26
26
 
@@ -50,7 +50,6 @@ npm install @zzp123/mcp-zentao -g
50
50
  - ✅ Bug查看(只读)
51
51
  - ✅ 任务查看(只读)
52
52
  - ✅ 评论功能
53
- - ✅ 工单管理
54
53
  - ✅ 文件上传
55
54
  </details>
56
55
 
@@ -84,15 +83,15 @@ npm install @zzp123/mcp-zentao -g
84
83
 
85
84
  查看完整的版本更新历史,请访问 [CHANGELOG.md](./CHANGELOG.md)
86
85
 
87
- **最新版本**: v1.17.3 - 2025-11-10
88
- - 🧪 测试工程师版优化(移除构建版本管理和工单管理工具)
89
- - 📊 测试版工具从 38 个减少到 29 个,减少上下文占用 61%
90
- - 🎯 更专注于Bug跟踪和测试用例管理核心功能
86
+ **最新版本**: v1.17.5 - 2025-11-10
87
+ - 💬 评论工具简化(移除便捷工具,统一使用 addComment)
88
+ - 📊 完整版 92个工具,PM版 40个,QA版 27个,Dev版 39个
89
+ - 🎯 减少 6个工具定义,简化约 200行代码
91
90
 
92
91
  **近期版本**:
93
- - v1.17.2 - 产品经理版优化(移除反馈管理工具,47个工具)
94
- - v1.17.1 - 开发工程师版优化(移除工单管理工具,41个工具)
95
- - v1.17.0 - 新增三个角色专用版本(PM/QA/Dev)
92
+ - v1.17.4 - 产品经理版移除工单管理(42个工具)
93
+ - v1.17.3 - 测试工程师版移除构建和工单管理(29个工具)
94
+ - v1.17.2 - 产品经理版移除反馈管理(47个工具)
96
95
 
97
96
  ## 使用方法
98
97
 
package/dist/index-dev.js CHANGED
@@ -849,48 +849,6 @@ server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软
849
849
  }]
850
850
  };
851
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
852
  // Start receiving messages on stdin and sending messages on stdout
895
853
  const transport = new StdioServerTransport();
896
854
  await server.connect(transport).catch(console.error);
package/dist/index-pm.js CHANGED
@@ -568,50 +568,6 @@ server.tool("deleteStory", "删除需求 - 支持软件需求(story)和用户需
568
568
  throw new Error("Please initialize Zentao API first");
569
569
  return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.deleteStory(storyId), null, 2) }] };
570
570
  });
571
- server.tool("getTickets", {
572
- browseType: z.string().optional(),
573
- param: z.string().optional(),
574
- orderBy: z.string().optional(),
575
- page: z.number().optional(),
576
- limit: z.number().optional()
577
- }, async (params) => {
578
- if (!zentaoApi)
579
- throw new Error("Please initialize Zentao API first");
580
- return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.getTickets(params), null, 2) }] };
581
- });
582
- server.tool("getTicketDetail", { ticketId: z.number() }, async ({ ticketId }) => {
583
- if (!zentaoApi)
584
- throw new Error("Please initialize Zentao API first");
585
- return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.getTicketDetail(ticketId), null, 2) }] };
586
- });
587
- server.tool("createTicket", {
588
- product: z.number(),
589
- module: z.number(),
590
- title: z.string(),
591
- type: z.string().optional(),
592
- desc: z.string().optional()
593
- }, async (params) => {
594
- if (!zentaoApi)
595
- throw new Error("Please initialize Zentao API first");
596
- return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.createTicket(params), null, 2) }] };
597
- });
598
- server.tool("updateTicket", {
599
- ticketId: z.number(),
600
- product: z.number().optional(),
601
- module: z.number().optional(),
602
- title: z.string().optional(),
603
- type: z.string().optional(),
604
- desc: z.string().optional()
605
- }, async ({ ticketId, ...params }) => {
606
- if (!zentaoApi)
607
- throw new Error("Please initialize Zentao API first");
608
- return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.updateTicket(ticketId, params), null, 2) }] };
609
- });
610
- server.tool("deleteTicket", { ticketId: z.number() }, async ({ ticketId }) => {
611
- if (!zentaoApi)
612
- throw new Error("Please initialize Zentao API first");
613
- return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.deleteTicket(ticketId), null, 2) }] };
614
- });
615
571
  server.tool("getModules", {
616
572
  type: z.enum(['story', 'task', 'bug', 'case', 'feedback', 'product']),
617
573
  id: z.number(),
@@ -1014,48 +970,6 @@ server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软
1014
970
  }]
1015
971
  };
1016
972
  });
1017
- server.tool("addTaskComment", "为任务添加评论", {
1018
- taskId: z.number().describe("任务ID"),
1019
- comment: z.string().describe("评论内容,支持HTML格式")
1020
- }, async ({ taskId, comment }) => {
1021
- if (!zentaoApi)
1022
- throw new Error("Please initialize Zentao API first");
1023
- const result = await zentaoApi.addComment({
1024
- objectType: 'task',
1025
- objectID: taskId,
1026
- comment
1027
- });
1028
- return {
1029
- content: [{
1030
- type: "text",
1031
- text: JSON.stringify({
1032
- message: `已为任务 #${taskId} 添加评论`,
1033
- comment: result
1034
- }, null, 2)
1035
- }]
1036
- };
1037
- });
1038
- server.tool("addBugComment", "为Bug添加评论", {
1039
- bugId: z.number().describe("Bug ID"),
1040
- comment: z.string().describe("评论内容,支持HTML格式")
1041
- }, async ({ bugId, comment }) => {
1042
- if (!zentaoApi)
1043
- throw new Error("Please initialize Zentao API first");
1044
- const result = await zentaoApi.addComment({
1045
- objectType: 'bug',
1046
- objectID: bugId,
1047
- comment
1048
- });
1049
- return {
1050
- content: [{
1051
- type: "text",
1052
- text: JSON.stringify({
1053
- message: `已为Bug #${bugId} 添加评论`,
1054
- comment: result
1055
- }, null, 2)
1056
- }]
1057
- };
1058
- });
1059
973
  // Start receiving messages on stdin and sending messages on stdout
1060
974
  const transport = new StdioServerTransport();
1061
975
  await server.connect(transport).catch(console.error);
package/dist/index-qa.js CHANGED
@@ -786,48 +786,6 @@ server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软
786
786
  }]
787
787
  };
788
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
789
  // Start receiving messages on stdin and sending messages on stdout
832
790
  const transport = new StdioServerTransport();
833
791
  await server.connect(transport).catch(console.error);
package/dist/index.js CHANGED
@@ -1644,48 +1644,6 @@ server.tool("addStoryComment", "为需求添加评论 - 专用工具,支持软
1644
1644
  }]
1645
1645
  };
1646
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
1647
  // Start receiving messages on stdin and sending messages on stdout
1690
1648
  const transport = new StdioServerTransport();
1691
1649
  await server.connect(transport).catch(console.error);
@@ -72,7 +72,7 @@ export const TOOL_CATEGORIES = {
72
72
  // 评论功能(所有角色)
73
73
  comment: [
74
74
  'getComments', 'getCommentDetail', 'addComment',
75
- 'updateComment', 'deleteComment', 'addTaskComment', 'addBugComment'
75
+ 'updateComment', 'deleteComment', 'addStoryComment'
76
76
  ],
77
77
  // 模块和文件(所有角色)
78
78
  utility: [
@@ -96,7 +96,6 @@ export const ROLE_PERMISSIONS = {
96
96
  ...TOOL_CATEGORIES.bugReadonly,
97
97
  ...TOOL_CATEGORIES.taskReadonly,
98
98
  ...TOOL_CATEGORIES.comment,
99
- ...TOOL_CATEGORIES.ticket,
100
99
  ...TOOL_CATEGORIES.utility
101
100
  ],
102
101
  // 测试工程师:Bug、测试用例、评论
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzp123/mcp-zentao",
3
- "version": "1.17.3",
3
+ "version": "1.17.5",
4
4
  "description": "禅道项目管理系统的高级API集成包 - 完整版,包含所有94个工具。另有产品经理、测试工程师、开发工程师专用精简版本可选",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -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', 'addTaskComment', 'addBugComment', 'addStoryComment'],
23
+ comment: ['getComments', 'getCommentDetail', 'addComment', 'updateComment', 'deleteComment', 'addStoryComment'],
24
24
  utility: ['getModules', 'uploadFile', 'uploadImageFromClipboard', 'downloadFile'],
25
25
  user: ['getUsers', 'getUserDetail', 'getMyProfile', 'createUser', 'updateUser', 'deleteUser']
26
26
  };
@@ -35,7 +35,6 @@ const ROLE_PERMISSIONS = {
35
35
  ...TOOL_CATEGORIES.bugReadonly,
36
36
  ...TOOL_CATEGORIES.taskReadonly,
37
37
  ...TOOL_CATEGORIES.comment,
38
- ...TOOL_CATEGORIES.ticket,
39
38
  ...TOOL_CATEGORIES.utility
40
39
  ],
41
40
  qa: [