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
@@ -0,0 +1,158 @@
1
+ {
2
+ "env": {
3
+ "CLAUDE_FLOW_AUTO_COMMIT": "false",
4
+ "CLAUDE_FLOW_AUTO_PUSH": "false",
5
+ "CLAUDE_FLOW_HOOKS_ENABLED": "true",
6
+ "CLAUDE_FLOW_TELEMETRY_ENABLED": "true",
7
+ "CLAUDE_FLOW_REMOTE_EXECUTION": "true",
8
+ "CLAUDE_FLOW_GITHUB_INTEGRATION": "true",
9
+ "CLAUDE_FLOW_CHECKPOINTS_ENABLED": "true",
10
+ "CREATE_GH_RELEASE": "true"
11
+ },
12
+ "permissions": {
13
+ "allow": [
14
+ "Bash(npx claude-flow *)",
15
+ "Bash(npm run lint)",
16
+ "Bash(npm run test:*)",
17
+ "Bash(npm test *)",
18
+ "Bash(git status)",
19
+ "Bash(git diff *)",
20
+ "Bash(git log *)",
21
+ "Bash(git add *)",
22
+ "Bash(git commit *)",
23
+ "Bash(git push)",
24
+ "Bash(git config *)",
25
+ "Bash(git tag *)",
26
+ "Bash(git branch *)",
27
+ "Bash(git checkout *)",
28
+ "Bash(git stash *)",
29
+ "Bash(git reset *)",
30
+ "Bash(git rev-parse *)",
31
+ "Bash(git ls-files *)",
32
+ "Bash(gh *)",
33
+ "Bash(node *)",
34
+ "Bash(which *)",
35
+ "Bash(pwd)",
36
+ "Bash(ls *)",
37
+ "Bash(jq *)",
38
+ "Bash(test *)",
39
+ "Bash(find *)",
40
+ "Bash(grep *)",
41
+ "Bash(sed *)",
42
+ "Bash(awk *)",
43
+ "Bash(curl *)",
44
+ "Bash(mkdir *)",
45
+ "Bash(cd *)",
46
+ "Bash(cat *)",
47
+ "Bash(echo *)",
48
+ "Bash(npx claude-flow@alpha *)",
49
+ "Bash(./claude-flow *)",
50
+ "Bash(./.claude/helpers/*)"
51
+ ],
52
+ "deny": [
53
+ "Bash(rm -rf /)",
54
+ "Bash(curl * | bash)",
55
+ "Bash(wget * | sh)",
56
+ "Bash(eval *)"
57
+ ]
58
+ },
59
+ "hooks": {
60
+ "PreToolUse": [
61
+ {
62
+ "matcher": "Bash",
63
+ "hooks": [
64
+ {
65
+ "type": "command",
66
+ "command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true"
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "matcher": "Write|Edit|MultiEdit",
72
+ "hooks": [
73
+ {
74
+ "type": "command",
75
+ "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-edit --file '{}' --auto-assign-agents true --load-context true"
76
+ },
77
+ {
78
+ "type": "command",
79
+ "command": "/bin/bash -c 'FILE=$(cat | jq -r \".tool_input.file_path // .tool_input.path // empty\"); if [ -n \"$FILE\" ]; then CHECKPOINT_BRANCH=\"checkpoint/pre-edit-$(date +%Y%m%d-%H%M%S)\"; git add -A && git stash push -m \"Pre-edit checkpoint for $FILE\" >/dev/null 2>&1 && git branch \"$CHECKPOINT_BRANCH\" && mkdir -p .claude/checkpoints && echo \"{\\\"branch\\\": \\\"$CHECKPOINT_BRANCH\\\", \\\"file\\\": \\\"$FILE\\\", \\\"timestamp\\\": \\\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\\\", \\\"type\\\": \\\"pre-edit\\\", \\\"original_branch\\\": \\\"$(git branch --show-current)\\\"}\" > \".claude/checkpoints/$(date +%s).json\" && git stash pop --quiet >/dev/null 2>&1 || true && echo \"✅ Created checkpoint: $CHECKPOINT_BRANCH for $FILE\"; fi'"
80
+ }
81
+ ]
82
+ }
83
+ ],
84
+ "PostToolUse": [
85
+ {
86
+ "matcher": "Bash",
87
+ "hooks": [
88
+ {
89
+ "type": "command",
90
+ "command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "matcher": "Write|Edit|MultiEdit",
96
+ "hooks": [
97
+ {
98
+ "type": "command",
99
+ "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-edit --file '{}' --format true --update-memory true"
100
+ },
101
+ {
102
+ "type": "command",
103
+ "command": "/bin/bash -c 'FILE=$(cat | jq -r \".tool_input.file_path // .tool_input.path // empty\"); if [ -n \"$FILE\" ] && [ -f \"$FILE\" ]; then if ! git ls-files --error-unmatch \"$FILE\" >/dev/null 2>&1; then git add \"$FILE\"; fi; if ! (git diff --cached --quiet \"$FILE\" 2>/dev/null && git diff --quiet \"$FILE\" 2>/dev/null); then TAG_NAME=\"checkpoint-$(date +%Y%m%d-%H%M%S)\"; BRANCH=$(git branch --show-current); git add \"$FILE\" && git commit -m \"🔖 Checkpoint: Edit $FILE\" --quiet && git tag -a \"$TAG_NAME\" -m \"Checkpoint after editing $FILE\" && mkdir -p .claude/checkpoints && DIFF_STATS=$(git diff HEAD~1 --stat | tr \"\\n\" \" \" | sed \"s/\\\"/\\\\\\\\\\\"/g\") && echo \"{\\\"tag\\\": \\\"$TAG_NAME\\\", \\\"file\\\": \\\"$FILE\\\", \\\"timestamp\\\": \\\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\\\", \\\"type\\\": \\\"post-edit\\\", \\\"branch\\\": \\\"$BRANCH\\\", \\\"diff_summary\\\": \\\"$DIFF_STATS\\\"}\" > \".claude/checkpoints/$(date +%s).json\" && echo \"✅ Created checkpoint: $TAG_NAME for $FILE\"; else echo \"ℹ️ No changes to checkpoint for $FILE\"; fi; fi'"
104
+ }
105
+ ]
106
+ }
107
+ ],
108
+ "UserPromptSubmit": [
109
+ {
110
+ "hooks": [
111
+ {
112
+ "type": "command",
113
+ "command": "/bin/bash -c 'TASK=$(echo \"{{user_prompt}}\" | head -c 100 | tr \"\\n\" \" \"); if [ -n \"$TASK\" ]; then CHECKPOINT_NAME=\"task-$(date +%Y%m%d-%H%M%S)\"; git add -A && git commit -m \"🔖 Task checkpoint: $TASK...\" --quiet || true; if command -v gh &> /dev/null; then echo \"🚀 Creating GitHub release for checkpoint...\"; gh release create \"$CHECKPOINT_NAME\" --title \"Checkpoint: $(date +\"%Y-%m-%d %H:%M\")\" --notes \"Task: $TASK\n\n## Checkpoint Details\n- Branch: $(git branch --show-current)\n- Commit: $(git rev-parse HEAD)\n- Files changed: $(git diff HEAD~1 --stat 2>/dev/null | wc -l || echo 0) files\n\n## Rollback Instructions\n\\`\\`\\`bash\n# To rollback to this checkpoint:\ngit checkout $CHECKPOINT_NAME\n\\`\\`\\`\" --prerelease || echo \"⚠️ Failed to create GitHub release\"; fi; mkdir -p .claude/checkpoints && echo \"{\\\"checkpoint\\\": \\\"$CHECKPOINT_NAME\\\", \\\"task\\\": \\\"$TASK\\\", \\\"timestamp\\\": \\\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\\\", \\\"commit\\\": \\\"$(git rev-parse HEAD)\\\", \\\"github_release\\\": \\\"$(command -v gh &> /dev/null && echo true || echo false)\\\"}\" > \".claude/checkpoints/task-$(date +%s).json\" && echo \"✅ Created task checkpoint: $CHECKPOINT_NAME\"; fi'"
114
+ }
115
+ ]
116
+ }
117
+ ],
118
+ "Stop": [
119
+ {
120
+ "hooks": [
121
+ {
122
+ "type": "command",
123
+ "command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true"
124
+ },
125
+ {
126
+ "type": "command",
127
+ "command": "/bin/bash -c 'SESSION_ID=\"session-$(date +%Y%m%d-%H%M%S)\"; SUMMARY_FILE=\".claude/checkpoints/summary-$SESSION_ID.md\"; mkdir -p .claude/checkpoints && echo \"# Session Summary - $(date +\"%Y-%m-%d %H:%M:%S\")\n\n## Checkpoints Created\n$(find .claude/checkpoints -name \"*.json\" -mtime -1 -exec basename {} \\; | sort)\n\n## Files Modified\n$(git diff --name-only $(git log --format=%H -n 1 --before=\"1 hour ago\" 2>/dev/null) 2>/dev/null || echo \"No files tracked\")\n\n## Recent Commits\n$(git log --oneline -10 --grep=\"Checkpoint\" || echo \"No checkpoint commits\")\n\n## GitHub Releases Created\n$(gh release list --limit 10 | grep \"checkpoint-\" || echo \"No GitHub releases\")\n\n## Rollback Instructions\nTo rollback to a specific checkpoint:\n\\`\\`\\`bash\n# List all checkpoints\ngit tag -l \"checkpoint-*\" | sort -r\n\n# List GitHub releases\ngh release list\n\n# Rollback to a checkpoint\ngit checkout checkpoint-YYYYMMDD-HHMMSS\n\\`\\`\\`\" > \"$SUMMARY_FILE\" && git add -A && git commit -m \"🏁 Session end checkpoint: $SESSION_ID\" --quiet || true && git tag -a \"session-end-$SESSION_ID\" -m \"End of Claude session\" && if command -v gh &> /dev/null; then echo \"📊 Creating GitHub session summary...\"; gh release create \"session-$SESSION_ID\" --title \"Session Summary: $(date +\"%Y-%m-%d %H:%M\")\" --notes-file \"$SUMMARY_FILE\" --prerelease || echo \"⚠️ Failed to create GitHub session summary\"; fi && echo \"✅ Session summary saved to: $SUMMARY_FILE\" && echo \"📌 Final checkpoint: session-end-$SESSION_ID\"'"
128
+ }
129
+ ]
130
+ }
131
+ ],
132
+ "PreCompact": [
133
+ {
134
+ "matcher": "manual",
135
+ "hooks": [
136
+ {
137
+ "type": "command",
138
+ "command": "/bin/bash -c 'INPUT=$(cat); CUSTOM=$(echo \"$INPUT\" | jq -r \".custom_instructions // \"\"\"); echo \"🔄 PreCompact Guidance:\"; echo \"📋 IMPORTANT: Review CLAUDE.md in project root for:\"; echo \" • 54 available agents and concurrent usage patterns\"; echo \" • Swarm coordination strategies (hierarchical, mesh, adaptive)\"; echo \" • SPARC methodology workflows with batchtools optimization\"; echo \" • Critical concurrent execution rules (GOLDEN RULE: 1 MESSAGE = ALL OPERATIONS)\"; if [ -n \"$CUSTOM\" ]; then echo \"🎯 Custom compact instructions: $CUSTOM\"; fi; echo \"✅ Ready for compact operation\"'"
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "matcher": "auto",
144
+ "hooks": [
145
+ {
146
+ "type": "command",
147
+ "command": "/bin/bash -c 'echo \"🔄 Auto-Compact Guidance (Context Window Full):\"; echo \"📋 CRITICAL: Before compacting, ensure you understand:\"; echo \" • All 54 agents available in .claude/agents/ directory\"; echo \" • Concurrent execution patterns from CLAUDE.md\"; echo \" • Batchtools optimization for 300% performance gains\"; echo \" • Swarm coordination strategies for complex tasks\"; echo \"⚡ Apply GOLDEN RULE: Always batch operations in single messages\"; echo \"✅ Auto-compact proceeding with full agent context\"'"
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ },
153
+ "includeCoAuthoredBy": true,
154
+ "enabledMcpjsonServers": [
155
+ "claude-flow",
156
+ "ruv-swarm"
157
+ ]
158
+ }
@@ -0,0 +1,158 @@
1
+ {
2
+ "env": {
3
+ "CLAUDE_FLOW_AUTO_COMMIT": "false",
4
+ "CLAUDE_FLOW_AUTO_PUSH": "false",
5
+ "CLAUDE_FLOW_HOOKS_ENABLED": "true",
6
+ "CLAUDE_FLOW_TELEMETRY_ENABLED": "true",
7
+ "CLAUDE_FLOW_REMOTE_EXECUTION": "true",
8
+ "CLAUDE_FLOW_GITHUB_INTEGRATION": "true",
9
+ "CLAUDE_FLOW_CHECKPOINTS_ENABLED": "true",
10
+ "CREATE_GH_RELEASE": "true"
11
+ },
12
+ "permissions": {
13
+ "allow": [
14
+ "Bash(npx claude-flow *)",
15
+ "Bash(npm run lint)",
16
+ "Bash(npm run test:*)",
17
+ "Bash(npm test *)",
18
+ "Bash(git status)",
19
+ "Bash(git diff *)",
20
+ "Bash(git log *)",
21
+ "Bash(git add *)",
22
+ "Bash(git commit *)",
23
+ "Bash(git push)",
24
+ "Bash(git config *)",
25
+ "Bash(git tag *)",
26
+ "Bash(git branch *)",
27
+ "Bash(git checkout *)",
28
+ "Bash(git stash *)",
29
+ "Bash(git reset *)",
30
+ "Bash(git rev-parse *)",
31
+ "Bash(git ls-files *)",
32
+ "Bash(gh *)",
33
+ "Bash(node *)",
34
+ "Bash(which *)",
35
+ "Bash(pwd)",
36
+ "Bash(ls *)",
37
+ "Bash(jq *)",
38
+ "Bash(test *)",
39
+ "Bash(find *)",
40
+ "Bash(grep *)",
41
+ "Bash(sed *)",
42
+ "Bash(awk *)",
43
+ "Bash(curl *)",
44
+ "Bash(mkdir *)",
45
+ "Bash(cd *)",
46
+ "Bash(cat *)",
47
+ "Bash(echo *)",
48
+ "Bash(npx claude-flow@alpha *)",
49
+ "Bash(./claude-flow *)",
50
+ "Bash(./.claude/helpers/*)"
51
+ ],
52
+ "deny": [
53
+ "Bash(rm -rf /)",
54
+ "Bash(curl * | bash)",
55
+ "Bash(wget * | sh)",
56
+ "Bash(eval *)"
57
+ ]
58
+ },
59
+ "hooks": {
60
+ "PreToolUse": [
61
+ {
62
+ "matcher": "Bash",
63
+ "hooks": [
64
+ {
65
+ "type": "command",
66
+ "command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true"
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "matcher": "Write|Edit|MultiEdit",
72
+ "hooks": [
73
+ {
74
+ "type": "command",
75
+ "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-edit --file '{}' --auto-assign-agents true --load-context true"
76
+ },
77
+ {
78
+ "type": "command",
79
+ "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha github checkpoint pre-edit --file '{}' --create-checkpoint true"
80
+ }
81
+ ]
82
+ }
83
+ ],
84
+ "PostToolUse": [
85
+ {
86
+ "matcher": "Bash",
87
+ "hooks": [
88
+ {
89
+ "type": "command",
90
+ "command": "cat | jq -r '.tool_input.command // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "matcher": "Write|Edit|MultiEdit",
96
+ "hooks": [
97
+ {
98
+ "type": "command",
99
+ "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-edit --file '{}' --format true --update-memory true"
100
+ },
101
+ {
102
+ "type": "command",
103
+ "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // empty' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha github checkpoint post-edit --file '{}' --save-changes true"
104
+ }
105
+ ]
106
+ }
107
+ ],
108
+ "UserPromptSubmit": [
109
+ {
110
+ "hooks": [
111
+ {
112
+ "type": "command",
113
+ "command": "echo \"{{user_prompt}}\" | npx claude-flow@alpha github checkpoint task --task \"$(cat)\" --create-release true"
114
+ }
115
+ ]
116
+ }
117
+ ],
118
+ "Stop": [
119
+ {
120
+ "hooks": [
121
+ {
122
+ "type": "command",
123
+ "command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true"
124
+ },
125
+ {
126
+ "type": "command",
127
+ "command": "npx claude-flow@alpha github checkpoint session-end --save-session true"
128
+ }
129
+ ]
130
+ }
131
+ ],
132
+ "PreCompact": [
133
+ {
134
+ "matcher": "manual",
135
+ "hooks": [
136
+ {
137
+ "type": "command",
138
+ "command": "/bin/bash -c 'INPUT=$(cat); CUSTOM=$(echo \"$INPUT\" | jq -r \".custom_instructions // \"\"\"); echo \"🔄 PreCompact Guidance:\"; echo \"📋 IMPORTANT: Review CLAUDE.md in project root for:\"; echo \" • 54 available agents and concurrent usage patterns\"; echo \" • Swarm coordination strategies (hierarchical, mesh, adaptive)\"; echo \" • SPARC methodology workflows with batchtools optimization\"; echo \" • Critical concurrent execution rules (GOLDEN RULE: 1 MESSAGE = ALL OPERATIONS)\"; if [ -n \"$CUSTOM\" ]; then echo \"🎯 Custom compact instructions: $CUSTOM\"; fi; echo \"✅ Ready for compact operation\"'"
139
+ }
140
+ ]
141
+ },
142
+ {
143
+ "matcher": "auto",
144
+ "hooks": [
145
+ {
146
+ "type": "command",
147
+ "command": "/bin/bash -c 'echo \"🔄 Auto-Compact Guidance (Context Window Full):\"; echo \"📋 CRITICAL: Before compacting, ensure you understand:\"; echo \" • All 54 agents available in .claude/agents/ directory\"; echo \" • Concurrent execution patterns from CLAUDE.md\"; echo \" • Batchtools optimization for 300% performance gains\"; echo \" • Swarm coordination strategies for complex tasks\"; echo \"⚡ Apply GOLDEN RULE: Always batch operations in single messages\"; echo \"✅ Auto-compact proceeding with full agent context\"'"
148
+ }
149
+ ]
150
+ }
151
+ ]
152
+ },
153
+ "includeCoAuthoredBy": true,
154
+ "enabledMcpjsonServers": [
155
+ "claude-flow",
156
+ "ruv-swarm"
157
+ ]
158
+ }
@@ -76,7 +76,7 @@
76
76
  },
77
77
  {
78
78
  "type": "command",
79
- "command": "bash .claude/helpers/github-checkpoint-hooks.sh pre-edit \"{{tool_input}}\""
79
+ "command": "/bin/bash -c 'FILE=$(cat | jq -r \".tool_input.file_path // .tool_input.path // empty\"); if [ -n \"$FILE\" ]; then CHECKPOINT_BRANCH=\"checkpoint/pre-edit-$(date +%Y%m%d-%H%M%S)\"; git add -A && git stash push -m \"Pre-edit checkpoint for $FILE\" >/dev/null 2>&1 && git branch \"$CHECKPOINT_BRANCH\" && mkdir -p .claude/checkpoints && echo \"{\\\"branch\\\": \\\"$CHECKPOINT_BRANCH\\\", \\\"file\\\": \\\"$FILE\\\", \\\"timestamp\\\": \\\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\\\", \\\"type\\\": \\\"pre-edit\\\", \\\"original_branch\\\": \\\"$(git branch --show-current)\\\"}\" > \".claude/checkpoints/$(date +%s).json\" && git stash pop --quiet >/dev/null 2>&1 || true && echo \"✅ Created checkpoint: $CHECKPOINT_BRANCH for $FILE\"; fi'"
80
80
  }
81
81
  ]
82
82
  }
@@ -100,7 +100,7 @@
100
100
  },
101
101
  {
102
102
  "type": "command",
103
- "command": "bash .claude/helpers/github-checkpoint-hooks.sh post-edit \"{{tool_input}}\""
103
+ "command": "/bin/bash -c 'FILE=$(cat | jq -r \".tool_input.file_path // .tool_input.path // empty\"); if [ -n \"$FILE\" ] && [ -f \"$FILE\" ]; then if ! git ls-files --error-unmatch \"$FILE\" >/dev/null 2>&1; then git add \"$FILE\"; fi; if ! (git diff --cached --quiet \"$FILE\" 2>/dev/null && git diff --quiet \"$FILE\" 2>/dev/null); then TAG_NAME=\"checkpoint-$(date +%Y%m%d-%H%M%S)\"; BRANCH=$(git branch --show-current); git add \"$FILE\" && git commit -m \"🔖 Checkpoint: Edit $FILE\" --quiet && git tag -a \"$TAG_NAME\" -m \"Checkpoint after editing $FILE\" && mkdir -p .claude/checkpoints && DIFF_STATS=$(git diff HEAD~1 --stat | tr \"\\n\" \" \" | sed \"s/\\\"/\\\\\\\\\\\"/g\") && echo \"{\\\"tag\\\": \\\"$TAG_NAME\\\", \\\"file\\\": \\\"$FILE\\\", \\\"timestamp\\\": \\\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\\\", \\\"type\\\": \\\"post-edit\\\", \\\"branch\\\": \\\"$BRANCH\\\", \\\"diff_summary\\\": \\\"$DIFF_STATS\\\"}\" > \".claude/checkpoints/$(date +%s).json\" && echo \"✅ Created checkpoint: $TAG_NAME for $FILE\"; else echo \"ℹ️ No changes to checkpoint for $FILE\"; fi; fi'"
104
104
  }
105
105
  ]
106
106
  }
@@ -110,7 +110,7 @@
110
110
  "hooks": [
111
111
  {
112
112
  "type": "command",
113
- "command": "bash .claude/helpers/github-checkpoint-hooks.sh task \"{{user_prompt}}\""
113
+ "command": "/bin/bash -c 'TASK=$(echo \"{{user_prompt}}\" | head -c 100 | tr \"\\n\" \" \"); if [ -n \"$TASK\" ]; then CHECKPOINT_NAME=\"task-$(date +%Y%m%d-%H%M%S)\"; git add -A && git commit -m \"🔖 Task checkpoint: $TASK...\" --quiet || true; if command -v gh &> /dev/null; then echo \"🚀 Creating GitHub release for checkpoint...\"; gh release create \"$CHECKPOINT_NAME\" --title \"Checkpoint: $(date +\"%Y-%m-%d %H:%M\")\" --notes \"Task: $TASK\n\n## Checkpoint Details\n- Branch: $(git branch --show-current)\n- Commit: $(git rev-parse HEAD)\n- Files changed: $(git diff HEAD~1 --stat 2>/dev/null | wc -l || echo 0) files\n\n## Rollback Instructions\n\\`\\`\\`bash\n# To rollback to this checkpoint:\ngit checkout $CHECKPOINT_NAME\n\\`\\`\\`\" --prerelease || echo \"⚠️ Failed to create GitHub release\"; fi; mkdir -p .claude/checkpoints && echo \"{\\\"checkpoint\\\": \\\"$CHECKPOINT_NAME\\\", \\\"task\\\": \\\"$TASK\\\", \\\"timestamp\\\": \\\"$(date -u +%Y-%m-%dT%H:%M:%SZ)\\\", \\\"commit\\\": \\\"$(git rev-parse HEAD)\\\", \\\"github_release\\\": \\\"$(command -v gh &> /dev/null && echo true || echo false)\\\"}\" > \".claude/checkpoints/task-$(date +%s).json\" && echo \"✅ Created task checkpoint: $CHECKPOINT_NAME\"; fi'"
114
114
  }
115
115
  ]
116
116
  }
@@ -124,7 +124,7 @@
124
124
  },
125
125
  {
126
126
  "type": "command",
127
- "command": "bash .claude/helpers/github-checkpoint-hooks.sh session-end"
127
+ "command": "/bin/bash -c 'SESSION_ID=\"session-$(date +%Y%m%d-%H%M%S)\"; SUMMARY_FILE=\".claude/checkpoints/summary-$SESSION_ID.md\"; mkdir -p .claude/checkpoints && echo \"# Session Summary - $(date +\"%Y-%m-%d %H:%M:%S\")\n\n## Checkpoints Created\n$(find .claude/checkpoints -name \"*.json\" -mtime -1 -exec basename {} \\; | sort)\n\n## Files Modified\n$(git diff --name-only $(git log --format=%H -n 1 --before=\"1 hour ago\" 2>/dev/null) 2>/dev/null || echo \"No files tracked\")\n\n## Recent Commits\n$(git log --oneline -10 --grep=\"Checkpoint\" || echo \"No checkpoint commits\")\n\n## GitHub Releases Created\n$(gh release list --limit 10 | grep \"checkpoint-\" || echo \"No GitHub releases\")\n\n## Rollback Instructions\nTo rollback to a specific checkpoint:\n\\`\\`\\`bash\n# List all checkpoints\ngit tag -l \"checkpoint-*\" | sort -r\n\n# List GitHub releases\ngh release list\n\n# Rollback to a checkpoint\ngit checkout checkpoint-YYYYMMDD-HHMMSS\n\\`\\`\\`\" > \"$SUMMARY_FILE\" && git add -A && git commit -m \"🏁 Session end checkpoint: $SESSION_ID\" --quiet || true && git tag -a \"session-end-$SESSION_ID\" -m \"End of Claude session\" && if command -v gh &> /dev/null; then echo \"📊 Creating GitHub session summary...\"; gh release create \"session-$SESSION_ID\" --title \"Session Summary: $(date +\"%Y-%m-%d %H:%M\")\" --notes-file \"$SUMMARY_FILE\" --prerelease || echo \"⚠️ Failed to create GitHub session summary\"; fi && echo \"✅ Session summary saved to: $SUMMARY_FILE\" && echo \"📌 Final checkpoint: session-end-$SESSION_ID\"'"
128
128
  }
129
129
  ]
130
130
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,45 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.0.0-alpha.84] - 2025-02-03
9
+
10
+ ### 🔧 Bug Fixes
11
+ - **Fixed Hive Mind Wizard Memory Retrieval**:
12
+ - Fixed memory listing to read from correct database (`hive.db` instead of `memory.db`)
13
+ - Updated collective memory search to query the `collective_memory` table
14
+ - Memory wizard now correctly displays all 264 stored memories
15
+ - Search functionality now properly queries collective memory store
16
+
17
+ ### 📦 Package Optimization
18
+ - **Reduced NPM Package Size by 31%**:
19
+ - Excluded unnecessary `bin/claude-flow-node-pkg` binary (45MB) from npm package
20
+ - Package size reduced from 58MB to 40MB
21
+ - Binary is only needed for standalone distribution, not for npm/npx users
22
+ - Updated package.json files field to exclude the precompiled binary
23
+
24
+ ### 🛠️ Technical Improvements
25
+ - **Database Consistency**: Aligned memory retrieval across hive mind commands
26
+ - **Memory Search**: Direct SQLite queries for better performance and accuracy
27
+
28
+ ## [2.0.0-alpha.83] - 2025-02-01
29
+
30
+ ### 🔧 Bug Fixes
31
+ - **Fixed CLAUDE.md Template Generation**:
32
+ - Updated init command template to use correct agent names
33
+ - Replaced legacy agent names (analyst, coordinator, etc.) with proper mappings
34
+ - Ensures all generated CLAUDE.md files use valid agent types
35
+ - Fixes issue #557: "Agent type 'analyst' not found" error
36
+
37
+ ### 🛠️ Technical Improvements
38
+ - **Agent Name Mapping**: Enhanced backward compatibility with legacy agent names
39
+ - **Template Updates**: Updated 18 instances of agent names in CLAUDE.md template
40
+ - **Agent Loader**: Maintains support for legacy names while using correct internal types
41
+
42
+ ### 📦 Package Notes
43
+ - Package successfully published to npm with alpha tag
44
+ - All agent definitions included (64 specialized agents)
45
+ - TypeScript build warnings present but don't affect functionality
46
+
8
47
  ## [2.0.0-alpha.80] - 2025-01-30
9
48
 
10
49
  ### ✨ New Features
package/bin/claude-flow CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/bin/sh
2
2
  # Claude-Flow Smart Dispatcher - Detects and uses the best available runtime
3
3
 
4
- VERSION="2.0.0-alpha.82"
4
+ VERSION="2.0.0-alpha.84"
5
5
 
6
6
  # Determine the correct path based on how the script is invoked
7
7
  if [ -L "$0" ]; then
@@ -11,7 +11,7 @@ import { existsSync } from 'fs';
11
11
  import { spawn } from 'child_process';
12
12
  import process from 'process';
13
13
 
14
- const VERSION = "2.0.0-alpha.81";
14
+ const VERSION = "2.0.0-alpha.84";
15
15
 
16
16
  // Get script directory and root directory
17
17
  const __filename = fileURLToPath(import.meta.url);
@@ -40,11 +40,29 @@ async function main() {
40
40
  if (existsSync(jsFile)) {
41
41
  const child = spawn('node', [jsFile, ...args], {
42
42
  stdio: 'inherit',
43
- shell: false
43
+ shell: false,
44
+ detached: false // Prevent orphaned processes
44
45
  });
45
46
 
47
+ // Enhanced process cleanup for all platforms
48
+ const cleanup = () => {
49
+ if (!child.killed) {
50
+ child.kill('SIGTERM');
51
+ setTimeout(() => {
52
+ if (!child.killed) {
53
+ child.kill('SIGKILL');
54
+ }
55
+ }, 5000);
56
+ }
57
+ };
58
+
59
+ process.on('SIGTERM', cleanup);
60
+ process.on('SIGINT', cleanup);
61
+ process.on('exit', cleanup);
62
+
46
63
  child.on('error', (error) => {
47
64
  console.error('❌ Node.js execution failed:', error.message);
65
+ cleanup();
48
66
  process.exit(1);
49
67
  });
50
68
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "2.0.0-alpha.82",
3
+ "version": "2.0.0-alpha.84",
4
4
  "description": "Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)",
5
5
  "main": "cli.mjs",
6
6
  "bin": {
@@ -93,7 +93,15 @@
93
93
  },
94
94
  "files": [
95
95
  "cli.js",
96
- "bin/",
96
+ "bin/claude-flow.js",
97
+ "bin/claude-flow",
98
+ "bin/claude-flow-dev",
99
+ "bin/claude-flow-pkg.js",
100
+ "bin/claude-flow-swarm",
101
+ "bin/claude-flow-swarm-background",
102
+ "bin/claude-flow-swarm-bg",
103
+ "bin/claude-flow-swarm-monitor",
104
+ "bin/claude-flow-swarm-ui",
97
105
  "dist/",
98
106
  "src/",
99
107
  ".claude/",
@@ -8,6 +8,24 @@ import { glob } from 'glob';
8
8
  import { resolve, dirname } from 'node:path';
9
9
  import { parse as parseYaml } from 'yaml';
10
10
 
11
+ // Legacy agent type mapping for backward compatibility
12
+ 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;
21
+
22
+ /**
23
+ * Resolve legacy agent types to current equivalents
24
+ */
25
+ function resolveLegacyAgentType(legacyType: string): string {
26
+ return LEGACY_AGENT_MAPPING[legacyType as keyof typeof LEGACY_AGENT_MAPPING] || legacyType;
27
+ }
28
+
11
29
  export interface AgentDefinition {
12
30
  name: string;
13
31
  type?: string;
@@ -163,7 +181,12 @@ class AgentLoader {
163
181
  */
164
182
  async getAvailableAgentTypes(): Promise<string[]> {
165
183
  await this.ensureLoaded();
166
- return Array.from(this.agentCache.keys()).sort();
184
+ const currentTypes = Array.from(this.agentCache.keys());
185
+ const legacyTypes = Object.keys(LEGACY_AGENT_MAPPING);
186
+ // Return both current types and legacy types, removing duplicates
187
+ const combined = [...currentTypes, ...legacyTypes];
188
+ const uniqueTypes = Array.from(new Set(combined));
189
+ return uniqueTypes.sort();
167
190
  }
168
191
 
169
192
  /**
@@ -171,7 +194,8 @@ class AgentLoader {
171
194
  */
172
195
  async getAgent(name: string): Promise<AgentDefinition | null> {
173
196
  await this.ensureLoaded();
174
- return this.agentCache.get(name) || null;
197
+ // First try the original name, then try the legacy mapping
198
+ return this.agentCache.get(name) || this.agentCache.get(resolveLegacyAgentType(name)) || null;
175
199
  }
176
200
 
177
201
  /**
@@ -212,7 +236,8 @@ class AgentLoader {
212
236
  */
213
237
  async isValidAgentType(name: string): Promise<boolean> {
214
238
  await this.ensureLoaded();
215
- return this.agentCache.has(name);
239
+ // First try the original name, then try the legacy mapping
240
+ return this.agentCache.has(name) || this.agentCache.has(resolveLegacyAgentType(name));
216
241
  }
217
242
 
218
243
  /**
@@ -244,4 +269,7 @@ export const getAgentCategories = () => agentLoader.getAgentCategories();
244
269
  export const searchAgents = (query: string) => agentLoader.searchAgents(query);
245
270
  export const isValidAgentType = (name: string) => agentLoader.isValidAgentType(name);
246
271
  export const getAgentsByCategory = (category: string) => agentLoader.getAgentsByCategory(category);
247
- export const refreshAgents = () => agentLoader.refresh();
272
+ export const refreshAgents = () => agentLoader.refresh();
273
+
274
+ // Export legacy mapping utilities
275
+ export { resolveLegacyAgentType, LEGACY_AGENT_MAPPING };
@@ -5,30 +5,37 @@
5
5
 
6
6
  import { HelpFormatter } from './help-formatter.js';
7
7
 
8
- export const VERSION = '2.0.0-alpha.81';
8
+ export const VERSION = '2.0.0-alpha.84';
9
9
 
10
10
  export const MAIN_HELP = `
11
11
  🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
12
12
 
13
13
  🎯 ENTERPRISE FEATURES: Complete ruv-swarm integration with 90+ MCP tools, neural networking, and production-ready infrastructure
14
14
  🐝 NEW: Claude Code 1.0.51+ full compatibility with enhanced hooks and batch processing
15
- ⚡ ALPHA 81: Advanced concurrent execution patterns, TodoWrite batching optimization, separated MCP coordination
15
+ ⚡ ALPHA 84: Enhanced swarm --claude flag for direct Claude Code CLI integration
16
16
 
17
17
  USAGE:
18
+ npx claude-flow@alpha <command> [options] # Run latest alpha version
19
+ npx claude-flow@alpha <command> --help # Get detailed help for any command
20
+ npx claude-flow@alpha --help # Show this help
21
+
22
+ # After local install:
18
23
  claude-flow <command> [options]
19
24
  claude-flow <command> --help # Get detailed help for any command
20
25
 
21
26
  🚀 QUICK START:
22
27
  # First time setup (creates CLAUDE.md & .claude/commands)
23
- npx claude-flow@alpha init --sparc
28
+ npx claude-flow@alpha init
24
29
 
25
30
  # 🐝 HIVE MIND QUICK START (NEW!):
26
31
  claude-flow hive-mind wizard # Interactive setup wizard
27
32
  claude-flow hive-mind spawn "objective" # Create intelligent swarm
33
+ claude-flow hive-mind spawn "Build API" --claude # Open Claude Code CLI
28
34
 
29
35
  # After setup, use without npx:
30
36
  claude-flow start --ui --swarm # Start with swarm intelligence UI
31
37
  claude-flow swarm "build REST API" # Deploy multi-agent workflow
38
+ claude-flow swarm "create service" --claude # Open Claude Code CLI with swarm
32
39
 
33
40
  🐝 HIVE MIND COMMANDS (NEW!):
34
41
  hive-mind wizard 🎯 Interactive setup wizard (RECOMMENDED)
@@ -65,19 +72,21 @@ USAGE:
65
72
  batch <action> Batch operations
66
73
 
67
74
  🔍 GET HELP:
68
- claude-flow --help Show this help
69
- claude-flow help Show this help
70
- claude-flow help <command> Detailed command help
71
- claude-flow <command> --help Detailed command help
75
+ npx claude-flow@alpha --help Show this help
76
+ npx claude-flow@alpha <command> --help Detailed command help
72
77
 
73
78
  🎯 RECOMMENDED FOR NEW USERS:
74
- claude-flow hive-mind wizard # Start here! Interactive guided setup
75
- claude-flow init --sparc # Initialize with SPARC methodology
76
- claude-flow help hive-mind # Learn about Hive Mind features
79
+ npx claude-flow@alpha hive-mind wizard # Start here! Interactive guided setup
80
+ npx claude-flow@alpha init # Initialize Claude Flow
81
+ npx claude-flow@alpha help hive-mind # Learn about Hive Mind features
82
+ npx claude-flow@alpha swarm "Build API" --claude # Quick start with Claude Code CLI
77
83
 
78
84
  📚 Documentation: https://github.com/ruvnet/claude-flow
79
85
  🐝 Hive Mind Guide: https://github.com/ruvnet/claude-flow/tree/main/docs/hive-mind
80
86
  🐝 ruv-swarm: https://github.com/ruvnet/ruv-FANN/tree/main/ruv-swarm
87
+ 💬 Discord Community: https://discord.agentics.org
88
+
89
+ 💖 Created by rUv with love: https://github.com/ruvnet
81
90
  `;
82
91
 
83
92
  export const COMMAND_HELP = {
@@ -101,6 +110,8 @@ OPTIONS:
101
110
  --monitor Real-time swarm monitoring
102
111
  --ui Interactive user interface
103
112
  --background Run in background with progress tracking
113
+ --claude Open Claude Code CLI
114
+ --executor Use built-in executor instead of Claude Code
104
115
  --analysis Enable analysis/read-only mode (no code changes)
105
116
  --read-only Enable read-only mode (alias for --analysis)
106
117
 
@@ -109,6 +120,8 @@ EXAMPLES:
109
120
  claude-flow swarm "Research cloud architecture patterns" --strategy research
110
121
  claude-flow swarm "Optimize database queries" --max-agents 3 --parallel
111
122
  claude-flow swarm "Develop feature X" --strategy development --monitor --ui
123
+ claude-flow swarm "Build API" --claude # Open Claude Code CLI
124
+ claude-flow swarm "Create service" --executor # Use built-in executor
112
125
  claude-flow swarm "Analyze codebase for security issues" --analysis
113
126
  claude-flow swarm "Review architecture patterns" --read-only --strategy research
114
127
 
@@ -904,7 +917,7 @@ export function getMainHelp(plain = false) {
904
917
  },
905
918
  ],
906
919
  examples: [
907
- 'npx claude-flow@alpha init --sparc',
920
+ 'npx claude-flow@alpha init',
908
921
  'claude-flow hive-mind wizard',
909
922
  'claude-flow swarm "Build REST API"',
910
923
  'claude-flow agent spawn researcher --name "Research Bot"',