Skip to main content

Crate roma_core

Crate roma_core 

Source
Expand description

Roma Agent core: loop state machine, error taxonomy, session, middleware.

Re-exports§

pub use error::ClassifiedError;
pub use error::RecoveryAction;
pub use history::DefaultHistoryCompressor;
pub use history::HistoryCompressor;
pub use home::RomaHome;
pub use home::RomaHomeError;
pub use memory::MemoryError;
pub use memory::MemoryLevel;
pub use memory::MemoryStore;
pub use memory::NullMemoryStore;
pub use memory::PatchError;
pub use os::mock::MockOs;
pub use os::ByteStream;
pub use os::ExecSpec;
pub use os::ExitInfo;
pub use os::LocalOs;
pub use os::Os;
pub use os::OsError;
pub use os::OsProcess;
pub use os::WriteMode;
pub use path::PathError;
pub use path::safe_resolve;
pub use rules::RULE_SENTINEL;
pub use rules::RuleMode;
pub use rules::RuleScope;
pub use rules::StreamRule;
pub use session::CacheStrategy;
pub use session::ChatSession;
pub use session::inject_memory;
pub use session_manager::SessionManager;
pub use session_manager::SessionMeta;
pub use session_manager::timestamp_now;
pub use str_utils::ceil_char_boundary;
pub use str_utils::floor_char_boundary;
pub use str_utils::truncate_at_char_boundary;
pub use tokenizer::ApproxTokenizer;
pub use tokenizer::TiktokenTokenizer;
pub use tokenizer::Tokenizer;
pub use types::AgentEvent;
pub use types::ContentBlock;
pub use types::ExitReason;
pub use types::LoopResult;
pub use types::Message;
pub use types::NormalizedRequest;
pub use types::NormalizedResponse;
pub use types::ReasoningEffort;
pub use types::Role;
pub use types::StepResult;
pub use types::StopReason;
pub use types::StreamChunk;
pub use types::ThinkingConfig;
pub use types::ToolCall;
pub use types::ToolDef;
pub use types::ToolResultMessage;
pub use types::Usage;

Modules§

error
Structured error taxonomy for Roma Agent.
history
History compression strategies.
home
Canonical path resolution for ~/.roma/ runtime state.
memory
Memory store trait and types.
os
OS abstraction layer: the Os trait, LocalOs passthrough, MockOs test double (spec: docs/superpowers/specs/2026-08-13-os-abstraction-design.md).
path
Safe path resolution helpers.
rules
Stream rules: user-declared regex guardrails matched against streamed LLM output. See docs/superpowers/specs/2026-08-12-stream-rules-design.md.
session
Chat session: message history and persistence.
session_manager
Session persistence manager.
str_utils
Small string utilities. UTF-8-safe slicing primitives that are stable polyfills for the unstable str::floor_char_boundary / str::ceil_char_boundary APIs.
tokenizer
Token counting.
types
Core data types for Roma Agent.