UNPKG

vibe-coder-mcp

Version:

Production-ready MCP server with complete agent integration, multi-transport support, and comprehensive development automation tools for AI-assisted workflows.

23 lines (22 loc) 1.25 kB
import { JobStatus } from '../job-manager/index.js'; import { createJobStatusMessage } from '../job-manager/jobStatusMessage.js'; export function formatBackgroundJobInitiationResponse(jobId, toolName, message, context) { const sessionId = context?.sessionId || 'unknown-session'; const transportType = context?.transportType || 'unknown'; const statusMessage = createJobStatusMessage(jobId, toolName, JobStatus.PENDING, message, 0, Date.now(), Date.now()); let responseText = `Job started: ${jobId} (${toolName})\n\n${message}\n\n`; if (transportType === 'stdio' || sessionId === 'stdio-session') { responseText += `To check the status of this job, use the get-job-result tool with the following parameters:\n\n`; responseText += `{\n "jobId": "${jobId}"\n}\n\n`; responseText += `Recommended initial polling interval: ${statusMessage.pollingRecommendation?.interval ? statusMessage.pollingRecommendation.interval / 1000 : 5} seconds.`; } else { responseText += `You will receive real-time updates on the job status via SSE.`; } return { content: [{ type: 'text', text: responseText }], isError: false, jobId, jobStatus: statusMessage }; }