claude-flow 2.0.0-alpha.81 → 2.0.0-alpha.83
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.
- package/.claude/agents/analysis/code-analyzer.md +209 -0
- package/.claude/checkpoints/1754066715.json +1 -0
- package/.claude/checkpoints/1754066716.json +1 -0
- package/.claude/checkpoints/1754066724.json +1 -0
- package/.claude/checkpoints/1754066726.json +1 -0
- package/.claude/checkpoints/1754066740.json +1 -0
- package/.claude/checkpoints/1754066741.json +1 -0
- package/.claude/checkpoints/1754066750.json +1 -0
- package/.claude/checkpoints/1754066751.json +1 -0
- package/.claude/checkpoints/1754066761.json +1 -0
- package/.claude/checkpoints/1754066762.json +1 -0
- package/.claude/checkpoints/1754066775.json +1 -0
- package/.claude/checkpoints/1754066777.json +1 -0
- package/.claude/checkpoints/1754066783.json +1 -0
- package/.claude/checkpoints/1754066785.json +1 -0
- package/.claude/checkpoints/1754066815.json +1 -0
- package/.claude/checkpoints/1754066817.json +1 -0
- package/.claude/checkpoints/1754066900.json +1 -0
- package/.claude/checkpoints/1754066904.json +1 -0
- package/.claude/checkpoints/1754066974.json +1 -0
- package/.claude/checkpoints/1754066976.json +1 -0
- package/.claude/checkpoints/1754070695.json +1 -0
- package/.claude/checkpoints/1754070697.json +1 -0
- package/.claude/checkpoints/1754070704.json +1 -0
- package/.claude/checkpoints/1754070706.json +1 -0
- package/.claude/checkpoints/1754070716.json +1 -0
- package/.claude/checkpoints/1754070718.json +1 -0
- package/.claude/checkpoints/1754070730.json +1 -0
- package/.claude/checkpoints/1754070732.json +1 -0
- package/.claude/checkpoints/1754070738.json +1 -0
- package/.claude/checkpoints/1754070740.json +1 -0
- package/.claude/checkpoints/summary-session-20250731-143729.md +108 -0
- package/.claude/checkpoints/summary-session-20250731-145845.md +109 -0
- package/.claude/checkpoints/summary-session-20250731-150532.md +110 -0
- package/.claude/checkpoints/summary-session-20250731-153445.md +41 -0
- package/.claude/checkpoints/summary-session-20250731-162229.md +43 -0
- package/.claude/checkpoints/summary-session-20250731-162510.md +48 -0
- package/.claude/checkpoints/summary-session-20250731-163301.md +54 -0
- package/.claude/checkpoints/summary-session-20250731-163727.md +60 -0
- package/.claude/checkpoints/summary-session-20250731-164059.md +65 -0
- package/.claude/checkpoints/summary-session-20250731-164245.md +70 -0
- package/.claude/checkpoints/summary-session-20250731-164722.md +78 -0
- package/.claude/checkpoints/summary-session-20250731-164821.md +83 -0
- package/.claude/checkpoints/summary-session-20250731-165000.md +88 -0
- package/.claude/checkpoints/summary-session-20250731-191747.md +70 -0
- package/.claude/checkpoints/summary-session-20250731-192119.md +76 -0
- package/.claude/checkpoints/summary-session-20250731-192226.md +79 -0
- package/.claude/checkpoints/summary-session-20250731-192608.md +83 -0
- package/.claude/checkpoints/summary-session-20250731-192632.md +85 -0
- package/.claude/checkpoints/summary-session-20250731-192658.md +87 -0
- package/.claude/checkpoints/summary-session-20250731-192710.md +0 -0
- package/.claude/checkpoints/summary-session-20250731-192711.md +89 -0
- package/.claude/checkpoints/summary-session-20250731-192731.md +0 -0
- package/.claude/checkpoints/summary-session-20250731-192752.md +95 -0
- package/.claude/checkpoints/summary-session-20250731-192810.md +94 -0
- package/.claude/checkpoints/summary-session-20250731-192839.md +96 -0
- package/.claude/checkpoints/summary-session-20250731-192900.md +97 -0
- package/.claude/checkpoints/summary-session-20250731-192913.md +98 -0
- package/.claude/checkpoints/summary-session-20250731-193017.md +100 -0
- package/.claude/checkpoints/summary-session-20250731-193038.md +106 -0
- package/.claude/checkpoints/summary-session-20250731-193043.md +102 -0
- package/.claude/checkpoints/summary-session-20250731-193115.md +0 -0
- package/.claude/checkpoints/summary-session-20250731-193121.md +105 -0
- package/.claude/checkpoints/summary-session-20250731-193124.md +108 -0
- package/.claude/checkpoints/summary-session-20250731-193231.md +108 -0
- package/.claude/checkpoints/summary-session-20250731-193748.md +112 -0
- package/.claude/checkpoints/summary-session-20250731-194208.md +126 -0
- package/.claude/checkpoints/summary-session-20250731-194343.md +129 -0
- package/.claude/checkpoints/summary-session-20250731-195358.md +137 -0
- package/.claude/checkpoints/summary-session-20250731-201542.md +143 -0
- package/.claude/checkpoints/summary-session-20250731-201737.md +148 -0
- package/.claude/checkpoints/summary-session-20250731-202811.md +135 -0
- package/.claude/checkpoints/summary-session-20250731-204824.md +114 -0
- package/.claude/checkpoints/summary-session-20250801-165013.md +114 -0
- package/.claude/checkpoints/summary-session-20250801-165902.md +118 -0
- package/.claude/checkpoints/summary-session-20250801-170008.md +121 -0
- package/.claude/checkpoints/summary-session-20250801-170732.md +124 -0
- package/.claude/checkpoints/summary-session-20250801-172331.md +127 -0
- package/.claude/checkpoints/summary-session-20250801-174746.md +113 -0
- package/.claude/checkpoints/summary-session-20250801-175251.md +129 -0
- package/.claude/checkpoints/summary-session-20250801-180233.md +130 -0
- package/.claude/checkpoints/summary-session-20250801-182959.md +254 -0
- package/.claude/checkpoints/task-1753978885.json +7 -0
- package/.claude/checkpoints/task-1753979030.json +7 -0
- package/.claude/checkpoints/task-1753979159.json +7 -0
- package/.claude/checkpoints/task-1753979667.json +7 -0
- package/.claude/checkpoints/task-1753979823.json +7 -0
- package/.claude/checkpoints/task-1753980048.json +7 -0
- package/.claude/checkpoints/task-1753980144.json +7 -0
- package/.claude/checkpoints/task-1753980195.json +7 -0
- package/.claude/checkpoints/task-1753980418.json +7 -0
- package/.claude/checkpoints/task-1753980464.json +7 -0
- package/.claude/checkpoints/task-1753980570.json +7 -0
- package/.claude/checkpoints/task-1753989347.json +7 -0
- package/.claude/checkpoints/task-1753989565.json +7 -0
- package/.claude/checkpoints/task-1753989862.json +7 -0
- package/.claude/checkpoints/task-1753989875.json +7 -0
- package/.claude/checkpoints/task-1753990005.json +7 -0
- package/.claude/checkpoints/task-1753990081.json +7 -0
- package/.claude/checkpoints/task-1753990201.json +7 -0
- package/.claude/checkpoints/task-1753990251.json +7 -0
- package/.claude/checkpoints/task-1753990417.json +7 -0
- package/.claude/checkpoints/task-1753990715.json +7 -0
- package/.claude/checkpoints/task-1753990753.json +7 -0
- package/.claude/checkpoints/task-1753990966.json +7 -0
- package/.claude/checkpoints/task-1753991048.json +7 -0
- package/.claude/checkpoints/task-1753991287.json +7 -0
- package/.claude/checkpoints/task-1753992757.json +7 -0
- package/.claude/checkpoints/task-1753992828.json +7 -0
- package/.claude/checkpoints/task-1753992996.json +7 -0
- package/.claude/checkpoints/task-1753993542.json +7 -0
- package/.claude/checkpoints/task-1753994277.json +7 -0
- package/.claude/checkpoints/task-1754066681.json +1 -0
- package/.claude/checkpoints/task-1754067528.json +1 -0
- package/.claude/checkpoints/task-1754067561.json +1 -0
- package/.claude/checkpoints/task-1754067770.json +1 -0
- package/.claude/checkpoints/task-1754068093.json +1 -0
- package/.claude/checkpoints/task-1754070418.json +1 -0
- package/.claude/checkpoints/task-1754070494.json +1 -0
- package/.claude/checkpoints/task-1754071234.json +1 -0
- package/.claude/checkpoints/task-1754072242.json +1 -0
- package/.claude/checkpoints/task-1754073057.json +1 -0
- package/.claude/helpers/checkpoint-manager.sh +2 -250
- package/.claude/settings-backup-1753992809.json +158 -0
- package/.claude/settings-backup-1753992929.json +158 -0
- package/.claude/settings-github-npx.json +158 -0
- package/.claude/settings-npx-hooks.json +158 -0
- package/.claude/settings.json +58 -14
- package/bin/claude-flow +1 -1
- package/bin/claude-flow.js +1 -1
- package/package.json +1 -1
- package/src/agents/agent-loader.ts +32 -4
- package/src/cli/help-text.js +4 -4
- package/src/cli/index-remote.ts +1 -1
- package/src/cli/index.ts +1 -1
- package/src/cli/simple-cli.js +24 -5
- package/src/cli/simple-cli.ts +1 -1
- package/src/cli/simple-commands/github/init.js +4 -4
- package/src/cli/simple-commands/init/templates/CLAUDE.md +19 -19
- package/src/cli/simple-commands/process-ui-enhanced.js +1 -1
- package/src/cli/simple-commands/status.js +1 -1
- package/src/constants/agent-types.ts +9 -15
- package/.claude/checkpoints/1753906298.json +0 -12
|
@@ -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
|
+
}
|
package/.claude/settings.json
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
"CLAUDE_FLOW_HOOKS_ENABLED": "true",
|
|
6
6
|
"CLAUDE_FLOW_TELEMETRY_ENABLED": "true",
|
|
7
7
|
"CLAUDE_FLOW_REMOTE_EXECUTION": "true",
|
|
8
|
-
"CLAUDE_FLOW_GITHUB_INTEGRATION": "true"
|
|
8
|
+
"CLAUDE_FLOW_GITHUB_INTEGRATION": "true",
|
|
9
|
+
"CLAUDE_FLOW_CHECKPOINTS_ENABLED": "true",
|
|
10
|
+
"CREATE_GH_RELEASE": "true"
|
|
9
11
|
},
|
|
10
12
|
"permissions": {
|
|
11
13
|
"allow": [
|
|
@@ -20,11 +22,32 @@
|
|
|
20
22
|
"Bash(git commit *)",
|
|
21
23
|
"Bash(git push)",
|
|
22
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 *)",
|
|
23
32
|
"Bash(gh *)",
|
|
24
33
|
"Bash(node *)",
|
|
25
34
|
"Bash(which *)",
|
|
26
35
|
"Bash(pwd)",
|
|
27
|
-
"Bash(ls *)"
|
|
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/*)"
|
|
28
51
|
],
|
|
29
52
|
"deny": [
|
|
30
53
|
"Bash(rm -rf /)",
|
|
@@ -50,6 +73,10 @@
|
|
|
50
73
|
{
|
|
51
74
|
"type": "command",
|
|
52
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'"
|
|
53
80
|
}
|
|
54
81
|
]
|
|
55
82
|
}
|
|
@@ -70,45 +97,62 @@
|
|
|
70
97
|
{
|
|
71
98
|
"type": "command",
|
|
72
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'"
|
|
73
104
|
}
|
|
74
105
|
]
|
|
75
106
|
}
|
|
76
107
|
],
|
|
77
|
-
"
|
|
108
|
+
"UserPromptSubmit": [
|
|
78
109
|
{
|
|
79
|
-
"matcher": "manual",
|
|
80
110
|
"hooks": [
|
|
81
111
|
{
|
|
82
112
|
"type": "command",
|
|
83
|
-
"command": "/bin/bash -c '
|
|
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'"
|
|
84
114
|
}
|
|
85
115
|
]
|
|
86
|
-
}
|
|
116
|
+
}
|
|
117
|
+
],
|
|
118
|
+
"Stop": [
|
|
87
119
|
{
|
|
88
|
-
"matcher": "auto",
|
|
89
120
|
"hooks": [
|
|
90
121
|
{
|
|
91
122
|
"type": "command",
|
|
92
|
-
"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\"'"
|
|
93
128
|
}
|
|
94
129
|
]
|
|
95
130
|
}
|
|
96
131
|
],
|
|
97
|
-
"
|
|
132
|
+
"PreCompact": [
|
|
98
133
|
{
|
|
134
|
+
"matcher": "manual",
|
|
99
135
|
"hooks": [
|
|
100
136
|
{
|
|
101
137
|
"type": "command",
|
|
102
|
-
"command": "/
|
|
103
|
-
}
|
|
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": [
|
|
104
145
|
{
|
|
105
146
|
"type": "command",
|
|
106
|
-
"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\"'"
|
|
107
148
|
}
|
|
108
149
|
]
|
|
109
150
|
}
|
|
110
151
|
]
|
|
111
152
|
},
|
|
112
153
|
"includeCoAuthoredBy": true,
|
|
113
|
-
"enabledMcpjsonServers": [
|
|
114
|
-
|
|
154
|
+
"enabledMcpjsonServers": [
|
|
155
|
+
"claude-flow",
|
|
156
|
+
"ruv-swarm"
|
|
157
|
+
]
|
|
158
|
+
}
|
package/bin/claude-flow
CHANGED
package/bin/claude-flow.js
CHANGED
|
@@ -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.
|
|
14
|
+
const VERSION = "2.0.0-alpha.83";
|
|
15
15
|
|
|
16
16
|
// Get script directory and root directory
|
|
17
17
|
const __filename = fileURLToPath(import.meta.url);
|
package/package.json
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|
package/src/cli/help-text.js
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
import { HelpFormatter } from './help-formatter.js';
|
|
7
7
|
|
|
8
|
-
export const VERSION = '2.0.0-alpha.
|
|
8
|
+
export const VERSION = '2.0.0-alpha.83';
|
|
9
9
|
|
|
10
10
|
export const MAIN_HELP = `
|
|
11
11
|
🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
|
|
12
12
|
|
|
13
|
-
🎯 ENTERPRISE FEATURES: Complete ruv-swarm integration with
|
|
14
|
-
🐝 NEW:
|
|
15
|
-
⚡ ALPHA
|
|
13
|
+
🎯 ENTERPRISE FEATURES: Complete ruv-swarm integration with 90+ MCP tools, neural networking, and production-ready infrastructure
|
|
14
|
+
🐝 NEW: Claude Code 1.0.51+ full compatibility with enhanced hooks and batch processing
|
|
15
|
+
⚡ ALPHA 83: Enhanced GitHub hooks with npx commands, improved checkpoint reliability, seamless CI/CD integration
|
|
16
16
|
|
|
17
17
|
USAGE:
|
|
18
18
|
claude-flow <command> [options]
|
package/src/cli/index-remote.ts
CHANGED
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.
|
|
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
|