viewgate-mcp 1.0.35 → 1.0.37
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/dist/index.js +37 -33
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51,22 +51,22 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
51
51
|
tools: [
|
|
52
52
|
{
|
|
53
53
|
name: "get_annotations",
|
|
54
|
-
description: "
|
|
54
|
+
description: "Fetch feedback. Keys ('VG-XXXX') or IDs. Workflow: 1. Fetch, 2. Fix, 3. Mark Ready.",
|
|
55
55
|
inputSchema: {
|
|
56
56
|
type: "object",
|
|
57
57
|
properties: {
|
|
58
|
-
limit: { type: "number", description: "
|
|
59
|
-
status: { type: "string", description: "Comma
|
|
60
|
-
search: { type: "string", description: "Search
|
|
61
|
-
key: { type: "string", description: "
|
|
62
|
-
keys: { type: "array", items: { type: "string" }, description: "
|
|
63
|
-
ids: { type: "string", description: "
|
|
58
|
+
limit: { type: "number", description: "Max results.", default: 3 },
|
|
59
|
+
status: { type: "string", description: "Comma list (pending,bug_fixing).", default: "pending,bug_fixing" },
|
|
60
|
+
search: { type: "string", description: "Search message/file." },
|
|
61
|
+
key: { type: "string", description: "VG-XXXX key." },
|
|
62
|
+
keys: { type: "array", items: { type: "string" }, description: "Keys array." },
|
|
63
|
+
ids: { type: "string", description: "Internal IDs." }
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
name: "mark_annotation_ready",
|
|
69
|
-
description: "
|
|
69
|
+
description: "Mark as ready/applied. Use internal IDs.",
|
|
70
70
|
inputSchema: {
|
|
71
71
|
type: "object",
|
|
72
72
|
properties: {
|
|
@@ -75,8 +75,8 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
75
75
|
items: {
|
|
76
76
|
type: "object",
|
|
77
77
|
properties: {
|
|
78
|
-
id: { type: "string", description: "
|
|
79
|
-
appliedChanges: { type: "string", description: "
|
|
78
|
+
id: { type: "string", description: "Internal ID." },
|
|
79
|
+
appliedChanges: { type: "string", description: "Summary." }
|
|
80
80
|
},
|
|
81
81
|
required: ["id", "appliedChanges"]
|
|
82
82
|
}
|
|
@@ -87,14 +87,14 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
name: "mark_annotations_as_live",
|
|
90
|
-
description: "
|
|
90
|
+
description: "Mark as live (ready_for_review). IDs required.",
|
|
91
91
|
inputSchema: {
|
|
92
92
|
type: "object",
|
|
93
93
|
properties: {
|
|
94
94
|
ids: {
|
|
95
95
|
type: "array",
|
|
96
96
|
items: { type: "string" },
|
|
97
|
-
description: "
|
|
97
|
+
description: "Internal IDs."
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
required: ["ids"]
|
|
@@ -282,23 +282,21 @@ function createMcpServer(apiKey, personalKey) {
|
|
|
282
282
|
componentName: ann.componentName,
|
|
283
283
|
figmaReference: ann.figmaReference,
|
|
284
284
|
backendEndpoints: ann.backendEndpoints || [],
|
|
285
|
-
_ia_fix_instruction:
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
${
|
|
289
|
-
|
|
290
|
-
${ann.corrections && Array.isArray(ann.corrections) && ann.corrections.length > 0 ?
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
1. **Target**: \`data-vg-id="${ann.reference?.vgId}"\` in \`${file}\`.
|
|
294
|
-
2. **Context**: \`${ann.reference?.parentContext?.slice(0, 50)}...\`
|
|
295
|
-
|
|
296
|
-
IMPORTANT: Respond in ${rawData.preferredLanguage === 'es' ? 'SPANISH' : 'ENGLISH'}.
|
|
297
|
-
Instruction: ${ann.message}`
|
|
285
|
+
_ia_fix_instruction: `[AUTONOMOUS_MODE: TRUE]
|
|
286
|
+
Target: ${file} (data-vg-id="${ann.reference?.vgId}")
|
|
287
|
+
Context: ${ann.reference?.parentContext?.slice(0, 40)}...
|
|
288
|
+
${figmaLinks ? `Figma: ${figmaLinks}` : ''}
|
|
289
|
+
${ann.backendEndpoints?.length ? `Endpoints: ${ann.backendEndpoints.join(', ')}` : ''}
|
|
290
|
+
${ann.corrections && Array.isArray(ann.corrections) && ann.corrections.length > 0 ? `Feedback: ${ann.corrections[ann.corrections.length - 1].text}` : ''}
|
|
291
|
+
Task: ${ann.message}
|
|
292
|
+
Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
|
|
298
293
|
};
|
|
299
294
|
});
|
|
295
|
+
const langHint = rawData.preferredLanguage === 'es'
|
|
296
|
+
? "[INSTRUCTION: Project is in SPANISH. Provide all comments and aiAnalysis in SPANISH.]\n\n"
|
|
297
|
+
: "[INSTRUCTION: Provide all comments and aiAnalysis in English.]\n\n";
|
|
300
298
|
return {
|
|
301
|
-
content: [{ type: "text", text: JSON.stringify({ preferredLanguage: rawData.preferredLanguage || 'en', annotations: annotationsWithTips }, null, 2) }],
|
|
299
|
+
content: [{ type: "text", text: langHint + JSON.stringify({ preferredLanguage: rawData.preferredLanguage || 'en', annotations: annotationsWithTips }, null, 2) }],
|
|
302
300
|
};
|
|
303
301
|
}
|
|
304
302
|
case "mark_annotation_ready": {
|
|
@@ -318,7 +316,7 @@ Instruction: ${ann.message}`
|
|
|
318
316
|
});
|
|
319
317
|
if (!response.ok)
|
|
320
318
|
throw new Error(`Backend responded with ${response.status}`);
|
|
321
|
-
const data = await response.json();
|
|
319
|
+
const data = (await response.json());
|
|
322
320
|
return {
|
|
323
321
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
324
322
|
};
|
|
@@ -338,7 +336,7 @@ Instruction: ${ann.message}`
|
|
|
338
336
|
});
|
|
339
337
|
if (!response.ok)
|
|
340
338
|
throw new Error(`Backend responded with ${response.status}`);
|
|
341
|
-
const data = await response.json();
|
|
339
|
+
const data = (await response.json());
|
|
342
340
|
return {
|
|
343
341
|
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
344
342
|
};
|
|
@@ -354,8 +352,11 @@ Instruction: ${ann.message}`
|
|
|
354
352
|
});
|
|
355
353
|
if (!response.ok)
|
|
356
354
|
throw new Error(`Backend responded with ${response.status}`);
|
|
357
|
-
const data = await response.json();
|
|
358
|
-
|
|
355
|
+
const data = (await response.json());
|
|
356
|
+
const langHint = data.preferredLanguage === 'es'
|
|
357
|
+
? "[INSTRUCTION: Project is in SPANISH. Provide all comments and aiAnalysis in SPANISH.]\n\n"
|
|
358
|
+
: (data.preferredLanguage === 'en' ? "[INSTRUCTION: Provide all comments and aiAnalysis in English.]\n\n" : "");
|
|
359
|
+
return { content: [{ type: "text", text: langHint + JSON.stringify(data, null, 2) }] };
|
|
359
360
|
}
|
|
360
361
|
case "sync_endpoints": {
|
|
361
362
|
const args = request.params.arguments;
|
|
@@ -375,7 +376,7 @@ Instruction: ${ann.message}`
|
|
|
375
376
|
});
|
|
376
377
|
if (!response.ok)
|
|
377
378
|
throw new Error(`Backend responded with ${response.status}`);
|
|
378
|
-
const data = await response.json();
|
|
379
|
+
const data = (await response.json());
|
|
379
380
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
380
381
|
}
|
|
381
382
|
case "get_ai_resolved_tickets": {
|
|
@@ -384,8 +385,11 @@ Instruction: ${ann.message}`
|
|
|
384
385
|
});
|
|
385
386
|
if (!response.ok)
|
|
386
387
|
throw new Error(`Backend responded with ${response.status}`);
|
|
387
|
-
const data = await response.json();
|
|
388
|
-
|
|
388
|
+
const data = (await response.json());
|
|
389
|
+
const langHint = data.preferredLanguage === 'es'
|
|
390
|
+
? "[INSTRUCTION: Project is in SPANISH. Provide all comments and aiAnalysis in SPANISH.]\n\n"
|
|
391
|
+
: (data.preferredLanguage === 'en' ? "[INSTRUCTION: Provide all comments and aiAnalysis in English.]\n\n" : "");
|
|
392
|
+
return { content: [{ type: "text", text: langHint + JSON.stringify(data, null, 2) }] };
|
|
389
393
|
}
|
|
390
394
|
default:
|
|
391
395
|
throw new Error("Unknown tool");
|