harness-read 0.1.0

Read tool for AI agent harnesses — filesystem read with pagination, binary sniff, directory listing, attachment shape, NOT_FOUND fuzzy siblings
Documentation

harness-read

Safe, bounded, line-numbered file reading with pagination, binary refusal, and fuzzy-sibling NOT_FOUND.

Rust port of @agent-sh/harness-read. Part of the harness-* monorepo — see the top-level README for architectural context.

Install

[dependencies]
harness-read = "0.1"

Usage

use harness_read::{read, ReadSessionConfig};
use harness_core::PermissionPolicy;
use serde_json::json;

let perms = PermissionPolicy::new(vec!["/workspace".into()]);
let session = ReadSessionConfig::new("/workspace", perms);
let r = read(json!({ "path": "/workspace/src/main.rs" }), &session).await;

Contract

The full contract lives in agent-knowledge/design/read.md. Changes to this crate must stay in sync with that spec, and with the TypeScript sibling at @agent-sh/harness-read.

License

MIT © Avi Fenesh