claude-evolve 1.3.38 → 1.3.39

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/README.md CHANGED
@@ -205,7 +205,7 @@ your-project/
205
205
 
206
206
  ## Evaluator Output Format
207
207
 
208
- Your evaluator must output a performance score to stdout. Three formats are supported:
208
+ Your evaluator must output a performance score to stdout. The system looks for either `performance` or `score` fields. Four formats are supported:
209
209
 
210
210
  ### 1. Plain Number (Simplest)
211
211
  Just output a single floating-point number:
@@ -227,7 +227,8 @@ Just output a single floating-point number:
227
227
  You can include additional metrics that will be automatically added as new columns to the CSV:
228
228
  ```json
229
229
  {
230
- "score": 0.95,
230
+ "performance": 0.95,
231
+ "fitness": 0.82,
231
232
  "sharpe_ratio": 1.23,
232
233
  "max_drawdown": -0.15,
233
234
  "total_return": 0.42,
@@ -236,12 +237,14 @@ You can include additional metrics that will be automatically added as new colum
236
237
  ```
237
238
 
238
239
  **Important notes:**
240
+ - The system accepts either `performance` or `score` (they are treated the same)
239
241
  - Higher scores indicate better performance
240
- - A score of 0 indicates complete failure
242
+ - A score of 0 indicates complete failure and marks the candidate as "failed"
241
243
  - Non-zero exit codes indicate evaluation errors
242
244
  - Any additional output (warnings, logs) should go to stderr, not stdout
243
245
  - Additional JSON fields will be automatically added as new CSV columns
244
246
  - New columns are added after the standard columns (id, basedOnId, description, performance, status)
247
+ - Common additional fields include: fitness, sharpe, sortino, total_return, yearly_return, max_drawdown, volatility, total_trades, win_rate, profit_factor, final_value
245
248
 
246
249
  ## Environment Variables for Evaluators
247
250
 
@@ -257,18 +257,21 @@ count_pending_candidates() {
257
257
 
258
258
  # Function to get CSV stats
259
259
  get_csv_stats() {
260
- if [[ ! -f "$FULL_CSV_PATH" ]]; then
260
+ local csv_path="${1:-$FULL_CSV_PATH}"
261
+
262
+ if [[ ! -f "$csv_path" ]]; then
263
+ echo "[ERROR] CSV not found at: $csv_path" >&2
261
264
  echo "0 0 0"
262
265
  return
263
266
  fi
264
267
 
265
268
  local total_rows complete_count pending_count
266
- total_rows=$(wc -l < "$FULL_CSV_PATH" | tr -d '[:space:]')
267
- complete_count=$(grep -c ',complete' "$FULL_CSV_PATH" || echo "0")
269
+ total_rows=$(wc -l < "$csv_path" | tr -d '[:space:]')
270
+ complete_count=$(grep ',complete' "$csv_path" 2>/dev/null | wc -l | tr -d '[:space:]')
268
271
 
269
272
  # Count pending: empty status or "pending"
270
273
  # Handle potential Windows line endings by stripping carriage returns
271
- pending_count=$(awk -F, 'NR>1 {gsub(/\r/, "", $5); if($5=="" || $5=="pending") count++} END {print count+0}' "$FULL_CSV_PATH")
274
+ pending_count=$(awk -F, 'NR>1 {gsub(/\r/, "", $5); if($5=="" || $5=="pending") count++} END {print count+0}' "$csv_path")
272
275
 
273
276
  echo "$total_rows $complete_count $pending_count"
274
277
  }
@@ -282,7 +285,8 @@ while true; do
282
285
  cleanup_workers
283
286
 
284
287
  # Get current status
285
- read -r total_rows complete_count pending_count <<< "$(get_csv_stats)"
288
+ csv_stats=$(get_csv_stats "$FULL_CSV_PATH")
289
+ read -r total_rows complete_count pending_count <<< "$csv_stats"
286
290
  active_workers=${#worker_pids[@]}
287
291
 
288
292
  # Status reporting
package/package.json CHANGED
@@ -1,13 +1,12 @@
1
1
  {
2
2
  "name": "claude-evolve",
3
- "version": "1.3.38",
3
+ "version": "1.3.39",
4
4
  "bin": {
5
5
  "claude-evolve": "./bin/claude-evolve",
6
6
  "claude-evolve-main": "./bin/claude-evolve-main",
7
7
  "claude-evolve-setup": "./bin/claude-evolve-setup",
8
8
  "claude-evolve-ideate": "./bin/claude-evolve-ideate",
9
9
  "claude-evolve-run": "./bin/claude-evolve-run",
10
- "claude-evolve-run-parallel": "./bin/claude-evolve-run-parallel",
11
10
  "claude-evolve-worker": "./bin/claude-evolve-worker",
12
11
  "claude-evolve-analyze": "./bin/claude-evolve-analyze",
13
12
  "claude-evolve-config": "./bin/claude-evolve-config"