feat(app): PC control through agent-desktop, with the emergency stop and the anti-cheat block
app/src/pc.rs runs every pc_action from the worker (admin.spec.md, "PC control"): one agent-desktop 1.2.0 run per command with a 15 s limit and its state in the data folder, never --force or raw input, typed text only through stdin. Each action is decided by permissions::decide for its asker (not registered, never, ask without consent), then refused during the emergency stop, while an anti-cheat game runs (Vanguard, EAC, BattlEye, FACEIT, GameGuard, XIGNCODE3 and the person's list), on an administrator window and in a password field. Results carry the window and its elements read again (200 at most, cut to 120 chars), agent-desktop's error codes become Korean reasons, and each action is recorded as pc.<action> with the program's file name only. The emergency stop is a global hotkey (pcControl.stopHotkey, default Ctrl+Shift+F12) on its own message loop; it kills the running command and blocks everything but reading until pressed again or lifted on the PC control screen. features.pcControl (on by default, nothing happens until someone is registered) and the pinned exe hash decide whether the brain gets the tool. The installer ships agent-desktop.exe from the pinned release archive, both hashes checked. Tested with a fake agent-desktop (342 lib tests pass) and cargo check for x86_64-pc-windows-gnu; not yet run against real agent-desktop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
#!/bin/sh
|
||||
# Build the Windows management app from Linux and lay it out ready to zip (admin.spec.md, "Windows build"):
|
||||
# Jarvis/jarvis.exe, Jarvis/WebView2Loader.dll, Jarvis/python-src/{voice_worker,jarvis},
|
||||
# Jarvis/display-driver/ (Virtual Display Driver 25.7.23, MIT, SignPath-signed; "Virtual monitor")
|
||||
# Needs the x86_64-pc-windows-gnu Rust target, mingw-w64, cmake (for Opus), curl and unzip.
|
||||
# Jarvis/display-driver/ (Virtual Display Driver 25.7.23, MIT, SignPath-signed; "Virtual monitor"),
|
||||
# Jarvis/agent-desktop.exe (agent-desktop 1.2.0, Apache-2.0; "PC control")
|
||||
# Needs the x86_64-pc-windows-gnu Rust target, mingw-w64, cmake (for Opus), curl, unzip and tar.
|
||||
# app/shell/package.sh <output folder>
|
||||
set -eu
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
@@ -30,4 +31,14 @@ unzip -q "$vdd_zip" -d "$tmp"
|
||||
mkdir -p "$out/Jarvis/display-driver"
|
||||
cp "$tmp/VirtualDisplayDriver/MttVDD.inf" "$tmp/VirtualDisplayDriver/mttvdd.cat" "$tmp/VirtualDisplayDriver/MttVDD.dll" "$out/Jarvis/display-driver/"
|
||||
rm -rf "$tmp"
|
||||
# PC control's agent-desktop, the archive and the program pinned by hash as in app/src/pc.rs (the
|
||||
# app checks the program's hash again before every start of the services).
|
||||
ad_url=https://github.com/vercel-labs/agent-desktop/releases/download/v1.2.0/agent-desktop-v1.2.0-x86_64-pc-windows-msvc.tar.gz
|
||||
ad_sha=a4199f741a441cedd349bf56c5eba01783b1261258b498efeb7ec9945220c3e8
|
||||
ad_exe_sha=d274667031322e50b9c2b1ab81c2ca46835d52cc932769a5c34bd4d481fd94c3
|
||||
ad_tgz="$target/agent-desktop-1.2.0.tar.gz"
|
||||
[ -f "$ad_tgz" ] || curl -fsSL -o "$ad_tgz" "$ad_url"
|
||||
echo "$ad_sha $ad_tgz" | sha256sum -c - >/dev/null || { rm -f "$ad_tgz"; echo "agent-desktop hash mismatch" >&2; exit 1; }
|
||||
tar -xzf "$ad_tgz" -C "$out/Jarvis" agent-desktop.exe
|
||||
echo "$ad_exe_sha $out/Jarvis/agent-desktop.exe" | sha256sum -c - >/dev/null || { echo "agent-desktop.exe hash mismatch" >&2; exit 1; }
|
||||
echo "$out/Jarvis"
|
||||
|
||||
Reference in New Issue
Block a user