golem-cc 0.1.25 → 0.1.27

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.
Files changed (2) hide show
  1. package/bin/golem +27 -8
  2. package/package.json +1 -1
package/bin/golem CHANGED
@@ -476,10 +476,18 @@ run_plan_mode() {
476
476
  fi
477
477
 
478
478
  # Ralph pattern: cat PROMPT | claude -p
479
- cat "$prompt_file" | claude -p \
480
- --dangerously-skip-permissions \
481
- --model opus \
482
- --verbose
479
+ # Pipe through glow for pretty markdown rendering if available
480
+ if command -v glow &>/dev/null; then
481
+ cat "$prompt_file" | claude -p \
482
+ --dangerously-skip-permissions \
483
+ --model opus \
484
+ --verbose 2>&1 | glow -s dark -
485
+ else
486
+ cat "$prompt_file" | claude -p \
487
+ --dangerously-skip-permissions \
488
+ --model opus \
489
+ --verbose
490
+ fi
483
491
 
484
492
  echo ""
485
493
  header_box "PLANNING COMPLETE" "$GREEN"
@@ -493,6 +501,9 @@ run_build_loop() {
493
501
  local max_iterations="$1"
494
502
  local simplify="$2"
495
503
 
504
+ # Handle Ctrl+C gracefully
505
+ trap 'echo ""; echo -e "${YELLOW} Build interrupted by user${NC}"; log_event "BUILD_INTERRUPTED" "User cancelled"; exit 130' INT
506
+
496
507
  print_banner
497
508
 
498
509
  # Verify prerequisites
@@ -568,11 +579,19 @@ run_build_loop() {
568
579
  log_event "ITERATION_START" "iteration=$iteration remaining=$remaining"
569
580
 
570
581
  # Ralph pattern: cat PROMPT | claude -p
582
+ # Pipe through glow for pretty markdown rendering if available
571
583
  local claude_exit=0
572
- cat "$build_prompt" | claude -p \
573
- --dangerously-skip-permissions \
574
- --model opus \
575
- --verbose || claude_exit=$?
584
+ if command -v glow &>/dev/null; then
585
+ cat "$build_prompt" | claude -p \
586
+ --dangerously-skip-permissions \
587
+ --model opus \
588
+ --verbose 2>&1 | glow -s dark - || claude_exit=${PIPESTATUS[0]}
589
+ else
590
+ cat "$build_prompt" | claude -p \
591
+ --dangerously-skip-permissions \
592
+ --model opus \
593
+ --verbose || claude_exit=$?
594
+ fi
576
595
 
577
596
  local iter_end=$(date +%s)
578
597
  local iter_duration=$((iter_end - iter_start))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "golem-cc",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "Autonomous coding loop with Claude - structured specs, ralph loop execution, code simplification",
5
5
  "bin": {
6
6
  "golem-cc": "./bin/install.cjs"