Computer Control
Kendalikan aplikasi macOS (termasuk WhatsApp Desktop) lewat Accessibility tree, baca UI, klik, ketik, tekan tombol, clipboard, screenshot, terbatas pada daftar aplikasi yang diizinkan
Tentang
Plugin Graphrt yang mengendalikan aplikasi desktop macOS. Plugin ini membaca UI aplikasi dari Accessibility tree macOS yang berbentuk teks, jadi agent bisa "melihat" aplikasinya. Setelah itu plugin bisa mengklik elemen, mengetik, menekan kombinasi tombol, memakai clipboard dan menyimpan screenshot. Setiap operasi adalah node workflow, dan semuanya kecuali quit_app dan whatsapp_desktop_send juga tool agent.
Yang bisa dilakukan
- Apps and windows: list_apps, open_app, focus_app, quit_app (node only), list_windows.
- Reading the UI: - read_ui returns elements {ref, role, title, value, description, placeholder, enabled, focused, position, size}, plus data.text, a compact indented outline that agents read. - find_elements finds elements by role and/or text.
- Acting on elements: click_element uses AXPress and falls back to a mouse click at the element's centre. Also set_value and focus_element.
- Keyboard and pointer: type_text (key by key, inserted through Accessibility, or pasted), press_keys (cmd+f, enter, cmd+shift+n, cmd+a delete), click_at.
- Clipboard: get_clipboard (opt-in), set_clipboard (plain text).
- Screen: take_screenshot saves one app window (or, opt-in, the whole screen) as a PNG and returns its path.
- WhatsApp Desktop: whatsapp_desktop_send (chat name, text) is a recipe built on the operations above. It is a workflow node only.
- Guardrails: - An app allowlist is required. - Every action is logged to stderr. Typed text is logged as its length only. - Operations run one at a time. - There is no "run arbitrary AppleScript" operation. - The manifest asks for no network access and no secrets (localOnly).
Aksi
Setiap aksi adalah langkah yang bisa ditambahkan ke workflow. Agent juga bisa memakai sebagian besar aksi sebagai tool.
- List running apps
computer-control.list_apps - Open app
computer-control.open_app - Focus app
computer-control.focus_app - Quit app
computer-control.quit_app - List windows
computer-control.list_windows - Read app UI
computer-control.read_ui - Find UI elements
computer-control.find_elements - Click element
computer-control.click_element - Set element value
computer-control.set_value - Focus element
computer-control.focus_element
Tampilkan semua 17 aksi
- Type text
computer-control.type_text - Press keys
computer-control.press_keys - Click at point
computer-control.click_at - Get clipboard
computer-control.get_clipboard - Set clipboard
computer-control.set_clipboard - Take screenshot
computer-control.take_screenshot - Send WhatsApp Desktop message
computer-control.whatsapp_desktop_send
Pengaturan
Graphrt menyalakan plugin dengan environment yang bersih. Hanya nilai ini yang sampai ke plugin, dan secret tidak masuk log.
-
COMPUTER_CONTROL_ALLOWED_APPSWajibComma-separated app names or bundle ids the plugin may control, e.g. Finder,TextEdit,net.whatsapp.WhatsApp. ASCII letters are case-insensitive. * allows every app. That is risky: an agent could then type into your terminal or password manager. -
COMPUTER_CONTROL_ALLOW_CLIPBOARD_READOpsionalSet to 1 to allow get_clipboard. The clipboard holds whatever was last copied in any app, passwords included. -
COMPUTER_CONTROL_ALLOW_FULL_SCREENSHOTOpsionalSet to 1 to allow take_screenshot without app (the whole screen, which shows every app). Window screenshots don't need it. -
COMPUTER_CONTROL_SCREENSHOT_DIROpsionalWhere screenshots go (default $TMPDIR/graphrt-computer-control)
Cara memakainya
Di Graphrt Desktop
- Buka Plugins dan cari Computer Control.
- Klik Install lalu setujui.
- Ikuti langkah setup di halaman plugin, lalu tempel pengaturan yang dibutuhkan.
- Jelaskan pekerjaan yang membutuhkannya, dan builder menambahkan langkahnya.
Dengan CLI
$ graphrt plugin install computer-control --yes - id: ui
type: computer-control.find_elements
app: TextEdit
role: textarea
- id: focus
type: computer-control.focus_element
app: TextEdit
ref: "{{#ui.data.elements.0.ref#}}"
- id: type
type: computer-control.type_text
app: TextEdit
text: "Hello from graphrt"
method: insert