// dispatchers/ai-ml-dispatcher.ts — Agent, Smart Contract, ML, MCP dispatches
import { isAgentProject, generateAgentTestDefs, generateAgentTestFiles, } from '../../../engine/test-generators/agent-test-templates.js';
import { isSmartContractProject, isMLProject, generateSmartContractTestDefs, generateMLTestDefs, buildSmartContractTestFiles, buildMLTestFiles, } from '../../../engine/test-generators/platform-test-templates.js';
import { isMcpProject, generateMcpTestDefs, generateMcpTestFiles, } from '../generators/mcp-tests-generator.js';
export function dispatchAiMl(spec, knowledge, testDir, testFramework, slug, autoGenerate, _testExt, unitTests, integrationTests, testFiles) {
    if (isAgentProject(knowledge) || spec.type === 'agent') {
        const agentDefs = generateAgentTestDefs(spec.title, testDir);
        unitTests.push(...agentDefs.filter((d) => d.type === 'unit'));
        integrationTests.push(...agentDefs.filter((d) => d.type === 'integration'));
        testFiles.push(...generateAgentTestFiles(spec, testDir, testFramework, knowledge.language));
    }
    if (isSmartContractProject(knowledge)) {
        const contractDefs = generateSmartContractTestDefs(spec.title, testDir);
        unitTests.push(...contractDefs.filter((d) => d.type === 'unit'));
        integrationTests.push(...contractDefs.filter((d) => d.type === 'integration'));
        testFiles.push(...buildSmartContractTestFiles(spec.title, slug, testDir, knowledge.framework ?? 'hardhat', autoGenerate));
    }
    if (isMLProject(knowledge)) {
        const mlDefs = generateMLTestDefs(spec.title, testDir);
        unitTests.push(...mlDefs.filter((d) => d.type === 'unit'));
        integrationTests.push(...mlDefs.filter((d) => d.type === 'integration'));
        testFiles.push(...buildMLTestFiles(spec.title, slug, testDir, autoGenerate));
    }
    if (isMcpProject(knowledge) || spec.type === 'agent') {
        const mcpDefs = generateMcpTestDefs(spec.title, testDir);
        unitTests.push(...mcpDefs.filter((d) => d.type === 'unit'));
        integrationTests.push(...mcpDefs.filter((d) => d.type === 'integration'));
        if (isMcpProject(knowledge)) {
            testFiles.push(...generateMcpTestFiles(spec, testDir, testFramework, knowledge.language));
        }
    }
}
//# sourceMappingURL=ai-ml-dispatcher.js.map