@sudu-cli/fronted-preview-mcp 1.0.0-beta.2 → 1.0.0-beta.3
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/handlers/autoFixLoop.d.ts +1 -5
- package/dist/handlers/autoFixLoop.js +3 -44
- package/dist/handlers/autoFixLoop.js.map +1 -1
- package/dist/index.js +16 -134
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { Client } from 'chrome-remote-interface';
|
|
2
1
|
import { ToolContext } from '../types.js';
|
|
3
2
|
export interface AutoFixOptions {
|
|
4
3
|
maxIterations?: number;
|
|
5
4
|
timeoutPerIteration?: number;
|
|
6
5
|
stopOnSuccess?: boolean;
|
|
7
|
-
screenshotOnError?: boolean;
|
|
8
|
-
screenshotOnSuccess?: boolean;
|
|
9
6
|
targetErrors?: string[];
|
|
10
7
|
}
|
|
11
8
|
export interface AutoFixResult {
|
|
@@ -13,9 +10,8 @@ export interface AutoFixResult {
|
|
|
13
10
|
iterations: number;
|
|
14
11
|
errorsFixed: number;
|
|
15
12
|
errorsRemaining: number;
|
|
16
|
-
screenshots: string[];
|
|
17
13
|
messages: string[];
|
|
18
14
|
errors: string[];
|
|
19
15
|
}
|
|
20
|
-
export declare function autoFixLoop(
|
|
16
|
+
export declare function autoFixLoop(context: ToolContext, options?: AutoFixOptions): Promise<AutoFixResult>;
|
|
21
17
|
export declare function handleAutoFixLoop(context: ToolContext, options?: AutoFixOptions): Promise<AutoFixResult>;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { handleCheckPageErrors } from './checkPageErrors.js';
|
|
2
2
|
import { handleGetTypeScriptDiagnostics } from './typescriptDiagnostics.js';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const { maxIterations = 3, timeoutPerIteration = 30000, stopOnSuccess = true, screenshotOnError = true, screenshotOnSuccess = false, targetErrors = [] } = options;
|
|
3
|
+
export async function autoFixLoop(context, options = {}) {
|
|
4
|
+
const { maxIterations = 3, timeoutPerIteration = 30000, stopOnSuccess = true, targetErrors = [] } = options;
|
|
6
5
|
const result = {
|
|
7
6
|
success: false,
|
|
8
7
|
iterations: 0,
|
|
9
8
|
errorsFixed: 0,
|
|
10
9
|
errorsRemaining: 0,
|
|
11
|
-
screenshots: [],
|
|
12
10
|
messages: [],
|
|
13
11
|
errors: []
|
|
14
12
|
};
|
|
@@ -24,13 +22,6 @@ export async function autoFixLoop(client, context, options = {}) {
|
|
|
24
22
|
}
|
|
25
23
|
const initialErrorCount = currentConsoleErrors.length + currentTsDiagnostics.length;
|
|
26
24
|
result.errorsRemaining = initialErrorCount;
|
|
27
|
-
// Take initial screenshot if requested
|
|
28
|
-
if (screenshotOnError && initialErrorCount > 0) {
|
|
29
|
-
const screenshot = await handleTakeScreenshot(context, { format: 'png' });
|
|
30
|
-
if (screenshot.success && screenshot.dataUrl) {
|
|
31
|
-
result.screenshots.push(`Initial state - ${initialErrorCount} errors: ${screenshot.dataUrl}`);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
25
|
for (let iteration = 0; iteration < maxIterations; iteration++) {
|
|
35
26
|
result.iterations = iteration + 1;
|
|
36
27
|
result.messages.push(`=== Iteration ${iteration + 1} ===`);
|
|
@@ -55,12 +46,6 @@ export async function autoFixLoop(client, context, options = {}) {
|
|
|
55
46
|
if (currentErrorCount === 0 && stopOnSuccess) {
|
|
56
47
|
result.success = true;
|
|
57
48
|
result.messages.push(`✅ All errors fixed after ${iteration + 1} iterations`);
|
|
58
|
-
if (screenshotOnSuccess) {
|
|
59
|
-
const screenshot = await handleTakeScreenshot(context, { format: 'png' });
|
|
60
|
-
if (screenshot.success && screenshot.dataUrl) {
|
|
61
|
-
result.screenshots.push(`Success state - no errors: ${screenshot.dataUrl}`);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
49
|
break;
|
|
65
50
|
}
|
|
66
51
|
// Log current state
|
|
@@ -77,13 +62,6 @@ export async function autoFixLoop(client, context, options = {}) {
|
|
|
77
62
|
result.messages.push(` - ${diagnostic.message} (${diagnostic.severity})`);
|
|
78
63
|
});
|
|
79
64
|
}
|
|
80
|
-
// Take screenshot if errors still exist
|
|
81
|
-
if (currentErrorCount > 0 && screenshotOnError) {
|
|
82
|
-
const screenshot = await handleTakeScreenshot(context, { format: 'png' });
|
|
83
|
-
if (screenshot.success && screenshot.dataUrl) {
|
|
84
|
-
result.screenshots.push(`Iteration ${iteration + 1} - ${currentErrorCount} errors: ${screenshot.dataUrl}`);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
65
|
// If no errors but we're not stopping on success, continue
|
|
88
66
|
if (currentErrorCount === 0) {
|
|
89
67
|
result.messages.push('No errors found, but continuing to next iteration');
|
|
@@ -95,13 +73,6 @@ export async function autoFixLoop(client, context, options = {}) {
|
|
|
95
73
|
const errorMessage = `Error in iteration ${iteration + 1}: ${error instanceof Error ? error.message : 'Unknown error'}`;
|
|
96
74
|
result.errors.push(errorMessage);
|
|
97
75
|
result.messages.push(errorMessage);
|
|
98
|
-
// Take error screenshot if requested
|
|
99
|
-
if (screenshotOnError) {
|
|
100
|
-
const screenshot = await handleTakeScreenshot(context, { format: 'png' });
|
|
101
|
-
if (screenshot.success && screenshot.dataUrl) {
|
|
102
|
-
result.screenshots.push(`Error in iteration ${iteration + 1}: ${screenshot.dataUrl}`);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
76
|
break;
|
|
106
77
|
}
|
|
107
78
|
}
|
|
@@ -118,18 +89,6 @@ export async function autoFixLoop(client, context, options = {}) {
|
|
|
118
89
|
}
|
|
119
90
|
// MCP tool handler
|
|
120
91
|
export async function handleAutoFixLoop(context, options) {
|
|
121
|
-
|
|
122
|
-
if (!chromeClient) {
|
|
123
|
-
return {
|
|
124
|
-
success: false,
|
|
125
|
-
iterations: 0,
|
|
126
|
-
errorsFixed: 0,
|
|
127
|
-
errorsRemaining: 0,
|
|
128
|
-
screenshots: [],
|
|
129
|
-
messages: ['Chrome client not connected. Please connect to Chrome first.'],
|
|
130
|
-
errors: ['Chrome client not connected']
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
return await autoFixLoop(chromeClient, context, options);
|
|
92
|
+
return await autoFixLoop(context, options);
|
|
134
93
|
}
|
|
135
94
|
//# sourceMappingURL=autoFixLoop.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoFixLoop.js","sourceRoot":"","sources":["../../src/handlers/autoFixLoop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"autoFixLoop.js","sourceRoot":"","sources":["../../src/handlers/autoFixLoop.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAkB5E,MAAM,CAAC,KAAK,UAAU,WAAW,CAC/B,OAAoB,EACpB,UAA0B,EAAE;IAE5B,MAAM,EACJ,aAAa,GAAG,CAAC,EACjB,mBAAmB,GAAG,KAAK,EAC3B,aAAa,GAAG,IAAI,EACpB,YAAY,GAAG,EAAE,EAClB,GAAG,OAAO,CAAC;IAEZ,MAAM,MAAM,GAAkB;QAC5B,OAAO,EAAE,KAAK;QACd,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,CAAC;QACd,eAAe,EAAE,CAAC;QAClB,QAAQ,EAAE,EAAE;QACZ,MAAM,EAAE,EAAE;KACX,CAAC;IAEF,sBAAsB;IACtB,MAAM,oBAAoB,GAAG,MAAM,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAClE,MAAM,oBAAoB,GAAG,MAAM,8BAA8B,CAAC,OAAO,CAAC,CAAC;IAE3E,IAAI,oBAAoB,GAAG,CAAC,GAAI,oBAA4B,CAAC,MAAM,CAAC,CAAC;IACrE,IAAI,oBAAoB,GAAG,CAAC,GAAI,oBAA4B,CAAC,WAAW,CAAC,CAAC;IAE1E,6CAA6C;IAC7C,IAAI,Y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C,MAAM,CAAC;IACjH,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,eAAe,GAAI,kBAA0B,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAU,EAAE,EAAE,CACzE,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAC5D,CAAC,MAAM,GAAI,kBAA0B,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,UAAe,EAAE,EAAE,CAC5E,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CACjE,CAAC,MAAM,CAAC;IACX,CAAC;IAED,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,MAAM,CAAC,OAAO,GAAG,eAAe,KAAK,CAAC,CAAC;IAEvC,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,mBAAmB;AACnB,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,OAAoB,EACpB,OAAwB;IAExB,OAAO,MAAM,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,8 +9,6 @@ import { handleStopDevServer } from './handlers/stopDevServer.js';
|
|
|
9
9
|
import { handleQuickPreview } from './handlers/quickPreview.js';
|
|
10
10
|
import { handleCheckPageErrors } from './handlers/checkPageErrors.js';
|
|
11
11
|
import { handleGetTypeScriptDiagnostics } from './handlers/typescriptDiagnostics.js';
|
|
12
|
-
import { handlePickElement } from './handlers/pickElement.js';
|
|
13
|
-
import { handleTakeScreenshot } from './handlers/takeScreenshot.js';
|
|
14
12
|
import { handleAutoFixLoop } from './handlers/autoFixLoop.js';
|
|
15
13
|
const server = new McpServer({
|
|
16
14
|
name: 'frontend-preview',
|
|
@@ -103,13 +101,16 @@ server.tool('quick_preview', 'ONE-STEP: detect frontend framework + start dev se
|
|
|
103
101
|
'WHEN NOT TO USE:\n' +
|
|
104
102
|
'- User only asks about project info — use get_project_info\n' +
|
|
105
103
|
'- User explicitly asks to stop — use stop_dev_server\n\n' +
|
|
106
|
-
'CRITICAL — AFTER THIS TOOL, USE
|
|
104
|
+
'CRITICAL — AFTER THIS TOOL, USE chrome-devtools-mcp FOR ALL BROWSER INTERACTIONS:\n' +
|
|
107
105
|
'1. chrome-devtools navigate_page(url) ← Open page in browser\n' +
|
|
108
106
|
'2. chrome-devtools list_console_messages() ← Check for JS errors\n' +
|
|
109
107
|
'3. chrome-devtools take_snapshot() ← Inspect page structure\n' +
|
|
110
|
-
'4.
|
|
108
|
+
'4. chrome-devtools take_screenshot() ← Visual capture (optional)\n' +
|
|
109
|
+
'5. Report findings to the user\n\n' +
|
|
111
110
|
'Do NOT call get_project_info or start_dev_server separately when using this.\n' +
|
|
112
|
-
'The dev server stays running — no need to call stop_dev_server after preview
|
|
111
|
+
'The dev server stays running — no need to call stop_dev_server after preview.\n\n' +
|
|
112
|
+
'NOTE: This MCP handles framework detection + dev server lifecycle. ' +
|
|
113
|
+
'All browser interactions are delegated to chrome-devtools-mcp.', {
|
|
113
114
|
projectDir: z
|
|
114
115
|
.string()
|
|
115
116
|
.optional()
|
|
@@ -127,6 +128,9 @@ server.tool('quick_preview', 'ONE-STEP: detect frontend framework + start dev se
|
|
|
127
128
|
server.tool('check_page_errors', 'Check frontend page for console errors and network failures. ' +
|
|
128
129
|
'Starts dev server (if needed), connects to Chrome via CDP (port 9222), ' +
|
|
129
130
|
'navigates to the page, and returns structured error report.\n\n' +
|
|
131
|
+
'This is the ONLY tool in this MCP that directly uses CDP. ' +
|
|
132
|
+
'All other browser interactions (screenshots, element inspection, snapshots) ' +
|
|
133
|
+
'are delegated to chrome-devtools-mcp.\n\n' +
|
|
130
134
|
'Returns { pageUrl, framework, port, consoleMessages[], networkErrors[], hasErrors, errorCount, warningCount }.\n\n' +
|
|
131
135
|
'WHEN TO USE:\n' +
|
|
132
136
|
'- User wants to check if page has any JavaScript errors\n' +
|
|
@@ -138,7 +142,8 @@ server.tool('check_page_errors', 'Check frontend page for console errors and net
|
|
|
138
142
|
'AFTER THIS TOOL:\n' +
|
|
139
143
|
'- If errors found, use the error details to fix the code\n' +
|
|
140
144
|
'- Re-run check_page_errors to verify fixes\n' +
|
|
141
|
-
'- For visual inspection, use chrome-devtools take_screenshot'
|
|
145
|
+
'- For visual inspection, use chrome-devtools take_screenshot\n' +
|
|
146
|
+
'- For element inspection, use chrome-devtools take_snapshot / navigate_page', {
|
|
142
147
|
projectDir: z
|
|
143
148
|
.string()
|
|
144
149
|
.optional()
|
|
@@ -196,133 +201,24 @@ server.tool('get_typescript_diagnostics', 'Get TypeScript compiler diagnostics (
|
|
|
196
201
|
return await handleGetTypeScriptDiagnostics(args);
|
|
197
202
|
});
|
|
198
203
|
// ============================================================
|
|
199
|
-
// Tool: pick_element
|
|
200
|
-
// ============================================================
|
|
201
|
-
server.tool('pick_element', 'Pick an element from the frontend page to get its selector, styles, and structure. ' +
|
|
202
|
-
'Starts dev server (if needed), connects to Chrome via CDP (port 9222), ' +
|
|
203
|
-
'and either uses a provided CSS selector or enters inspection mode for user to click an element.\n\n' +
|
|
204
|
-
'Returns { pageUrl, framework, port, element: { selector, xpath, tagName, id, className, attributes, computedStyles, boundingBox, outerHTML, innerText, componentName, componentProps } }.\n\n' +
|
|
205
|
-
'WHEN TO USE:\n' +
|
|
206
|
-
'- User wants to inspect a specific element on the page\n' +
|
|
207
|
-
'- User says "pick this element" or "what is this button\'s selector"\n' +
|
|
208
|
-
'- Need exact CSS selector, computed styles, or component info for AI fixing\n\n' +
|
|
209
|
-
'PREREQUISITE:\n' +
|
|
210
|
-
'- Chrome must be running with --remote-debugging-port=9222\n' +
|
|
211
|
-
'- Start Chrome: chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug\n\n' +
|
|
212
|
-
'AFTER THIS TOOL:\n' +
|
|
213
|
-
'- Use the selector/xpath to target the element in fixes\n' +
|
|
214
|
-
'- Use computedStyles to understand layout issues\n' +
|
|
215
|
-
'- Use componentName/componentProps for React/Vue component debugging\n' +
|
|
216
|
-
'- Combine with check_page_errors for full debugging context', {
|
|
217
|
-
projectDir: z
|
|
218
|
-
.string()
|
|
219
|
-
.optional()
|
|
220
|
-
.describe('Absolute path to the frontend project directory. Defaults to current working directory.'),
|
|
221
|
-
customPort: z
|
|
222
|
-
.number()
|
|
223
|
-
.optional()
|
|
224
|
-
.describe('Override the auto-detected dev server port number.'),
|
|
225
|
-
cdpPort: z
|
|
226
|
-
.number()
|
|
227
|
-
.optional()
|
|
228
|
-
.describe('Chrome DevTools Protocol port. Defaults to 9222.'),
|
|
229
|
-
selector: z
|
|
230
|
-
.string()
|
|
231
|
-
.optional()
|
|
232
|
-
.describe('Optional: CSS selector to pick directly. If omitted, enters inspection mode for user to click element.'),
|
|
233
|
-
waitForLoadMs: z
|
|
234
|
-
.number()
|
|
235
|
-
.optional()
|
|
236
|
-
.describe('Milliseconds to wait for page load before picking. Defaults to 3000.'),
|
|
237
|
-
}, async (args) => {
|
|
238
|
-
return await handlePickElement(args);
|
|
239
|
-
});
|
|
240
|
-
// ============================================================
|
|
241
|
-
// Tool: take_screenshot
|
|
242
|
-
// ============================================================
|
|
243
|
-
server.tool('take_screenshot', 'Take a screenshot of the frontend page or specific element. ' +
|
|
244
|
-
'Starts dev server (if needed), connects to Chrome via CDP (port 9222), ' +
|
|
245
|
-
'and captures the current page view or a specific element.\n\n' +
|
|
246
|
-
'Returns { success, message, dataUrl, filePath, error }.\n\n' +
|
|
247
|
-
'WHEN TO USE:\n' +
|
|
248
|
-
'- User wants to capture the current page state\n' +
|
|
249
|
-
'- User says "take a screenshot" or "show me the page"\n' +
|
|
250
|
-
'- Need visual confirmation of page layout or styling\n' +
|
|
251
|
-
'- Documenting bugs or sharing UI state\n\n' +
|
|
252
|
-
'PREREQUISITE:\n' +
|
|
253
|
-
'- Chrome must be running with --remote-debugging-port=9222\n' +
|
|
254
|
-
'- Start Chrome: chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug\n\n' +
|
|
255
|
-
'AFTER THIS TOOL:\n' +
|
|
256
|
-
'- Use dataUrl for inline display or save to file for sharing\n' +
|
|
257
|
-
'- Combine with pick_element for element-specific screenshots\n' +
|
|
258
|
-
'- Use in error reporting to show visual context', {
|
|
259
|
-
projectDir: z
|
|
260
|
-
.string()
|
|
261
|
-
.optional()
|
|
262
|
-
.describe('Absolute path to the frontend project directory. Defaults to current working directory.'),
|
|
263
|
-
customPort: z
|
|
264
|
-
.number()
|
|
265
|
-
.optional()
|
|
266
|
-
.describe('Override the auto-detected dev server port number.'),
|
|
267
|
-
cdpPort: z
|
|
268
|
-
.number()
|
|
269
|
-
.optional()
|
|
270
|
-
.describe('Chrome DevTools Protocol port. Defaults to 9222.'),
|
|
271
|
-
format: z
|
|
272
|
-
.enum(['png', 'jpeg', 'webp'])
|
|
273
|
-
.optional()
|
|
274
|
-
.describe('Image format. Defaults to "png".'),
|
|
275
|
-
quality: z
|
|
276
|
-
.number()
|
|
277
|
-
.min(0)
|
|
278
|
-
.max(100)
|
|
279
|
-
.optional()
|
|
280
|
-
.describe('Image quality for JPEG/WebP (0-100). Defaults to 80.'),
|
|
281
|
-
fullPage: z
|
|
282
|
-
.boolean()
|
|
283
|
-
.optional()
|
|
284
|
-
.describe('Capture entire page instead of viewport. Defaults to false.'),
|
|
285
|
-
selector: z
|
|
286
|
-
.string()
|
|
287
|
-
.optional()
|
|
288
|
-
.describe('Optional: CSS selector to screenshot specific element. If omitted, captures entire viewport.'),
|
|
289
|
-
waitForLoadMs: z
|
|
290
|
-
.number()
|
|
291
|
-
.optional()
|
|
292
|
-
.describe('Milliseconds to wait for page load before screenshot. Defaults to 3000.'),
|
|
293
|
-
}, async (args) => {
|
|
294
|
-
const result = await handleTakeScreenshot(args);
|
|
295
|
-
return {
|
|
296
|
-
content: [
|
|
297
|
-
{
|
|
298
|
-
type: 'text',
|
|
299
|
-
text: result.success
|
|
300
|
-
? `Screenshot captured successfully!\nFormat: ${result.dataUrl ? 'data URL' : 'File saved'}\n` +
|
|
301
|
-
(result.dataUrl ? `Data URL: ${result.dataUrl.substring(0, 100)}...` : '')
|
|
302
|
-
: `Failed to capture screenshot: ${result.error}`
|
|
303
|
-
}
|
|
304
|
-
]
|
|
305
|
-
};
|
|
306
|
-
});
|
|
307
|
-
// ============================================================
|
|
308
204
|
// Tool: auto_fix_loop
|
|
309
205
|
// ============================================================
|
|
310
206
|
server.tool('auto_fix_loop', 'Automatically detect and fix frontend errors in an iterative loop. ' +
|
|
311
|
-
'Combines console error checking
|
|
312
|
-
'to identify and
|
|
313
|
-
'Returns { success, iterations, errorsFixed, errorsRemaining,
|
|
207
|
+
'Combines console error checking (via CDP) and TypeScript diagnostics ' +
|
|
208
|
+
'to identify and verify fixes automatically.\n\n' +
|
|
209
|
+
'Returns { success, iterations, errorsFixed, errorsRemaining, messages, errors }.\n\n' +
|
|
314
210
|
'WHEN TO USE:\n' +
|
|
315
211
|
'- User wants to automatically fix all detected errors\n' +
|
|
316
212
|
'- User says "fix all errors" or "auto-fix this project"\n' +
|
|
317
213
|
'- Need iterative error detection and fixing\n' +
|
|
318
214
|
'- CI/CD automated error cleanup\n\n' +
|
|
319
215
|
'PREREQUISITE:\n' +
|
|
320
|
-
'- Chrome must be running with --remote-debugging-port=9222\n' +
|
|
216
|
+
'- Chrome must be running with --remote-debugging-port=9222 (for console error detection)\n' +
|
|
321
217
|
'- Project must have TypeScript configuration for type checking\n' +
|
|
322
218
|
'- Start Chrome: chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug\n\n' +
|
|
323
219
|
'AFTER THIS TOOL:\n' +
|
|
324
220
|
'- Check the result for errorsFixed vs errorsRemaining\n' +
|
|
325
|
-
'-
|
|
221
|
+
'- For visual inspection, use chrome-devtools take_screenshot\n' +
|
|
326
222
|
'- If errors remain, run again with more iterations\n' +
|
|
327
223
|
'- Manual review may be needed for complex issues', {
|
|
328
224
|
projectDir: z
|
|
@@ -353,14 +249,6 @@ server.tool('auto_fix_loop', 'Automatically detect and fix frontend errors in an
|
|
|
353
249
|
.boolean()
|
|
354
250
|
.optional()
|
|
355
251
|
.describe('Stop when no errors remain. Defaults to true.'),
|
|
356
|
-
screenshotOnError: z
|
|
357
|
-
.boolean()
|
|
358
|
-
.optional()
|
|
359
|
-
.describe('Take screenshot when errors detected. Defaults to true.'),
|
|
360
|
-
screenshotOnSuccess: z
|
|
361
|
-
.boolean()
|
|
362
|
-
.optional()
|
|
363
|
-
.describe('Take screenshot when all errors fixed. Defaults to false.'),
|
|
364
252
|
targetErrors: z
|
|
365
253
|
.array(z.string())
|
|
366
254
|
.optional()
|
|
@@ -378,12 +266,6 @@ server.tool('auto_fix_loop', 'Automatically detect and fix frontend errors in an
|
|
|
378
266
|
`Messages:\n${result.messages.join('\n')}`
|
|
379
267
|
}
|
|
380
268
|
];
|
|
381
|
-
if (result.screenshots.length > 0) {
|
|
382
|
-
content.push({
|
|
383
|
-
type: 'text',
|
|
384
|
-
text: `\nScreenshots captured: ${result.screenshots.length}`
|
|
385
|
-
});
|
|
386
|
-
}
|
|
387
269
|
if (result.errors.length > 0) {
|
|
388
270
|
content.push({
|
|
389
271
|
type: 'text',
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAA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,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;QACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudu-cli/fronted-preview-mcp",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.3",
|
|
4
4
|
"description": "MCP server for frontend project detection, dev server management, and preview workflow. Pairs with chrome-devtools-mcp for automated frontend checking.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|