git.iko.soy/opencode-android
on master help sign in
17 lines 767 B history raw
1//! Crux core for the opencode Android client.
2//!
3//! The core owns all state and logic (connect/auth, session list, chat, and the
4//! streaming of assistant replies from the SSE event stream). The platform shell
5//! (Android / Jetpack Compose) is a thin driver: it renders [`ViewModel`], turns
6//! user actions into [`Event`]s, performs the effects the core asks for (HTTP
7//! requests, and — outside the core — the `/event` SSE subscription), and feeds
8//! server-sent events back in as [`Event::ServerEvent`].
9//!
10//! Because HTTP request/response is the only network capability Crux models,
11//! the long-lived SSE connection lives in the shell; each decoded event is
12//! handed to the core verbatim as a JSON string.
14mod app;
15mod protocol;
17pub use app::*;