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
chore: files changed crates/openhuman-core/src/config/tools.rs,crates/openhuman-core/src/config/work
Steven Enamakel5c2312ee0464
diff --git a/crates/openhuman-core/src/config/tools.rs b/crates/openhuman-core/src/config/tools.rsindex 536dd3d4f9..82d1b58de7 100644--- a/crates/openhuman-core/src/config/tools.rs+++ b/crates/openhuman-core/src/config/tools.rs@@ -48,9 +48,19 @@ macro_rules! read_tool {fn parameters_schema(&self) -> serde_json::Value {json!({ "type": "object", "properties": {} })}- async fn execute(&self, _args: serde_json::Value) -> anyhow::Result<ToolResult> {+ async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {+ self.execute_with_context(args, tinytools::ToolCallOptions::default(), None)+ .await+ }+ async fn execute_with_context(+ &self,+ _args: serde_json::Value,+ _options: tinytools::ToolCallOptions,+ context: Option<&dyn tinytools::ToolRunContext>,+ ) -> anyhow::Result<ToolResult> {log::debug!(concat!("[tool][config] ", $name, " invoked"));- emit!(ops::$fn(&crate::core::runtime::DispatchCtx::ambient()).await, $name)+ let ctx = crate::agent::tinyagents::host::run_context::dispatch_ctx_for_tool(context);+ emit!(ops::$fn(&ctx).await, $name)}fn is_concurrency_safe(&self, _args: &serde_json::Value) -> bool {truediff --git a/crates/openhuman-core/src/config/workspace/tools.rs b/crates/openhuman-core/src/config/workspace/tools.rsindex 3613987d3c..006b38b806 100644--- a/crates/openhuman-core/src/config/workspace/tools.rs+++ b/crates/openhuman-core/src/config/workspace/tools.rs@@ -169,9 +169,19 @@ impl Tool for WorkspaceInitTool {PermissionLevel::Write}async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {+ self.execute_with_context(args, tinytools::ToolCallOptions::default(), None)+ .await+ }+ async fn execute_with_context(+ &self,+ args: serde_json::Value,+ _options: tinytools::ToolCallOptions,+ context: Option<&dyn tinytools::ToolRunContext>,+ ) -> anyhow::Result<ToolResult> {log::debug!("[tool][workspace] init invoked");let force = args.get("force").and_then(Value::as_bool).unwrap_or(false);- let value = ops::init_workspace(&DispatchCtx::ambient(), force)+ let ctx = crate::agent::tinyagents::host::run_context::dispatch_ctx_for_tool(context);+ let value = ops::init_workspace(&ctx, force).await.map_err(|e| anyhow::anyhow!("workspace_init: {e}"))?;Ok(ToolResult::success(serde_json::to_string(&value)?))