| Crates.io | oxyde-core |
| lib.rs | oxyde-core |
| version | 0.1.0 |
| created_at | 2025-12-06 21:26:48.757848+00 |
| updated_at | 2025-12-06 21:26:48.757848+00 |
| description | Core types and utilities for the Oxyde SDK |
| homepage | |
| repository | https://github.com/Oxyde-Labs/Oxyde |
| max_upload_size | |
| id | 1970783 |
| size | 8,419 |
Core types, traits, and utilities for the Oxyde SDK ecosystem.
This crate provides the foundational types and traits used across all Oxyde crates. It defines the common interfaces that enable the various components to work together seamlessly.
// Core traits
pub trait Agent: Send + Sync {
async fn start(&self) -> Result<()>;
async fn stop(&self) -> Result<()>;
async fn process_input(&self, input: &str) -> Result<String>;
}
// Error types
pub type Result<T> = std::result::Result<T, OxydeError>;
#[derive(Debug, thiserror::Error)]
pub enum OxydeError {
#[error("Agent error: {0}")]
AgentError(String),
#[error("State error: {0}")]
StateError(String),
#[error("Memory error: {0}")]
MemoryError(String),
#[error("Behavior error: {0}")]
BehaviorError(String),
// ...
}
// Event types
pub enum AgentEvent {
Started,
Stopped,
StateChanged { from: String, to: String },
EmotionChanged { emotion: String, value: f32 },
MemoryStored { memory_id: String },
BehaviorExecuted { behavior: String },
}
// Context types
pub type AgentContext = HashMap<String, serde_json::Value>;
Essential - Must be published first as all other crates depend on it.
thiserror (for error types)serde (for serialization)uuid (for IDs)tokio (for async traits)Critical - Must be published before any other Oxyde crates as they all depend on these core types.