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
refactor(shell): simplify effective action directory documentation
Steven Enamakele9577e18fe44
diff --git a/crates/openhuman-core/src/tools/impl/system/shell.rs b/crates/openhuman-core/src/tools/impl/system/shell.rsindex 39c527234a..53ea453664 100644--- a/crates/openhuman-core/src/tools/impl/system/shell.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell.rs@@ -129,14 +129,10 @@ impl ShellTool {/// Resolve the working directory for this shell invocation.///- /// Returns the per-worker git-worktree checkout when the tinyagents harness- /// threaded a [`WorkspaceDescriptor`] into this call's- /// [`ToolExecutionContext`](tinyagents_harness::tool::ToolExecutionContext) — an edit-capable worker running with- /// `isolation = "worktree"`, whose isolated worktree root is carried on the- /// run context (`RunContext::with_workspace`) and surfaced per tool call via- /// `ToolExecutionContext::from_run_context`. Otherwise falls back to the- /// shared `self.security.action_dir`, which preserves the non-isolated- /// behaviour exactly. See #3376, #4249 (08.5).+ /// Returns the root from a [`WorkspaceDescriptor`] threaded into this+ /// call's [`ToolExecutionContext`](tinyagents_harness::tool::ToolExecutionContext).+ /// Otherwise falls back to the shared `self.security.action_dir`.+ /// See #3376, #4249 (08.5).fn effective_action_dir_for_context(&self, context: Option<&dyn ToolRunContext>) -> PathBuf {if let Some(workspace) = context.and_then(|ctx| ctx.workspace()) {tracing::debug!(diff --git a/crates/openhuman-core/src/tools/impl/system/shell_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_tests.rsindex a712052e83..20f89f7a17 100644--- a/crates/openhuman-core/src/tools/impl/system/shell_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell_tests.rs@@ -37,7 +37,7 @@ fn audit_with_tempdir() -> (Arc<AuditLogger>, tempfile::TempDir) {/// Build a `ToolExecutionContext` carrying a `WorkspaceDescriptor` rooted/// at `root`, mirroring what the tinyagents harness threads into every tool-/// call of a worktree-isolated worker (`RunContext::with_workspace` →+/// call with an explicit workspace (`RunContext::with_workspace` →/// `ToolExecutionContext::from_run_context`).fn tool_context_with_workspace(root: &std::path::Path,@@ -45,7 +45,7 @@ fn tool_context_with_workspace(use tinyagents_harness::context::{RunConfig, RunContext};use tinyagents_harness::tool::ToolExecutionContext;use tinytools::WorkspaceDescriptor;- let ws = WorkspaceDescriptor::new(root.to_path_buf()).with_policy_id("test-worktree");+ let ws = WorkspaceDescriptor::new(root.to_path_buf()).with_policy_id("test-workspace");let ctx: RunContext = RunContext::new(RunConfig::new("test-run"), ()).with_workspace(ws);ToolExecutionContext::from_run_context(&ctx, tinyagents_harness::ids::CallId::new("test-call"))}