claude-flow 2.0.0-alpha.68 → 2.0.0-alpha.69

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.
@@ -0,0 +1,96 @@
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
+ },
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(gh *)",
26
+ "Bash(node *)",
27
+ "Bash(which *)",
28
+ "Bash(pwd)",
29
+ "Bash(ls *)"
30
+ ],
31
+ "deny": [
32
+ "Bash(rm -rf /)",
33
+ "Bash(curl * | bash)",
34
+ "Bash(wget * | sh)",
35
+ "Bash(eval *)"
36
+ ]
37
+ },
38
+ "hooks": {
39
+ "PreToolUse": [
40
+ {
41
+ "matcher": "Bash",
42
+ "hooks": [
43
+ {
44
+ "type": "command",
45
+ "command": "echo '[PreToolUse:Bash] Command: $CLAUDE_COMMAND'"
46
+ }
47
+ ]
48
+ },
49
+ {
50
+ "matcher": "Write|Edit|MultiEdit",
51
+ "hooks": [
52
+ {
53
+ "type": "command",
54
+ "command": "echo '[PreToolUse:Edit] File: $CLAUDE_EDITED_FILE'"
55
+ }
56
+ ]
57
+ }
58
+ ],
59
+ "PostToolUse": [
60
+ {
61
+ "matcher": "Bash",
62
+ "hooks": [
63
+ {
64
+ "type": "command",
65
+ "command": "echo '[PostToolUse:Bash] Completed'"
66
+ }
67
+ ]
68
+ },
69
+ {
70
+ "matcher": "Write|Edit|MultiEdit",
71
+ "hooks": [
72
+ {
73
+ "type": "command",
74
+ "command": "echo '[PostToolUse:Edit] File: $CLAUDE_EDITED_FILE'"
75
+ },
76
+ {
77
+ "type": "command",
78
+ "command": "test \"$CLAUDE_CHECKPOINT_DUE\" = \"true\" && git add -A && git commit -m \"🔄 Checkpoint: $CLAUDE_EDITED_FILE edited\" || true"
79
+ }
80
+ ]
81
+ }
82
+ ],
83
+ "Stop": [
84
+ {
85
+ "hooks": [
86
+ {
87
+ "type": "command",
88
+ "command": "echo '[Stop] Session ended'"
89
+ }
90
+ ]
91
+ }
92
+ ]
93
+ },
94
+ "includeCoAuthoredBy": true,
95
+ "enabledMcpjsonServers": ["claude-flow", "ruv-swarm"]
96
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "env": {
3
+ "CLAUDE_FLOW_HOOKS_ENABLED": "true"
4
+ },
5
+ "permissions": {
6
+ "allow": [
7
+ "Bash(npx claude-flow *)",
8
+ "Bash(npm *)",
9
+ "Bash(git *)",
10
+ "Bash(gh *)",
11
+ "Bash(node *)",
12
+ "Bash(pwd)",
13
+ "Bash(ls *)"
14
+ ]
15
+ },
16
+ "hooks": {
17
+ "PreToolUse": [
18
+ {
19
+ "matcher": "Bash",
20
+ "hooks": [
21
+ {
22
+ "type": "command",
23
+ "command": "echo 'PreToolUse:Bash hook executed for command: $CLAUDE_COMMAND'"
24
+ }
25
+ ]
26
+ }
27
+ ],
28
+ "PostToolUse": [
29
+ {
30
+ "matcher": "Bash",
31
+ "hooks": [
32
+ {
33
+ "type": "command",
34
+ "command": "echo 'PostToolUse:Bash hook executed'"
35
+ }
36
+ ]
37
+ }
38
+ ],
39
+ "Stop": [
40
+ {
41
+ "hooks": [
42
+ {
43
+ "type": "command",
44
+ "command": "echo 'Stop hook executed'"
45
+ }
46
+ ]
47
+ }
48
+ ]
49
+ },
50
+ "includeCoAuthoredBy": true,
51
+ "enabledMcpjsonServers": ["claude-flow", "ruv-swarm"]
52
+ }
@@ -0,0 +1,110 @@
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
+ "permissions": {
15
+ "allow": [
16
+ "Bash(npx claude-flow *)",
17
+ "Bash(npm run lint)",
18
+ "Bash(npm run test:*)",
19
+ "Bash(npm test *)",
20
+ "Bash(git status)",
21
+ "Bash(git diff *)",
22
+ "Bash(git log *)",
23
+ "Bash(git add *)",
24
+ "Bash(git commit *)",
25
+ "Bash(git push)",
26
+ "Bash(git config *)",
27
+ "Bash(gh *)",
28
+ "Bash(node *)",
29
+ "Bash(which *)",
30
+ "Bash(pwd)",
31
+ "Bash(ls *)"
32
+ ],
33
+ "deny": [
34
+ "Bash(rm -rf /)",
35
+ "Bash(curl * | bash)",
36
+ "Bash(wget * | sh)",
37
+ "Bash(eval *)"
38
+ ]
39
+ },
40
+ "hooks": {
41
+ "PreToolUse": [
42
+ {
43
+ "matcher": "Bash",
44
+ "hooks": [
45
+ {
46
+ "type": "command",
47
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.command // \"\"')\" | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true"
48
+ },
49
+ {
50
+ "type": "command",
51
+ "command": "npx claude-flow@alpha memory store \"cmd_pre_$(date +%s)\" \"$CLAUDE_COMMAND\" --namespace commands"
52
+ }
53
+ ]
54
+ },
55
+ {
56
+ "matcher": "Write|Edit|MultiEdit",
57
+ "hooks": [
58
+ {
59
+ "type": "command",
60
+ "command": "echo \"[PreEdit] File: $CLAUDE_EDITED_FILE\""
61
+ }
62
+ ]
63
+ }
64
+ ],
65
+ "PostToolUse": [
66
+ {
67
+ "matcher": "Bash",
68
+ "hooks": [
69
+ {
70
+ "type": "command",
71
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.command // \"\"')\" | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true"
72
+ },
73
+ {
74
+ "type": "command",
75
+ "command": "npx claude-flow@alpha training pattern-learn --operation bash-command --outcome success"
76
+ }
77
+ ]
78
+ },
79
+ {
80
+ "matcher": "Write|Edit|MultiEdit",
81
+ "hooks": [
82
+ {
83
+ "type": "command",
84
+ "command": "echo \"[PostEdit] File: $CLAUDE_EDITED_FILE\""
85
+ },
86
+ {
87
+ "type": "command",
88
+ "command": "npx claude-flow@alpha training pattern-learn --operation file-edit --outcome success"
89
+ }
90
+ ]
91
+ }
92
+ ],
93
+ "Stop": [
94
+ {
95
+ "hooks": [
96
+ {
97
+ "type": "command",
98
+ "command": "echo \"[Stop] Session ended - training neural networks\""
99
+ },
100
+ {
101
+ "type": "command",
102
+ "command": "npx claude-flow@alpha training neural-train --data recent --model general-predictor --epochs 5"
103
+ }
104
+ ]
105
+ }
106
+ ]
107
+ },
108
+ "includeCoAuthoredBy": true,
109
+ "enabledMcpjsonServers": ["claude-flow", "ruv-swarm"]
110
+ }
@@ -44,45 +44,20 @@
44
44
  "hooks": [
45
45
  {
46
46
  "type": "command",
47
- "command": "cat | jq -r '.tool_input.command // \"\"' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true --predict-outcome true --check-patterns true"
47
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.command // \"\"')\" | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true"
48
48
  },
49
49
  {
50
50
  "type": "command",
51
- "command": "npx claude-flow@alpha memory store --key \"command/pre/$CLAUDE_TIMESTAMP\" --value \"$CLAUDE_COMMAND\" --namespace \"commands\""
52
- },
53
- {
54
- "type": "command",
55
- "command": "npx claude-flow@alpha neural predict --model \"error_preventer\" --input \"$CLAUDE_COMMAND\" --block-if-risky true"
56
- }
57
- ]
58
- },
59
- {
60
- "matcher": "Write|Edit|MultiEdit",
61
- "hooks": [
62
- {
63
- "type": "command",
64
- "command": "npx claude-flow@alpha hooks pre-edit --file \"$CLAUDE_EDITED_FILE\" --auto-assign-agents true --load-context true --analyze-impact true"
65
- },
66
- {
67
- "type": "command",
68
- "command": "npx claude-flow@alpha memory store --key \"edit/pre/$CLAUDE_EDITED_FILE\" --value \"$CLAUDE_OPERATION_CONTEXT\" --namespace \"edits\""
69
- },
70
- {
71
- "type": "command",
72
- "command": "npx claude-flow@alpha neural optimize --operation \"file-edit\" --target \"$CLAUDE_EDITED_FILE\" --suggest-improvements true"
51
+ "command": "npx claude-flow@alpha memory store \"cmd_pre_$(date +%s)\" \"$CLAUDE_COMMAND\" --namespace commands"
73
52
  }
74
53
  ]
75
54
  },
