Skip to main content

openrustclaw_core/
lib.rs

1//! Shared foundations for OpenRustClaw crates.
2//!
3//! `openrustclaw-core` is the lowest-level public crate in the workspace. It
4//! defines the shared types, traits, configuration structures, and error
5//! surfaces used by the rest of the platform.
6//!
7//! # Modules
8//!
9//! - [`types`] contains the shared domain models for messages, sessions, tool
10//!   calls, completion requests, and other runtime data.
11//! - [`traits`] defines the core subsystem contracts for providers, tools,
12//!   channels, and memory stores.
13//! - [`config`] contains serializable application configuration structures.
14//! - [`error`] defines the common error enums used across OpenRustClaw crates.
15//!
16//! # Quick start
17//!
18//! ```rust
19//! use openrustclaw_core::types::{Message, Platform, Session};
20//!
21//! let message = Message::user("Hello from crates.io");
22//! let session = Session::new_dm("user-123", Platform::Cli);
23//!
24//! assert_eq!(message.content, "Hello from crates.io");
25//! assert_eq!(session.user_id, "user-123");
26//! ```
27
28pub mod config;
29pub mod error;
30pub mod traits;
31pub mod types;