@brxce/mcp-server 1.0.0 → 1.0.1
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 +3 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -10
- package/dist/index.js.map +1 -1
- package/dist/prompts/worknode-prompts.d.ts.map +1 -1
- package/dist/prompts/worknode-prompts.js +43 -15
- package/dist/prompts/worknode-prompts.js.map +1 -1
- package/dist/prompts/workspace-context-prompt.js +6 -6
- package/dist/prompts/workspace-context-prompt.js.map +1 -1
- package/dist/resources/user-resource.d.ts.map +1 -1
- package/dist/resources/user-resource.js +12 -1
- package/dist/resources/user-resource.js.map +1 -1
- package/dist/resources/workspace-members-resource.d.ts.map +1 -1
- package/dist/resources/workspace-members-resource.js +12 -3
- package/dist/resources/workspace-members-resource.js.map +1 -1
- package/dist/resources/workspace-resource.d.ts.map +1 -1
- package/dist/resources/workspace-resource.js +9 -1
- package/dist/resources/workspace-resource.js.map +1 -1
- package/dist/services/api-client.d.ts.map +1 -1
- package/dist/services/api-client.js +2 -6
- package/dist/services/api-client.js.map +1 -1
- package/dist/tools/meeting-agenda-tool.js +1 -1
- package/dist/tools/meeting-agenda-tool.js.map +1 -1
- package/dist/tools/meeting-create-tool.d.ts.map +1 -1
- package/dist/tools/meeting-create-tool.js +2 -2
- package/dist/tools/meeting-create-tool.js.map +1 -1
- package/dist/tools/meeting-decisions-tool.js +1 -1
- package/dist/tools/meeting-decisions-tool.js.map +1 -1
- package/dist/tools/meeting-list-tool.d.ts.map +1 -1
- package/dist/tools/meeting-list-tool.js +1 -1
- package/dist/tools/meeting-list-tool.js.map +1 -1
- package/dist/tools/tag-category-tool.js +4 -4
- package/dist/tools/tag-category-tool.js.map +1 -1
- package/dist/tools/tag-search-tool.js +3 -3
- package/dist/tools/tag-search-tool.js.map +1 -1
- package/dist/tools/tag-tool.js +5 -5
- package/dist/tools/tag-tool.js.map +1 -1
- package/dist/tools/worknode-archive-tool.d.ts.map +1 -1
- package/dist/tools/worknode-archive-tool.js +2 -2
- package/dist/tools/worknode-archive-tool.js.map +1 -1
- package/dist/tools/worknode-create-tool.d.ts.map +1 -1
- package/dist/tools/worknode-create-tool.js +113 -225
- package/dist/tools/worknode-create-tool.js.map +1 -1
- package/dist/tools/worknode-my-work-tool.d.ts.map +1 -1
- package/dist/tools/worknode-my-work-tool.js +1 -8
- package/dist/tools/worknode-my-work-tool.js.map +1 -1
- package/dist/tools/worknode-plan-organize-tool.d.ts +4 -0
- package/dist/tools/worknode-plan-organize-tool.d.ts.map +1 -0
- package/dist/tools/worknode-plan-organize-tool.js +356 -0
- package/dist/tools/worknode-plan-organize-tool.js.map +1 -0
- package/dist/tools/worknode-read-tool.d.ts +4 -0
- package/dist/tools/worknode-read-tool.d.ts.map +1 -0
- package/dist/tools/worknode-read-tool.js +312 -0
- package/dist/tools/worknode-read-tool.js.map +1 -0
- package/dist/tools/worknode-search-tool.d.ts.map +1 -1
- package/dist/tools/worknode-search-tool.js +25 -44
- package/dist/tools/worknode-search-tool.js.map +1 -1
- package/dist/tools/worknode-subtree-tool.d.ts.map +1 -1
- package/dist/tools/worknode-subtree-tool.js +8 -12
- package/dist/tools/worknode-subtree-tool.js.map +1 -1
- package/dist/tools/worknode-tag-tool.js +8 -8
- package/dist/tools/worknode-tag-tool.js.map +1 -1
- package/dist/tools/worknode-update-tool.d.ts.map +1 -1
- package/dist/tools/worknode-update-tool.js +104 -173
- package/dist/tools/worknode-update-tool.js.map +1 -1
- package/dist/tools/workspace-inbox-tool.d.ts.map +1 -1
- package/dist/tools/workspace-inbox-tool.js +3 -2
- package/dist/tools/workspace-inbox-tool.js.map +1 -1
- package/dist/tools/workspace-list-tool.d.ts +8 -0
- package/dist/tools/workspace-list-tool.d.ts.map +1 -0
- package/dist/tools/workspace-list-tool.js +113 -0
- package/dist/tools/workspace-list-tool.js.map +1 -0
- package/dist/tools/workspace-members-list-tool.d.ts +8 -0
- package/dist/tools/workspace-members-list-tool.d.ts.map +1 -0
- package/dist/tools/workspace-members-list-tool.js +207 -0
- package/dist/tools/workspace-members-list-tool.js.map +1 -0
- package/dist/tools/workspace-statistics-tool.d.ts +8 -0
- package/dist/tools/workspace-statistics-tool.d.ts.map +1 -0
- package/dist/tools/workspace-statistics-tool.js +300 -0
- package/dist/tools/workspace-statistics-tool.js.map +1 -0
- package/dist/tools/workspace-tree-tool.d.ts.map +1 -1
- package/dist/tools/workspace-tree-tool.js +6 -12
- package/dist/tools/workspace-tree-tool.js.map +1 -1
- package/package.json +11 -10
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
const PlanOrganizeRequestSchema = z.object({
|
|
3
|
+
workspaceId: z.string().uuid().describe('The workspace ID to analyze'),
|
|
4
|
+
targetNodeIds: z
|
|
5
|
+
.array(z.string().uuid())
|
|
6
|
+
.optional()
|
|
7
|
+
.describe('Specific WorkNode IDs to analyze (optional, defaults to inbox items)'),
|
|
8
|
+
parentNodeId: z
|
|
9
|
+
.string()
|
|
10
|
+
.uuid()
|
|
11
|
+
.optional()
|
|
12
|
+
.describe('Analyze all descendants of this node (e.g., all tasks under a project)'),
|
|
13
|
+
includeAll: z.boolean().optional().describe('Analyze ALL WorkNodes in workspace (default: false, only inbox)'),
|
|
14
|
+
keywords: z.array(z.string()).optional().describe('Filter by keywords (e.g., ["MCP", "backend"])')
|
|
15
|
+
});
|
|
16
|
+
/**
|
|
17
|
+
* Extract keywords from text
|
|
18
|
+
*/
|
|
19
|
+
function extractKeywords(text) {
|
|
20
|
+
if (!text)
|
|
21
|
+
return [];
|
|
22
|
+
return text
|
|
23
|
+
.toLowerCase()
|
|
24
|
+
.split(/[\s,.\-_()[\]{}]+/)
|
|
25
|
+
.filter(word => word.length > 2)
|
|
26
|
+
.filter(word => !['the', 'and', 'for', 'with', 'from'].includes(word));
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Calculate similarity between node and potential parent
|
|
30
|
+
*/
|
|
31
|
+
function calculateSimilarity(nodeKeywords, candidateKeywords, candidateTitle) {
|
|
32
|
+
const matchedKeywords = [];
|
|
33
|
+
// Find matching keywords
|
|
34
|
+
for (const nk of nodeKeywords) {
|
|
35
|
+
for (const ck of candidateKeywords) {
|
|
36
|
+
if (ck.includes(nk) || nk.includes(ck)) {
|
|
37
|
+
if (!matchedKeywords.includes(nk)) {
|
|
38
|
+
matchedKeywords.push(nk);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// Jaccard similarity
|
|
44
|
+
const intersection = matchedKeywords.length;
|
|
45
|
+
const union = new Set([...nodeKeywords, ...candidateKeywords]).size;
|
|
46
|
+
const score = union > 0 ? intersection / union : 0;
|
|
47
|
+
return { score, matchedKeywords };
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Build node path string
|
|
51
|
+
*/
|
|
52
|
+
function buildPath(node, allNodes) {
|
|
53
|
+
const path = [node.title];
|
|
54
|
+
let current = node;
|
|
55
|
+
while (current.parentNodeId) {
|
|
56
|
+
const parent = allNodes.find(n => n.id === current.parentNodeId);
|
|
57
|
+
if (!parent)
|
|
58
|
+
break;
|
|
59
|
+
path.unshift(parent.title);
|
|
60
|
+
current = parent;
|
|
61
|
+
}
|
|
62
|
+
return path.join(' > ');
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Suggest parent nodes for a given WorkNode
|
|
66
|
+
*/
|
|
67
|
+
function suggestParents(node, potentialParents, allNodes, maxSuggestions = 3, minConfidence = 0.7) {
|
|
68
|
+
const nodeKeywords = extractKeywords((node.title || '') + ' ' + (node.description || ''));
|
|
69
|
+
const scored = potentialParents.map(candidate => {
|
|
70
|
+
const candidateKeywords = extractKeywords((candidate.title || '') + ' ' + (candidate.description || ''));
|
|
71
|
+
const { score, matchedKeywords } = calculateSimilarity(nodeKeywords, candidateKeywords, candidate.title);
|
|
72
|
+
return {
|
|
73
|
+
id: candidate.id,
|
|
74
|
+
title: candidate.title,
|
|
75
|
+
nodeType: candidate.nodeType,
|
|
76
|
+
path: buildPath(candidate, allNodes),
|
|
77
|
+
score,
|
|
78
|
+
matchedKeywords
|
|
79
|
+
};
|
|
80
|
+
});
|
|
81
|
+
return scored
|
|
82
|
+
.filter(s => s.score >= minConfidence)
|
|
83
|
+
.sort((a, b) => b.score - a.score)
|
|
84
|
+
.slice(0, maxSuggestions);
|
|
85
|
+
}
|
|
86
|
+
export function registerWorknodePlanOrganizeTool(server, apiClient) {
|
|
87
|
+
server.tool('brxce_plan_organize', `Analyze workspace structure and suggest WorkNode reorganization plan.
|
|
88
|
+
|
|
89
|
+
⚠️ **CRITICAL: This tool ONLY analyzes and suggests - it does NOT execute changes!**
|
|
90
|
+
|
|
91
|
+
**Purpose:**
|
|
92
|
+
Help LLM create a reorganization plan for WorkNodes by:
|
|
93
|
+
1. Analyzing current workspace structure
|
|
94
|
+
2. Finding suitable parent nodes for orphaned/misplaced items
|
|
95
|
+
3. Calculating confidence scores based on keyword matching
|
|
96
|
+
4. Generating execution plan using existing tools
|
|
97
|
+
|
|
98
|
+
**When to use:**
|
|
99
|
+
- User asks to "organize", "clean up", or "restructure" WorkNodes
|
|
100
|
+
- User says "inbox를 정리해줘" or "MCP 관련 작업 정리해줘"
|
|
101
|
+
- User wants to move multiple items to appropriate locations
|
|
102
|
+
|
|
103
|
+
**What this tool does:**
|
|
104
|
+
1. Fetches workspace tree and inbox items
|
|
105
|
+
2. Extracts keywords from titles and descriptions
|
|
106
|
+
3. Matches orphaned items with potential parent projects/subprojects
|
|
107
|
+
4. Calculates similarity scores (Jaccard similarity)
|
|
108
|
+
5. Returns top 3 suggestions per item with confidence scores
|
|
109
|
+
6. Provides ready-to-execute plan for brxce_update_worknodes
|
|
110
|
+
|
|
111
|
+
**What this tool does NOT do:**
|
|
112
|
+
- Does NOT modify any data
|
|
113
|
+
- Does NOT change parentNodeId, title, status, assignee, or any other field
|
|
114
|
+
- Does NOT archive, delete, or create nodes
|
|
115
|
+
- Only returns analysis and suggestions
|
|
116
|
+
|
|
117
|
+
**Execution workflow:**
|
|
118
|
+
1. Call this tool to get suggestions
|
|
119
|
+
2. Present suggestions to user with confidence scores and reasoning
|
|
120
|
+
3. Ask user for confirmation
|
|
121
|
+
4. Execute using:
|
|
122
|
+
- brxce_create_worknodes (if intermediate nodes needed)
|
|
123
|
+
- brxce_update_worknodes (to move nodes)
|
|
124
|
+
|
|
125
|
+
**Safety rules:**
|
|
126
|
+
✅ ONLY suggests parentNodeId changes
|
|
127
|
+
✅ ONLY suggests nodeType changes (when hierarchy rules require)
|
|
128
|
+
❌ NEVER suggests title, description, status, assignee, priority, tags, or date changes
|
|
129
|
+
❌ NEVER archives or deletes nodes
|
|
130
|
+
❌ User must confirm before execution
|
|
131
|
+
|
|
132
|
+
**Example usage:**
|
|
133
|
+
|
|
134
|
+
Example 1: Organize inbox items
|
|
135
|
+
\`\`\`
|
|
136
|
+
User: "Inbox에 있는 MCP 관련 작업들 정리해줘"
|
|
137
|
+
|
|
138
|
+
await brxce_plan_organize({
|
|
139
|
+
workspaceId: 138,
|
|
140
|
+
keywords: ["MCP"]
|
|
141
|
+
})
|
|
142
|
+
\`\`\`
|
|
143
|
+
|
|
144
|
+
Example 2: Organize all items under a project
|
|
145
|
+
\`\`\`
|
|
146
|
+
User: "MVP 프로젝트 하위 작업들 정리해줘"
|
|
147
|
+
|
|
148
|
+
Step 1: Find project ID (e.g., 856)
|
|
149
|
+
Step 2: Call this tool
|
|
150
|
+
await brxce_plan_organize({
|
|
151
|
+
workspaceId: 138,
|
|
152
|
+
parentNodeId: 856
|
|
153
|
+
})
|
|
154
|
+
\`\`\`
|
|
155
|
+
|
|
156
|
+
Example 3: Organize entire workspace
|
|
157
|
+
\`\`\`
|
|
158
|
+
User: "workspace 전체를 정리해줘"
|
|
159
|
+
|
|
160
|
+
await brxce_plan_organize({
|
|
161
|
+
workspaceId: 138,
|
|
162
|
+
includeAll: true
|
|
163
|
+
})
|
|
164
|
+
|
|
165
|
+
Step 2: Review suggestions
|
|
166
|
+
- Shows inbox items matching "MCP"
|
|
167
|
+
- Suggests parent nodes with confidence scores
|
|
168
|
+
- Provides execution plan
|
|
169
|
+
|
|
170
|
+
Step 3: Present to user
|
|
171
|
+
"다음과 같이 정리하겠습니다:
|
|
172
|
+
1. #3872 'brxce_read_worknodes 500 에러'
|
|
173
|
+
→ #2719 'MCP 툴 개선' 하위로 이동 (신뢰도 92%)
|
|
174
|
+
|
|
175
|
+
진행하시겠습니까?"
|
|
176
|
+
|
|
177
|
+
Step 4: Execute (after confirmation)
|
|
178
|
+
await brxce_update_worknodes({
|
|
179
|
+
updates: [
|
|
180
|
+
{ nodeId: 3872, changes: { parentNodeId: 2719 }}
|
|
181
|
+
],
|
|
182
|
+
preview: false
|
|
183
|
+
})
|
|
184
|
+
\`\`\`
|
|
185
|
+
|
|
186
|
+
**Parameters:**
|
|
187
|
+
- workspaceId: Required workspace ID
|
|
188
|
+
- targetNodeIds: Optional specific nodes to analyze
|
|
189
|
+
- parentNodeId: Optional - analyze all descendants of this node
|
|
190
|
+
- includeAll: Optional - analyze ALL workspace nodes (default: false)
|
|
191
|
+
- keywords: Optional keyword filter (e.g., ["MCP", "backend"])
|
|
192
|
+
|
|
193
|
+
**Scope Selection (priority order):**
|
|
194
|
+
1. If targetNodeIds provided → Analyze those specific nodes
|
|
195
|
+
2. Else if parentNodeId provided → Analyze all descendants
|
|
196
|
+
3. Else if includeAll=true → Analyze all active workspace nodes
|
|
197
|
+
4. Else (default) → Analyze inbox items only
|
|
198
|
+
|
|
199
|
+
**Returns:**
|
|
200
|
+
- summary: Analysis statistics
|
|
201
|
+
- suggestions: Parent suggestions per node with confidence scores
|
|
202
|
+
- executionPlan: Ready-to-use plan for brxce_update_worknodes`, PlanOrganizeRequestSchema.shape, async (args) => {
|
|
203
|
+
const { workspaceId, targetNodeIds, parentNodeId, includeAll, keywords } = args;
|
|
204
|
+
try {
|
|
205
|
+
// Step 1: Fetch workspace tree
|
|
206
|
+
const treeParams = new URLSearchParams();
|
|
207
|
+
treeParams.append('includeCompleted', 'false');
|
|
208
|
+
treeParams.append('includeCancelled', 'false');
|
|
209
|
+
const treeResponse = await apiClient.get(`/mcp/workspaces/${workspaceId}/overview?${treeParams.toString()}`);
|
|
210
|
+
if (!treeResponse.success) {
|
|
211
|
+
throw new Error('Failed to fetch workspace tree');
|
|
212
|
+
}
|
|
213
|
+
const allNodes = treeResponse.data.tree || [];
|
|
214
|
+
// Step 2: Fetch inbox items
|
|
215
|
+
const inboxParams = new URLSearchParams();
|
|
216
|
+
inboxParams.append('workspaceId', workspaceId.toString());
|
|
217
|
+
inboxParams.append('limit', '50');
|
|
218
|
+
const inboxResponse = await apiClient.get(`/mcp/worknodes/inbox?${inboxParams.toString()}`);
|
|
219
|
+
if (!inboxResponse.success) {
|
|
220
|
+
throw new Error('Failed to fetch inbox items');
|
|
221
|
+
}
|
|
222
|
+
const myInbox = inboxResponse.data.myInbox || [];
|
|
223
|
+
const sharedInbox = inboxResponse.data.sharedInbox || [];
|
|
224
|
+
const inboxItems = [...myInbox, ...sharedInbox];
|
|
225
|
+
// Step 3: Filter target nodes
|
|
226
|
+
let targetNodes;
|
|
227
|
+
if (targetNodeIds && targetNodeIds.length > 0) {
|
|
228
|
+
// Specific nodes provided
|
|
229
|
+
targetNodes = allNodes.filter(n => targetNodeIds.includes(n.id));
|
|
230
|
+
}
|
|
231
|
+
else if (parentNodeId !== undefined) {
|
|
232
|
+
// All descendants of a specific parent
|
|
233
|
+
targetNodes = allNodes.filter(n => {
|
|
234
|
+
// Check if this node is a descendant of parentNodeId
|
|
235
|
+
if (n.id === parentNodeId)
|
|
236
|
+
return false; // Don't include parent itself
|
|
237
|
+
// Traverse up to check if parentNodeId is an ancestor
|
|
238
|
+
let current = n;
|
|
239
|
+
while (current.parentNodeId) {
|
|
240
|
+
if (current.parentNodeId === parentNodeId)
|
|
241
|
+
return true;
|
|
242
|
+
const parent = allNodes.find(node => node.id === current.parentNodeId);
|
|
243
|
+
if (!parent)
|
|
244
|
+
break;
|
|
245
|
+
current = parent;
|
|
246
|
+
}
|
|
247
|
+
return false;
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
else if (includeAll) {
|
|
251
|
+
// All nodes in workspace (excluding completed/cancelled)
|
|
252
|
+
targetNodes = allNodes.filter(n => n.status !== 'completed' &&
|
|
253
|
+
n.status !== 'cancelled');
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
// Default: inbox items only
|
|
257
|
+
targetNodes = inboxItems;
|
|
258
|
+
}
|
|
259
|
+
// Apply keyword filter if specified
|
|
260
|
+
if (keywords && keywords.length > 0) {
|
|
261
|
+
const keywordsLower = keywords.map(k => k.toLowerCase());
|
|
262
|
+
targetNodes = targetNodes.filter(node => {
|
|
263
|
+
const text = ((node.title || '') + ' ' + (node.description || '')).toLowerCase();
|
|
264
|
+
return keywordsLower.some(kw => text.includes(kw));
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
// Step 4: Find potential parents (projects and subprojects only)
|
|
268
|
+
const potentialParents = allNodes.filter(n => ['project', 'subproject'].includes(n.nodeType) &&
|
|
269
|
+
n.status !== 'completed' &&
|
|
270
|
+
n.status !== 'cancelled');
|
|
271
|
+
// Step 5: Generate suggestions
|
|
272
|
+
const suggestions = targetNodes.map(node => {
|
|
273
|
+
const parentSuggestions = suggestParents(node, potentialParents, allNodes, 3, // maxSuggestions
|
|
274
|
+
0.7 // minConfidence
|
|
275
|
+
);
|
|
276
|
+
return {
|
|
277
|
+
nodeId: node.id,
|
|
278
|
+
currentTitle: node.title,
|
|
279
|
+
currentLocation: node.parentNodeId
|
|
280
|
+
? buildPath(node, allNodes)
|
|
281
|
+
: 'Inbox (root)',
|
|
282
|
+
suggestedParents: parentSuggestions.map(s => ({
|
|
283
|
+
parentId: s.id,
|
|
284
|
+
parentTitle: s.title,
|
|
285
|
+
parentPath: s.path,
|
|
286
|
+
confidence: Math.round(s.score * 100) / 100,
|
|
287
|
+
matchedKeywords: s.matchedKeywords,
|
|
288
|
+
reason: s.matchedKeywords.length > 0
|
|
289
|
+
? `제목/설명에 키워드 매칭: ${s.matchedKeywords.join(', ')}`
|
|
290
|
+
: '일반적인 유사도'
|
|
291
|
+
}))
|
|
292
|
+
};
|
|
293
|
+
});
|
|
294
|
+
// Step 6: Filter out nodes with no suggestions
|
|
295
|
+
const needsOrganization = suggestions.filter(s => s.suggestedParents.length > 0);
|
|
296
|
+
const wellOrganized = suggestions.length - needsOrganization.length;
|
|
297
|
+
// Step 7: Generate execution plan
|
|
298
|
+
const executionPlan = {
|
|
299
|
+
updateNodes: needsOrganization
|
|
300
|
+
.filter(s => s.suggestedParents.length > 0)
|
|
301
|
+
.map(s => ({
|
|
302
|
+
nodeId: s.nodeId,
|
|
303
|
+
changes: {
|
|
304
|
+
parentNodeId: s.suggestedParents[0]?.parentId
|
|
305
|
+
},
|
|
306
|
+
confidence: s.suggestedParents[0]?.confidence || 0,
|
|
307
|
+
reason: s.suggestedParents[0]?.reason || ''
|
|
308
|
+
}))
|
|
309
|
+
};
|
|
310
|
+
// Step 8: Return analysis
|
|
311
|
+
const result = {
|
|
312
|
+
summary: {
|
|
313
|
+
totalAnalyzed: targetNodes.length,
|
|
314
|
+
needsOrganization: needsOrganization.length,
|
|
315
|
+
wellOrganized,
|
|
316
|
+
avgConfidence: needsOrganization.length > 0
|
|
317
|
+
? Math.round(needsOrganization.reduce((sum, s) => sum + (s.suggestedParents[0]?.confidence || 0), 0) / needsOrganization.length * 100) / 100
|
|
318
|
+
: 0
|
|
319
|
+
},
|
|
320
|
+
suggestions: needsOrganization,
|
|
321
|
+
executionPlan,
|
|
322
|
+
instructions: {
|
|
323
|
+
step1: 'Review suggestions above',
|
|
324
|
+
step2: 'Present to user with confidence scores',
|
|
325
|
+
step3: 'Get user confirmation',
|
|
326
|
+
step4: 'Execute using brxce_update_worknodes with executionPlan.updateNodes',
|
|
327
|
+
warning: '⚠️ NEVER execute without user confirmation!'
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
return {
|
|
331
|
+
content: [
|
|
332
|
+
{
|
|
333
|
+
type: 'text',
|
|
334
|
+
text: JSON.stringify(result, null, 2),
|
|
335
|
+
},
|
|
336
|
+
],
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
catch (error) {
|
|
340
|
+
return {
|
|
341
|
+
content: [
|
|
342
|
+
{
|
|
343
|
+
type: 'text',
|
|
344
|
+
text: JSON.stringify({
|
|
345
|
+
error: 'Failed to analyze workspace',
|
|
346
|
+
message: error.message,
|
|
347
|
+
workspaceId
|
|
348
|
+
}, null, 2),
|
|
349
|
+
},
|
|
350
|
+
],
|
|
351
|
+
isError: true,
|
|
352
|
+
};
|
|
353
|
+
}
|
|
354
|
+
});
|
|
355
|
+
}
|
|
356
|
+
//# sourceMappingURL=worknode-plan-organize-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worknode-plan-organize-tool.js","sourceRoot":"","sources":["../../src/tools/worknode-plan-organize-tool.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,6BAA6B,CAAC;IACtE,aAAa,EAAE,CAAC;SACb,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC;SACxB,QAAQ,EAAE;SACV,QAAQ,CAAC,sEAAsE,CAAC;IACnF,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,wEAAwE,CAAC;IACrF,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iEAA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,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAClC,GAAG,GAAG,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,UAAU,IAAI,CAAC,CAAC,EAAE,CAAC,CAClD,GAAG,iBAAiB,CAAC,MAAM,GAAG,GAAG,CACnC,GAAG,GAAG;wBACT,CAAC,CAAC,CAAC;iBACN;gBACD,WAAW,EAAE,iBAAiB;gBAC9B,aAAa;gBACb,YAAY,EAAE;oBACZ,KAAK,EAAE,0BAA0B;oBACjC,KAAK,EAAE,wCAAwC;oBAC/C,KAAK,EAAE,uBAAuB;oBAC9B,KAAK,EAAE,qEAAqE;oBAC5E,OAAO,EAAE,6CAA6C;iBACvD;aACF,CAAC;YAEF,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;qBACtC;iBACF;aACF,CAAC;QAEJ,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO;gBACL,OAAO,EAAE;oBACP;wBACE,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,KAAK,EAAE,6BAA6B;4BACpC,OAAO,EAAE,KAAK,CAAC,OAAO;4BACtB,WAAW;yBACZ,EAAE,IAAI,EAAE,CAAC,CAAC;qBACZ;iBACF;gBACD,OAAO,EAAE,IAAI;aACd,CAAC;QACJ,CAAC;IACH,CAAC,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import { ApiClient } from '../services/api-client.js';
|
|
3
|
+
export declare function registerWorknodeReadTool(server: McpServer, apiClient: ApiClient): void;
|
|
4
|
+
//# sourceMappingURL=worknode-read-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"worknode-read-tool.d.ts","sourceRoot":"","sources":["../../src/tools/worknode-read-tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,QA4W/E"}
|