claude-flow 2.7.32 → 2.7.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/.claude/skills/agentic-jujutsu/SKILL.md +645 -0
  2. package/bin/claude-flow +1 -1
  3. package/dist/src/cli/help-formatter.js +0 -3
  4. package/dist/src/cli/help-formatter.js.map +1 -1
  5. package/dist/src/cli/simple-cli.js +173 -79
  6. package/dist/src/cli/simple-cli.js.map +1 -1
  7. package/dist/src/cli/simple-commands/init/agent-copier.js +3 -9
  8. package/dist/src/cli/simple-commands/init/agent-copier.js.map +1 -1
  9. package/dist/src/cli/validation-helper.js.map +1 -1
  10. package/dist/src/core/version.js +1 -1
  11. package/dist/src/core/version.js.map +1 -1
  12. package/dist/src/memory/swarm-memory.js +340 -421
  13. package/dist/src/memory/swarm-memory.js.map +1 -1
  14. package/docs/AGENT_FOLDER_STRUCTURE_FIX.md +192 -0
  15. package/package.json +2 -1
  16. package/src/cli/simple-commands/init/agent-copier.js +5 -10
  17. /package/.claude/agents/analysis/{code-review/analyze-code-quality.md → analyze-code-quality.md} +0 -0
  18. /package/.claude/agents/architecture/{system-design/arch-system-design.md → arch-system-design.md} +0 -0
  19. /package/.claude/agents/data/{ml/data-ml-model.md → data-ml-model.md} +0 -0
  20. /package/.claude/agents/development/{backend/dev-backend-api.md → dev-backend-api.md} +0 -0
  21. /package/.claude/agents/devops/{ci-cd/ops-cicd-github.md → ops-cicd-github.md} +0 -0
  22. /package/.claude/agents/documentation/{api-docs/docs-api-openapi.md → docs-api-openapi.md} +0 -0
  23. /package/.claude/agents/specialized/{mobile/spec-mobile-react-native.md → spec-mobile-react-native.md} +0 -0
  24. /package/.claude/agents/testing/{validation/production-validator.md → production-validator.md} +0 -0
  25. /package/.claude/agents/testing/{unit/tdd-london-swarm.md → tdd-london-swarm.md} +0 -0
