# jamiepinheiro/ipad_computer_use — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `agents`
- Overall score: `3.3/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `0e80495d4a10` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-11-30T12:43:25Z
- Repository: https://github.com/jamiepinheiro/ipad_computer_use
- Radar entry: https://radar.alplab.co/#repo/jamiepinheiro/ipad_computer_use
- License: `MIT`
- Tags: `computer-use`, `mcp-server`, `rp2040`, `hid`, `ipados`, `replaykit`

## Summary

Agent computer-use for iPadOS via a Seeed XIAO RP2040 USB HID dongle: Node relay + MCP server, ReplayKit iPad app, and RP2040 firmware that plays keyboard/mouse reports as real USB input.

## Implementation Check

All three claimed components are fully implemented — firmware (input_device/firmware/input_tool/input_tool.ino), relay/MCP/calibration (control_server/server.js, control_server/mcp_server.js), iPad app with broadcast capture (ipad_app/Broadcast/SampleHandler.swift, ipad_app/ipad_computer_use/RelayConnection.swift) — and README claims match the code, including its own Live Activity caveat.

## When to Use

Reach for it when you need an agent to type, click, drag, scroll, and screenshot on a physical USB-C iPad or iPhone without jailbreaking, and you can flash a XIAO RP2040, sign the app with your own Apple team, and keep the server on a private network. Do not use it multi-user or exposed to any network you don't fully trust.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 4.0/5 |
| usability | 2.5/5 |
| reliability | 3.0/5 |
| security | 3.0/5 |
| integration | 4.0/5 |

## Code Evidence

control_server/server.js implements a session-gated WebSocket relay with loopback-only controller API, browser-origin rejection, JPEG payload validation, no-replay/uncertain-outcome semantics; control_server/mcp_server.js is a real JSON-RPC MCP server (status/get_screen/issue_actions, loopback default, optional Tailnet bind); control_server/high_level_actions.js compiles absolute-coordinate actions into relative HID counts by inverting a measured acceleration curve (control_server/calibration/mapping.js); input_device/firmware/input_tool/input_tool.ino is genuine HID firmware with secret-gated /input and /stop, bounded parser, 70s deadline, BOOT-click emulation for iPhone AssistiveTouch; control_server/test/relay.test.js asserts exact encoded hex and gate behavior.

## Issues Found

No CI config to run the substantial test suites (control_server/test/, input_device/test/, ipad_app harnesses); control server listens on 0.0.0.0 by default and any LAN host can fetch a session via unauthenticated POST /session/start and then claim the /device socket, receiving the input-device secret (control_server/server.js — acceptable only under the documented trusted-LAN/Tailscale deployment); committed build artifacts including a compiled harness binary and Xcode logs under ipad_app/build_iphone/; no releases or version tags.

## Key Risks

Nothing was executed, so nothing is proven to run; there is no CI (maturity ci is empty), so tests pass only if run locally. Requires hardware (XIAO RP2040, data cable) and Apple signing credentials to install the app. Security is documented as intentionally no-auth on app-facing routes over plaintext ws/HTTP, safe only on a trusted private network (SECURITY.md); the input-device secret is embedded in firmware and delivered to the app over the socket. Live Activity background update/dismissal is admitted unverified on physical devices. Only 8 commits over ~1 month, 2 contributors, no releases.

## Reviewed Files

- `README.md`
- `SECURITY.md`
- `THIRD_PARTY.md`
- `package.json`
- `control_server/server.js`
- `control_server/mcp_server.js`
- `control_server/high_level_actions.js`
- `control_server/sessions.js`
- `control_server/config.js`
- `control_server/live_activity.js`
- `control_server/client.js`
- `control_server/calibration/server.js`
- `control_server/calibration/store.js`
- `control_server/calibration/mapping.js`
- `control_server/test/relay.test.js`
- `control_server/test/mcp_server.test.js`
- `input_device/README.md`
- `input_device/protocol/actions.js`
- `input_device/protocol/sequence.js`
- `input_device/scripts/build.sh`
- `input_device/test/input.test.cpp`
- `input_device/firmware/input_tool/input_tool.ino`
- `ipad_app/ipad_computer_use/RelayConnection.swift`
- `ipad_app/ipad_computer_use/DongleClient.swift`
- `ipad_app/ipad_computer_use/SetupStatus.swift`
- `ipad_app/ipad_computer_use/ipad_computer_use_app.swift`
- `ipad_app/Broadcast/SampleHandler.swift`
