Skip to content

Commit 73078d7

Browse files
committed
feat: add Computer Use integration for desktop control
- Add core/desktop_control.py wrapping Hermes computer_use tool (cua-driver) - Support: capture, click, type, key, scroll, drag, list-apps, list-windows, focus-app - Add 'deskbridge desktop <action>' CLI subcommand with confirmation for risky actions - All desktop actions recorded in activity log - Add test for desktop_control requiring Hermes agent environment - Update CI/CD workflow to include new files - Update README with desktop control documentation Note: computer_use tool is only available within Hermes agent context; standalone execution returns a clear error message.
1 parent f2e28d4 commit 73078d7

5 files changed

Lines changed: 757 additions & 4 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
2929
- name: Compile-check all Python files
3030
run: |
31-
python -m py_compile deskbridge.py core/loader.py core/confirm.py core/installer.py wrappers/blender/actions.py wrappers/blender/cli.py wrappers/gimp/actions.py wrappers/gimp/cli.py wrappers/inkscape/actions.py wrappers/inkscape/cli.py wrappers/obsidian/actions.py wrappers/obsidian/cli.py wrappers/zotero/actions.py wrappers/zotero/cli.py hub/app.py hub/run_production.py tests/test_discovery.py
31+
python -m py_compile deskbridge.py core/activity_log.py core/chart_generator.py core/confirm.py core/desktop_control.py core/installer.py core/loader.py wrappers/blender/actions.py wrappers/blender/cli.py wrappers/gimp/actions.py wrappers/gimp/cli.py wrappers/inkscape/actions.py wrappers/inkscape/cli.py wrappers/obsidian/actions.py wrappers/obsidian/cli.py wrappers/zotero/actions.py wrappers/zotero/cli.py hub/app.py hub/run_production.py tests/test_discovery.py
3232
3333
- name: Run test suite
3434
run: |

‎README.md‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,33 @@ python deskbridge.py chart
4646
```
4747
Generates an SVG bar chart of activity statistics (success vs. failure per wrapper) and saves it to `reports/activity_chart.svg`.
4848

49+
## Desktop control
50+
```bash
51+
python deskbridge.py desktop <action> [options]
52+
```
53+
54+
Controls any desktop application through screenshots, mouse clicks, keyboard input, scrolling, and dragging via the Hermes `computer_use` tool. Available actions:
55+
56+
- `capture` — Take a screenshot (`--app`, `--mode som|vision|ax`)
57+
- `click` — Click an element (`--element`, `--coordinate X Y`, `--app`, `--button`, `--delivery-mode background|foreground`, `--confirm`)
58+
- `type` — Type text (`text`, `--app`, `--delivery-mode`, `--confirm`)
59+
- `key` — Press key combo (`keys`, e.g. `ctrl+s`, `return`, `--app`, `--delivery-mode`, `--confirm`)
60+
- `scroll` — Scroll (`direction up|down|left|right`, `--amount`, `--app`, `--delivery-mode`)
61+
- `drag` — Drag between elements (`--from-element`, `--from-coordinate X Y`, `--to-element`, `--to-coordinate X Y`, `--app`, `--delivery-mode`, `--confirm`)
62+
- `list-apps` — List running applications
63+
- `list-windows` — List open windows
64+
- `focus-app` — Focus an application (`app`, `--raise-window`)
65+
66+
Risky actions (`click`, `type`, `key`, `drag`) require confirmation (`y/n`) unless `--confirm` is passed. All desktop actions are recorded in the activity log.
67+
68+
**Note:** Desktop control requires the Hermes agent environment (the `computer_use` tool is only available through the Hermes agent). Running `deskbridge.py desktop ...` outside the Hermes agent will return an error explaining this requirement.
69+
4970
## Completed
5071
- [x] Blender render wrapper
5172
- [x] Core loader + confirmation
5273
- [x] Activity log tracking
5374
- [x] Chart generation (SVG)
75+
- [x] Desktop control (computer_use integration)
5476
- [x] Simple CLI-Hub registry
5577
- [x] Second application wrapper (GIMP)
5678
- [x] Install command (`deskbridge install <app>`)

0 commit comments

Comments
 (0)