@xihe-lab/tapd-core 2.0.0-rc.1 → 2.0.0-rc.3
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/README.md +23 -0
- package/dist/advisor/index.d.ts.map +1 -1
- package/dist/advisor/index.js +2 -0
- package/dist/advisor/index.js.map +1 -1
- package/dist/cache/read-cache.d.ts +136 -0
- package/dist/cache/read-cache.d.ts.map +1 -0
- package/dist/cache/read-cache.js +322 -0
- package/dist/cache/read-cache.js.map +1 -0
- package/dist/cache/read-cache.test.d.ts +2 -0
- package/dist/cache/read-cache.test.d.ts.map +1 -0
- package/dist/cache/read-cache.test.js +429 -0
- package/dist/cache/read-cache.test.js.map +1 -0
- package/dist/errors/index.d.ts +120 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +429 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/registry/registry.d.ts +7 -0
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +9 -3
- package/dist/registry/registry.js.map +1 -1
- package/dist/registry/registry.test.js +293 -2
- package/dist/registry/registry.test.js.map +1 -1
- package/dist/registry/richtext-manifests.generated.d.ts +1 -1
- package/dist/registry/richtext-manifests.generated.d.ts.map +1 -1
- package/dist/registry/richtext-manifests.generated.js +1 -1
- package/dist/registry/richtext-manifests.generated.js.map +1 -1
- package/dist/registry/richtext.d.ts +9 -0
- package/dist/registry/richtext.d.ts.map +1 -1
- package/dist/registry/richtext.js +33 -15
- package/dist/registry/richtext.js.map +1 -1
- package/dist/registry/richtext.test.js +70 -7
- package/dist/registry/richtext.test.js.map +1 -1
- package/dist/richtext/attachment-anchor.d.ts +58 -0
- package/dist/richtext/attachment-anchor.d.ts.map +1 -0
- package/dist/richtext/attachment-anchor.js +221 -0
- package/dist/richtext/attachment-anchor.js.map +1 -0
- package/dist/richtext/attachment-anchor.test.d.ts +2 -0
- package/dist/richtext/attachment-anchor.test.d.ts.map +1 -0
- package/dist/richtext/attachment-anchor.test.js +149 -0
- package/dist/richtext/attachment-anchor.test.js.map +1 -0
- package/dist/richtext/escape.d.ts +7 -0
- package/dist/richtext/escape.d.ts.map +1 -0
- package/dist/richtext/escape.js +60 -0
- package/dist/richtext/escape.js.map +1 -0
- package/dist/richtext/index.d.ts +15 -0
- package/dist/richtext/index.d.ts.map +1 -0
- package/dist/richtext/index.js +35 -0
- package/dist/richtext/index.js.map +1 -0
- package/dist/richtext/mention.d.ts +49 -0
- package/dist/richtext/mention.d.ts.map +1 -0
- package/dist/richtext/mention.js +179 -0
- package/dist/richtext/mention.js.map +1 -0
- package/dist/richtext/mention.test.d.ts +2 -0
- package/dist/richtext/mention.test.d.ts.map +1 -0
- package/dist/richtext/mention.test.js +123 -0
- package/dist/richtext/mention.test.js.map +1 -0
- package/dist/richtext/pipeline.d.ts +5 -0
- package/dist/richtext/pipeline.d.ts.map +1 -0
- package/dist/richtext/pipeline.js +199 -0
- package/dist/richtext/pipeline.js.map +1 -0
- package/dist/richtext/round-trip.test.d.ts +2 -0
- package/dist/richtext/round-trip.test.d.ts.map +1 -0
- package/dist/richtext/round-trip.test.js +105 -0
- package/dist/richtext/round-trip.test.js.map +1 -0
- package/dist/sdk-routes.d.ts.map +1 -1
- package/dist/sdk-routes.js +4 -0
- package/dist/sdk-routes.js.map +1 -1
- package/dist/tapd-client.d.ts +79 -2
- package/dist/tapd-client.d.ts.map +1 -1
- package/dist/tapd-client.js +177 -24
- package/dist/tapd-client.js.map +1 -1
- package/dist/tools/attachment.d.ts +47 -0
- package/dist/tools/attachment.d.ts.map +1 -1
- package/dist/tools/attachment.js +278 -32
- package/dist/tools/attachment.js.map +1 -1
- package/dist/tools/attachment.test.d.ts +2 -0
- package/dist/tools/attachment.test.d.ts.map +1 -0
- package/dist/tools/attachment.test.js +432 -0
- package/dist/tools/attachment.test.js.map +1 -0
- package/dist/tools/board.js +22 -22
- package/dist/tools/board.js.map +1 -1
- package/dist/tools/bug.d.ts.map +1 -1
- package/dist/tools/bug.js +262 -259
- package/dist/tools/bug.js.map +1 -1
- package/dist/tools/changes.js +20 -20
- package/dist/tools/changes.js.map +1 -1
- package/dist/tools/comment.d.ts.map +1 -1
- package/dist/tools/comment.js +26 -23
- package/dist/tools/comment.js.map +1 -1
- package/dist/tools/custom-fields.js +16 -16
- package/dist/tools/custom-fields.js.map +1 -1
- package/dist/tools/image.js +2 -2
- package/dist/tools/image.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/iteration.js +50 -50
- package/dist/tools/iteration.js.map +1 -1
- package/dist/tools/media.d.ts +9 -0
- package/dist/tools/media.d.ts.map +1 -0
- package/dist/tools/media.js +45 -0
- package/dist/tools/media.js.map +1 -0
- package/dist/tools/mini-comment.js +27 -27
- package/dist/tools/mini-comment.js.map +1 -1
- package/dist/tools/mini-item.js +83 -83
- package/dist/tools/mini-item.js.map +1 -1
- package/dist/tools/mini-workspace.js +5 -5
- package/dist/tools/mini-workspace.js.map +1 -1
- package/dist/tools/program.js +7 -7
- package/dist/tools/program.js.map +1 -1
- package/dist/tools/relations.js +14 -14
- package/dist/tools/relations.js.map +1 -1
- package/dist/tools/release.js +53 -53
- package/dist/tools/release.js.map +1 -1
- package/dist/tools/report.js +8 -8
- package/dist/tools/report.js.map +1 -1
- package/dist/tools/richtext-wiring.test.d.ts +2 -0
- package/dist/tools/richtext-wiring.test.d.ts.map +1 -0
- package/dist/tools/richtext-wiring.test.js +302 -0
- package/dist/tools/richtext-wiring.test.js.map +1 -0
- package/dist/tools/settings.js +77 -77
- package/dist/tools/settings.js.map +1 -1
- package/dist/tools/source.js +14 -14
- package/dist/tools/source.js.map +1 -1
- package/dist/tools/story.d.ts.map +1 -1
- package/dist/tools/story.js +123 -120
- package/dist/tools/story.js.map +1 -1
- package/dist/tools/task.d.ts.map +1 -1
- package/dist/tools/task.js +126 -123
- package/dist/tools/task.js.map +1 -1
- package/dist/tools/test.js +117 -117
- package/dist/tools/test.js.map +1 -1
- package/dist/tools/timesheet.js +23 -23
- package/dist/tools/timesheet.js.map +1 -1
- package/dist/tools/user.js +8 -8
- package/dist/tools/user.js.map +1 -1
- package/dist/tools/utility.d.ts +17 -0
- package/dist/tools/utility.d.ts.map +1 -1
- package/dist/tools/utility.js +204 -88
- package/dist/tools/utility.js.map +1 -1
- package/dist/tools/wiki.d.ts.map +1 -1
- package/dist/tools/wiki.js +71 -56
- package/dist/tools/wiki.js.map +1 -1
- package/dist/tools/workflow.js +26 -26
- package/dist/tools/workflow.js.map +1 -1
- package/dist/tools/workspace.js +16 -16
- package/dist/tools/workspace.js.map +1 -1
- package/dist/types.d.ts +5 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +15 -11
- package/dist/tools/zz-acceptance-echo.d.ts +0 -3
- package/dist/tools/zz-acceptance-echo.d.ts.map +0 -1
- package/dist/tools/zz-acceptance-echo.js +0 -9
- package/dist/tools/zz-acceptance-echo.js.map +0 -1
package/dist/tools/story.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { TapdClient } from '../tapd-client.js';
|
|
3
|
+
import { RAW_HTML_FIELD } from '../registry/richtext.js';
|
|
3
4
|
export const storyTools = [
|
|
4
5
|
// 需求 CRUD
|
|
5
6
|
{
|
|
6
7
|
name: 'tapd_get_stories',
|
|
7
|
-
description: '
|
|
8
|
+
description: '按条件查询需求列表,支持标题、状态、处理人、迭代、分类等多字段过滤与分页。只统计数量用数量统计工具;已知多个 ID 要完整详情用批量详情工具。读操作;limit 默认 30。返回需求(Story)数组。',
|
|
8
9
|
inputSchema: z.object({
|
|
9
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
10
|
-
id: z.string().optional().describe('需求ID,支持多ID查询;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
10
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
11
|
+
id: z.string().optional().describe('需求 ID,支持多 ID查询;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
11
12
|
name: z.string().optional().describe('需求标题,支持模糊匹配'),
|
|
12
13
|
priority: z.string().optional().describe('优先级'),
|
|
13
14
|
priority_label: z.string().optional().describe('优先级标签(推荐)'),
|
|
14
15
|
status: z.string().optional().describe('状态'),
|
|
15
16
|
v_status: z.string().optional().describe('状态(中文)'),
|
|
16
|
-
with_v_status: z.string().optional().describe('设为1返回中文状态'),
|
|
17
|
+
with_v_status: z.string().optional().describe('设为 1 返回中文状态'),
|
|
17
18
|
label: z.string().optional().describe('标签'),
|
|
18
|
-
workitem_type_id: z.string().optional().describe('需求类别ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
19
|
+
workitem_type_id: z.string().optional().describe('需求类别 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
19
20
|
owner: z.string().optional().describe('处理人,支持模糊匹配'),
|
|
20
21
|
creator: z.string().optional().describe('创建人'),
|
|
21
22
|
developer: z.string().optional().describe('开发人员'),
|
|
22
23
|
cc: z.string().optional().describe('抄送人'),
|
|
23
|
-
iteration_id: z.string().optional().describe('迭代ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
24
|
-
include_sub_iteration: z.string().optional().describe('包含子迭代:0或1'),
|
|
24
|
+
iteration_id: z.string().optional().describe('迭代 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
25
|
+
include_sub_iteration: z.string().optional().describe('包含子迭代:0 或 1'),
|
|
25
26
|
category_id: z.string().optional().describe('需求分类;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
26
|
-
include_sub_category: z.string().optional().describe('包含子分类:0或1'),
|
|
27
|
-
parent_id: z.string().optional().describe('父需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
28
|
-
ancestor_id: z.string().optional().describe('祖先需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
29
|
-
children_id: z.string().optional().describe('子需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
27
|
+
include_sub_category: z.string().optional().describe('包含子分类:0 或 1'),
|
|
28
|
+
parent_id: z.string().optional().describe('父需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
29
|
+
ancestor_id: z.string().optional().describe('祖先需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
30
|
+
children_id: z.string().optional().describe('子需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
30
31
|
begin: z.string().optional().describe('预计开始日期 YYYY-MM-DD'),
|
|
31
32
|
due: z.string().optional().describe('预计结束日期 YYYY-MM-DD'),
|
|
32
33
|
created: z.string().optional().describe('创建时间 YYYY-MM-DD HH:mm'),
|
|
@@ -43,9 +44,9 @@ export const storyTools = [
|
|
|
43
44
|
source: z.string().optional().describe('需求来源'),
|
|
44
45
|
type: z.string().optional().describe('需求类型'),
|
|
45
46
|
description: z.string().optional().describe('详细描述'),
|
|
46
|
-
custom_field_one: z.string().optional().describe('
|
|
47
|
-
limit: z.number().optional().describe('返回数量,默认30'),
|
|
48
|
-
page: z.number().optional().describe('页码,默认1'),
|
|
47
|
+
custom_field_one: z.string().optional().describe('自定义字段(支持 1-200)'),
|
|
48
|
+
limit: z.number().optional().describe('返回数量,默认 30'),
|
|
49
|
+
page: z.number().optional().describe('页码,默认 1'),
|
|
49
50
|
order: z.string().optional().describe('排序'),
|
|
50
51
|
fields: z.string().optional().describe('返回字段'),
|
|
51
52
|
}),
|
|
@@ -64,20 +65,21 @@ export const storyTools = [
|
|
|
64
65
|
},
|
|
65
66
|
{
|
|
66
67
|
name: 'tapd_create_story',
|
|
67
|
-
description: '
|
|
68
|
+
description: '创建需求。兼可创建任务:工作项类别参数传「任务型」类别的 ID 即走任务创建(适合仅有需求创建权限而无任务创建权限的场景,类别可用类别查询工具查)。从已有需求复制用复制工具。写操作;name 必填,负责人/创建人缺省取环境变量 TAPD_NICK_NAME。返回新需求。',
|
|
68
69
|
inputSchema: z.object({
|
|
69
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
70
|
-
name: z.string().describe('
|
|
70
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
71
|
+
name: z.string().describe('需求标题(必填)'),
|
|
71
72
|
description: z.string().optional().describe('详细描述'),
|
|
73
|
+
raw_html: RAW_HTML_FIELD,
|
|
72
74
|
priority: z.string().optional().describe('优先级'),
|
|
73
75
|
priority_label: z.string().optional().describe('优先级标签(推荐)'),
|
|
74
|
-
owner: z.string().optional().describe('
|
|
75
|
-
creator: z.string().optional().describe('
|
|
76
|
+
owner: z.string().optional().describe('处理人(缺省取当前用户)'),
|
|
77
|
+
creator: z.string().optional().describe('创建人(缺省取当前用户)'),
|
|
76
78
|
developer: z.string().optional().describe('开发人员'),
|
|
77
79
|
cc: z.string().optional().describe('抄送人'),
|
|
78
|
-
iteration_id: z.string().optional().describe('迭代ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
80
|
+
iteration_id: z.string().optional().describe('迭代 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
79
81
|
category_id: z.string().optional().describe('需求分类;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
80
|
-
parent_id: z.string().optional().describe('父需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
82
|
+
parent_id: z.string().optional().describe('父需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
81
83
|
begin: z.string().optional().describe('预计开始日期 YYYY-MM-DD'),
|
|
82
84
|
due: z.string().optional().describe('预计结束日期 YYYY-MM-DD'),
|
|
83
85
|
effort: z.string().optional().describe('预估工时'),
|
|
@@ -88,12 +90,12 @@ export const storyTools = [
|
|
|
88
90
|
source: z.string().optional().describe('需求来源'),
|
|
89
91
|
type: z.string().optional().describe('需求类型'),
|
|
90
92
|
label: z.string().optional().describe('标签'),
|
|
91
|
-
template_id: z.string().optional().describe('模板ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
93
|
+
template_id: z.string().optional().describe('模板 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
92
94
|
business_value: z.string().optional().describe('业务价值'),
|
|
93
95
|
test_focus: z.string().optional().describe('测试关注点'),
|
|
94
|
-
size: z.string().optional().describe('
|
|
96
|
+
size: z.string().optional().describe('规模'),
|
|
95
97
|
custom_field_one: z.string().optional().describe('自定义字段'),
|
|
96
|
-
workitem_type_id: z.string().optional().describe('工作项类型ID
|
|
98
|
+
workitem_type_id: z.string().optional().describe('工作项类型 ID(可选,默认创建需求;传任务型类别 ID 可创建任务,可用类别查询工具查);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
97
99
|
}),
|
|
98
100
|
handler: async (client, params) => {
|
|
99
101
|
const nickName = TapdClient.getNickName();
|
|
@@ -124,17 +126,18 @@ export const storyTools = [
|
|
|
124
126
|
},
|
|
125
127
|
{
|
|
126
128
|
name: 'tapd_update_story',
|
|
127
|
-
description: '
|
|
129
|
+
description: '按 ID 更新需求的单个或多个字段(状态、处理人、迭代、工时等)。批量改多条用批量更新工具;整条复制用复制工具。写操作;id 必填。返回更新后的需求。',
|
|
128
130
|
inputSchema: z.object({
|
|
129
|
-
id: z.string().describe('需求ID
|
|
130
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
131
|
+
id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
132
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
131
133
|
name: z.string().optional().describe('需求标题'),
|
|
132
134
|
description: z.string().optional().describe('详细描述'),
|
|
135
|
+
raw_html: RAW_HTML_FIELD,
|
|
133
136
|
status: z.string().optional().describe('状态'),
|
|
134
137
|
owner: z.string().optional().describe('处理人'),
|
|
135
138
|
priority: z.string().optional().describe('优先级'),
|
|
136
139
|
priority_label: z.string().optional().describe('优先级标签'),
|
|
137
|
-
iteration_id: z.string().optional().describe('迭代ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
140
|
+
iteration_id: z.string().optional().describe('迭代 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
138
141
|
category_id: z.string().optional().describe('需求分类;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
139
142
|
begin: z.string().optional().describe('预计开始日期'),
|
|
140
143
|
due: z.string().optional().describe('预计结束日期'),
|
|
@@ -163,10 +166,10 @@ export const storyTools = [
|
|
|
163
166
|
},
|
|
164
167
|
{
|
|
165
168
|
name: 'tapd_get_story_count',
|
|
166
|
-
description: '
|
|
169
|
+
description: '按与需求列表查询相同的过滤条件返回需求数量,不返回列表。只关心「有多少条」时用它,比拉全量列表省流量。读操作。返回 {count}。',
|
|
167
170
|
inputSchema: z.object({
|
|
168
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
169
|
-
id: z.string().optional().describe('需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
171
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
172
|
+
id: z.string().optional().describe('需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
170
173
|
name: z.string().optional().describe('需求标题'),
|
|
171
174
|
priority: z.string().optional().describe('优先级'),
|
|
172
175
|
priority_label: z.string().optional().describe('优先级标签(推荐)'),
|
|
@@ -175,10 +178,10 @@ export const storyTools = [
|
|
|
175
178
|
creator: z.string().optional().describe('创建人'),
|
|
176
179
|
developer: z.string().optional().describe('开发人员'),
|
|
177
180
|
cc: z.string().optional().describe('抄送人'),
|
|
178
|
-
iteration_id: z.string().optional().describe('迭代ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
181
|
+
iteration_id: z.string().optional().describe('迭代 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
179
182
|
category_id: z.string().optional().describe('需求分类;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
180
|
-
parent_id: z.string().optional().describe('父需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
181
|
-
ancestor_id: z.string().optional().describe('祖先需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
183
|
+
parent_id: z.string().optional().describe('父需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
184
|
+
ancestor_id: z.string().optional().describe('祖先需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
182
185
|
begin: z.string().optional().describe('预计开始日期'),
|
|
183
186
|
due: z.string().optional().describe('预计结束日期'),
|
|
184
187
|
created: z.string().optional().describe('创建时间'),
|
|
@@ -202,16 +205,16 @@ export const storyTools = [
|
|
|
202
205
|
},
|
|
203
206
|
{
|
|
204
207
|
name: 'tapd_copy_story',
|
|
205
|
-
description: '
|
|
208
|
+
description: '复制已有需求创建新需求,可选连带复制附件、评论、子任务。从零新建用创建工具。写操作;id 必填。返回新需求。',
|
|
206
209
|
inputSchema: z.object({
|
|
207
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
208
|
-
id: z.string().describe('要复制的需求ID
|
|
210
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
211
|
+
id: z.string().describe('要复制的需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
209
212
|
name: z.string().optional().describe('新需求标题(默认为原标题)'),
|
|
210
213
|
owner: z.string().optional().describe('处理人'),
|
|
211
|
-
iteration_id: z.string().optional().describe('迭代ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
212
|
-
copy_attachments: z.number().optional().describe('是否复制附件,值=1
|
|
213
|
-
copy_comments: z.number().optional().describe('是否复制评论,值=1
|
|
214
|
-
copy_sub_tasks: z.number().optional().describe('是否复制子任务,值=1
|
|
214
|
+
iteration_id: z.string().optional().describe('迭代 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
215
|
+
copy_attachments: z.number().optional().describe('是否复制附件,值=1 为复制'),
|
|
216
|
+
copy_comments: z.number().optional().describe('是否复制评论,值=1 为复制'),
|
|
217
|
+
copy_sub_tasks: z.number().optional().describe('是否复制子任务,值=1 为复制'),
|
|
215
218
|
}),
|
|
216
219
|
handler: async (client, params) => {
|
|
217
220
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -228,10 +231,10 @@ export const storyTools = [
|
|
|
228
231
|
},
|
|
229
232
|
{
|
|
230
233
|
name: 'tapd_batch_update_stories',
|
|
231
|
-
description: '
|
|
234
|
+
description: '一次批量更新最多 50 条需求。只改一条用单条更新工具。写操作;stories 传 JSON 数组字符串,每项含 id 与要改的字段。返回批量结果。',
|
|
232
235
|
inputSchema: z.object({
|
|
233
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
234
|
-
stories: z.string().describe('需求更新数组JSON,最多50
|
|
236
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
237
|
+
stories: z.string().describe('需求更新数组JSON,最多50条(必填)'),
|
|
235
238
|
}),
|
|
236
239
|
handler: async (client, params) => {
|
|
237
240
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -244,12 +247,12 @@ export const storyTools = [
|
|
|
244
247
|
// 需求分类
|
|
245
248
|
{
|
|
246
249
|
name: 'tapd_get_story_categories',
|
|
247
|
-
description: '
|
|
250
|
+
description: '查询需求分类列表,支持名称模糊匹配与分页。只统计数量用数量统计工具。读操作。返回分类数组。',
|
|
248
251
|
inputSchema: z.object({
|
|
249
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
250
|
-
id: z.string().optional().describe('分类ID,支持多ID查询;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
252
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
253
|
+
id: z.string().optional().describe('分类 ID,支持多 ID查询;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
251
254
|
name: z.string().optional().describe('分类名称,支持模糊匹配'),
|
|
252
|
-
parent_id: z.string().optional().describe('父分类ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
255
|
+
parent_id: z.string().optional().describe('父分类 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
253
256
|
created: z.string().optional().describe('创建时间'),
|
|
254
257
|
modified: z.string().optional().describe('修改时间'),
|
|
255
258
|
limit: z.number().optional().describe('返回数量'),
|
|
@@ -267,12 +270,12 @@ export const storyTools = [
|
|
|
267
270
|
},
|
|
268
271
|
{
|
|
269
272
|
name: 'tapd_get_story_categories_count',
|
|
270
|
-
description: '
|
|
273
|
+
description: '按相同过滤条件返回需求分类数量。要看列表用分类列表查询工具。读操作。返回 {count}。',
|
|
271
274
|
inputSchema: z.object({
|
|
272
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
273
|
-
id: z.string().optional().describe('分类ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
275
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
276
|
+
id: z.string().optional().describe('分类 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
274
277
|
name: z.string().optional().describe('分类名称'),
|
|
275
|
-
parent_id: z.string().optional().describe('父分类ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
278
|
+
parent_id: z.string().optional().describe('父分类 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
276
279
|
}),
|
|
277
280
|
handler: async (client, params) => {
|
|
278
281
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -284,11 +287,11 @@ export const storyTools = [
|
|
|
284
287
|
},
|
|
285
288
|
{
|
|
286
289
|
name: 'tapd_add_story_category',
|
|
287
|
-
description: '
|
|
290
|
+
description: '创建需求分类,可指定父分类 ID 挂到父分类下。写操作;name 必填。返回新分类。',
|
|
288
291
|
inputSchema: z.object({
|
|
289
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
290
|
-
name: z.string().describe('
|
|
291
|
-
parent_id: z.string().optional().describe('父分类ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
292
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
293
|
+
name: z.string().describe('分类名称(必填)'),
|
|
294
|
+
parent_id: z.string().optional().describe('父分类 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
292
295
|
}),
|
|
293
296
|
handler: async (client, params) => {
|
|
294
297
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -300,12 +303,12 @@ export const storyTools = [
|
|
|
300
303
|
},
|
|
301
304
|
{
|
|
302
305
|
name: 'tapd_update_story_category',
|
|
303
|
-
description: '
|
|
306
|
+
description: '按 ID 更新需求分类(改名或调整父分类)。写操作;id 必填。返回更新后的分类。',
|
|
304
307
|
inputSchema: z.object({
|
|
305
|
-
id: z.string().describe('分类ID
|
|
306
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
308
|
+
id: z.string().describe('分类 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
309
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
307
310
|
name: z.string().optional().describe('分类名称'),
|
|
308
|
-
parent_id: z.string().optional().describe('父分类ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
311
|
+
parent_id: z.string().optional().describe('父分类 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
309
312
|
}),
|
|
310
313
|
handler: async (client, params) => {
|
|
311
314
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -318,9 +321,9 @@ export const storyTools = [
|
|
|
318
321
|
// 需求类别
|
|
319
322
|
{
|
|
320
323
|
name: 'tapd_get_workitem_types',
|
|
321
|
-
description: '
|
|
324
|
+
description: '查询项目工作项类别列表(需求/缺陷/任务等类型及类别 ID)。给创建、工作流类工具取类别 ID 前先查这里。注意:需要 stories::workitem_types 权限,无权限时 403。读操作。返回类别数组。',
|
|
322
325
|
inputSchema: z.object({
|
|
323
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
326
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
324
327
|
}),
|
|
325
328
|
handler: async (client, params) => {
|
|
326
329
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -332,11 +335,11 @@ export const storyTools = [
|
|
|
332
335
|
},
|
|
333
336
|
{
|
|
334
337
|
name: 'tapd_change_workitem_type',
|
|
335
|
-
description: '
|
|
338
|
+
description: '把需求变更到另一个工作项类别(如普通需求转任务型类别)。查类别用类别查询工具;改其他字段用单条更新工具。写操作;id 与新类别 ID 必填。返回变更结果。',
|
|
336
339
|
inputSchema: z.object({
|
|
337
|
-
id: z.string().describe('需求ID
|
|
338
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
339
|
-
workitem_type_id: z.string().describe('新的需求类别ID
|
|
340
|
+
id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
341
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
342
|
+
workitem_type_id: z.string().describe('新的需求类别 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
340
343
|
}),
|
|
341
344
|
handler: async (client, params) => {
|
|
342
345
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -354,10 +357,10 @@ export const storyTools = [
|
|
|
354
357
|
// 字段配置
|
|
355
358
|
{
|
|
356
359
|
name: 'tapd_get_story_fields_info',
|
|
357
|
-
description: '
|
|
360
|
+
description: '查询需求可写字段元信息(类型、是否必填、候选值)。拼创建/更新参数前查字段合法性用。读操作。返回字段定义数组。',
|
|
358
361
|
inputSchema: z.object({
|
|
359
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
360
|
-
workitem_type_id: z.string().optional().describe('需求类别ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
362
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
363
|
+
workitem_type_id: z.string().optional().describe('需求类别 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
361
364
|
}),
|
|
362
365
|
handler: async (client, params) => {
|
|
363
366
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -369,9 +372,9 @@ export const storyTools = [
|
|
|
369
372
|
},
|
|
370
373
|
{
|
|
371
374
|
name: 'tapd_get_story_fields_lable',
|
|
372
|
-
description: '
|
|
375
|
+
description: '查询需求字段名中英文映射(英文字段名 → 中文标签)。把返回数据转成人类可读表头时用。读操作。返回映射对象。',
|
|
373
376
|
inputSchema: z.object({
|
|
374
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
377
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
375
378
|
}),
|
|
376
379
|
handler: async (client, params) => {
|
|
377
380
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -384,10 +387,10 @@ export const storyTools = [
|
|
|
384
387
|
// 模板
|
|
385
388
|
{
|
|
386
389
|
name: 'tapd_get_story_template_list',
|
|
387
|
-
description: '
|
|
390
|
+
description: '查询需求模板列表(按类别 ID 过滤)。取默认模板用默认模板查询工具。读操作;支持分页。返回模板数组。',
|
|
388
391
|
inputSchema: z.object({
|
|
389
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
390
|
-
workitem_type_id: z.string().optional().describe('需求类别ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
392
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
393
|
+
workitem_type_id: z.string().optional().describe('需求类别 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
391
394
|
limit: z.number().optional().describe('返回数量'),
|
|
392
395
|
page: z.number().optional().describe('页码'),
|
|
393
396
|
fields: z.string().optional().describe('返回字段'),
|
|
@@ -402,10 +405,10 @@ export const storyTools = [
|
|
|
402
405
|
},
|
|
403
406
|
{
|
|
404
407
|
name: 'tapd_get_default_story_template',
|
|
405
|
-
description: '
|
|
408
|
+
description: '查询指定类别的默认需求模板。要模板清单用模板列表查询工具。读操作。返回默认模板。',
|
|
406
409
|
inputSchema: z.object({
|
|
407
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
408
|
-
workitem_type_id: z.string().optional().describe('需求类别ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
410
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
411
|
+
workitem_type_id: z.string().optional().describe('需求类别 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
409
412
|
}),
|
|
410
413
|
handler: async (client, params) => {
|
|
411
414
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -418,10 +421,10 @@ export const storyTools = [
|
|
|
418
421
|
// 关联关系
|
|
419
422
|
{
|
|
420
423
|
name: 'tapd_get_story_related_bugs',
|
|
421
|
-
description: '
|
|
424
|
+
description: '查询某需求已关联的缺陷列表。反向(按缺陷找需求)用缺陷侧关联查询工具;建立/解除关联用关联建立/解除工具。读操作;story_id 必填。返回关联缺陷数组。',
|
|
422
425
|
inputSchema: z.object({
|
|
423
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
424
|
-
story_id: z.string().describe('需求ID
|
|
426
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
427
|
+
story_id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
425
428
|
limit: z.number().optional().describe('返回数量'),
|
|
426
429
|
page: z.number().optional().describe('页码'),
|
|
427
430
|
fields: z.string().optional().describe('返回字段'),
|
|
@@ -441,11 +444,11 @@ export const storyTools = [
|
|
|
441
444
|
},
|
|
442
445
|
{
|
|
443
446
|
name: 'tapd_create_story_bug',
|
|
444
|
-
description: '
|
|
447
|
+
description: '建立需求与缺陷的关联。查询已有关联用需求侧关联缺陷查询工具;解除用关联解除工具。写操作;story_id、bug_id 必填。返回关联结果。',
|
|
445
448
|
inputSchema: z.object({
|
|
446
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
447
|
-
story_id: z.string().describe('需求ID
|
|
448
|
-
bug_id: z.string().describe('缺陷ID
|
|
449
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
450
|
+
story_id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
451
|
+
bug_id: z.string().describe('缺陷 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
449
452
|
}),
|
|
450
453
|
handler: async (client, params) => {
|
|
451
454
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -463,11 +466,11 @@ export const storyTools = [
|
|
|
463
466
|
},
|
|
464
467
|
{
|
|
465
468
|
name: 'tapd_remove_story_bug_relations',
|
|
466
|
-
description: '
|
|
469
|
+
description: '解除需求与缺陷的关联。建立关联用关联建立工具。写操作;story_id、bug_id 必填。返回解除结果。',
|
|
467
470
|
inputSchema: z.object({
|
|
468
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
469
|
-
story_id: z.string().describe('需求ID
|
|
470
|
-
bug_id: z.string().describe('缺陷ID
|
|
471
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
472
|
+
story_id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
473
|
+
bug_id: z.string().describe('缺陷 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
471
474
|
}),
|
|
472
475
|
handler: async (client, params) => {
|
|
473
476
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -485,11 +488,11 @@ export const storyTools = [
|
|
|
485
488
|
},
|
|
486
489
|
{
|
|
487
490
|
name: 'tapd_get_story_tcase',
|
|
488
|
-
description: '
|
|
491
|
+
description: '查询需求已关联的测试用例。建立关联用关联建立工具;反向(按用例找需求)用用例侧反查工具。读操作;story_id 必填。返回关联用例数组。',
|
|
489
492
|
inputSchema: z.object({
|
|
490
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
491
|
-
story_id: z.string().describe('需求ID
|
|
492
|
-
tcase_id: z.string().optional().describe('测试用例ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
493
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
494
|
+
story_id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
495
|
+
tcase_id: z.string().optional().describe('测试用例 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
493
496
|
limit: z.number().optional().describe('返回数量'),
|
|
494
497
|
page: z.number().optional().describe('页码'),
|
|
495
498
|
fields: z.string().optional().describe('返回字段'),
|
|
@@ -509,11 +512,11 @@ export const storyTools = [
|
|
|
509
512
|
},
|
|
510
513
|
{
|
|
511
514
|
name: 'tapd_create_story_tcase',
|
|
512
|
-
description: '
|
|
515
|
+
description: '建立需求与测试用例的关联。查询用需求侧关联用例查询工具;解除用用例侧解除工具。写操作;story_id、tcase_id 必填。返回关联结果。',
|
|
513
516
|
inputSchema: z.object({
|
|
514
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
515
|
-
story_id: z.string().describe('需求ID
|
|
516
|
-
tcase_id: z.string().describe('测试用例ID
|
|
517
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
518
|
+
story_id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
519
|
+
tcase_id: z.string().describe('测试用例 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
517
520
|
}),
|
|
518
521
|
handler: async (client, params) => {
|
|
519
522
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -531,12 +534,12 @@ export const storyTools = [
|
|
|
531
534
|
// 前后置关系
|
|
532
535
|
{
|
|
533
536
|
name: 'tapd_get_time_relative_stories',
|
|
534
|
-
description: '
|
|
537
|
+
description: '查询需求前后置(依赖)关系。维护关系用关系保存/删除工具。读操作;story_id、前置 ID、后置 ID 至少给一个。返回关系数组。',
|
|
535
538
|
inputSchema: z.object({
|
|
536
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
537
|
-
story_id: z.string().optional().describe('需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
538
|
-
predecessor_id: z.string().optional().describe('前置需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
539
|
-
successor_id: z.string().optional().describe('后置需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
539
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
540
|
+
story_id: z.string().optional().describe('需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
541
|
+
predecessor_id: z.string().optional().describe('前置需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
542
|
+
successor_id: z.string().optional().describe('后置需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
540
543
|
relation_type: z.string().optional().describe('关系类型'),
|
|
541
544
|
limit: z.number().optional().describe('返回数量'),
|
|
542
545
|
page: z.number().optional().describe('页码'),
|
|
@@ -559,10 +562,10 @@ export const storyTools = [
|
|
|
559
562
|
},
|
|
560
563
|
{
|
|
561
564
|
name: 'tapd_save_time_relations',
|
|
562
|
-
description: '
|
|
565
|
+
description: '批量新增或修改需求前后置关系(同 ID 覆盖为修改)。查询用关系查询工具;删除用关系删除工具。写操作;relations 传 JSON 数组字符串。返回保存结果。',
|
|
563
566
|
inputSchema: z.object({
|
|
564
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
565
|
-
relations: z.string().describe('前后置关系数组JSON
|
|
567
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
568
|
+
relations: z.string().describe('前后置关系数组JSON(必填)'),
|
|
566
569
|
}),
|
|
567
570
|
handler: async (client, params) => {
|
|
568
571
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -574,10 +577,10 @@ export const storyTools = [
|
|
|
574
577
|
},
|
|
575
578
|
{
|
|
576
579
|
name: 'tapd_delete_time_relations',
|
|
577
|
-
description: '
|
|
580
|
+
description: '批量删除需求前后置关系。新增/修改用关系保存工具。写操作;relations 传 JSON 数组字符串。返回删除结果。',
|
|
578
581
|
inputSchema: z.object({
|
|
579
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
580
|
-
relations: z.string().describe('要删除的前后置关系数组JSON
|
|
582
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
583
|
+
relations: z.string().describe('要删除的前后置关系数组JSON(必填)'),
|
|
581
584
|
}),
|
|
582
585
|
handler: async (client, params) => {
|
|
583
586
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -590,10 +593,10 @@ export const storyTools = [
|
|
|
590
593
|
// 其他
|
|
591
594
|
{
|
|
592
595
|
name: 'tapd_get_removed_stories',
|
|
593
|
-
description: '
|
|
596
|
+
description: '查询回收站中的需求(可按删除时间、处理人过滤)。存续需求用列表查询工具。读操作;支持分页。返回已删除需求数组。',
|
|
594
597
|
inputSchema: z.object({
|
|
595
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
596
|
-
id: z.string().optional().describe('需求ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
598
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
599
|
+
id: z.string().optional().describe('需求 ID;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
597
600
|
name: z.string().optional().describe('标题'),
|
|
598
601
|
owner: z.string().optional().describe('处理人'),
|
|
599
602
|
creator: z.string().optional().describe('创建人'),
|
|
@@ -614,11 +617,11 @@ export const storyTools = [
|
|
|
614
617
|
},
|
|
615
618
|
{
|
|
616
619
|
name: 'tapd_update_story_parent',
|
|
617
|
-
description: '
|
|
620
|
+
description: '设置或取消需求的父子层级(父需求 ID 传 "0" 取消父子关系)。一般字段更新用单条更新工具。写操作;id、parent_id 必填。返回更新结果。',
|
|
618
621
|
inputSchema: z.object({
|
|
619
|
-
id: z.string().describe('需求ID
|
|
620
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
621
|
-
parent_id: z.string().describe('新的父需求ID
|
|
622
|
+
id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
623
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
624
|
+
parent_id: z.string().describe('新的父需求 ID(必填),设为 0 取消父子关系;必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
622
625
|
}),
|
|
623
626
|
handler: async (client, params) => {
|
|
624
627
|
const workspaceId = params.workspace_id ?? TapdClient.getDefaultWorkspaceId();
|
|
@@ -637,10 +640,10 @@ export const storyTools = [
|
|
|
637
640
|
},
|
|
638
641
|
{
|
|
639
642
|
name: 'tapd_get_stories_by_view_conf_id',
|
|
640
|
-
description: '
|
|
643
|
+
description: '按视图配置 ID 查询该视图下的需求列表(复用网页端保存的视图条件)。自定义条件查询用列表查询工具。读操作;view_conf_id 必填。返回需求列表。',
|
|
641
644
|
inputSchema: z.object({
|
|
642
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
643
|
-
view_conf_id: z.string().describe('视图配置ID
|
|
645
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
646
|
+
view_conf_id: z.string().describe('视图配置 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
644
647
|
limit: z.number().optional().describe('返回数量'),
|
|
645
648
|
page: z.number().optional().describe('页码'),
|
|
646
649
|
fields: z.string().optional().describe('返回字段'),
|
|
@@ -655,10 +658,10 @@ export const storyTools = [
|
|
|
655
658
|
},
|
|
656
659
|
{
|
|
657
660
|
name: 'tapd_get_story_steps',
|
|
658
|
-
description: '
|
|
661
|
+
description: '查询需求步骤(验收/拆解节点)信息。读操作;story_id 必填。返回步骤数组。',
|
|
659
662
|
inputSchema: z.object({
|
|
660
|
-
workspace_id: z.number().optional().describe('项目ID
|
|
661
|
-
story_id: z.string().describe('需求ID
|
|
663
|
+
workspace_id: z.number().optional().describe('项目 ID,可省略(默认取环境变量 TAPD_DEFAULT_WORKSPACE_ID)'),
|
|
664
|
+
story_id: z.string().describe('需求 ID(必填);必须以字符串(带引号)传递,禁止传数值,20 位 ID 超出 JS 安全整数范围会丢精度'),
|
|
662
665
|
limit: z.number().optional().describe('返回数量'),
|
|
663
666
|
page: z.number().optional().describe('页码'),
|
|
664
667
|
fields: z.string().optional().describe('返回字段'),
|