@@ -124,24 +124,18 @@ export async function createAgentDirectories(targetDir, dryRun = false) {
124
124
  '.claude/agents/github',
125
125
  '.claude/agents/sparc',
126
126
  '.claude/agents/testing',
127
- '.claude/agents/testing/unit',
128
- '.claude/agents/testing/validation',
129
127
  '.claude/agents/templates',
130
128
  '.claude/agents/analysis',
131
- '.claude/agents/analysis/code-review',
132
129
  '.claude/agents/architecture',
133
- '.claude/agents/architecture/system-design',
134
130
  '.claude/agents/data',
135
- '.claude/agents/data/ml',
136
131
  '.claude/agents/development',
137
- '.claude/agents/development/backend',
138
132
  '.claude/agents/devops',
139
- '.claude/agents/devops/ci-cd',
140
133
  '.claude/agents/documentation',
141
- '.claude/agents/documentation/api-docs',
142
134
  '.claude/agents/specialized',
143
- '.claude/agents/specialized/mobile',
144
135
  '.claude/agents/flow-nexus',
136
+ '.claude/agents/goal',
137
+ '.claude/agents/neural',
138
+ '.claude/agents/reasoning',
145
139
  '.claude/commands',
146
140
  '.claude/commands/flow-nexus'
147
141
  ];
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/cli/simple-commands/init/agent-copier.js"],"sourcesContent":["// agent-copier.js - Copy all agent files during initialization\nimport { promises as fs } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Copy all agent files from the installed package to project directory\n */\nexport async function copyAgentFiles(targetDir, options = {}) {\n const { force = false, dryRun = false } = options;\n \n // Path to agent files - try multiple locations\n const packageAgentsDir = join(__dirname, '../../../../.claude/agents'); // From npm package\n const localAgentsDir = '/workspaces/claude-code-flow/.claude/agents'; // Local development\n const cwdAgentsDir = join(process.cwd(), '.claude/agents'); // Current working directory\n \n let sourceAgentsDir;\n \n // Try local development first, then package, then cwd\n try {\n await fs.access(localAgentsDir);\n sourceAgentsDir = localAgentsDir;\n console.log(' 📁 Using local development agent files');\n } catch {\n try {\n await fs.access(packageAgentsDir);\n sourceAgentsDir = packageAgentsDir;\n console.log(' 📁 Using packaged agent files');\n } catch {\n try {\n await fs.access(cwdAgentsDir);\n sourceAgentsDir = cwdAgentsDir;\n console.log(' 📁 Using current directory agent files');\n } catch {\n console.log(' ⚠️ No agent files found in any location');\n return { success: false, error: 'Agent files not found' };\n }\n }\n }\n const targetAgentsDir = join(targetDir, '.claude/agents');\n \n console.log('📁 Copying agent system files...');\n console.log(` 📂 Source: ${sourceAgentsDir}`);\n console.log(` 📂 Target: ${targetAgentsDir}`);\n \n try {\n \n // Create target directory\n if (!dryRun) {\n await fs.mkdir(targetAgentsDir, { recursive: true });\n }\n \n const copiedFiles = [];\n const errors = [];\n \n // Recursively copy all agent files\n async function copyRecursive(srcDir, destDir) {\n const items = await fs.readdir(srcDir, { withFileTypes: true });\n \n for (const item of items) {\n const srcPath = join(srcDir, item.name);\n const destPath = join(destDir, item.name);\n \n if (item.isDirectory()) {\n if (!dryRun) {\n await fs.mkdir(destPath, { recursive: true });\n }\n await copyRecursive(srcPath, destPath);\n } else if (item.isFile() && item.name.endsWith('.md')) {\n try {\n // Check if file already exists\n let shouldCopy = force;\n if (!force) {\n try {\n await fs.access(destPath);\n // File exists, skip unless force is true\n continue;\n } catch {\n // File doesn't exist, safe to copy\n shouldCopy = true;\n }\n }\n \n if (shouldCopy && !dryRun) {\n const content = await fs.readFile(srcPath, 'utf8');\n await fs.writeFile(destPath, content, 'utf8');\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n } else if (dryRun) {\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n }\n } catch (err) {\n errors.push(`Failed to copy ${item.name}: ${err.message}`);\n }\n }\n }\n }\n \n await copyRecursive(sourceAgentsDir, targetAgentsDir);\n \n if (!dryRun && copiedFiles.length > 0) {\n console.log(` ✅ Copied ${copiedFiles.length} agent files`);\n console.log(' 📋 Agent system initialized with 64 specialized agents');\n console.log(' 🎯 Available categories: Core, Swarm, Consensus, Performance, GitHub, SPARC, Testing');\n } else if (dryRun) {\n console.log(` [DRY RUN] Would copy ${copiedFiles.length} agent files`);\n }\n \n if (errors.length > 0) {\n console.log(' ⚠️ Some agent files could not be copied:');\n errors.forEach(error => console.log(` - ${error}`));\n }\n \n return {\n success: true,\n copiedFiles,\n errors,\n totalAgents: copiedFiles.length\n };\n \n } catch (err) {\n console.log(` ❌ Failed to copy agent files: ${err.message}`);\n return {\n success: false,\n error: err.message,\n copiedFiles: [],\n errors: [err.message]\n };\n }\n}\n\n/**\n * Create agent directories structure\n */\nexport async function createAgentDirectories(targetDir, dryRun = false) {\n const agentDirs = [\n '.claude',\n '.claude/agents',\n '.claude/agents/core',\n '.claude/agents/swarm', \n '.claude/agents/hive-mind',\n '.claude/agents/consensus',\n '.claude/agents/optimization',\n '.claude/agents/github',\n '.claude/agents/sparc',\n '.claude/agents/testing',\n '.claude/agents/testing/unit',\n '.claude/agents/testing/validation',\n '.claude/agents/templates',\n '.claude/agents/analysis',\n '.claude/agents/analysis/code-review',\n '.claude/agents/architecture',\n '.claude/agents/architecture/system-design',\n '.claude/agents/data',\n '.claude/agents/data/ml',\n '.claude/agents/development',\n '.claude/agents/development/backend',\n '.claude/agents/devops',\n '.claude/agents/devops/ci-cd',\n '.claude/agents/documentation',\n '.claude/agents/documentation/api-docs',\n '.claude/agents/specialized',\n '.claude/agents/specialized/mobile',\n '.claude/agents/flow-nexus',\n '.claude/commands',\n '.claude/commands/flow-nexus'\n ];\n \n if (dryRun) {\n console.log(` [DRY RUN] Would create ${agentDirs.length} agent directories`);\n return;\n }\n \n for (const dir of agentDirs) {\n await fs.mkdir(join(targetDir, dir), { recursive: true });\n }\n \n console.log(` ✅ Created ${agentDirs.length} agent directories`);\n}\n\n/**\n * Validate agent system after copying\n */\n/**\n * Copy all command files from the installed package to project directory\n */\nexport async function copyCommandFiles(targetDir, options = {}) {\n const { force = false, dryRun = false } = options;\n \n // Path to command files - try multiple locations\n const packageCommandsDir = join(__dirname, '../../../../.claude/commands'); // From npm package\n const localCommandsDir = '/workspaces/claude-code-flow/.claude/commands'; // Local development\n const cwdCommandsDir = join(process.cwd(), '.claude/commands'); // Current working directory\n \n let sourceCommandsDir;\n \n // Try local development first, then package, then cwd\n try {\n await fs.access(localCommandsDir);\n sourceCommandsDir = localCommandsDir;\n console.log(' 📁 Using local development command files');\n } catch {\n try {\n await fs.access(packageCommandsDir);\n sourceCommandsDir = packageCommandsDir;\n console.log(' 📁 Using packaged command files');\n } catch {\n try {\n await fs.access(cwdCommandsDir);\n sourceCommandsDir = cwdCommandsDir;\n console.log(' 📁 Using current directory command files');\n } catch {\n console.log(' ⚠️ No command files found in any location');\n return { success: false, error: 'Command files not found' };\n }\n }\n }\n \n const targetCommandsDir = join(targetDir, '.claude/commands');\n \n console.log('📁 Copying command system files...');\n console.log(` 📂 Source: ${sourceCommandsDir}`);\n console.log(` 📂 Target: ${targetCommandsDir}`);\n \n try {\n // Create target directory\n if (!dryRun) {\n await fs.mkdir(targetCommandsDir, { recursive: true });\n }\n \n const copiedFiles = [];\n const errors = [];\n \n // Recursively copy all command files\n async function copyRecursive(srcDir, destDir) {\n const items = await fs.readdir(srcDir, { withFileTypes: true });\n \n for (const item of items) {\n const srcPath = join(srcDir, item.name);\n const destPath = join(destDir, item.name);\n \n if (item.isDirectory()) {\n if (!dryRun) {\n await fs.mkdir(destPath, { recursive: true });\n }\n await copyRecursive(srcPath, destPath);\n } else if (item.isFile() && item.name.endsWith('.md')) {\n try {\n // Check if file already exists\n let shouldCopy = force;\n if (!force) {\n try {\n await fs.access(destPath);\n // File exists, skip unless force is true\n continue;\n } catch {\n // File doesn't exist, safe to copy\n shouldCopy = true;\n }\n }\n \n if (shouldCopy && !dryRun) {\n const content = await fs.readFile(srcPath, 'utf8');\n await fs.writeFile(destPath, content, 'utf8');\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n } else if (dryRun) {\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n }\n } catch (err) {\n errors.push(`Failed to copy ${item.name}: ${err.message}`);\n }\n }\n }\n }\n \n await copyRecursive(sourceCommandsDir, targetCommandsDir);\n \n if (!dryRun && copiedFiles.length > 0) {\n console.log(` ✅ Copied ${copiedFiles.length} command files`);\n console.log(' 📋 Command system initialized with comprehensive documentation');\n console.log(' 🎯 Available categories: Analysis, Automation, GitHub, Hooks, Memory, Flow Nexus');\n } else if (dryRun) {\n console.log(` [DRY RUN] Would copy ${copiedFiles.length} command files`);\n }\n \n if (errors.length > 0) {\n console.log(' ⚠️ Some command files could not be copied:');\n errors.forEach(error => console.log(` - ${error}`));\n }\n \n return {\n success: true,\n copiedFiles,\n errors,\n totalCommands: copiedFiles.length\n };\n \n } catch (err) {\n console.log(` ❌ Failed to copy command files: ${err.message}`);\n return {\n success: false,\n error: err.message,\n copiedFiles: [],\n errors: [err.message]\n };\n }\n}\n\nexport async function validateAgentSystem(targetDir) {\n const agentsDir = join(targetDir, '.claude/agents');\n \n try {\n const categories = await fs.readdir(agentsDir, { withFileTypes: true });\n const agentCategories = categories.filter(item => item.isDirectory()).map(item => item.name);\n \n let totalAgents = 0;\n for (const category of agentCategories) {\n const categoryPath = join(agentsDir, category);\n const items = await fs.readdir(categoryPath, { withFileTypes: true });\n const agentFiles = items.filter(item => item.isFile() && item.name.endsWith('.md'));\n totalAgents += agentFiles.length;\n }\n \n console.log(' 🔍 Agent system validation:');\n console.log(` • Categories: ${agentCategories.length}`);\n console.log(` • Total agents: ${totalAgents}`);\n console.log(` • Categories: ${agentCategories.join(', ')}`);\n \n return {\n valid: totalAgents > 50, // Should have at least 50+ agents\n categories: agentCategories.length,\n totalAgents,\n categoryNames: agentCategories\n };\n \n } catch (err) {\n console.log(` ⚠️ Agent system validation failed: ${err.message}`);\n return {\n valid: false,\n error: err.message\n };\n }\n}"],"names":["promises","fs","join","dirname","fileURLToPath","__filename","url","__dirname","copyAgentFiles","targetDir","options","force","dryRun","packageAgentsDir","localAgentsDir","cwdAgentsDir","process","cwd","sourceAgentsDir","access","console","log","success","error","targetAgentsDir","mkdir","recursive","copiedFiles","errors","copyRecursive","srcDir","destDir","items","readdir","withFileTypes","item","srcPath","name","destPath","isDirectory","isFile","endsWith","shouldCopy","content","readFile","writeFile","push","replace","err","message","length","forEach","totalAgents","createAgentDirectories","agentDirs","dir","copyCommandFiles","packageCommandsDir","localCommandsDir","cwdCommandsDir","sourceCommandsDir","targetCommandsDir","totalCommands","validateAgentSystem","agentsDir","categories","agentCategories","filter","map","category","categoryPath","agentFiles","valid","categoryNames"],"mappings":"AACA,SAASA,YAAYC,EAAE,QAAQ,KAAK;AACpC,SAASC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,SAASC,aAAa,QAAQ,MAAM;AAEpC,MAAMC,aAAaD,cAAc,YAAYE,GAAG;AAChD,MAAMC,YAAYJ,QAAQE;AAK1B,OAAO,eAAeG,eAAeC,SAAS,EAAEC,UAAU,CAAC,CAAC;IAC1D,MAAM,EAAEC,QAAQ,KAAK,EAAEC,SAAS,KAAK,EAAE,GAAGF;IAG1C,MAAMG,mBAAmBX,KAAKK,WAAW;IACzC,MAAMO,iBAAiB;IACvB,MAAMC,eAAeb,KAAKc,QAAQC,GAAG,IAAI;IAEzC,IAAIC;IAGJ,IAAI;QACF,MAAMjB,GAAGkB,MAAM,CAACL;QAChBI,kBAAkBJ;QAClBM,QAAQC,GAAG,CAAC;IACd,EAAE,OAAM;QACN,IAAI;YACF,MAAMpB,GAAGkB,MAAM,CAACN;YAChBK,kBAAkBL;YAClBO,QAAQC,GAAG,CAAC;QACd,EAAE,OAAM;YACN,IAAI;gBACF,MAAMpB,GAAGkB,MAAM,CAACJ;gBAChBG,kBAAkBH;gBAClBK,QAAQC,GAAG,CAAC;YACd,EAAE,OAAM;gBACND,QAAQC,GAAG,CAAC;gBACZ,OAAO;oBAAEC,SAAS;oBAAOC,OAAO;gBAAwB;YAC1D;QACF;IACF;IACA,MAAMC,kBAAkBtB,KAAKO,WAAW;IAExCW,QAAQC,GAAG,CAAC;IACZD,QAAQC,GAAG,CAAC,CAAC,aAAa,EAAEH,iBAAiB;IAC7CE,QAAQC,GAAG,CAAC,CAAC,aAAa,EAAEG,i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GAAG,CAAC,CAAC,kBAAkB,EAAE6C,gBAAgBhB,MAAM,EAAE;QACzD9B,QAAQC,GAAG,CAAC,CAAC,oBAAoB,EAAE+B,aAAa;QAChDhC,QAAQC,GAAG,CAAC,CAAC,kBAAkB,EAAE6C,gBAAgBhE,IAAI,CAAC,OAAO;QAE7D,OAAO;YACLsE,OAAOpB,cAAc;YACrBa,YAAYC,gBAAgBhB,MAAM;YAClCE;YACAqB,eAAeP;QACjB;IAEF,EAAE,OAAOlB,KAAK;QACZ5B,QAAQC,GAAG,CAAC,CAAC,sCAAsC,EAAE2B,IAAIC,OAAO,EAAE;QAClE,OAAO;YACLuB,OAAO;YACPjD,OAAOyB,IAAIC,OAAO;QACpB;IACF;AACF"}
1
+ {"version":3,"sources":["../../../../../src/cli/simple-commands/init/agent-copier.js"],"sourcesContent":["// agent-copier.js - Copy all agent files during initialization\nimport { promises as fs } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n/**\n * Copy all agent files from the installed package to project directory\n */\nexport async function copyAgentFiles(targetDir, options = {}) {\n const { force = false, dryRun = false } = options;\n \n // Path to agent files - try multiple locations\n const packageAgentsDir = join(__dirname, '../../../../.claude/agents'); // From npm package\n const localAgentsDir = '/workspaces/claude-code-flow/.claude/agents'; // Local development\n const cwdAgentsDir = join(process.cwd(), '.claude/agents'); // Current working directory\n \n let sourceAgentsDir;\n \n // Try local development first, then package, then cwd\n try {\n await fs.access(localAgentsDir);\n sourceAgentsDir = localAgentsDir;\n console.log(' 📁 Using local development agent files');\n } catch {\n try {\n await fs.access(packageAgentsDir);\n sourceAgentsDir = packageAgentsDir;\n console.log(' 📁 Using packaged agent files');\n } catch {\n try {\n await fs.access(cwdAgentsDir);\n sourceAgentsDir = cwdAgentsDir;\n console.log(' 📁 Using current directory agent files');\n } catch {\n console.log(' ⚠️ No agent files found in any location');\n return { success: false, error: 'Agent files not found' };\n }\n }\n }\n const targetAgentsDir = join(targetDir, '.claude/agents');\n \n console.log('📁 Copying agent system files...');\n console.log(` 📂 Source: ${sourceAgentsDir}`);\n console.log(` 📂 Target: ${targetAgentsDir}`);\n \n try {\n \n // Create target directory\n if (!dryRun) {\n await fs.mkdir(targetAgentsDir, { recursive: true });\n }\n \n const copiedFiles = [];\n const errors = [];\n \n // Recursively copy all agent files\n async function copyRecursive(srcDir, destDir) {\n const items = await fs.readdir(srcDir, { withFileTypes: true });\n \n for (const item of items) {\n const srcPath = join(srcDir, item.name);\n const destPath = join(destDir, item.name);\n \n if (item.isDirectory()) {\n if (!dryRun) {\n await fs.mkdir(destPath, { recursive: true });\n }\n await copyRecursive(srcPath, destPath);\n } else if (item.isFile() && item.name.endsWith('.md')) {\n try {\n // Check if file already exists\n let shouldCopy = force;\n if (!force) {\n try {\n await fs.access(destPath);\n // File exists, skip unless force is true\n continue;\n } catch {\n // File doesn't exist, safe to copy\n shouldCopy = true;\n }\n }\n \n if (shouldCopy && !dryRun) {\n const content = await fs.readFile(srcPath, 'utf8');\n await fs.writeFile(destPath, content, 'utf8');\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n } else if (dryRun) {\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n }\n } catch (err) {\n errors.push(`Failed to copy ${item.name}: ${err.message}`);\n }\n }\n }\n }\n \n await copyRecursive(sourceAgentsDir, targetAgentsDir);\n \n if (!dryRun && copiedFiles.length > 0) {\n console.log(` ✅ Copied ${copiedFiles.length} agent files`);\n console.log(' 📋 Agent system initialized with 64 specialized agents');\n console.log(' 🎯 Available categories: Core, Swarm, Consensus, Performance, GitHub, SPARC, Testing');\n } else if (dryRun) {\n console.log(` [DRY RUN] Would copy ${copiedFiles.length} agent files`);\n }\n \n if (errors.length > 0) {\n console.log(' ⚠️ Some agent files could not be copied:');\n errors.forEach(error => console.log(` - ${error}`));\n }\n \n return {\n success: true,\n copiedFiles,\n errors,\n totalAgents: copiedFiles.length\n };\n \n } catch (err) {\n console.log(` ❌ Failed to copy agent files: ${err.message}`);\n return {\n success: false,\n error: err.message,\n copiedFiles: [],\n errors: [err.message]\n };\n }\n}\n\n/**\n * Create agent directories structure\n */\nexport async function createAgentDirectories(targetDir, dryRun = false) {\n // Flat structure - all .md files directly in category folders\n const agentDirs = [\n '.claude',\n '.claude/agents',\n '.claude/agents/core',\n '.claude/agents/swarm',\n '.claude/agents/hive-mind',\n '.claude/agents/consensus',\n '.claude/agents/optimization',\n '.claude/agents/github',\n '.claude/agents/sparc',\n '.claude/agents/testing',\n '.claude/agents/templates',\n '.claude/agents/analysis',\n '.claude/agents/architecture',\n '.claude/agents/data',\n '.claude/agents/development',\n '.claude/agents/devops',\n '.claude/agents/documentation',\n '.claude/agents/specialized',\n '.claude/agents/flow-nexus',\n '.claude/agents/goal',\n '.claude/agents/neural',\n '.claude/agents/reasoning',\n '.claude/commands',\n '.claude/commands/flow-nexus'\n ];\n \n if (dryRun) {\n console.log(` [DRY RUN] Would create ${agentDirs.length} agent directories`);\n return;\n }\n \n for (const dir of agentDirs) {\n await fs.mkdir(join(targetDir, dir), { recursive: true });\n }\n \n console.log(` ✅ Created ${agentDirs.length} agent directories`);\n}\n\n/**\n * Validate agent system after copying\n */\n/**\n * Copy all command files from the installed package to project directory\n */\nexport async function copyCommandFiles(targetDir, options = {}) {\n const { force = false, dryRun = false } = options;\n \n // Path to command files - try multiple locations\n const packageCommandsDir = join(__dirname, '../../../../.claude/commands'); // From npm package\n const localCommandsDir = '/workspaces/claude-code-flow/.claude/commands'; // Local development\n const cwdCommandsDir = join(process.cwd(), '.claude/commands'); // Current working directory\n \n let sourceCommandsDir;\n \n // Try local development first, then package, then cwd\n try {\n await fs.access(localCommandsDir);\n sourceCommandsDir = localCommandsDir;\n console.log(' 📁 Using local development command files');\n } catch {\n try {\n await fs.access(packageCommandsDir);\n sourceCommandsDir = packageCommandsDir;\n console.log(' 📁 Using packaged command files');\n } catch {\n try {\n await fs.access(cwdCommandsDir);\n sourceCommandsDir = cwdCommandsDir;\n console.log(' 📁 Using current directory command files');\n } catch {\n console.log(' ⚠️ No command files found in any location');\n return { success: false, error: 'Command files not found' };\n }\n }\n }\n \n const targetCommandsDir = join(targetDir, '.claude/commands');\n \n console.log('📁 Copying command system files...');\n console.log(` 📂 Source: ${sourceCommandsDir}`);\n console.log(` 📂 Target: ${targetCommandsDir}`);\n \n try {\n // Create target directory\n if (!dryRun) {\n await fs.mkdir(targetCommandsDir, { recursive: true });\n }\n \n const copiedFiles = [];\n const errors = [];\n \n // Recursively copy all command files\n async function copyRecursive(srcDir, destDir) {\n const items = await fs.readdir(srcDir, { withFileTypes: true });\n \n for (const item of items) {\n const srcPath = join(srcDir, item.name);\n const destPath = join(destDir, item.name);\n \n if (item.isDirectory()) {\n if (!dryRun) {\n await fs.mkdir(destPath, { recursive: true });\n }\n await copyRecursive(srcPath, destPath);\n } else if (item.isFile() && item.name.endsWith('.md')) {\n try {\n // Check if file already exists\n let shouldCopy = force;\n if (!force) {\n try {\n await fs.access(destPath);\n // File exists, skip unless force is true\n continue;\n } catch {\n // File doesn't exist, safe to copy\n shouldCopy = true;\n }\n }\n \n if (shouldCopy && !dryRun) {\n const content = await fs.readFile(srcPath, 'utf8');\n await fs.writeFile(destPath, content, 'utf8');\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n } else if (dryRun) {\n copiedFiles.push(destPath.replace(targetDir + '/', ''));\n }\n } catch (err) {\n errors.push(`Failed to copy ${item.name}: ${err.message}`);\n }\n }\n }\n }\n \n await copyRecursive(sourceCommandsDir, targetCommandsDir);\n \n if (!dryRun && copiedFiles.length > 0) {\n console.log(` ✅ Copied ${copiedFiles.length} command files`);\n console.log(' 📋 Command system initialized with comprehensive documentation');\n console.log(' 🎯 Available categories: Analysis, Automation, GitHub, Hooks, Memory, Flow Nexus');\n } else if (dryRun) {\n console.log(` [DRY RUN] Would copy ${copiedFiles.length} command files`);\n }\n \n if (errors.length > 0) {\n console.log(' ⚠️ Some command files could not be copied:');\n errors.forEach(error => console.log(` - ${error}`));\n }\n \n return {\n success: true,\n copiedFiles,\n errors,\n totalCommands: copiedFiles.length\n };\n \n } catch (err) {\n console.log(` ❌ Failed to copy command files: ${err.message}`);\n return {\n success: false,\n error: err.message,\n copiedFiles: [],\n errors: [err.message]\n };\n }\n}\n\nexport async function validateAgentSystem(targetDir) {\n const agentsDir = join(targetDir, '.claude/agents');\n \n try {\n const categories = await fs.readdir(agentsDir, { withFileTypes: true });\n const agentCategories = categories.filter(item => item.isDirectory()).map(item => item.name);\n \n let totalAgents = 0;\n for (const category of agentCategories) {\n const categoryPath = join(agentsDir, category);\n const items = await fs.readdir(categoryPath, { withFileTypes: true });\n const agentFiles = items.filter(item => item.isFile() && item.name.endsWith('.md'));\n totalAgents += agentFiles.length;\n }\n \n console.log(' 🔍 Agent system validation:');\n console.log(` • Categories: ${agentCategories.length}`);\n console.log(` • Total agents: ${totalAgents}`);\n console.log(` • Categories: ${agentCategories.join(', ')}`);\n \n return {\n valid: totalAgents > 50, // Should have at least 50+ agents\n categories: agentCategories.length,\n totalAgents,\n categoryNames: agentCategories\n };\n \n } catch (err) {\n console.log(` ⚠️ Agent system validation failed: ${err.message}`);\n return {\n valid: false,\n error: err.message\n };\n }\n}"],"names":["promises","fs","join","dirname","fileURLToPath","__filename","url","__dirname","copyAgentFiles","targetDir","options","force","dryRun","packageAgentsDir","localAgentsDir","cwdAgentsDir","process","cwd","sourceAgentsDir","access","console","log","success","error","targetAgentsDir","mkdir","recursive","copiedFiles","errors","copyRecursive","srcDir","destDir","items","readdir","withFileTypes","item","srcPath","name","destPath","isDirectory","isFile","endsWith","shouldCopy","content","readFile","writeFile","push","replace","err","message","length","forEach","totalAgents","createAgentDirectories","agentDirs","dir","copyCommandFiles","packageCommandsDir","localCommandsDir","cwdCommandsDir","sourceCommandsDir","targetCommandsDir","totalCommands","validateAgentSystem","agentsDir","categories","agentCategories","filter","map","category","categoryPath","agentFiles","valid","categoryNames"],"mappings":"AACA,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M;YAClCE;YACAqB,eAAeP;QACjB;IAEF,EAAE,OAAOlB,KAAK;QACZ5B,QAAQC,GAAG,CAAC,CAAC,sCAAsC,EAAE2B,IAAIC,OAAO,EAAE;QAClE,OAAO;YACLuB,OAAO;YACPjD,OAAOyB,IAAIC,OAAO;QACpB;IACF;AACF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/cli/validation-helper.js"],"sourcesContent":["/**\n * CLI Parameter Validation Helper\n * Provides standardized error messages for invalid parameters\n */\n\nimport { HelpFormatter } from './help-formatter.js';\n\nexport class ValidationHelper {\n /**\n * Validate enum parameter\n */\n static validateEnum(value, paramName, validOptions, commandPath) {\n if (!validOptions.includes(value)) {\n console.error(\n HelpFormatter.formatValidationError(value, paramName, validOptions, commandPath),\n );\n process.exit(1);\n }\n }\n\n /**\n * Validate numeric parameter\n */\n static validateNumber(value, paramName, min, max, commandPath) {\n const num = parseInt(value, 10);\n\n if (isNaN(num)) {\n console.error(\n HelpFormatter.formatError(\n `'${value}' is not a valid number for ${paramName}.`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n\n if (min !== undefined && num < min) {\n console.error(\n HelpFormatter.formatError(\n `${paramName} must be at least ${min}. Got: ${num}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n\n if (max !== undefined && num > max) {\n console.error(\n HelpFormatter.formatError(\n `${paramName} must be at most ${max}. Got: ${num}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n\n return num;\n }\n\n /**\n * Validate required parameter\n */\n static validateRequired(value, paramName, commandPath) {\n if (!value || (typeof value === 'string' && value.trim() === '')) {\n console.error(\n HelpFormatter.formatError(\n `Missing required parameter: ${paramName}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n }\n\n /**\n * Validate file path exists\n */\n static async validateFilePath(path, paramName, commandPath) {\n try {\n const fs = await import('fs/promises');\n await fs.access(path);\n } catch (error) {\n console.error(\n HelpFormatter.formatError(\n `File not found for ${paramName}: ${path}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n }\n\n /**\n * Validate boolean flag\n */\n static validateBoolean(value, paramName, commandPath) {\n const lowerValue = value.toLowerCase();\n if (lowerValue === 'true' || lowerValue === '1' || lowerValue === 'yes') {\n return true;\n }\n if (lowerValue === 'false' || lowerValue === '0' || lowerValue === 'no') {\n return false;\n }\n\n console.error(\n HelpFormatter.formatError(\n `'${value}' is not a valid boolean for ${paramName}. Use: true, false, yes, no, 1, or 0.`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n}\n"],"names":["HelpFormatter","ValidationHelper","validateEnum","value","paramName","validOptions","commandPath","includes","console","error","formatValidationError","process","exit","validateNumber","min","max","num","parseInt","isNaN","formatError","undefined","validateRequired","trim","validateFilePath","path","fs","access","validateBoolean","lowerValue","toLowerCase"],"mappings":"AAKA,SAASA,aAAa,QAAQ,sBAAsB;AAEpD,OAAO,MAAMC;IAIX,OAAOC,aAAaC,KAAK,EAAEC,SAAS,EAAEC,YAAY,EAAEC,WAAW,EAAE;QAC/D,IAAI,CAACD,aAAaE,QAAQ,CAACJ,QAAQ;YACjCK,QAAQC,KAAK,CACXT,cAAcU,qBAAqB,CAACP,OAAOC,WAAWC,cAAcC;YAEtEK,QAAQC,IAAI,CAAC;QACf;IACF;IAKA,OAAOC,eAAeV,KAAK,EAAEC,SAAS,EAAEU,GAAG,EAAEC,GAAG,EAAET,WAAW,EAAE;QAC7D,MAAMU,MAAMC,SAASd,OAAO;QAE5B,IAAIe,MAAMF,MAAM;YACdR,QAAQC,KAAK,CACXT,cAAcmB,WAAW,CACvB,CAAC,CAAC,EAAEhB,MAAM,4BAA4B,EAAEC,UAAU,CAAC,CAAC,EACpDE,eAAe;YAGnBK,QAAQC,IAAI,CAAC;QACf;QAEA,IAAIE,QAAQM,aAAaJ,MAAMF,KAAK;YAClCN,QAAQC,KAAK,CACXT,cAAcmB,WAAW,CACvB,GAAGf,UAAU,kBAAkB,E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,IAAI,CAAC;IACf;AACF"}MsB,aAAazB,MAAM0B,WAAW;QACpC,IAAID,eAAe,UAAUA,eAAe,OAAOA,eAAe,OAAO;YACvE,OAAO;QACT;QACA,IAAIA,eAAe,WAAWA,eAAe,OAAOA,eAAe,MAAM;YACvE,OAAO;QACT;QAEApB,QAAQC,KAAK,CACXT,cAAcmB,WAAW,CACvB,CAAC,CAAC,EAAEhB,MAAM,6BAA6B,EAAEC,UAAU,qCAAqC,CAAC,EACzFE,eAAe;QAGnBK,QAAQC,IAAI,CAAC;IACf;AACF"}
1
+ {"version":3,"sources":["../../../src/cli/validation-helper.ts"],"sourcesContent":["/**\n * CLI Parameter Validation Helper\n * Provides standardized error messages for invalid parameters\n */\n\nimport { HelpFormatter } from './help-formatter.js';\n\nexport class ValidationHelper {\n /**\n * Validate enum parameter\n */\n static validateEnum(\n value: string,\n paramName: string,\n validOptions: string[],\n commandPath: string,\n ): void {\n if (!validOptions.includes(value)) {\n console.error(\n HelpFormatter.formatValidationError(value, paramName, validOptions, commandPath),\n );\n process.exit(1);\n }\n }\n\n /**\n * Validate numeric parameter\n */\n static validateNumber(\n value: string,\n paramName: string,\n min?: number,\n max?: number,\n commandPath?: string,\n ): number {\n const num = parseInt(value, 10);\n\n if (isNaN(num)) {\n console.error(\n HelpFormatter.formatError(\n `'${value}' is not a valid number for ${paramName}.`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n\n if (min !== undefined && num < min) {\n console.error(\n HelpFormatter.formatError(\n `${paramName} must be at least ${min}. Got: ${num}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n\n if (max !== undefined && num > max) {\n console.error(\n HelpFormatter.formatError(\n `${paramName} must be at most ${max}. Got: ${num}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n\n return num;\n }\n\n /**\n * Validate required parameter\n */\n static validateRequired(value: any, paramName: string, commandPath?: string): void {\n if (!value || (typeof value === 'string' && value.trim() === '')) {\n console.error(\n HelpFormatter.formatError(\n `Missing required parameter: ${paramName}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n }\n\n /**\n * Validate file path exists\n */\n static async validateFilePath(\n path: string,\n paramName: string,\n commandPath?: string,\n ): Promise<void> {\n try {\n const fs = await import('fs/promises');\n await fs.access(path);\n } catch (error) {\n console.error(\n HelpFormatter.formatError(\n `File not found for ${paramName}: ${path}`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n }\n\n /**\n * Validate boolean flag\n */\n static validateBoolean(value: string, paramName: string, commandPath?: string): boolean {\n const lowerValue = value.toLowerCase();\n if (lowerValue === 'true' || lowerValue === '1' || lowerValue === 'yes') {\n return true;\n }\n if (lowerValue === 'false' || lowerValue === '0' || lowerValue === 'no') {\n return false;\n }\n\n console.error(\n HelpFormatter.formatError(\n `'${value}' is not a valid boolean for ${paramName}. Use: true, false, yes, no, 1, or 0.`,\n commandPath || 'claude-flow',\n ),\n );\n process.exit(1);\n }\n}\n"],"names":["HelpFormatter","ValidationHelper","validateEnum","value","paramName","validOptions","commandPath","includes","console","error","formatValidationError","process","exit","validateNumber","min","max","num","parseInt","isNaN","formatError","undefined","validateRequired","trim","validateFilePath","path","fs","access","validateBoolean","lowerValue","toLowerCase"],"mappings":"AAKA,SAASA,aAAa,QAAQ,sBAAsB;AAEpD,OAAO,MAAMC;IAIX,OAAOC,aACLC,KAAa,EACbC,SAAiB,EACjBC,YAAsB,EACtBC,WAAmB,EACb;QACN,IAAI,CAACD,aAAaE,QAAQ,CAACJ,QAAQ;YACjCK,QAAQC,KAAK,CACXT,cAAcU,qBAAqB,CAACP,OAAOC,WAAWC,cAAcC;YAEtEK,QAAQC,IAAI,CAAC;QACf;IACF;IAKA,OAAOC,eACLV,KAAa,EACbC,SAAiB,EACjBU,GAAY,EACZC,GAAY,EACZT,WAAoB,EACZ;QACR,MAAMU,MAAMC,SAASd,OAAO;QAE5B,IAAIe,MAAMF,MAAM;YACdR,QAAQC,KAAK,CACX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,OAAOA,eAAe,OAAO;YACvE,OAAO;QACT;QACA,IAAIA,eAAe,WAAWA,eAAe,OAAOA,eAAe,MAAM;YACvE,OAAO;QACT;QAEApB,QAAQC,KAAK,CACXT,cAAcmB,WAAW,CACvB,CAAC,CAAC,EAAEhB,MAAM,6BAA6B,EAAEC,UAAU,qCAAqC,CAAC,EACzFE,eAAe;QAGnBK,QAAQC,IAAI,CAAC;IACf;AACF"}
@@ -12,7 +12,7 @@ try {
12
12
  BUILD_DATE = new Date().toISOString().split('T')[0];
13
13
  } catch (error) {
14
14
  console.warn('Warning: Could not read version from package.json, using fallback');
15
- VERSION = '2.0.0-alpha.101';
15
+ VERSION = '2.0.0-alpha.91';
16
16
  BUILD_DATE = new Date().toISOString().split('T')[0];
17
17
  }
