Expand description
agent-harness-adapter-core: shared plumbing for CLIs that plug into LLM agent
harnesses (Claude Code, Codex, Gemini CLI, GitHub Copilot, Cursor,
Factory Droid, Pi, OpenCode, Kilo Code, Qwen Code, Devin, and any agent
that reads AGENTS.md).
integration: what a tool installs, declared once without naming a harness.harness: theHarnesscontract, the parts a harness renders, their states, andinstall/statusover a set of harnesses, with shared content written once.hook: hook events, the input a harness sends, the answer a hook gives,emit, and theLoopGuard.- One module per harness:
claude,codex,factory,gemini,copilot,cursor,pi,opencode,kilo,qwen,devin,agents_md. manifest: an integration declared in a TOML or JSON file, for tools not written in Rust;hook::wireis their hook contract.report: findings (error / warning / info) and their text and JSON forms.cli: exit codes, stdout, broken pipes and theerror:runner.fs: whole-file reads and atomic writes that keep symlinks and modes.
Re-exports§
pub use harness::Action;pub use harness::DeclinedStore;pub use harness::EntryMatch;pub use harness::ExternalPart;pub use harness::Harness;pub use harness::HarnessResult;pub use harness::InstallOptions;pub use harness::InstallResult;pub use harness::MergeOp;pub use harness::Part;pub use harness::PartResult;pub use harness::Scope;pub use harness::State;pub use harness::TomlDeclined;pub use harness::Tool;pub use harness::UninstallOptions;pub use harness::install;pub use harness::installed;pub use harness::status;pub use harness::uninstall;pub use integration::Integration;pub use integration::Item;pub use report::Finding;pub use report::Report;pub use report::Severity;
Modules§
- agents_
md - Any agent that reads
AGENTS.md:AgentsMd, the harness (idagents). - claude
- Claude Code:
Claude, the harness, andinstructions_file, its rule for the instructions file it reads. - cli
- CLI conventions: the exit codes, buffered stdout, broken-pipe detection
and the
error: <message>runner. - codex
- OpenAI Codex CLI:
Codex, the harness. - copilot
- GitHub Copilot:
Copilot, the harness (CLI, VS Code agent, cloud agent). - cursor
- Cursor:
Cursor, the harness. - devin
- Devin CLI and Devin Local (Devin Desktop’s agent; Windsurf’s successor):
Devin, the harness. - factory
- Factory Droid:
Factory, the harness. - fs
- Whole-file reads and atomic writes that respect what the user set up: a symlink stays a symlink, a file keeps its permissions.
- gemini
- Gemini CLI:
Gemini, the harness. - harness
- Harness integration, the same for every harness: the
Harnesscontract, the parts a harness renders (file,region,merge,external), the state of each part, the shared-location choice, the record, the declined parts, andinstall/status/uninstallover a set of harnesses. A harness’s own formats live in its module (e.g.claude). - hook
- Hooks, the same for every harness: events, the input a harness sends,
the answer a hook gives,
emit, which writes it in the harness’s form, andLoopGuard. - integration
- A tool’s integration, declared once without naming a harness: an
instructions block, skills, hooks, MCP servers, allowed commands,
subagents and slash commands, plus raw parts for one harness. Each
Harnessrenders it into its own files. - kilo
- Kilo Code (its CLI and VS Code extension, a fork of OpenCode):
Kilo, the harness. Its hooks are the same TypeScript plugin as OpenCode’s. - manifest
- A tool’s integration declared in a file (AHA-1), for tools not written in
Rust:
agent-harness-adapterand the language bindings load it, andManifestToolmakes it aTool. - opencode
- OpenCode:
OpenCode, the harness. Its hooks are a TypeScript plugin the library writes, which runs the tool’s hook commands. - pi
- Pi:
Pi, the harness. Its hooks are a TypeScript extension the library writes, which runs the tool’s hook commands. - qwen
- Qwen Code (a fork of Gemini CLI with Claude Code’s hooks):
Qwen, the harness. - report
- Findings and the report: severities error / warning / info, the text
form
<path>:<line>: <level>: <message> (<authority>)with the counts line, and the JSON form.
Enums§
- Error
- Everything that can go wrong in the library. Every variant but
Error::IoandError::Internalis a refusal:installreturns it before any write.
Type Aliases§
- Result
- The crate’s result type.