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};
39#[cfg(feature = "graph")]
40pub use projection::subgraph_to_context_item;
41pub use projection::{
42    IntoContextItem, evidence_to_context_item, evidence_to_context_items,
43    memory_hit_to_context_item, memory_hits_to_context_items, pack_resource_context,
44};
45pub use skills::{BaselineCompareSkill, MemoryPivotSkill};
46pub use trace::ResourceTraceEnvelope;
47
48#[cfg(feature = "graph")]
49pub use graph::{
50    GraphEdge, GraphError, GraphExpansionConfig, GraphExpansionSkill, GraphStore, GraphTool,
51    InMemoryGraph, Subgraph,
52};