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: update tests for renamed storage and controller APIs
Steven Enamakel22e7fa3f935d
diff --git a/crates/openhuman-embed/tests/harness_embed.rs b/crates/openhuman-embed/tests/harness_embed.rsindex 81917b1f7b..9211029a02 100644--- a/crates/openhuman-embed/tests/harness_embed.rs+++ b/crates/openhuman-embed/tests/harness_embed.rs@@ -284,10 +284,8 @@ fn a_harness_runs_a_turn_against_the_provider_it_was_given() {// The first session's transcript landed in the harness agent's// own store under the workspace (the path-based transcript files// are gone). A harness session id is its thread id.- let transcripts =- tinyagents_session::port::WorkspaceStores::open(&workspace_dir, "harness")- .expect("the harness agent's workspace store")- .transcripts();+ let transcripts = openhuman_core::storage::sessions::transcripts_for("harness")+ .expect("the harness agent's runtime session store");assert!(transcripts.root_for_thread(&first.session_id).is_some(),"the first session's transcript was not persisted"diff --git a/crates/openhuman-embed/tests/isolation_state.rs b/crates/openhuman-embed/tests/isolation_state.rsindex 3a6fa9b841..ab4f5292c3 100644--- a/crates/openhuman-embed/tests/isolation_state.rs+++ b/crates/openhuman-embed/tests/isolation_state.rs@@ -33,9 +33,8 @@ fn transcript_files(dir: &std::path::Path) -> Vec<std::path::PathBuf> {/// Whether `agent` has a root transcript for the test thread in its own store/// under the workspace.fn has_transcript(agent: &Agent) -> bool {- tinyagents_session::port::WorkspaceStores::open(agent.workspace_dir(), agent.id())- .expect("the agent's workspace store")- .transcripts()+ openhuman_core::storage::sessions::transcripts_for(agent.id())+ .expect("the agent's runtime session store").root_for_thread(SESSION).is_some()}diff --git a/crates/openhuman-embed/tests/runtime_agents.rs b/crates/openhuman-embed/tests/runtime_agents.rsindex f0b2288357..0b994eda42 100644--- a/crates/openhuman-embed/tests/runtime_agents.rs+++ b/crates/openhuman-embed/tests/runtime_agents.rs@@ -411,10 +411,8 @@ fn one_runtime_hosts_independently_configured_agents() {// Transcripts are keyed by agent and live in the agent's own store// under the workspace, and a thread resumes its own history.let listing = |agent_id: &str, session_id: &str| -> Vec<String> {- tinyagents_session::port::WorkspaceStores::open(&workspace_dir, agent_id)- .expect("the agent's workspace store")- .transcripts()- .thread_transcripts(session_id, None)+ openhuman_core::storage::sessions::transcripts_for(agent_id)+ .and_then(|transcripts| transcripts.thread_transcripts(session_id, None).ok()).map(|found| found.roots.into_iter().map(|root| root.stem).collect()).unwrap_or_default()};diff --git a/tests/inbound_linked_e2e.rs b/tests/inbound_linked_e2e.rsindex c7a6665f22..6874e8f8f8 100644--- a/tests/inbound_linked_e2e.rs+++ b/tests/inbound_linked_e2e.rs@@ -48,7 +48,7 @@ async fn linked_tinyeventqueues_queues_dedupes_and_delivers_a_composio_trigger()std::env::set_var("OPENHUMAN_WORKSPACE", workspace.path());std::env::set_var("BACKEND_URL", "http://127.0.0.1:9");let previous = openhuman_core::storage::install(std::sync::Arc::new(- openhuman_core::storage::MemoryStorage::new(),+ tinystoragedrivers_testkit::MemoryBackend::new(),));assert!(previous.is_none());linked_modules::install();diff --git a/tests/raw_coverage/inference_local_controllers_rpc_e2e.rs b/tests/raw_coverage/inference_local_controllers_rpc_e2e.rsindex 14df436b62..7711250380 100644--- a/tests/raw_coverage/inference_local_controllers_rpc_e2e.rs+++ b/tests/raw_coverage/inference_local_controllers_rpc_e2e.rs@@ -52,7 +52,7 @@ use std::path::{Path, PathBuf};use std::sync::OnceLock;use openhuman_core::config::Config;-use openhuman_core::core::all::{all_registered_controllers, RegisteredController};+use openhuman_core::core::all::{all_registered_controllers, ControllerEntry};use openhuman_core::inference::host_runtime::all_local_inference_registered_controllers;use serde_json::{json, Value};use tempfile::{tempdir, TempDir};@@ -86,18 +86,18 @@ fn pin_offline_ollama() -> (EnvVarGuard, EnvVarGuard) {}fn controller<'a>(- controllers: &'a [RegisteredController],+ controllers: &'a [ControllerEntry],function: &str,-) -> &'a RegisteredController {+) -> &'a ControllerEntry {controllers.iter().find(|controller| controller.schema.function == function).unwrap_or_else(|| panic!("controller {function} registered"))}-async fn call(controller: &RegisteredController, params: Value) -> Result<Value, String> {+async fn call(controller: &ControllerEntry, params: Value) -> Result<Value, String> {let params = params.as_object().cloned().unwrap_or_default();- (controller.handler)(DispatchCtx::process_default(), params).await+ controller.invoke(DispatchCtx::process_default(), params).await}/// A config rooted in `tmp/.openhuman`, matching what `OPENHUMAN_WORKSPACE`diff --git a/tests/raw_coverage_all.rs b/tests/raw_coverage_all.rsindex 93ef3e1cd2..f71e527467 100644--- a/tests/raw_coverage_all.rs+++ b/tests/raw_coverage_all.rs@@ -58,7 +58,7 @@ pub struct HostStorage<'lock>(std::marker::PhantomData<&'lock ()>);impl<'lock> HostStorage<'lock> {pub fn install(_env: &'lock tokio::sync::MutexGuard<'_, ()>) -> Self {let previous = openhuman_core::storage::install(std::sync::Arc::new(- openhuman_core::storage::MemoryStorage::new(),+ tinystoragedrivers_testkit::MemoryBackend::new(),));assert!(previous.is_none(),