claude-flow 2.0.0-alpha.65 → 2.0.0-alpha.67
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/cache/agent-pool.json +33 -0
- package/.claude/cache/memory-optimization.json +19 -0
- package/.claude/cache/neural-optimization.json +25 -0
- package/.claude/cache/optimized-hooks.json +19 -0
- package/.claude/cache/parallel-processing.json +26 -0
- package/.claude/optimized-settings.json +270 -0
- package/.claude/settings-enhanced.json +278 -0
- package/.claude/settings.json +105 -8
- package/CHANGELOG.md +40 -0
- package/bin/claude-flow +1 -1
- package/dist/cli/simple-commands/hive-mind.js +1 -1
- package/dist/cli/simple-commands/hive-mind.js.map +1 -1
- package/dist/cli/simple-commands/hooks.js +6 -4
- package/dist/cli/simple-commands/hooks.js.map +1 -1
- package/dist/providers/anthropic-provider.d.ts +27 -0
- package/dist/providers/anthropic-provider.d.ts.map +1 -0
- package/dist/providers/anthropic-provider.js +247 -0
- package/dist/providers/anthropic-provider.js.map +1 -0
- package/dist/providers/base-provider.d.ts +134 -0
- package/dist/providers/base-provider.d.ts.map +1 -0
- package/dist/providers/base-provider.js +407 -0
- package/dist/providers/base-provider.js.map +1 -0
- package/dist/providers/cohere-provider.d.ts +28 -0
- package/dist/providers/cohere-provider.d.ts.map +1 -0
- package/dist/providers/cohere-provider.js +407 -0
- package/dist/providers/cohere-provider.js.map +1 -0
- package/dist/providers/google-provider.d.ts +23 -0
- package/dist/providers/google-provider.d.ts.map +1 -0
- package/dist/providers/google-provider.js +362 -0
- package/dist/providers/google-provider.js.map +1 -0
- package/dist/providers/index.d.ts +14 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +18 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/ollama-provider.d.ts +23 -0
- package/dist/providers/ollama-provider.d.ts.map +1 -0
- package/dist/providers/ollama-provider.js +374 -0
- package/dist/providers/ollama-provider.js.map +1 -0
- package/dist/providers/openai-provider.d.ts +23 -0
- package/dist/providers/openai-provider.d.ts.map +1 -0
- package/dist/providers/openai-provider.js +349 -0
- package/dist/providers/openai-provider.js.map +1 -0
- package/dist/providers/provider-manager.d.ts +139 -0
- package/dist/providers/provider-manager.d.ts.map +1 -0
- package/dist/providers/provider-manager.js +513 -0
- package/dist/providers/provider-manager.js.map +1 -0
- package/dist/providers/types.d.ts +356 -0
- package/dist/providers/types.d.ts.map +1 -0
- package/dist/providers/types.js +61 -0
- package/dist/providers/types.js.map +1 -0
- package/dist/providers/utils.d.ts +37 -0
- package/dist/providers/utils.d.ts.map +1 -0
- package/dist/providers/utils.js +322 -0
- package/dist/providers/utils.js.map +1 -0
- package/dist/services/agentic-flow-hooks/hook-manager.d.ts +70 -0
- package/dist/services/agentic-flow-hooks/hook-manager.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/hook-manager.js +512 -0
- package/dist/services/agentic-flow-hooks/hook-manager.js.map +1 -0
- package/dist/services/agentic-flow-hooks/index.d.ts +36 -0
- package/dist/services/agentic-flow-hooks/index.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/index.js +325 -0
- package/dist/services/agentic-flow-hooks/index.js.map +1 -0
- package/dist/services/agentic-flow-hooks/llm-hooks.d.ts +33 -0
- package/dist/services/agentic-flow-hooks/llm-hooks.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/llm-hooks.js +415 -0
- package/dist/services/agentic-flow-hooks/llm-hooks.js.map +1 -0
- package/dist/services/agentic-flow-hooks/memory-hooks.d.ts +45 -0
- package/dist/services/agentic-flow-hooks/memory-hooks.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/memory-hooks.js +532 -0
- package/dist/services/agentic-flow-hooks/memory-hooks.js.map +1 -0
- package/dist/services/agentic-flow-hooks/neural-hooks.d.ts +39 -0
- package/dist/services/agentic-flow-hooks/neural-hooks.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/neural-hooks.js +561 -0
- package/dist/services/agentic-flow-hooks/neural-hooks.js.map +1 -0
- package/dist/services/agentic-flow-hooks/performance-hooks.d.ts +33 -0
- package/dist/services/agentic-flow-hooks/performance-hooks.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/performance-hooks.js +621 -0
- package/dist/services/agentic-flow-hooks/performance-hooks.js.map +1 -0
- package/dist/services/agentic-flow-hooks/types.d.ts +379 -0
- package/dist/services/agentic-flow-hooks/types.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/types.js +8 -0
- package/dist/services/agentic-flow-hooks/types.js.map +1 -0
- package/dist/services/agentic-flow-hooks/workflow-hooks.d.ts +39 -0
- package/dist/services/agentic-flow-hooks/workflow-hooks.d.ts.map +1 -0
- package/dist/services/agentic-flow-hooks/workflow-hooks.js +742 -0
- package/dist/services/agentic-flow-hooks/workflow-hooks.js.map +1 -0
- package/package.json +2 -2
- package/scripts/install-arm64.js +78 -0
- package/scripts/optimize-performance.js +400 -0
- package/scripts/performance-monitor.js +263 -0
- package/src/cli/help-text.js +1 -1
- package/src/cli/simple-cli.js +1 -1
- package/src/cli/simple-commands/hive-mind.js +1 -1
- package/src/cli/simple-commands/hooks.js +8 -6
- package/src/providers/anthropic-provider.ts +282 -0
- package/src/providers/base-provider.ts +560 -0
- package/src/providers/cohere-provider.ts +521 -0
- package/src/providers/google-provider.ts +477 -0
- package/src/providers/index.ts +21 -0
- package/src/providers/ollama-provider.ts +489 -0
- package/src/providers/openai-provider.ts +476 -0
- package/src/providers/provider-manager.ts +654 -0
- package/src/providers/types.ts +531 -0
- package/src/providers/utils.ts +376 -0
- package/src/services/agentic-flow-hooks/hook-manager.ts +701 -0
- package/src/services/agentic-flow-hooks/index.ts +386 -0
- package/src/services/agentic-flow-hooks/llm-hooks.ts +557 -0
- package/src/services/agentic-flow-hooks/memory-hooks.ts +710 -0
- package/src/services/agentic-flow-hooks/neural-hooks.ts +758 -0
- package/src/services/agentic-flow-hooks/performance-hooks.ts +827 -0
- package/src/services/agentic-flow-hooks/types.ts +503 -0
- package/src/services/agentic-flow-hooks/workflow-hooks.ts +1026 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"agents": {
|
|
3
|
+
"coordinator": {
|
|
4
|
+
"min": 1,
|
|
5
|
+
"max": 3
|
|
6
|
+
},
|
|
7
|
+
"coder": {
|
|
8
|
+
"min": 2,
|
|
9
|
+
"max": 5
|
|
10
|
+
},
|
|
11
|
+
"researcher": {
|
|
12
|
+
"min": 1,
|
|
13
|
+
"max": 3
|
|
14
|
+
},
|
|
15
|
+
"analyst": {
|
|
16
|
+
"min": 1,
|
|
17
|
+
"max": 2
|
|
18
|
+
},
|
|
19
|
+
"tester": {
|
|
20
|
+
"min": 1,
|
|
21
|
+
"max": 2
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"lifecycle": {
|
|
25
|
+
"idleTimeout": 300000,
|
|
26
|
+
"healthCheck": 30000,
|
|
27
|
+
"recycleAfter": 100
|
|
28
|
+
},
|
|
29
|
+
"resources": {
|
|
30
|
+
"maxMemoryPerAgent": 134217728,
|
|
31
|
+
"maxCpuPercent": 10
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"connectionPool": {
|
|
3
|
+
"min": 2,
|
|
4
|
+
"max": 10,
|
|
5
|
+
"idleTimeout": 30000
|
|
6
|
+
},
|
|
7
|
+
"writeBatch": {
|
|
8
|
+
"size": 50,
|
|
9
|
+
"flushInterval": 1000
|
|
10
|
+
},
|
|
11
|
+
"readCache": {
|
|
12
|
+
"maxSize": 1000,
|
|
13
|
+
"ttl": 60000
|
|
14
|
+
},
|
|
15
|
+
"compression": {
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"threshold": 1024
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"predictionCache": {
|
|
3
|
+
"enabled": true,
|
|
4
|
+
"maxEntries": 10000,
|
|
5
|
+
"ttl": 300000
|
|
6
|
+
},
|
|
7
|
+
"preload": {
|
|
8
|
+
"models": [
|
|
9
|
+
"task_predictor",
|
|
10
|
+
"error_preventer",
|
|
11
|
+
"performance_optimizer"
|
|
12
|
+
],
|
|
13
|
+
"warmup": true
|
|
14
|
+
},
|
|
15
|
+
"batching": {
|
|
16
|
+
"enabled": true,
|
|
17
|
+
"maxBatchSize": 100,
|
|
18
|
+
"maxWaitTime": 50
|
|
19
|
+
},
|
|
20
|
+
"wasm": {
|
|
21
|
+
"simd": true,
|
|
22
|
+
"threads": 4,
|
|
23
|
+
"memoryPages": 256
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"PreToolUse": [
|
|
3
|
+
{
|
|
4
|
+
"matcher": "Bash",
|
|
5
|
+
"hooks": [
|
|
6
|
+
{
|
|
7
|
+
"type": "batch",
|
|
8
|
+
"parallel": true,
|
|
9
|
+
"cache": true,
|
|
10
|
+
"commands": [
|
|
11
|
+
"npx claude-flow@alpha hooks pre-command --batch true",
|
|
12
|
+
"npx claude-flow@alpha memory store --batch true",
|
|
13
|
+
"npx claude-flow@alpha neural predict --cache true"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tasks": {
|
|
3
|
+
"maxConcurrent": 10,
|
|
4
|
+
"queueSize": 100,
|
|
5
|
+
"priorityLevels": 4
|
|
6
|
+
},
|
|
7
|
+
"fileOps": {
|
|
8
|
+
"readConcurrency": 20,
|
|
9
|
+
"writeConcurrency": 10,
|
|
10
|
+
"usePipelining": true
|
|
11
|
+
},
|
|
12
|
+
"network": {
|
|
13
|
+
"maxSockets": 50,
|
|
14
|
+
"keepAlive": true,
|
|
15
|
+
"timeout": 30000
|
|
16
|
+
},
|
|
17
|
+
"workers": {
|
|
18
|
+
"enabled": true,
|
|
19
|
+
"count": 4,
|
|
20
|
+
"taskTypes": [
|
|
21
|
+
"neural_training",
|
|
22
|
+
"data_processing",
|
|
23
|
+
"analysis"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"CLAUDE_FLOW_AUTO_COMMIT": "true",
|
|
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_CHECKPOINT_ENABLED": "true",
|
|
10
|
+
"CLAUDE_FLOW_MEMORY_PERSISTENCE": "true",
|
|
11
|
+
"CLAUDE_FLOW_NEURAL_OPTIMIZATION": "true",
|
|
12
|
+
"CLAUDE_FLOW_AUTO_LEARNING": "true",
|
|
13
|
+
"CLAUDE_FLOW_PERFORMANCE_MODE": "optimized",
|
|
14
|
+
"CLAUDE_FLOW_CACHE_ENABLED": "true",
|
|
15
|
+
"CLAUDE_FLOW_PARALLEL_PROCESSING": "true",
|
|
16
|
+
"CLAUDE_FLOW_AGENT_POOL": "true"
|
|
17
|
+
},
|
|
18
|
+
"performance": {
|
|
19
|
+
"caching": {
|
|
20
|
+
"hooks": {
|
|
21
|
+
"enabled": true,
|
|
22
|
+
"ttl": 300000,
|
|
23
|
+
"maxSize": 1000
|
|
24
|
+
},
|
|
25
|
+
"neural": {
|
|
26
|
+
"enabled": true,
|
|
27
|
+
"ttl": 300000,
|
|
28
|
+
"maxSize": 10000
|
|
29
|
+
},
|
|
30
|
+
"memory": {
|
|
31
|
+
"enabled": true,
|
|
32
|
+
"ttl": 60000,
|
|
33
|
+
"maxSize": 1000
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"parallelization": {
|
|
37
|
+
"enabled": true,
|
|
38
|
+
"maxConcurrent": 10,
|
|
39
|
+
"workerThreads": 4,
|
|
40
|
+
"taskQueue": {
|
|
41
|
+
"size": 100,
|
|
42
|
+
"priorityLevels": 4
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"batching": {
|
|
46
|
+
"hooks": {
|
|
47
|
+
"enabled": true,
|
|
48
|
+
"size": 10,
|
|
49
|
+
"flushInterval": 100
|
|
50
|
+
},
|
|
51
|
+
"memory": {
|
|
52
|
+
"enabled": true,
|
|
53
|
+
"size": 50,
|
|
54
|
+
"flushInterval": 1000
|
|
55
|
+
},
|
|
56
|
+
"neural": {
|
|
57
|
+
"enabled": true,
|
|
58
|
+
"size": 100,
|
|
59
|
+
"maxWaitTime": 50
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"pooling": {
|
|
63
|
+
"agents": {
|
|
64
|
+
"enabled": true,
|
|
65
|
+
"sizes": {
|
|
66
|
+
"coordinator": { "min": 1, "max": 3 },
|
|
67
|
+
"coder": { "min": 2, "max": 5 },
|
|
68
|
+
"researcher": { "min": 1, "max": 3 },
|
|
69
|
+
"analyst": { "min": 1, "max": 2 },
|
|
70
|
+
"tester": { "min": 1, "max": 2 }
|
|
71
|
+
},
|
|
72
|
+
"idleTimeout": 300000,
|
|
73
|
+
"recycleAfter": 100
|
|
74
|
+
},
|
|
75
|
+
"connections": {
|
|
76
|
+
"database": { "min": 2, "max": 10 },
|
|
77
|
+
"mcp": { "min": 1, "max": 5 }
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"checkpoints": {
|
|
82
|
+
"enabled": true,
|
|
83
|
+
"interval": 300,
|
|
84
|
+
"auto_commit": true,
|
|
85
|
+
"commit_message_prefix": "🔄 Checkpoint:",
|
|
86
|
+
"include_metrics": true,
|
|
87
|
+
"branch_strategy": "checkpoint/{timestamp}",
|
|
88
|
+
"max_checkpoints": 20
|
|
89
|
+
},
|
|
90
|
+
"memory": {
|
|
91
|
+
"auto_persist": true,
|
|
92
|
+
"compression": true,
|
|
93
|
+
"sync_interval": 60,
|
|
94
|
+
"namespaces": ["swarm", "tasks", "patterns", "errors", "optimizations"],
|
|
95
|
+
"retention_days": 30,
|
|
96
|
+
"backup_to_github": true,
|
|
97
|
+
"optimization": {
|
|
98
|
+
"writeBatch": true,
|
|
99
|
+
"readCache": true,
|
|
100
|
+
"compressionThreshold": 1024
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"neural": {
|
|
104
|
+
"auto_optimize": true,
|
|
105
|
+
"optimization_triggers": ["error", "success", "pattern", "performance"],
|
|
106
|
+
"models": {
|
|
107
|
+
"task_predictor": {
|
|
108
|
+
"enabled": true,
|
|
109
|
+
"learning_rate": 0.001,
|
|
110
|
+
"update_frequency": 100,
|
|
111
|
+
"preload": true,
|
|
112
|
+
"cache": true
|
|
113
|
+
},
|
|
114
|
+
"error_preventer": {
|
|
115
|
+
"enabled": true,
|
|
116
|
+
"threshold": 0.85,
|
|
117
|
+
"block_risky_operations": true,
|
|
118
|
+
"preload": true,
|
|
119
|
+
"cache": true
|
|
120
|
+
},
|
|
121
|
+
"performance_optimizer": {
|
|
122
|
+
"enabled": true,
|
|
123
|
+
"target_metrics": ["speed", "accuracy", "efficiency"],
|
|
124
|
+
"auto_tune": true,
|
|
125
|
+
"preload": true,
|
|
126
|
+
"cache": true
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"wasm": {
|
|
130
|
+
"enabled": true,
|
|
131
|
+
"simd": true,
|
|
132
|
+
"threads": 4,
|
|
133
|
+
"memoryPages": 256
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"permissions": {
|
|
137
|
+
"allow": [
|
|
138
|
+
"Bash(npx claude-flow *)",
|
|
139
|
+
"Bash(npm run lint)",
|
|
140
|
+
"Bash(npm run test:*)",
|
|
141
|
+
"Bash(npm test *)",
|
|
142
|
+
"Bash(git status)",
|
|
143
|
+
"Bash(git diff *)",
|
|
144
|
+
"Bash(git log *)",
|
|
145
|
+
"Bash(git add *)",
|
|
146
|
+
"Bash(git commit *)",
|
|
147
|
+
"Bash(git push)",
|
|
148
|
+
"Bash(git config *)",
|
|
149
|
+
"Bash(gh *)",
|
|
150
|
+
"Bash(node *)",
|
|
151
|
+
"Bash(which *)",
|
|
152
|
+
"Bash(pwd)",
|
|
153
|
+
"Bash(ls *)"
|
|
154
|
+
],
|
|
155
|
+
"deny": [
|
|
156
|
+
"Bash(rm -rf /)",
|
|
157
|
+
"Bash(curl * | bash)",
|
|
158
|
+
"Bash(wget * | sh)",
|
|
159
|
+
"Bash(eval *)"
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
"hooks": {
|
|
163
|
+
"_optimization": {
|
|
164
|
+
"batch": true,
|
|
165
|
+
"parallel": true,
|
|
166
|
+
"cache": true,
|
|
167
|
+
"deduplicate": true
|
|
168
|
+
},
|
|
169
|
+
"PreToolUse": [
|
|
170
|
+
{
|
|
171
|
+
"matcher": "Bash",
|
|
172
|
+
"batch": true,
|
|
173
|
+
"parallel": true,
|
|
174
|
+
"hooks": [
|
|
175
|
+
{
|
|
176
|
+
"type": "command",
|
|
177
|
+
"command": "npx claude-flow@alpha hooks pre-command --command \"$CLAUDE_COMMAND\" --validate-safety true --prepare-resources true --predict-outcome true --check-patterns true --batch true --cache true"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"type": "command",
|
|
181
|
+
"command": "npx claude-flow@alpha memory store --key \"command/pre/$CLAUDE_TIMESTAMP\" --value \"$CLAUDE_COMMAND\" --namespace \"commands\" --batch true"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"type": "command",
|
|
185
|
+
"command": "npx claude-flow@alpha neural predict --model \"error_preventer\" --input \"$CLAUDE_COMMAND\" --block-if-risky true --cache true"
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
191
|
+
"batch": true,
|
|
192
|
+
"parallel": true,
|
|
193
|
+
"hooks": [
|
|
194
|
+
{
|
|
195
|
+
"type": "command",
|
|
196
|
+
"command": "npx claude-flow@alpha hooks pre-edit --file \"$CLAUDE_EDITED_FILE\" --auto-assign-agents true --load-context true --analyze-impact true --batch true --cache true"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
"type": "command",
|
|
200
|
+
"command": "npx claude-flow@alpha memory store --key \"edit/pre/$CLAUDE_EDITED_FILE\" --value \"$CLAUDE_OPERATION_CONTEXT\" --namespace \"edits\" --batch true"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"type": "command",
|
|
204
|
+
"command": "npx claude-flow@alpha neural optimize --operation \"file-edit\" --target \"$CLAUDE_EDITED_FILE\" --suggest-improvements true --cache true"
|
|
205
|
+
}
|
|
206
|
+
]
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
"PostToolUse": [
|
|
210
|
+
{
|
|
211
|
+
"matcher": "Bash",
|
|
212
|
+
"batch": true,
|
|
213
|
+
"parallel": true,
|
|
214
|
+
"hooks": [
|
|
215
|
+
{
|
|
216
|
+
"type": "command",
|
|
217
|
+
"command": "npx claude-flow@alpha hooks post-command --command \"$CLAUDE_COMMAND\" --track-metrics true --store-results true --analyze-performance true --batch true"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"type": "command",
|
|
221
|
+
"command": "npx claude-flow@alpha memory store --key \"command/post/$CLAUDE_TIMESTAMP\" --value \"{\\\"command\\\": \\\"$CLAUDE_COMMAND\\\", \\\"result\\\": \\\"$CLAUDE_RESULT\\\", \\\"duration\\\": $CLAUDE_DURATION}\" --namespace \"commands\" --batch true"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"type": "command",
|
|
225
|
+
"command": "npx claude-flow@alpha neural train --model \"performance_optimizer\" --data \"{\\\"operation\\\": \\\"bash\\\", \\\"duration\\\": $CLAUDE_DURATION, \\\"success\\\": $CLAUDE_SUCCESS}\" --batch true"
|
|
226
|
+
}
|
|
227
|
+
]
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"Stop": [
|
|
231
|
+
{
|
|
232
|
+
"hooks": [
|
|
233
|
+
{
|
|
234
|
+
"type": "command",
|
|
235
|
+
"command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true --backup-memory true --optimize-models true"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
},
|
|
241
|
+
"github": {
|
|
242
|
+
"checkpoint_branch": "checkpoints",
|
|
243
|
+
"memory_backup_gists": true,
|
|
244
|
+
"auto_issue_on_error": true,
|
|
245
|
+
"pr_on_major_improvement": true,
|
|
246
|
+
"sync_learnings": true
|
|
247
|
+
},
|
|
248
|
+
"optimization": {
|
|
249
|
+
"continuous_improvement": true,
|
|
250
|
+
"performance_targets": {
|
|
251
|
+
"command_execution": "< 100ms overhead",
|
|
252
|
+
"memory_operations": "< 20ms",
|
|
253
|
+
"neural_predictions": "< 10ms",
|
|
254
|
+
"hook_execution": "< 50ms",
|
|
255
|
+
"agent_spawn": "< 100ms"
|
|
256
|
+
},
|
|
257
|
+
"auto_tune_parameters": true,
|
|
258
|
+
"share_anonymized_patterns": true,
|
|
259
|
+
"monitoring": {
|
|
260
|
+
"enabled": true,
|
|
261
|
+
"metrics": ["latency", "throughput", "errors", "cache_hits"],
|
|
262
|
+
"alert_thresholds": {
|
|
263
|
+
"latency": 200,
|
|
264
|
+
"error_rate": 0.05
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"includeCoAuthoredBy": true,
|
|
269
|
+
"enabledMcpjsonServers": ["claude-flow", "ruv-swarm"]
|
|
270
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
{
|
|
2
|
+
"env": {
|
|
3
|
+
"CLAUDE_FLOW_AUTO_COMMIT": "true",
|
|
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_CHECKPOINT_ENABLED": "true",
|
|
10
|
+
"CLAUDE_FLOW_MEMORY_PERSISTENCE": "true",
|
|
11
|
+
"CLAUDE_FLOW_NEURAL_OPTIMIZATION": "true",
|
|
12
|
+
"CLAUDE_FLOW_AUTO_LEARNING": "true"
|
|
13
|
+
},
|
|
14
|
+
"checkpoints": {
|
|
15
|
+
"enabled": true,
|
|
16
|
+
"interval": 300,
|
|
17
|
+
"auto_commit": true,
|
|
18
|
+
"commit_message_prefix": "🔄 Checkpoint:",
|
|
19
|
+
"include_metrics": true,
|
|
20
|
+
"branch_strategy": "checkpoint/{timestamp}",
|
|
21
|
+
"max_checkpoints": 20
|
|
22
|
+
},
|
|
23
|
+
"memory": {
|
|
24
|
+
"auto_persist": true,
|
|
25
|
+
"compression": true,
|
|
26
|
+
"sync_interval": 60,
|
|
27
|
+
"namespaces": ["swarm", "tasks", "patterns", "errors", "optimizations"],
|
|
28
|
+
"retention_days": 30,
|
|
29
|
+
"backup_to_github": true
|
|
30
|
+
},
|
|
31
|
+
"neural": {
|
|
32
|
+
"auto_optimize": true,
|
|
33
|
+
"optimization_triggers": ["error", "success", "pattern", "performance"],
|
|
34
|
+
"models": {
|
|
35
|
+
"task_predictor": {
|
|
36
|
+
"enabled": true,
|
|
37
|
+
"learning_rate": 0.001,
|
|
38
|
+
"update_frequency": 100
|
|
39
|
+
},
|
|
40
|
+
"error_preventer": {
|
|
41
|
+
"enabled": true,
|
|
42
|
+
"threshold": 0.85,
|
|
43
|
+
"block_risky_operations": true
|
|
44
|
+
},
|
|
45
|
+
"performance_optimizer": {
|
|
46
|
+
"enabled": true,
|
|
47
|
+
"target_metrics": ["speed", "accuracy", "efficiency"],
|
|
48
|
+
"auto_tune": true
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"permissions": {
|
|
53
|
+
"allow": [
|
|
54
|
+
"Bash(npx claude-flow *)",
|
|
55
|
+
"Bash(npm run lint)",
|
|
56
|
+
"Bash(npm run test:*)",
|
|
57
|
+
"Bash(npm test *)",
|
|
58
|
+
"Bash(git status)",
|
|
59
|
+
"Bash(git diff *)",
|
|
60
|
+
"Bash(git log *)",
|
|
61
|
+
"Bash(git add *)",
|
|
62
|
+
"Bash(git commit *)",
|
|
63
|
+
"Bash(git push)",
|
|
64
|
+
"Bash(git config *)",
|
|
65
|
+
"Bash(gh *)",
|
|
66
|
+
"Bash(node *)",
|
|
67
|
+
"Bash(which *)",
|
|
68
|
+
"Bash(pwd)",
|
|
69
|
+
"Bash(ls *)"
|
|
70
|
+
],
|
|
71
|
+
"deny": [
|
|
72
|
+
"Bash(rm -rf /)",
|
|
73
|
+
"Bash(curl * | bash)",
|
|
74
|
+
"Bash(wget * | sh)",
|
|
75
|
+
"Bash(eval *)"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
"hooks": {
|
|
79
|
+
"PreToolUse": [
|
|
80
|
+
{
|
|
81
|
+
"matcher": "Bash",
|
|
82
|
+
"hooks": [
|
|
83
|
+
{
|
|
84
|
+
"type": "command",
|
|
85
|
+
"command": "npx claude-flow@alpha hooks pre-command --command \"$CLAUDE_COMMAND\" --validate-safety true --prepare-resources true --predict-outcome true --check-patterns true"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "command",
|
|
89
|
+
"command": "npx claude-flow@alpha memory store --key \"command/pre/$CLAUDE_TIMESTAMP\" --value \"$CLAUDE_COMMAND\" --namespace \"commands\""
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"type": "command",
|
|
93
|
+
"command": "npx claude-flow@alpha neural predict --model \"error_preventer\" --input \"$CLAUDE_COMMAND\" --block-if-risky true"
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
99
|
+
"hooks": [
|
|
100
|
+
{
|
|
101
|
+
"type": "command",
|
|
102
|
+
"command": "npx claude-flow@alpha hooks pre-edit --file \"$CLAUDE_EDITED_FILE\" --auto-assign-agents true --load-context true --analyze-impact true"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"type": "command",
|
|
106
|
+
"command": "npx claude-flow@alpha memory store --key \"edit/pre/$CLAUDE_EDITED_FILE\" --value \"$CLAUDE_OPERATION_CONTEXT\" --namespace \"edits\""
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"type": "command",
|
|
110
|
+
"command": "npx claude-flow@alpha neural optimize --operation \"file-edit\" --target \"$CLAUDE_EDITED_FILE\" --suggest-improvements true"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"matcher": "TodoWrite",
|
|
116
|
+
"hooks": [
|
|
117
|
+
{
|
|
118
|
+
"type": "command",
|
|
119
|
+
"command": "npx claude-flow@alpha memory store --key \"todos/$CLAUDE_TIMESTAMP\" --value \"$CLAUDE_TODOS\" --namespace \"tasks\""
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"type": "command",
|
|
123
|
+
"command": "npx claude-flow@alpha neural predict --model \"task_predictor\" --input \"$CLAUDE_TODOS\" --optimize-order true"
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
"PostToolUse": [
|
|
129
|
+
{
|
|
130
|
+
"matcher": "Bash",
|
|
131
|
+
"hooks": [
|
|
132
|
+
{
|
|
133
|
+
"type": "command",
|
|
134
|
+
"command": "npx claude-flow@alpha hooks post-command --command \"$CLAUDE_COMMAND\" --track-metrics true --store-results true --analyze-performance true"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"type": "command",
|
|
138
|
+
"command": "npx claude-flow@alpha memory store --key \"command/post/$CLAUDE_TIMESTAMP\" --value \"{\\\"command\\\": \\\"$CLAUDE_COMMAND\\\", \\\"result\\\": \\\"$CLAUDE_RESULT\\\", \\\"duration\\\": $CLAUDE_DURATION}\" --namespace \"commands\""
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"type": "command",
|
|
142
|
+
"command": "npx claude-flow@alpha neural train --model \"performance_optimizer\" --data \"{\\\"operation\\\": \\\"bash\\\", \\\"duration\\\": $CLAUDE_DURATION, \\\"success\\\": $CLAUDE_SUCCESS}\""
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"matcher": "Write|Edit|MultiEdit",
|
|
148
|
+
"hooks": [
|
|
149
|
+
{
|
|
150
|
+
"type": "command",
|
|
151
|
+
"command": "npx claude-flow@alpha hooks post-edit --file \"$CLAUDE_EDITED_FILE\" --format true --update-memory true --train-neural true --analyze-quality true"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"type": "command",
|
|
155
|
+
"command": "npx claude-flow@alpha memory store --key \"edit/post/$CLAUDE_EDITED_FILE\" --value \"{\\\"changes\\\": $CLAUDE_CHANGES, \\\"quality_score\\\": $CLAUDE_QUALITY_SCORE}\" --namespace \"edits\""
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"type": "command",
|
|
159
|
+
"command": "npx claude-flow@alpha neural train --model \"task_predictor\" --data \"{\\\"file_type\\\": \\\"$CLAUDE_FILE_TYPE\\\", \\\"operation\\\": \\\"$CLAUDE_OPERATION\\\", \\\"success\\\": true}\""
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"type": "command",
|
|
163
|
+
"command": "test $CLAUDE_CHECKPOINT_DUE = true && git add -A && git commit -m \"🔄 Checkpoint: $CLAUDE_EDITED_FILE edited\" || true"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"matcher": "Task",
|
|
169
|
+
"hooks": [
|
|
170
|
+
{
|
|
171
|
+
"type": "command",
|
|
172
|
+
"command": "npx claude-flow@alpha memory store --key \"task/complete/$CLAUDE_TASK_ID\" --value \"{\\\"task\\\": \\\"$CLAUDE_TASK\\\", \\\"agent\\\": \\\"$CLAUDE_AGENT\\\", \\\"result\\\": \\\"$CLAUDE_RESULT\\\"}\" --namespace \"tasks\""
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "command",
|
|
176
|
+
"command": "npx claude-flow@alpha neural train --model \"task_predictor\" --data \"{\\\"task_type\\\": \\\"$CLAUDE_TASK_TYPE\\\", \\\"agent_type\\\": \\\"$CLAUDE_AGENT_TYPE\\\", \\\"performance\\\": $CLAUDE_PERFORMANCE}\""
|
|
177
|
+
}
|
|
178
|
+
]
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"Stop": [
|
|
182
|
+
{
|
|
183
|
+
"hooks": [
|
|
184
|
+
{
|
|
185
|
+
"type": "command",
|
|
186
|
+
"command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true --backup-memory true"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"type": "command",
|
|
190
|
+
"command": "npx claude-flow@alpha memory backup --namespace \"all\" --destination \".claude/memory-backup-$CLAUDE_SESSION_ID.json\""
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"type": "command",
|
|
194
|
+
"command": "npx claude-flow@alpha neural train --model \"all\" --data \"session\" --comprehensive true"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"type": "command",
|
|
198
|
+
"command": "git add .claude/memory-backup-*.json && git commit -m \"🧠 Session memory backup: $CLAUDE_SESSION_ID\" || true"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"type": "command",
|
|
202
|
+
"command": "npx claude-flow@alpha github create-gist --name \"session-learnings-$CLAUDE_SESSION_ID\" --content \"$CLAUDE_SESSION_LEARNINGS\" --private true || true"
|
|
203
|
+
}
|
|
204
|
+
]
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"user-prompt-submit": [
|
|
208
|
+
{
|
|
209
|
+
"hooks": [
|
|
210
|
+
{
|
|
211
|
+
"type": "command",
|
|
212
|
+
"command": "npx claude-flow@alpha memory store --key \"prompt/$CLAUDE_TIMESTAMP\" --value \"$CLAUDE_PROMPT\" --namespace \"prompts\""
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
"type": "command",
|
|
216
|
+
"command": "npx claude-flow@alpha neural analyze --prompt \"$CLAUDE_PROMPT\" --suggest-approach true --predict-complexity true"
|
|
217
|
+
}
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"checkpoint": [
|
|
222
|
+
{
|
|
223
|
+
"interval": 300,
|
|
224
|
+
"hooks": [
|
|
225
|
+
{
|
|
226
|
+
"type": "command",
|
|
227
|
+
"command": "npx claude-flow@alpha checkpoint create --message \"Auto-checkpoint: $CLAUDE_OPERATIONS_COUNT operations\" --include-memory true"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
"type": "command",
|
|
231
|
+
"command": "git add -A && git commit -m \"🔄 Auto-checkpoint: $(date +%Y%m%d-%H%M%S)\" || true"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"type": "command",
|
|
235
|
+
"command": "npx claude-flow@alpha memory sync --remote true --compress true"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
],
|
|
240
|
+
"error": [
|
|
241
|
+
{
|
|
242
|
+
"hooks": [
|
|
243
|
+
{
|
|
244
|
+
"type": "command",
|
|
245
|
+
"command": "npx claude-flow@alpha memory store --key \"error/$CLAUDE_ERROR_ID\" --value \"{\\\"error\\\": \\\"$CLAUDE_ERROR\\\", \\\"context\\\": \\\"$CLAUDE_ERROR_CONTEXT\\\"}\" --namespace \"errors\""
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"type": "command",
|
|
249
|
+
"command": "npx claude-flow@alpha neural train --model \"error_preventer\" --data \"{\\\"error_type\\\": \\\"$CLAUDE_ERROR_TYPE\\\", \\\"operation\\\": \\\"$CLAUDE_OPERATION\\\", \\\"prevent\\\": true}\""
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"type": "command",
|
|
253
|
+
"command": "npx claude-flow@alpha analysis error-pattern --error \"$CLAUDE_ERROR\" --suggest-fix true --store-pattern true"
|
|
254
|
+
}
|
|
255
|
+
]
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
},
|
|
259
|
+
"github": {
|
|
260
|
+
"checkpoint_branch": "checkpoints",
|
|
261
|
+
"memory_backup_gists": true,
|
|
262
|
+
"auto_issue_on_error": true,
|
|
263
|
+
"pr_on_major_improvement": true,
|
|
264
|
+
"sync_learnings": true
|
|
265
|
+
},
|
|
266
|
+
"optimization": {
|
|
267
|
+
"continuous_improvement": true,
|
|
268
|
+
"performance_targets": {
|
|
269
|
+
"command_execution": "< 500ms overhead",
|
|
270
|
+
"memory_operations": "< 100ms",
|
|
271
|
+
"neural_predictions": "< 50ms"
|
|
272
|
+
},
|
|
273
|
+
"auto_tune_parameters": true,
|
|
274
|
+
"share_anonymized_patterns": true
|
|
275
|
+
},
|
|
276
|
+
"includeCoAuthoredBy": true,
|
|
277
|
+
"enabledMcpjsonServers": ["claude-flow", "ruv-swarm"]
|
|
278
|
+
}
|