18
18
  export { VERSION, BUILD_DATE };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/version.js"],"sourcesContent":["/**\n * Centralized version management (JavaScript version)\n * Reads version from package.json to ensure consistency\n */\n\nimport { readFileSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\n// Get the directory of this module\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Read version from package.json\nlet VERSION;\nlet BUILD_DATE;\n\ntry {\n // Navigate to project root and read package.json\n const packageJsonPath = join(__dirname, '../../package.json');\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n VERSION = packageJson.version;\n BUILD_DATE = new Date().toISOString().split('T')[0];\n} catch (error) {\n // Fallback version if package.json can't be read\n console.warn('Warning: Could not read version from package.json, using fallback');\n VERSION = '2.0.0-alpha.101';\n BUILD_DATE = new Date().toISOString().split('T')[0];\n}\n\nexport { VERSION, BUILD_DATE };\n\n// Helper function to get formatted version string\nexport function getVersionString(includeV = true) {\n return includeV ? `v${VERSION}` : VERSION;\n}\n\n// Helper function for version display in CLI\nexport function displayVersion() {\n console.log(getVersionString());\n}"],"names":["readFileSync","join","dirname","fileURLToPath","__filename","url","__dirname","VERSION","BUILD_DATE","packageJsonPath","packageJson","JSON","parse","version","Date","toISOString","split","error","console","warn","getVersionString","includeV","displayVersion","log"],"mappings":"AAKA,SAASA,YAAY,QAAQ,KAAK;AAClC,SAASC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,SAASC,aAAa,QAAQ,MAAM;AAGpC,MAAMC,aAAaD,cAAc,YAAYE,GAAG;AAChD,MAAMC,YAAYJ,QAAQE;AAG1B,IAAIG;AACJ,IAAIC;AAEJ,IAAI;IAEF,MAAMC,kBAAkBR,KAAKK,WAAW;IACxC,MAAMI,cAAcC,KAAKC,KAAK,CAACZ,aAAaS,iBAAiB;IAC7DF,UAAUG,YAAYG,OAAO;IAC7BL,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD,EAAE,OAAOC,OAAO;IAEdC,QAAQC,IAAI,CAAC;IACbZ,UAAU;IACVC,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD;AAEA,SAAST,OAAO,EAAEC,UAAU,GAAG;AAG/B,OAAO,SAASY,iBAAiBC,WAAW,IAAI;IAC9C,OAAOA,WAAW,CAAC,CAAC,EAAEd,SAAS,GAAGA;AACpC;AAGA,OAAO,SAASe;IACdJ,QAAQK,GAAG,CAACH;AACd"}H;AACd"}
1
+ {"version":3,"sources":["../../../src/core/version.ts"],"sourcesContent":["/**\n * Centralized version management\n * Reads version from package.json to ensure consistency\n */\n\nimport { readFileSync } from 'fs';\nimport { join, dirname } from 'path';\nimport { fileURLToPath } from 'url';\n\n// Get the directory of this module\nconst __filename = fileURLToPath(import.meta.url);\nconst __dirname = dirname(__filename);\n\n// Read version from package.json\nlet VERSION: string;\nlet BUILD_DATE: string;\n\ntry {\n // Navigate to project root and read package.json\n const packageJsonPath = join(__dirname, '../../package.json');\n const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));\n VERSION = packageJson.version;\n BUILD_DATE = new Date().toISOString().split('T')[0];\n} catch (error) {\n // Fallback version if package.json can't be read\n console.warn('Warning: Could not read version from package.json, using fallback');\n VERSION = '2.0.0-alpha.91';\n BUILD_DATE = new Date().toISOString().split('T')[0];\n}\n\nexport { VERSION, BUILD_DATE };\n\n// Helper function to get formatted version string\nexport function getVersionString(includeV = true): string {\n return includeV ? `v${VERSION}` : VERSION;\n}\n\n// Helper function for version display in CLI\nexport function displayVersion(): void {\n console.log(getVersionString());\n}"],"names":["readFileSync","join","dirname","fileURLToPath","__filename","url","__dirname","VERSION","BUILD_DATE","packageJsonPath","packageJson","JSON","parse","version","Date","toISOString","split","error","console","warn","getVersionString","includeV","displayVersion","log"],"mappings":"AAKA,SAASA,YAAY,QAAQ,KAAK;AAClC,SAASC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,SAASC,aAAa,QAAQ,MAAM;AAGpC,MAAMC,aAAaD,cAAc,YAAYE,GAAG;AAChD,MAAMC,YAAYJ,QAAQE;AAG1B,IAAIG;AACJ,IAAIC;AAEJ,IAAI;IAEF,MAAMC,kBAAkBR,KAAKK,WAAW;IACxC,MAAMI,cAAcC,KAAKC,KAAK,CAACZ,aAAaS,iBAAiB;IAC7DF,UAAUG,YAAYG,OAAO;IAC7BL,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD,EAAE,OAAOC,OAAO;IAEdC,QAAQC,IAAI,CAAC;IACbZ,UAAU;IACVC,aAAa,IAAIM,OAAOC,WAAW,GAAGC,KAAK,CAAC,IAAI,CAAC,EAAE;AACrD;AAEA,SAAST,OAAO,EAAEC,UAAU,GAAG;AAG/B,OAAO,SAASY,iBAAiBC,WAAW,IAAI;IAC9C,OAAOA,WAAW,CAAC,CAAC,EAAEd,SAAS,GAAGA;AACpC;AAGA,OAAO,SAASe;IACdJ,QAAQK,GAAG,CAACH;AACd"}