Skip to main content

oneharness_core/
lib.rs

1//! oneharness-core: the reusable engine behind the `oneharness` CLI, and a
2//! depend-able library for tools that install hooks into — or sync configs for
3//! — the supported agentic coding harnesses (Claude Code, Codex, OpenCode,
4//! Goose, Qwen Code, Crush, Copilot CLI, Cursor).
5//!
6//! - [`domain`] is pure: it builds argv, parses output, shapes the report,
7//!   holds the harness registry, renders hooks, layers config, and computes the
8//!   sync merge — with no process / filesystem / env / clock I/O.
9//! - [`io`] performs the real I/O: PATH resolution, version probing, spawning,
10//!   reading config, and writing harness config files and hooks.
11//!
12//! The cross-harness capability a consumer most often wants: build a
13//! [`domain::hooks::HookSpec`] and call [`io::hooks::install`] to write a
14//! pre-tool hook into any harness in that harness's native shape (a shared
15//! config file, a dedicated hooks file, or a plugin). It is generic — the
16//! command and plugin identity are caller-supplied, never hardcoded.
17
18pub mod domain;
19pub mod errors;
20pub mod io;