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(scope): add integration tests for core agent and channel modules
Steven Enamakel1bea8e712351
diff --git a/crates/openhuman-core/src/agent/learning/prompt_sections_tests_2_tests.rs b/crates/openhuman-core/src/agent/learning/prompt_sections_tests_2_tests.rsindex f17613c1c1..d6083b2554 100644--- a/crates/openhuman-core/src/agent/learning/prompt_sections_tests_2_tests.rs+++ b/crates/openhuman-core/src/agent/learning/prompt_sections_tests_2_tests.rs@@ -1,7 +1,7 @@use crate::memory::test_support::NoopMemory;use super::*;use crate::agent::prompts::LearnedContextData;-use crate::memory::{Memory, MemoryCategory, MemoryEntry};+use crate::memory::{Memory};use async_trait::async_trait;use std::collections::HashSet;use std::path::Path;diff --git a/crates/openhuman-core/src/agent/learning/reflection_tests.rs b/crates/openhuman-core/src/agent/learning/reflection_tests.rsindex 989348b0a6..72033a159e 100644--- a/crates/openhuman-core/src/agent/learning/reflection_tests.rs+++ b/crates/openhuman-core/src/agent/learning/reflection_tests.rs@@ -1,10 +1,7 @@use crate::memory::test_support::RetainingMemory;use super::*;use crate::agent::hooks::{ToolCallRecord, TurnContext};-use crate::memory::{Memory, MemoryCategory, MemoryEntry};-use async_trait::async_trait;-use parking_lot::Mutex;-use std::collections::HashMap;+use crate::memory::{Memory, MemoryCategory};use std::sync::Arc;fn reflection_config() -> LearningConfig {diff --git a/crates/openhuman-core/src/agent/learning/tool_tracker_tests.rs b/crates/openhuman-core/src/agent/learning/tool_tracker_tests.rsindex 2fd7a7b403..92ecee63b6 100644--- a/crates/openhuman-core/src/agent/learning/tool_tracker_tests.rs+++ b/crates/openhuman-core/src/agent/learning/tool_tracker_tests.rs@@ -1,10 +1,7 @@use crate::memory::test_support::RetainingMemory;use super::*;use crate::agent::hooks::{ToolCallRecord, TurnContext};-use crate::memory::{Memory, MemoryCategory, MemoryEntry};-use async_trait::async_trait;-use parking_lot::Mutex;-use std::collections::HashMap;+use crate::memory::{Memory, MemoryCategory};use std::sync::Arc;#[test]diff --git a/crates/openhuman-core/src/agent/learning/user_profile_tests.rs b/crates/openhuman-core/src/agent/learning/user_profile_tests.rsindex 02118e096b..5fe744ed2d 100644--- a/crates/openhuman-core/src/agent/learning/user_profile_tests.rs+++ b/crates/openhuman-core/src/agent/learning/user_profile_tests.rs@@ -1,10 +1,7 @@use crate::memory::test_support::RetainingMemory;use super::*;use crate::agent::hooks::TurnContext;-use crate::memory::{Memory, MemoryCategory, MemoryEntry};-use async_trait::async_trait;-use parking_lot::Mutex;-use std::collections::HashMap;+use crate::memory::{Memory, MemoryCategory};use std::sync::Arc;#[test]diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rsindex d9a9b14640..70afdfe52a 100644--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs@@ -19,7 +19,6 @@ use crate::agent::harness::definition::AgentDefinitionRegistry;use crate::agent::harness::fork_context::{with_parent_context, ParentExecutionContext};use crate::agent::prompts::ToolCallFormat;use crate::config::{AgentConfig, Config};-use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};use tinyagents_orchestration::teams::{SessionTeamLedger, TeamService};use tinyagents_session::run_ledger::{self, AgentTeamMemberStatus, AgentTeamMemberUpsert, AgentTeamStatus, AgentTeamTaskStatus,diff --git a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/ops_tests.rsindex 4824de36eb..e29c9c5003 100644--- a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs@@ -4,7 +4,6 @@ use crate::agent::harness::definition::AgentDefinitionRegistry;use crate::agent::harness::fork_context::{with_parent_context, ParentExecutionContext};use crate::agent::prompts::ToolCallFormat;use crate::config::AgentConfig;-use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};use async_trait::async_trait;use parking_lot::Mutex;use std::future::Future;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rsindex 80541bd6ff..229f9bac4e 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs@@ -3,7 +3,6 @@ use super::*;use crate::agent::harness::fork_context::ParentExecutionContext;use crate::agent::prompts::ToolCallFormat;use crate::config::AgentConfig;-use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};use std::collections::HashSet;use std::path::Path;use std::sync::Arc;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rsindex 12ff384a2b..ce73714c27 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs@@ -4,7 +4,7 @@ use crate::agent::harness::definition::AgentDefinitionRegistry;use crate::agent::harness::fork_context::{with_parent_context, ParentExecutionContext};use crate::agent::prompts::ToolCallFormat;use crate::config::AgentConfig;-use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};+use crate::memory::{Memory};use std::collections::HashSet;use std::path::Path;use std::sync::Arc;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 39867aaae4..3345ebfe50 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -14,7 +14,7 @@ use crate::agent::prompts::ToolCallFormat;use crate::agent::tinyagents::host::OpenHumanRunContext;use crate::agent::OpenHumanSessionHost;use crate::config::AgentConfig;-use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};+use crate::memory::{Memory};use async_trait::async_trait;use parking_lot::Mutex;use serde_json::json;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rsindex bb18f598c8..a4e3ec9ff5 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs@@ -5,7 +5,7 @@ use crate::agent::harness::{with_parent_context, ParentExecutionContext};use crate::agent::messages::ChatMessage;use crate::agent::prompts::{ConnectedIntegration, ToolCallFormat};use crate::memory::conversations;-use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};+use crate::memory::{Memory};use async_trait::async_trait;use parking_lot::Mutex;use serde_json::json;diff --git a/crates/openhuman-core/src/agent/session_import/live_tests.rs b/crates/openhuman-core/src/agent/session_import/live_tests.rsindex dec4e58303..f277a6830f 100644--- a/crates/openhuman-core/src/agent/session_import/live_tests.rs+++ b/crates/openhuman-core/src/agent/session_import/live_tests.rs@@ -11,7 +11,7 @@use std::path::Path;use tempfile::TempDir;-use tinyagents_harness::store::{AppendStore, FileStore, JsonlAppendStore, Store};+use tinyagents_harness::store::{AppendStore, JsonlAppendStore};use super::live::{dual_write_enabled, shadow_reads_enabled};use super::projector::journal_message_from_transcript as project;@@ -19,17 +19,13 @@ use crate::agent::messages::{attach_chat_tool_failure_metadata, attach_chat_turn_usage_metadata,transcript_message_from_chat, ChatMessage,};-use tinyagents_session::transcript::import::convert::{- journal_messages as journal_messages_with, sanitize_store_name, stream_name,-};+use tinyagents_session::transcript::import::convert::{journal_messages as journal_messages_with};use tinyagents_session::transcript::import::live::{shadow_read_compare as shadow_read_compare_with, write_live_turn as write_live_turn_with,ShadowReadOutcome,};use tinyagents_session::transcript::import::ops::store_root;-use tinyagents_session::transcript::import::types::{- JournalMessage, SessionDescriptor, NS_SESSIONS,-};+use tinyagents_session::transcript::import::types::{JournalMessage};use tinyagents_session::transcript::{read_transcript, write_transcript, MessageUsage, SessionTranscript, TranscriptMeta,TranscriptToolCall, TurnUsage,diff --git a/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rsindex 263a200896..9a8019006f 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/progress_sink_tests.rs@@ -1,5 +1,4 @@use super::*;-use std::sync::Arc;use tinyagents_harness::ids::{CallId, RunId, ThreadId};use tinyinference_llm::usage::Usage;use tokio::sync::mpsc;diff --git a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rsindex d43a3482ee..81ca4f7d81 100644--- a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs@@ -19,7 +19,6 @@ use crate::agent::harness::definition::AgentDefinitionRegistry;use crate::agent::harness::ParentExecutionContext;use crate::agent::prompts::ToolCallFormat;use crate::agent::tinyagents::tools::CanonicalSharedToolAdapter;-use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};use async_trait::async_trait;use serde_json::json;use std::path::Path;diff --git a/crates/openhuman-core/src/channels/tests/discord_integration.rs b/crates/openhuman-core/src/channels/tests/discord_integration.rsindex 05b98edcf0..0fbccb0041 100644--- a/crates/openhuman-core/src/channels/tests/discord_integration.rs+++ b/crates/openhuman-core/src/channels/tests/discord_integration.rs@@ -30,7 +30,6 @@ use super::super::runtime::process_channel_message;use super::super::traits;use super::super::{Channel, SendMessage};use super::common::HistoryCaptureModel;-use crate::agent::bus::{mock_agent_run_turn, AgentTurnResponse};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};diff --git a/crates/openhuman-core/src/channels/tests/telegram_integration.rs b/crates/openhuman-core/src/channels/tests/telegram_integration.rsindex 58b8dd15f1..1f0a78b0b7 100644--- a/crates/openhuman-core/src/channels/tests/telegram_integration.rs+++ b/crates/openhuman-core/src/channels/tests/telegram_integration.rs@@ -12,7 +12,6 @@ use super::super::runtime::process_channel_message;use super::super::traits;use super::super::{Channel, SendMessage};use super::common::SlowModel;-use crate::agent::bus::{mock_agent_run_turn, AgentTurnResponse};use std::collections::HashMap;use std::sync::atomic::{AtomicUsize, Ordering};use std::sync::{Arc, Mutex};diff --git a/crates/openhuman-core/src/memory/ops_tests.rs b/crates/openhuman-core/src/memory/ops_tests.rsindex e935d996a3..5f28ffa20d 100644--- a/crates/openhuman-core/src/memory/ops_tests.rs+++ b/crates/openhuman-core/src/memory/ops_tests.rs@@ -152,11 +152,8 @@ fn format_llm_context_message_includes_entity_types_when_present() {// ── Pure-helper coverage ───────────────────────────────────────-use super::{- chunk_metadata, default_category, default_priority, default_source_type, error_envelope,- extract_entity_type, maybe_retrieval_context, memory_counts, memory_request_id,- relation_identity, relation_metadata, timestamp_to_rfc3339, validate_memory_relative_path,-};+use super::{chunk_metadata, extract_entity_type, maybe_retrieval_context, memory_request_id,+ relation_identity, relation_metadata, timestamp_to_rfc3339, validate_memory_relative_path};use crate::core::Outcome;use crate::memory::{ApiEnvelope, MemoryRetrievalContext};