Skip to content

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

refactor(tests): migrate goal store usage to harness tools

Steven Enamakel42fe50efa854
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
index e7b1f3bcaa..6df40fd00f 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
@@ -287,7 +287,7 @@ async fn committed_goal_accounting_uses_direct_and_completed_child_usage() {
);
crate::core::runtime::CoreContext::scope(core, async {
let goal_store = crate::storage::sessions::stores_or_ephemeral(workspace.path()).kv;
- tinyagents_graph::goals::store::set(
+ tinyagents_harness_tools::goals::store::set(
&goal_store,
"receipt-goal",
"finish migration",
@@ -296,7 +296,7 @@ async fn committed_goal_accounting_uses_direct_and_completed_child_usage() {
.await
.unwrap();
assert!(
- tinyagents_graph::goals::store::get(&goal_store, "receipt-goal")
+ tinyagents_harness_tools::goals::store::get(&goal_store, "receipt-goal")
.await
.unwrap()
.is_some(),
@@ -320,7 +320,7 @@ async fn committed_goal_accounting_uses_direct_and_completed_child_usage() {
sidecar.subagents.push(child);
account_committed_turn_against_goal(workspace.path(), Some("receipt-goal"), &sidecar).await;
- let goal = tinyagents_graph::goals::store::get(&goal_store, "receipt-goal")
+ let goal = tinyagents_harness_tools::goals::store::get(&goal_store, "receipt-goal")
.await
.unwrap()
.unwrap();
@@ -330,7 +330,7 @@ async fn committed_goal_accounting_uses_direct_and_completed_child_usage() {
);
assert_eq!(
goal.status,
- tinyagents_graph::goals::ThreadGoalStatus::BudgetLimited,
+ tinyagents_harness_tools::goals::ThreadGoalStatus::BudgetLimited,
"receipt-backed accounting advances continuation/budget state"
);
})
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_usage_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_usage_tests.rs
index 9dd6e29d5b..dd3cf86088 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_usage_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_usage_tests.rs
@@ -61,7 +61,7 @@ async fn committed_goal_accounting_saturates_direct_plus_inclusive_child_tokens(
);
crate::core::runtime::CoreContext::scope(core, async {
let goal_store = crate::storage::sessions::stores_or_ephemeral(workspace.path()).kv;
- tinyagents_graph::goals::store::set(
+ tinyagents_harness_tools::goals::store::set(
&goal_store,
"saturated-goal",
"complete safely",
@@ -70,7 +70,7 @@ async fn committed_goal_accounting_saturates_direct_plus_inclusive_child_tokens(
.await
.unwrap();
assert!(
- tinyagents_graph::goals::store::get(&goal_store, "saturated-goal")
+ tinyagents_harness_tools::goals::store::get(&goal_store, "saturated-goal")
.await
.unwrap()
.is_some(),
@@ -108,7 +108,7 @@ async fn committed_goal_accounting_saturates_direct_plus_inclusive_child_tokens(
)
.await;
- let goal = tinyagents_graph::goals::store::get(&goal_store, "saturated-goal")
+ let goal = tinyagents_harness_tools::goals::store::get(&goal_store, "saturated-goal")
.await
.unwrap()
.unwrap();
diff --git a/crates/openhuman-core/src/threads/ops/live_state_tests.rs b/crates/openhuman-core/src/threads/ops/live_state_tests.rs
index ca2b443070..50d7dff5cb 100644
--- a/crates/openhuman-core/src/threads/ops/live_state_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/live_state_tests.rs
@@ -63,7 +63,7 @@ async fn goal_get_reads_back_a_stored_goal() {
.await
.unwrap()
.workspace_dir;
- tinyagents_graph::goals::store::set(
+ tinyagents_harness_tools::goals::store::set(
&crate::storage::sessions::stores_or_ephemeral(&dir).kv,
"thread-goal-live",
"ship it",
diff --git a/tests/in_process/agent_turn_overrides_e2e.rs b/tests/in_process/agent_turn_overrides_e2e.rs
index 994960a4a7..5383d53ac2 100644
--- a/tests/in_process/agent_turn_overrides_e2e.rs
+++ b/tests/in_process/agent_turn_overrides_e2e.rs
@@ -223,7 +223,7 @@ async fn seed_goal(
objective: &str,
) -> Result<(), String> {
let store = openhuman_core::storage::sessions::stores_or_ephemeral(workspace).kv;
- tinyagents_graph::goals::store::set(&store, thread_id, objective, None)
+ tinyagents_harness_tools::goals::store::set(&store, thread_id, objective, None)
.await
.map(|_| ())
.map_err(|error| error.to_string())