The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(harness): document explicit sandbox mode plumbing
Steven Enamakel920961e67b99
diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.mdindex c6c52aa821..93b19cba3c 100644--- a/crates/openhuman-core/src/agent/harness/README.md+++ b/crates/openhuman-core/src/agent/harness/README.md@@ -25,8 +25,9 @@ used here (not defined here) by [`fork_context.rs`](./fork_context.rs).traits directly. This module does not export a compatibility runner of itsown.- Carry the task-local plumbing that lets a spawned tool see its parent's- runtime context (`fork_context.rs`, [`sandbox_context.rs`](./sandbox_context.rs),- [`spawn_depth_context.rs`](./spawn_depth_context.rs), `OpenHumanRunContext`).+ runtime context (`fork_context.rs`, [`spawn_depth_context.rs`](./spawn_depth_context.rs)).+ Sandbox mode is carried explicitly by `OpenHumanRunContext` into the typed+ tool execution context.- Run the channel/CLI turn graph ([`graph.rs`](./graph.rs)); all sub-agents usethe shared sub-agent turn graph.- Offload oversized worker artifacts to the filesystem, and persist oversized@@ -38,7 +39,7 @@ used here (not defined here) by [`fork_context.rs`](./fork_context.rs).| Module | Role || --- | --- || `definition*.rs`, [`builtin_definitions.rs`](./builtin_definitions.rs), [`definition_loader.rs`](./definition_loader.rs) | `AgentDefinition`/`AgentDefinitionRegistry`/`SandboxMode`/`ToolScope`/`PromptSource`/`ModelSpec`; loads built-ins from `crate::agent::registry::agents` and user TOML from the workspace/home `agents/` directory. |-| `fork_context.rs`, `sandbox_context.rs`, `spawn_depth_context.rs` | Task-locals that let a spawned tool see its parent's runtime context: parent handle, sandbox mode, and spawn depth. `fork_context.rs` also carries the `RunQueue` handle (from `tinyagents_harness::run_queue`) down to a forked turn. |+| `fork_context.rs`, `spawn_depth_context.rs` | Task-locals that let a spawned tool see its parent's runtime context: parent handle and spawn depth. `fork_context.rs` also carries the `RunQueue` handle (from `tinyagents_harness::run_queue`) down to a forked turn. || `graph.rs` | `run_channel_turn_via_graph` (`pub(crate)`): the channel/CLI turn graph, thin over `run_turn_via_tinyagents_shared`; called by the `agent.run_turn` native-bus handler in [`agent/bus.rs`](../bus.rs). || `artifact_offload/` | The `outputs/` / `workspace/` convention under `action_dir`: prompt half (`contract.rs`) and host policy half (`policy.rs`); mechanics (thresholds, path resolution, pointer rendering, the writer) live in `tinyagents_harness::artifacts` and are re-exported here. || `tool_result_artifacts/` | Wiring only: `new_tool_result_store` hands `tinyagents_harness::artifacts::tool_results` OpenHuman's redactor (`SanitizingRedactor`), `file_read`/`use_skill` names and `FileReadTool::MAX_FILE_SIZE_BYTES`. The store, `[tool_result_preview]` envelope, budgets and paged reads live in the crate. |@@ -56,8 +57,8 @@ What `harness/mod.rs` actually re-exports:- `ParentExecutionContext` and its accessors (`current_parent`,`with_parent_context`, `AgentContextPreparedSource`):parent runtime context for spawned tools.-- `current_sandbox_mode`/`with_current_sandbox_mode`: sandbox task-local accessors.- Briefing task recency belongs to `integrations/composio/task_recency_context.rs`.+Sandbox policy lives on the explicit host operation context. Briefing task+recency belongs to `integrations/composio/task_recency_context.rs`.- `artifact_offload::{...}`: reached only via the `artifact_offload::` path(see Notes), never flattened into `harness::`.diff --git a/crates/openhuman-core/src/integrations/composio/README.md b/crates/openhuman-core/src/integrations/composio/README.mdindex 58f24e69e2..b870b5ddf5 100644--- a/crates/openhuman-core/src/integrations/composio/README.md+++ b/crates/openhuman-core/src/integrations/composio/README.md@@ -157,7 +157,8 @@ Published from `ops/` via `crate::core::bus::BUS.publish` (`crate::core::events:- `crate::config`: `Config` / `ComposioConfig` (`mode`, `entity_id`), `config::rpc` config loading.- `crate::modules`: loads the `tinyconnectors` native module that `module_client.rs` calls into (behind the `modules` feature).- `tinyconnectors_bus`: the wire contract (member names, payload types) for the `tinyconnectors` module call surface; a plain dependency, not feature-gated.-- `crate::agent::harness`: sandbox mode (`current_sandbox_mode` / `SandboxMode`) for tool gating.+- `crate::agent::tinyagents::host::run_context`: explicit sandbox mode projected+ from the typed tool execution context for per-action and dispatcher gating.- [`task_recency_context.rs`](./task_recency_context.rs): Composio-owned morning briefing recency scope; `tools/execute.rs` forwards its window through the connector bus.- `tinytools`: `Tool`, `ToolResult`, `ToolCategory`, `PermissionLevel`, `ToolCallOptions`.- `crate::security`: `SecurityPolicy` / `ToolOperation` for direct-tool gating.diff --git a/crates/openhuman-core/src/sandbox/README.md b/crates/openhuman-core/src/sandbox/README.mdindex b640ef62a6..3fb4449117 100644--- a/crates/openhuman-core/src/sandbox/README.md+++ b/crates/openhuman-core/src/sandbox/README.md@@ -195,7 +195,7 @@ The settings surface (`get_sandbox_settings`, `[security.sandbox]` and- Shell construction for each platform is `agent::platform_shell`.- The agent's `SandboxMode` is declared in its definition(`agent::harness::definition`) and read per call through- `agent::harness::current_sandbox_mode()`.+ the explicit agent sandbox mode supplied by the tool execution context.## Gotchasdiff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjsindex fd24a8b486..eaef5cd258 100644--- a/scripts/ci/check-openhuman-rust-layout.mjs+++ b/scripts/ci/check-openhuman-rust-layout.mjs@@ -47,7 +47,7 @@ const LEGACY_LIMIT_ENTRIES = [// a follow-up without reintroducing an old harness/session exception.["crates/openhuman-core/src/agent/session_host/builder/factory.rs", 973],["crates/openhuman-core/src/agent/subagent_host/lifecycle.rs", 1247],- ["crates/openhuman-core/src/agent/subagent_host/ops/runner.rs", 1064],+ ["crates/openhuman-core/src/agent/subagent_host/ops/runner.rs", 1063],["crates/openhuman-core/src/tools/ops.rs", 883],["crates/openhuman-core/src/web_chat/progress_bridge.rs", 1264],// These established external test modules grew with upstream coverage. Pin