Skip to main content

brainwires_core/
lib.rs

1#![deny(missing_docs)]
2//! # Brainwires Core
3//!
4//! Foundation types, traits, and error handling for the Brainwires Agent Framework.
5//!
6//! This crate provides the core data structures used across all framework crates:
7//! - Message types for AI conversations
8//! - Tool definitions and execution results
9//! - Task and agent context types
10//! - Plan metadata and status
11//! - Working set for file context management
12//! - Chat options and provider configuration
13//! - Permission modes
14
15/// Content source types for tracking where content originates.
16pub mod content_source;
17/// Lifecycle hooks for intercepting framework events.
18pub mod lifecycle;
19/// Embedding provider trait for vector operations.
20pub mod embedding;
21/// Framework error types and result aliases.
22pub mod error;
23/// Knowledge graph types: entities, edges, and trait interfaces.
24pub mod graph;
25/// Message, role, and streaming types for AI conversations.
26pub mod message;
27/// Structured output parsers for LLM responses.
28#[cfg(feature = "planning")]
29pub mod output_parser;
30/// Plan metadata, steps, budgets, and serializable plans.
31pub mod plan;
32/// Plan text parser for extracting steps from LLM output.
33#[cfg(feature = "planning")]
34pub mod plan_parser;
35/// Permission mode definitions.
36pub mod permission;
37/// Provider configuration and chat options.
38pub mod provider;
39/// Task, priority, and agent response types.
40pub mod task;
41/// Tool definitions, schemas, contexts, and idempotency.
42pub mod tool;
43/// Vector store trait for similarity search.
44pub mod vector_store;
45/// Working set for file context management with LRU eviction.
46pub mod working_set;
47
48// Re-export core types at crate root
49pub use content_source::ContentSource;
50pub use embedding::EmbeddingProvider;
51pub use error::*;
52#[cfg(feature = "planning")]
53pub use output_parser::{JsonOutputParser, JsonListParser, OutputParser, RegexOutputParser};
54pub use graph::*;
55pub use message::*;
56pub use permission::*;
57pub use plan::*;
58#[cfg(feature = "planning")]
59pub use plan_parser::{ParsedStep, parse_plan_steps, steps_to_tasks};
60pub use provider::*;
61pub use task::*;
62pub use tool::*;
63pub use vector_store::{VectorSearchResult, VectorStore};
64pub use working_set::{WorkingSet, WorkingSetConfig, WorkingSetEntry, estimate_tokens, estimate_tokens_from_size};