Skip to main content

roba_core/
lib.rs

1//! roba-core: the clap-free, side-effect-free run engine.
2//!
3//! This crate is roba's resolve-free core, split out from the CLI (#416). It
4//! owns two things:
5//!
6//! - [`engine`] -- the config-and-run seam. [`engine::run`] takes a
7//!   [`engine::Config`] and returns a [`claude_wrapper::types::QueryResult`]:
8//!   no clap, no stdout/stderr, no `process::exit`, no TTY. It is the down
9//!   payment on `serve` (#142), where a request maps to a `Config` and calls
10//!   `engine::run`.
11//! - [`session`] -- [`session::apply_session`], the single `Config ->
12//!   QueryCommand` mapper the engine feeds, plus the permission/notice
13//!   composition it consumes.
14//!
15//! The `roba` binary depends on this crate: its `run_ask` resolves
16//! flags/profiles/prompt into a `Config` (`build_config`) and renders the
17//! result around [`engine::run`]'s seam, so there is one flag->command mapper
18//! and no second copy to drift. Prompt composition, profile/env layering, live
19//! streaming display, output formatting, and exit-code classification stay in
20//! the CLI crate.
21
22pub mod engine;
23pub mod session;