@zzp123/mcp-zentao 1.17.5 → 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 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` | 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解决 |
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.5 - 2025-11-10
87
- - 💬 评论工具简化(移除便捷工具,统一使用 addComment)
88
- - 📊 完整版 92个工具,PM版 40个,QA版 27个,Dev版 39
89
- - 🎯 减少 6个工具定义,简化约 200行代码
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/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
@@ -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);
@@ -72,7 +72,7 @@ export const TOOL_CATEGORIES = {
72
72
  // 评论功能(所有角色)
73
73
  comment: [
74
74
  'getComments', 'getCommentDetail', 'addComment',
75
- 'updateComment', 'deleteComment', 'addStoryComment'
75
+ 'updateComment', 'deleteComment'
76
76
  ],
77
77
  // 模块和文件(所有角色)
78
78
  utility: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzp123/mcp-zentao",
3
- "version": "1.17.5",
3
+ "version": "1.17.6",
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', 'addStoryComment'],
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
  };