claude-flow 2.0.0-alpha.82 → 2.0.0-alpha.84

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 (247) hide show
  1. package/.claude/agents/analysis/code-analyzer.md +209 -0
  2. package/.claude/checkpoints/1754066715.json +1 -0
  3. package/.claude/checkpoints/1754066716.json +1 -0
  4. package/.claude/checkpoints/1754066724.json +1 -0
  5. package/.claude/checkpoints/1754066726.json +1 -0
  6. package/.claude/checkpoints/1754066740.json +1 -0
  7. package/.claude/checkpoints/1754066741.json +1 -0
  8. package/.claude/checkpoints/1754066750.json +1 -0
  9. package/.claude/checkpoints/1754066751.json +1 -0
  10. package/.claude/checkpoints/1754066761.json +1 -0
  11. package/.claude/checkpoints/1754066762.json +1 -0
  12. package/.claude/checkpoints/1754066775.json +1 -0
  13. package/.claude/checkpoints/1754066777.json +1 -0
  14. package/.claude/checkpoints/1754066783.json +1 -0
  15. package/.claude/checkpoints/1754066785.json +1 -0
  16. package/.claude/checkpoints/1754066815.json +1 -0
  17. package/.claude/checkpoints/1754066817.json +1 -0
  18. package/.claude/checkpoints/1754066900.json +1 -0
  19. package/.claude/checkpoints/1754066904.json +1 -0
  20. package/.claude/checkpoints/1754066974.json +1 -0
  21. package/.claude/checkpoints/1754066976.json +1 -0
  22. package/.claude/checkpoints/1754070695.json +1 -0
  23. package/.claude/checkpoints/1754070697.json +1 -0
  24. package/.claude/checkpoints/1754070704.json +1 -0
  25. package/.claude/checkpoints/1754070706.json +1 -0
  26. package/.claude/checkpoints/1754070716.json +1 -0
  27. package/.claude/checkpoints/1754070718.json +1 -0
  28. package/.claude/checkpoints/1754070730.json +1 -0
  29. package/.claude/checkpoints/1754070732.json +1 -0
  30. package/.claude/checkpoints/1754070738.json +1 -0
  31. package/.claude/checkpoints/1754070740.json +1 -0
  32. package/.claude/checkpoints/1754074148.json +1 -0
  33. package/.claude/checkpoints/1754074150.json +1 -0
  34. package/.claude/checkpoints/1754074157.json +1 -0
  35. package/.claude/checkpoints/1754074159.json +1 -0
  36. package/.claude/checkpoints/1754074166.json +1 -0
  37. package/.claude/checkpoints/1754074168.json +1 -0
  38. package/.claude/checkpoints/1754074230.json +1 -0
  39. package/.claude/checkpoints/1754074231.json +1 -0
  40. package/.claude/checkpoints/1754223063.json +1 -0
  41. package/.claude/checkpoints/1754223065.json +1 -0
  42. package/.claude/checkpoints/1754223090.json +1 -0
  43. package/.claude/checkpoints/1754223092.json +1 -0
  44. package/.claude/checkpoints/1754223122.json +1 -0
  45. package/.claude/checkpoints/1754223124.json +1 -0
  46. package/.claude/checkpoints/1754223139.json +1 -0
  47. package/.claude/checkpoints/1754223141.json +1 -0
  48. package/.claude/checkpoints/1754223152.json +1 -0
  49. package/.claude/checkpoints/1754223154.json +1 -0
  50. package/.claude/checkpoints/1754223257.json +1 -0
  51. package/.claude/checkpoints/1754223259.json +1 -0
  52. package/.claude/checkpoints/1754223270.json +1 -0
  53. package/.claude/checkpoints/1754223272.json +1 -0
  54. package/.claude/checkpoints/1754223355.json +1 -0
  55. package/.claude/checkpoints/1754223357.json +1 -0
  56. package/.claude/checkpoints/1754223377.json +1 -0
  57. package/.claude/checkpoints/1754223379.json +1 -0
  58. package/.claude/checkpoints/1754223405.json +1 -0
  59. package/.claude/checkpoints/1754223407.json +1 -0
  60. package/.claude/checkpoints/1754223564.json +1 -0
  61. package/.claude/checkpoints/1754223566.json +1 -0
  62. package/.claude/checkpoints/1754223787.json +1 -0
  63. package/.claude/checkpoints/1754223789.json +1 -0
  64. package/.claude/checkpoints/1754223824.json +1 -0
  65. package/.claude/checkpoints/1754223825.json +1 -0
  66. package/.claude/checkpoints/1754224013.json +1 -0
  67. package/.claude/checkpoints/1754224015.json +1 -0
  68. package/.claude/checkpoints/1754224065.json +1 -0
  69. package/.claude/checkpoints/1754224067.json +1 -0
  70. package/.claude/checkpoints/1754224099.json +1 -0
  71. package/.claude/checkpoints/1754224100.json +1 -0
  72. package/.claude/checkpoints/1754224140.json +1 -0
  73. package/.claude/checkpoints/1754224142.json +1 -0
  74. package/.claude/checkpoints/1754224274.json +1 -0
  75. package/.claude/checkpoints/1754224276.json +1 -0
  76. package/.claude/checkpoints/1754224352.json +1 -0
  77. package/.claude/checkpoints/1754224354.json +1 -0
  78. package/.claude/checkpoints/1754224363.json +1 -0
  79. package/.claude/checkpoints/1754224365.json +1 -0
  80. package/.claude/checkpoints/1754224378.json +1 -0
  81. package/.claude/checkpoints/1754224380.json +1 -0
  82. package/.claude/checkpoints/1754224553.json +1 -0
  83. package/.claude/checkpoints/1754224555.json +1 -0
  84. package/.claude/checkpoints/1754224563.json +1 -0
  85. package/.claude/checkpoints/1754224565.json +1 -0
  86. package/.claude/checkpoints/1754224592.json +1 -0
  87. package/.claude/checkpoints/1754224594.json +1 -0
  88. package/.claude/checkpoints/1754224730.json +1 -0
  89. package/.claude/checkpoints/1754224732.json +1 -0
  90. package/.claude/checkpoints/1754224847.json +1 -0
  91. package/.claude/checkpoints/1754224849.json +1 -0
  92. package/.claude/checkpoints/1754224865.json +1 -0
  93. package/.claude/checkpoints/1754224867.json +1 -0
  94. package/.claude/checkpoints/1754224886.json +1 -0
  95. package/.claude/checkpoints/1754224888.json +1 -0
  96. package/.claude/checkpoints/1754224937.json +1 -0
  97. package/.claude/checkpoints/1754224939.json +1 -0
  98. package/.claude/checkpoints/1754225071.json +1 -0
  99. package/.claude/checkpoints/1754225073.json +1 -0
  100. package/.claude/checkpoints/1754225092.json +1 -0
  101. package/.claude/checkpoints/1754225094.json +1 -0
  102. package/.claude/checkpoints/1754225377.json +1 -0
  103. package/.claude/checkpoints/1754225379.json +1 -0
  104. package/.claude/checkpoints/1754225471.json +1 -0
  105. package/.claude/checkpoints/1754225472.json +1 -0
  106. package/.claude/checkpoints/1754225541.json +1 -0
  107. package/.claude/checkpoints/1754225543.json +1 -0
  108. package/.claude/checkpoints/1754225568.json +1 -0
  109. package/.claude/checkpoints/1754225569.json +1 -0
  110. package/.claude/checkpoints/1754225661.json +1 -0
  111. package/.claude/checkpoints/1754225663.json +1 -0
  112. package/.claude/checkpoints/1754225759.json +1 -0
  113. package/.claude/checkpoints/1754225761.json +1 -0
  114. package/.claude/checkpoints/1754225804.json +1 -0
  115. package/.claude/checkpoints/1754225806.json +1 -0
  116. package/.claude/checkpoints/1754225812.json +1 -0
  117. package/.claude/checkpoints/1754225814.json +1 -0
  118. package/.claude/checkpoints/1754226486.json +1 -0
  119. package/.claude/checkpoints/1754226488.json +1 -0
  120. package/.claude/checkpoints/1754226547.json +1 -0
  121. package/.claude/checkpoints/1754226549.json +1 -0
  122. package/.claude/checkpoints/1754226885.json +1 -0
  123. package/.claude/checkpoints/1754226886.json +1 -0
  124. package/.claude/checkpoints/1754227128.json +1 -0
  125. package/.claude/checkpoints/1754227130.json +1 -0
  126. package/.claude/checkpoints/1754227181.json +1 -0
  127. package/.claude/checkpoints/1754227183.json +1 -0
  128. package/.claude/checkpoints/1754227202.json +1 -0
  129. package/.claude/checkpoints/1754227204.json +1 -0
  130. package/.claude/checkpoints/1754227412.json +1 -0
  131. package/.claude/checkpoints/1754227414.json +1 -0
  132. package/.claude/checkpoints/summary-session-20250731-195358.md +137 -0
  133. package/.claude/checkpoints/summary-session-20250731-201542.md +143 -0
  134. package/.claude/checkpoints/summary-session-20250731-201737.md +148 -0
  135. package/.claude/checkpoints/summary-session-20250731-202811.md +135 -0
  136. package/.claude/checkpoints/summary-session-20250731-204824.md +114 -0
  137. package/.claude/checkpoints/summary-session-20250801-165013.md +114 -0
  138. package/.claude/checkpoints/summary-session-20250801-165902.md +118 -0
  139. package/.claude/checkpoints/summary-session-20250801-170008.md +121 -0
  140. package/.claude/checkpoints/summary-session-20250801-170732.md +124 -0
  141. package/.claude/checkpoints/summary-session-20250801-172331.md +127 -0
  142. package/.claude/checkpoints/summary-session-20250801-174746.md +113 -0
  143. package/.claude/checkpoints/summary-session-20250801-175251.md +129 -0
  144. package/.claude/checkpoints/summary-session-20250801-180233.md +130 -0
  145. package/.claude/checkpoints/summary-session-20250801-182959.md +254 -0
  146. package/.claude/checkpoints/summary-session-20250801-183424.md +133 -0
  147. package/.claude/checkpoints/summary-session-20250801-185805.md +152 -0
  148. package/.claude/checkpoints/summary-session-20250801-192641.md +259 -0
  149. package/.claude/checkpoints/summary-session-20250803-122706.md +111 -0
  150. package/.claude/checkpoints/summary-session-20250803-123704.md +172 -0
  151. package/.claude/checkpoints/summary-session-20250803-123910.md +179 -0
  152. package/.claude/checkpoints/summary-session-20250803-124510.md +210 -0
  153. package/.claude/checkpoints/summary-session-20250803-124952.md +217 -0
  154. package/.claude/checkpoints/summary-session-20250803-125126.md +226 -0
  155. package/.claude/checkpoints/summary-session-20250803-125303.md +239 -0
  156. package/.claude/checkpoints/summary-session-20250803-125437.md +248 -0
  157. package/.claude/checkpoints/summary-session-20250803-125615.md +255 -0
  158. package/.claude/checkpoints/summary-session-20250803-125710.md +266 -0
  159. package/.claude/checkpoints/summary-session-20250803-125814.md +270 -0
  160. package/.claude/checkpoints/summary-session-20250803-130618.md +279 -0
  161. package/.claude/checkpoints/summary-session-20250803-130622.md +281 -0
  162. package/.claude/checkpoints/summary-session-20250803-131649.md +270 -0
  163. package/.claude/checkpoints/summary-session-20250803-132205.md +286 -0
  164. package/.claude/checkpoints/task-1753992757.json +7 -0
  165. package/.claude/checkpoints/task-1753992828.json +7 -0
  166. package/.claude/checkpoints/task-1753992996.json +7 -0
  167. package/.claude/checkpoints/task-1753993542.json +7 -0
  168. package/.claude/checkpoints/task-1753994277.json +7 -0
  169. package/.claude/checkpoints/task-1754066681.json +1 -0
  170. package/.claude/checkpoints/task-1754067528.json +1 -0
  171. package/.claude/checkpoints/task-1754067561.json +1 -0
  172. package/.claude/checkpoints/task-1754067770.json +1 -0
  173. package/.claude/checkpoints/task-1754068093.json +1 -0
  174. package/.claude/checkpoints/task-1754070418.json +1 -0
  175. package/.claude/checkpoints/task-1754070494.json +1 -0
  176. package/.claude/checkpoints/task-1754071234.json +1 -0
  177. package/.claude/checkpoints/task-1754072242.json +1 -0
  178. package/.claude/checkpoints/task-1754073057.json +1 -0
  179. package/.claude/checkpoints/task-1754073303.json +1 -0
  180. package/.claude/checkpoints/task-1754074009.json +1 -0
  181. package/.claude/checkpoints/task-1754074048.json +1 -0
  182. package/.claude/checkpoints/task-1754074070.json +1 -0
  183. package/.claude/checkpoints/task-1754074097.json +1 -0
  184. package/.claude/checkpoints/task-1754074145.json +1 -0
  185. package/.claude/checkpoints/task-1754074213.json +1 -0
  186. package/.claude/checkpoints/task-1754076025.json +1 -0
  187. package/.claude/checkpoints/task-1754222974.json +1 -0
  188. package/.claude/checkpoints/task-1754223177.json +1 -0
  189. package/.claude/checkpoints/task-1754223213.json +1 -0
  190. package/.claude/checkpoints/task-1754223296.json +1 -0
  191. package/.claude/checkpoints/task-1754223297.json +1 -0
  192. package/.claude/checkpoints/task-1754223327.json +1 -0
  193. package/.claude/checkpoints/task-1754223467.json +1 -0
  194. package/.claude/checkpoints/task-1754223502.json +1 -0
  195. package/.claude/checkpoints/task-1754223869.json +1 -0
  196. package/.claude/checkpoints/task-1754224042.json +1 -0
  197. package/.claude/checkpoints/task-1754224323.json +1 -0
  198. package/.claude/checkpoints/task-1754224368.json +1 -0
  199. package/.claude/checkpoints/task-1754224383.json +1 -0
  200. package/.claude/checkpoints/task-1754224406.json +1 -0
  201. package/.claude/checkpoints/task-1754224432.json +1 -0
  202. package/.claude/checkpoints/task-1754224451.json +1 -0
  203. package/.claude/checkpoints/task-1754224457.json +1 -0
  204. package/.claude/checkpoints/task-1754224463.json +1 -0
  205. package/.claude/checkpoints/task-1754224535.json +1 -0
  206. package/.claude/checkpoints/task-1754224720.json +1 -0
  207. package/.claude/checkpoints/task-1754224840.json +1 -0
  208. package/.claude/checkpoints/task-1754225063.json +1 -0
  209. package/.claude/checkpoints/task-1754225371.json +1 -0
  210. package/.claude/checkpoints/task-1754225450.json +1 -0
  211. package/.claude/checkpoints/task-1754225463.json +1 -0
  212. package/.claude/checkpoints/task-1754225535.json +1 -0
  213. package/.claude/checkpoints/task-1754225563.json +1 -0
  214. package/.claude/checkpoints/task-1754225641.json +1 -0
  215. package/.claude/checkpoints/task-1754225653.json +1 -0
  216. package/.claude/checkpoints/task-1754225752.json +1 -0
  217. package/.claude/checkpoints/task-1754225797.json +1 -0
  218. package/.claude/checkpoints/task-1754225840.json +1 -0
  219. package/.claude/checkpoints/task-1754226060.json +1 -0
  220. package/.claude/checkpoints/task-1754226366.json +1 -0
  221. package/.claude/checkpoints/task-1754226444.json +1 -0
  222. package/.claude/checkpoints/task-1754227038.json +1 -0
  223. package/.claude/checkpoints/task-1754227293.json +1 -0
  224. package/.claude/checkpoints/task-1754227376.json +1 -0
  225. package/.claude/checkpoints/task-1754227388.json +1 -0
  226. package/.claude/settings-github-npx.json +158 -0
  227. package/.claude/settings-npx-hooks.json +158 -0
  228. package/.claude/settings.json +4 -4
  229. package/CHANGELOG.md +39 -0
  230. package/bin/claude-flow +1 -1
  231. package/bin/claude-flow.js +20 -2
  232. package/package.json +10 -2
  233. package/src/agents/agent-loader.ts +32 -4
  234. package/src/cli/help-text.js +24 -11
  235. package/src/cli/index-remote.ts +1 -1
  236. package/src/cli/index.ts +1 -1
  237. package/src/cli/simple-cli.js +23 -5
  238. package/src/cli/simple-cli.ts +1 -1
  239. package/src/cli/simple-commands/hive-mind.js +76 -33
  240. package/src/cli/simple-commands/init/templates/CLAUDE.md +19 -19
  241. package/src/cli/simple-commands/process-ui-enhanced.js +1 -1
  242. package/src/cli/simple-commands/status.js +1 -1
  243. package/src/cli/simple-commands/swarm.js +114 -30
  244. package/src/constants/agent-types.ts +9 -15
  245. package/src/mcp/mcp-server.js +33 -7
  246. package/.claude/checkpoints/1753906298.json +0 -12
  247. package/bin/claude-flow-node-pkg +0 -0
