claude-evolve 1.0.11 → 1.0.13
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-run +16 -5
- package/lib/config.sh +1 -1
- package/package.json +1 -1
package/bin/claude-evolve-run
CHANGED
|
@@ -74,11 +74,12 @@ if [[ ! -f "$FULL_ALGORITHM_PATH" ]]; then
|
|
|
74
74
|
exit 1
|
|
75
75
|
fi
|
|
76
76
|
|
|
77
|
-
# Find oldest
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
145
|
-
|
|
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
|
@@ -57,7 +57,7 @@ load_config() {
|
|
|
57
57
|
done < "$config_file"
|
|
58
58
|
fi
|
|
59
59
|
|
|
60
|
-
# Create full paths
|
|
60
|
+
# Create full paths - ALL paths are relative to evolution_dir
|
|
61
61
|
FULL_EVOLUTION_DIR="$EVOLUTION_DIR"
|
|
62
62
|
FULL_ALGORITHM_PATH="$EVOLUTION_DIR/$ALGORITHM_FILE"
|
|
63
63
|
FULL_EVALUATOR_PATH="$EVOLUTION_DIR/$EVALUATOR_FILE"
|