# Protocol compatibility

Hermes Node Android should speak the same JSON/WebSocket protocol as the Linux node agent.

## Registration

The Android node registers existing tool names:

```json
{
  "type": "register",
  "node_name": "phone",
  "version": "0.1.0-android",
  "tools": [
    "computer_control",
    "desktop_observe",
    "audio_control",
    "camera_control"
  ],
  "capabilities": {
    "platform": "android",
    "computer_control": {
      "available": true,
      "platform_semantics": "android_phone_control"
    }
  }
}
```

## Wire compatibility rule

Use existing message/result types:

- `computer_control` → `computer_control_result`
- `desktop_observe` → `desktop_observe_result`
- `audio_control` → `audio_control_result`
- `camera_control` → `camera_control_result`
- `exec` → existing exec output/complete flow, if later enabled

Do not introduce `phone_control` unless the gateway needs a user-facing alias. The Android node can expose Android-only actions inside `computer_control` while preserving the gateway-side tool name.

## Android-specific action examples

### Launch an app

```json
{
  "type": "computer_control",
  "id": "cmd-1",
  "action": "launch_app",
  "params": {
    "package": "org.telegram.messenger"
  }
}
```

### Open a URL

```json
{
  "type": "computer_control",
  "id": "cmd-2",
  "action": "open_url",
  "params": {
    "url": "https://lisa.nexlab.net/"
  }
}
```

### Get screen info

```json
{
  "type": "desktop_observe",
  "id": "cmd-3",
  "action": "screen_info",
  "params": {}
}
```

## Compatibility principle

Same capability names, honest platform metadata, explicit unsupported errors for Android-impossible actions. That keeps the gateway stable while giving Android real functionality.
