@walwal-harness/cli 4.0.0-beta.7 → 4.0.0-beta.8

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": "4.0.0-beta.7",
3
+ "version": "4.0.0-beta.8",
4
4
  "description": "Production harness for AI agent engineering — Planner, Generator(BE/FE), Evaluator(Func/Visual), optional Brainstormer (requirements refinement). Supports React and Flutter FE stacks.",
5
5
  "bin": {
6
6
  "walwal-harness": "bin/init.js"
@@ -285,44 +285,44 @@ cleanup() {
285
285
  }
286
286
  trap cleanup EXIT INT TERM
287
287
 
288
- # v4 감지: feature-queue.json 존재 여부
289
- IS_V4=false
290
- if [ -f "$QUEUE" ]; then
291
- IS_V4=true
292
- fi
288
+ # 매 루프마다 v4/v3 동적 감지 시작 후에도 모드 전환 가능
289
+ tput civis 2>/dev/null
290
+ clear
291
+
292
+ CURRENT_MODE=""
293
+
294
+ while true; do
295
+ # 동적 모드 감지
296
+ if [ -f "$QUEUE" ]; then
297
+ NEW_MODE="v4"
298
+ else
299
+ NEW_MODE="v3"
300
+ fi
293
301
 
294
- if [ "$IS_V4" = true ]; then
295
- # ── v4: 팀별 섹션, auto-refresh ──
296
- tput civis 2>/dev/null
297
- clear
302
+ # 모드 전환 화면 초기화
303
+ if [ "$NEW_MODE" != "$CURRENT_MODE" ]; then
304
+ clear
305
+ CURRENT_MODE="$NEW_MODE"
306
+ if [ "$CURRENT_MODE" = "v3" ]; then
307
+ # v3 초기화
308
+ if [ -f "$PROGRESS" ]; then
309
+ LAST_AGENT=$(jq -r '.current_agent // "none"' "$PROGRESS" 2>/dev/null)
310
+ LAST_STATUS=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
311
+ LAST_SPRINT=$(jq -r '.sprint.number // 0' "$PROGRESS" 2>/dev/null)
312
+ fi
313
+ stream_audit
314
+ fi
315
+ fi
298
316
 
299
- while true; do
317
+ if [ "$CURRENT_MODE" = "v4" ]; then
300
318
  buf=$(render_v4 2>&1)
301
319
  tput cup 0 0 2>/dev/null
302
320
  echo "$buf"
303
321
  tput ed 2>/dev/null
304
- sleep 3
305
- done
306
- else
307
- # ── v3: 단일 스트림, audit tail ──
308
- print_v3_header
309
-
310
- if [ -f "$PROGRESS" ]; then
311
- LAST_AGENT=$(jq -r '.current_agent // "none"' "$PROGRESS" 2>/dev/null)
312
- LAST_STATUS=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
313
- LAST_SPRINT=$(jq -r '.sprint.number // 0' "$PROGRESS" 2>/dev/null)
314
-
315
- echo -e " ${BOLD}History${RESET}"
316
- jq -r '.history // [] | .[] | " \(.timestamp) \(.agent) — \(.action): \(.detail)"' "$PROGRESS" 2>/dev/null
317
- echo ""
318
- echo -e " ${DIM}── Live events below ──${RESET}"
319
- echo ""
322
+ else
323
+ check_transitions
320
324
  fi
321
325
 
322
- stream_audit
326
+ sleep 3
327
+ done
323
328
 
324
- while true; do
325
- check_transitions
326
- sleep 2
327
- done
328
- fi