Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

Merge remote-tracking branch 'upstream/main' into tinywallet-release-0192

Steven Enamakel92b4749a81f7
diff --cc crates/openhuman-core/src/agent/tools/run_workflow.rs
index f45f5ca99a,6bf10cdd26..69c63a78c4
--- a/crates/openhuman-core/src/agent/tools/run_workflow.rs
+++ b/crates/openhuman-core/src/agent/tools/run_workflow.rs
@@@ -344,7 -344,7 +344,14 @@@ impl Tool for RunWorkflowTool
// Fire-and-forget: only the spawn backstop applies — no await, so no
// re-entrancy/nesting slot to take.
if wait_seconds == 0 {
- return match spawn_workflow_run_background(workflow_id.clone(), inputs, origin).await {
- return match spawn_workflow_run_background(&dispatch, workflow_id.clone(), inputs, origin).await {
++ return match spawn_workflow_run_background(
++ &dispatch,
++ workflow_id.clone(),
++ inputs,
++ origin,
++ )
++ .await
++ {
// Count only spawns that actually start against the backstop —
// unknown-workflow / bad-input rejections (the Err arm) must not
// burn the budget, or rejected calls accumulate and trip the
@@@ -378,16 -378,16 +385,18 @@@
Err(e) => return Ok(ToolResult::error(format!("run_workflow: {e}"))),
};
- let started = match spawn_workflow_run_background(workflow_id.clone(), inputs, origin).await
- let started = match spawn_workflow_run_background(&dispatch, workflow_id.clone(), inputs, origin).await
-- {
-- Ok(s) => {
-- if let Err(e) = guard::account_spawn(&dispatch) {
-- return Ok(ToolResult::error(format!("run_workflow: {e}")));
++ let started =
++ match spawn_workflow_run_background(&dispatch, workflow_id.clone(), inputs, origin)
++ .await
++ {
++ Ok(s) => {
++ if let Err(e) = guard::account_spawn(&dispatch) {
++ return Ok(ToolResult::error(format!("run_workflow: {e}")));
++ }
++ s
}
-- s
-- }
-- Err(e) => return Ok(ToolResult::error(format!("run_workflow: {e}"))),
-- };
++ Err(e) => return Ok(ToolResult::error(format!("run_workflow: {e}"))),
++ };
tracing::debug!(
workflow_id = %started.workflow_id,
run_id = %started.run_id,
diff --cc crates/openhuman-core/src/skills/runtime/run_machinery.rs
index d17fb2f301,6f91da54ca..e34e1faa6c
--- a/crates/openhuman-core/src/skills/runtime/run_machinery.rs
+++ b/crates/openhuman-core/src/skills/runtime/run_machinery.rs
@@@ -182,23 -184,23 +184,20 @@@ pub async fn spawn_workflow_run_backgro
if config.http_request.allowed_domains.is_empty() {
config.http_request.allowed_domains = vec!["*".to_string()];
}
-- let mut agent = match OpenHumanSessionHost::from_config_for_agent(
- &crate::core::runtime::DispatchCtx::ambient(),
- &ctx,
-- &config,
-- "orchestrator",
-- ) {
-- Ok(a) => a,
-- Err(e) => {
-- let _ = run_log::write_footer(
-- &log_path,
-- "FAILED",
-- 0,
-- &format!("build agent: {e:#}"),
-- )
-- .await;
-- return;
-- }
-- };
++ let mut agent =
++ match OpenHumanSessionHost::from_config_for_agent(&ctx, &config, "orchestrator") {
++ Ok(a) => a,
++ Err(e) => {
++ let _ = run_log::write_footer(
++ &log_path,
++ "FAILED",
++ 0,
++ &format!("build agent: {e:#}"),
++ )
++ .await;
++ return;
++ }
++ };
// Issue #4868 — apply the workflow-run iteration budget AFTER
// construction. The session builder now stamps `orchestrator`'s
// definition cap (15) onto the agent; a full workflow run
diff --cc crates/openhuman-core/src/storage/blob_sweep_tests.rs
index 824efb6fab,36b1feae74..3707638d52
--- a/crates/openhuman-core/src/storage/blob_sweep_tests.rs
+++ b/crates/openhuman-core/src/storage/blob_sweep_tests.rs
@@@ -83,7 -79,7 +83,9 @@@ async fn sweeping_through_the_fenced_ba
#[tokio::test]
async fn module_blob_scopes_are_swept_alongside_the_acting_scope() {
let (now, backend) = backend_with_clock();
- let module_scopes = crate::modules::expiring_blob_module_scopes();
- let module_scopes = crate::modules::expiring_blob_module_scopes(&crate::core::runtime::DispatchCtx::host_default());
++ let module_scopes = crate::modules::expiring_blob_module_scopes(
++ &crate::core::runtime::DispatchCtx::host_default(),
++ );
assert!(!module_scopes.is_empty(), "TinyJuice owns expiring blobs");
put_expiring(&backend, &module_scopes[0], "tinyjuice_ccr/t", 10).await;
now.store(2_000, Ordering::SeqCst);
@@@ -93,7 -89,7 +95,10 @@@
#[cfg(not(feature = "modules"))]
#[test]
fn no_module_blob_scopes_without_the_modules_feature() {
- assert!(crate::modules::expiring_blob_module_scopes().is_empty());
- assert!(crate::modules::expiring_blob_module_scopes(&crate::core::runtime::DispatchCtx::host_default()).is_empty());
++ assert!(crate::modules::expiring_blob_module_scopes(
++ &crate::core::runtime::DispatchCtx::host_default()
++ )
++ .is_empty());
}
#[tokio::test]