Skip to main content

defect_agent/
lib.rs

1//! Defect agent core.
2//!
3//! Defines the abstractions that the agent main loop depends on: [`llm::LlmProvider`],
4//! [`tool::Tool`],
5//! [`event::AgentEvent`], and the session state container. Concrete provider/tool
6//! implementations live in
7//! sibling crates (`defect-llm`, `defect-tools`, `defect-mcp`, etc.) and are plugged in
8//! through
9
10#![cfg_attr(not(test), warn(clippy::indexing_slicing, clippy::unwrap_used))]
11//! These traits are consumed here.
12//!
13//! Modules are organized by responsibility and are **exposed only at the module level**
14//! (no flat re-exports at the lib root). Callers write `defect_agent::llm::LlmProvider`
15//! rather than `defect_agent::LlmProvider`.
16
17pub mod error;
18pub mod event;
19pub mod fs;
20pub mod hooks;
21pub mod http;
22pub mod llm;
23pub mod policy;
24pub mod session;
25pub mod shell;
26pub mod tool;