targetprocess-mcp-server 2.2.10 → 2.2.11
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/build/index.js +12 -11
- package/build/tp.js +12 -0
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -603,7 +603,7 @@ server.registerTool('create_bug_based_on_card', {
|
|
|
603
603
|
CRITICAL WORKFLOW: Before calling this tool, you MUST follow these steps:
|
|
604
604
|
1) IF you already have user story, bug, or feature card content, proceed to step 3 skipping step 2;
|
|
605
605
|
2) ELSE call "get_user_story_content" tool, "get_bug_content" tool, or fetch the feature to get card content;
|
|
606
|
-
3) format the new bug inside html <div> tags with Environment, Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>);
|
|
606
|
+
3) format the new bug inside html <div> tags with Environment (describes where bug was found, dev, feature, review or uat Environment), Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>);
|
|
607
607
|
4) IF the user specified a team by name (not ID), call "get_teams" to find the matching team and use its ID as teamId;
|
|
608
608
|
5) IF the user specified a project by name (not ID), call "get_projects" to find the matching project and use its ID as projectId;
|
|
609
609
|
6) add a comment to the card with created bug Id and its Title`,
|
|
@@ -636,7 +636,7 @@ server.registerTool('create_bug_based_on_card', {
|
|
|
636
636
|
])
|
|
637
637
|
.default("Manual QA")
|
|
638
638
|
.optional()
|
|
639
|
-
.describe('Where the bug was found, defaults to "Manual QA"'),
|
|
639
|
+
.describe('Where the bug was found, defaults to "Manual QA" if no origin was specified'),
|
|
640
640
|
projectId: z.string()
|
|
641
641
|
.optional()
|
|
642
642
|
.describe('Optional Project ID — if user gave a project name, resolve it via "get_projects" first; defaults to TP_PROJECT_ID from config'),
|
|
@@ -771,7 +771,7 @@ server.registerTool('create_bug', {
|
|
|
771
771
|
description: `Create a new bug card that summarizes the problem in concise, descriptive manner answering questions "What? Where? When?" and content explaining what happened in detail.
|
|
772
772
|
NOTE: this tool does not require a user story or bug card reference.
|
|
773
773
|
CRITICAL WORKFLOW: Before calling this tool, you MUST follow these steps:
|
|
774
|
-
1) format the new bug inside html <div> tags with Environment, Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>, step to reproduce should be wrapped in <ol>);
|
|
774
|
+
1) format the new bug inside html <div> tags with Environment(describes where bug was found, dev, feature, review or uat Environment), Issue Description, Steps to Reproduce, Expected Behavior, Actual Behavior and Attachments sections (note: section titles should be wrapped in <h3> tags, e.g. <h3>Issue Description</h3>, step to reproduce should be wrapped in <ol>);
|
|
775
775
|
2) IF the user specified a team by name (not ID), call "get_teams" to find the matching team and use its ID as teamId;
|
|
776
776
|
3) IF the user specified a project by name (not ID), call "get_projects" to find the matching project and use its ID as projectId;`,
|
|
777
777
|
inputSchema: {
|
|
@@ -792,7 +792,7 @@ server.registerTool('create_bug', {
|
|
|
792
792
|
])
|
|
793
793
|
.default("Manual QA")
|
|
794
794
|
.optional()
|
|
795
|
-
.describe('Where the bug was found, defaults to "Manual QA"'),
|
|
795
|
+
.describe('Where the bug was found, defaults to "Manual QA" if no origin was specified'),
|
|
796
796
|
projectId: z.string()
|
|
797
797
|
.optional()
|
|
798
798
|
.describe('Optional Project ID — if user gave a project name, resolve it via "get_projects" first; defaults to TP_PROJECT_ID from config'),
|
|
@@ -1481,9 +1481,9 @@ server.registerTool('get_bug_workflows', {
|
|
|
1481
1481
|
});
|
|
1482
1482
|
server.registerTool('get_user_story_workflows', {
|
|
1483
1483
|
title: 'Get User Story workflows',
|
|
1484
|
-
description: 'Get all Targetprocess user story workflows',
|
|
1484
|
+
description: 'Get all Targetprocess user story workflows, with sub-states',
|
|
1485
1485
|
}, async ({}) => {
|
|
1486
|
-
const response = await tp.
|
|
1486
|
+
const response = await tp.getUserStoryWorkflowsWithSubStates();
|
|
1487
1487
|
if (!response) {
|
|
1488
1488
|
return {
|
|
1489
1489
|
content: [{
|
|
@@ -1501,12 +1501,13 @@ server.registerTool('get_user_story_workflows', {
|
|
|
1501
1501
|
}],
|
|
1502
1502
|
};
|
|
1503
1503
|
}
|
|
1504
|
-
const
|
|
1504
|
+
const userStoryWorkflows = items.filter((w) => w.entityType.name === "UserStory");
|
|
1505
|
+
const workflows = userStoryWorkflows.map((w) => ({
|
|
1505
1506
|
id: w.id,
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1507
|
+
processId: w.workflow.process.id,
|
|
1508
|
+
entityType: w.entityType.name,
|
|
1509
|
+
entityState: w.name,
|
|
1510
|
+
entitySubStates: w.subEntityStates.map((es) => ({
|
|
1510
1511
|
id: es.id,
|
|
1511
1512
|
name: es.name,
|
|
1512
1513
|
})),
|
package/build/tp.js
CHANGED
|
@@ -562,6 +562,18 @@ export class TpClient {
|
|
|
562
562
|
apiVersion: this.v2
|
|
563
563
|
});
|
|
564
564
|
}
|
|
565
|
+
async getUserStoryWorkflowsWithSubStates() {
|
|
566
|
+
return this.get({
|
|
567
|
+
pathParam: ["EntityState"],
|
|
568
|
+
param: {
|
|
569
|
+
"format": "json",
|
|
570
|
+
"select": `{id,name,isInitial,isFinal,isDefaultFinal,isPlanned,workflow:{workflow.id,process:{workflow.process.id}},entityType:{entityType.name},subEntityStates:subEntityStates.Select({id,name,entityType:{entityType.name},isInitial,isFinal,isDefaultFinal,isPlanned})}`,
|
|
571
|
+
"where": `(parentEntityState==null and workflow.process.id in [${config.tp.processId}])`,
|
|
572
|
+
"take": "1000",
|
|
573
|
+
},
|
|
574
|
+
apiVersion: this.v2
|
|
575
|
+
});
|
|
576
|
+
}
|
|
565
577
|
async getBugWorkflows() {
|
|
566
578
|
return this.get({
|
|
567
579
|
pathParam: ["workflow"],
|