@ppdocs/mcp 2.6.11 → 2.6.12

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.
@@ -51,19 +51,35 @@ export function registerTools(server, projectId, _user) {
51
51
  name: z.string(),
52
52
  description: z.string()
53
53
  })).optional().describe('依赖列表'),
54
- relatedFiles: z.array(z.string()).optional().describe('关联的源文件路径数组')
54
+ relatedFiles: z.array(z.string()).optional().describe('关联的源文件路径数组'),
55
+ versions: z.array(z.object({
56
+ version: z.number(),
57
+ date: z.string(),
58
+ changes: z.string()
59
+ })).optional().describe('版本记录'),
60
+ bugfixes: z.array(z.object({
61
+ id: z.string(),
62
+ date: z.string(),
63
+ issue: z.string(),
64
+ solution: z.string(),
65
+ impact: z.string().optional()
66
+ })).optional().describe('修复记录')
55
67
  }, async (args) => {
56
- const { nodeId, tags, relatedFiles, ...rest } = args;
68
+ const { nodeId, tags, relatedFiles, versions, bugfixes, ...rest } = args;
57
69
  // 根节点必须使用 kg_update_root 更新
58
70
  if (nodeId === 'root') {
59
71
  return wrap(projectId, '❌ 根节点请使用 kg_update_root 方法更新');
60
72
  }
61
- // API 参数 tags 转换为内部字段 categories
73
+ // API 参数转换
62
74
  let updates = { ...rest };
63
75
  if (tags !== undefined)
64
76
  updates.categories = tags;
65
77
  if (relatedFiles !== undefined)
66
78
  updates.relatedFiles = relatedFiles;
79
+ if (versions !== undefined)
80
+ updates.versions = versions;
81
+ if (bugfixes !== undefined)
82
+ updates.bugfixes = bugfixes;
67
83
  const node = await storage.updateNode(projectId, nodeId, updates);
68
84
  return wrap(projectId, node ? JSON.stringify(node, null, 2) : '更新失败(节点不存在或已锁定)');
69
85
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "2.6.11",
3
+ "version": "2.6.12",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",