@walwal-harness/cli 5.3.0 → 5.3.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walwal-harness/cli",
3
- "version": "5.3.0",
3
+ "version": "5.3.1",
4
4
  "description": "Production harness for AI agent engineering — Solo/Team mode, Planner, Generator(BE/FE), Evaluator(Func/Visual), optional Brainstormer. Supports React, Next.js, and Flutter FE stacks.",
5
5
  "bin": {
6
6
  "walwal-harness": "bin/init.js"
@@ -30,6 +30,23 @@ BG_YELLOW="\033[43m"
30
30
  REFRESH_SEC="${HARNESS_REFRESH:-5}"
31
31
  RECENT_N="${HARNESS_GOTCHA_RECENT:-3}"
32
32
 
33
+ # 렌더 캐시 — 내용이 바뀌지 않으면 redraw 스킵
34
+ LAST_SIG=""
35
+
36
+ # 입력 시그니처: gotchas + memory + 활성 에이전트의 mtime/size 해시
37
+ compute_signature() {
38
+ {
39
+ [ -f "$PROGRESS" ] && stat -f '%m %z' "$PROGRESS" 2>/dev/null
40
+ [ -f "$MEMORY_FILE" ] && stat -f '%m %z' "$MEMORY_FILE" 2>/dev/null
41
+ if [ -d "$GOTCHAS_DIR" ]; then
42
+ for f in "$GOTCHAS_DIR"/*.md; do
43
+ [ -e "$f" ] || continue
44
+ stat -f '%N %m %z' "$f" 2>/dev/null
45
+ done
46
+ fi
47
+ } | md5 -q 2>/dev/null || echo "$RANDOM"
48
+ }
49
+
33
50
  # 활성 에이전트 결정: current_agent > next_agent
34
51
  get_active_agent() {
35
52
  [ -f "$PROGRESS" ] || { echo ""; return; }
@@ -116,7 +133,8 @@ render_memory_summary() {
116
133
  }
117
134
 
118
135
  render() {
119
- clear
136
+ # clear 대신 커서 홈 + 화면 끝까지 지우기 — 깜빡임 최소화
137
+ printf '\033[H\033[2J\033[3J'
120
138
  local cols hr
121
139
  cols=$(tput cols 2>/dev/null || echo 80)
122
140
  hr=$(printf '─%.0s' $(seq 1 "$cols"))
@@ -160,6 +178,10 @@ render() {
160
178
  trap 'exit 0' INT TERM
161
179
 
162
180
  while true; do
163
- render
181
+ sig=$(compute_signature)
182
+ if [ "$sig" != "$LAST_SIG" ]; then
183
+ render
184
+ LAST_SIG="$sig"
185
+ fi
164
186
  sleep "$REFRESH_SEC"
165
187
  done