import { spawn } from 'child_process';const server = spawn('node', ['build/index.js']);const request = { id: '1', jsonrpc: '2.0', method: 'tools/call', params: { name: 'vibe_check', arguments: { goal: 'Implement the core logic for the new feature', plan: '1. Define the data structures. 2. Implement the main algorithm. 3. Add error handling.', userPrompt: 'Create a new feature that does X, Y, and Z.', progress: 'Just started', uncertainties: ['The third-party API might be unreliable'], taskContext: 'This is part of a larger project to refactor the billing module.', sessionId: 'test-session-123', }, },};const message = JSON.stringify(request);const length = Buffer.byteLength(message, 'utf-8');const header = `Content-Length: ${length}\r\n\r\n`;server.stdout.on('data', (data) => { console.log(`${data}`);});server.stderr.on('data', (data) => { console.error(`stderr: ${data}`);});server.on('close', (code) => { console.log(`child process exited with code ${code}`);});server.stdin.write(header);server.stdin.write(message);server.stdin.end();