harness-grep 0.1.1

Grep tool for AI agent harnesses — ripgrep-library content search with structured output modes, .gitignore respect, alias pushback, and fuzzy NOT_FOUND siblings
Documentation

harness-grep

ripgrep-backed content search with discriminated output_mode, regex-escape hints, and pagination.

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

Install

[dependencies]
harness-grep = "0.1"

Usage

use harness_grep::{grep, GrepSessionConfig};
use harness_core::PermissionPolicy;
use serde_json::json;

let perms = PermissionPolicy::new(vec!["/workspace".into()]);
let session = GrepSessionConfig::new("/workspace", perms);
let r = grep(json!({ "pattern": "TODO", "output_mode": "content" }), &session).await;

Contract

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

License

MIT © Avi Fenesh