76
55
  {
77
- "matcher": "TodoWrite",
56
+ "matcher": "Write|Edit|MultiEdit",
78
57
  "hooks": [
79
58
  {
80
59
  "type": "command",
81
- "command": "npx claude-flow@alpha memory store --key \"todos/$CLAUDE_TIMESTAMP\" --value \"$CLAUDE_TODOS\" --namespace \"tasks\""
82
- },
83
- {
84
- "type": "command",
85
- "command": "npx claude-flow@alpha neural predict --model \"task_predictor\" --input \"$CLAUDE_TODOS\" --optimize-order true"
60
+ "command": "echo \"[PreEdit] File: $CLAUDE_EDITED_FILE\""
86
61
  }
87
62
  ]
88
63
  }
@@ -93,15 +68,11 @@
93
68
  "hooks": [
94
69
  {
95
70
  "type": "command",
96
- "command": "cat | jq -r '.tool_input.command // \"\"' | tr '\\n' '\\0' | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true --analyze-performance true"
97
- },
98
- {
99
- "type": "command",
100
- "command": "npx claude-flow@alpha memory store --key \"command/post/$CLAUDE_TIMESTAMP\" --value \"{\\\"command\\\": \\\"$CLAUDE_COMMAND\\\", \\\"result\\\": \\\"$CLAUDE_RESULT\\\", \\\"duration\\\": $CLAUDE_DURATION}\" --namespace \"commands\""
71
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.command // \"\"')\" | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true"
101
72
  },
102
73
  {
103
74
  "type": "command",
104
- "command": "npx claude-flow@alpha neural train --model \"performance_optimizer\" --data \"{\\\"operation\\\": \\\"bash\\\", \\\"duration\\\": $CLAUDE_DURATION, \\\"success\\\": $CLAUDE_SUCCESS}\""
75
+ "command": "npx claude-flow@alpha training pattern-learn --operation bash-command --outcome success"
105
76
  }
106
77
  ]
