claude-evolve 1.8.8 → 1.8.10
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-killall +80 -0
- package/bin/claude-evolve-main +9 -2
- package/package.json +3 -2
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
set -e
|
|
3
|
+
|
|
4
|
+
echo "🛑 Claude Evolve - Kill All Processes"
|
|
5
|
+
echo "======================================"
|
|
6
|
+
echo ""
|
|
7
|
+
|
|
8
|
+
# Find all claude-evolve related processes
|
|
9
|
+
# Patterns to match:
|
|
10
|
+
# - claude-evolve-* (but NOT this killall script)
|
|
11
|
+
# - evaluator.py and evaluator_*.py (e.g., evaluator_fast.py)
|
|
12
|
+
# - evolution_*.py
|
|
13
|
+
# - algorithm.py
|
|
14
|
+
# - backtest.py
|
|
15
|
+
|
|
16
|
+
echo "Searching for claude-evolve related processes..."
|
|
17
|
+
echo ""
|
|
18
|
+
|
|
19
|
+
# Get all matching processes with their PIDs
|
|
20
|
+
# Exclude this script itself and grep
|
|
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
|
+
|
|
23
|
+
if [[ -z "$PROCESSES" ]]; then
|
|
24
|
+
echo "✓ No claude-evolve processes found running."
|
|
25
|
+
exit 0
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
echo "Found the following processes:"
|
|
29
|
+
echo "$PROCESSES" | awk '{printf " PID: %-8s CMD: %s\n", $2, substr($0, index($0,$11))}'
|
|
30
|
+
echo ""
|
|
31
|
+
|
|
32
|
+
# Extract PIDs
|
|
33
|
+
PIDS=$(echo "$PROCESSES" | awk '{print $2}')
|
|
34
|
+
PID_COUNT=$(echo "$PIDS" | wc -l | tr -d ' ')
|
|
35
|
+
|
|
36
|
+
echo "Found $PID_COUNT process(es) to terminate."
|
|
37
|
+
echo ""
|
|
38
|
+
|
|
39
|
+
# Ask for confirmation
|
|
40
|
+
read -p "Do you want to kill these processes? (y/N) " -n 1 -r
|
|
41
|
+
echo ""
|
|
42
|
+
|
|
43
|
+
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
|
44
|
+
echo "Aborted."
|
|
45
|
+
exit 0
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
echo ""
|
|
49
|
+
echo "Terminating processes..."
|
|
50
|
+
|
|
51
|
+
# First try SIGTERM (graceful)
|
|
52
|
+
for PID in $PIDS; do
|
|
53
|
+
if kill -0 "$PID" 2>/dev/null; then
|
|
54
|
+
echo " Sending SIGTERM to PID $PID..."
|
|
55
|
+
kill -TERM "$PID" 2>/dev/null || echo " (already terminated)"
|
|
56
|
+
fi
|
|
57
|
+
done
|
|
58
|
+
|
|
59
|
+
# Wait a moment for graceful shutdown
|
|
60
|
+
sleep 2
|
|
61
|
+
|
|
62
|
+
# Check if any are still running and force kill if needed
|
|
63
|
+
REMAINING_PIDS=""
|
|
64
|
+
for PID in $PIDS; do
|
|
65
|
+
if kill -0 "$PID" 2>/dev/null; then
|
|
66
|
+
REMAINING_PIDS="$REMAINING_PIDS $PID"
|
|
67
|
+
fi
|
|
68
|
+
done
|
|
69
|
+
|
|
70
|
+
if [[ -n "$REMAINING_PIDS" ]]; then
|
|
71
|
+
echo ""
|
|
72
|
+
echo "Some processes did not terminate gracefully. Forcing with SIGKILL..."
|
|
73
|
+
for PID in $REMAINING_PIDS; do
|
|
74
|
+
echo " Sending SIGKILL to PID $PID..."
|
|
75
|
+
kill -9 "$PID" 2>/dev/null || echo " (already terminated)"
|
|
76
|
+
done
|
|
77
|
+
fi
|
|
78
|
+
|
|
79
|
+
echo ""
|
|
80
|
+
echo "✓ All claude-evolve processes terminated."
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-evolve",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.10",
|
|
4
4
|
"bin": {
|
|
5
5
|
"claude-evolve": "./bin/claude-evolve",
|
|
6
6
|
"claude-evolve-main": "./bin/claude-evolve-main",
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
"claude-evolve-run": "./bin/claude-evolve-run",
|
|
10
10
|
"claude-evolve-worker": "./bin/claude-evolve-worker",
|
|
11
11
|
"claude-evolve-analyze": "./bin/claude-evolve-analyze",
|
|
12
|
-
"claude-evolve-config": "./bin/claude-evolve-config"
|
|
12
|
+
"claude-evolve-config": "./bin/claude-evolve-config",
|
|
13
|
+
"claude-evolve-killall": "./bin/claude-evolve-killall"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
16
|
"bin/",
|