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.

50 lines (49 loc) 2.01 kB
import { z } from 'zod'; const techStackItemSchema = z.object({ name: z.string(), version: z.string().optional(), rationale: z.string(), }); const fileStructureItemSchemaContents = z.lazy(() => z.object({ path: z.string().min(1, "Path cannot be empty"), type: z.enum(['file', 'directory']), content: z.string().nullable(), generationPrompt: z.string().nullable().optional(), children: z.array(fileStructureItemSchemaContents).optional(), }).refine(data => data.type === 'directory' || (data.children === undefined || data.children.length === 0), { message: "Files cannot have children arrays (unless empty or undefined).", path: ["children"] }).refine(data => { if (data.type === 'directory' && (data.content !== null && data.content !== undefined)) { return false; } return true; }, { message: "Directories should have null content.", path: ["content"] }).refine(data => { if (data.content !== null && data.content !== undefined) { return data.generationPrompt === null || data.generationPrompt === undefined; } return true; }, { message: "Cannot have both direct content and a generationPrompt for a file.", path: ["content"] })); export const fileStructureItemSchema = fileStructureItemSchemaContents; export const starterKitDefinitionSchema = z.object({ projectName: z.string().min(1), description: z.string(), techStack: z.record(techStackItemSchema), directoryStructure: z.array(fileStructureItemSchema), dependencies: z.object({ npm: z.object({ root: z.object({ dependencies: z.record(z.string()).optional(), devDependencies: z.record(z.string()).optional(), }).optional(), }).catchall(z.object({ dependencies: z.record(z.string()).optional(), devDependencies: z.record(z.string()).optional(), })).optional(), }), setupCommands: z.array(z.string()), nextSteps: z.array(z.string()), });