# Adom USB

**See every USB device across the entire Adom ecosystem — and mount it anywhere.**

`adom-usb` is a Hydrogen webview app (+ CLI) that unifies USB across the whole
mesh: your **laptop**, its **WSL2 / Hydrogen Desktop**, this **cloud container**,
the **Azure VM** and its **WSL2**, and **workcells**. One table, Local/Cloud
filters, and per-device **mount / unmount / reset / test / force-class / sniff**.

It extends the same Linux USB/IP "slingshot" that already moves workcell USB into
cloud containers — now with the user's own machines as first-class sources and
targets.

## Run

```bash
adom-usb app                 # live: real lsusb on this container + registered agents
adom-usb app --demo          # seed a representative cross-ecosystem set for a tour
adom-usb list --demo         # unified inventory as JSON (no server)
adom-usb health              # is a dashboard server up?
```

Opens a Hydrogen tab named **USB Devices**. Columns: device · VID:PID · serial ·
class · source/location · current mount · target picker + actions.

## Drive it (every button is also an HTTP endpoint — AI-drivable)

```bash
adom-usb mount   laptop:2e8a:0003 laptop-wsl2     # RP2040 → laptop WSL2 (usbipd attach --wsl)
adom-usb mount   laptop:2e8a:0003 this-container  # RP2040 → cloud container (reverse tunnel)
adom-usb unmount laptop:2e8a:0003
curl -s localhost:8896/state | jq                 # hosts, devices, targets, mount state, action log
```

Each mount/op records the **exact agent command** it runs, visible in the
dashboard's action log.

## Routing matrix (v1)

Windows is **source + local-only**: a Windows box can export its USB and natively
use devices plugged into it, but a *remote* device cannot yet be mounted *into* a
native Windows desktop (needs the test-signed usbip-win client driver — those
targets show blocked). Linux targets (cloud container, laptop WSL2/HD, Azure
WSL2, workcells) accept remote mounts via `usbipd attach --wsl` (local) or the
adom-desktop **reverse tunnel** (cross-machine).

`reset` / `test` / `force-class` / `sniff` operate on the virtual device in a
**Linux target** — greyed out until the device is mounted on one.

## Status

M1 ships the unified inventory + mount overlay; each action emits the precise
agent command and wires to the live agents (usbipd-win over the relay,
`usbip attach` in the target, usbmon) as those land.
