@claude-flow/cli 3.1.0-alpha.2 → 3.1.0-alpha.21

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 (36) hide show
  1. package/.claude/helpers/auto-memory-hook.mjs +350 -0
  2. package/.claude/helpers/hook-handler.cjs +185 -0
  3. package/.claude/settings.json +86 -141
  4. package/README.md +603 -353
  5. package/bin/cli.js +6 -2
  6. package/dist/src/commands/hooks.d.ts.map +1 -1
  7. package/dist/src/commands/hooks.js +209 -2
  8. package/dist/src/commands/hooks.js.map +1 -1
  9. package/dist/src/commands/init.d.ts.map +1 -1
  10. package/dist/src/commands/init.js +190 -4
  11. package/dist/src/commands/init.js.map +1 -1
  12. package/dist/src/commands/memory.d.ts.map +1 -1
  13. package/dist/src/commands/memory.js +12 -2
  14. package/dist/src/commands/memory.js.map +1 -1
  15. package/dist/src/init/executor.d.ts +8 -2
  16. package/dist/src/init/executor.d.ts.map +1 -1
  17. package/dist/src/init/executor.js +247 -5
  18. package/dist/src/init/executor.js.map +1 -1
  19. package/dist/src/init/settings-generator.d.ts.map +1 -1
  20. package/dist/src/init/settings-generator.js +146 -14
  21. package/dist/src/init/settings-generator.js.map +1 -1
  22. package/dist/src/init/types.d.ts +10 -0
  23. package/dist/src/init/types.d.ts.map +1 -1
  24. package/dist/src/init/types.js +11 -0
  25. package/dist/src/init/types.js.map +1 -1
  26. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  27. package/dist/src/mcp-tools/memory-tools.js +4 -1
  28. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  29. package/dist/src/memory/memory-initializer.d.ts +1 -0
  30. package/dist/src/memory/memory-initializer.d.ts.map +1 -1
  31. package/dist/src/memory/memory-initializer.js +14 -9
  32. package/dist/src/memory/memory-initializer.js.map +1 -1
  33. package/dist/src/services/headless-worker-executor.js +3 -3
  34. package/dist/src/services/headless-worker-executor.js.map +1 -1
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/package.json +4 -2
@@ -1,123 +1,95 @@
1
1
  {
2
+ "env": {
3
+ "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1",
4
+ "CLAUDE_FLOW_V3_ENABLED": "true",
5
+ "CLAUDE_FLOW_HOOKS_ENABLED": "true"
6
+ },
2
7
  "hooks": {
3
8
  "PreToolUse": [
4
9
  {
5
- "matcher": "^(Write|Edit|MultiEdit)$",
6
- "hooks": [
7
- {
8
- "type": "command",
9
- "command": "[ -n \"$TOOL_INPUT_file_path\" ] && npx @claude-flow/cli@latest hooks pre-edit --file \"$TOOL_INPUT_file_path\" 2>/dev/null || true",
10
- "timeout": 5000,
11
- "continueOnError": true
12
- }
13
- ]
14
- },
15
- {
16
- "matcher": "^Bash$",
17
- "hooks": [
18
- {
19
- "type": "command",
20
- "command": "[ -n \"$TOOL_INPUT_command\" ] && npx @claude-flow/cli@latest hooks pre-command --command \"$TOOL_INPUT_command\" 2>/dev/null || true",
21
- "timeout": 5000,
22
- "continueOnError": true
23
- }
24
- ]
25
- },
26
- {
27
- "matcher": "^Task$",
10
+ "matcher": "Bash",
28
11
  "hooks": [
29
12
  {
30
13
  "type": "command",
31
- "command": "[ -n \"$TOOL_INPUT_prompt\" ] && npx @claude-flow/cli@latest hooks pre-task --task-id \"task-$(date +%s)\" --description \"$TOOL_INPUT_prompt\" 2>/dev/null || true",
32
- "timeout": 5000,
33
- "continueOnError": true
14
+ "command": "node .claude/helpers/hook-handler.cjs pre-bash",
15
+ "timeout": 5000
34
16
  }
35
17
  ]
36
18
  }
37
19
  ],
38
20
  "PostToolUse": [
39
21
  {
40
- "matcher": "^(Write|Edit|MultiEdit)$",
22
+ "matcher": "Write|Edit|MultiEdit",
41
23
  "hooks": [
42
24
  {
43
25
  "type": "command",
44
- "command": "[ -n \"$TOOL_INPUT_file_path\" ] && npx @claude-flow/cli@latest hooks post-edit --file \"$TOOL_INPUT_file_path\" --success \"${TOOL_SUCCESS:-true}\" 2>/dev/null || true",
45
- "timeout": 5000,
46
- "continueOnError": true
26
+ "command": "node .claude/helpers/hook-handler.cjs post-edit",
27
+ "timeout": 10000
47
28
  }
48
29
  ]
49
- },
30
+ }
31
+ ],
32
+ "UserPromptSubmit": [
50
33
  {
51
- "matcher": "^Bash$",
52
34
  "hooks": [
53
35
  {
54
36
  "type": "command",
55
- "command": "[ -n \"$TOOL_INPUT_command\" ] && npx @claude-flow/cli@latest hooks post-command --command \"$TOOL_INPUT_command\" --success \"${TOOL_SUCCESS:-true}\" 2>/dev/null || true",
56
- "timeout": 5000,
57
- "continueOnError": true
37
+ "command": "node .claude/helpers/hook-handler.cjs route",
38
+ "timeout": 10000
58
39
  }
59
40
  ]
60
- },
41
+ }
42
+ ],
43
+ "SessionStart": [
61
44
  {
62
- "matcher": "^Task$",
45
+ "matcher": "startup|resume",
63
46
  "hooks": [
64
47
  {
65
48
  "type": "command",
66
- "command": "[ -n \"$TOOL_RESULT_agent_id\" ] && npx @claude-flow/cli@latest hooks post-task --task-id \"$TOOL_RESULT_agent_id\" --success \"${TOOL_SUCCESS:-true}\" 2>/dev/null || true",
67
- "timeout": 5000,
49
+ "command": "node .claude/helpers/hook-handler.cjs session-restore",
50
+ "timeout": 15000,
68
51
  "continueOnError": true
69
- }
70
- ]
71
- }
72
- ],
73
- "UserPromptSubmit": [
74
- {
75
- "hooks": [
52
+ },
76
53
  {
77
54
  "type": "command",
78
- "command": "[ -n \"$PROMPT\" ] && npx @claude-flow/cli@latest hooks route --task \"$PROMPT\" || true",
79
- "timeout": 5000,
55
+ "command": "node .claude/helpers/auto-memory-hook.mjs import",
56
+ "timeout": 8000,
80
57
  "continueOnError": true
81
58
  }
82
59
  ]
83
60
  }
