// Planu — Agent Generator: Framework File Helpers
// Shared utility functions and install instruction builder.
/** Convert a string to camelCase. */
export function camelCase(str) {
    return str
        .replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ''))
        .replace(/^(.)/, (_, c) => c.toLowerCase());
}
/** Convert a string to PascalCase. */
export function pascalCase(str) {
    return str
        .replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ''))
        .replace(/^(.)/, (_, c) => c.toUpperCase());
}
/** Escape backticks and template literal expressions for embedding in template literals. */
export function escapeTemplateLiteral(str) {
    return str.replace(/`/g, '\\`').replace(/\$\{/g, '\\${');
}
/** Build human-readable install instructions for a framework agent. */
export function buildInstallInstructions(framework, config, files) {
    const lines = [];
    lines.push(`## ${config.name} Agent Setup`);
    lines.push('');
    lines.push(`Documentation: ${config.docsUrl}`);
    lines.push(`Supported languages: ${config.languages.join(', ')}`);
    lines.push('');
    // Install commands
    const installCommands = {
        'claude-agent-sdk': 'npm install @anthropic-ai/sdk',
        crewai: 'pip install crewai',
        langgraph: 'pip install langgraph langchain-anthropic',
        autogen: 'pip install autogen-agentchat',
        mastra: 'npm install @mastra/core',
        'vercel-ai-sdk': 'npm install ai @ai-sdk/anthropic',
    };
    if (installCommands[framework]) {
        lines.push(`Install: \`${installCommands[framework]}\``);
        lines.push('');
    }
    lines.push('Generated files:');
    for (const file of files) {
        lines.push(`- ${file.path}`);
    }
    if (config.supportsHandoffs) {
        lines.push('');
        lines.push('This framework supports agent handoffs. Configure handoff conditions as needed.');
    }
    if (config.supportsMcp) {
        lines.push('');
        lines.push('This framework supports MCP tools. Connect SDD MCP server for full workflow integration.');
    }
    return lines.join('\n');
}
//# sourceMappingURL=framework-files-helpers.js.map