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:
@@ -141,6 +141,7 @@ pub fn fields() -> Vec<Field> {
|
||||
f("features.schedule", Features, Bool, json!(true), "예약 알림과 정기 작업"),
|
||||
f("features.notes", Features, Bool, json!(true), "사람별 지침"),
|
||||
f("features.screen", Features, Bool, json!(true), "화면 보기(Windows, PC 제어에 등록한 사람만)"),
|
||||
f("features.pcControl", Features, Bool, json!(true), "PC 제어(Windows, PC 제어에 등록한 사람만, 다음 시작부터)"),
|
||||
f("mcpServers", Features, McpServers, json!([]), "MCP 서버"),
|
||||
// Background collection (admin.spec.md, "Background collection"): no targets by default.
|
||||
f("collect.targets", Collect, CollectTargets, json!([]), "수집 대상"),
|
||||
@@ -157,7 +158,11 @@ pub fn fields() -> Vec<Field> {
|
||||
f("pcControl.type", PcControl, Choice { values: LEVELS }, json!("ask"), "글자·키 입력"),
|
||||
f("pcControl.run", PcControl, Choice { values: LEVELS }, json!("ask"), "프로그램 실행"),
|
||||
f("pcControl.screenExclude", PcControl, TextList { max_items: 100, nullable: false },
|
||||
json!(["1Password", "Bitwarden", "KeePass", "KeePassXC"]), "화면 보기에서 뺄 프로그램(파일 이름, 은행·비밀번호 관리자 등)"),
|
||||
json!(["1Password", "Bitwarden", "KeePass", "KeePassXC"]), "화면 보기와 PC 제어에서 뺄 프로그램(파일 이름, 은행·비밀번호 관리자 등)"),
|
||||
f("pcControl.antiCheatGames", PcControl, TextList { max_items: 100, nullable: false }, json!([]),
|
||||
"안티치트가 있는 게임(파일 이름, 실행 중이면 키보드·마우스 제어를 하지 않음)"),
|
||||
f("pcControl.stopHotkey", PcControl, Text { max: 40, non_empty: true }, json!(crate::pc::DEFAULT_STOP_HOTKEY),
|
||||
"비상 정지 단축키(예: Ctrl+Shift+F12, 다음 시작부터)"),
|
||||
// Game detection (admin.spec.md, "Game detection").
|
||||
f("game.detect", Game, Bool, json!(true), "게임 감지"),
|
||||
f("game.games", Game, TextList { max_items: 100, nullable: false }, json!([]), "게임으로 볼 프로그램(파일 이름, 예: MyGame.exe)"),
|
||||
|
||||
Reference in New Issue
Block a user