107
78
  },
@@ -110,32 +81,11 @@
110
81
  "hooks": [
111
82
  {
112
83
  "type": "command",
113
- "command": "npx claude-flow@alpha hooks post-edit --file \"$CLAUDE_EDITED_FILE\" --format true --update-memory true --train-neural true --analyze-quality true"
114
- },
115
- {
116
- "type": "command",
117
- "command": "npx claude-flow@alpha memory store --key \"edit/post/$CLAUDE_EDITED_FILE\" --value \"{\\\"changes\\\": $CLAUDE_CHANGES, \\\"quality_score\\\": $CLAUDE_QUALITY_SCORE}\" --namespace \"edits\""
118
- },
119
- {
120
- "type": "command",
121
- "command": "npx claude-flow@alpha neural train --model \"task_predictor\" --data \"{\\\"file_type\\\": \\\"$CLAUDE_FILE_TYPE\\\", \\\"operation\\\": \\\"$CLAUDE_OPERATION\\\", \\\"success\\\": true}\""
122
- },
123
- {
124
- "type": "command",
125
- "command": "test $CLAUDE_CHECKPOINT_DUE = true && git add -A && git commit -m \"🔄 Checkpoint: $CLAUDE_EDITED_FILE edited\" || true"
126
- }
127
- ]
128
- },
129
- {
130
- "matcher": "Task",
131
- "hooks": [
132
- {
133
- "type": "command",
134
- "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\""
84
+ "command": "echo \"[PostEdit] File: $CLAUDE_EDITED_FILE\""
135
85
  },
136
86
  {
137
87
  "type": "command",
138
- "command": "npx claude-flow@alpha neural train --model \"task_predictor\" --data \"{\\\"task_type\\\": \\\"$CLAUDE_TASK_TYPE\\\", \\\"agent_type\\\": \\\"$CLAUDE_AGENT_TYPE\\\", \\\"performance\\\": $CLAUDE_PERFORMANCE}\""
88
+ "command": "npx claude-flow@alpha training pattern-learn --operation file-edit --outcome success"
139
89
  }
140
90
  ]
141
91
  }
