Spaces:
Paused
Paused
File size: 828 Bytes
529090e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import { devToolsService } from '../services/devtools/DevToolsService.js';
import { MCPMessage } from '@widget-tdc/mcp-types';
export async function handleDevToolsRequest(message: MCPMessage): Promise<any> {
const { tool, payload } = message;
switch (tool) {
case 'devtools-status':
return await devToolsService.getStatus();
case 'devtools-scan':
await devToolsService.runScan();
return { status: 'started', message: 'GitHub scan started in background' };
case 'devtools-validate':
const repoPath = (payload?.path as string) || process.cwd();
const result = await devToolsService.validateRepo(repoPath);
return { output: result };
default:
throw new Error(`Unknown DevTools tool: ${tool}`);
}
}
|