mirror of
https://github.com/yuga-hashimoto/openclaw-assistant.git
synced 2026-08-14 07:02:02 +00:00
Rebrand OpenClawAssistant as AgentVoice while keeping the OpenClaw runtime
fully intact. The app now talks to OpenClaw Gateway, OpenClaw HTTP and
Hermes API Server side-by-side, with a Primary backend that wake word,
Voice Overlay, Chat, and Wear OS all consult.
Core
- AgentClient interface + HermesApiServerClient with /v1/chat/completions
streaming, /v1/runs Runs API, Stop, OpenAI-compatible SSE parsing, and
Hermes-native hermes.tool.progress events.
- HermesEndpointRacer races LAN / Tailscale / public URLs in parallel on
every connect (Hermes-Relay style); winner cached per backend.
- BackendRepository (EncryptedSharedPreferences) with single-Primary
invariant; BackendMigration synthesises configs from legacy SecurePrefs
+ SettingsRepository on first launch.
- PrimaryBackendDispatcher routes OpenClawSession + ChatViewModel HTTP
sends through Hermes when it is Primary; legacy OpenClaw path stays
byte-for-byte compatible.
Mobile Bridge (opt-in HTTP service)
- Bearer-token auth, EncryptedSharedPreferences-stored 256-bit token,
constant-time compare, /health unauthenticated, RateLimiter, structured
errors. Endpoints: /health /manifest /execute /cancel/{id} /pair /grants
/revoke. Approval flow with notification + Activity; per-capability TTL
grants (10 min / 1 h / until revoked) with destructive-verb override.
- Capabilities: device.info, apps.list, apps.launch, clipboard.read,
wifi.status, location.get, notifications.active.list (via the existing
NotificationListenerService), and an Accessibility Bridge with
screen.tap/swipe/home/back/window.describe (sideload-only via
BuildConfig.IS_SIDELOAD). High-risk: sms.send, contacts.create/delete,
calendar.create/delete, camera.capture_photo (advertised only when the
required runtime permissions are held).
- hermes-pair PC helper (integrations/hermes-mobile-bridge/hermes_pair.py)
prints an ASCII QR encoding agentvoice://hermes/setup?u=&k=&m=&r=&s=&n=
that any QR scanner on the phone resolves to HermesImportActivity.
UI
- New BackendListActivity / BackendEditorActivity (with LAN + Tailscale +
public URL slots), MobileBridgeSettingsActivity, BridgePairingActivity.
- ChatActivity gains a backend selector chip in the top bar.
- MainActivity gains a PrimaryBackendCard on Home and Cloud / Bridge /
Setup-wizard icons in the top bar.
- AgentVoiceSetupActivity: 4-step wizard with Step-2 checkboxes for
Hermes / OpenClaw; Hermes step shows the hermes-pair instructions, the
OpenClaw step links into the legacy SetupGuideScreen pairing flow.
- MorphingSphere replaces the flat mic dot in AssistantUI — Hermes-Relay
style audio-reactive blob with state-driven harmonics.
Tests
- 169 unit tests, 0 failures. Covers HermesUrl normalisation, SSE parser,
HermesApiServerClient request/event mapping, BackendRepository primary
invariant, BackendManager, HermesEndpointRacer (MockWebServer),
BridgeGrants + DestructiveVerbs, BridgePairing, RateLimiter,
MobileBridgeServer auth+rate-limit+grant flow, PairingUriParser, and
MorphingSphere state-driven parameter table.
Docs
- README banner explaining backends and migration.
- docs/hermes-mobile-bridge.md: endpoint table, pairing flow, grants,
multi-endpoint racing, Accessibility Bridge.
- integrations/hermes-mobile-bridge/ Python helper + SKILL.md.
App identity
- strings/app_name = "AgentVoice" (one word); applicationId unchanged so
upgrades land in place.