@zzp123/mcp-zentao 1.17.0 → 1.17.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/CHANGELOG.md +13 -0
- package/README.md +1 -2
- package/dist/index-dev.js +0 -44
- package/dist/roleConfig.js +0 -1
- package/package.json +1 -1
- package/scripts/generate-role-versions.cjs +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,19 @@ 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.1] - 2025-11-10
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **开发工程师版优化** 🔧
|
|
12
|
+
- 从开发工程师版 (mcp-zentao-dev) 移除工单管理工具(5个工具)
|
|
13
|
+
- 工具数量从 46 个减少到 41 个
|
|
14
|
+
- 包大小从 24 KB 减少到约 22 KB
|
|
15
|
+
- 更专注于核心开发工作流
|
|
16
|
+
|
|
17
|
+
### Technical
|
|
18
|
+
- 更新 `roleConfig.ts` 中的 dev 角色配置
|
|
19
|
+
- 重新生成开发工程师版源文件 (`src/index-dev.ts`)
|
|
20
|
+
|
|
8
21
|
## [1.17.0] - 2025-11-10
|
|
9
22
|
|
|
10
23
|
### Added
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ npm install @zzp123/mcp-zentao -g
|
|
|
20
20
|
| **完整版** | `zentao` | 94个 | 69 KB | 需要使用全部功能 |
|
|
21
21
|
| **产品经理版** | `zentao-pm` | 54个 | 47 KB (-32%) | 需求、产品、计划管理 |
|
|
22
22
|
| **测试工程师版** | `zentao-qa` | 38个 | 38 KB (-45%) | Bug、测试用例、构建 |
|
|
23
|
-
| **开发工程师版** | `zentao-dev` |
|
|
23
|
+
| **开发工程师版** | `zentao-dev` | 41个 | 37 KB (-46%) | 任务、项目、Bug解决 |
|
|
24
24
|
|
|
25
25
|
### 如何选择版本?
|
|
26
26
|
|
|
@@ -80,7 +80,6 @@ npm install @zzp123/mcp-zentao -g
|
|
|
80
80
|
- ✅ 构建版本管理
|
|
81
81
|
- ✅ 需求查看(只读)
|
|
82
82
|
- ✅ 评论功能
|
|
83
|
-
- ✅ 工单管理
|
|
84
83
|
- ✅ 文件上传
|
|
85
84
|
</details>
|
|
86
85
|
|
package/dist/index-dev.js
CHANGED
|
@@ -447,50 +447,6 @@ server.tool("deleteBuild", { buildId: z.number() }, async ({ buildId }) => {
|
|
|
447
447
|
throw new Error("Please initialize Zentao API first");
|
|
448
448
|
return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.deleteBuild(buildId), null, 2) }] };
|
|
449
449
|
});
|
|
450
|
-
server.tool("getTickets", {
|
|
451
|
-
browseType: z.string().optional(),
|
|
452
|
-
param: z.string().optional(),
|
|
453
|
-
orderBy: z.string().optional(),
|
|
454
|
-
page: z.number().optional(),
|
|
455
|
-
limit: z.number().optional()
|
|
456
|
-
}, async (params) => {
|
|
457
|
-
if (!zentaoApi)
|
|
458
|
-
throw new Error("Please initialize Zentao API first");
|
|
459
|
-
return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.getTickets(params), null, 2) }] };
|
|
460
|
-
});
|
|
461
|
-
server.tool("getTicketDetail", { ticketId: z.number() }, async ({ ticketId }) => {
|
|
462
|
-
if (!zentaoApi)
|
|
463
|
-
throw new Error("Please initialize Zentao API first");
|
|
464
|
-
return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.getTicketDetail(ticketId), null, 2) }] };
|
|
465
|
-
});
|
|
466
|
-
server.tool("createTicket", {
|
|
467
|
-
product: z.number(),
|
|
468
|
-
module: z.number(),
|
|
469
|
-
title: z.string(),
|
|
470
|
-
type: z.string().optional(),
|
|
471
|
-
desc: z.string().optional()
|
|
472
|
-
}, async (params) => {
|
|
473
|
-
if (!zentaoApi)
|
|
474
|
-
throw new Error("Please initialize Zentao API first");
|
|
475
|
-
return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.createTicket(params), null, 2) }] };
|
|
476
|
-
});
|
|
477
|
-
server.tool("updateTicket", {
|
|
478
|
-
ticketId: z.number(),
|
|
479
|
-
product: z.number().optional(),
|
|
480
|
-
module: z.number().optional(),
|
|
481
|
-
title: z.string().optional(),
|
|
482
|
-
type: z.string().optional(),
|
|
483
|
-
desc: z.string().optional()
|
|
484
|
-
}, async ({ ticketId, ...params }) => {
|
|
485
|
-
if (!zentaoApi)
|
|
486
|
-
throw new Error("Please initialize Zentao API first");
|
|
487
|
-
return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.updateTicket(ticketId, params), null, 2) }] };
|
|
488
|
-
});
|
|
489
|
-
server.tool("deleteTicket", { ticketId: z.number() }, async ({ ticketId }) => {
|
|
490
|
-
if (!zentaoApi)
|
|
491
|
-
throw new Error("Please initialize Zentao API first");
|
|
492
|
-
return { content: [{ type: "text", text: JSON.stringify(await zentaoApi.deleteTicket(ticketId), null, 2) }] };
|
|
493
|
-
});
|
|
494
450
|
server.tool("getModules", {
|
|
495
451
|
type: z.enum(['story', 'task', 'bug', 'case', 'feedback', 'product']),
|
|
496
452
|
id: z.number(),
|
package/dist/roleConfig.js
CHANGED
package/package.json
CHANGED
|
@@ -59,7 +59,6 @@ const ROLE_PERMISSIONS = {
|
|
|
59
59
|
...TOOL_CATEGORIES.build,
|
|
60
60
|
...TOOL_CATEGORIES.storyReadonly,
|
|
61
61
|
...TOOL_CATEGORIES.comment,
|
|
62
|
-
...TOOL_CATEGORIES.ticket,
|
|
63
62
|
...TOOL_CATEGORIES.utility
|
|
64
63
|
]
|
|
65
64
|
};
|
|
@@ -71,7 +70,7 @@ const ROLE_NAMES = {
|
|
|
71
70
|
};
|
|
72
71
|
|
|
73
72
|
// 读取完整的 index.ts
|
|
74
|
-
const indexPath = path.join(__dirname, 'src', 'index.ts');
|
|
73
|
+
const indexPath = path.join(__dirname, '..', 'src', 'index.ts');
|
|
75
74
|
const indexContent = fs.readFileSync(indexPath, 'utf8');
|
|
76
75
|
|
|
77
76
|
// 提取工具注册块的函数
|
|
@@ -195,7 +194,7 @@ function extractToolBlocks(content) {
|
|
|
195
194
|
|
|
196
195
|
// 写入文件
|
|
197
196
|
const output = finalLines.join('\n');
|
|
198
|
-
const outputPath = path.join(__dirname, 'src', `index-${role}.ts`);
|
|
197
|
+
const outputPath = path.join(__dirname, '..', 'src', `index-${role}.ts`);
|
|
199
198
|
fs.writeFileSync(outputPath, output, 'utf8');
|
|
200
199
|
|
|
201
200
|
console.log(` ✓ 已生成: ${outputPath}`);
|