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
refactor(core): move jsonrpc module to openhuman_rpc crate
Steven Enamakel1dec1d006df6
diff --git a/crates/openhuman-app/src/core_process.rs b/crates/openhuman-app/src/core_process.rsindex 33c81dbf51..a1cf9234e7 100644--- a/crates/openhuman-app/src/core_process.rs+++ b/crates/openhuman-app/src/core_process.rs@@ -77,7 +77,7 @@ pub struct CoreProcessHandle {/// Bearer token the embedded server validates on every inbound request.////// Handed to the embedded server **in-memory** (via the `rpc_token`- /// argument of [`openhuman_core::core::jsonrpc::run_server_embedded_with_ready`])+ /// argument of [`openhuman_rpc::server::run_server_embedded_with_ready`])/// rather than through `OPENHUMAN_CORE_TOKEN` on the process environment./// Avoiding the env crossing keeps the bearer off `/proc/<pid>/environ`/// (Linux) and out of `sysctl KERN_PROCARGS2` / `ps eww -p <pid>` (macOS)@@ -224,7 +224,7 @@ impl CoreProcessHandle {let mut retry_after_takeover = false;let shutdown_token = self.fresh_shutdown_token().await;let (ready_tx, mut ready_rx) = tokio::sync::oneshot::channel::<- openhuman_core::core::jsonrpc::EmbeddedReadySignal,+ openhuman_rpc::server::EmbeddedReadySignal,>();let mut received_ready = false;@@ -292,7 +292,7 @@ impl CoreProcessHandle {"[core] spawning embedded in-process core server on preferred port {port}");let task = tokio::spawn(async move {- openhuman_core::core::jsonrpc::run_server_embedded_with_ready(+ openhuman_rpc::server::run_server_embedded_with_ready(None,Some(port),true,@@ -462,7 +462,7 @@ impl CoreProcessHandle {pub(crate) fn apply_embedded_ready_signal(&self,- ready: openhuman_core::core::jsonrpc::EmbeddedReadySignal,+ ready: openhuman_rpc::server::EmbeddedReadySignal,) {*self.active_port.write() = ready.port;std::env::set_var("OPENHUMAN_CORE_RPC_URL", self.rpc_url());diff --git a/crates/openhuman-app/src/core_process_tests.rs b/crates/openhuman-app/src/core_process_tests.rsindex c1679f8893..77a2174dc0 100644--- a/crates/openhuman-app/src/core_process_tests.rs+++ b/crates/openhuman-app/src/core_process_tests.rs@@ -82,7 +82,7 @@ fn core_process_handle_new_creates_instance() {#[test]fn ready_signal_updates_runtime_port_and_fallback_notice() {let handle = CoreProcessHandle::new(7788);- handle.apply_embedded_ready_signal(openhuman_core::core::jsonrpc::EmbeddedReadySignal {+ handle.apply_embedded_ready_signal(openhuman_rpc::server::EmbeddedReadySignal {port: 7789,fallback_from: Some(7788),});diff --git a/crates/openhuman-core/src/config/schema/load/active_workspace.rs b/crates/openhuman-core/src/config/schema/load/active_workspace.rsindex 725487c25a..f2fa1ed7e2 100644--- a/crates/openhuman-core/src/config/schema/load/active_workspace.rs+++ b/crates/openhuman-core/src/config/schema/load/active_workspace.rs@@ -5,7 +5,7 @@//! file. That is the right cost for a *decision* — the notification bridge//! pays it for the handful of workspace-bound events a supervisor tick//! produces — and the wrong cost for a *stream*. The developer Event Log in-//! [`crate::core::jsonrpc`] has to stamp every domain event the process+//! the JSON-RPC server (`openhuman_rpc::server`) has to stamp every domain event the process//! publishes, and its `tokio_stream` `filter_map` closure is synchronous, so//! it could not await a disk read even if the cost were acceptable.//!@@ -23,7 +23,7 @@//!//! `None` means "not resolved since the last change", not "no workspace".//! Callers that cannot resolve must treat it as unknown rather than as a-//! mismatch — see the Event Log's handling in `core::jsonrpc`.+//! mismatch — see the Event Log's handling in `openhuman_rpc::server::http::events`.//!//! # Why the env-injectable loader does not publish//!diff --git a/crates/openhuman-core/src/config/workspace_handle.rs b/crates/openhuman-core/src/config/workspace_handle.rsindex 8d05a244e8..e8ae39a158 100644--- a/crates/openhuman-core/src/config/workspace_handle.rs+++ b/crates/openhuman-core/src/config/workspace_handle.rs@@ -22,7 +22,7 @@//! [`std::fs::canonicalize`] would be the stricter comparison: it resolves//! symlinks, so two spellings of one directory would agree. It is wrong//! here for two reasons. It is blocking I/O, and the primary caller is the-//! SSE stream in [`crate::core::jsonrpc`], whose `tokio_stream` `filter_map`+//! SSE stream in the JSON-RPC server (`openhuman_rpc::server`), whose `tokio_stream` `filter_map`//! closure is synchronous — a disk hit per streamed event is exactly the//! cost this handle exists to avoid. And it fails on a directory that no//! longer exists, which a *stale-workspace* event is precisely the casediff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rsindex 06823c382c..5eb594fe2c 100644--- a/crates/openhuman-core/src/core/all.rs+++ b/crates/openhuman-core/src/core/all.rs@@ -1436,7 +1436,7 @@ pub fn schema_for_rpc_method(method: &str) -> Option<ControllerSchema> {////// | entry point | validates in |/// | --- | --- |-/// | HTTP JSON-RPC | `core::jsonrpc` |+/// | HTTP JSON-RPC | `openhuman_rpc::server` (through `core::invoke`) |/// | dynamic dispatch fallback | `core::dispatch::try_registry_dispatch` |/// | CLI | `core::cli` |/// | MCP read and write tools | `crate::mcp::server::tools::params` |diff --git a/crates/openhuman-core/src/core/all_tests.rs b/crates/openhuman-core/src/core/all_tests.rsindex 757e1e747c..407ec6ccf2 100644--- a/crates/openhuman-core/src/core/all_tests.rs+++ b/crates/openhuman-core/src/core/all_tests.rs@@ -2255,7 +2255,7 @@ async fn rpc_method_from_parts_stays_unfiltered_by_capability() {// WIRING is right, using the tree family as the named vehicle. They target// `try_invoke_registered_rpc`, `schema_for_rpc_method` and// `all_controller_schemas` — the same three functions the HTTP layer calls-// (`core::jsonrpc::invoke::invoke_method_inner` resolves the schema then dispatches;+// (`core::invoke::invoke_method_inner` resolves the schema then dispatches;// `/schema` renders `all_http_method_schemas()`, which extends from// `all_controller_schemas()`). Asserting on them IS asserting on the wire// surface; there is no more faithful vehicle available at this level, and andiff --git a/crates/openhuman-core/src/flows/mod.rs b/crates/openhuman-core/src/flows/mod.rsindex 0c0243fb7b..76ac693aec 100644--- a/crates/openhuman-core/src/flows/mod.rs+++ b/crates/openhuman-core/src/flows/mod.rs@@ -13,7 +13,7 @@//! `pub mod flows;` in `crates/openhuman-core/src/lib.rs` on `#[cfg(feature = "flows")]`,//! and the submodules below inherit that gate. There is **no `stub.rs`**://! every symbol reached from outside is a *registration site* (`core::all`,-//! `core::jsonrpc`'s `FlowTriggerSubscriber`, `core::runtime::services`' boot+//! `core::runtime::subscribers`' `FlowTriggerSubscriber`, `core::runtime::services`' boot//! reconcile, the agent-tool `vec!` in `tools::ops`, the `workflow_builder` ///! `flow_discovery` entries in `agent::registry`'s `BUILTINS`), and a registration site wants//! *absence*, not a disabled-error stub — otherwise `flows.*` becomes a knowndiff --git a/crates/openhuman-core/src/security/devices/bus.rs b/crates/openhuman-core/src/security/devices/bus.rsindex f7ef8b272c..979c0747c9 100644--- a/crates/openhuman-core/src/security/devices/bus.rs+++ b/crates/openhuman-core/src/security/devices/bus.rs@@ -526,8 +526,8 @@ async fn handle_encrypted_rpc_frame(channel_id: &str, frame_bytes: &[u8]) {envelope.request_id);- let result = crate::core::jsonrpc::invoke_method(- crate::core::jsonrpc::default_state(),+ let result = crate::core::invoke::invoke_method(+ crate::core::invoke::default_state(),&request.method,request.params,)diff --git a/tests/agent_approval_memory_coverage_e2e.rs b/tests/agent_approval_memory_coverage_e2e.rsindex fe6ab197bf..3127121477 100644--- a/tests/agent_approval_memory_coverage_e2e.rs+++ b/tests/agent_approval_memory_coverage_e2e.rs@@ -30,7 +30,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "agent-approval-memory-coverage-e2e-token";diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rsindex 6a34b0f3b2..43a70b545f 100644--- a/tests/agent_harness_e2e.rs+++ b/tests/agent_harness_e2e.rs@@ -29,7 +29,7 @@ use tempfile::tempdir;use openhuman_core::agent::harness::AgentDefinitionRegistry;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "json-rpc-e2e-local-token";diff --git a/tests/agent_prompt_comprehension_e2e.rs b/tests/agent_prompt_comprehension_e2e.rsindex 5e679945fe..b0b4c8723c 100644--- a/tests/agent_prompt_comprehension_e2e.rs+++ b/tests/agent_prompt_comprehension_e2e.rs@@ -30,7 +30,7 @@ use tempfile::tempdir;use openhuman_core::agent::harness::AgentDefinitionRegistry;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "json-rpc-e2e-local-token";diff --git a/tests/channels_default_channel_e2e.rs b/tests/channels_default_channel_e2e.rsindex a513db6065..951d3d992e 100644--- a/tests/channels_default_channel_e2e.rs+++ b/tests/channels_default_channel_e2e.rs@@ -58,7 +58,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "channels-default-channel-e2e-token";diff --git a/tests/composio_post_oauth_retry_e2e.rs b/tests/composio_post_oauth_retry_e2e.rsindex d8f1dcbd28..ab6ae5a8fa 100644--- a/tests/composio_post_oauth_retry_e2e.rs+++ b/tests/composio_post_oauth_retry_e2e.rs@@ -80,7 +80,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;// ── env serialisation ─────────────────────────────────────────────────────────//diff --git a/tests/config_auth_app_state_connectivity_e2e.rs b/tests/config_auth_app_state_connectivity_e2e.rsindex 0110d7b5e5..8902e63d99 100644--- a/tests/config_auth_app_state_connectivity_e2e.rs+++ b/tests/config_auth_app_state_connectivity_e2e.rs@@ -42,7 +42,7 @@ use openhuman_core::config::{};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};use openhuman_core::core::events::DomainEvent;-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::desktop::app_state::app_state_schemas;use openhuman_core::platform::connectivity::{all_connectivity_controller_schemas, all_connectivity_registered_controllers,diff --git a/tests/domain_modules_e2e.rs b/tests/domain_modules_e2e.rsindex d0a4269b3b..d9a217750f 100644--- a/tests/domain_modules_e2e.rs+++ b/tests/domain_modules_e2e.rs@@ -19,7 +19,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "domain-modules-e2e-token";diff --git a/tests/embeddings_rpc_e2e.rs b/tests/embeddings_rpc_e2e.rsindex 7119ad6004..eabf6b961e 100644--- a/tests/embeddings_rpc_e2e.rs+++ b/tests/embeddings_rpc_e2e.rs@@ -20,7 +20,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;// ── Auth / token setup ────────────────────────────────────────────────────────diff --git a/tests/inference_provider_e2e.rs b/tests/inference_provider_e2e.rsindex 6eb4f5232c..d7b254351e 100644--- a/tests/inference_provider_e2e.rs+++ b/tests/inference_provider_e2e.rs@@ -21,7 +21,7 @@ use wiremock::matchers::{header as wm_header, method, path};use wiremock::{Mock, MockServer, ResponseTemplate};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use tinyinference_llm::message::Message;use tinyinference_llm::model::{ChatModel, ModelRequest, ModelStreamItem};use tinyinference_llm::providers::openai::{AuthStyle, OpenAiModel};diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex 538b8539e4..88969a09b2 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -26,7 +26,7 @@ use tinyinference_llm::message::Message;use tinyinference_llm::model::ModelRequest;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::memory::tree::all_memory_tree_registered_controllers;use openhuman_core::platform::connectivity::rpc::pick_listen_port;diff --git a/tests/live_flows_demo_e2e.rs b/tests/live_flows_demo_e2e.rsindex 11f4db0d29..01bc013e41 100644--- a/tests/live_flows_demo_e2e.rs+++ b/tests/live_flows_demo_e2e.rs@@ -27,7 +27,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;static LIVE_E2E_ENV_LOCK: OnceLock<Mutex<()>> = OnceLock::new();static LIVE_RPC_AUTH_INIT: OnceLock<()> = OnceLock::new();diff --git a/tests/live_routing_e2e.rs b/tests/live_routing_e2e.rsindex f68f70a06d..9ed6a1727b 100644--- a/tests/live_routing_e2e.rs+++ b/tests/live_routing_e2e.rs@@ -21,7 +21,7 @@ use tempfile::tempdir;use tokio::time::timeout;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;static LIVE_E2E_ENV_LOCK: OnceLock<Mutex<()>> = OnceLock::new();static LIVE_RPC_AUTH_INIT: OnceLock<()> = OnceLock::new();diff --git a/tests/memory_graph_roundtrip_e2e.rs b/tests/memory_graph_roundtrip_e2e.rsindex 97c2505a19..16da684ec5 100644--- a/tests/memory_graph_roundtrip_e2e.rs+++ b/tests/memory_graph_roundtrip_e2e.rs@@ -83,7 +83,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "memory-graph-roundtrip-e2e-token";diff --git a/tests/memory_sources_e2e.rs b/tests/memory_sources_e2e.rsindex baf8085a4e..ee47facc00 100644--- a/tests/memory_sources_e2e.rs+++ b/tests/memory_sources_e2e.rs@@ -18,7 +18,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "memory-sources-e2e-token";static AUTH_INIT: OnceLock<()> = OnceLock::new();diff --git a/tests/memory_tree_health_e2e.rs b/tests/memory_tree_health_e2e.rsindex 7153a94be2..db6751faec 100644--- a/tests/memory_tree_health_e2e.rs+++ b/tests/memory_tree_health_e2e.rs@@ -37,7 +37,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "memory-tree-health-e2e-token";static AUTH_INIT: OnceLock<()> = OnceLock::new();diff --git a/tests/raw_coverage/agent_orchestration_e2e.rs b/tests/raw_coverage/agent_orchestration_e2e.rsindex 6425e7411f..f94757a39a 100644--- a/tests/raw_coverage/agent_orchestration_e2e.rs+++ b/tests/raw_coverage/agent_orchestration_e2e.rs@@ -26,7 +26,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{get_rpc_token, init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;/// Seeded only if this suite is the first in the aggregated binary to/// initialise the token; the bearer actually sent is always read back fromdiff --git a/tests/raw_coverage/automation_scheduling_e2e.rs b/tests/raw_coverage/automation_scheduling_e2e.rsindex d1d1b2ffb8..708c2d7efb 100644--- a/tests/raw_coverage/automation_scheduling_e2e.rs+++ b/tests/raw_coverage/automation_scheduling_e2e.rs@@ -24,7 +24,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{get_rpc_token, init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;/// Seeded only if this suite is the first in the aggregated binary to/// initialise the token; the bearer actually sent is always read back fromdiff --git a/tests/raw_coverage/channel_socket_e2e.rs b/tests/raw_coverage/channel_socket_e2e.rsindex 9f045104a1..ec91af363c 100644--- a/tests/raw_coverage/channel_socket_e2e.rs+++ b/tests/raw_coverage/channel_socket_e2e.rs@@ -36,7 +36,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{get_rpc_token, init_rpc_token};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::platform::socket::{global_socket_manager, set_global_socket_manager, SocketManager,};diff --git a/tests/raw_coverage/connectivity_raw_coverage_e2e.rs b/tests/raw_coverage/connectivity_raw_coverage_e2e.rsindex debc647628..9218dbbdaa 100644--- a/tests/raw_coverage/connectivity_raw_coverage_e2e.rs+++ b/tests/raw_coverage/connectivity_raw_coverage_e2e.rs@@ -15,7 +15,7 @@ use tempfile::{tempdir, TempDir};use tokio::io::{AsyncReadExt, AsyncWriteExt};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::platform::connectivity::ops::is_port_in_use;use openhuman_core::platform::connectivity::rpc::{diag, pick_listen_port, pick_listen_port_for_host, PickListenPortError,diff --git a/tests/raw_coverage/flows_lifecycle_e2e.rs b/tests/raw_coverage/flows_lifecycle_e2e.rsindex dc5cdb1ba1..4265bc3b69 100644--- a/tests/raw_coverage/flows_lifecycle_e2e.rs+++ b/tests/raw_coverage/flows_lifecycle_e2e.rs@@ -25,7 +25,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{get_rpc_token, init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;/// Seeded only if this suite is the first in the aggregated binary to/// initialise the token; the bearer actually sent is always read back fromdiff --git a/tests/raw_coverage/inference_provider_auth_e2e.rs b/tests/raw_coverage/inference_provider_auth_e2e.rsindex f82e38695b..474ba3513b 100644--- a/tests/raw_coverage/inference_provider_auth_e2e.rs+++ b/tests/raw_coverage/inference_provider_auth_e2e.rs@@ -38,7 +38,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{get_rpc_token, init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::inference::auth_error_registry;const TEST_RPC_TOKEN: &str = "inference-provider-auth-e2e-token";diff --git a/tests/raw_coverage/learning_facets_e2e.rs b/tests/raw_coverage/learning_facets_e2e.rsindex 8c057b6f22..c3b7c67b67 100644--- a/tests/raw_coverage/learning_facets_e2e.rs+++ b/tests/raw_coverage/learning_facets_e2e.rs@@ -40,7 +40,7 @@ use serde_json::{json, Value};use tempfile::TempDir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::agent::learning::candidate::{self, CueFamily, EvidenceRef, FacetClass, LearningCandidate,};diff --git a/tests/raw_coverage/memory_goals_people_e2e.rs b/tests/raw_coverage/memory_goals_people_e2e.rsindex d1a129a880..5575c5da0e 100644--- a/tests/raw_coverage/memory_goals_people_e2e.rs+++ b/tests/raw_coverage/memory_goals_people_e2e.rs@@ -40,7 +40,7 @@ use serde_json::{json, Value};use tempfile::TempDir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::config::Config;/// Preferred bearer. Only the real one if this module wins the process-globaldiff --git a/tests/raw_coverage/notification_platform_e2e.rs b/tests/raw_coverage/notification_platform_e2e.rsindex edb98bfd85..76f9f8742a 100644--- a/tests/raw_coverage/notification_platform_e2e.rs+++ b/tests/raw_coverage/notification_platform_e2e.rs@@ -31,7 +31,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{get_rpc_token, init_rpc_token};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::config::rpc::load_config_with_timeout;use openhuman_core::desktop::notifications::store as notification_store;use openhuman_core::desktop::notifications::types::{diff --git a/tests/raw_coverage/sandbox_runtime_platform_e2e.rs b/tests/raw_coverage/sandbox_runtime_platform_e2e.rsindex 46c6df7c66..b500375f83 100644--- a/tests/raw_coverage/sandbox_runtime_platform_e2e.rs+++ b/tests/raw_coverage/sandbox_runtime_platform_e2e.rs@@ -42,7 +42,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{get_rpc_token, init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "sandbox-runtime-platform-e2e-token";diff --git a/tests/raw_coverage/session_store_e2e.rs b/tests/raw_coverage/session_store_e2e.rsindex ff905285c1..02457c5327 100644--- a/tests/raw_coverage/session_store_e2e.rs+++ b/tests/raw_coverage/session_store_e2e.rs@@ -36,7 +36,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;/// Preferred bearer for this suite. It is only the *actual* bearer when this/// module happens to be the first in the aggregated binary to initialise auth —diff --git a/tests/raw_coverage/skill_runtime_e2e.rs b/tests/raw_coverage/skill_runtime_e2e.rsindex 90e47e54c3..1631201833 100644--- a/tests/raw_coverage/skill_runtime_e2e.rs+++ b/tests/raw_coverage/skill_runtime_e2e.rs@@ -50,7 +50,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;/// The bearer this suite *proposes*. It is only used if this suite happens to/// be the first in the aggregated binary to initialise the token subsystem —diff --git a/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs b/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rsindex 6bc37bcbbb..793063365b 100644--- a/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs+++ b/tests/raw_coverage/tool_registry_approval_raw_coverage_e2e.rs@@ -16,7 +16,7 @@ use serde_json::{json, Map, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::agent::turn_origin::{self, AgentTurnOrigin};use openhuman_core::security::approval::gate::{parse_approval_reply, ApprovalChatContext, ApprovalGate, APPROVAL_CHAT_CONTEXT,diff --git a/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rs b/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rsindex ee88568ffc..c186192847 100644--- a/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rs+++ b/tests/raw_coverage/tools_approval_channels_raw_coverage_e2e.rs@@ -22,7 +22,7 @@ use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};use openhuman_core::core::events::DomainEvent;use tinybus::EventHandler;-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::web_chat::WebChannelEvent;use openhuman_core::agent::harness::definition::{AgentDefinition, AgentDefinitionRegistry, AgentTier, DefinitionSource, ModelSpec, PromptSource,diff --git a/tests/raw_coverage/voice_audio_e2e.rs b/tests/raw_coverage/voice_audio_e2e.rsindex c8ff7ed6e3..41e5fb6bf5 100644--- a/tests/raw_coverage/voice_audio_e2e.rs+++ b/tests/raw_coverage/voice_audio_e2e.rs@@ -51,7 +51,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{get_rpc_token, init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "voice-audio-e2e-token";const SESSION_JWT: &str = "voice-audio-e2e-jwt";diff --git a/tests/raw_coverage/w4_shared/mod.rs b/tests/raw_coverage/w4_shared/mod.rsindex dd19dd64c7..b82c38c3f0 100644--- a/tests/raw_coverage/w4_shared/mod.rs+++ b/tests/raw_coverage/w4_shared/mod.rs@@ -311,7 +311,7 @@ impl Harness {}let (rpc_addr, rpc_join) =- serve_on_ephemeral(openhuman_core::core::jsonrpc::build_core_http_router(false)).await;+ serve_on_ephemeral(openhuman_rpc::server::build_core_http_router(false)).await;tokio::time::sleep(Duration::from_millis(100)).await;Self {diff --git a/tests/raw_coverage/webhooks_ingress_e2e.rs b/tests/raw_coverage/webhooks_ingress_e2e.rsindex 9ca9514e0a..ae18a8ad05 100644--- a/tests/raw_coverage/webhooks_ingress_e2e.rs+++ b/tests/raw_coverage/webhooks_ingress_e2e.rs@@ -49,7 +49,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{get_rpc_token, init_rpc_token};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::platform::socket::{global_socket_manager, set_global_socket_manager, SocketManager,};diff --git a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs b/tests/raw_coverage/worker_b_raw_coverage_e2e.rsindex fdc364e53a..84d7bee988 100644--- a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs+++ b/tests/raw_coverage/worker_b_raw_coverage_e2e.rs@@ -20,7 +20,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;use openhuman_core::agent::turn_origin::{self, AgentTurnOrigin};use openhuman_core::security::approval::gate::{ApprovalChatContext, ApprovalGate, APPROVAL_CHAT_CONTEXT,diff --git a/tests/skill_registry_e2e.rs b/tests/skill_registry_e2e.rsindex 37d38c8e6d..562fdaf63e 100644--- a/tests/skill_registry_e2e.rs+++ b/tests/skill_registry_e2e.rs@@ -18,7 +18,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;// ── Constants ──────────────────────────────────────────────────────────────diff --git a/tests/skills_mcp_registry_live.rs b/tests/skills_mcp_registry_live.rsindex 1dc76a2515..9bc6597e43 100644--- a/tests/skills_mcp_registry_live.rs+++ b/tests/skills_mcp_registry_live.rs@@ -27,7 +27,7 @@ use serde_json::{json, Value};use tempfile::tempdir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "skills-mcp-live-token";diff --git a/tests/tree_summarizer_e2e.rs b/tests/tree_summarizer_e2e.rsindex 75310c7c3c..2af0585f64 100644--- a/tests/tree_summarizer_e2e.rs+++ b/tests/tree_summarizer_e2e.rs@@ -33,7 +33,7 @@ use serde_json::{json, Value};use tempfile::TempDir;use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "tree-summarizer-e2e-token";const NAMESPACE: &str = "tree-summarizer-e2e";diff --git a/tests/worker_b_domain_e2e.rs b/tests/worker_b_domain_e2e.rsindex ecea2e2b98..39eb1f296c 100644--- a/tests/worker_b_domain_e2e.rs+++ b/tests/worker_b_domain_e2e.rs@@ -16,7 +16,7 @@ use serde_json::{json, Value};use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "worker-b-domain-e2e-token";diff --git a/tests/worker_c_modules_e2e.rs b/tests/worker_c_modules_e2e.rsindex b00028e043..875e02a6a9 100644--- a/tests/worker_c_modules_e2e.rs+++ b/tests/worker_c_modules_e2e.rs@@ -18,7 +18,7 @@ use tempfile::{tempdir, TempDir};use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};use openhuman_core::core::dispatch::UNKNOWN_METHOD_PREFIX;-use openhuman_core::core::jsonrpc::build_core_http_router;+use openhuman_rpc::server::build_core_http_router;const TEST_RPC_TOKEN: &str = "worker-c-modules-e2e-token";