harness_core/lib.rs
1//! Shared types for the @agent-sh/harness-* Rust tools.
2//!
3//! Mirrors the TypeScript `@agent-sh/harness-core` package so tool ports
4//! can conform to the same cross-language design spec. The public API
5//! here is the Rust-side contract: [`ToolError`] + [`ToolErrorCode`] for
6//! structured failures, [`PermissionPolicy`] for the fence shape,
7//! [`PermissionDecision`] for hook outcomes, and the [`format_tool_error`]
8//! helper that produces the canonical `Error [CODE]: message` string
9//! every tool wraps errors in at the executor boundary.
10
11pub mod errors;
12pub mod permissions;
13
14pub use errors::{format_tool_error, ToolError, ToolErrorCode};
15pub use permissions::{PermissionDecision, PermissionHook, PermissionPolicy};