Expand description
Action backends and resilience primitives for Brain OS.
Extracted from the CLI crate so they can be reused by adapters and tests.
Re-exports§
pub use baseline::BaselineProvider;pub use baseline::CapabilitySummary;pub use capabilities::native_capabilities;pub use error::BackendInitError;pub use fetch::BasicUrlFetcher;pub use logs::LogAnalysis;pub use memory::DefaultMemoryBackend;pub use messaging::json_escape;pub use messaging::render_message_template;pub use messaging::WebhookMessageBackend;pub use messaging::DEFAULT_MESSAGE_BODY;pub use net::NetDiagnostics;pub use resilience::resilient_send;pub use resilience::ResilientSendError;pub use scheduling::DefaultSchedulingBackend;pub use search::CustomSearchBackend;pub use search::DuckDuckGoSearchBackend;pub use search::SearxngSearchBackend;pub use search::TavilySearchBackend;pub use security::ConfigSecurityAuditor;
Modules§
- baseline
- System baseline + drift detection — the executor behind
brain baseline capture/diff/listand thebaseline.capture/diff/listnative capabilities. - capabilities
- The declarative capability-registration substrate.
- error
- Typed errors for backend construction.
- fetch
- URL-fetch backend — bounded HTTP GET + HTML→text reduction.
- logs
- Log pattern analysis — the executor behind
brain logs analyzeand thelogs.analyzenative capability. - memory
- Memory backend for the action dispatcher.
- messaging
- Message backend — webhook delivery with resilience.
- net
- Network diagnostics — the executor behind
brain net check/trace/certand thenet.check/net.trace/net.certnative capabilities (Issue 139). - resilience
- Resilience helpers for HTTP backends — pairs the canonical
resilience::CircuitBreakerwith retry + reqwest-aware transient-error detection. Re-exportsCircuitBreakerso existing backend code keeps theuse crate::resilience::CircuitBreakerimport shape. - scheduling
- Scheduling backend — persists scheduled intents to SQLite.
- search
- Web search backends — DuckDuckGo (zero-config built-in), SearXNG, Tavily, and custom endpoint providers.
- security
- Security-posture audit — the executor behind
brain security auditand thesecurity.auditnative capability (Issue 140).
Structs§
- Circuit
Breaker - Per-target circuit breaker. The
tool_idis opaque to the breaker but is what consumers (the capability router, audit log, Live tab) key on, so it is included in every emittedBrainEvent::BreakerStateChange.
Traits§
- Breaker
- The circuit-breaker contract callers depend on, so resilience consumers
(
backends::resilient_send, the per-tool registry, tests) can be written against the behaviour rather than the concreteCircuitBreakerstruct — the SOLID dependency-inversion seam for the breaker.