A thin Compose-bindings layer over services/opencode. It
re-exports the opencode API (api(:services:opencode)) and surfaces the things
features read from the composition tree rather than inject directly.
Namespace
com.getcode.opencode.compose. See the CompositionLocal injection pattern in 02 — State & dependency injection.
LocalExchange(Exchange.kt) —staticCompositionLocalOf<Exchange>that exposes the OCPExchange(rates, preferred currency) to Compose. Provided inMainActivity'sCompositionLocalProvider; read withLocalExchange.current.ExchangeStub(ExchangeStub.kt) — an inertExchange(empty/identity rates) used as the default when no realExchangeis provided (previews, tests).
:services:opencode is Compose-free (it's a plain library). This module adds the
Compose dependency and the Local* bindings, keeping the Compose runtime out of the
core service module. Features depend on :services:opencode-compose (often
transitively via :services:flipcash-compose) to get both the API and its ambient
handles.