harness-bash 0.1.1

Bash tool for AI agent harnesses — autonomous shell execution with tokio process management, cwd-carry, inactivity timeout, head+tail spill, background jobs
Documentation

harness-bash

Shell with cwd-carry, inactivity + wall-clock timeouts, head+tail spill-to-file on overflow, and background jobs.

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

Install

[dependencies]
harness-bash = "0.1"

Usage

use harness_bash::{bash, BashSessionConfig, BashPermissionPolicy, default_executor};
use harness_core::PermissionPolicy;
use serde_json::json;

let perms = BashPermissionPolicy::new(PermissionPolicy::new(vec!["/workspace".into()]))
    .with_unsafe_bypass(true);
let session = BashSessionConfig::new("/workspace", perms, default_executor())
    .with_logical_cwd_carry();
let r = bash(json!({ "command": "ls -la" }), &session).await;

Contract

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

License

MIT © Avi Fenesh