Runtime architecture
Roder separates the stable harness from installable behavior. The core owns turn lifecycle, cancellation, policy, event ordering, tool routing, and provider loops. Extensions provide inference engines, tools, stores, policy contributors, event sinks, subagent dispatchers, and UI services.
The dependency rule
extensions -> roder-api
core -> roder-api
apps -> roder-protocol
roder-cli -> core + selected extensions
Extensions do not depend on roder-core. The core does not depend on
provider crates. Distribution binaries compose the registry they want.
Turn flow
- A client starts a turn through the TUI or
roder-app-server. roder-coreassembles context and selects the configured inference engine.- The provider streams canonical inference events back into the runtime.
- Tool calls are filtered by policy, routed through the registry, and emitted as events.
- Tool results are appended to the turn until the provider reaches end-of-turn.
- The final transcript and typed events are available to stores, sinks, clients, and replay tooling.
Eval deadline path
Eval-profile turns can carry an internal deadline. Near the reserve window, the runtime asks the model to checkpoint scoreable outputs, update the task ledger when required, then finalize without starting more tools. Command tools see the remaining deadline and clamp long process timeouts so failures become tool results instead of opaque external interrupts.
Core crates
roder-apidefines the contracts.roder-coreexecutes turns against those contracts.roder-extension-hostbuilds the default registry for the CLI distribution.roder-protocolkeeps the app-server wire shapes separate from runtime internals.