claude-evolve 1.6.32 → 1.7.0
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/bin/claude-evolve-worker +13 -1
- package/lib/ai-cli.sh +6 -1
- package/lib/config.sh +8 -1
- package/package.json +1 -1
- package/templates/config.yaml +7 -0
package/bin/claude-evolve-worker
CHANGED
|
@@ -517,7 +517,10 @@ except Exception as e:
|
|
|
517
517
|
# Don't reset running candidates on startup - they might be legitimately being processed by another worker
|
|
518
518
|
|
|
519
519
|
# Main worker loop
|
|
520
|
-
echo "[WORKER-$$] Worker started"
|
|
520
|
+
echo "[WORKER-$$] Worker started (will exit after $WORKER_MAX_CANDIDATES candidates)"
|
|
521
|
+
|
|
522
|
+
# Track candidates processed for self-termination
|
|
523
|
+
candidates_processed=0
|
|
521
524
|
|
|
522
525
|
while true; do
|
|
523
526
|
# Debug: Show current status of all candidates
|
|
@@ -608,6 +611,15 @@ with EvolutionCSV('$FULL_CSV_PATH') as csv:
|
|
|
608
611
|
|
|
609
612
|
# Clear current candidate
|
|
610
613
|
CURRENT_CANDIDATE_ID=""
|
|
614
|
+
|
|
615
|
+
# Increment counter and check for self-termination
|
|
616
|
+
candidates_processed=$((candidates_processed + 1))
|
|
617
|
+
echo "[WORKER-$$] Processed $candidates_processed/$WORKER_MAX_CANDIDATES candidates"
|
|
618
|
+
|
|
619
|
+
if [[ $candidates_processed -ge $WORKER_MAX_CANDIDATES ]]; then
|
|
620
|
+
echo "[WORKER-$$] Reached maximum candidates ($WORKER_MAX_CANDIDATES), exiting for refresh"
|
|
621
|
+
break
|
|
622
|
+
fi
|
|
611
623
|
done
|
|
612
624
|
|
|
613
625
|
echo "[WORKER-$$] No more pending candidates, worker exiting"
|
package/lib/ai-cli.sh
CHANGED
|
@@ -45,6 +45,11 @@ $prompt"
|
|
|
45
45
|
ai_output=$(timeout 600 claude --dangerously-skip-permissions --mcp-config '' --model opus -p "$think_prompt" 2>&1)
|
|
46
46
|
local ai_exit_code=$?
|
|
47
47
|
;;
|
|
48
|
+
haiku)
|
|
49
|
+
local ai_output
|
|
50
|
+
ai_output=$(timeout 300 claude --dangerously-skip-permissions --mcp-config '' --model haiku -p "$prompt" 2>&1)
|
|
51
|
+
local ai_exit_code=$?
|
|
52
|
+
;;
|
|
48
53
|
gpt5high)
|
|
49
54
|
local ai_output
|
|
50
55
|
ai_output=$(timeout 600 codex exec -m gpt-5 -c model_reasoning_effort="high" --dangerously-bypass-approvals-and-sandbox "$prompt" 2>&1)
|
|
@@ -89,7 +94,7 @@ $prompt"
|
|
|
89
94
|
;;
|
|
90
95
|
glm-zai)
|
|
91
96
|
local ai_output
|
|
92
|
-
ai_output=$(timeout
|
|
97
|
+
ai_output=$(timeout 1200 opencode -m zai-coding-plan/glm-4.6 run "$prompt" 2>&1)
|
|
93
98
|
local ai_exit_code=$?
|
|
94
99
|
;;
|
|
95
100
|
deepseek-openrouter)
|
package/lib/config.sh
CHANGED
|
@@ -53,8 +53,12 @@ DEFAULT_MAX_RETRIES=3
|
|
|
53
53
|
# Set to reasonable limit for ML workloads - about half of available system RAM
|
|
54
54
|
DEFAULT_MEMORY_LIMIT_MB=12288
|
|
55
55
|
|
|
56
|
+
# Default worker refresh settings
|
|
57
|
+
# Workers will exit after processing this many candidates to pick up library updates
|
|
58
|
+
DEFAULT_WORKER_MAX_CANDIDATES=3
|
|
59
|
+
|
|
56
60
|
# Default LLM CLI configuration
|
|
57
|
-
DEFAULT_LLM_RUN="glm-zai glm-zai glm-zai glm-zai glm-zai codex-oss-local gemini-flash"
|
|
61
|
+
DEFAULT_LLM_RUN="glm-zai glm-zai glm-zai glm-zai glm-zai codex-oss-local gemini-flash haiku"
|
|
58
62
|
# Ideate: Commercial models for idea generation + local fallback
|
|
59
63
|
DEFAULT_LLM_IDEATE="gemini-pro sonnet-think gpt5high glm-openrouter grok-4-openrouter deepseek-openrouter glm-zai codex-oss-local"
|
|
60
64
|
|
|
@@ -159,6 +163,7 @@ _load_yaml_config() {
|
|
|
159
163
|
auto_ideate) AUTO_IDEATE="$value" ;;
|
|
160
164
|
max_retries) MAX_RETRIES="$value" ;;
|
|
161
165
|
memory_limit_mb) MEMORY_LIMIT_MB="$value" ;;
|
|
166
|
+
worker_max_candidates) WORKER_MAX_CANDIDATES="$value" ;;
|
|
162
167
|
evolution_dir):
|
|
163
168
|
echo "[WARN] evolution_dir in config is ignored - automatically inferred from config file location" >&2
|
|
164
169
|
;;
|
|
@@ -212,6 +217,7 @@ load_config() {
|
|
|
212
217
|
AUTO_IDEATE="$DEFAULT_AUTO_IDEATE"
|
|
213
218
|
MAX_RETRIES="$DEFAULT_MAX_RETRIES"
|
|
214
219
|
MEMORY_LIMIT_MB="$DEFAULT_MEMORY_LIMIT_MB"
|
|
220
|
+
WORKER_MAX_CANDIDATES="$DEFAULT_WORKER_MAX_CANDIDATES"
|
|
215
221
|
|
|
216
222
|
LLM_RUN="$DEFAULT_LLM_RUN"
|
|
217
223
|
LLM_IDEATE="$DEFAULT_LLM_IDEATE"
|
|
@@ -307,6 +313,7 @@ show_config() {
|
|
|
307
313
|
echo " Auto ideate: $AUTO_IDEATE"
|
|
308
314
|
echo " Max retries: $MAX_RETRIES"
|
|
309
315
|
echo " Memory limit: ${MEMORY_LIMIT_MB}MB"
|
|
316
|
+
echo " Worker max candidates: $WORKER_MAX_CANDIDATES"
|
|
310
317
|
echo " LLM configuration:"
|
|
311
318
|
# Show LLM configurations using dynamic variable names
|
|
312
319
|
for model in gpt5high o3high codex gemini opus opus_think sonnet sonnet_think cursor_sonnet cursor_opus glm deepseek; do
|
package/package.json
CHANGED
package/templates/config.yaml
CHANGED
|
@@ -53,6 +53,13 @@ max_retries: 3
|
|
|
53
53
|
# Recommendation: Set to ~50-75% of available system RAM
|
|
54
54
|
memory_limit_mb: 12288
|
|
55
55
|
|
|
56
|
+
# Worker refresh configuration
|
|
57
|
+
# Workers will automatically exit after processing this many candidates
|
|
58
|
+
# This allows them to pick up library updates without manual restarts
|
|
59
|
+
# Lower values = more frequent refreshes, higher values = less overhead
|
|
60
|
+
# Recommended: 1-5 for development, 10-20 for production
|
|
61
|
+
worker_max_candidates: 3
|
|
62
|
+
|
|
56
63
|
# Parallel execution configuration
|
|
57
64
|
parallel:
|
|
58
65
|
# Enable parallel execution of evolution candidates
|