claude-evolve 1.8.9 → 1.8.11
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.
|
@@ -226,39 +226,42 @@ class AutoStatus:
|
|
|
226
226
|
try:
|
|
227
227
|
data = self.get_status_data()
|
|
228
228
|
except Exception as e:
|
|
229
|
-
self.display.clear_screen()
|
|
230
229
|
self.display.move_cursor(1, 1)
|
|
230
|
+
self.display.clear_line()
|
|
231
231
|
print(f"Error reading status: {e}")
|
|
232
232
|
return
|
|
233
|
-
|
|
234
|
-
#
|
|
235
|
-
self.display.
|
|
233
|
+
|
|
234
|
+
# Move to top and start rendering (no full clear to avoid flicker)
|
|
235
|
+
self.display.move_cursor(1, 1)
|
|
236
236
|
row = 1
|
|
237
237
|
|
|
238
238
|
# Header
|
|
239
239
|
self.display.move_cursor(row, 1)
|
|
240
|
+
self.display.clear_line()
|
|
240
241
|
header = "Claude Evolution Auto-Status"
|
|
241
|
-
print(f"\033[1;36m{header.center(self.display.cols)}\033[0m")
|
|
242
|
+
print(f"\033[1;36m{header.center(self.display.cols)}\033[0m", end="")
|
|
242
243
|
row += 1
|
|
243
|
-
|
|
244
|
+
|
|
244
245
|
# Timestamp and working dir
|
|
245
246
|
self.display.move_cursor(row, 1)
|
|
247
|
+
self.display.clear_line()
|
|
246
248
|
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
247
249
|
working_dir = os.path.basename(data["working_dir"])
|
|
248
|
-
print(f"Last updated: {timestamp} | Working dir: {working_dir} | Press '\''q'\'' to quit")
|
|
250
|
+
print(f"Last updated: {timestamp} | Working dir: {working_dir} | Press '\''q'\'' to quit", end="")
|
|
249
251
|
row += 2
|
|
250
|
-
|
|
252
|
+
|
|
251
253
|
# Leader
|
|
252
254
|
self.display.move_cursor(row, 1)
|
|
255
|
+
self.display.clear_line()
|
|
253
256
|
if data["leader"]:
|
|
254
257
|
leader_id, leader_desc, leader_score = data["leader"]
|
|
255
258
|
# Truncate description for leader
|
|
256
259
|
max_desc_len = self.display.cols - 30
|
|
257
260
|
if len(leader_desc) > max_desc_len:
|
|
258
261
|
leader_desc = leader_desc[:max_desc_len-3] + "..."
|
|
259
|
-
print(f"\033[1;32mLeader:\033[0m {leader_id} | {leader_score:.4f} | {leader_desc}")
|
|
262
|
+
print(f"\033[1;32mLeader:\033[0m {leader_id} | {leader_score:.4f} | {leader_desc}", end="")
|
|
260
263
|
else:
|
|
261
|
-
print("\033[1;32mLeader:\033[0m None (no completed candidates)")
|
|
264
|
+
print("\033[1;32mLeader:\033[0m None (no completed candidates)", end="")
|
|
262
265
|
row += 2
|
|
263
266
|
|
|
264
267
|
# Generation table
|
|
@@ -266,14 +269,16 @@ class AutoStatus:
|
|
|
266
269
|
if generations:
|
|
267
270
|
# Table header
|
|
268
271
|
self.display.move_cursor(row, 1)
|
|
272
|
+
self.display.clear_line()
|
|
269
273
|
header_fmt = "{:<10} | {:^25} | {:>10} | {:>8} | {}".format(
|
|
270
274
|
"Generation", "Stats (p/c/f/r/s)", "Top ID", "Score", "Description"
|
|
271
275
|
)
|
|
272
|
-
print("\033[1m" + header_fmt[:self.display.cols] + "\033[0m")
|
|
276
|
+
print("\033[1m" + header_fmt[:self.display.cols] + "\033[0m", end="")
|
|
273
277
|
row += 1
|
|
274
|
-
|
|
278
|
+
|
|
275
279
|
self.display.move_cursor(row, 1)
|
|
276
|
-
|
|
280
|
+
self.display.clear_line()
|
|
281
|
+
print("-" * min(self.display.cols, len(header_fmt)), end="")
|
|
277
282
|
row += 1
|
|
278
283
|
# Sort generations numerically by extracting the number after "gen"
|
|
279
284
|
# Put baseline first, then sort numerically
|
|
@@ -299,21 +304,22 @@ class AutoStatus:
|
|
|
299
304
|
for gen in sorted_gens[start_idx:]:
|
|
300
305
|
if row >= self.display.rows - 1:
|
|
301
306
|
break
|
|
302
|
-
|
|
307
|
+
|
|
303
308
|
gen_data = generations[gen]
|
|
304
309
|
stats_str = f"{gen_data['\''pending'\'']}/{gen_data['\''complete'\'']}/{gen_data['\''failed'\'']}/{gen_data['\''running'\'']}"
|
|
305
310
|
if gen_data['\''skipped'\''] > 0:
|
|
306
311
|
stats_str += f"/{gen_data['\''skipped'\'']}"
|
|
307
|
-
|
|
312
|
+
|
|
308
313
|
self.display.move_cursor(row, 1)
|
|
309
|
-
|
|
314
|
+
self.display.clear_line()
|
|
315
|
+
|
|
310
316
|
if gen_data["best"]:
|
|
311
317
|
best_id, best_desc, best_score = gen_data["best"]
|
|
312
318
|
# Truncate description
|
|
313
319
|
max_desc_len = self.display.cols - 55
|
|
314
320
|
if len(best_desc) > max_desc_len:
|
|
315
321
|
best_desc = best_desc[:max_desc_len-3] + "..."
|
|
316
|
-
|
|
322
|
+
|
|
317
323
|
# Highlight if this is the overall leader
|
|
318
324
|
if data["leader"] and best_id == data["leader"][0]:
|
|
319
325
|
line = "{:<10} | {:^25} | \033[32m{:>10}\033[0m | {:>8.4f} | {}".format(
|
|
@@ -327,10 +333,16 @@ class AutoStatus:
|
|
|
327
333
|
line = "{:<10} | {:^25} | {:>10} | {:>8} | {}".format(
|
|
328
334
|
gen, stats_str, "-", "-", "No completed candidates"
|
|
329
335
|
)
|
|
330
|
-
|
|
331
|
-
print(line[:self.display.cols])
|
|
336
|
+
|
|
337
|
+
print(line[:self.display.cols], end="")
|
|
332
338
|
row += 1
|
|
333
|
-
|
|
339
|
+
|
|
340
|
+
# Clear any remaining lines from previous render
|
|
341
|
+
while row < self.display.rows:
|
|
342
|
+
self.display.move_cursor(row, 1)
|
|
343
|
+
self.display.clear_line()
|
|
344
|
+
row += 1
|
|
345
|
+
|
|
334
346
|
# Ensure cursor is at bottom
|
|
335
347
|
self.display.move_cursor(self.display.rows, 1)
|
|
336
348
|
sys.stdout.flush()
|
|
@@ -366,8 +378,8 @@ class AutoStatus:
|
|
|
366
378
|
sys.stdout.flush()
|
|
367
379
|
time.sleep(2) # Give time to read error
|
|
368
380
|
|
|
369
|
-
# Check for input and wait
|
|
370
|
-
for _ in range(
|
|
381
|
+
# Check for input and wait (update every 5 seconds)
|
|
382
|
+
for _ in range(50): # Check 50 times over 5 seconds
|
|
371
383
|
if self.check_input():
|
|
372
384
|
break
|
|
373
385
|
time.sleep(0.1)
|
|
@@ -8,7 +8,7 @@ echo ""
|
|
|
8
8
|
# Find all claude-evolve related processes
|
|
9
9
|
# Patterns to match:
|
|
10
10
|
# - claude-evolve-* (but NOT this killall script)
|
|
11
|
-
# - evaluator.py
|
|
11
|
+
# - evaluator.py and evaluator_*.py (e.g., evaluator_fast.py)
|
|
12
12
|
# - evolution_*.py
|
|
13
13
|
# - algorithm.py
|
|
14
14
|
# - backtest.py
|
|
@@ -18,7 +18,7 @@ echo ""
|
|
|
18
18
|
|
|
19
19
|
# Get all matching processes with their PIDs
|
|
20
20
|
# Exclude this script itself and grep
|
|
21
|
-
PROCESSES=$(ps aux | grep -E '(claude-evolve
|
|
21
|
+
PROCESSES=$(ps aux | grep -E '(claude-evolve-|evaluator.*\.py|evolution_.*\.py|algorithm\.py|backtest\.py)' | grep -v grep | grep -v 'claude-evolve-killall' || true)
|
|
22
22
|
|
|
23
23
|
if [[ -z "$PROCESSES" ]]; then
|
|
24
24
|
echo "✓ No claude-evolve processes found running."
|
package/bin/claude-evolve-main
CHANGED
|
@@ -68,6 +68,7 @@ COMMANDS:
|
|
|
68
68
|
cleanup Clean up unchanged algorithms and descendants
|
|
69
69
|
clean-corrupted Remove corrupted records from evolution CSV
|
|
70
70
|
cleanup-duplicates Alias for cleanup (deprecated)
|
|
71
|
+
killall Kill all running evolution processes
|
|
71
72
|
help Show this help message
|
|
72
73
|
|
|
73
74
|
GLOBAL OPTIONS:
|
|
@@ -102,6 +103,7 @@ show_menu() {
|
|
|
102
103
|
echo " 7) autostatus - Auto-updating status display (real-time)"
|
|
103
104
|
echo " 8) clean-corrupted - Remove corrupted records from CSV"
|
|
104
105
|
echo " 9) config - Manage configuration settings"
|
|
106
|
+
echo " k) killall - Kill all running evolution processes"
|
|
105
107
|
echo " h) help - Show help message"
|
|
106
108
|
echo " 0) exit - Exit"
|
|
107
109
|
echo
|
|
@@ -154,7 +156,7 @@ check_for_updates
|
|
|
154
156
|
# Main logic
|
|
155
157
|
if [[ $# -eq 0 ]]; then
|
|
156
158
|
show_menu
|
|
157
|
-
read -r -p "Enter your choice (1-9, h, 0): " choice
|
|
159
|
+
read -r -p "Enter your choice (1-9, k, h, 0): " choice
|
|
158
160
|
|
|
159
161
|
case $choice in
|
|
160
162
|
1) exec "$SCRIPT_DIR/claude-evolve-setup" ;;
|
|
@@ -166,13 +168,14 @@ if [[ $# -eq 0 ]]; then
|
|
|
166
168
|
7) exec "$SCRIPT_DIR/claude-evolve-autostatus" ;;
|
|
167
169
|
8) exec "$SCRIPT_DIR/claude-evolve-clean-corrupted" ;;
|
|
168
170
|
9) exec "$SCRIPT_DIR/claude-evolve-config" ;;
|
|
171
|
+
k|K) exec "$SCRIPT_DIR/claude-evolve-killall" ;;
|
|
169
172
|
h|H) show_help ;;
|
|
170
173
|
0)
|
|
171
174
|
echo "Goodbye!"
|
|
172
175
|
exit 0
|
|
173
176
|
;;
|
|
174
177
|
*)
|
|
175
|
-
echo -e "${RED}Invalid choice. Please select 1-9, h, or 0.${NC}"
|
|
178
|
+
echo -e "${RED}Invalid choice. Please select 1-9, k, h, or 0.${NC}"
|
|
176
179
|
exit 1
|
|
177
180
|
;;
|
|
178
181
|
esac
|
|
@@ -225,6 +228,10 @@ config)
|
|
|
225
228
|
shift
|
|
226
229
|
exec "$SCRIPT_DIR/claude-evolve-config" "$@"
|
|
227
230
|
;;
|
|
231
|
+
killall)
|
|
232
|
+
shift
|
|
233
|
+
exec "$SCRIPT_DIR/claude-evolve-killall" "$@"
|
|
234
|
+
;;
|
|
228
235
|
*)
|
|
229
236
|
echo "Unknown command: ${1:-}"
|
|
230
237
|
echo
|