claude-evolve 1.6.4 → 1.6.6

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/lib/ai-cli.sh CHANGED
@@ -96,28 +96,63 @@ $prompt"
96
96
  ai_output=$(timeout 300 opencode -m openrouter/x-ai/grok-4 run "$prompt" 2>&1)
97
97
  local ai_exit_code=$?
98
98
  ;;
99
- aider-qwen3)
100
- # Aider with Qwen3-Coder via Ollama
101
- # Aider edits files in place, so we need to create a temp file
102
- local temp_file=$(mktemp /tmp/aider-edit-XXXXXX.py)
103
-
104
- # Extract current algorithm from prompt if present, or create empty file
105
- # The prompt usually contains the algorithm to improve
106
- echo "# Algorithm to improve" > "$temp_file"
107
-
108
- # Run aider with the prompt
99
+ codex-qwen3)
100
+ # Qwen3-Coder via Codex CLI with Ollama backend (agentic, explores files)
109
101
  local ai_output
110
- ai_output=$(timeout 600 aider --yes --no-git --no-show-model-warnings --model ollama/qwen3-coder:30b --message "$prompt" "$temp_file" 2>&1)
102
+ ai_output=$(timeout 600 codex exec --dangerously-bypass-approvals-and-sandbox --skip-git-repo-check --oss --model qwen3-coder:30b "$prompt" 2>&1)
111
103
  local ai_exit_code=$?
104
+ ;;
105
+ aider-qwen3|qwen3)
106
+ # Qwen3-Coder via Aider + Ollama
107
+ # Extract the target filename from the prompt (e.g., "Modify the algorithm in evolution_gen01-001.py...")
108
+ local target_file
109
+ target_file=$(echo "$prompt" | sed -n 's/.*algorithm in \([^ ]*\.py\).*/\1/p' | head -1)
110
+
111
+ if [[ -z "$target_file" ]]; then
112
+ echo "[ERROR] Could not extract target filename from prompt" >&2
113
+ return 1
114
+ fi
115
+
116
+ # Check if file exists in current directory
117
+ if [[ ! -f "$target_file" ]]; then
118
+ echo "[ERROR] Target file not found: $target_file" >&2
119
+ return 1
120
+ fi
121
+
122
+ # Build context files list (read-only)
123
+ local context_args=""
112
124
 
113
- # If successful, output the modified file content
114
- if [[ $ai_exit_code -eq 0 ]]; then
115
- cat "$temp_file"
116
- ai_exit_code=$?
125
+ # Add BRIEF.md if it exists
126
+ if [[ -f "BRIEF.md" ]]; then
127
+ context_args="$context_args --read BRIEF.md"
117
128
  fi
118
129
 
119
- # Clean up
120
- rm -f "$temp_file"
130
+ # Add base algorithm.py as reference
131
+ if [[ -f "algorithm.py" ]]; then
132
+ context_args="$context_args --read algorithm.py"
133
+ fi
134
+
135
+ # IMPORTANT: Detect and add parent file for comparison
136
+ # Extract parent ID from target filename (e.g., evolution_gen05-013.py came from gen04-005)
137
+ # The file being edited is already a COPY of the parent, but we want the original
138
+ # parent file as read-only context so the AI can understand what it's building on
139
+ local target_basename=$(basename "$target_file" .py)
140
+ if [[ "$target_basename" =~ ^evolution_gen([0-9]+)-([0-9]+)$ ]]; then
141
+ local current_gen="${BASH_REMATCH[1]}"
142
+ # Look for parent in previous generation or same generation
143
+ # We can't easily determine the exact parent, so include all recent evolution files
144
+ # Actually, the file being edited IS the parent content already (it was copied)
145
+ # So we don't need to add the parent separately
146
+ :
147
+ fi
148
+
149
+ # Run aider with context files and the target file to edit
150
+ local ai_output
151
+ ai_output=$(timeout 600 aider --yes --no-git --model ollama/qwen3-coder:30b --no-show-model-warnings $context_args --message "$prompt" "$target_file" 2>&1)
152
+ local ai_exit_code=$?
153
+
154
+ # Aider modifies the file in place, so we don't need to output anything
155
+ # The file has been edited directly
121
156
  ;;
122
157
  *)
123
158
  echo "[ERROR] Unknown model: $model_name" >&2
package/lib/config.sh CHANGED
@@ -54,8 +54,8 @@ DEFAULT_MAX_RETRIES=3
54
54
  DEFAULT_MEMORY_LIMIT_MB=12288
55
55
 
56
56
  # Default LLM CLI configuration - use simple variables instead of arrays
57
- # Run: 100% local with qwen3 via Ollama
58
- DEFAULT_LLM_RUN="aider-qwen3"
57
+ # Run: 100% local with qwen3 via Codex+Ollama (more reliable than aider)
58
+ DEFAULT_LLM_RUN="codex-qwen3"
59
59
  # Ideate: Commercial models for idea generation
60
60
  DEFAULT_LLM_IDEATE="gemini sonnet-think gpt5high o3high glm grok-4"
61
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-evolve",
3
- "version": "1.6.4",
3
+ "version": "1.6.6",
4
4
  "bin": {
5
5
  "claude-evolve": "./bin/claude-evolve",
6
6
  "claude-evolve-main": "./bin/claude-evolve-main",
@@ -72,7 +72,7 @@ llm_cli:
72
72
 
73
73
  # Default configuration: 100% local code generation, commercial ideation
74
74
  # Commented out because these change over time; uncomment to override
75
- #run: aider-qwen3
75
+ #run: codex-qwen3
76
76
  #ideate: gemini sonnet-think gpt5high o3high glm grok-4
77
77
 
78
78
  # Available models:
@@ -89,4 +89,5 @@ llm_cli:
89
89
  # - glm: GLM-4.6 via OpenCode CLI
90
90
  # - grok-code-fast: Grok Code Fast 1 via OpenRouter
91
91
  # - grok-4: Grok 4 via OpenRouter
92
- # - aider-qwen3: Qwen3-Coder via Aider + Ollama (local, free)
92
+ # - codex-qwen3: Qwen3-Coder via Codex + Ollama (local, free, RECOMMENDED)
93
+ # - aider-qwen3: Qwen3-Coder via Aider + Ollama (local, free, experimental)