claude-evolve 1.0.11 → 1.0.12

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.
@@ -74,11 +74,12 @@ if [[ ! -f "$FULL_ALGORITHM_PATH" ]]; then
74
74
  exit 1
75
75
  fi
76
76
 
77
- # Find oldest empty row (pure shell)
77
+ # Find oldest pending row (pure shell)
78
78
  find_empty_row() {
79
79
  local row_num=2 # Start after header
80
80
  while IFS=, read -r id based_on desc perf status; do
81
- if [[ -z $perf && -z $status ]]; then
81
+ # Look for rows with pending status or empty status (but not complete/failed/running)
82
+ if [[ $status == "pending" || (-z $perf && -z $status) ]]; then
82
83
  echo $row_num
83
84
  return 0
84
85
  fi
@@ -118,7 +119,7 @@ update_csv_row() {
118
119
 
119
120
  # Find next candidate
120
121
  if ! row_num=$(find_empty_row); then
121
- echo "[ERROR] No empty rows found in CSV. Run 'claude-evolve ideate' to add candidates." >&2
122
+ echo "[ERROR] No pending candidates found in CSV. Run 'claude-evolve ideate' to add more candidates." >&2
122
123
  exit 1
123
124
  fi
124
125
 
@@ -126,6 +127,13 @@ fi
126
127
  row_data=$(get_csv_row "$row_num")
127
128
  IFS=, read -r id based_on_id description performance status <<<"$row_data"
128
129
 
130
+ # Check if ID is empty
131
+ if [[ -z $id ]]; then
132
+ echo "[ERROR] Empty ID found at row $row_num. CSV may be malformed." >&2
133
+ echo "[ERROR] Row data: $row_data" >&2
134
+ exit 1
135
+ fi
136
+
129
137
  # Clean up description (remove quotes)
130
138
  description=${description#\"}
131
139
  description=${description%\"}
@@ -141,8 +149,11 @@ trap 'update_csv_row "$row_num" "" "interrupted"; echo "[INFO] Evolution interru
141
149
  update_csv_row "$row_num" "" "running"
142
150
 
143
151
  # Determine parent algorithm
144
- parent_file="$FULL_ALGORITHM_PATH"
145
- if [[ -n $based_on_id && $based_on_id != "0" ]]; then
152
+ if [[ -z $based_on_id || $based_on_id == "0" || $based_on_id == '""' ]]; then
153
+ # Empty or zero basedonID means use the base algorithm
154
+ parent_file="$FULL_ALGORITHM_PATH"
155
+ echo "[INFO] Using base algorithm (basedonID is empty or 0)"
156
+ else
146
157
  parent_file="$FULL_OUTPUT_DIR/evolution_id${based_on_id}.py"
147
158
  if [[ ! -f $parent_file ]]; then
148
159
  echo "[ERROR] Parent algorithm file not found: $parent_file" >&2
package/lib/config.sh CHANGED
@@ -59,8 +59,29 @@ load_config() {
59
59
 
60
60
  # Create full paths
61
61
  FULL_EVOLUTION_DIR="$EVOLUTION_DIR"
62
- FULL_ALGORITHM_PATH="$EVOLUTION_DIR/$ALGORITHM_FILE"
63
- FULL_EVALUATOR_PATH="$EVOLUTION_DIR/$EVALUATOR_FILE"
62
+
63
+ # Handle relative paths properly
64
+ if [[ $ALGORITHM_FILE == /* ]]; then
65
+ # Absolute path
66
+ FULL_ALGORITHM_PATH="$ALGORITHM_FILE"
67
+ elif [[ $ALGORITHM_FILE == ../* ]]; then
68
+ # Relative to parent directory
69
+ FULL_ALGORITHM_PATH="$ALGORITHM_FILE"
70
+ else
71
+ # Relative to evolution directory
72
+ FULL_ALGORITHM_PATH="$EVOLUTION_DIR/$ALGORITHM_FILE"
73
+ fi
74
+
75
+ # Same for evaluator
76
+ if [[ $EVALUATOR_FILE == /* ]]; then
77
+ FULL_EVALUATOR_PATH="$EVALUATOR_FILE"
78
+ elif [[ $EVALUATOR_FILE == ../* ]]; then
79
+ FULL_EVALUATOR_PATH="$EVALUATOR_FILE"
80
+ else
81
+ FULL_EVALUATOR_PATH="$EVOLUTION_DIR/$EVALUATOR_FILE"
82
+ fi
83
+
84
+ # Brief and CSV are always in evolution dir
64
85
  FULL_BRIEF_PATH="$EVOLUTION_DIR/$BRIEF_FILE"
65
86
  FULL_CSV_PATH="$EVOLUTION_DIR/$EVOLUTION_CSV"
66
87
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-evolve",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "bin": {
5
5
  "claude-evolve": "./bin/claude-evolve",
6
6
  "claude-evolve-main": "./bin/claude-evolve-main",