Skip to content

Architecture

github-actions[bot] edited this page Dec 2, 2026 · 1 revision

Architecture

Workspace Layout

redstart/
├── crates/
│   ├── redstart-protocol/   # Pure ACP JSON-RPC 2.0 builders, parsers, PairingUri
│   ├── redstart-bridge/     # Axum + Tokio persistent stdio-to-WebSocket daemon & QR pairing
│   └── redstart-core/       # Async rustls WebSocket + ACP client exported via Mozilla UniFFI
├── android/                 # Jetpack Compose Material 3 Android client (cc.westness.redstart)
├── assets/                  # Circular navy Redstart brand icons and QR emblem
├── deploy/                  # systemd --user service unit template
├── docs/                    # Wiki documentation (auto-synced to GitHub Wiki)
├── site/                    # Static project site published to redstart.westness.cc
└── scripts/                 # Local Android SDK bootstrap and build/install scripts

Wire Flow

Android Compose UI (PTT + Streaming TTS + Mobile TUI)
        │  Mozilla UniFFI (16 KB aligned .so)
        ▼
redstart-core (Rust async rustls WebSocket + ACP client)
        │  wss://<host>.<tailnet>.ts.net:8444/acp  (Tailscale Serve TLS)
        ▼
redstart-bridge (Axum + Tokio supervisor, init cache, /pair QR)
        │  JSON-RPC 2.0 over stdio
        ▼
Any ACP Agent (agy acp, claude-code-acp, codex-acp, gemini, opencode…)

Design Principles

  • Protocol-first: All ACP JSON-RPC message construction and parsing (initialize, session/new, session/load, session/list, session/prompt, session/cancel, session/set_config_option, session/update, session/request_permission, $/ping) lives in redstart-protocol with unit tests.
  • Single source of truth for client networking: redstart-core owns WebSocket framing, rustls TLS (ring crypto provider), request/response correlation, and event dispatch so the Android UI stays a thin reactive Compose layer.
  • Strict agent compatibility: redstart-bridge intercepts and serves cached initialize responses per child process lifetime and handles $/ping locally, keeping reconnecting mobile clients fast and compatible with single-init ACP servers.

Clone this wiki locally