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, baseline_compare_trace_envelope,
34};
35pub use memory::{
36    MemoryLookupError, MemoryLookupHit, MemoryLookupStore, MemoryLookupTool,
37    memory_lookup_trace_envelope,
38};
39pub use patterns::{
40    BehaviorPattern, BehaviorPatternSkill, BehaviorRegistry, PatternId, PatternRule,
41};
42#[cfg(feature = "graph")]
43pub use projection::subgraph_to_context_item;
44pub use projection::{
45    IntoContextItem, evidence_to_context_item, evidence_to_context_items,
46    memory_hit_to_context_item, memory_hits_to_context_items, pack_resource_context,
47};
48pub use skills::{BaselineCompareSkill, MemoryPivotSkill};
49pub use trace::ResourceTraceEnvelope;
50
51#[cfg(feature = "graph")]
52pub use graph::{
53    GraphEdge, GraphError, GraphExpansionConfig, GraphExpansionSkill, GraphStore, GraphTool,
54    InMemoryGraph, Subgraph,
55};
56
57#[cfg(feature = "security")]
58pub use security::{
59    FindingSeverity, SecurityFinding, security_finding_to_context_item,
60    security_finding_trace_envelope, security_findings_to_context_items,
61};