@dyno181cm.nexsoft/zentao_mcp 1.2.4 → 1.2.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/build/index.js CHANGED
@@ -8,7 +8,7 @@ dotenv.config();
8
8
  // Create the MCP server instance
9
9
  const server = new McpServer({
10
10
  name: "Zentao MCP Server",
11
- version: "1.2.4"
11
+ version: "1.2.5"
12
12
  });
13
13
  // Register all Zentao-specific tools onto the server
14
14
  registerTools(server);
package/build/tools.js CHANGED
@@ -3,8 +3,10 @@ import * as os from "os";
3
3
  import * as path from "path";
4
4
  import fs from "fs";
5
5
  import { ZentaoClient } from "./zentaoClient.js";
6
+ import TurndownService from "turndown";
6
7
  const client = new ZentaoClient();
7
8
  const activeDownloads = new Map();
9
+ const turndownService = new TurndownService();
8
10
  /**
9
11
  * Registers Zentao-specific tools to the Model Context Protocol (MCP) server.
10
12
  *
@@ -32,7 +34,15 @@ function parseFiles(files) {
32
34
  }
33
35
  return [];
34
36
  }
35
- function cleanTask(task) {
37
+ /**
38
+ * Simple utility to convert basic HTML to Markdown for better readability by the AI.
39
+ */
40
+ function htmlToMarkdown(html) {
41
+ if (!html)
42
+ return '';
43
+ return turndownService.turndown(html);
44
+ }
45
+ export function cleanTask(task) {
36
46
  if (!task)
37
47
  return null;
38
48
  return {
@@ -40,7 +50,7 @@ function cleanTask(task) {
40
50
  name: task.name,
41
51
  status: task.status,
42
52
  pri: task.pri,
43
- desc: task.desc,
53
+ desc: htmlToMarkdown(task.desc),
44
54
  estimate: task.estimate,
45
55
  consumed: task.consumed,
46
56
  left: task.left,
@@ -65,7 +75,7 @@ function cleanTask(task) {
65
75
  files: parseFiles(task.files)
66
76
  };
67
77
  }
68
- function cleanBug(bug) {
78
+ export function cleanBug(bug) {
69
79
  if (!bug)
70
80
  return null;
71
81
  return {
@@ -75,7 +85,7 @@ function cleanBug(bug) {
75
85
  severity: bug.severity,
76
86
  pri: bug.pri,
77
87
  type: bug.type,
78
- steps: bug.steps,
88
+ steps: htmlToMarkdown(bug.steps),
79
89
  openedBy: bug.openedBy ? {
80
90
  account: bug.openedBy.account,
81
91
  realname: bug.openedBy.realname
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dyno181cm.nexsoft/zentao_mcp",
3
- "version": "1.2.4",
3
+ "version": "1.2.6",
4
4
  "description": "Zentao MCP Server",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,11 +28,17 @@
28
28
  "dependencies": {
29
29
  "@modelcontextprotocol/sdk": "^1.1.0",
30
30
  "axios": "^1.7.9",
31
- "dotenv": "^16.4.7"
31
+ "dotenv": "^16.4.7",
32
+ "turndown": "^7.2.4"
33
+ },
34
+ "engines": {
35
+ "node": ">=18.0.0",
36
+ "npm": ">=8.0.0"
32
37
  },
33
38
  "devDependencies": {
34
39
  "@types/jest": "^30.0.0",
35
40
  "@types/node": "^22.10.2",
41
+ "@types/turndown": "^5.0.6",
36
42
  "jest": "^30.4.2",
37
43
  "ts-jest": "^29.4.11",
38
44
  "tsx": "^4.23.0",