Skip to main content

rig_resources/
lib.rs

1//! Reusable resources for [rig-compose](https://crates.io/crates/rig-compose) agents.
2//!
3//! `rig-compose` owns the kernel traits and runtime composition surfaces.
4//! This crate owns reusable implementations: skills, tools, pattern
5//! registries, baseline stores, and optional graph resources.
6
7#![cfg_attr(
8    test,
9    allow(
10        clippy::unwrap_used,
11        clippy::expect_used,
12        clippy::indexing_slicing,
13        clippy::panic,
14        clippy::panic_in_result_fn,
15    )
16)]
17
18pub mod baseline;
19pub mod memory;
20pub mod patterns;
21pub mod projection;
22pub mod skills;
23pub mod trace;
24
25#[cfg(feature = "graph")]
26pub mod graph;
27
28#[cfg(feature = "security")]
29pub mod security;
30
31pub use baseline::{
32    BaselineCompareTool, BaselineError, BaselineStore, EntityBaseline, InMemoryBaselineStore,
33    OnlineStats,
34};
35pub use memory::{MemoryLookupError, MemoryLookupHit, MemoryLookupStore, MemoryLookupTool};
36pub use patterns::{
37    BehaviorPattern, BehaviorPatternSkill, BehaviorRegistry, PatternId, PatternRule,
38};
39pub use projection::{
40    IntoContextItem, evidence_to_context_item, evidence_to_context_items,
41    memory_hit_to_context_item, memory_hits_to_context_items, pack_resource_context,
42};
43pub use skills::{BaselineCompareSkill, MemoryPivotSkill};
44pub use trace::ResourceTraceEnvelope;
45
46#[cfg(feature = "graph")]
47pub use graph::{
48    GraphEdge, GraphError, GraphExpansionConfig, GraphExpansionSkill, GraphStore, GraphTool,
49    InMemoryGraph, Subgraph,
50};