No description
Find a file
dependabot[bot] a692dc5eb7
chore(deps): bump org.json:json from 20240303 to 20260814
Bumps [org.json:json](https://github.com/douglascrockford/JSON-java) from 20240303 to 20260814.
- [Release notes](https://github.com/douglascrockford/JSON-java/releases)
- [Changelog](https://github.com/stleary/JSON-java/blob/master/docs/RELEASES.md)
- [Commits](20240303...20260814)

---
updated-dependencies:
- dependency-name: org.json:json
  dependency-version: '20260814'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-24 15:54:13 +00:00
.github chore: repo hygiene 2026-08-24 22:50:59 +07:00
agents/antigravity/done chore(repo): task 05 repo hygiene version catalog dependabot and docs (TASK-2026-08-24-05-repo-hygiene) 2026-08-24 22:53:07 +07:00
agy-work feat(storage): task 02 persistence integrity and timeline ordering (TASK-2026-08-24-02-persistence-integrity) 2026-08-24 21:37:39 +07:00
app chore: repo hygiene 2026-08-24 22:50:59 +07:00
gradle chore(deps): bump org.json:json from 20240303 to 20260814 2026-08-24 15:54:13 +00:00
hermes-pair chore: repo hygiene 2026-08-24 22:50:59 +07:00
schemas feat(storage): task 02 persistence integrity and timeline ordering (TASK-2026-08-24-02-persistence-integrity) 2026-08-24 21:37:39 +07:00
.gitignore chore: repo hygiene 2026-08-24 22:50:59 +07:00
build.gradle.kts chore: repo hygiene 2026-08-24 22:50:59 +07:00
CHANGELOG.md chore: repo hygiene 2026-08-24 22:50:59 +07:00
CONTRIBUTING.md chore: repo hygiene 2026-08-24 22:50:59 +07:00
gradle.properties chore: repo hygiene 2026-08-24 22:50:59 +07:00
gradlew Initial commit: Hermes Android native remote client MVP (Contract v1) 2026-08-23 22:46:58 +07:00
gradlew.bat Initial commit: Hermes Android native remote client MVP (Contract v1) 2026-08-23 22:46:58 +07:00
LICENSE chore: repo hygiene 2026-08-24 22:50:59 +07:00
README.md chore: repo hygiene 2026-08-24 22:50:59 +07:00
SECURITY.md chore: repo hygiene 2026-08-24 22:50:59 +07:00
settings.gradle.kts Initial commit: Hermes Android native remote client MVP (Contract v1) 2026-08-23 22:46:58 +07:00

Hermes Android Native Remote Client

A production-grade, native Android client application for Hermes, implementing Protocol & Architecture Contract v1 with Multi-Hermes Connection Manager and Unified Sessions.

Built with Kotlin, Jetpack Compose (Material 3), Coroutines, Room Database, OkHttp, and Android Keystore (EncryptedSharedPreferences).


🌟 Architecture Overview

   ┌─────────────────────────────────────────────────────────────────────────┐
   │                          Hermes Android Client                          │
   │  ┌───────────────────────────────────────────────────────────────────┐  │
   │  │                      Jetpack Compose UI (M3)                      │  │
   │  │   • Multi-Host Switcher • Unified Sessions • Attributed Chat      │  │
   │  └─────────────────────────────────┬─────────────────────────────────┘  │
   │                                    │ StateFlow / Actions                │
   │  ┌─────────────────────────────────▼─────────────────────────────────┐  │
   │  │                   Unified Session Repository                      │  │
   │  │   • Logical Unified Sessions   • Context Synchronization Delta    │  │
   │  │   • Host-Tagged Event Routing  • Local Persistence (Room DB)      │  │
   │  └──────────────────┬──────────────────────────────┬─────────────────┘  │
   │                     │                              │                    │
   │  ┌──────────────────▼──────────────────┐  ┌────────▼─────────────────┐  │
   │  │      Hermes Connection Manager      │  │   Encrypted Token Vault  │  │
   │  │   • Map<HostId, HostRuntime>        │  │   (Host-Scoped Keystore) │  │
   │  └───────┬─────────────────────────┬───┘  └──────────────────────────┘  │
   │          │                         │                                    │
   │  ┌───────▼─────────────┐   ┌───────▼─────────────┐                      │
   │  │   Host #1 Runtime   │   │   Host #2 Runtime   │                      │
   │  │  (OkHttp WS + REST) │   │  (OkHttp WS + REST) │                      │
   │  └───────┬─────────────┘   └───────┬─────────────┘                      │
   └──────────┼─────────────────────────┼────────────────────────────────────┘
              │                         │
              ▼                         ▼
   ┌──────────────────────┐  ┌──────────────────────┐
   │    Hermes Host #1    │  │    Hermes Host #2    │
   │   (Windows Office)   │  │    (Linux Server)    │
   │   `hermes serve`     │  │   `hermes serve`     │
   └──────────────────────┘  └──────────────────────┘

🚀 Key Multi-Host Features

  1. Multi-Hermes Connection Manager:

    • Save and manage multiple independent Hermes installations (e.g. Workstation, Linux Server, Cloud VM).
    • Independent WebSocket connections, concurrent state management, and isolated reconnect loops.
    • Individual host health badges: Online, Connecting, Offline, Auth Expired.
  2. Unified Sessions & Context Synchronization:

    • Create one logical conversation (UnifiedSession) that spans multiple physical Hermes hosts.
    • Seamlessly switch active execution hosts mid-conversation via the top-bar dropdown.
    • Delta Context Sync: Injects conversation history and task context to newly attached hosts automatically without full-history re-transmission or secret leakage.
    • Host Attribution: Every response bubble, tool card, and thinking trace displays its originating host badge (e.g. [Office PC], [Linux Server]).
    • Non-Blocking Host Switching: If Host #1 is executing a long tool or computation and you switch to Host #2, Host #1 completes its work in the background and commits results into the shared timeline.
  3. Isolated Host Security & Approvals:

    • Host-scoped credentials stored securely in Android Keystore (hostId -> tokens).
    • Host-Targeted Approvals & Clarifications: Dangerous command approvals (approval.request) and sudo prompts route back strictly to the exact host runtime and native session that emitted them.
  4. Local Persistence (Room DB):

    • Full offline caching for UnifiedSession, HostSessionBinding, and UnifiedMessage.
    • Raw native session browser for inspecting individual host histories.

🖥️ Hermes Host Setup

Windows Host

hermes serve --host 0.0.0.0 --port 9119

With OAuth / GitHub Auth:

$env:HERMES_AUTH_REQUIRED="true"
$env:HERMES_AUTH_PROVIDERS="github"
$env:HERMES_AUTH_GITHUB_CLIENT_ID="<your_client_id>"
$env:HERMES_AUTH_GITHUB_CLIENT_SECRET="<your_client_secret>"
hermes serve --host 0.0.0.0 --port 9119

Linux Host

export HERMES_AUTH_REQUIRED="true"
export HERMES_AUTH_PROVIDERS="github"
export HERMES_AUTH_GITHUB_CLIENT_ID="<your_client_id>"
export HERMES_AUTH_GITHUB_CLIENT_SECRET="<your_client_secret>"

hermes serve --host 0.0.0.0 --port 9119

🧪 Testing & Verification

Run the full automated test suite:

.\gradlew.bat test

Run Android Lint:

.\gradlew.bat lint

Assemble Debug APK:

.\gradlew.bat assembleDebug

📱 Instant QR Onboarding — Hermes Pair (hermes-pair/)

Inside the hermes-pair/ directory is the cross-platform desktop companion application written in Rust. It runs on Windows and Linux to auto-discover your local IP and generate a secure QR code for instant onboarding with Hermes Android.

1. Download Prebuilt Binaries (GitHub Releases)

Download prebuilt binaries and SHA256SUMS.txt from the latest GitHub Releases.

Verifying SHA-256 Checksums:

  • Windows (PowerShell):

    Get-FileHash .\hermes-pair-windows-x86_64.exe -Algorithm SHA256
    # Compare the resulting hash with SHA256SUMS.txt
    
  • Linux:

    sha256sum -c SHA256SUMS.txt
    # or verify directly:
    sha256sum hermes-pair-linux-x86_64
    

2. Running Hermes Pair

Windows (GUI or CLI):

# Launch GUI window
.\hermes-pair-windows-x86_64.exe

# Terminal QR output
.\hermes-pair-windows-x86_64.exe qr --port 9119

Linux (GUI or Headless Server):

chmod +x hermes-pair-linux-x86_64

# Launch GUI window
./hermes-pair-linux-x86_64

# Headless / Terminal QR
./hermes-pair-linux-x86_64 --terminal --port 9119

3. Building Hermes Pair from Source:

cd hermes-pair
cargo test
cargo build --release

The compiled binaries will be located at:

  • Windows: hermes-pair/target/release/hermes-pair.exe
  • Linux: hermes-pair/target/release/hermes-pair