Skip to content

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

chore: update references from old `core::jsonrpc` module to new `openhuman-rpc` crate paths

Steven Enamakeleb9012060366
diff --git a/.github/workflows/ci-lite.yml b/.github/workflows/ci-lite.yml
index 7815eccb71..aa1a00d9c4 100644
--- a/.github/workflows/ci-lite.yml
+++ b/.github/workflows/ci-lite.yml
@@ -538,7 +538,7 @@ jobs:
run: |
bash scripts/ci-cancel-aware.sh cargo test --manifest-path Cargo.toml \
-p openhuman --no-default-features --lib -- \
- core::all:: core::cli:: core::jsonrpc:: core::legacy_aliases:: core::runtime:: agent::registry::agents::loader:: commands::ops::tests:: memory::people::contacts_gate_tests:: openhuman::config:: openhuman::platform::socket::event_handlers:: tools::schemas:: tools::ops::tests::
+ core::all:: core::cli:: core::invoke:: core::session_expiry:: core::legacy_aliases:: core::runtime:: agent::registry::agents::loader:: commands::ops::tests:: memory::people::contacts_gate_tests:: openhuman::config:: openhuman::platform::socket::event_handlers:: tools::schemas:: tools::ops::tests::
bash scripts/ci-cancel-aware.sh cargo test --manifest-path Cargo.toml \
-p openhuman --no-default-features --features mcp --lib -- \
mcp::server::resources::
diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.toml
index 83d2c41f22..3e4169ed1e 100644
--- a/crates/openhuman-core/Cargo.toml
+++ b/crates/openhuman-core/Cargo.toml
@@ -757,7 +757,7 @@ proptest = "1"
# `--no-default-features --features flows` and never reads this list.
default = ["media", "skills", "flows", "mcp", "channels", "http-server", "scheduler-gate", "file-logging", "modules"]
# HTTP + Socket.IO server transport (#5048): the `/rpc` JSON-RPC endpoint and
-# its auth middleware/CORS layer (`core::jsonrpc`, `core::auth`), the `/v1`
+# its auth middleware/CORS layer (now in `openhuman-rpc`), the `/v1`
# OpenAI-compatible router (`inference::http`), the ad-hoc static-dir file
# server (`openhuman::http_host`), the AgentBox `/run` HTTP surface
# (`agentbox::http`), the WebSocket dictation stream
diff --git a/crates/openhuman-core/src/core/runtime/services.rs b/crates/openhuman-core/src/core/runtime/services.rs
index aaaf6f9006..4d097ed4b5 100644
--- a/crates/openhuman-core/src/core/runtime/services.rs
+++ b/crates/openhuman-core/src/core/runtime/services.rs
@@ -1,7 +1,7 @@
//! Background service spawns.
//!
//! Extracted (Phase 0 — pure motion) from the inline `tokio::spawn` blocks that
-//! used to live in `run_server_inner` (then in `crates/openhuman-rpc/src/server/`).
+//! used to live in `run_server_inner` (later in the since-split `core/jsonrpc.rs`).
//! Each function spawns one long-lived background service as a detached task,
//! preserving the exact gating and behavior of the original inline block.
//!
diff --git a/crates/openhuman-core/src/core/shutdown.rs b/crates/openhuman-core/src/core/shutdown.rs
index 40cd451ff8..53690ec980 100644
--- a/crates/openhuman-core/src/core/shutdown.rs
+++ b/crates/openhuman-core/src/core/shutdown.rs
@@ -3,7 +3,7 @@
//! Provides a shutdown signal that listens for SIGINT (Ctrl-C) **and** SIGTERM
//! (on Unix), then runs registered cleanup hooks before the process exits.
//! Domain-specific cleanup (autocomplete, voice, etc.) registers itself here
-//! so `openhuman-rpc/src/server/` stays transport-only.
+//! so the JSON-RPC server in `openhuman-rpc` stays transport-only.
use std::future::Future;
use std::pin::Pin;
diff --git a/crates/openhuman-core/src/flows/README.md b/crates/openhuman-core/src/flows/README.md
index 933a35ac65..1a07c3be46 100644
--- a/crates/openhuman-core/src/flows/README.md
+++ b/crates/openhuman-core/src/flows/README.md
@@ -21,7 +21,7 @@ The whole family (`flows` + `flows::tinyflows`) is gated at `pub mod flows;`
in `crates/openhuman-core/src/lib.rs` behind `#[cfg(feature = "flows")]`, and
every submodule inherits that gate. There is deliberately **no `stub.rs`**:
every symbol reached from outside is a registration site:
-`core::all::all_flows_registered_controllers`, `core::jsonrpc`'s
+`core::all::all_flows_registered_controllers`, `core::runtime::subscribers`'
`FlowTriggerSubscriber`, `core::runtime::services`' boot reconcile
(`sweep_orphaned_running_runs_on_boot`, `reconcile_schedule_triggers_on_boot`),
the agent-tool `vec!` in `tools::ops`, and the
diff --git a/crates/openhuman-core/src/inference/README.md b/crates/openhuman-core/src/inference/README.md
index 50754979c0..db16769dfb 100644
--- a/crates/openhuman-core/src/inference/README.md
+++ b/crates/openhuman-core/src/inference/README.md
@@ -83,7 +83,7 @@ One namespace is wired into the controller registry (`crates/openhuman-core/src/
Legacy `openhuman.local_ai_*` and `openhuman.update_local_ai_settings` method names are rewritten to canonical `openhuman.inference_*` methods by `crates/openhuman-core/src/core/legacy_aliases.rs` and `app/src/services/rpcMethods.ts`.
-Also exposes a non-RPC HTTP router (`http::router()`) nested at `/v1` by `crates/openhuman-rpc/src/server/` (`/v1/chat/completions`, `/v1/models`), accepting either the core bearer or a stable external API key.
+Also exposes a non-RPC HTTP router (`http::router()`) nested at `/v1` by `crates/openhuman-rpc/src/server/http/mod.rs` (`/v1/chat/completions`, `/v1/models`), accepting either the core bearer or a stable external API key.
## Events
@@ -112,7 +112,7 @@ Also exposes a non-RPC HTTP router (`http::router()`) nested at `/v1` by `crates
- `crate::core::bus` (`BUS.publish`) / `crate::core::events::DomainEvent`: `SessionExpired` / `ProviderApiKeyRejected` publishing on auth failure.
- `crate::security::live_policy` + `crate::security::egress`: Privacy-Mode `LocalOnly` enforcement and egress descriptors at the chat-factory chokepoint (`enforce_local_only_inference`, `emit_inference_egress` in `provider/factory/access_gates.rs`).
- `crate::core::observability`: `expected_error_kind` for Sentry-noise classification.
-- `crate::core::jsonrpc`: endpoint mounting reference for `/v1`.
+- `openhuman_rpc::server::build_core_http_router`: mounts this router at `/v1`.
- `crate::core::auth`: bearer auth for the OpenAI-compatible endpoint.
- External: `sysinfo` (device profile), `reqwest`.
diff --git a/crates/openhuman-core/src/integrations/task_sources/README.md b/crates/openhuman-core/src/integrations/task_sources/README.md
index 6aa2891bca..0994fe9306 100644
--- a/crates/openhuman-core/src/integrations/task_sources/README.md
+++ b/crates/openhuman-core/src/integrations/task_sources/README.md
@@ -106,7 +106,7 @@ Subscribes:
Startup wiring is split across three sites; both entry points are idempotent
(`OnceLock`), so the overlap is harmless:
-- `crates/openhuman-rpc/src/server/` (~2159) calls
+- `crates/openhuman-core/src/core/runtime/subscribers.rs` calls
`crate::integrations::task_sources::bus::register_task_sources_subscriber()`.
- `crates/openhuman-core/src/core/runtime/services.rs` (~349) calls
`crate::integrations::task_sources::start_periodic_poll()` when the
diff --git a/crates/openhuman-core/src/mcp/registry/README.md b/crates/openhuman-core/src/mcp/registry/README.md
index 62de733d6f..317ccbe89a 100644
--- a/crates/openhuman-core/src/mcp/registry/README.md
+++ b/crates/openhuman-core/src/mcp/registry/README.md
@@ -148,7 +148,7 @@ same real type in both builds.
installed servers, and connect, disconnect, config updates, and reconnects
update the map. `connected_overview()` reads tool snapshots from that map;
it does not call an MCP server on each chat turn.
-- `crates/openhuman-rpc/src/server/`: the `/oauth/mcp/callback`
+- `crates/openhuman-rpc/src/server/http/oauth_mcp.rs`: the `/oauth/mcp/callback`
route calls `oauth::complete`.
- `crates/openhuman-core/src/tools/registry/ops.rs` and
`crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs`:
diff --git a/crates/openhuman-core/src/platform/health/README.md b/crates/openhuman-core/src/platform/health/README.md
index bc9dfb00dc..40d07fd78a 100644
--- a/crates/openhuman-core/src/platform/health/README.md
+++ b/crates/openhuman-core/src/platform/health/README.md
@@ -28,7 +28,7 @@ From `core.rs` (re-exported via `pub use core::*`):
- Types: `ComponentHealth`, `HealthSnapshot`, `HealthVerdict`.
- Functions: `mark_component_ok(component)`, `mark_component_error(component, error)`, `bump_component_restart(component)`, `snapshot() -> HealthSnapshot`, `snapshot_json() -> serde_json::Value`, `verdict(&HealthSnapshot) -> HealthVerdict`, `is_critical_component(name) -> bool`.
-The HTTP `GET /health` handler (`core::jsonrpc::health_handler`) uses `verdict()` for its status code (200 unless a critical component is unhealthy) and adds `healthy` / `degraded` / `critical_unhealthy` / `degraded_components` fields alongside the `components` map in the body. The `components` map shape is unchanged: the new fields are additive.
+The HTTP `GET /health` handler (`openhuman_rpc::server::http::health::health_handler`) uses `verdict()` for its status code (200 unless a critical component is unhealthy) and adds `healthy` / `degraded` / `critical_unhealthy` / `degraded_components` fields alongside the `components` map in the body. The `components` map shape is unchanged: the new fields are additive.
From `ops.rs` (re-exported via `pub use ops::*`, also aliased `pub use ops as rpc`):
- `health_snapshot() -> Outcome<serde_json::Value>`, `system_info() -> Outcome<SystemInfo>`, and the `SystemInfo` struct.
@@ -76,7 +76,7 @@ None on disk. State lives in a process-global `OnceLock<HealthRegistry>` (lazy-i
## Used by
- `crates/openhuman-core/src/core/all.rs`: registers `all_health_*` controllers into the registry.
-- `crates/openhuman-rpc/src/server/`: references health (snapshot/system_info surface).
+- `crates/openhuman-rpc/src/server/http/health.rs`: references health (snapshot/system_info surface).
- `crates/openhuman-core/src/channels/runtime/{startup,supervision}.rs` and `crates/openhuman-core/src/channels/tests/health.rs`: channel runtime updates component health.
- `crates/openhuman-core/src/cron/scheduler.rs`, `crates/openhuman-core/src/platform/update/scheduler.rs`: emit/consume health signals.
diff --git a/crates/openhuman-core/src/voice/README.md b/crates/openhuman-core/src/voice/README.md
index 846065258e..d87e5033b5 100644
--- a/crates/openhuman-core/src/voice/README.md
+++ b/crates/openhuman-core/src/voice/README.md
@@ -151,7 +151,7 @@ transcription count, rolling recent-transcript buffer for context) behind a
- `crates/openhuman-core/src/core/all.rs`: registers the `voice` and `audio_toolkit` controllers (gated) and the `openhuman voice` CLI adapter (ungated, so the stub answers with a "voice disabled" error).
- `crates/openhuman-rpc/src/server/socketio.rs`: subscribes to the dictation/transcription broadcast buses and forwards them to Socket.IO clients.
-- `crates/openhuman-rpc/src/server/`: WebSocket upgrade for streaming dictation (`streaming::handle_dictation_ws`).
+- `crates/openhuman-rpc/src/server/http/dictation.rs`: WebSocket upgrade for streaming dictation (`streaming::handle_dictation_ws`).
- `crates/openhuman-core/src/platform/socket/event_handlers.rs`: spawns `realtime_harness::handle_voice_harness_turn` for each `voice:harness` socket event.
- `crates/openhuman-core/src/web_chat/run_task.rs`: synthesizes agent reply speech and publishes PTT transcript-committed events.
- `crates/openhuman-core/src/channels/host/adapters.rs`: channel-side STT provider dispatch and reply synthesis.
diff --git a/crates/openhuman-core/src/web3/x402/README.md b/crates/openhuman-core/src/web3/x402/README.md
index 30baae47e1..3539c8b431 100644
--- a/crates/openhuman-core/src/web3/x402/README.md
+++ b/crates/openhuman-core/src/web3/x402/README.md
@@ -114,7 +114,7 @@ which handles a 402 only as a silent fallback for any endpoint.
- `crates/openhuman-core/src/core/all.rs` (around line 569): wires
`all_x402_registered_controllers` into the controller registry under
`DomainGroup::Web3`.
-- `crates/openhuman-rpc/src/server/` (around line 2477): calls
+- `crates/openhuman-core/src/core/runtime/bootstrap.rs`: calls
`init_ledger(&workspace_dir, &x402_session)` at boot, itself runtime-gated on
`DomainGroup::Web3`.
diff --git a/crates/openhuman-core/src/web_chat/README.md b/crates/openhuman-core/src/web_chat/README.md
index c324849471..0fca84038a 100644
--- a/crates/openhuman-core/src/web_chat/README.md
+++ b/crates/openhuman-core/src/web_chat/README.md
@@ -131,12 +131,12 @@ Namespace `channel`, registered via
- Broadcasts `WebChannelEvent` (defined in `openhuman-rpc/src/server/socketio.rs`) over an
in-process `tokio::sync::broadcast` channel. `openhuman-rpc/src/server/socketio.rs` forwards it
- to the connected Socket.IO client; `core/jsonrpc.rs` forwards the same
+ to the connected Socket.IO client; `openhuman-rpc/src/server/http/events.rs` forwards the same
stream to the JSON-RPC `/events` SSE endpoint; `channels/bus/subscriber.rs`
subscribes to collect the reply for an inbound provider message.
- Subscribes to `DomainEvent` on `crate::core::bus::BUS` via three
process-lifetime, `OnceLock`-guarded subscribers registered at startup from
- `core/jsonrpc.rs` and `channels/runtime/startup/start_channels.rs`:
+ `core/runtime/bootstrap.rs` and `channels/runtime/startup/start_channels.rs`:
`register_approval_surface_subscriber`
(maps `ApprovalRequested`/`PlanReviewRequested` to `approval_request` /
`plan_review_request`), `register_artifact_surface_subscriber`
diff --git a/gitbooks/developing/architecture/tauri-shell.md b/gitbooks/developing/architecture/tauri-shell.md
index 739a1c8ee9..302b43a72b 100644
--- a/gitbooks/developing/architecture/tauri-shell.md
+++ b/gitbooks/developing/architecture/tauri-shell.md
@@ -88,7 +88,7 @@ React (fetch)
The renderer talks to the local core **directly over HTTP**: `app/src/services/coreRpcClient.ts` invokes `core_rpc_url` / `core_rpc_token` once, then issues plain `fetch()` calls. The `relay_http_rpc` Tauri command is a host-side fallback used only when the RPC URL is **not** a trustworthy origin for the secure `tauri://localhost` webview (e.g. a self-hosted runtime on a LAN IP, blocked as mixed content, #3865). In that case the Rust host delegates to `openhuman_rpc::post_json_rpc` from the shared `crates/openhuman-rpc` crate (feature `http-client`): 30 s timeout, redirects disabled when a bearer is present, status + body mirrored back verbatim as `HttpRpcResponse`. The shell adds only the gateway transport guard (`validate_remote_transport`, feature `gateways`) before delegating.
-`CoreProcessHandle` in `core_process.rs` owns the embedded server task (started via `openhuman_core::core::jsonrpc::run_server_embedded_with_ready` with a per-launch random bearer token) and handles stale-listener/port-conflict recovery.
+`CoreProcessHandle` in `core_process.rs` owns the embedded server task (started via `openhuman_rpc::server::run_server_embedded_with_ready` with a per-launch random bearer token) and handles stale-listener/port-conflict recovery.
### Window and tray behavior
@@ -307,7 +307,7 @@ The Tauri crate **does not** embed a duplicate Socket.io server or Telegram clie
### `CoreProcessHandle` (`core_process.rs`)
-- Runs the core's HTTP/JSON-RPC server as a **tokio task inside the Tauri host** via `openhuman_core::core::jsonrpc::run_server_embedded_with_ready`: no sidecar binary.
+- Runs the core's HTTP/JSON-RPC server as a **tokio task inside the Tauri host** via `openhuman_rpc::server::run_server_embedded_with_ready`: no sidecar binary.
- Generates a per-launch 256-bit hex bearer token (`generate_rpc_token`) and hands it to the embedded server; the renderer reads it via the `core_rpc_token` command.
- Stale-listener policy (#1130): if the core port is already occupied, probes whether the listener is an old OpenHuman core (terminate + respawn) or something foreign (surface the conflict). `OPENHUMAN_CORE_REUSE_EXISTING=1` opts back into attach-to-existing for debugging.
- Managed as Tauri state in `lib.rs` (`app.manage(core_handle)`).
diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjs
index 34ddb69901..b63b8a9862 100644
--- a/scripts/ci/self-hosted/lanes-plan.mjs
+++ b/scripts/ci/self-hosted/lanes-plan.mjs
@@ -364,7 +364,7 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {
when: rust,
run:
"cargo test --manifest-path Cargo.toml -p openhuman --no-default-features --lib --" +
- " core::all:: core::cli:: core::jsonrpc:: core::legacy_aliases:: core::runtime::" +
+ " core::all:: core::cli:: core::invoke:: core::session_expiry:: core::legacy_aliases:: core::runtime::" +
" agent::registry::agents::loader:: commands::ops::tests:: memory::people::contacts_gate_tests::" +
" openhuman::config:: openhuman::platform::socket::event_handlers:: tools::schemas:: tools::ops::tests::",
},