Skip to main content

agent_harness_adapter_core/
lib.rs

1//! agent-harness-adapter-core: shared plumbing for CLIs that plug into LLM agent
2//! harnesses (Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor,
3//! Factory Droid, Pi, OpenCode, Kilo Code, Qwen Code, Devin, and any agent
4//! that reads `AGENTS.md`).
5//!
6//! - [`integration`]: what a tool installs, declared once without naming a
7//!   harness.
8//! - [`harness`]: the [`Harness`] contract, the parts a harness renders,
9//!   their states, and [`install`] / [`status`] over a set of harnesses,
10//!   with shared content written once.
11//! - [`hook`]: hook events, the input a harness sends, the answer a hook
12//!   gives, [`emit`](hook::emit), and the [`LoopGuard`](hook::LoopGuard).
13//! - One module per harness: [`claude`], [`codex`], [`factory`], [`gemini`],
14//!   [`copilot`], [`cursor`], [`pi`], [`opencode`], [`kilo`], [`qwen`],
15//!   [`devin`], [`agents_md`].
16//! - [`manifest`]: an integration declared in a TOML or JSON file, for
17//!   tools not written in Rust; [`hook::wire`] is their hook contract.
18//! - [`report`]: findings (error / warning / info) and their text and JSON
19//!   forms.
20//! - [`cli`]: exit codes, stdout, broken pipes and the `error:` runner.
21//! - [`fs`]: whole-file reads and atomic writes that keep symlinks and modes.
22#![warn(missing_docs)]
23
24#[doc = include_str!("../README.md")]
25#[cfg(doctest)]
26pub struct ReadmeDoctests;
27
28mod common;
29mod error;
30mod hash;
31#[cfg(test)]
32mod test_support;
33
34pub mod agents_md;
35pub mod claude;
36pub mod cli;
37pub mod codex;
38pub mod copilot;
39pub mod cursor;
40pub mod devin;
41pub mod factory;
42pub mod fs;
43pub mod gemini;
44pub mod harness;
45pub mod hook;
46pub mod integration;
47pub mod kilo;
48pub mod manifest;
49pub mod opencode;
50pub mod pi;
51pub mod qwen;
52pub mod report;
53
54pub use error::{Error, Result};
55pub use harness::{
56    Action, DeclinedStore, EntryMatch, ExternalPart, Harness, HarnessResult, InstallOptions,
57    InstallResult, MergeOp, Part, PartResult, Scope, State, TomlDeclined, Tool, UninstallOptions,
58    install, installed, status, uninstall,
59};
60pub use integration::{Integration, Item};
61pub use report::{Finding, Report, Severity};