cli-jaw 1.7.10 → 1.7.11
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/dist/bin/commands/dispatch.js +8 -1
- package/dist/bin/commands/dispatch.js.map +1 -1
- package/dist/bin/commands/launchd.js +6 -0
- package/dist/bin/commands/launchd.js.map +1 -1
- package/dist/bin/postinstall.js +181 -0
- package/dist/bin/postinstall.js.map +1 -1
- package/dist/lib/mcp/skills-utils.js +5 -1
- package/dist/lib/mcp/skills-utils.js.map +1 -1
- package/dist/server.js +4 -0
- package/dist/server.js.map +1 -1
- package/dist/src/agent/args.js +11 -6
- package/dist/src/agent/args.js.map +1 -1
- package/dist/src/agent/spawn.js +30 -1
- package/dist/src/agent/spawn.js.map +1 -1
- package/dist/src/cli/compact.js +32 -36
- package/dist/src/cli/compact.js.map +1 -1
- package/dist/src/core/boss-auth.js +38 -0
- package/dist/src/core/boss-auth.js.map +1 -0
- package/dist/src/core/compact.js +205 -0
- package/dist/src/core/compact.js.map +1 -1
- package/dist/src/core/employees.js +115 -0
- package/dist/src/core/employees.js.map +1 -1
- package/dist/src/core/launchd-plist.js +27 -10
- package/dist/src/core/launchd-plist.js.map +1 -1
- package/dist/src/core/main-session.js +14 -0
- package/dist/src/core/main-session.js.map +1 -1
- package/dist/src/core/runtime-path.js +29 -0
- package/dist/src/core/runtime-path.js.map +1 -1
- package/dist/src/orchestrator/distribute.js +40 -30
- package/dist/src/orchestrator/distribute.js.map +1 -1
- package/dist/src/orchestrator/worker-registry.js +17 -0
- package/dist/src/orchestrator/worker-registry.js.map +1 -1
- package/dist/src/prompt/builder.js +52 -2
- package/dist/src/prompt/builder.js.map +1 -1
- package/dist/src/prompt/templates/a1-system.md +87 -26
- package/dist/src/prompt/templates/control-system.md +48 -0
- package/dist/src/routes/orchestrate.js +86 -7
- package/dist/src/routes/orchestrate.js.map +1 -1
- package/package.json +1 -1
- package/scripts/darwin/spike-tcc-attribution.sh +333 -0
- package/scripts/darwin/test-computeruse-e2e.sh +204 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# test-computeruse-e2e.sh
|
|
3
|
+
# End-to-end smoke test for the Computer Use integration on macOS.
|
|
4
|
+
# Mirrors the R1..R10 matrix in devlog/_plan/computeruse/36_rollout_validation.md.
|
|
5
|
+
#
|
|
6
|
+
# Each check either PASSES, SKIPS (environment missing), or FAILS.
|
|
7
|
+
# The script returns exit 0 only when no check FAILS.
|
|
8
|
+
#
|
|
9
|
+
# Usage:
|
|
10
|
+
# bash scripts/darwin/test-computeruse-e2e.sh # full run
|
|
11
|
+
# bash scripts/darwin/test-computeruse-e2e.sh --fast # skip network/MCP checks
|
|
12
|
+
# VERBOSE=1 bash scripts/darwin/test-computeruse-e2e.sh # show intermediate output
|
|
13
|
+
|
|
14
|
+
set -u
|
|
15
|
+
|
|
16
|
+
BOLD='\033[1m'
|
|
17
|
+
RED='\033[31m'
|
|
18
|
+
GREEN='\033[32m'
|
|
19
|
+
YELLOW='\033[33m'
|
|
20
|
+
DIM='\033[2m'
|
|
21
|
+
OFF='\033[0m'
|
|
22
|
+
|
|
23
|
+
FAST=0
|
|
24
|
+
if [ "${1:-}" = "--fast" ]; then FAST=1; fi
|
|
25
|
+
VERBOSE=${VERBOSE:-0}
|
|
26
|
+
|
|
27
|
+
PASS=0
|
|
28
|
+
FAIL=0
|
|
29
|
+
SKIP=0
|
|
30
|
+
|
|
31
|
+
hr() { printf '%s\n' '----------------------------------------'; }
|
|
32
|
+
|
|
33
|
+
check() {
|
|
34
|
+
local name="$1"; shift
|
|
35
|
+
local status="$1"; shift
|
|
36
|
+
local detail="${*:-}"
|
|
37
|
+
case "$status" in
|
|
38
|
+
PASS) printf "%b[PASS]%b %s %b%s%b\n" "$GREEN" "$OFF" "$name" "$DIM" "$detail" "$OFF"; PASS=$((PASS+1));;
|
|
39
|
+
FAIL) printf "%b[FAIL]%b %s %b%s%b\n" "$RED" "$OFF" "$name" "$DIM" "$detail" "$OFF"; FAIL=$((FAIL+1));;
|
|
40
|
+
SKIP) printf "%b[SKIP]%b %s %b%s%b\n" "$YELLOW" "$OFF" "$name" "$DIM" "$detail" "$OFF"; SKIP=$((SKIP+1));;
|
|
41
|
+
esac
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
require_cmd() {
|
|
45
|
+
command -v "$1" >/dev/null 2>&1
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
printf "%bcli-jaw · Computer Use E2E smoke%b\n" "$BOLD" "$OFF"
|
|
49
|
+
hr
|
|
50
|
+
|
|
51
|
+
# ─── A. Platform + core binaries ──────────────────────────────
|
|
52
|
+
|
|
53
|
+
if [ "$(uname -s)" = "Darwin" ]; then
|
|
54
|
+
check "darwin platform" PASS "$(uname -sr)"
|
|
55
|
+
else
|
|
56
|
+
check "darwin platform" FAIL "$(uname -sr) — this test is darwin-only"
|
|
57
|
+
printf "\nExiting early on non-darwin host.\n"
|
|
58
|
+
exit 2
|
|
59
|
+
fi
|
|
60
|
+
|
|
61
|
+
if require_cmd cli-jaw; then
|
|
62
|
+
check "cli-jaw in PATH" PASS "$(command -v cli-jaw)"
|
|
63
|
+
else
|
|
64
|
+
check "cli-jaw in PATH" FAIL "install: npm i -g cli-jaw"
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
if require_cmd /usr/bin/clang; then
|
|
68
|
+
check "clang available" PASS
|
|
69
|
+
else
|
|
70
|
+
check "clang available" SKIP "prebuilt fallback will be used"
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
# ─── B. Jaw.app + launcher ────────────────────────────────────
|
|
74
|
+
|
|
75
|
+
JAW_APP=/Applications/Jaw.app
|
|
76
|
+
LAUNCHER="$JAW_APP/Contents/MacOS/jaw-launcher"
|
|
77
|
+
|
|
78
|
+
if [ -d "$JAW_APP" ]; then
|
|
79
|
+
check "Jaw.app installed" PASS "$JAW_APP"
|
|
80
|
+
else
|
|
81
|
+
check "Jaw.app installed" FAIL "run: jaw init (postinstall ensureJawAppInstall)"
|
|
82
|
+
fi
|
|
83
|
+
|
|
84
|
+
if [ -x "$LAUNCHER" ]; then
|
|
85
|
+
if file "$LAUNCHER" 2>/dev/null | grep -q "Mach-O"; then
|
|
86
|
+
check "jaw-launcher is Mach-O" PASS "$(file "$LAUNCHER" | cut -d: -f2- | xargs)"
|
|
87
|
+
else
|
|
88
|
+
check "jaw-launcher is Mach-O" FAIL "not a Mach-O binary — TCC attribution will break"
|
|
89
|
+
fi
|
|
90
|
+
else
|
|
91
|
+
check "jaw-launcher executable" FAIL "missing: $LAUNCHER"
|
|
92
|
+
fi
|
|
93
|
+
|
|
94
|
+
BUNDLE_ID=$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$JAW_APP/Contents/Info.plist" 2>/dev/null || echo "")
|
|
95
|
+
if [ "$BUNDLE_ID" = "com.cli-jaw.agent" ]; then
|
|
96
|
+
check "Info.plist bundle id" PASS "$BUNDLE_ID"
|
|
97
|
+
else
|
|
98
|
+
check "Info.plist bundle id" FAIL "got '$BUNDLE_ID' — expected com.cli-jaw.agent"
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
if /usr/bin/codesign --verify --deep --strict "$JAW_APP" >/dev/null 2>&1; then
|
|
102
|
+
check "Jaw.app codesign" PASS
|
|
103
|
+
else
|
|
104
|
+
check "Jaw.app codesign" FAIL "run: codesign --sign - --force --deep $JAW_APP"
|
|
105
|
+
fi
|
|
106
|
+
|
|
107
|
+
# ─── C. Codex Computer Use.app ─────────────────────────────────
|
|
108
|
+
|
|
109
|
+
CUA_APP="/Applications/Codex Computer Use.app"
|
|
110
|
+
if [ -d "$CUA_APP" ]; then
|
|
111
|
+
check "Codex Computer Use.app" PASS
|
|
112
|
+
else
|
|
113
|
+
check "Codex Computer Use.app" FAIL "run: jaw doctor --tcc --fix"
|
|
114
|
+
fi
|
|
115
|
+
|
|
116
|
+
# ─── D. launchd plist (if registered) ──────────────────────────
|
|
117
|
+
|
|
118
|
+
LAUNCH_AGENTS="$HOME/Library/LaunchAgents"
|
|
119
|
+
LAUNCHD_PLIST=$(ls -1 "$LAUNCH_AGENTS"/com.cli-jaw.*.plist 2>/dev/null | head -1)
|
|
120
|
+
|
|
121
|
+
if [ -n "$LAUNCHD_PLIST" ]; then
|
|
122
|
+
if grep -q "<key>SessionCreate</key>" "$LAUNCHD_PLIST" \
|
|
123
|
+
&& grep -q "<true/>" "$LAUNCHD_PLIST" \
|
|
124
|
+
&& grep -q "<string>Interactive</string>" "$LAUNCHD_PLIST"; then
|
|
125
|
+
check "launchd plist SessionCreate + Interactive" PASS "$LAUNCHD_PLIST"
|
|
126
|
+
else
|
|
127
|
+
check "launchd plist SessionCreate + Interactive" FAIL "re-run: jaw launchd"
|
|
128
|
+
fi
|
|
129
|
+
if grep -q "CLI_JAW_RUNTIME" "$LAUNCHD_PLIST"; then
|
|
130
|
+
check "plist CLI_JAW_RUNTIME env" PASS
|
|
131
|
+
else
|
|
132
|
+
check "plist CLI_JAW_RUNTIME env" FAIL "plist is stale — jaw launchd"
|
|
133
|
+
fi
|
|
134
|
+
if grep -q "$JAW_APP/Contents/MacOS/jaw-launcher" "$LAUNCHD_PLIST"; then
|
|
135
|
+
check "plist ProgramArguments → Jaw.app launcher" PASS
|
|
136
|
+
else
|
|
137
|
+
check "plist ProgramArguments → Jaw.app launcher" SKIP "legacy plist still points at node directly"
|
|
138
|
+
fi
|
|
139
|
+
else
|
|
140
|
+
check "launchd plist registered" SKIP "run: jaw launchd (optional for foreground mode)"
|
|
141
|
+
fi
|
|
142
|
+
|
|
143
|
+
# ─── E. desktop-control skill installed ────────────────────────
|
|
144
|
+
|
|
145
|
+
SKILL_DIR="$HOME/.cli-jaw/skills/desktop-control"
|
|
146
|
+
if [ -f "$SKILL_DIR/SKILL.md" ]; then
|
|
147
|
+
check "desktop-control skill active" PASS "$SKILL_DIR"
|
|
148
|
+
missing=""
|
|
149
|
+
for ref in cdp.md computer-use.md vision-click.md intent-routing.md; do
|
|
150
|
+
[ -f "$SKILL_DIR/reference/$ref" ] || missing="$missing $ref"
|
|
151
|
+
done
|
|
152
|
+
if [ -z "$missing" ]; then
|
|
153
|
+
check "desktop-control reference/ complete" PASS
|
|
154
|
+
else
|
|
155
|
+
check "desktop-control reference/ complete" FAIL "missing:$missing"
|
|
156
|
+
fi
|
|
157
|
+
else
|
|
158
|
+
check "desktop-control skill active" FAIL "expected $SKILL_DIR/SKILL.md"
|
|
159
|
+
fi
|
|
160
|
+
|
|
161
|
+
# ─── F. prompt anchors baked in A-1.md ─────────────────────────
|
|
162
|
+
|
|
163
|
+
A1_DISK="$HOME/.cli-jaw/prompts/A-1.md"
|
|
164
|
+
if [ -f "$A1_DISK" ]; then
|
|
165
|
+
if grep -q "anchor:desktop-control" "$A1_DISK"; then
|
|
166
|
+
check "A-1.md desktop-control anchor" PASS
|
|
167
|
+
else
|
|
168
|
+
check "A-1.md desktop-control anchor" FAIL "restart jaw serve to trigger safe-append"
|
|
169
|
+
fi
|
|
170
|
+
else
|
|
171
|
+
check "A-1.md on disk" SKIP "first-run only (jaw serve will create it)"
|
|
172
|
+
fi
|
|
173
|
+
|
|
174
|
+
# ─── G. Server reachable (optional) ────────────────────────────
|
|
175
|
+
|
|
176
|
+
if [ "$FAST" -eq 0 ]; then
|
|
177
|
+
if require_cmd curl; then
|
|
178
|
+
if curl -sfm 2 http://localhost:3457/api/health >/dev/null 2>&1; then
|
|
179
|
+
check "jaw serve reachable on :3457" PASS
|
|
180
|
+
else
|
|
181
|
+
check "jaw serve reachable on :3457" SKIP "start: jaw serve (or jaw launchd)"
|
|
182
|
+
fi
|
|
183
|
+
fi
|
|
184
|
+
fi
|
|
185
|
+
|
|
186
|
+
# ─── H. Computer Use MCP probe (requires codex) ────────────────
|
|
187
|
+
|
|
188
|
+
if [ "$FAST" -eq 0 ]; then
|
|
189
|
+
if require_cmd codex; then
|
|
190
|
+
check "codex CLI available" PASS "$(command -v codex)"
|
|
191
|
+
else
|
|
192
|
+
check "codex CLI available" SKIP "Computer Use MCP unreachable without codex"
|
|
193
|
+
fi
|
|
194
|
+
fi
|
|
195
|
+
|
|
196
|
+
hr
|
|
197
|
+
printf "%bResult%b pass=%d fail=%d skip=%d\n" "$BOLD" "$OFF" "$PASS" "$FAIL" "$SKIP"
|
|
198
|
+
|
|
199
|
+
if [ "$FAIL" -gt 0 ]; then
|
|
200
|
+
printf "%b✗ one or more checks failed%b\n" "$RED" "$OFF"
|
|
201
|
+
exit 1
|
|
202
|
+
fi
|
|
203
|
+
printf "%b✓ all required checks passed%b\n" "$GREEN" "$OFF"
|
|
204
|
+
exit 0
|