dci-tool 0.1.0

Direct Corpus Interaction: a sandboxed, ripgrep-backed corpus-search toolset and agent for cyber-focused LLM agents, built on rig.
Documentation
//! # dci-tool — Direct Corpus Interaction
//!
//! A sandboxed, ripgrep-backed corpus-interaction toolset and agent for
//! cyber-focused LLM agents, built on [`rig`](rig_core).
//!
//! Instead of embedding a corpus into a vector database, a DCI agent
//! *interrogates the raw text directly* with a small set of bounded,
//! strongly-typed commands — search, find, read, list — that run ripgrep's own
//! engine in-process. This trades opaque semantic recall for transparent,
//! reproducible, real-time evidence with `path:line` citations.
//!
//! ## Layers
//!
//! - [`sandbox`]: a read-only path-jail ([`CorpusRoot`]) plus resource
//!   [`Limits`].
//! - [`engine`]: the in-process ripgrep search/find/read/list functions.
//! - [`tools`]: those functions wrapped as rig [`Tool`](rig_core::tool::Tool)s.
//! - [`agent`]: a [`DciAgent`] that wires the tools onto any
//!   [`CompletionModel`](rig_core::completion::CompletionModel).
//!
//! ## Example
//!
//! ```no_run
//! use dci_tool::{CorpusRoot, DciAgent};
//! # async fn run<M: rig_core::completion::CompletionModel + 'static>(model: M)
//! # -> Result<(), Box<dyn std::error::Error>> {
//! let corpus = CorpusRoot::new("/path/to/corpus")?;
//! let agent = DciAgent::builder(model, corpus).build();
//! let answer = agent.investigate("Which host first contacted 10.0.0.5?").await?;
//! println!("{answer}");
//! # Ok(())
//! # }
//! ```

#![forbid(unsafe_code)]
#![warn(missing_docs)]

pub mod agent;
pub mod engine;
pub mod error;
pub mod sandbox;
pub mod session;
pub mod telemetry;
pub mod tools;

#[cfg(feature = "mcp")]
pub mod mcp;

#[cfg(feature = "eval")]
pub mod eval;

pub use agent::{DEFAULT_MAX_TURNS, DEFAULT_PREAMBLE, DciAgent, DciAgentBuilder};
pub use error::{DciError, Result};
pub use sandbox::{CorpusRoot, Limits};
pub use session::{InvestigationState, InvestigationTurn, SessionConfig, SessionStore};
pub use tools::{CorpusTools, FindTool, ListTool, ReadTool, SearchTool};

#[cfg(feature = "mcp")]
pub use mcp::{DciDelegate, DciMcpService};

#[cfg(feature = "eval")]
pub use eval::{Comparison, DciRetriever, EvalConfig, Retriever, VectorRetriever, evaluate};