1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! # 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(())
//! # }
//! ```
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;