vibe-coder-mcp
Version:
Production-ready MCP server with complete agent integration, multi-transport support, and comprehensive development automation tools for AI-assisted workflows.
29 lines (28 loc) • 810 B
JavaScript
import { JobStatus } from './index.js';
export function createJobStatusMessage(jobId, toolName, status, message, progress, createdAt, updatedAt, details) {
const now = Date.now();
let pollingInterval;
if (status === JobStatus.PENDING) {
pollingInterval = 5000;
}
else if (status === JobStatus.RUNNING) {
pollingInterval = 2000;
}
return {
jobId,
toolName,
status,
message,
progress,
timestamp: now,
createdAt: createdAt || now,
updatedAt: updatedAt || now,
...(pollingInterval ? {
pollingRecommendation: {
interval: pollingInterval,
nextCheckTime: now + pollingInterval
}
} : {}),
...(details ? { details } : {})
};
}