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
chore: add missing use statements across the codebase
Steven Enamakela318c5b1d69e
diff --git a/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rs b/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rsindex 64d16165f9..1d9f7fad59 100644--- a/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rs+++ b/crates/openhuman-core/src/agent/harness/session/runtime/accessors.rs@@ -1,3 +1,4 @@+use crate::agent::messages::ConversationMessage;//! Public getters and setters on [`Agent`]: tool registry views, config//! snapshots, session identity, and the per-session tool-visibility filter//! (which rebuilds the tool policy snapshot on every change).diff --git a/crates/openhuman-core/src/agent/harness/session/transcript/jsonl.rs b/crates/openhuman-core/src/agent/harness/session/transcript/jsonl.rsindex 7faa914410..4b677ce8a3 100644--- a/crates/openhuman-core/src/agent/harness/session/transcript/jsonl.rs+++ b/crates/openhuman-core/src/agent/harness/session/transcript/jsonl.rs@@ -1,3 +1,4 @@+use turn_usage_from_line;//! JSONL line shapes (`_meta`, message, and compaction records) and the//! conversions between them and the public [`ChatMessage`] ///! [`TranscriptMeta`] / [`DisplayMessage`] types.diff --git a/crates/openhuman-core/src/agent/harness/session/transcript_roundtrip_and_paths_tests.rs b/crates/openhuman-core/src/agent/harness/session/transcript_roundtrip_and_paths_tests.rsindex 43a39d17a6..eecbb83140 100644--- a/crates/openhuman-core/src/agent/harness/session/transcript_roundtrip_and_paths_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/transcript_roundtrip_and_paths_tests.rs@@ -1,5 +1,7 @@use super::*;+use resolve_keyed_transcript_path;+use std::fs;#[test]fn intermediate_assistant_reasoning_is_lifted_without_turn_usage() {let mut message = ChatMessage::assistant("I will inspect the repository.");diff --git a/crates/openhuman-core/src/agent/harness/session/transcript_thread_and_append_tests.rs b/crates/openhuman-core/src/agent/harness/session/transcript_thread_and_append_tests.rsindex 84186d0e72..0cb9be3b00 100644--- a/crates/openhuman-core/src/agent/harness/session/transcript_thread_and_append_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/transcript_thread_and_append_tests.rs@@ -1,5 +1,6 @@use super::*;+use std::fs;// ── find_root_transcript_for_thread: scope isolation ────────────────────────/// An empty or blank `thread_id` must not match any transcript — thediff --git a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rs b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rsindex 8b4edba774..49d14f96eb 100644--- a/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rs+++ b/crates/openhuman-core/src/agent/harness/subagent_runner/ops/graph/dispatch.rs@@ -1,3 +1,4 @@+use crate::agent::harness::subagent_runner::ops::checkpoint;//! The sub-agent turn dispatch: driving one graph turn through the shared//! tinyagents seam, building its context middleware, and folding a cap-hit//! checkpoint summary back into the result.diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rsindex b19ff24c62..122be96981 100644--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs@@ -1,5 +1,18 @@use super::*;use crate::agent::tinyagents::orchestration::{+use crate::agent::harness::run_queue::QueueMode;+use crate::agent::harness::run_queue::RunQueue;+use crate::agent::orchestration::running_subagents::registry::DETACHED_LEDGER_TIMEOUT_MS;+use crate::agent::orchestration::running_subagents::resolve::resume_ref_for_task;+use crate::agent::orchestration::running_subagents::resolve::task_id_for_session;+use crate::agent::orchestration::running_subagents::roster::snapshot_for_parent;+use crate::agent::orchestration::running_subagents::steering::SteerDirectiveError;+use crate::agent::orchestration::running_subagents::steering::SteeringDirective;+use crate::agent::orchestration::running_subagents::steering::steer_directive;+use crate::agent::orchestration::running_subagents::wait::wait;+use crate::agent::tinyagents::orchestration::shared_steering_registry;+use std::sync::Arc;+use std::time::Duration;openhuman_steering_handle, OrchestrationTaskStatus, SteeringHandle, SteeringPolicy,SteeringRunClass,};diff --git a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rsindex 7105a81c66..61a8aaa436 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context_tests.rs@@ -1,5 +1,7 @@use super::*;+use crate::agent::harness::AgentContextPreparedSource;+use crate::agent::harness::SubagentRunError;#[test]fn schema_requires_question_and_makes_focus_optional() {let tool = AgentPrepareContextTool::new();diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rsindex 341e04380b..ac0707cc08 100644--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::agent::progress_tracing::langfuse::span_export::spans_to_langfuse_batch;#[test]fn split_ingestion_batch_chunks_over_the_limit() {// 1201 events with max 500 -> chunks of 500, 500, 201.diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rsindex 7c09eb0581..a52758f009 100644--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse_tests.rs@@ -5,6 +5,7 @@ use crate::agent::progress_tracing::SpanKind;use tinyagents_harness::ids::{CallId, EventId, RunId};use tinyinference::usage::Usage;+use crate::agent::progress_tracing::types::SpanKind;fn span(trace: &str,id: &str,diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse_trace_fields_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse_trace_fields_tests.rsindex f1ced888ba..0d967b5044 100644--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse_trace_fields_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse_trace_fields_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::agent::progress_tracing::langfuse::span_export::spans_to_langfuse_batch;/// An unparseable base is the fail-closed default rather than a panic or a/// pushable bucket. `ingestion_url` returns a non-URL placeholder when no/// backend host resolves.diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rsindex adc6b43a3d..8c4e5c2317 100644--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_attribution_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::agent::progress_tracing::types::SpanKind;// ── identity / attribution / content capture ───────────────────────────────#[test]diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rsindex 105c9787b8..8a8827ea56 100644--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_span_tree_tests.rs@@ -1,5 +1,8 @@use super::*;+use crate::agent::progress_tracing::export::export_spans;+use crate::agent::progress_tracing::serialize::spans_to_ndjson;+use crate::agent::progress_tracing::types::SpanKind;// ── config ────────────────────────────────────────────────────────────────#[test]diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rsindex 7889a9468d..9f25163f80 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs@@ -1,3 +1,6 @@+use crate::agent::tinyagents::model::ProfileOverrideModel;+use crate::agent::tinyagents::model::TurnChatModel;+use crate::agent::tinyagents::run_policy_for;//! Drive an openhuman agent turn through the `tinyagents` agent-loop harness.//!//! [`run_turn_via_tinyagents_shared`] is the entry point the channel/session/diff --git a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rsindex 41547cd42d..0d91b74f4a 100644--- a/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs+++ b/crates/openhuman-core/src/channels/bus_inbound_thread_id_tests_tests.rs@@ -1,4 +1,5 @@use super::{+use derive_inbound_thread_id;channel_message_body_with_idempotency, channel_supports_progressive_ui,derive_inbound_client_id, derive_inbound_thread_id,};diff --git a/crates/openhuman-core/src/channels/bus_tests.rs b/crates/openhuman-core/src/channels/bus_tests.rsindex 6e089602d6..ccc3bce0be 100644--- a/crates/openhuman-core/src/channels/bus_tests.rs+++ b/crates/openhuman-core/src/channels/bus_tests.rs@@ -2,6 +2,11 @@ use super::*;use crate::api::rest::BackendApiError;use crate::core::events::DomainEvent;+use crate::channels::bus::progressive_ui::EditFailure;+use crate::channels::bus::progressive_ui::channel_edits_unsupported;+use crate::channels::bus::progressive_ui::classify_edit_failure;+use crate::channels::bus::progressive_ui::edit_capability_key;+use crate::channels::bus::progressive_ui::mark_channel_edits_unsupported;#[test]fn subscriber_metadata_is_stable() {let subscriber = ChannelInboundSubscriber::new();diff --git a/crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rs b/crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rsindex f9d57f1325..c64ef3330a 100644--- a/crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rs+++ b/crates/openhuman-core/src/channels/controllers/ops_yuanbao_email_tests.rs@@ -1,5 +1,6 @@use super::*;+use build_email_config;#[tokio::test]async fn connect_yuanbao_persists_when_credentials_valid() {use wiremock::matchers::{method, path};diff --git a/crates/openhuman-core/src/channels/runtime/startup_email_secret_tests_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_email_secret_tests_tests.rsindex 3363baabcf..6057933cf9 100644--- a/crates/openhuman-core/src/channels/runtime/startup_email_secret_tests_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup_email_secret_tests_tests.rs@@ -4,6 +4,7 @@ use crate::security::credentials::AuthService;use std::collections::HashMap;use tempfile::tempdir;+use crate::channels::runtime::startup::credentials::resolve_email_password;fn isolated_config() -> (tempfile::TempDir, Config) {let tmp = tempdir().expect("tempdir");let mut config = Config::default();diff --git a/crates/openhuman-core/src/channels/runtime/startup_test_support_tests.rs b/crates/openhuman-core/src/channels/runtime/startup_test_support_tests.rsindex b43dd2d541..719c87a32f 100644--- a/crates/openhuman-core/src/channels/runtime/startup_test_support_tests.rs+++ b/crates/openhuman-core/src/channels/runtime/startup_test_support_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::config::Config;pub fn resolve_yuanbao_app_secret_for_test(yb_cfg: crate::channels::providers::yuanbao::YuanbaoConfig,config: &Config,diff --git a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rsindex 7fb132de80..c9eb4a94a0 100644--- a/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs+++ b/crates/openhuman-core/src/config/schema/load/env_overlay/search.rs@@ -1,3 +1,4 @@+use crate::config::schema::load::env::parse_env_bool;//! Env overrides for web search: SearXNG, Seltz, Tavily, and the search engine selection.use crate::config::schema::load::env::EnvLookup;diff --git a/crates/openhuman-core/src/cron/scheduler_frequency_tests.rs b/crates/openhuman-core/src/cron/scheduler_frequency_tests.rsindex a53f3d5845..6a8d97a5d2 100644--- a/crates/openhuman-core/src/cron/scheduler_frequency_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_frequency_tests.rs@@ -1,5 +1,9 @@use super::*;+use crate::cron::JobType;+use crate::cron::MIN_AGENT_JOB_INTERVAL;+use crate::cron::Schedule;+use crate::cron::TooFrequent;#[tokio::test]async fn deliver_if_configured_empty_success_skips_chat_and_alert() {let tmp = TempDir::new().unwrap();diff --git a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rsindex ce24ac40dd..033ede9845 100644--- a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs@@ -1,5 +1,8 @@use super::*;+use crate::cron::JobType;+use crate::cron::Schedule;+use crate::cron::SessionTarget;// TAURI-RUST-514 — a BYO provider insufficient-credits 402 ("requires more// credits") leaks from a cron-fired agent job through `last_agent_error`.// `is_insufficient_credits_failure` must consult the message classifier so thediff --git a/crates/openhuman-core/src/cron/scheduler_profile_and_shell_tests.rs b/crates/openhuman-core/src/cron/scheduler_profile_and_shell_tests.rsindex d599892b16..523dbaca91 100644--- a/crates/openhuman-core/src/cron/scheduler_profile_and_shell_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_profile_and_shell_tests.rs@@ -1,5 +1,7 @@use super::*;+use crate::cron::JobType;+use crate::cron::SessionTarget;#[tokio::test]async fn resolve_cron_profile_present_and_deleted_fallback() {let tmp = TempDir::new().unwrap();diff --git a/crates/openhuman-core/src/cron/scheduler_tests.rs b/crates/openhuman-core/src/cron/scheduler_tests.rsindex de9353f6e0..e3ac2e3ab5 100644--- a/crates/openhuman-core/src/cron/scheduler_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_tests.rs@@ -4,6 +4,8 @@ use crate::config::Config;use crate::cron::{self, ActiveHours, DeliveryConfig};use crate::security::SecurityPolicy;use chrono::{Duration as ChronoDuration, Timelike, Utc};+use crate::cron::JobType;+use crate::cron::SessionTarget;#[cfg(not(windows))]use std::os::unix::fs::PermissionsExt;use std::sync::Arc;diff --git a/crates/openhuman-core/src/cron/store_agent_floor_tests.rs b/crates/openhuman-core/src/cron/store_agent_floor_tests.rsindex c885e88505..ce2b662a74 100644--- a/crates/openhuman-core/src/cron/store_agent_floor_tests.rs+++ b/crates/openhuman-core/src/cron/store_agent_floor_tests.rs@@ -1,5 +1,9 @@use super::*;+use crate::cron::CronJob;+use crate::cron::CronJobPatch;+use crate::cron::Schedule;+use crate::cron::SessionTarget;// ── agent-job minimum interval (#6158) ──────────────────────────fn utc_cron(expr: &str) -> Schedule {diff --git a/crates/openhuman-core/src/cron/store_tests.rs b/crates/openhuman-core/src/cron/store_tests.rsindex b426973aa9..5cf2d566d8 100644--- a/crates/openhuman-core/src/cron/store_tests.rs+++ b/crates/openhuman-core/src/cron/store_tests.rs@@ -4,6 +4,10 @@ use crate::cron::ActiveHours;use chrono::Duration as ChronoDuration;use tempfile::TempDir;+use crate::cron::CronJobPatch;+use crate::cron::JobType;+use crate::cron::Schedule;+use crate::cron::SessionTarget;fn test_config(tmp: &TempDir) -> Config {let config = Config {workspace_dir: tmp.path().join("workspace"),diff --git a/crates/openhuman-core/src/inference/embeddings/rpc_tests.rs b/crates/openhuman-core/src/inference/embeddings/rpc_tests.rsindex f8381085ac..14f5bd3f83 100644--- a/crates/openhuman-core/src/inference/embeddings/rpc_tests.rs+++ b/crates/openhuman-core/src/inference/embeddings/rpc_tests.rs@@ -1,4 +1,6 @@use super::*;+use crate::inference::embeddings::rpc::probe::final_probe_dims;+use std::collections::HashMap;// Production code now routes managed construction through// `create_embedding_provider_with_config`; this low-level custom-endpoint// regression test still drives the credentialed factory directly.diff --git a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs b/crates/openhuman-core/src/inference/provider/factory/chat_model.rsindex 39eefbbcb1..b27b288df7 100644--- a/crates/openhuman-core/src/inference/provider/factory/chat_model.rs+++ b/crates/openhuman-core/src/inference/provider/factory/chat_model.rs@@ -1,3 +1,4 @@+use crate::inference::provider::factory::access_gates::verify_session_active;//! One-shot `create_chat_model*` entry points, the readiness probe, the//! default-temperature wrapper, and the unresolved-route error builder.diff --git a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rsindex 3b87085096..2837c5bbfc 100644--- a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs+++ b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs@@ -1,3 +1,8 @@+use crate::inference::provider::crate_anthropic;+use crate::inference::provider::crate_openai;+use crate::inference::provider::factory::access_gates::verify_backend_session_active;+use crate::inference::provider::factory::access_gates::verify_session_active;+use crate::inference::provider::fallback_diagnostics;//! `<slug>:<model>` BYOK cloud providers: shared slug resolution (model fallback,//! abstract-tier remapping, credentials, codex routing) and the crate-native builders.diff --git a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rsindex 7b7e50b72f..307ded6d11 100644--- a/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs+++ b/crates/openhuman-core/src/inference/provider/factory/local_runtime.rs@@ -1,3 +1,5 @@+use crate::inference::provider::crate_openai;+use crate::inference::provider::factory::access_gates::verify_session_active;//! Local OpenAI-compatible runtimes (Ollama / LM Studio / MLX / OMLX ///! local-openai) as crate-native `ChatModel`s.diff --git a/crates/openhuman-core/src/inference/provider/factory/routing.rs b/crates/openhuman-core/src/inference/provider/factory/routing.rsindex 164e363d46..f5f676fb91 100644--- a/crates/openhuman-core/src/inference/provider/factory/routing.rs+++ b/crates/openhuman-core/src/inference/provider/factory/routing.rs@@ -1,3 +1,4 @@+use crate::inference::provider::fallback_diagnostics;//! Role → configured provider-string resolution (`provider_for_role`) plus the//! managed-credits bypass check and the `<model>[@<temp>]` suffix parser.diff --git a/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs b/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rsindex 07a42a22d9..d7e3a5b64d 100644--- a/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs+++ b/crates/openhuman-core/src/inference/provider/factory/subprocess_providers.rs@@ -1,3 +1,4 @@+use crate::inference::provider::factory::access_gates::verify_session_active;//! Subprocess-backed providers: the Claude Agent SDK and the Claude Code CLI.use super::*;diff --git a/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs b/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rsindex e642ee628e..0716330676 100644--- a/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::inference::provider::factory::access_gates::local_only_violation;/// When the provider string includes a model id the factory should build/// successfully and return that model id unchanged.#[test]diff --git a/crates/openhuman-core/src/inference/provider/factory_tests.rs b/crates/openhuman-core/src/inference/provider/factory_tests.rsindex 88d464d2fa..b2dd6a6b50 100644--- a/crates/openhuman-core/src/inference/provider/factory_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_tests.rs@@ -4,6 +4,7 @@ use crate::config::Config;use crate::security::credentials::AuthService;use tempfile::TempDir;+use crate::inference::provider::factory::access_gates::host_requires_session;fn create_test_chat_model_from_string(role: &str,provider: &str,diff --git a/crates/openhuman-core/src/inference/schemas_tests.rs b/crates/openhuman-core/src/inference/schemas_tests.rsindex 6802780539..3ba5ba1d04 100644--- a/crates/openhuman-core/src/inference/schemas_tests.rs+++ b/crates/openhuman-core/src/inference/schemas_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::core::TypeSchema;#[test]fn inference_catalog_counts_match_and_nonempty() {let declared = all_controller_schemas();diff --git a/crates/openhuman-core/src/integrations/client_tests.rs b/crates/openhuman-core/src/integrations/client_tests.rsindex 33693ee1b1..656a12320a 100644--- a/crates/openhuman-core/src/integrations/client_tests.rs+++ b/crates/openhuman-core/src/integrations/client_tests.rs@@ -1,3 +1,4 @@+use std::sync::Arc;//! Tests for the shared integrations HTTP client.//!//! Focus: backend error body propagation. Pre-fix, non-2xx responsesdiff --git a/crates/openhuman-core/src/integrations/composio/catalog_tests.rs b/crates/openhuman-core/src/integrations/composio/catalog_tests.rsindex 5d2cf1c8ab..6397d2c21e 100644--- a/crates/openhuman-core/src/integrations/composio/catalog_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/catalog_tests.rs@@ -1,3 +1,5 @@+use crate::json_schema::compute_primary_array_path_from_value;+use probe_tool_output_sample;//! Unit tests for the live Composio catalog and the real-output probe.//!//! Moved here with the code they exercise. Two of themdiff --git a/crates/openhuman-core/src/integrations/composio/tools/direct_tests.rs b/crates/openhuman-core/src/integrations/composio/tools/direct_tests.rsindex 8639b90db3..d74dac5ea2 100644--- a/crates/openhuman-core/src/integrations/composio/tools/direct_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/direct_tests.rs@@ -1,6 +1,7 @@use super::*;use crate::security::{AutonomyLevel, SecurityPolicy};+use std::sync::Arc;fn test_security() -> Arc<SecurityPolicy> {Arc::new(SecurityPolicy::default())}diff --git a/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rs b/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rsindex 341e0bf23d..2525c38fb7 100644--- a/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools/direct_tests_constructor_and_wire_types_tests.rs@@ -1,5 +1,6 @@use super::*;+use std::sync::Arc;// ── Constructor ───────────────────────────────────────────#[test]diff --git a/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs b/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rsindex 48b36488df..09ab904c2a 100644--- a/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools_metadata_and_sandbox_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::agent::harness::SandboxMode;/// Every composio tool must report `ToolCategory::Workflow` so the/// skills sub-agent (`category_filter = "skill"`) picks them up.///diff --git a/crates/openhuman-core/src/integrations/composio/tools_tests.rs b/crates/openhuman-core/src/integrations/composio/tools_tests.rsindex 2c09566355..e71248fcd2 100644--- a/crates/openhuman-core/src/integrations/composio/tools_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/tools_tests.rs@@ -2,6 +2,7 @@ use super::*;use std::path::Path;use std::sync::Arc;+use crate::medulla::client::ToolResult;struct WorkspaceEnvGuard {previous: Option<std::ffi::OsString>,}diff --git a/crates/openhuman-core/src/mcp/registry/schemas/setup_handlers.rs b/crates/openhuman-core/src/mcp/registry/schemas/setup_handlers.rsindex 9a1c4b9327..f6728932a8 100644--- a/crates/openhuman-core/src/mcp/registry/schemas/setup_handlers.rs+++ b/crates/openhuman-core/src/mcp/registry/schemas/setup_handlers.rs@@ -1,3 +1,6 @@+use crate::mcp::registry::schemas::params::read_optional_string;+use crate::mcp::registry::schemas::params::read_optional_u32;+use crate::mcp::registry::schemas::read_optional_u32;//! `mcp_setup` handler implementations — deserialise params and delegate//! to `setup_ops.rs`.diff --git a/crates/openhuman-core/src/mcp/registry/schemas_tests.rs b/crates/openhuman-core/src/mcp/registry/schemas_tests.rsindex 5e01e57db2..57ef90ba8f 100644--- a/crates/openhuman-core/src/mcp/registry/schemas_tests.rs+++ b/crates/openhuman-core/src/mcp/registry/schemas_tests.rs@@ -1,6 +1,7 @@use super::*;use serde_json::json;+use std::iter::Map;// ── schemas() coverage ────────────────────────────────────────────────────#[test]diff --git a/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rs b/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rsindex 02e5b4bed9..585c8ec45b 100644--- a/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rs+++ b/crates/openhuman-core/src/memory/guard/families/graph_and_bookkeeping.rs@@ -1,3 +1,4 @@+use ForgetOutcome;//! Guarded `Entities`, `Graph`, `Diff`, `Goals`, `ToolMemory`, `Sources`,//! `Maintenance`, and `People` — the knowledge-graph and bookkeeping//! families.diff --git a/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rs b/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rsindex 82ef271aef..9958289783 100644--- a/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rs+++ b/crates/openhuman-core/src/memory/guard/families/retrieval_and_profile.rs@@ -1,3 +1,4 @@+use crate::memory::sources::sync::SourceScope;//! Guarded `Retrieval`, `Episodic`, `Profile`, `SourceSync`, `Scoring`, and//! `CodingSessions` — the read/query families.//!diff --git a/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rs b/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rsindex 7a72493350..9808c04151 100644--- a/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rs+++ b/crates/openhuman-core/src/memory/guard/families/typed_ingest_and_answer.rs@@ -1,3 +1,4 @@+use crate::memory::sources::sync::SourceScope;//! Guarded `DocumentIngest`, `ConversationIngest`, `LearningIngest`,//! `EventIngest`, `Answer`, and `Chunks` — the typed-ingestion round the//! v1.13.7 contract release added, plus the sibling `Chunks` family wireddiff --git a/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rs b/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rsindex 1591b95e81..0966c8fb43 100644--- a/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rs+++ b/crates/openhuman-core/src/memory/guard/test_support/retrieval_and_ingest_impls.rs@@ -1,3 +1,4 @@+use crate::memory::sources::sync::SourceScope;//! `RecordingProvider`'s `Episodic`, `Profile`, `Chunks`, `Retrieval`,//! `People`, `Scoring`, `Answer`, and typed-ingestion (`DocumentIngest`,//! `ConversationIngest`, `LearningIngest`, `EventIngest`) familydiff --git a/crates/openhuman-core/src/memory/safety_tests.rs b/crates/openhuman-core/src/memory/safety_tests.rsindex 8fee7ebfba..b8468dc8dc 100644--- a/crates/openhuman-core/src/memory/safety_tests.rs+++ b/crates/openhuman-core/src/memory/safety_tests.rs@@ -1,6 +1,7 @@use super::*;use serde_json::json;+use crate::memory::safety::pii::redact_pii;// `pii`'s internals (checksum validators, the normalization pass) are test-only// re-exports at the `pii` module level; pull them in here so the nested test// submodules below can reach them through their own `use super::*;`.diff --git a/crates/openhuman-core/src/memory/sanitize_and_pii_id_tests.rs b/crates/openhuman-core/src/memory/sanitize_and_pii_id_tests.rsindex ab707125ce..f8dbe14fa6 100644--- a/crates/openhuman-core/src/memory/sanitize_and_pii_id_tests.rs+++ b/crates/openhuman-core/src/memory/sanitize_and_pii_id_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::memory::safety::pii::redact_pii;#[test]fn sanitize_text_redacts_bearer_and_openai_key() {let input = "Authorization: Bearer abcdefghijklmnop and sk-1234567890123456789012345";diff --git a/crates/openhuman-core/src/memory/sources/rpc_filter_tests_tests.rs b/crates/openhuman-core/src/memory/sources/rpc_filter_tests_tests.rsindex d6d14b7090..a2555f997b 100644--- a/crates/openhuman-core/src/memory/sources/rpc_filter_tests_tests.rs+++ b/crates/openhuman-core/src/memory/sources/rpc_filter_tests_tests.rs@@ -1,5 +1,7 @@use std::collections::HashSet;+use crate::agent::session_import::types::SourceKind;+use crate::memory::sources::rpc::registry_crud::filter_to_active_composio_sources;fn composio_entry(id: &str, connection_id: &str) -> MemorySourceEntry {MemorySourceEntry {id: id.to_string(),diff --git a/crates/openhuman-core/src/memory/sources/rpc_monthly_summary_tests_tests.rs b/crates/openhuman-core/src/memory/sources/rpc_monthly_summary_tests_tests.rsindex df24ceb537..e995ae5b3a 100644--- a/crates/openhuman-core/src/memory/sources/rpc_monthly_summary_tests_tests.rs+++ b/crates/openhuman-core/src/memory/sources/rpc_monthly_summary_tests_tests.rs@@ -1,5 +1,6 @@use chrono::{DateTime, Utc};+use crate::memory::sources::rpc::cost_reporting::summarise_month;/// One audit row, dated `stamp`, costing `estimated` with no real charge.fn row(stamp: &str, items: u32, input: u64, output: u64, estimated: f64) -> SyncAuditEntry {SyncAuditEntry {diff --git a/crates/openhuman-core/src/memory/sources/rpc_tests.rs b/crates/openhuman-core/src/memory/sources/rpc_tests.rsindex f31dce94e8..30a87a2c66 100644--- a/crates/openhuman-core/src/memory/sources/rpc_tests.rs+++ b/crates/openhuman-core/src/memory/sources/rpc_tests.rs@@ -1,3 +1,8 @@+use crate::memory::sources::rpc::apply_all::trigger_enabled_syncs;+use crate::memory::sources::rpc::coding_sessions::unserved;+use crate::memory::sources::rpc::source_sync::SyncDispatch;+use crate::memory::sources::rpc::source_sync::describe_source_sync_failure;+use crate::memory::sources::rpc::source_sync::sync_dispatch;//! Tests for the driver-backed handlers in [`super`].//!//! A sibling file rather than an inline `mod tests`, because the null-driverdiff --git a/crates/openhuman-core/src/memory/sync/composio/bus_tests.rs b/crates/openhuman-core/src/memory/sync/composio/bus_tests.rsindex f10361702d..2f68870712 100644--- a/crates/openhuman-core/src/memory/sync/composio/bus_tests.rs+++ b/crates/openhuman-core/src/memory/sync/composio/bus_tests.rs@@ -1,3 +1,6 @@+use crate::core::events::DomainEvent;+use crate::memory::sync::composio::bus::trigger_subscriber::TRIAGE_DISABLED_ENV;+use crate::memory::sync::composio::bus::trigger_subscriber::triage_disabled;//! Unit tests for the composio connection-created event handler's gating.use super::toolkit_is_memory_source_registrable;diff --git a/crates/openhuman-core/src/memory/tree/tree/rpc_ingest_and_chunk_tests.rs b/crates/openhuman-core/src/memory/tree/tree/rpc_ingest_and_chunk_tests.rsindex 66d6e4fe07..27ea171511 100644--- a/crates/openhuman-core/src/memory/tree/tree/rpc_ingest_and_chunk_tests.rs+++ b/crates/openhuman-core/src/memory/tree/tree/rpc_ingest_and_chunk_tests.rs@@ -1,5 +1,6 @@use super::*;+use crate::memory::tree::tree::rpc::pipeline_status::latest_quarantine;/// #5169 (`CORE-RUST-1P0`) — a chat batch whose messages omit `timestamp`/// must ingest, defaulting to `now()`, not reject the whole batch.///diff --git a/crates/openhuman-core/src/memory/tree/tree/rpc_pipeline_status_tests.rs b/crates/openhuman-core/src/memory/tree/tree/rpc_pipeline_status_tests.rsindex 2e0370d93b..b65d367836 100644--- a/crates/openhuman-core/src/memory/tree/tree/rpc_pipeline_status_tests.rs+++ b/crates/openhuman-core/src/memory/tree/tree/rpc_pipeline_status_tests.rs@@ -1,5 +1,11 @@use super::*;+use crate::memory::tree::tree::rpc::pipeline_status::gate_pause_state;+use crate::memory::tree::tree::rpc::retry_failed::blocking_cause;+use crate::memory::tree::tree::rpc::stall::QUEUE_STALL_THRESHOLD_MS;+use crate::memory::tree::tree::rpc::stall::derive_pipeline_status;+use crate::memory::tree::tree::rpc::stall::queue_idle_ms;+use crate::memory::tree::tree::rpc::stall::queue_is_stalled;#[test]fn derive_pipeline_status_precedence_matches_spec() {use crate::memory::tree::health::{DegradedState, FailureCode, PipelineFailure};diff --git a/crates/openhuman-core/src/memory/tree/tree/rpc_tests.rs b/crates/openhuman-core/src/memory/tree/tree/rpc_tests.rsindex f292220e29..e734d86dac 100644--- a/crates/openhuman-core/src/memory/tree/tree/rpc_tests.rs+++ b/crates/openhuman-core/src/memory/tree/tree/rpc_tests.rs@@ -2,6 +2,7 @@ use super::*;use chrono::Utc;use serde_json::json;use tempfile::TempDir;+use crate::memory::read_rpc::Config;// `DocumentInput` (and its `ChatBatch` / `EmailThread` siblings, which// `rpc_ingest_and_chunk_tests` reaches the same way) now arrive through the// `use super::*` above: they are defined in `canonicalize_types.rs` anddiff --git a/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rs b/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rsindex 42aacb3f81..25e95b09fd 100644--- a/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rs+++ b/crates/openhuman-core/src/modules/memory_capability_and_dispatch_tests.rs@@ -1,3 +1,4 @@+use crate::modules::memory::capabilities::capabilities_for;//! Split off memory_tests.rs to stay under the repo's line-count gate.//! Same module, same imports — see memory_tests.rs for what this covers.use super::*;diff --git a/crates/openhuman-core/src/modules/memory_tests.rs b/crates/openhuman-core/src/modules/memory_tests.rsindex 297f8f5fdb..d90b7e4c31 100644--- a/crates/openhuman-core/src/modules/memory_tests.rs+++ b/crates/openhuman-core/src/modules/memory_tests.rs@@ -1,3 +1,4 @@+use crate::modules::memory::capabilities::capabilities_for;//! Tests for the memory module client.//!//! Nothing here loads a module. What is testable without one is what decides adiff --git a/crates/openhuman-core/src/platform/doctor/core_tests.rs b/crates/openhuman-core/src/platform/doctor/core_tests.rsindex a8b7966c84..f655e28d52 100644--- a/crates/openhuman-core/src/platform/doctor/core_tests.rs+++ b/crates/openhuman-core/src/platform/doctor/core_tests.rs@@ -1,6 +1,7 @@use super::*;use tempfile::TempDir;+use crate::memory::read_rpc::Config;fn test_config_in(tmp: &TempDir) -> Config {let mut cfg = Config::default();cfg.workspace_dir = tmp.path().to_path_buf();diff --git a/crates/openhuman-core/src/platform/socket/ws_loop/dispatch.rs b/crates/openhuman-core/src/platform/socket/ws_loop/dispatch.rsindex e330d7394e..e76c828b89 100644--- a/crates/openhuman-core/src/platform/socket/ws_loop/dispatch.rs+++ b/crates/openhuman-core/src/platform/socket/ws_loop/dispatch.rs@@ -1,3 +1,5 @@+use crate::platform::socket::manager::emit_state_change;+use crate::platform::socket::medulla::workflows;//! Incoming-message dispatch: Engine.IO framing and Socket.IO packet/ack//! parsing.diff --git a/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rs b/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rsindex cc7e54804f..0f5f5e4287 100644--- a/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rs+++ b/crates/openhuman-core/src/platform/socket/ws_loop/reconnect.rs@@ -1,3 +1,4 @@+use crate::platform::socket::medulla::workflows;//! The reconnect loop: [`ws_loop`], its failure-escalation logging, the//! invalid-token retry decision, and the emit-queue drain used on shutdown.diff --git a/crates/openhuman-core/src/platform/socket/ws_loop_dispatch_and_redirect_tests.rs b/crates/openhuman-core/src/platform/socket/ws_loop_dispatch_and_redirect_tests.rsindex cfd6fd8377..d0110251f8 100644--- a/crates/openhuman-core/src/platform/socket/ws_loop_dispatch_and_redirect_tests.rs+++ b/crates/openhuman-core/src/platform/socket/ws_loop_dispatch_and_redirect_tests.rs@@ -1,5 +1,6 @@use super::*;+use std::sync::Arc;// ── Redirect resolution (the real fix for OPENHUMAN-TAURI-9X) ──#[test]diff --git a/crates/openhuman-core/src/platform/socket/ws_loop_reconnect_tests.rs b/crates/openhuman-core/src/platform/socket/ws_loop_reconnect_tests.rsindex daf12ecf32..4862421d24 100644--- a/crates/openhuman-core/src/platform/socket/ws_loop_reconnect_tests.rs+++ b/crates/openhuman-core/src/platform/socket/ws_loop_reconnect_tests.rs@@ -1,5 +1,7 @@use super::*;+use crate::platform::socket::token_provider::TokenProvider;+use std::sync::Arc;/// Driver-level proof: when the configured URL responds with a 301 pointing/// at a working Engine.IO server, `ws_loop` follows the redirect, completes/// the handshake, and records a one-shot warning in `SharedState.error` sodiff --git a/crates/openhuman-core/src/platform/socket/ws_loop_tests.rs b/crates/openhuman-core/src/platform/socket/ws_loop_tests.rsindex 2304522c9f..218d87946a 100644--- a/crates/openhuman-core/src/platform/socket/ws_loop_tests.rs+++ b/crates/openhuman-core/src/platform/socket/ws_loop_tests.rs@@ -5,6 +5,8 @@ use tokio_tungstenite::tungstenite::http::{header::LOCATION, Response, StatusCoduse crate::platform::socket::token_provider::{is_invalid_token_error, static_token_provider};+use crate::platform::socket::manager::SharedState;+use std::sync::Arc;fn make_shared() -> Arc<SharedState> {Arc::new(SharedState {webhook_router: RwLock::new(None),diff --git a/crates/openhuman-core/src/search/tools/tavily/extract_tool.rs b/crates/openhuman-core/src/search/tools/tavily/extract_tool.rsindex 8d7ec0d068..385e02b000 100644--- a/crates/openhuman-core/src/search/tools/tavily/extract_tool.rs+++ b/crates/openhuman-core/src/search/tools/tavily/extract_tool.rs@@ -1,3 +1,5 @@+use crate::search::tools::tavily::types::escape_link_destination;+use crate::search::tools::tavily::types::escape_link_text;//! `TavilyExtractTool`: full page content retrieval via `POST /extract`.use super::client::TavilyClient;diff --git a/crates/openhuman-core/src/tools/schemas_tests.rs b/crates/openhuman-core/src/tools/schemas_tests.rsindex 29c16019e3..4955198767 100644--- a/crates/openhuman-core/src/tools/schemas_tests.rs+++ b/crates/openhuman-core/src/tools/schemas_tests.rs@@ -1,5 +1,7 @@use super::*;+use crate::tools::schemas::registry::tools_schemas;+use std::iter::Map;const BASE_CONTROLLERS: usize = 6;#[test]