Skip to content

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

chore: files changed crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs,crate

Steven Enamakel887eb6bed47c
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
index c344262d55..6e8599c950 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
@@ -366,7 +366,7 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>
return Ok(());
}
// The memory budget refusing a call past its cap is the host's own
- // limit (`memory::tool_budget`), not a failure: a parallel batch of
+ // limit (the native memory run budget), not a failure: a parallel batch of
// memory calls past the cap must not halt the run (#7717).
if crate::memory::tools::is_budget_refusal(result) {
tracing::debug!(
diff --git a/crates/openhuman-core/src/memory/tool_writes_tests.rs b/crates/openhuman-core/src/memory/tool_writes_tests.rs
index 7e79e7029f..c8d025fa37 100644
--- a/crates/openhuman-core/src/memory/tool_writes_tests.rs
+++ b/crates/openhuman-core/src/memory/tool_writes_tests.rs
@@ -3,7 +3,7 @@ use crate::memory::test_fixtures::{bind_reference, config_in, stored, RefusingEn
use crate::memory::tools::CallFacts;
use serde_json::json;
use tinymemory_api::{MetaFilter, Namespace, Reach};
-use tinymemory_tools::{CallContext, MemoryTools, SingleTool, ToolScope};
+use tinymemory_tools::{CallContext, SingleTool, ToolScope};
/// Exercises the production native single-tool parser and the host write sink.
pub(crate) fn enqueue(
@@ -33,20 +33,15 @@ pub(crate) fn enqueue(
id: facts.tool_call_id.clone(),
}),
};
- let tools = MemoryTools::with_scope(
- std::sync::Arc::new(tinymemory_api::conformance::ReferenceEngine::new()),
+ let single = SingleTool::queued(
+ crate::memory::tools::MEMORY_TOOL_NAME,
scope,
+ std::sync::Arc::new(super::HostWriteSink::new(std::sync::Arc::new(config))),
);
- let single = SingleTool::new(crate::memory::tools::MEMORY_TOOL_NAME, tools)
- .with_write_sink(std::sync::Arc::new(super::HostWriteSink::new(
- std::sync::Arc::new(config),
- )));
let outcome = single
.call_with_details(args, CallContext::default())
- .await
- .map_err(|error| tinymemory_api::Error::InvalidRequest(error.to_string()))?;
- serde_json::from_value(outcome.value)
- .map_err(|error| tinymemory_api::Error::InvalidRequest(error.to_string()))
+ .await?;
+ Ok(outcome.value)
})
};
if tokio::runtime::Handle::try_current().is_ok() {
diff --git a/crates/openhuman-core/src/memory/tools.rs b/crates/openhuman-core/src/memory/tools.rs
index 359cb94a90..b60f359b73 100644
--- a/crates/openhuman-core/src/memory/tools.rs
+++ b/crates/openhuman-core/src/memory/tools.rs
@@ -159,9 +159,7 @@ impl MemoryTool {
) -> ToolResult {
let call = async {
let scope = facts.native_scope(&self.config);
- let write_sink = Arc::new(super::tool_writes::HostWriteSink::new(
- self.config.clone(),
- ));
+ let write_sink = Arc::new(super::tool_writes::HostWriteSink::new(self.config.clone()));
let single = if is_write_action(&args) {
SingleTool::queued(MEMORY_TOOL_NAME, scope, write_sink)
} else {
@@ -169,11 +167,8 @@ impl MemoryTool {
Ok(bound) => bound.engine,
Err(error) => return ToolResult::error(render_error(error)),
};
- SingleTool::new(
- MEMORY_TOOL_NAME,
- MemoryTools::with_scope(engine, scope),
- )
- .with_write_sink(write_sink)
+ SingleTool::new(MEMORY_TOOL_NAME, MemoryTools::with_scope(engine, scope))
+ .with_write_sink(write_sink)
};
let call_args = args.clone();
let thread_window = facts.in_prompt.clone();