// tools/challenge-spec/platform-challenge-scenarios-b.ts
// SPEC-015b: Advanced challenge scenarios for bots, Web3, ML, data pipelines, IaC, and IoT
// Bot + Web3 scenarios: platform-challenge-scenarios-b1.ts
// ML + IaC + IoT scenarios: platform-challenge-scenarios-b2.ts
import { buildBotAdvancedChallenges, buildWeb3AdvancedChallenges, } from './platform-challenge-scenarios-b1.js';
import { buildMLAdvancedChallenges, buildIaCAdvancedChallenges, buildIoTAdvancedChallenges, } from './platform-challenge-scenarios-b2.js';
// === Public API ===
/**
 * Returns SPEC-015b advanced platform challenge scenarios.
 * Called from platform-challenge-scenarios.ts getPlatformChallenges.
 */
export function getAdvancedPlatformChallenges(spec, content, knowledge) {
    const scenarios = [];
    const category = knowledge.projectCategory;
    const framework = knowledge.framework?.toLowerCase() ?? '';
    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
    const stack = (knowledge.stack ?? []).map((s) => s.toLowerCase());
    const isSmartContract = category === 'smart-contract' ||
        ['hardhat', 'foundry', 'anchor', 'move'].includes(framework) ||
        stack.some((s) => ['solidity', 'hardhat', 'foundry'].includes(s));
    const isBot = category === 'bot' ||
        stack.some((s) => ['discord.js', 'telegraf', 'grammy', '@slack/bolt'].includes(s));
    const isML = category === 'ml' ||
        stack.some((s) => ['pytorch', 'tensorflow', 'sklearn', 'langchain', 'transformers'].includes(s));
    const isIaC = stack.some((s) => ['terraform', 'pulumi', 'cdk', 'ansible', 'cloudformation'].includes(s));
    const isIoT = category === 'iot' ||
        stack.some((s) => ['platformio', 'arduino', 'zephyr', 'esp32', 'raspberry-pi'].includes(s));
    if (isBot) {
        scenarios.push(...buildBotAdvancedChallenges(spec, content));
    }
    if (isSmartContract) {
        scenarios.push(...buildWeb3AdvancedChallenges(spec, content));
    }
    if (isML) {
        scenarios.push(...buildMLAdvancedChallenges(spec, content));
    }
    if (isIaC) {
        scenarios.push(...buildIaCAdvancedChallenges(spec, content));
    }
    if (isIoT) {
        scenarios.push(...buildIoTAdvancedChallenges(spec, content));
    }
    return scenarios;
}
//# sourceMappingURL=platform-challenge-scenarios-b.js.map