84
61
  ],
85
- "SessionStart": [
62
+ "SessionEnd": [
86
63
  {
87
64
  "hooks": [
88
65
  {
89
66
  "type": "command",
90
- "command": "npx @claude-flow/cli@latest daemon start --quiet 2>/dev/null || true",
91
- "timeout": 5000,
92
- "continueOnError": true
93
- },
94
- {
95
- "type": "command",
96
- "command": "[ -n \"$SESSION_ID\" ] && npx @claude-flow/cli@latest hooks session-restore --session-id \"$SESSION_ID\" 2>/dev/null || true",
67
+ "command": "node .claude/helpers/hook-handler.cjs session-end",
97
68
  "timeout": 10000,
98
69
  "continueOnError": true
99
70
  }
100
71
  ]
101
72
  }
102
73
  ],
103
- "Stop": [
74
+ "SubagentStart": [
104
75
  {
105
76
  "hooks": [
106
77
  {
107
78
  "type": "command",
108
- "command": "echo '{\"ok\": true}'",
109
- "timeout": 1000
79
+ "command": "node .claude/helpers/hook-handler.cjs status",
80
+ "timeout": 3000,
81
+ "continueOnError": true
110
82
  }
111
83
  ]
112
84
  }
113
85
  ],
114
- "Notification": [
86
+ "Stop": [
115
87
  {
116
88
  "hooks": [
117
89
  {
118
90
  "type": "command",
119
- "command": "[ -n \"$NOTIFICATION_MESSAGE\" ] && npx @claude-flow/cli@latest memory store --namespace notifications --key \"notify-$(date +%s)\" --value \"$NOTIFICATION_MESSAGE\" 2>/dev/null || true",
120
- "timeout": 3000,
91
+ "command": "node .claude/helpers/auto-memory-hook.mjs sync",
92
+ "timeout": 10000,
121
93
  "continueOnError": true
122
94
  }
123
95
  ]
@@ -126,24 +98,44 @@
126
98
  },
127
99
  "statusLine": {
128
100
  "type": "command",
129
- "command": "npx @claude-flow/cli@latest hooks statusline 2>/dev/null || node .claude/helpers/statusline.cjs 2>/dev/null || echo \"▊ Claude Flow V3\"",
101
+ "command": "node .claude/helpers/statusline.cjs",
130
102
  "refreshMs": 5000,
131
103
  "enabled": true
132
104
  },
133
105
  "permissions": {
134
106
  "allow": [
135
- "Bash(npx claude-flow:*)",
136
- "Bash(npx @claude-flow/cli:*)",
107
+ "Bash(npx @claude-flow*)",
108
+ "Bash(npx claude-flow*)",
109
+ "Bash(node .claude/*)",
137
110
  "mcp__claude-flow__:*"
138
111
  ],
139
- "deny": []
112
+ "deny": [
113
+ "Read(./.env)",
114
+ "Read(./.env.*)"
115
+ ]
116
+ },
117
+ "attribution": {
118
+ "commit": "Co-Authored-By: claude-flow <ruv@ruv.net>",
119
+ "pr": "Generated with [claude-flow](https://github.com/ruvnet/claude-flow)"
140
120
  },
141
121
  "claudeFlow": {
142
- "version": "3.0.0",
122
+ "version": "3.1.0",
143
123
  "enabled": true,
144
124
  "modelPreferences": {
145
- "default": "claude-opus-4-5-20251101",
146
- "routing": "claude-3-5-haiku-20241022"
125
+ "default": "claude-opus-4-6",
126
+ "routing": "claude-haiku-4-5-20251001"
127
+ },
128
+ "agentTeams": {
129
+ "enabled": true,
130
+ "teammateMode": "auto",
131
+ "taskListEnabled": true,
132
+ "mailboxEnabled": true,
133
+ "coordination": {
134
+ "autoAssignOnIdle": true,
135
+ "trainPatternsOnComplete": true,
136
+ "notifyLeadOnComplete": true,
137
+ "sharedMemoryNamespace": "agent-teams"
138
+ }
147
139
  },
148
140
  "swarm": {
149
141
  "topology": "hierarchical-mesh",
@@ -151,87 +143,40 @@
151
143
  },
152
144
  "memory": {
153
145
  "backend": "hybrid",
154
- "enableHNSW": true
146
+ "enableHNSW": true,
147
+ "learningBridge": {
148
+ "enabled": true,
149
+ "sonaMode": "balanced",
150
+ "confidenceDecayRate": 0.005,
151
+ "accessBoostAmount": 0.03,
152
+ "consolidationThreshold": 10
153
+ },
154
+ "memoryGraph": {
155
+ "enabled": true,
156
+ "pageRankDamping": 0.85,
157
+ "communityAlgorithm": "label-propagation"
158
+ },
159
+ "agentScopes": {
160
+ "enabled": true,
161
+ "scopes": ["project", "local", "user"]
162
+ }
155
163
  },
156
164
  "neural": {
157
165
  "enabled": true
158
166
  },
167
+ "security": {
168
+ "autoScan": true,
169
+ "scanOnEdit": true,
170
+ "cveCheck": true
171
+ },
159
172
  "daemon": {
160
173
  "autoStart": true,
161
- "workers": [
162
- "map",
163
- "audit",
164
- "optimize",
165
- "consolidate",
166
- "testgaps",
167
- "ultralearn",
168
- "deepdive",
169
- "document",
170
- "refactor",
171
- "benchmark"
172
- ],
173
- "schedules": {
174
- "audit": {
175
- "interval": "1h",
176
- "priority": "critical"
177
- },
178
- "optimize": {
179
- "interval": "30m",
180
- "priority": "high"
181
- },
182
- "consolidate": {
183
- "interval": "2h",
184
- "priority": "low"
185
- },
186
- "document": {
187
- "interval": "1h",
188
- "priority": "normal",
189
- "triggers": [
190
- "adr-update",
191
- "api-change"
192
- ]
193
- },
194
- "deepdive": {
195
- "interval": "4h",
196
- "priority": "normal",
197
- "triggers": [
198
- "complex-change"
199
- ]
200
- },
201
- "ultralearn": {
202
- "interval": "1h",
203
- "priority": "normal"
204
- }
205
- }
174
+ "workers": ["map", "audit", "optimize", "consolidate", "testgaps", "ultralearn"]
206
175
  },
207
176
  "learning": {
208
177
  "enabled": true,
209
178
  "autoTrain": true,
210
- "patterns": [
211
- "coordination",
212
- "optimization",
213
- "prediction"
214
- ],
215
- "retention": {
216
- "shortTerm": "24h",
217
- "longTerm": "30d"
218
- }
219
- },
220
- "adr": {
221
- "autoGenerate": true,
222
- "directory": "/docs/adr",
223
- "template": "madr"
224
- },
225
- "ddd": {
226
- "trackDomains": true,
227
- "validateBoundedContexts": true,
228
- "directory": "/docs/ddd"
229
- },
230
- "security": {
231
- "autoScan": true,
232
- "scanOnEdit": true,
233
- "cveCheck": true,
234
- "threatModel": true
179
+ "patterns": ["coordination", "optimization", "prediction"]
235
180
  }
236
181
  }
237
- }
182
+ }