// packages/plugin-awf/src/index.ts
// @nockdev/awf - DOMYH Awesome Code Plugin
export { AWF_VERSION, AWF_NAME, AWF_TOPIC, AWF_DESCRIPTION, HSA_PORT, EXEC_TIMEOUT, AGENT_DIR } from "./constants.js";
export { checkHSAUpdate, downloadHSA } from "./commands/install-hsa.js";
export { IDE_REGISTRY, getIDEOptions, getIDEByValue, getIDEValues } from "./constants/ides.js";
export { AVAILABLE_SKILLS, SKILLS_BY_CATEGORY, getSkillByName, isValidSkill, getSkillNames, getSkillsByCategory } from "./constants/skills.js";
import { AWF_VERSION, AWF_NAME } from "./constants.js";
// Import all commands
import { initCommand, initFlags } from "./commands/init.js";
import { listCommand, listFlags } from "./commands/list.js";
import { doctorCommand, doctorFlags } from "./commands/doctor.js";
import { infoCommand } from "./commands/info.js";
import { updateCommand, updateFlags } from "./commands/update.js";
import { installCommand, installFlags } from "./commands/install.js";
import { configCommand, configFlags } from "./commands/config.js";
import { hsaCommand, hsaFlags } from "./commands/hsa.js";
import { mcpCommand, mcpFlags } from "./commands/mcp.js";
import { registryCommand, registryFlags } from "./commands/registry.js";
// Plugin definition
const awfPlugin = {
    name: AWF_NAME,
    version: AWF_VERSION,
    topic: "awf",
    description: "DOMYH Awesome Code - AI Development Assistant",
    commands: [
        // Core commands
        {
            name: "init",
            id: "awf:init",
            description: "Initialize DOMYH in project (wizard)",
            aliases: ["i"],
            flags: initFlags,
            run: initCommand,
        },
        {
            name: "install",
            id: "awf:install",
            description: "Install IDE configurations",
            aliases: ["ins"],
            flags: installFlags,
            run: installCommand,
        },
        // Skills management
        {
            name: "list",
            id: "awf:list",
            description: "List available skills and workflows",
            aliases: ["ls", "l"],
            flags: listFlags,
            run: listCommand,
        },
        // Diagnostics
        {
            name: "doctor",
            id: "awf:doctor",
            description: "Diagnose IDE configurations",
            aliases: ["diag", "check"],
            flags: doctorFlags,
            run: doctorCommand,
        },
        {
            name: "info",
            id: "awf:info",
            description: "Show project info and detected stack",
            aliases: ["status"],
            run: infoCommand,
        },
        // Configuration
        {
            name: "config",
            id: "awf:config",
            description: "Manage configuration",
            aliases: ["cfg", "c"],
            flags: configFlags,
            run: configCommand,
        },
        {
            name: "update",
            id: "awf:update",
            description: "Update DOMYH to latest version",
            aliases: ["up", "check"],
            flags: updateFlags,
            run: updateCommand,
        },
        // HSA integration
        {
            name: "hsa",
            id: "awf:hsa",
            description: "Manage HSA context engine",
            aliases: ["context"],
            flags: hsaFlags,
            run: hsaCommand,
        },
        // MCP integration
        {
            name: "mcp",
            id: "awf:mcp",
            description: "Manage MCP server configuration",
            flags: mcpFlags,
            run: mcpCommand,
        },
        // P1+P2a: Skill Registry + Upgrade Engine
        {
            name: "registry",
            id: "awf:registry",
            description: "Skill registry and upgrade management",
            aliases: ["reg"],
            flags: registryFlags,
            run: registryCommand,
        },
    ],
    async init(context) {
        // Plugin initialization (optional)
        try {
            if (context.verbose) {
                console.log(`AWF plugin v${AWF_VERSION} initialized`);
            }
        }
        catch {
            // Silently ignore init errors to prevent plugin crash
        }
    },
};
export default awfPlugin;