@@ -4,7 +4,7 @@
4
4
  * This version can be run directly from GitHub
5
5
  */
6
6
 
7
- const VERSION = '2.0.0-alpha.81';
7
+ const VERSION = '2.0.0-alpha.83';
8
8
 
9
9
  // Simple color functions
10
10
  const chalk = {
package/src/cli/index.ts CHANGED
@@ -27,7 +27,7 @@ import { startREPL } from './repl.js';
27
27
  import { CompletionGenerator } from './completion.js';
28
28
 
29
29
  // Version information
30
- const VERSION = '2.0.0-alpha.81';
30
+ const VERSION = '2.0.0-alpha.83';
31
31
  const BUILD_DATE = new Date().toISOString().split('T')[0];
32
32
 
33
33
  // Main CLI command
@@ -27,7 +27,23 @@ import process from 'process';
27
27
  import readline from 'readline';
28
28
  import { getMainHelp, getCommandHelp, getStandardizedCommandHelp } from './help-text.js';
29
29
 
30
- const VERSION = '2.0.0-alpha.81';
30
+ const VERSION = '2.0.0-alpha.83';
31
+
32
+ // Legacy agent type mapping for backward compatibility
33
+ const LEGACY_AGENT_MAPPING = {
34
+ analyst: 'code-analyzer',
35
+ coordinator: 'task-orchestrator',
36
+ optimizer: 'perf-analyzer',
37
+ documenter: 'api-docs',
38
+ monitor: 'performance-benchmarker',
39
+ specialist: 'system-architect',
40
+ architect: 'system-architect',
41
+ };
42
+
43
+ // Resolve legacy agent types to current equivalents
44
+ function resolveLegacyAgentType(legacyType) {
45
+ return LEGACY_AGENT_MAPPING[legacyType] || legacyType;
46
+ }
31
47
 
32
48
  function printHelp(plain = false) {
33
49
  console.log(getMainHelp(plain));
@@ -51,7 +67,7 @@ function printLegacyHelp() {
51
67
  🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
52
68
 
53
69
  šŸŽÆ ENTERPRISE FEATURES: Complete ruv-swarm integration with 90+ MCP tools, neural networking, and production-ready infrastructure
54
- ⚔ ALPHA 81: Optimized for Claude Code 1.0.51+ with enhanced batch processing and concurrent execution
70
+ ⚔ ALPHA 83: Enhanced GitHub hooks with npx commands, improved checkpoint reliability, seamless CI/CD integration
55
71
 
56
72
  USAGE:
57
73
  claude-flow <command> [options]
@@ -331,12 +347,13 @@ async function main() {
331
347
 
332
348
  case 'spawn':
333
349
  // Convenience alias for agent spawn
334
- const spawnType = subArgs[0] || 'general';
350
+ const rawSpawnType = subArgs[0] || 'general';
351
+ const spawnType = resolveLegacyAgentType(rawSpawnType);
335
352
  const spawnName = flags.name || `agent-${Date.now()}`;
336
353
 
337
354
  printSuccess(`Spawning ${spawnType} agent: ${spawnName}`);
338
355
  console.log('šŸ¤– Agent would be created with the following configuration:');
339
- console.log(` Type: ${spawnType}`);
356
+ console.log(` Type: ${spawnType}${rawSpawnType !== spawnType ? ` (resolved from: ${rawSpawnType})` : ''}`);
340
357
  console.log(` Name: ${spawnName}`);
341
358
  console.log(' Capabilities: Research, Analysis, Code Generation');
342
359
  console.log(' Status: Ready');
@@ -2349,7 +2366,8 @@ Shortcuts:
2349
2366
  const subCmd = args[0];
2350
2367
  switch (subCmd) {
2351
2368
  case 'spawn':
2352
- const type = args[1] || 'researcher';
2369
+ const rawType = args[1] || 'researcher';
2370
+ const type = resolveLegacyAgentType(rawType);
2353
2371
  const name = args[2] || `agent-${Date.now()}`;
2354
2372
  const agent = {
2355
2373
  id: `agent-${Date.now()}`,
@@ -14,7 +14,7 @@ import {
14
14
  } from './command-registry.js';
15
15
  import { parseFlags } from './utils.js';
16
16
 
17
- const VERSION = '2.0.0-alpha.81';
17
+ const VERSION = '2.0.0-alpha.83';
18
18
 
19
19
  function printHelp() {
20
20
  console.log(`
@@ -1540,19 +1540,23 @@ async function listMemories() {
1540
1540
  try {
1541
1541
  console.log(chalk.blue('\nšŸ“‹ Collective Memory Store\n'));
1542
1542
 
1543
- // Use MCP wrapper to search for all memories (empty pattern matches all)
1544
- const mcpWrapper = await getMcpWrapper();
1545
- const searchResult = await mcpWrapper.searchMemory('hive-mind', '');
1543
+ // Read directly from hive.db collective_memory table
1544
+ const dbPath = path.join(cwd(), '.hive-mind', 'hive.db');
1545
+ const db = new Database(dbPath);
1546
1546
 
1547
- // Handle different possible response structures
1548
- let memories = [];
1549
- if (searchResult && Array.isArray(searchResult.results)) {
1550
- memories = searchResult.results;
1551
- } else if (searchResult && Array.isArray(searchResult)) {
1552
- memories = searchResult;
1553
- } else if (searchResult && searchResult.data && Array.isArray(searchResult.data)) {
1554
- memories = searchResult.data;
1555
- }
1547
+ const memories = db
1548
+ .prepare(
1549
+ `
1550
+ SELECT cm.*, s.name as swarm_name
1551
+ FROM collective_memory cm
1552
+ LEFT JOIN swarms s ON cm.swarm_id = s.id
1553
+ ORDER BY cm.created_at DESC
1554
+ LIMIT 50
1555
+ `,
1556
+ )
1557
+ .all();
1558
+
1559
+ db.close();
1556
1560
 
1557
1561
  if (!memories || memories.length === 0) {
1558
1562
  console.log(chalk.yellow('No memories found in the collective store.'));
@@ -1562,15 +1566,34 @@ async function listMemories() {
1562
1566
  return;
1563
1567
  }
1564
1568
 
1569
+ console.log(chalk.gray(`Found ${memories.length} memories in the collective store:\n`));
1570
+
1565
1571
  memories.forEach((memory, index) => {
1566
- console.log(chalk.cyan(`${index + 1}. ${memory.key || `memory-${index}`}`));
1567
- console.log(` Category: ${memory.type || 'general'}`);
1568
- console.log(` Created: ${new Date(memory.timestamp || Date.now()).toLocaleString()}`);
1569
- if (memory.value && typeof memory.value === 'object') {
1570
- console.log(` Preview: ${JSON.stringify(memory.value).substring(0, 100)}...`);
1572
+ console.log(chalk.cyan(`${index + 1}. ${memory.key}`));
1573
+ console.log(` Swarm: ${memory.swarm_name || memory.swarm_id}`);
1574
+ console.log(` Type: ${memory.type || 'knowledge'}`);
1575
+ console.log(` Created: ${new Date(memory.created_at).toLocaleString()}`);
1576
+ console.log(` Created by: ${memory.created_by || 'system'}`);
1577
+
1578
+ // Parse and display value
1579
+ let displayValue = memory.value;
1580
+ try {
1581
+ const parsed = JSON.parse(memory.value);
1582
+ displayValue = JSON.stringify(parsed);
1583
+ } catch {
1584
+ // Keep as string
1585
+ }
1586
+
1587
+ if (displayValue.length > 100) {
1588
+ console.log(` Value: ${displayValue.substring(0, 100)}...`);
1571
1589
  } else {
1572
- console.log(` Value: ${String(memory.value || memory).substring(0, 100)}...`);
1590
+ console.log(` Value: ${displayValue}`);
1573
1591
  }
1592
+
1593
+ if (memory.confidence !== null && memory.confidence !== 1) {
1594
+ console.log(` Confidence: ${(memory.confidence * 100).toFixed(1)}%`);
1595
+ }
1596
+
1574
1597
  console.log('');
1575
1598
  });
1576
1599
  } catch (error) {
@@ -1595,29 +1618,49 @@ async function searchMemories() {
1595
1618
 
1596
1619
  console.log(chalk.blue(`\nšŸ” Searching for: "${searchTerm}"\n`));
1597
1620
 
1598
- const mcpWrapper = await getMcpWrapper();
1599
- const searchResult = await mcpWrapper.searchMemory('hive-mind', searchTerm);
1621
+ // Search directly in hive.db collective_memory table
1622
+ const dbPath = path.join(cwd(), '.hive-mind', 'hive.db');
1623
+ const db = new Database(dbPath);
1600
1624
 
1601
- // Handle different possible response structures
1602
- let memories = [];
1603
- if (searchResult && Array.isArray(searchResult.results)) {
1604
- memories = searchResult.results;
1605
- } else if (searchResult && Array.isArray(searchResult)) {
1606
- memories = searchResult;
1607
- } else if (searchResult && searchResult.data && Array.isArray(searchResult.data)) {
1608
- memories = searchResult.data;
1609
- }
1625
+ const searchPattern = `%${searchTerm}%`;
1626
+ const memories = db
1627
+ .prepare(
1628
+ `
1629
+ SELECT cm.*, s.name as swarm_name
1630
+ FROM collective_memory cm
1631
+ LEFT JOIN swarms s ON cm.swarm_id = s.id
1632
+ WHERE cm.key LIKE ? OR cm.value LIKE ? OR cm.type LIKE ?
1633
+ ORDER BY cm.created_at DESC
1634
+ LIMIT 50
1635
+ `,
1636
+ )
1637
+ .all(searchPattern, searchPattern, searchPattern);
1638
+
1639
+ db.close();
1610
1640
 
1611
1641
  if (!memories || memories.length === 0) {
1612
1642
  console.log(chalk.yellow('No memories found matching your search.'));
1613
1643
  return;
1614
1644
  }
1615
1645
 
1646
+ console.log(chalk.gray(`Found ${memories.length} memories matching "${searchTerm}":\n`));
1647
+
1616
1648
  memories.forEach((memory, index) => {
1617
- console.log(chalk.green(`${index + 1}. ${memory.key || `result-${index}`}`));
1618
- console.log(` Category: ${memory.type || 'general'}`);
1619
- console.log(` Created: ${new Date(memory.timestamp || Date.now()).toLocaleString()}`);
1620
- console.log(` Value: ${JSON.stringify(memory.value || memory, null, 2)}`);
1649
+ console.log(chalk.green(`${index + 1}. ${memory.key}`));
1650
+ console.log(` Swarm: ${memory.swarm_name || memory.swarm_id}`);
1651
+ console.log(` Type: ${memory.type || 'knowledge'}`);
1652
+ console.log(` Created: ${new Date(memory.created_at).toLocaleString()}`);
1653
+
1654
+ // Parse and display value with highlighting
1655
+ let displayValue = memory.value;
1656
+ try {
1657
+ const parsed = JSON.parse(memory.value);
1658
+ displayValue = JSON.stringify(parsed, null, 2);
1659
+ } catch {
1660
+ // Keep as string
1661
+ }
1662
+
1663
+ console.log(` Value: ${displayValue}`);
1621
1664
  console.log('');
1622
1665
  });
1623
1666
  } catch (error) {
@@ -458,14 +458,14 @@ If you need to do X operations, they should be in 1 message, not X messages
458
458
  mcp__claude-flow__swarm_init { topology: "mesh", maxAgents: 6 }
459
459
  mcp__claude-flow__agent_spawn { type: "researcher" }
460
460
  mcp__claude-flow__agent_spawn { type: "coder" }
461
- mcp__claude-flow__agent_spawn { type: "analyst" }
461
+ mcp__claude-flow__agent_spawn { type: "code-analyzer" }
462
462
  mcp__claude-flow__agent_spawn { type: "tester" }
463
- mcp__claude-flow__agent_spawn { type: "coordinator" }
463
+ mcp__claude-flow__agent_spawn { type: "task-orchestrator" }
464
464
 
465
465
  // Claude Code execution - ALL in parallel
466
466
  Task("You are researcher agent. MUST coordinate via hooks...")
467
467
  Task("You are coder agent. MUST coordinate via hooks...")
468
- Task("You are analyst agent. MUST coordinate via hooks...")
468
+ Task("You are code-analyzer agent. MUST coordinate via hooks...")
469
469
  Task("You are tester agent. MUST coordinate via hooks...")
470
470
  TodoWrite { todos: [5-10 todos with all priorities and statuses] }
471
471
 
@@ -601,7 +601,7 @@ Once configured, Claude Flow MCP tools enhance Claude Code's coordination:
601
601
  - Tool: `mcp__claude-flow__agent_spawn`
602
602
  - Parameters: `{"type": "researcher", "name": "Literature Review"}`
603
603
  - Tool: `mcp__claude-flow__agent_spawn`
604
- - Parameters: `{"type": "analyst", "name": "Data Analysis"}`
604
+ - Parameters: `{"type": "code-analyzer", "name": "Data Analysis"}`
605
605
  - Result: Different cognitive patterns for Claude Code to use
606
606
 
607
607
  **Step 3:** Coordinate research execution
@@ -634,7 +634,7 @@ Once configured, Claude Flow MCP tools enhance Claude Code's coordination:
634
634
  **Step 2:** Define development perspectives
635
635
 
636
636
  - Tool: `mcp__claude-flow__agent_spawn`
637
- - Parameters: `{"type": "architect", "name": "System Design"}`
637
+ - Parameters: `{"type": "system-architect", "name": "System Design"}`
638
638
  - Result: Architectural thinking pattern for Claude Code
639
639
 
640
640
  **Step 3:** Coordinate implementation
@@ -802,9 +802,9 @@ See `.claude/commands/` for detailed documentation on all features.
802
802
  - Medium tasks (4-6 components): 5-7 agents
803
803
  - Complex tasks (7+ components): 8-12 agents
804
804
  3. **Agent Type Distribution**: Balance agent types based on task:
805
- - Always include 1 coordinator
805
+ - Always include 1 task-orchestrator
806
806
  - For code-heavy tasks: more coders
807
- - For design tasks: more architects/analysts
807
+ - For design tasks: more system-architects/code-analyzers
808
808
  - For quality tasks: more testers/reviewers
809
809
 
810
810
  **Example Auto-Decision Logic:**
@@ -896,15 +896,15 @@ Message 1: [BatchTool]
896
896
  - mcp__claude-flow__swarm_init
897
897
  - mcp__claude-flow__agent_spawn (researcher)
898
898
  - mcp__claude-flow__agent_spawn (coder)
899
- - mcp__claude-flow__agent_spawn (analyst)
899
+ - mcp__claude-flow__agent_spawn (code-analyzer)
900
900
  - mcp__claude-flow__agent_spawn (tester)
901
- - mcp__claude-flow__agent_spawn (coordinator)
901
+ - mcp__claude-flow__agent_spawn (task-orchestrator)
902
902
 
903
903
  Message 2: [BatchTool - Claude Code execution]
904
904
  // Task agents with full coordination instructions
905
905
  - Task("You are researcher agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Research API patterns")
906
906
  - Task("You are coder agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Implement REST endpoints")
907
- - Task("You are analyst agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Analyze performance")
907
+ - Task("You are code-analyzer agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Analyze performance")
908
908
  - Task("You are tester agent. MANDATORY: Run hooks pre-task, post-edit, post-task. Task: Write comprehensive tests")
909
909
 
910
910
  // TodoWrite with ALL todos batched
@@ -940,13 +940,13 @@ STEP 1: IMMEDIATE PARALLEL SPAWN (Single Message!)
940
940
 
941
941
  // Spawn agents based on maxAgents count and task requirements
942
942
  // If CLI specifies 3 agents, spawn 3. If no args, auto-decide optimal count (3-12)
943
- - mcp__claude-flow__agent_spawn { type: "architect", name: "System Designer" }
943
+ - mcp__claude-flow__agent_spawn { type: "system-architect", name: "System Designer" }
944
944
  - mcp__claude-flow__agent_spawn { type: "coder", name: "API Developer" }
945
945
  - mcp__claude-flow__agent_spawn { type: "coder", name: "Frontend Dev" }
946
- - mcp__claude-flow__agent_spawn { type: "analyst", name: "DB Designer" }
946
+ - mcp__claude-flow__agent_spawn { type: "code-analyzer", name: "DB Designer" }
947
947
  - mcp__claude-flow__agent_spawn { type: "tester", name: "QA Engineer" }
948
948
  - mcp__claude-flow__agent_spawn { type: "researcher", name: "Tech Lead" }
949
- - mcp__claude-flow__agent_spawn { type: "coordinator", name: "PM" }
949
+ - mcp__claude-flow__agent_spawn { type: "task-orchestrator", name: "PM" }
950
950
  - TodoWrite { todos: [multiple todos at once] }
951
951
 
952
952
  STEP 2: PARALLEL TASK EXECUTION (Single Message!)
@@ -998,12 +998,12 @@ Dependencies: ↳ X deps | Actionable: ā–¶
998
998
  [BatchTool - Message 1]:
999
999
  // Initialize and spawn ALL agents at once
1000
1000
  mcp__claude-flow__swarm_init { topology: "hierarchical", maxAgents: 8, strategy: "parallel" }
1001
- mcp__claude-flow__agent_spawn { type: "architect", name: "System Designer" }
1001
+ mcp__claude-flow__agent_spawn { type: "system-architect", name: "System Designer" }
1002
1002
  mcp__claude-flow__agent_spawn { type: "coder", name: "API Developer" }
1003
1003
  mcp__claude-flow__agent_spawn { type: "coder", name: "Auth Expert" }
1004
- mcp__claude-flow__agent_spawn { type: "analyst", name: "DB Designer" }
1004
+ mcp__claude-flow__agent_spawn { type: "code-analyzer", name: "DB Designer" }
1005
1005
  mcp__claude-flow__agent_spawn { type: "tester", name: "Test Engineer" }
1006
- mcp__claude-flow__agent_spawn { type: "coordinator", name: "Lead" }
1006
+ mcp__claude-flow__agent_spawn { type: "task-orchestrator", name: "Lead" }
1007
1007
 
1008
1008
  // Update ALL todos at once - NEVER split todos!
1009
1009
  TodoWrite { todos: [
@@ -1109,12 +1109,12 @@ When showing swarm status, use this format:
1109
1109
  └── 🧠 Memory: 15 coordination points stored
1110
1110
 
1111
1111
  Agent Activity:
1112
- ā”œā”€ā”€ 🟢 architect: Designing database schema...
1112
+ ā”œā”€ā”€ 🟢 system-architect: Designing database schema...
1113
1113
  ā”œā”€ā”€ 🟢 coder-1: Implementing auth endpoints...
1114
1114
  ā”œā”€ā”€ 🟢 coder-2: Building user CRUD operations...
1115
- ā”œā”€ā”€ 🟢 analyst: Optimizing query performance...
1115
+ ā”œā”€ā”€ 🟢 code-analyzer: Optimizing query performance...
1116
1116
  ā”œā”€ā”€ 🟔 tester: Waiting for auth completion...
1117
- └── 🟢 coordinator: Monitoring progress...
1117
+ └── 🟢 task-orchestrator: Monitoring progress...
1118
1118
  ```
1119
1119
 
1120
1120
  ## šŸ“ CRITICAL: TODOWRITE AND TASK TOOL BATCHING
@@ -1,4 +1,4 @@
1
- // process-ui-enhanced.js - Enhanced process management UI with multiple views - v2.0.0-alpha.81
1
+ // process-ui-enhanced.js - Enhanced process management UI with multiple views - v2.0.0-alpha.83
2
2
  import { printSuccess, printError, printWarning, printInfo } from '../utils.js';
3
3
  import { compat } from '../runtime-detector.js';
4
4
  import SwarmWebUIIntegration from './swarm-webui-integration.js';
@@ -19,7 +19,7 @@ export async function statusCommand(subArgs, flags) {
19
19
  async function getSystemStatus(verbose = false) {
20
20
  const status = {
21
21
  timestamp: Date.now(),
22
- version: '2.0.0-alpha.81',
22
+ version: '2.0.0-alpha.83',
23
23
  orchestrator: {
24
24
  running: false,
25
25
  uptime: 0,
@@ -156,14 +156,17 @@ EXAMPLES:
156
156
  claude-flow swarm "Develop user registration feature" --mode distributed
157
157
  claude-flow swarm "Optimize React app performance" --strategy optimization
158
158
  claude-flow swarm "Create microservice" --executor # Use built-in executor
159
+ claude-flow swarm "Build API" --claude # Open Claude Code CLI
159
160
  claude-flow swarm "Build API endpoints" --output-format json # Get JSON output
160
161
  claude-flow swarm "Research AI trends" --output-format json --output-file results.json
161
162
 
162
163
  DEFAULT BEHAVIOR:
163
- Swarm now opens Claude Code by default with comprehensive MCP tool instructions
164
+ Swarm attempts to open Claude Code CLI with comprehensive MCP tool instructions
164
165
  including memory coordination, agent management, and task orchestration.
165
166
 
166
- Use --executor flag to run with the built-in executor instead of Claude Code
167
+ If Claude CLI is not available:
168
+ • Use --claude flag to open Claude Code CLI
169
+ • Use --executor flag to run with the built-in executor
167
170
 
168
171
  STRATEGIES:
169
172
  auto Automatically determine best approach (default)
@@ -210,6 +213,7 @@ OPTIONS:
210
213
  --verbose Enable detailed logging
211
214
  --dry-run Show configuration without executing
212
215
  --executor Use built-in executor instead of Claude Code
216
+ --claude Open Claude Code CLI
213
217
  --output-format <format> Output format: json, text (default: text)
214
218
  --output-file <path> Save output to file instead of stdout
215
219
  --no-interactive Run in non-interactive mode (auto-enabled with --output-format json)
@@ -352,33 +356,7 @@ export async function swarmCommand(args, flags) {
352
356
  try {
353
357
  const { execSync, spawn } = await import('child_process');
354
358
 
355
- // Check if claude command exists
356
- let claudeAvailable = false;
357
- try {
358
- execSync('which claude', { stdio: 'ignore' });
359
- claudeAvailable = true;
360
- } catch {
361
- console.log('āš ļø Claude Code CLI not found in PATH');
362
- console.log('Install it with: npm install -g @anthropic-ai/claude-code');
363
- console.log('\nWould spawn Claude Code with swarm objective:');
364
- console.log(`šŸ“‹ Objective: ${objective}`);
365
- console.log(
366
- '\nTo use the built-in executor instead: claude-flow swarm "objective" --executor',
367
- );
368
- return;
369
- }
370
-
371
- // Claude is available, use it to run swarm
372
- console.log('šŸ Launching Claude Flow Swarm System...');
373
- console.log(`šŸ“‹ Objective: ${objective}`);
374
- console.log(`šŸŽÆ Strategy: ${flags.strategy || 'auto'}`);
375
- console.log(`šŸ—ļø Mode: ${flags.mode || 'centralized'}`);
376
- console.log(`šŸ¤– Max Agents: ${flags['max-agents'] || 5}`);
377
- if (isAnalysisMode) {
378
- console.log(`šŸ” Analysis Mode: ENABLED (Read-Only - No Code Changes)`);
379
- }
380
- console.log();
381
-
359
+ // Get configuration values first
382
360
  const strategy = flags.strategy || 'auto';
383
361
  const mode = flags.mode || 'centralized';
384
362
  const maxAgents = flags['max-agents'] || 5;
@@ -391,6 +369,7 @@ export async function swarmCommand(args, flags) {
391
369
  const enableSparc =
392
370
  flags.sparc !== false && (strategy === 'development' || strategy === 'auto');
393
371
 
372
+ // Build the complete swarm prompt before checking for claude
394
373
  const swarmPrompt = `You are orchestrating a Claude Flow Swarm with advanced MCP tool coordination.
395
374
 
396
375
  šŸŽÆ OBJECTIVE: ${objective}
@@ -787,6 +766,109 @@ Start by spawning a coordinator agent and creating the initial task structure. U
787
766
 
788
767
  The swarm should be self-documenting - use memory_store to save all important information, decisions, and results throughout the execution.`;
789
768
 
769
+ // If --claude flag is used, force Claude Code even if CLI not available
770
+ if (flags && flags.claude) {
771
+ console.log('šŸ Launching Claude Flow Swarm System...');
772
+ console.log(`šŸ“‹ Objective: ${objective}`);
773
+ console.log(`šŸŽÆ Strategy: ${strategy}`);
774
+ console.log(`šŸ—ļø Mode: ${mode}`);
775
+ console.log(`šŸ¤– Max Agents: ${maxAgents}\n`);
776
+
777
+ console.log('šŸš€ Launching Claude Code with Swarm Coordination');
778
+ console.log('─'.repeat(60));
779
+
780
+ // Pass the prompt directly as an argument to claude
781
+ const claudeArgs = [swarmPrompt];
782
+
783
+ // Add auto-permission flag by default for swarm mode (unless explicitly disabled)
784
+ if (flags['dangerously-skip-permissions'] !== false && !flags['no-auto-permissions']) {
785
+ claudeArgs.push('--dangerously-skip-permissions');
786
+ console.log('šŸ”“ Using --dangerously-skip-permissions by default for seamless swarm execution');
787
+ }
788
+
789
+ // Spawn claude with the prompt as the first argument (exactly like hive-mind does)
790
+ const claudeProcess = spawn('claude', claudeArgs, {
791
+ stdio: 'inherit',
792
+ shell: false,
793
+ });
794
+
795
+ console.log('\nāœ“ Claude Code launched with swarm coordination prompt!');
796
+ console.log(' The swarm coordinator will orchestrate all agent tasks');
797
+ console.log(' Use MCP tools for coordination and memory sharing');
798
+
799
+ console.log('\nšŸ’” Pro Tips:');
800
+ console.log('─'.repeat(30));
801
+ console.log('• Use TodoWrite to track parallel tasks');
802
+ console.log('• Store results with mcp__claude-flow__memory_usage');
803
+ console.log('• Monitor progress with mcp__claude-flow__swarm_monitor');
804
+ console.log('• Check task status with mcp__claude-flow__task_status');
805
+
806
+ // Set up clean termination
807
+ const cleanup = () => {
808
+ console.log('\nšŸ›‘ Shutting down swarm gracefully...');
809
+ if (claudeProcess && !claudeProcess.killed) {
810
+ claudeProcess.kill('SIGTERM');
811
+ }
812
+ process.exit(0);
813
+ };
814
+
815
+ process.on('SIGINT', cleanup);
816
+ process.on('SIGTERM', cleanup);
817
+
818
+ // Wait for claude to exit
819
+ claudeProcess.on('exit', (code) => {
820
+ if (code === 0) {
821
+ console.log('\nāœ“ Swarm execution completed successfully');
822
+ } else if (code !== null) {
823
+ console.log(`\nāœ— Swarm execution exited with code ${code}`);
824
+ }
825
+ process.exit(code || 0);
826
+ });
827
+
828
+ // Handle spawn errors (e.g., claude not found)
829
+ claudeProcess.on('error', (err) => {
830
+ if (err.code === 'ENOENT') {
831
+ console.error('\nāŒ Claude Code CLI not found. Please install Claude Code:');
832
+ console.error(' https://claude.ai/download');
833
+ } else {
834
+ console.error('\nāŒ Failed to launch Claude Code:', err.message);
835
+ }
836
+ process.exit(1);
837
+ });
838
+
839
+ return;
840
+ }
841
+
842
+ // Check if claude command exists
843
+ let claudeAvailable = false;
844
+ try {
845
+ execSync('which claude', { stdio: 'ignore' });
846
+ claudeAvailable = true;
847
+ } catch {
848
+ console.log('āš ļø Claude Code CLI not found in PATH');
849
+ console.log('Install it with: npm install -g @anthropic-ai/claude-code');
850
+ console.log('Or use --claude flag to open Claude Code CLI');
851
+ console.log('\nWould spawn Claude Code with swarm objective:');
852
+ console.log(`šŸ“‹ Objective: ${objective}`);
853
+ console.log('\nOptions:');
854
+ console.log(' • Use --executor flag for built-in executor: claude-flow swarm "objective" --executor');
855
+ console.log(' • Use --claude flag to open Claude Code CLI: claude-flow swarm "objective" --claude');
856
+ return;
857
+ }
858
+
859
+ // Claude is available, use it to run swarm
860
+ console.log('šŸ Launching Claude Flow Swarm System...');
861
+ console.log(`šŸ“‹ Objective: ${objective}`);
862
+ console.log(`šŸŽÆ Strategy: ${flags.strategy || 'auto'}`);
863
+ console.log(`šŸ—ļø Mode: ${flags.mode || 'centralized'}`);
864
+ console.log(`šŸ¤– Max Agents: ${flags['max-agents'] || 5}`);
865
+ if (isAnalysisMode) {
866
+ console.log(`šŸ” Analysis Mode: ENABLED (Read-Only - No Code Changes)`);
867
+ }
868
+ console.log();
869
+
870
+ // Continue with the default swarm behavior if not using --claude flag
871
+
790
872
  // Pass the prompt directly as an argument to claude
791
873
  const claudeArgs = [swarmPrompt];
792
874
 
@@ -812,8 +894,9 @@ The swarm should be self-documenting - use memory_store to save all important in
812
894
  claudeArgs.push('--output-format', 'stream-json'); // JSON streaming
813
895
  claudeArgs.push('--verbose'); // Verbose output
814
896
 
815
- console.log('šŸ¤– Running in non-interactive mode with Claude');
897
+ console.log('šŸ¤– Running in non-interactive mode with Claude CLI');
816
898
  console.log('šŸ“‹ Command: claude [prompt] -p --output-format stream-json --verbose');
899
+ console.log('šŸ’” Tip: Use --claude flag to open Claude Code CLI instead');
817
900
  }
818
901
 
819
902
  // Spawn claude with the prompt as the first argument
@@ -1400,6 +1483,7 @@ OPTIONS:
1400
1483
  --verbose Enable detailed logging
1401
1484
  --dry-run Show configuration without executing
1402
1485
  --executor Use built-in executor instead of Claude Code
1486
+ --claude Open Claude Code CLI
1403
1487
  --output-format <format> Output format: json, text (default: text)
1404
1488
  --output-file <path> Save output to file instead of stdout
1405
1489
  --no-interactive Run in non-interactive mode (auto-enabled with --output-format json)
@@ -3,21 +3,18 @@
3
3
  * This file provides type-safe access to dynamically loaded agent definitions
4
4
  */
5
5
 
6
- import { getAvailableAgentTypes, isValidAgentType as validateAgentType } from '../agents/agent-loader.js';
6
+ import {
7
+ getAvailableAgentTypes,
8
+ isValidAgentType as validateAgentType,
9
+ resolveLegacyAgentType as resolveLegacy,
10
+ LEGACY_AGENT_MAPPING as LEGACY_MAPPING
11
+ } from '../agents/agent-loader.js';
7
12
 
8
13
  // Dynamic agent type - will be a string that matches available agents
9
14
  export type AgentType = string;
10
15
 
11
- // Legacy agent type mapping for backward compatibility
12
- export const LEGACY_AGENT_MAPPING = {
13
- analyst: 'code-analyzer',
14
- coordinator: 'task-orchestrator',
15
- optimizer: 'perf-analyzer',
16
- documenter: 'api-docs',
17
- monitor: 'performance-benchmarker',
18
- specialist: 'system-architect',
19
- architect: 'system-architect',
20
- } as const;
16
+ // Re-export legacy mapping from agent-loader
17
+ export const LEGACY_AGENT_MAPPING = LEGACY_MAPPING;
21
18
 
22
19
  /**
23
20
  * Get all valid agent types dynamically
@@ -36,10 +33,7 @@ export async function isValidAgentType(type: string): Promise<boolean> {
36
33
  /**
37
34
  * Resolve legacy agent types to current equivalents
38
35
  */
39
- export function resolveLegacyAgentType(legacyType: string): string {
40
- const mapped = LEGACY_AGENT_MAPPING[legacyType as keyof typeof LEGACY_AGENT_MAPPING];
41
- return mapped || legacyType;
42
- }
36
+ export const resolveLegacyAgentType = resolveLegacy;
43
37
 
44
38
  /**
45
39
  * Create JSON Schema for agent type validation (async)