@@ -145,37 +95,11 @@
145
95
  "hooks": [
146
96
  {
147
97
  "type": "command",
148
- "command": "npx claude-flow@alpha hooks session-end --generate-summary true --persist-state true --export-metrics true --backup-memory true"
149
- },
150
- {
151
- "type": "command",
152
- "command": "npx claude-flow@alpha memory backup --namespace \"all\" --destination \".claude/memory-backup-$CLAUDE_SESSION_ID.json\""
153
- },
154
- {
155
- "type": "command",
156
- "command": "npx claude-flow@alpha neural train --model \"all\" --data \"session\" --comprehensive true"
157
- },
158
- {
159
- "type": "command",
160
- "command": "git add .claude/memory-backup-*.json && git commit -m \"🧠 Session memory backup: $CLAUDE_SESSION_ID\" || true"
161
- },
162
- {
163
- "type": "command",
164
- "command": "npx claude-flow@alpha github create-gist --name \"session-learnings-$CLAUDE_SESSION_ID\" --content \"$CLAUDE_SESSION_LEARNINGS\" --private true || true"
165
- }
166
- ]
167
- }
168
- ],
169
- "UserPromptSubmit": [
170
- {
171
- "hooks": [
172
- {
173
- "type": "command",
174
- "command": "npx claude-flow@alpha memory store --key \"prompt/$CLAUDE_TIMESTAMP\" --value \"$CLAUDE_PROMPT\" --namespace \"prompts\""
98
+ "command": "echo \"[Stop] Session ended - training neural networks\""
175
99
  },
176
100
  {
177
- "type": "command",
178
- "command": "npx claude-flow@alpha neural analyze --prompt \"$CLAUDE_PROMPT\" --suggest-approach true --predict-complexity true"
101
+ "type": "command",
102
+ "command": "npx claude-flow@alpha training neural-train --data recent --model general-predictor --epochs 5"
179
103
  }
180
104
  ]
181
105
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,20 @@ 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.69] - 2025-01-22
9
+
10
+ ### 🔧 Critical Fix
11
+ - **Init Template**: Fixed `claude-flow init` creating broken settings.json with xargs quote errors
12
+ - Updated template to use `printf '%s\0'` instead of problematic `cat | jq | xargs -I` pipeline
13
+ - Changed to `xargs -0` with single quotes around `{}` placeholders
14
+ - Removed non-existent `--train-neural` flag from post-edit hooks
15
+ - All new projects initialized with `claude-flow init` now have working hooks
16
+
17
+ ### 🛠️ Template Improvements
18
+ - **Safer Command Execution**: Printf-based approach prevents quote parsing issues
19
+ - **Better Error Handling**: Commands fail gracefully instead of breaking xargs
20
+ - **Cleaner Syntax**: Simplified hook commands for better reliability
21
+
8
22
  ## [2.0.0-alpha.68] - 2025-01-22
9
23
 
10
24
  ### 🔧 Critical Bug Fixes
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.68"
4
+ VERSION="2.0.0-alpha.69"
5
5
 
6
6
  # Determine the correct path based on how the script is invoked
7
7
  if [ -L "$0" ]; then
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-flow",
3
- "version": "2.0.0-alpha.68",
3
+ "version": "2.0.0-alpha.69",
4
4
  "description": "Enterprise-grade AI agent orchestration with ruv-swarm integration (Alpha Release)",
5
5
  "main": "cli.mjs",
6
6
  "bin": {
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { HelpFormatter } from './help-formatter.js';
7
7
 
8
- export const VERSION = '2.0.0-alpha.68';
8
+ export const VERSION = '2.0.0-alpha.69';
9
9
 
10
10
  export const MAIN_HELP = `
11
11
  🌊 Claude-Flow v${VERSION} - Enterprise-Grade AI Agent Orchestration Platform
@@ -27,7 +27,7 @@ import process from 'process';
27
27
  import readline from 'readline';
28
28
  import { getMainHelp, getCommandHelp, getStandardizedCommandHelp } from './help-text.js';
29
29
 
30
- const VERSION = '2.0.0-alpha.68';
30
+ const VERSION = '2.0.0-alpha.69';
31
31
 
32
32
  function printHelp(plain = false) {
33
33
  console.log(getMainHelp(plain));
@@ -40,7 +40,7 @@
40
40
  "hooks": [
41
41
  {
42
42
  "type": "command",
43
- "command": "cat | jq -r '.tool_input.command // \"\"' | xargs -I {} npx claude-flow@alpha hooks pre-command --command \"{}\" --validate-safety true --prepare-resources true"
43
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.command // \"\")\" | xargs -0 -I {} npx claude-flow@alpha hooks pre-command --command '{}' --validate-safety true --prepare-resources true"
44
44
  }
45
45
  ]
46
46
  },
@@ -49,7 +49,7 @@
49
49
  "hooks": [
50
50
  {
51
51
  "type": "command",
52
- "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // \"\"' | xargs -I {} npx claude-flow@alpha hooks pre-edit --file \"{}\" --auto-assign-agents true --load-context true"
52
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.file_path // .tool_input.path // \"\")\" | xargs -0 -I {} npx claude-flow@alpha hooks pre-edit --file '{}' --auto-assign-agents true --load-context true"
53
53
  }
54
54
  ]
55
55
  }
@@ -60,7 +60,7 @@
60
60
  "hooks": [
61
61
  {
62
62
  "type": "command",
63
- "command": "cat | jq -r '.tool_input.command // \"\"' | xargs -I {} npx claude-flow@alpha hooks post-command --command \"{}\" --track-metrics true --store-results true"
63
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.command // \"\")\" | xargs -0 -I {} npx claude-flow@alpha hooks post-command --command '{}' --track-metrics true --store-results true"
64
64
  }
65
65
  ]
66
66
  },
@@ -69,7 +69,7 @@
69
69
  "hooks": [
70
70
  {
71
71
  "type": "command",
72
- "command": "cat | jq -r '.tool_input.file_path // .tool_input.path // \"\"' | xargs -I {} npx claude-flow@alpha hooks post-edit --file \"{}\" --format true --update-memory true --train-neural true"
72
+ "command": "printf '%s\\0' \"$(cat | jq -r '.tool_input.file_path // .tool_input.path // \"\")\" | xargs -0 -I {} npx claude-flow@alpha hooks post-edit --file '{}' --format true --update-memory true"
73
73
  }
74
74
  ]
75
75
  }