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
test(goals): add goal completion assertion in tests
Steven Enamakeld9f381bd3e40
diff --git a/crates/openhuman-core/src/agent/goals/mod_tests.rs b/crates/openhuman-core/src/agent/goals/mod_tests.rsindex aed1d5fd60..5d5c37485a 100644--- a/crates/openhuman-core/src/agent/goals/mod_tests.rs+++ b/crates/openhuman-core/src/agent/goals/mod_tests.rs@@ -116,6 +116,29 @@ async fn goal_tool_with_context_uses_the_business_goal_store() {.expect("goal was persisted");assert_eq!(stored.objective, "persist through the host store");+ let complete = tools+ .iter_mut()+ .find(|tool| tool.name() == "goal_complete")+ .expect("goal_complete tool");+ let result = complete+ .execute_with_context(+ serde_json::json!({}),+ ToolCallOptions::default(),+ Some(&thread),+ )+ .await+ .expect("execute explicit goal_complete");+ assert!(!result.is_error, "{}", result.output());+ let completed = goal_store(workspace.path(), &dispatch)+ .get("goal-tool-business-store")+ .await+ .expect("read completed business goal")+ .expect("completed goal remains stored");+ assert_eq!(+ completed.status,+ tinyagents_harness_tools::goals::ThreadGoalStatus::Complete+ );+let no_thread = set.execute(serde_json::json!({ "objective": "no thread" })).awaitdiff --git a/crates/openhuman-core/src/artifacts/tiny_store.rs b/crates/openhuman-core/src/artifacts/tiny_store.rsindex ee81937671..726f076cc7 100644--- a/crates/openhuman-core/src/artifacts/tiny_store.rs+++ b/crates/openhuman-core/src/artifacts/tiny_store.rs@@ -104,10 +104,15 @@ impl LegacyFileImportStore {async fn import_record(&self, mut record: ArtifactRecord) -> anyhow::Result<ArtifactRecord> {let mut changed = false;for version in &mut record.versions {- let Some(legacy) = version.file.clone() else {+ if !record.kind.holds_file() {continue;- };- if !Path::new(&legacy.key).is_absolute() {+ }+ let legacy = version.file.clone().unwrap_or_else(|| FileRef {+ key: version.body.clone(),+ size_bytes: 0,+ media_type: None,+ });+ if legacy.key.starts_with("artifacts/files/") {continue;}let ext = Path::new(&legacy.key)