claude-evolve 1.8.47 → 1.8.48

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.
@@ -292,10 +292,12 @@ with open('$csv_file', 'r') as f:
292
292
  # Sort generations numerically
293
293
  for gen in $(cut -d' ' -f1 "$gen_stats_file" | sort -u | awk '{print substr($0,4), $0}' | sort -n | cut -d' ' -f2 || echo ""); do
294
294
  [[ -z "$gen" ]] && continue
295
- total_in_gen=$(grep -c "^$gen " "$gen_stats_file" 2>/dev/null || echo "0")
296
- completed_in_gen=$(grep -c "^$gen completed" "$gen_stats_file" 2>/dev/null || echo "0")
295
+ total_in_gen=$(grep -c "^$gen " "$gen_stats_file" 2>/dev/null) || true
296
+ total_in_gen=${total_in_gen:-0}
297
+ completed_in_gen=$(grep -c "^$gen completed" "$gen_stats_file" 2>/dev/null) || true
297
298
  # Clean any whitespace from the numbers
298
299
  completed_in_gen=$(echo "$completed_in_gen" | tr -d '[:space:]')
300
+ completed_in_gen=${completed_in_gen:-0}
299
301
 
300
302
  echo -n "$gen: $total_in_gen candidates"
301
303
 
@@ -144,7 +144,7 @@ call_ai_for_ideation() {
144
144
 
145
145
  # Count remaining placeholders - there should be none if AI did its job
146
146
  local placeholder_count
147
- placeholder_count=$(grep -c "PLACEHOLDER" "$temp_csv_file" 2>/dev/null || echo "0")
147
+ placeholder_count=$(grep -c "PLACEHOLDER" "$temp_csv_file" 2>/dev/null) || true
148
148
  placeholder_count=$(echo "$placeholder_count" | tr -d '[:space:]')
149
149
  placeholder_count=${placeholder_count:-0}
150
150
 
@@ -903,7 +903,8 @@ ideate_ai_strategies() {
903
903
  # Helper to check if we've reached the target for this generation
904
904
  check_generation_complete() {
905
905
  local current_count
906
- current_count=$(grep -c "^gen${CURRENT_GENERATION}-" "$FULL_CSV_PATH" 2>/dev/null || echo "0")
906
+ current_count=$(grep -c "^gen${CURRENT_GENERATION}-" "$FULL_CSV_PATH" 2>/dev/null) || true
907
+ current_count=${current_count:-0}
907
908
  if [[ $current_count -ge $TOTAL_IDEAS ]]; then
908
909
  echo "[INFO] Generation $CURRENT_GENERATION reached target ($current_count >= $TOTAL_IDEAS), stopping early" >&2
909
910
  return 0
@@ -1706,12 +1707,16 @@ print(max_gen)
1706
1707
 
1707
1708
  count_generation_ideas() {
1708
1709
  local gen="$1"
1709
- grep -c "^gen${gen}-" "$FULL_CSV_PATH" 2>/dev/null || echo "0"
1710
+ local count
1711
+ count=$(grep -c "^gen${gen}-" "$FULL_CSV_PATH" 2>/dev/null) || true
1712
+ echo "${count:-0}"
1710
1713
  }
1711
1714
 
1712
1715
  count_generation_pending() {
1713
1716
  local gen="$1"
1714
- grep -c "^gen${gen}-.*,pending" "$FULL_CSV_PATH" 2>/dev/null || echo "0"
1717
+ local count
1718
+ count=$(grep -c "^gen${gen}-.*,pending" "$FULL_CSV_PATH" 2>/dev/null) || true
1719
+ echo "${count:-0}"
1715
1720
  }
1716
1721
 
1717
1722
  # Find the right generation to use
@@ -1766,8 +1771,10 @@ max_wait_seconds=300 # Cap at 5 minutes
1766
1771
 
1767
1772
  while true; do
1768
1773
  # Re-check pending count in case another process added ideas
1769
- pending_count=$(grep -c "^gen${CURRENT_GENERATION}-.*,pending" "$FULL_CSV_PATH" 2>/dev/null || echo "0")
1770
- total_count=$(grep -c "^gen${CURRENT_GENERATION}-" "$FULL_CSV_PATH" 2>/dev/null || echo "0")
1774
+ pending_count=$(grep -c "^gen${CURRENT_GENERATION}-.*,pending" "$FULL_CSV_PATH" 2>/dev/null) || true
1775
+ pending_count=${pending_count:-0}
1776
+ total_count=$(grep -c "^gen${CURRENT_GENERATION}-" "$FULL_CSV_PATH" 2>/dev/null) || true
1777
+ total_count=${total_count:-0}
1771
1778
 
1772
1779
  if [[ $total_count -ge $TOTAL_IDEAS ]]; then
1773
1780
  echo "[INFO] Generation $CURRENT_GENERATION now has $total_count ideas (target: $TOTAL_IDEAS)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-evolve",
3
- "version": "1.8.47",
3
+ "version": "1.8.48",
4
4
  "bin": {
5
5
  "claude-evolve": "./bin/claude-evolve",
6
6
  "claude-evolve-main": "./bin/claude-evolve-main",