The client half of Antimatter is a native Android app built with Jetpack Compose,
Hilt (dependency injection), Room (local persistence), and Gson (JSON). It connects to
the bridge over WebSocket, renders the live agent trajectory, and sends control messages back.
The WebSocket client: connects with the Bearer token, performs the Ed25519 AUTH_CHALLENGE/AUTH_RESPONSE handshake, and exposes inbound messages as a flow.
BridgeService.kt
A foreground Service that keeps the socket alive in the background and surfaces system alerts as notifications.
BridgeMessage.kt
Kotlin model of the wire protocol: TrajectoryStep, the StepCase enum, and inbound/outbound message types.
NetworkModule.kt
Hilt module providing the WebSocket/network singletons.
See the WebSocket Protocol page for the full message contract shared with the
extension.
connect — scans the pairing QR, stores the URL + token + bridge public key, and tracks
connection status.
chat — subscribes to a conversation and renders each TrajectoryStep according to its
StepCase (text, tool calls, run‑command, approvals, …), and sends prompts / edit decisions.
files — browses the workspace FILE_TREE and opens file contents via READ_FILE.
terminal — runs EXECUTE_COMMAND, gated behind a biometric (fingerprint/face) lock, and
streams COMMAND_OUTPUT.
Open the android/ directory in Android Studio (Koala or newer) and let Gradle sync. Crashlytics
in debug builds requires a valid android/app/google-services.json (optional).