@zzp123/mcp-zentao 1.17.7 → 1.17.9
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/dist/api/zentaoApi.d.ts +2 -2
- package/dist/api/zentaoApi.js +7 -5
- package/dist/index-dev.js +3 -3
- package/dist/index-pm.js +4 -4
- package/dist/index-qa.js +4 -4
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/dist/api/zentaoApi.d.ts
CHANGED
|
@@ -33,9 +33,9 @@ export declare class ZentaoAPI {
|
|
|
33
33
|
*/
|
|
34
34
|
private filterBugFields;
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* 获取我的 Bug 列表(默认只查询指派给我的 Bug)
|
|
37
37
|
*
|
|
38
|
-
* @param status Bug
|
|
38
|
+
* @param status Bug状态筛选(默认'assigntome'指派给我的,支持多种状态,详见BugStatus类型)
|
|
39
39
|
* @param productId 产品ID(可选,默认使用第二个产品)
|
|
40
40
|
* @param page 页码(从1开始,默认1)
|
|
41
41
|
* @param limit 每页数量(默认20,最大100)
|
package/dist/api/zentaoApi.js
CHANGED
|
@@ -232,9 +232,9 @@ export class ZentaoAPI {
|
|
|
232
232
|
};
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
*
|
|
235
|
+
* 获取我的 Bug 列表(默认只查询指派给我的 Bug)
|
|
236
236
|
*
|
|
237
|
-
* @param status Bug
|
|
237
|
+
* @param status Bug状态筛选(默认'assigntome'指派给我的,支持多种状态,详见BugStatus类型)
|
|
238
238
|
* @param productId 产品ID(可选,默认使用第二个产品)
|
|
239
239
|
* @param page 页码(从1开始,默认1)
|
|
240
240
|
* @param limit 每页数量(默认20,最大100)
|
|
@@ -260,6 +260,8 @@ export class ZentaoAPI {
|
|
|
260
260
|
const finalBranch = branch || 'all';
|
|
261
261
|
const finalOrder = order || 'id_desc';
|
|
262
262
|
const finalFields = fields || 'basic';
|
|
263
|
+
// 默认查询指派给我的 Bug
|
|
264
|
+
const finalStatus = status || 'assigntome';
|
|
263
265
|
// 构建查询参数
|
|
264
266
|
const queryParams = new URLSearchParams();
|
|
265
267
|
queryParams.append('branch', finalBranch);
|
|
@@ -267,11 +269,11 @@ export class ZentaoAPI {
|
|
|
267
269
|
queryParams.append('limit', finalLimit.toString());
|
|
268
270
|
queryParams.append('order', finalOrder);
|
|
269
271
|
// 添加状态筛选
|
|
270
|
-
if (
|
|
271
|
-
queryParams.append('status',
|
|
272
|
+
if (finalStatus !== 'all') {
|
|
273
|
+
queryParams.append('status', finalStatus);
|
|
272
274
|
}
|
|
273
275
|
try {
|
|
274
|
-
console.log(`正在获取产品 ${productId} 的Bug列表,参数: status=${
|
|
276
|
+
console.log(`正在获取产品 ${productId} 的Bug列表,参数: status=${finalStatus}, branch=${finalBranch}, page=${finalPage}, limit=${finalLimit}, order=${finalOrder}, fields=${finalFields}`);
|
|
275
277
|
const response = await this.request('GET', `/products/${productId}/bugs?${queryParams.toString()}`);
|
|
276
278
|
console.log(`Bug列表响应: 获取到 ${response.bugs?.length || 0} 条数据`);
|
|
277
279
|
let bugs = [];
|
package/dist/index-dev.js
CHANGED
|
@@ -75,7 +75,7 @@ server.tool("getTaskDetail", {
|
|
|
75
75
|
content: [{ type: "text", text: JSON.stringify(task, null, 2) }]
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
|
-
server.tool("getMyBugs", "
|
|
78
|
+
server.tool("getMyBugs", "获取我的Bug列表 - 默认只查询指派给我的Bug,支持多种状态筛选和分支筛选", {
|
|
79
79
|
status: z.enum([
|
|
80
80
|
'active', // 激活状态
|
|
81
81
|
'resolved', // 已解决
|
|
@@ -97,13 +97,13 @@ server.tool("getMyBugs", "获取Bug列表 - 支持多种状态筛选(指派给
|
|
|
97
97
|
'feedback', // 用户反馈
|
|
98
98
|
'needconfirm', // 需求变更需确认
|
|
99
99
|
'bysearch' // 自定义搜索
|
|
100
|
-
]).optional().describe("Bug
|
|
100
|
+
]).optional().describe("Bug状态筛选,默认'assigntome'(指派给我的)"),
|
|
101
101
|
productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
|
|
102
102
|
page: z.number().optional().describe("页码,从1开始,默认为1"),
|
|
103
103
|
limit: z.number().optional().describe("每页数量,默认20,最大100"),
|
|
104
104
|
branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
|
|
105
105
|
order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
|
|
106
|
-
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(
|
|
106
|
+
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
|
|
107
107
|
}, async ({ status, productId, page, limit, branch, order, fields }) => {
|
|
108
108
|
if (!zentaoApi)
|
|
109
109
|
throw new Error("Please initialize Zentao API first");
|
package/dist/index-pm.js
CHANGED
|
@@ -85,7 +85,7 @@ server.tool("getProducts", "获取产品列表 - 只返回核心字段(id, 名
|
|
|
85
85
|
content: [{ type: "text", text: JSON.stringify(products, null, 2) }]
|
|
86
86
|
};
|
|
87
87
|
});
|
|
88
|
-
server.tool("getMyBugs", "
|
|
88
|
+
server.tool("getMyBugs", "获取我的Bug列表 - 默认只查询指派给我的Bug,支持多种状态筛选和分支筛选", {
|
|
89
89
|
status: z.enum([
|
|
90
90
|
'active', // 激活状态
|
|
91
91
|
'resolved', // 已解决
|
|
@@ -107,13 +107,13 @@ server.tool("getMyBugs", "获取Bug列表 - 支持多种状态筛选(指派给
|
|
|
107
107
|
'feedback', // 用户反馈
|
|
108
108
|
'needconfirm', // 需求变更需确认
|
|
109
109
|
'bysearch' // 自定义搜索
|
|
110
|
-
]).optional().describe("Bug
|
|
110
|
+
]).optional().describe("Bug状态筛选,默认'assigntome'(指派给我的)"),
|
|
111
111
|
productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
|
|
112
112
|
page: z.number().optional().describe("页码,从1开始,默认为1"),
|
|
113
113
|
limit: z.number().optional().describe("每页数量,默认20,最大100"),
|
|
114
114
|
branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
|
|
115
115
|
order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
|
|
116
|
-
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(
|
|
116
|
+
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
|
|
117
117
|
}, async ({ status, productId, page, limit, branch, order, fields }) => {
|
|
118
118
|
if (!zentaoApi)
|
|
119
119
|
throw new Error("Please initialize Zentao API first");
|
|
@@ -161,7 +161,7 @@ server.tool("getProductBugs", "获取指定产品的Bug列表 - 支持多种状
|
|
|
161
161
|
]).optional().describe("Bug状态筛选,默认返回所有状态"),
|
|
162
162
|
branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
|
|
163
163
|
order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
|
|
164
|
-
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(
|
|
164
|
+
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
|
|
165
165
|
}, async ({ productId, page, limit, status, branch, order, fields }) => {
|
|
166
166
|
if (!zentaoApi)
|
|
167
167
|
throw new Error("Please initialize Zentao API first");
|
package/dist/index-qa.js
CHANGED
|
@@ -75,7 +75,7 @@ server.tool("getTaskDetail", {
|
|
|
75
75
|
content: [{ type: "text", text: JSON.stringify(task, null, 2) }]
|
|
76
76
|
};
|
|
77
77
|
});
|
|
78
|
-
server.tool("getMyBugs", "
|
|
78
|
+
server.tool("getMyBugs", "获取我的Bug列表 - 默认只查询指派给我的Bug,支持多种状态筛选和分支筛选", {
|
|
79
79
|
status: z.enum([
|
|
80
80
|
'active', // 激活状态
|
|
81
81
|
'resolved', // 已解决
|
|
@@ -97,13 +97,13 @@ server.tool("getMyBugs", "获取Bug列表 - 支持多种状态筛选(指派给
|
|
|
97
97
|
'feedback', // 用户反馈
|
|
98
98
|
'needconfirm', // 需求变更需确认
|
|
99
99
|
'bysearch' // 自定义搜索
|
|
100
|
-
]).optional().describe("Bug
|
|
100
|
+
]).optional().describe("Bug状态筛选,默认'assigntome'(指派给我的)"),
|
|
101
101
|
productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
|
|
102
102
|
page: z.number().optional().describe("页码,从1开始,默认为1"),
|
|
103
103
|
limit: z.number().optional().describe("每页数量,默认20,最大100"),
|
|
104
104
|
branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
|
|
105
105
|
order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
|
|
106
|
-
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(
|
|
106
|
+
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
|
|
107
107
|
}, async ({ status, productId, page, limit, branch, order, fields }) => {
|
|
108
108
|
if (!zentaoApi)
|
|
109
109
|
throw new Error("Please initialize Zentao API first");
|
|
@@ -151,7 +151,7 @@ server.tool("getProductBugs", "获取指定产品的Bug列表 - 支持多种状
|
|
|
151
151
|
]).optional().describe("Bug状态筛选,默认返回所有状态"),
|
|
152
152
|
branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
|
|
153
153
|
order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
|
|
154
|
-
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(
|
|
154
|
+
fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
|
|
155
155
|
}, async ({ productId, page, limit, status, branch, order, fields }) => {
|
|
156
156
|
if (!zentaoApi)
|
|
157
157
|
throw new Error("Please initialize Zentao API first");
|
package/dist/index.js
CHANGED
|
@@ -89,7 +89,7 @@ server.tool("getProducts", "获取产品列表 - 只返回核心字段(id, 名
|
|
|
89
89
|
};
|
|
90
90
|
});
|
|
91
91
|
// Add getMyBugs tool
|
|
92
|
-
server.tool("getMyBugs", "
|
|
92
|
+
server.tool("getMyBugs", "获取我的Bug列表 - 默认只查询指派给我的Bug,支持多种状态筛选和分支筛选", {
|
|
93
93
|
status: z.enum([
|
|
94
94
|
'active', // 激活状态
|
|
95
95
|
'resolved', // 已解决
|
|
@@ -111,7 +111,7 @@ server.tool("getMyBugs", "获取Bug列表 - 支持多种状态筛选(指派给
|
|
|
111
111
|
'feedback', // 用户反馈
|
|
112
112
|
'needconfirm', // 需求变更需确认
|
|
113
113
|
'bysearch' // 自定义搜索
|
|
114
|
-
]).optional().describe("Bug
|
|
114
|
+
]).optional().describe("Bug状态筛选,默认'assigntome'(指派给我的)"),
|
|
115
115
|
productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
|
|
116
116
|
page: z.number().optional().describe("页码,从1开始,默认为1"),
|
|
117
117
|
limit: z.number().optional().describe("每页数量,默认20,最大100"),
|