@walwal-harness/cli 3.6.0 → 3.6.2
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/init.js +37 -6
- package/package.json +1 -1
- package/scripts/harness-dashboard.sh +23 -3
- package/scripts/harness-eval-watcher.sh +3 -5
package/bin/init.js
CHANGED
|
@@ -14,9 +14,11 @@ const path = require('path');
|
|
|
14
14
|
const { execSync } = require('child_process');
|
|
15
15
|
|
|
16
16
|
const PKG_ROOT = path.resolve(__dirname, '..');
|
|
17
|
-
const
|
|
18
|
-
const
|
|
19
|
-
const
|
|
17
|
+
const args = process.argv.slice(2);
|
|
18
|
+
const subcommand = args.find(a => !a.startsWith('-')) || null;
|
|
19
|
+
const isAuto = args.includes('--auto');
|
|
20
|
+
const isForce = args.includes('--force');
|
|
21
|
+
const isHelp = args.includes('--help') || args.includes('-h');
|
|
20
22
|
|
|
21
23
|
// ─────────────────────────────────────────
|
|
22
24
|
// Resolve project root
|
|
@@ -551,9 +553,11 @@ function showHelp() {
|
|
|
551
553
|
╚══════════════════════════════════════╝
|
|
552
554
|
|
|
553
555
|
Usage:
|
|
554
|
-
npx walwal-harness
|
|
555
|
-
npx walwal-harness --force
|
|
556
|
-
npx walwal-harness
|
|
556
|
+
npx walwal-harness Initialize project for harness engineering
|
|
557
|
+
npx walwal-harness --force Re-initialize (overwrites existing files)
|
|
558
|
+
npx walwal-harness studio Launch Harness Studio (tmux 4-pane monitor)
|
|
559
|
+
npx walwal-harness studio --ai Studio + AI eval summary (API cost)
|
|
560
|
+
npx walwal-harness --help Show this help
|
|
557
561
|
|
|
558
562
|
What it does:
|
|
559
563
|
1. Scaffolds .harness/ directory (actions, archive, gotchas, config)
|
|
@@ -580,12 +584,39 @@ After init:
|
|
|
580
584
|
// ─────────────────────────────────────────
|
|
581
585
|
// Main
|
|
582
586
|
// ─────────────────────────────────────────
|
|
587
|
+
function runStudio() {
|
|
588
|
+
const useAi = args.includes('--ai') ? '--ai' : '';
|
|
589
|
+
const scriptsDir = path.join(PKG_ROOT, 'scripts');
|
|
590
|
+
const tmuxScript = path.join(scriptsDir, 'harness-tmux.sh');
|
|
591
|
+
|
|
592
|
+
if (!fs.existsSync(tmuxScript)) {
|
|
593
|
+
log('ERROR: harness-tmux.sh not found. Update @walwal-harness/cli to >= 3.6.0');
|
|
594
|
+
process.exit(1);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
try {
|
|
598
|
+
execSync('which tmux', { stdio: 'ignore' });
|
|
599
|
+
} catch {
|
|
600
|
+
log('ERROR: tmux is required. Install with: brew install tmux');
|
|
601
|
+
process.exit(1);
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
const cmd = `bash "${tmuxScript}" "${PROJECT_ROOT}" ${useAi}`.trim();
|
|
605
|
+
log(`Launching Harness Studio...`);
|
|
606
|
+
execSync(cmd, { stdio: 'inherit' });
|
|
607
|
+
}
|
|
608
|
+
|
|
583
609
|
function main() {
|
|
584
610
|
if (isHelp) {
|
|
585
611
|
showHelp();
|
|
586
612
|
return;
|
|
587
613
|
}
|
|
588
614
|
|
|
615
|
+
if (subcommand === 'studio') {
|
|
616
|
+
runStudio();
|
|
617
|
+
return;
|
|
618
|
+
}
|
|
619
|
+
|
|
589
620
|
const pkg = require(path.join(PKG_ROOT, 'package.json'));
|
|
590
621
|
console.log('');
|
|
591
622
|
console.log('╔══════════════════════════════════════╗');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@walwal-harness/cli",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2",
|
|
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"
|
|
@@ -156,9 +156,8 @@ render_failure_info() {
|
|
|
156
156
|
fi
|
|
157
157
|
}
|
|
158
158
|
|
|
159
|
-
# ──
|
|
160
|
-
|
|
161
|
-
clear
|
|
159
|
+
# ── Render to buffer, then overwrite screen in one shot ──
|
|
160
|
+
render_all() {
|
|
162
161
|
render_header
|
|
163
162
|
render_sprint_overview
|
|
164
163
|
render_build_status
|
|
@@ -175,5 +174,26 @@ while true; do
|
|
|
175
174
|
echo ""
|
|
176
175
|
|
|
177
176
|
echo -e " ${DIM}Refreshing every 2s | Ctrl+C to exit${RESET}"
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
# ── Main Loop ──
|
|
180
|
+
# Hide cursor during refresh to reduce flicker
|
|
181
|
+
tput civis 2>/dev/null # hide cursor
|
|
182
|
+
trap 'tput cnorm 2>/dev/null; exit 0' EXIT INT TERM
|
|
183
|
+
|
|
184
|
+
# Initial clear
|
|
185
|
+
clear
|
|
186
|
+
|
|
187
|
+
while true; do
|
|
188
|
+
# Capture full output into buffer
|
|
189
|
+
buf=$(render_all 2>/dev/null)
|
|
190
|
+
|
|
191
|
+
# Move cursor to top-left and overwrite (no clear = no flicker)
|
|
192
|
+
tput cup 0 0 2>/dev/null
|
|
193
|
+
echo "$buf"
|
|
194
|
+
|
|
195
|
+
# Clear any leftover lines from previous render
|
|
196
|
+
tput ed 2>/dev/null
|
|
197
|
+
|
|
178
198
|
sleep 2
|
|
179
199
|
done
|
|
@@ -215,12 +215,10 @@ while true; do
|
|
|
215
215
|
|
|
216
216
|
# Check agent status for eval-related transitions
|
|
217
217
|
if [ -f "$PROGRESS" ]; then
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
local status
|
|
221
|
-
status=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
|
|
218
|
+
_agent=$(jq -r '.current_agent // "none"' "$PROGRESS" 2>/dev/null)
|
|
219
|
+
_status=$(jq -r '.agent_status // "pending"' "$PROGRESS" 2>/dev/null)
|
|
222
220
|
|
|
223
|
-
if [[ "$
|
|
221
|
+
if [[ "$_agent" == evaluator-* ]] && [ "$_status" = "running" ]; then
|
|
224
222
|
# Show that evaluator is active
|
|
225
223
|
:
|
|
226
224
|
fi
|