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: update source file references from old core paths to openhuman-rpc
Steven Enamakeld33e35f0fa58
diff --git a/.claude/agents/pr-manager-lite.md b/.claude/agents/pr-manager-lite.mdindex d95aa11e73..dddb21ec15 100644--- a/.claude/agents/pr-manager-lite.md+++ b/.claude/agents/pr-manager-lite.md@@ -80,7 +80,7 @@ Classify each comment:Also do a standards pass against `AGENTS.md` (`CLAUDE.md` is a symlink to it) on the diff:- New Rust functionality lives under `crates/openhuman-core/src/<domain>/`, not flat `crates/openhuman-core/src/*.rs` files or `crates/openhuman-core/src/core/`.-- Domain exposure via `schemas.rs` + registry — not ad-hoc branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-core/src/core/jsonrpc/`.+- Domain exposure via `schemas.rs` + registry — not ad-hoc branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-rpc/src/server/`.- No dynamic `import()` in production `app/src` code.- Frontend `VITE_*` reads go through `app/src/utils/config.ts`.- `crates/openhuman-app` is desktop-only.diff --git a/.claude/agents/pr-manager.md b/.claude/agents/pr-manager.mdindex 5054eee778..46228803ca 100644--- a/.claude/agents/pr-manager.md+++ b/.claude/agents/pr-manager.md@@ -79,7 +79,7 @@ Classify each comment:Also do a standards pass against `AGENTS.md` (`CLAUDE.md` is a symlink to it) on the full diff, as a safety net for anything reviewers missed:- New Rust functionality lives in a subdirectory under `crates/openhuman-core/src/<domain>/`, not flat `crates/openhuman-core/src/*.rs` files or `crates/openhuman-core/src/core/`.-- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `core/jsonrpc/`.+- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `openhuman-rpc/src/server/`.- No dynamic `import()` in production `app/src` code.- Frontend reads `VITE_*` via `app/src/utils/config.ts`, not `import.meta.env` directly.- `crates/openhuman-app` is desktop-only; no Android/iOS branches there.diff --git a/.claude/agents/pr-reviewer.md b/.claude/agents/pr-reviewer.mdindex c3bc8add00..66d65a2429 100644--- a/.claude/agents/pr-reviewer.md+++ b/.claude/agents/pr-reviewer.md@@ -48,7 +48,7 @@ Skipping this step produces shallow reviews that miss architectural/consistency**Project standards** (from `AGENTS.md`; `CLAUDE.md` is a symlink to it)- New Rust functionality lives in a subdirectory under `crates/openhuman-core/src/<domain>/`, not flat `crates/openhuman-core/src/*.rs` files or `crates/openhuman-core/src/core/`.-- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `core/jsonrpc/`.+- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `openhuman-rpc/src/server/`.- No dynamic `import()` in production `app/src` code.- Frontend reads `VITE_*` via `app/src/utils/config.ts`, not `import.meta.env` directly.- `crates/openhuman-app` is desktop-only; no Android/iOS branches there.diff --git a/AGENTS.md b/AGENTS.mdindex f6d413b1ad..3dc95136ef 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -86,7 +86,7 @@ DevTools client can attach to it. Run the same SPA in Chrome instead:finds the running desktop core, starts Vite, and prints`http://127.0.0.1:<core>/dev/connect?app=http://localhost:<vite>`. Open thatURL with the chrome-devtools MCP (`new_page` / `navigate_page`). The core's- dev-only `GET /dev/connect` (`crates/openhuman-core/src/core/dev_connect.rs`)+ dev-only `GET /dev/connect` (`crates/openhuman-rpc/src/server/dev_connect.rs`)redirects to Vite's `/__dev-connect` page with the RPC URL and bearer in theURL fragment. That page seeds them into `localStorage`, so the browser runs onthe desktop core with its signed-in user, and nothing is pasted. The route@@ -318,7 +318,7 @@ Additional rules:(`RpcRequest`, `RpcSuccess`, `RpcFailure`, `request_body`,`decode_response`), the params contract and its validation messages, thebrowser-origin allowlist, and the JSON-RPC HTTP client. The core's server- side (`core/jsonrpc/`) and every client use it; the core re-exports the crate as+ side (`openhuman-rpc/src/server/`) and every client use it; the core re-exports the crate as`crate::rpc` (`pub use openhuman_rpc as rpc;` in`crates/openhuman-core/src/lib.rs`), and `openhuman-app` and `openhuman-tui`depend on it directly. Keep it free of business logic and core dependenciesdiff --git a/app/src/hooks/useFlowChanged.ts b/app/src/hooks/useFlowChanged.tsindex 1cfa25a982..5e9c52155f 100644--- a/app/src/hooks/useFlowChanged.ts+++ b/app/src/hooks/useFlowChanged.ts@@ -8,7 +8,7 @@* silently working against (and later clobbering) stale state.** The backend publishes `DomainEvent::FlowChanged` on create/update/delete/- * enable; the core socket bridge (`crates/openhuman-core/src/core/socketio.rs`) re-emits it as both+ * enable; the core socket bridge (`crates/openhuman-rpc/src/server/socketio.rs`) re-emits it as both* `flow:changed` and `flow_changed` (colon + underscore aliases) with the* payload `{ flow_id, kind, actor }`.*diff --git a/app/src/hooks/useFlowRunFinished.ts b/app/src/hooks/useFlowRunFinished.tsindex ef0ffb6039..f5442f9444 100644--- a/app/src/hooks/useFlowRunFinished.ts+++ b/app/src/hooks/useFlowRunFinished.ts@@ -9,7 +9,7 @@** The backend publishes `DomainEvent::FlowRunFinished` right after* `flows::ops::finish_flow_run_row` persists the settled row; the core socket- * bridge (`crates/openhuman-core/src/core/socketio.rs`) re-emits it as both `flow:run_finished` and+ * bridge (`crates/openhuman-rpc/src/server/socketio.rs`) re-emits it as both `flow:run_finished` and* `flow_run_finished` (colon + underscore aliases) with the payload* `{ flow_id, run_id, status }`.*diff --git a/app/src/hooks/useFlowRunProgress.ts b/app/src/hooks/useFlowRunProgress.tsindex 1011c149aa..81360bc163 100644--- a/app/src/hooks/useFlowRunProgress.ts+++ b/app/src/hooks/useFlowRunProgress.ts@@ -7,7 +7,7 @@* nodes as they execute (n8n's signature running/success/error interaction).** The backend's `FlowRunObserver` publishes `DomainEvent::FlowRunProgress` on- * each finished step; the core socket bridge (`crates/openhuman-core/src/core/socketio.rs`) re-emits it+ * each finished step; the core socket bridge (`crates/openhuman-rpc/src/server/socketio.rs`) re-emits it* to the frontend as **both** `flow:run_progress` and `flow_run_progress`* (colon + underscore aliases, same as every other bridged event) with the* payload `{ run_id, node_id, status }`.diff --git a/app/src/hooks/useFlowRunStarted.ts b/app/src/hooks/useFlowRunStarted.tsindex 16899ac27d..b70c1dfa7a 100644--- a/app/src/hooks/useFlowRunStarted.ts+++ b/app/src/hooks/useFlowRunStarted.ts@@ -11,7 +11,7 @@** The backend publishes `DomainEvent::FlowRunStarted` right after* `flows::ops::start_flow_run_row` returns; the core socket bridge- * (`crates/openhuman-core/src/core/socketio.rs`) re-emits it as both `flow:run_started` and+ * (`crates/openhuman-rpc/src/server/socketio.rs`) re-emits it as both `flow:run_started` and* `flow_run_started` (colon + underscore aliases) with the payload* `{ flow_id, run_id }`.*diff --git a/app/src/overlay/OverlayApp.tsx b/app/src/overlay/OverlayApp.tsxindex d7daf51d0a..dab7e97c7e 100644--- a/app/src/overlay/OverlayApp.tsx+++ b/app/src/overlay/OverlayApp.tsx@@ -311,7 +311,7 @@ export default function OverlayApp() {});// Core emits each event under both colon and underscore forms- // (see `emit_with_aliases` in `crates/openhuman-core/src/core/socketio.rs`). Subscribe+ // (see `emit_with_aliases` in `crates/openhuman-rpc/src/server/socketio.rs`). Subscribe// only to the canonical colon-delimited form so each signal fires// the handler exactly once.socket.on('dictation:toggle', handleDictationToggle);diff --git a/app/src/services/chatService.ts b/app/src/services/chatService.tsindex 4958ccc0fb..1dc25186fa 100644--- a/app/src/services/chatService.ts+++ b/app/src/services/chatService.ts@@ -138,7 +138,7 @@ export interface ChatDoneEvent {timing?: TurnTimingWire | null;}-/** Mirrors the Rust `TurnTimingPayload` (`crates/openhuman-core/src/core/socketio.rs`). */+/** Mirrors the Rust `TurnTimingPayload` (`crates/openhuman-rpc/src/server/socketio.rs`). */export interface TurnTimingWire {first_token_ms?: number;first_tool_ms?: number;@@ -231,7 +231,7 @@ export interface ChatErrorEvent {round: number | null;/*** Present only when `error_type === 'guardrail'`. Mirrors the Rust- * `GuardrailPayload` (`crates/openhuman-core/src/core/socketio.rs`) carried+ * `GuardrailPayload` (`crates/openhuman-rpc/src/server/socketio.rs`) carried* on `chat_error` — the policy verdict that blocked the turn, with the* reasons the guardrail cited.*/@@ -247,7 +247,7 @@ export interface GuardrailReason {/*** The guardrail verdict carried on a `chat_error` whose `error_type` is* `"guardrail"`. Mirrors the Rust `GuardrailPayload`- * (`crates/openhuman-core/src/core/socketio.rs`).+ * (`crates/openhuman-rpc/src/server/socketio.rs`).*/export interface GuardrailPayload {verdict: string;@@ -603,7 +603,7 @@ export interface ChatSubagentDoneEvent {* `subagent_tool_call`, `subagent_tool_result`).** Matches the Rust `SubagentProgressDetail` struct in- * `crates/openhuman-core/src/core/socketio.rs` — every field is optional so older cores that+ * `crates/openhuman-rpc/src/server/socketio.rs` — every field is optional so older cores that* don't emit it stay parseable.*/export interface SubagentProgressDetail {@@ -649,7 +649,7 @@ export interface SubagentProgressDetail {* Provider-assigned id of the `spawn_subagent`/`spawn_async_subagent`/* `delegate_*` tool call that started this delegation* (`AgentProgress::SubagentSpawned::parent_call_id`, threaded onto every- * event in the `subagent_*` family — see `crates/openhuman-core/src/core/socketio.rs`).+ * event in the `subagent_*` family — see `crates/openhuman-rpc/src/server/socketio.rs`).* Lets the frontend attach the delegation's live activity to the EXACT* spawn tool-call part instead of guessing which running row started it.* Absent on cores that predate this field.@@ -1711,7 +1711,7 @@ export async function chatClearQueue(threadId: string): Promise<number | null> {}}-/** One run-queue item (`QueueItemPayload` in `core/socketio.rs`). */+/** One run-queue item (`QueueItemPayload` in `openhuman-rpc/src/server/socketio.rs`). */export interface QueueItemPayload {id: string;/** `steer` / `followup` / `collect`; absent when the core does not say. */@@ -1763,7 +1763,7 @@ export function subscribeQueueEvents(listeners: QueueEventListeners): () => void};}-/** One follow-up suggestion (`ChatSuggestion` in `core/socketio.rs`). */+/** One follow-up suggestion (`ChatSuggestion` in `openhuman-rpc/src/server/socketio.rs`). */export interface ChatSuggestionWire {/** The message sent when the chip is picked. */prompt: string;diff --git a/app/test/playwright/specs/assistant-ui-guardrail-notice.spec.ts b/app/test/playwright/specs/assistant-ui-guardrail-notice.spec.tsindex d204028366..4d7b7e1b1c 100644--- a/app/test/playwright/specs/assistant-ui-guardrail-notice.spec.ts+++ b/app/test/playwright/specs/assistant-ui-guardrail-notice.spec.ts@@ -14,7 +14,7 @@* 2. The only writer of that metadata is `ChatRuntimeProvider`'s* `chatErrorExtraMetadata`, fed by a **`chat_error` socket event**.* 3. The only emitter of a `chat_error` carrying a guardrail payload is- * `core/socketio.rs:886`, inside the `socket.on("chat", …)` handler.+ * `openhuman-rpc/src/server/socketio.rs:886`, inside the `socket.on("chat", …)` handler.* 4. The renderer never emits a socket `chat` event. Every turn is sent over* RPC — `chatService.sendChatMessage` calls `openhuman.channel_web_chat`* (`chatService.ts:1631`), and that file's own header says so.diff --git a/app/vite.config.ts b/app/vite.config.tsindex d2c1859ffd..d3fac09960 100644--- a/app/vite.config.ts+++ b/app/vite.config.ts@@ -184,7 +184,7 @@ function devConnectPlugin(): PluginOption {try {var url = ${json(rpcUrl)};var token = ${json(token)};- // A core's GET /dev/connect (crates/openhuman-core/src/core/dev_connect.rs)+ // A core's GET /dev/connect (crates/openhuman-rpc/src/server/dev_connect.rs)// lands here with its URL + bearer in the fragment, which never reaches// a server. That wins over the dev server's own env so a browser can// attach to an already-running desktop core (and its session). Only adiff --git a/crates/openhuman-app/src/core_process_tests.rs b/crates/openhuman-app/src/core_process_tests.rsindex 77a2174dc0..0d26d84238 100644--- a/crates/openhuman-app/src/core_process_tests.rs+++ b/crates/openhuman-app/src/core_process_tests.rs@@ -266,7 +266,7 @@ fn ensure_running_reuses_unknown_listener_when_override_set() {#[test]fn is_openhuman_root_body_matches_canonical_root_response() {- // Mirrors the JSON shape produced by `core/jsonrpc/http/mod.rs::root_handler`.+ // Mirrors the JSON shape produced by `openhuman-rpc/src/server/http/mod.rs::root_handler`.let body = r#"{"name": "openhuman","ok": true,diff --git a/crates/openhuman-cli/src/main.rs b/crates/openhuman-cli/src/main.rsindex 5c41692cf3..4d62d6776f 100644--- a/crates/openhuman-cli/src/main.rs+++ b/crates/openhuman-cli/src/main.rs@@ -171,7 +171,7 @@ fn main() {// lives at the call sites (`openhuman::inference::provider::ops::api_error`// publishes a SessionExpired event_bus signal and short-circuits;// the rpc dispatcher's `is_session_expired_error` skip-path in- // `crates/openhuman-core/src/core/jsonrpc/http/rpc_handler.rs` redirects to a tracing::info). This+ // `crates/openhuman-rpc/src/server/http/rpc_handler.rs` redirects to a tracing::info). This// filter catches any future call site that re-emits the same// shape — keeping OPENHUMAN-TAURI-25 / -1Q / -27 / -1G off// Sentry permanently (~185 events/day combined).diff --git a/crates/openhuman-core/src/agent/experience/README.md b/crates/openhuman-core/src/agent/experience/README.mdindex 36908b8e3e..d4b9800ca0 100644--- a/crates/openhuman-core/src/agent/experience/README.md+++ b/crates/openhuman-core/src/agent/experience/README.md@@ -62,7 +62,7 @@ Records are stored through the `Memory` trait (no dedicated DB), served by `Driv- `crate::memory`: `Memory` trait, `MemoryCategory`, `memory::binding::{for_config, for_subtree}` (driver binding behind `DriverMemory`), `memory::api::{provider, recall, types, health}` (the provider contract `DriverMemory` adapts), `memory::safety::sanitize_text` (store-time scrub), `memory::source_scope::as_bus_scope` (explicit recall scope), `memory::preferences::recall_by_vector_over`.- `crate::config`: `Config::load_or_init` for `workspace_dir` and `subsystems.memory` when the RPC handlers bind a store.- `crate::core::all`: `ControllerFuture`, `RegisteredController` for RPC registration.-- `crate::core`: `ControllerSchema`, `FieldSchema`, `TypeSchema` (schema types); `crate::rpc::Outcome`.+- `crate::core`: `ControllerSchema`, `FieldSchema`, `TypeSchema` (schema types); `crate::core::Outcome`.- `crate::memory::tool_memory::test_helpers::MockMemory` and `crate::memory::guard::test_support::RecordingProvider`: tests only.## Used bydiff --git a/crates/openhuman-core/src/agent/learning/README.md b/crates/openhuman-core/src/agent/learning/README.mdindex 4f14922341..1b89b852b3 100644--- a/crates/openhuman-core/src/agent/learning/README.md+++ b/crates/openhuman-core/src/agent/learning/README.md@@ -113,7 +113,7 @@ These are subscriber registrations rather than a single `bus.rs`; subscriptions- `crates/openhuman-core/src/core/all.rs`: registers the `learning.*` controllers + schemas.- `crates/openhuman-core/src/agent/session_host/builder/factory.rs` (registers `LearnedContextSection` / `UserProfileSection` and the `ReflectionHook` when `config.learning.enabled`), `builder/helpers.rs` (`MemoryAccessSection` / `MemoryWriteSection` gated by `any_tool_offered`), `turn/context.rs` (reads the `learning_observations` / `learning_patterns` / reflections namespaces into `PromptContext.learned`), `turn/session_io/background_tasks.rs` (`transcript_ingest::ingest_transcript_path`), and `agent/tinyagents/host/learning_sink.rs` (`ToolTrackerHook` + `UserProfileHook` post-turn fan-out).-- `learning::startup::register_learning_subscribers` is the entry point that wires the Phase 2/3/4 subscribers; it is invoked from `crates/openhuman-core/src/core/jsonrpc.rs` (`register_domain_subscribers`, inside the `plan.agent` block, meaning whenever the `DomainSet` allows `DomainGroup::Agent`, guarded by `learning_first_time()`), not from the skippable `channels::runtime::startup` path. See the "why" note in `startup.rs` (#5003).+- `learning::startup::register_learning_subscribers` is the entry point that wires the Phase 2/3/4 subscribers; it is invoked from `crates/openhuman-rpc/src/server/` (`register_domain_subscribers`, inside the `plan.agent` block, meaning whenever the `DomainSet` allows `DomainGroup::Agent`, guarded by `learning_first_time()`), not from the skippable `channels::runtime::startup` path. See the "why" note in `startup.rs` (#5003).- `crates/openhuman-core/src/modules/memory/people_chunks_retrieval.rs` (`impl MemoryProfile for ModuleMemoryProvider`, the driver `FacetCache` reaches through the guard), `integrations/composio/profile_md.rs` (`replace_managed_block`, used by `profile_md_renderer.rs`), `tools/impl/system/tool_stats.rs`, `tools/schemas.rs`: consume facet/learning types.## Notes / gotchasdiff --git a/crates/openhuman-core/src/api/rest.rs b/crates/openhuman-core/src/api/rest.rsindex 7804307bed..727d1410e1 100644--- a/crates/openhuman-core/src/api/rest.rs+++ b/crates/openhuman-core/src/api/rest.rs@@ -47,7 +47,7 @@ pub enum BackendApiError {/// `401 Unauthorized` — a library-mode runtime's credential, not a user/// session. Must stay distinct from [`Self::Unauthorized`]:/// `flatten_authed_error` maps that variant onto the `SESSION_EXPIRED`- /// sentinel, which `core/jsonrpc/invoke.rs` treats as "clear the app session and+ /// sentinel, which `core/invoke.rs` treats as "clear the app session and/// sign out". A rejected API key on a runtime that never had a session/// would otherwise trigger that same session-expiry recovery, clearing an/// app session that was never the problem and leaving the rejected key@@ -127,7 +127,7 @@ pub enum BackendApiError {/// rest of the authed-endpoint family (#3297).////// Mapping `Unauthorized` onto the existing `SESSION_EXPIRED` sentinel makes the-/// dispatcher (`core/jsonrpc/classify.rs`) classify it as session expiry: it skips the+/// dispatcher (`openhuman-rpc/src/server/classify.rs`) classify it as session expiry: it skips the/// Sentry report AND publishes `DomainEvent::SessionExpired` so the auth domain/// drives re-sign-in. This keys off the typed downcast — not the Display/// wording — so it stays correct if the `#[error(...)]` text changes, consistent@@ -141,7 +141,7 @@ pub fn flatten_authed_error(err: anyhow::Error) -> String {}// Deliberately NOT the `SESSION_EXPIRED` sentinel: this runtime// authenticates with an API key, not a session, so there is no- // session to expire and `core/jsonrpc/invoke.rs`'s `SessionExpired` publish+ // session to expire and `core/invoke.rs`'s `SessionExpired` publish// (clear the session, prompt re-sign-in) would be the wrong// recovery. See `BackendApiError::ApiKeyRejected`.Some(BackendApiError::ApiKeyRejected { method, path }) => {diff --git a/crates/openhuman-core/src/api/rest_tests.rs b/crates/openhuman-core/src/api/rest_tests.rsindex 896e5880b4..cf95f3230f 100644--- a/crates/openhuman-core/src/api/rest_tests.rs+++ b/crates/openhuman-core/src/api/rest_tests.rs@@ -688,7 +688,7 @@ async fn authed_json_surfaces_unauthorized_on_401() {/// Regression: a 401 for an API-key-authenticated request must classify as/// `BackendApiError::ApiKeyRejected`, not `Unauthorized`. `Unauthorized` is/// what `flatten_authed_error` maps onto the `SESSION_EXPIRED` sentinel, and-/// `core/jsonrpc/classify.rs`'s `is_session_expired_error` treats that sentinel as+/// `openhuman-rpc/src/server/classify.rs`'s `is_session_expired_error` treats that sentinel as/// "clear the app session and sign out" — the wrong recovery for a/// library-mode runtime that authenticates with an API key and has no/// session at all.@@ -726,7 +726,7 @@ async fn authed_json_surfaces_api_key_rejected_not_unauthorized_on_401() {assert_eq!(path, "/teams/me/usage");// The flattened message must NOT carry the `SESSION_EXPIRED` sentinel —- // that would make `core/jsonrpc/classify.rs::is_session_expired_error` clear an+ // that would make `openhuman-rpc/src/server/classify.rs::is_session_expired_error` clear an// app session that was never the problem.let flattened = flatten_authed_error(err);assert!(diff --git a/crates/openhuman-core/src/channels/README.md b/crates/openhuman-core/src/channels/README.mdindex 9ac603c474..3c821ded72 100644--- a/crates/openhuman-core/src/channels/README.md+++ b/crates/openhuman-core/src/channels/README.md@@ -48,7 +48,7 @@ Flat files: `bus.rs` (`ChannelInboundSubscriber`, handles `DomainEvent::ChannelI- `crates/openhuman-core/src/core/all.rs`: registers `controllers::all_channels_registered_controllers()` under the `channels` feature gate.- `crates/openhuman-core/src/core/runtime/services.rs`: `spawn_channels_service` calls `channels::start_channels(config)` unless `OPENHUMAN_DISABLE_CHANNEL_LISTENERS` is set or `has_listening_integrations()` is false.-- `crates/openhuman-core/src/core/jsonrpc.rs`: `bootstrap_core_runtime` subscribes `bus::ChannelInboundSubscriber` and calls `proactive::register_web_only_proactive_subscriber()`.+- `crates/openhuman-rpc/src/server/`: `bootstrap_core_runtime` subscribes `bus::ChannelInboundSubscriber` and calls `proactive::register_web_only_proactive_subscriber()`.- `crates/openhuman-core/src/agent/session_host/`: the interactive loop drives the ungated `CliChannel`.- `crates/openhuman-core/src/cron/bus.rs`: `CronDeliverySubscriber` is handed the started channel map by `runtime/startup.rs`; it names channels only through `tinychannels_bus`.diff --git a/crates/openhuman-core/src/config/migration_helpers/README.md b/crates/openhuman-core/src/config/migration_helpers/README.mdindex 0841926467..3d32b8a09b 100644--- a/crates/openhuman-core/src/config/migration_helpers/README.md+++ b/crates/openhuman-core/src/config/migration_helpers/README.md@@ -64,7 +64,7 @@ No own store. It writes imported entries through the **target memory backend** o- `crate::memory` (`Memory`, `MemoryCategory`): target backend trait plus the category enum entries are mapped into.- `crate::memory::store`: `create_memory_for_migration` constructs the target memory backend.- `crate::core::all` (`ControllerFuture`, `RegisteredController`) and `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller registry/schema types.-- `crate::rpc::Outcome`: RPC response envelope.+- `crate::core::Outcome`: RPC response envelope.- External crates: `rusqlite` (read OpenClaw `brain.db`), `directories::UserDirs` (home dir), `anyhow`, `serde`/`serde_json`.## Used bydiff --git a/crates/openhuman-core/src/config/workspace/README.md b/crates/openhuman-core/src/config/workspace/README.mdindex df35539bd1..8124b41e49 100644--- a/crates/openhuman-core/src/config/workspace/README.md+++ b/crates/openhuman-core/src/config/workspace/README.md@@ -59,7 +59,7 @@ The editable surface is restricted to the `BOOTSTRAP_FILES` allowlist (`SOUL.md`- `crate::skills::init_skills_dir`: seeds the `skills/` directory README during `init_workspace`.- `crate::subconscious::heartbeat::engine::HeartbeatEngine::ensure_heartbeat_file`: ensures `HEARTBEAT.md` during `init_workspace`.- `crate::core::all` (`ControllerFuture`, `RegisteredController`) and `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller registry types.-- `crate::rpc::Outcome`: uniform RPC return type.+- `crate::core::Outcome`: uniform RPC return type.- Bundled prompt assets via `include_str!("../../agent/prompts/SOUL.md" | "IDENTITY.md")`.- `tinytools` (`PermissionLevel`, `Tool`, `ToolResult`) for the agent tools in `tools.rs`.- `rusqlite` for `state.rs`'s watcher-state database.diff --git a/crates/openhuman-core/src/core/README.md b/crates/openhuman-core/src/core/README.mdindex 64f9b790ca..da8e3df244 100644--- a/crates/openhuman-core/src/core/README.md+++ b/crates/openhuman-core/src/core/README.md@@ -213,7 +213,7 @@ expected to reuse the same registry rather than invent their own.## `crate::rpc``crate::rpc` is `pub use openhuman_rpc as rpc;` (see `lib.rs`), so-`crate::rpc::Outcome`, `StructuredRpcError`, and `apply_log_envelope` are+`crate::core::Outcome`, `StructuredRpcError`, and `apply_log_envelope` arethe same types `crates/openhuman-rpc` exposes to `openhuman-app` and`openhuman-tui`. There is no separate RPC contract layer under `core/`.diff --git a/crates/openhuman-core/src/core/event_bind_tokens.rs b/crates/openhuman-core/src/core/event_bind_tokens.rsindex becd83cb7b..dc1982b915 100644--- a/crates/openhuman-core/src/core/event_bind_tokens.rs+++ b/crates/openhuman-core/src/core/event_bind_tokens.rs@@ -18,7 +18,7 @@//!//! This module owns only the in-memory store; the RPC handler that mints//! tokens lives in `crates/openhuman-core/src/core/dispatch.rs` (the `core.*` namespace),-//! and the `/events` handler in `crates/openhuman-core/src/core/jsonrpc/http/events.rs` consumes them.+//! and the `/events` handler in `crates/openhuman-rpc/src/server/http/events.rs` consumes them.use std::collections::HashMap;use std::sync::RwLock;diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rsindex 06becf5a1b..dfa181c7c6 100644--- a/crates/openhuman-core/src/core/observability.rs+++ b/crates/openhuman-core/src/core/observability.rs@@ -372,7 +372,7 @@ pub enum ExpectedErrorKind {/// succeed until the user creates one — so this is user-state, not a/// defect.///- /// `core/jsonrpc/http/rpc_handler.rs` already demoted the *bare* message via+ /// `openhuman-rpc/src/server/http/rpc_handler.rs` already demoted the *bare* message via/// `is_wallet_not_configured_error`, but that predicate is exact equality,/// so it stops matching the moment any caller adds context — and callers/// do: `format!("{context}: {e}")` appears ~800 times in `src/`. One such@@ -2146,7 +2146,7 @@ fn report_expected_message(kind: ExpectedErrorKind, message: &str, domain: &str,// is the sentinel itself, and it is a constant. `domain` and// `operation` carry the correlation, which is what a breadcrumb is// for. Same reasoning as the param-validation skip in- // `core/jsonrpc/http/rpc_handler.rs`, which redacts because its messages embed+ // `openhuman-rpc/src/server/http/rpc_handler.rs`, which redacts because its messages embed// caller-supplied param names.tracing::info!(domain = domain,diff --git a/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rs b/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rsindex 984e6dff48..bbbd997de3 100644--- a/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rs+++ b/crates/openhuman-core/src/core/observability_error_classification_provider_tests.rs@@ -258,7 +258,7 @@ fn classifies_vault_create_root_path_not_a_directory_as_filesystem_user_path_inv);// The same body wrapped by the JSON-RPC dispatcher's `display_message`- // prefix (`rpc.invoke_method` re-emit shape from `crates/openhuman-core/src/core/jsonrpc/http/rpc_handler.rs`).+ // prefix (`rpc.invoke_method` re-emit shape from `crates/openhuman-rpc/src/server/http/rpc_handler.rs`).// Must still classify so the dispatch-site re-report doesn't escape// the matcher even if a future caller layers more context.assert_eq!(diff --git a/crates/openhuman-core/src/core/runtime/services.rs b/crates/openhuman-core/src/core/runtime/services.rsindex 72007d0158..aaaf6f9006 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-core/src/core/jsonrpc.rs`).+//! used to live in `run_server_inner` (then in `crates/openhuman-rpc/src/server/`).//! 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.rsindex be2ed2fc3d..40cd451ff8 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 `core/jsonrpc/` stays transport-only.+//! so `openhuman-rpc/src/server/` stays transport-only.use std::future::Future;use std::pin::Pin;diff --git a/crates/openhuman-core/src/core/structured_error.rs b/crates/openhuman-core/src/core/structured_error.rsindex c14b70411d..77c9762b37 100644--- a/crates/openhuman-core/src/core/structured_error.rs+++ b/crates/openhuman-core/src/core/structured_error.rs@@ -6,7 +6,7 @@//! the existing `Result<Value, String>` channel that controller handlers//! already use, without changing every handler signature.//!-//! The JSON-RPC transport layer (`crates/openhuman-core/src/core/jsonrpc/http/rpc_handler.rs`) decodes the envelope+//! The JSON-RPC transport layer (`crates/openhuman-rpc/src/server/http/rpc_handler.rs`) decodes the envelope//! transparently — it has zero knowledge of which domain produced the error,//! and never branches on the RPC method name. New domains that want//! structured RPC errors just emit a [`StructuredRpcError`] at their@@ -31,7 +31,7 @@ pub const STRUCTURED_RPC_ERROR_SENTINEL: &str = "__OPENHUMAN_STRUCTURED_RPC_ERRO////// The transport layer decodes this without inspecting the RPC method name/// or the message contents, so new domains can adopt it without touching-/// `crates/openhuman-core/src/core/jsonrpc/http/rpc_handler.rs`.+/// `crates/openhuman-rpc/src/server/http/rpc_handler.rs`.#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]pub struct StructuredRpcError {/// Human-readable error text for the JSON-RPC `error.message` field.diff --git a/crates/openhuman-core/src/core/types.rs b/crates/openhuman-core/src/core/types.rsindex 518e60c392..7584fe9782 100644--- a/crates/openhuman-core/src/core/types.rs+++ b/crates/openhuman-core/src/core/types.rs@@ -22,7 +22,7 @@ pub struct CommandResponse<T> {/// Success payload from a core RPC handler before JSON-RPC wrapping.////// This internal type allows handlers to return a generic JSON value along-/// with optional logs. It is transformed into a [`crate::rpc::RpcSuccess`] or a+/// with optional logs. It is transformed into a [`crate::core::RpcSuccess`] or a/// combined object by [`invocation_to_rpc_json`].#[derive(Debug, Clone)]pub struct InvocationResult {diff --git a/crates/openhuman-core/src/desktop/app_state/README.md b/crates/openhuman-core/src/desktop/app_state/README.mdindex a3f896d4a6..86bcc25cf2 100644--- a/crates/openhuman-core/src/desktop/app_state/README.md+++ b/crates/openhuman-core/src/desktop/app_state/README.md@@ -41,7 +41,7 @@ The signed-in identity for prompts and Sentry is `security::credentials::identit## Called by- `crates/openhuman-core/src/core/all.rs`: registers `all_app_state_registered_controllers()`; the shell reaches them through `coreRpcClient` → `relay_http_rpc`.-- `crates/openhuman-core/src/core/jsonrpc.rs`: `latch_from_config` at runtime bootstrap.+- `crates/openhuman-rpc/src/server/`: `latch_from_config` at runtime bootstrap.- `crates/openhuman-core/src/agent/session_host/builder/factory.rs`: `load_stored_app_state` to read `onboarding_tasks.enabled_tools` for tool filtering.- `crates/openhuman-core/src/security/keyring_consent/ops.rs`: persists the consent choice through `update_local_state`.diff --git a/crates/openhuman-core/src/desktop/dashboard/README.md b/crates/openhuman-core/src/desktop/dashboard/README.mdindex b92e7d02e1..cb4aa20ae2 100644--- a/crates/openhuman-core/src/desktop/dashboard/README.md+++ b/crates/openhuman-core/src/desktop/dashboard/README.md@@ -44,7 +44,7 @@ None. The module reads from in-memory `Config`; it stores no state.- `crate::config` (`Config`, `config::rpc::load_config_with_timeout`), source of the model registry and `dashboard.model_health` thresholds. `DashboardConfig` / `ModelHealthConfig` are defined in `crates/openhuman-core/src/config/schema/dashboard.rs`.- `crate::core::all` (`ControllerFuture`, `RegisteredController`) and `crate::core` (`ControllerSchema`, `FieldSchema`, `TypeSchema`), controller registry types.-- `crate::rpc::Outcome`: standard RPC result wrapper.+- `crate::core::Outcome`: standard RPC result wrapper.- `serde` / `serde_json`: wire (de)serialization and handler params.## Used bydiff --git a/crates/openhuman-core/src/desktop/notifications/README.md b/crates/openhuman-core/src/desktop/notifications/README.mdindex db98833556..ca514267bd 100644--- a/crates/openhuman-core/src/desktop/notifications/README.md+++ b/crates/openhuman-core/src/desktop/notifications/README.md@@ -91,14 +91,14 @@ SQLite DB at `{workspace_dir}/notifications/notifications.db`, opened per-call v- `crate::core::all` (`ControllerFuture`, `RegisteredController`) and `crate::core` (`ControllerSchema`, `FieldSchema`, `TypeSchema`), controller registry contract.- `crate::config`: `Config` (workspace dir for the DB path), `config::rpc::load_config_with_timeout` in handlers, `active_workspace_snapshot` / `workspace_handle` for the workspace gate.- `crate::agent::triage`: `run_triage`, `apply_decision`, `TriageOutcome`, `TriggerEnvelope`, `TriggerSource`, `TriageAction` for the background scoring/routing pipeline; `crate::agent::turn_origin::with_origin` scopes the routing turn.-- `crate::rpc::Outcome`: RPC response shaping.+- `crate::core::Outcome`: RPC response shaping.- External crates: `rusqlite` (store), `chrono`, `uuid`, `serde_json`, `tokio`, `once_cell`, `async_trait`.## Used by- `crates/openhuman-core/src/core/all.rs`: registers the controllers/schemas into the RPC registry.-- `crates/openhuman-core/src/core/jsonrpc.rs`: calls `register_notification_bridge_subscriber(config)` at startup when the Desktop domain group is enabled.-- `crates/openhuman-core/src/core/socketio.rs`: calls `subscribe_core_notifications()` to forward events to web clients.+- `crates/openhuman-rpc/src/server/`: calls `register_notification_bridge_subscriber(config)` at startup when the Desktop domain group is enabled.+- `crates/openhuman-rpc/src/server/socketio.rs`: calls `subscribe_core_notifications()` to forward events to web clients.- `crates/openhuman-core/src/cron/scheduler/delivery.rs`: writes cron-triggered notifications through `notifications::store` directly; `cron/scheduler_tests*.rs` list them back with `store::list`.- `crates/openhuman-core/src/flows/ops/execution.rs` and `crates/openhuman-core/src/security/approval/gate.rs`: call `publish_core_notification` directly to surface flow and approval events.diff --git a/crates/openhuman-core/src/desktop/notifications/bus.rs b/crates/openhuman-core/src/desktop/notifications/bus.rsindex 841fa7f6f3..4e165a0a06 100644--- a/crates/openhuman-core/src/desktop/notifications/bus.rs+++ b/crates/openhuman-core/src/desktop/notifications/bus.rs@@ -5,7 +5,7 @@//! plus a [`EventHandler`] implementation that translates relevant//! [`DomainEvent`] variants into [`CoreNotificationEvent`] payloads.//!-//! The Socket.IO bridge in `core::socketio::spawn_web_channel_bridge`+//! The Socket.IO bridge in `openhuman_rpc::server::socketio::spawn_web_channel_bridge`//! subscribes to this bus and forwards every event to all connected clients//! as `core_notification` / `core:notification` Socket.IO messages.diff --git a/crates/openhuman-core/src/desktop/overlay/README.md b/crates/openhuman-core/src/desktop/overlay/README.mdindex 2addd364a8..64fedcfb06 100644--- a/crates/openhuman-core/src/desktop/overlay/README.md+++ b/crates/openhuman-core/src/desktop/overlay/README.md@@ -1,6 +1,6 @@# overlay-Signals pushed from the core to the desktop **overlay surfaces**, separate WebViews (`app/src/overlay/OverlayApp.tsx` and the macOS notch pill `app/src/notch/NotchApp.tsx`, hosted by `crates/openhuman-app/src/notch_window.rs`) that render short, non-focus-stealing messages over the desktop. The standalone `overlay` window is currently disabled in `crates/openhuman-app/tauri.conf.json`; the notch is the live consumer. Because these surfaces run in their own JS runtime they cannot share Redux state with the main window; each subscribes to its own Socket.IO connection and reacts to events the core broadcasts. This module owns a single fire-and-forget broadcast bus for **attention** events; the Socket.IO transport bridge (`crates/openhuman-core/src/core/socketio.rs`) subscribes and forwards them. It is deliberately light: export-focused, one broadcast channel, no persistence and no RPC.+Signals pushed from the core to the desktop **overlay surfaces**, separate WebViews (`app/src/overlay/OverlayApp.tsx` and the macOS notch pill `app/src/notch/NotchApp.tsx`, hosted by `crates/openhuman-app/src/notch_window.rs`) that render short, non-focus-stealing messages over the desktop. The standalone `overlay` window is currently disabled in `crates/openhuman-app/tauri.conf.json`; the notch is the live consumer. Because these surfaces run in their own JS runtime they cannot share Redux state with the main window; each subscribes to its own Socket.IO connection and reacts to events the core broadcasts. This module owns a single fire-and-forget broadcast bus for **attention** events; the Socket.IO transport bridge (`crates/openhuman-rpc/src/server/socketio.rs`) subscribes and forwards them. It is deliberately light: export-focused, one broadcast channel, no persistence and no RPC.## Responsibilities@@ -26,7 +26,7 @@ Signals pushed from the core to the desktop **overlay surfaces**, separate WebVi## Events-Not a `DomainEvent` / bus (`crates/openhuman-core/src/core/bus.rs`, `crates/openhuman-core/src/core/events.rs`) participant. It runs its own standalone `tokio::sync::broadcast` channel. The Socket.IO bridge in `crates/openhuman-core/src/core/socketio.rs` (`spawn_web_channel_bridge`, task #3) subscribes via `subscribe_attention_events()` and emits each event to the overlay socket as both `overlay:attention` and `overlay_attention`; it logs and continues on `Lagged` and breaks on `Closed`.+Not a `DomainEvent` / bus (`crates/openhuman-core/src/core/bus.rs`, `crates/openhuman-core/src/core/events.rs`) participant. It runs its own standalone `tokio::sync::broadcast` channel. The Socket.IO bridge in `crates/openhuman-rpc/src/server/socketio.rs` (`spawn_web_channel_bridge`, task #3) subscribes via `subscribe_attention_events()` and emits each event to the overlay socket as both `overlay:attention` and `overlay_attention`; it logs and continues on `Lagged` and breaks on `Closed`.## Persistence@@ -38,7 +38,7 @@ None. State is purely an in-memory broadcast channel; events not consumed when p## Used by-- `crates/openhuman-core/src/core/socketio.rs`: subscribes to the bus and forwards events to the overlay WebView over Socket.IO.+- `crates/openhuman-rpc/src/server/socketio.rs`: subscribes to the bus and forwards events to the overlay WebView over Socket.IO.- `crates/openhuman-core/src/voice/always_on/processor.rs`: `notch_status` publishes "Listening" / "Processing" status messages (`source: "voice"`, with a TTL) that the notch maps to icons. The only in-tree publisher today.- `crates/openhuman-core/src/desktop/notifications/bus.rs`: references this module's bus only as a documented pattern to mirror (no code dependency).diff --git a/crates/openhuman-core/src/desktop/overlay/bus.rs b/crates/openhuman-core/src/desktop/overlay/bus.rsindex 753d33bf7d..b069c766e3 100644--- a/crates/openhuman-core/src/desktop/overlay/bus.rs+++ b/crates/openhuman-core/src/desktop/overlay/bus.rs@@ -3,7 +3,7 @@//! Mirrors the pattern used by `voice::dictation_listener`: a single//! `tokio::sync::broadcast` channel wrapped in a `Lazy` static so any//! module in the core can publish without threading a sender around.-//! The Socket.IO bridge in `core::socketio::spawn_web_channel_bridge`+//! The Socket.IO bridge in `openhuman_rpc::server::socketio::spawn_web_channel_bridge`//! subscribes here and forwards every event to the overlay window as//! an `overlay:attention` Socket.IO message.diff --git a/crates/openhuman-core/src/desktop/overlay/mod.rs b/crates/openhuman-core/src/desktop/overlay/mod.rsindex 54385cfe7a..669e7c3526 100644--- a/crates/openhuman-core/src/desktop/overlay/mod.rs+++ b/crates/openhuman-core/src/desktop/overlay/mod.rs@@ -17,7 +17,7 @@//! broadcast to the overlay window as `overlay:attention`.//!//! Keep this module light: it is export-focused and owns one broadcast-//! bus. The Socket.IO bridge lives in `crates/openhuman-core/src/core/socketio.rs`.+//! bus. The Socket.IO bridge lives in `crates/openhuman-rpc/src/server/socketio.rs`.pub mod bus;pub mod types;diff --git a/crates/openhuman-core/src/desktop/provider_surfaces/README.md b/crates/openhuman-core/src/desktop/provider_surfaces/README.mdindex f3434fa3db..080da9a6bd 100644--- a/crates/openhuman-core/src/desktop/provider_surfaces/README.md+++ b/crates/openhuman-core/src/desktop/provider_surfaces/README.md@@ -55,7 +55,7 @@ In-memory only. State lives in a process-global `RESPOND_QUEUE` (`static OnceLoc## Dependencies- `crate::memory`: `ApiEnvelope`, `ApiMeta`, `EmptyRequest` (response envelope shape + empty-request type).-- `crate::rpc::Outcome`: RPC return contract.+- `crate::core::Outcome`: RPC return contract.- `crate::core::all`: `RegisteredController`, `ControllerFuture` (controller registry wiring).- `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller schema types.- External crates: `serde` / `serde_json`, `uuid` (request ids), `tracing` (debug logging with `[provider-surfaces]` prefix).diff --git a/crates/openhuman-core/src/flows/README.md b/crates/openhuman-core/src/flows/README.mdindex f32f59a545..8b40796162 100644--- a/crates/openhuman-core/src/flows/README.md+++ b/crates/openhuman-core/src/flows/README.md@@ -60,7 +60,7 @@ from always-compiled code.## Called by- `crates/openhuman-core/src/core/all.rs`: registers `all_flows_registered_controllers()` under `#[cfg(feature = "flows")]`.-- `crates/openhuman-core/src/core/jsonrpc.rs`: constructs and subscribes `FlowTriggerSubscriber`, `FlowRunDigestSubscriber`, and `DedupCommitSubscriber` at startup.+- `crates/openhuman-rpc/src/server/`: constructs and subscribes `FlowTriggerSubscriber`, `FlowRunDigestSubscriber`, and `DedupCommitSubscriber` at startup.- `crates/openhuman-core/src/tools/ops.rs`: pushes all 27 flows tools onto the agent tool list (`tools/mod.rs` re-exports the four tool modules).- `crates/openhuman-core/src/agent/registry/agents/loader.rs`: registers `workflow_builder` and `flow_discovery` as built-in archetypes.- `crates/openhuman-core/src/agent/session_host/` (`builder/factory.rs`, `turn/tools.rs`), extends the skill catalogue with `catalogue::flow_entries`.diff --git a/crates/openhuman-core/src/http_host/README.md b/crates/openhuman-core/src/http_host/README.mdindex eeff580cde..3314fbc2e0 100644--- a/crates/openhuman-core/src/http_host/README.md+++ b/crates/openhuman-core/src/http_host/README.md@@ -57,7 +57,7 @@ None on disk. Running servers are held in a process-global `HostedDirRegistry` (- `crate::core::shutdown`: `register` a one-time hook so all hosted servers stop when the core shuts down (`ops.rs`).- `crate::core::all`: `ControllerFuture`, `RegisteredController` for controller registration (`schemas.rs`).- `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller schema types (`schemas.rs`).-- `crate::rpc::Outcome`: RPC response envelope (`rpc.rs`); `crate::rpc` is the `openhuman-rpc` crate re-exported from `crates/openhuman-core/src/lib.rs`.+- `crate::core::Outcome`: RPC response envelope (`rpc.rs`); `crate::rpc` is the `openhuman-rpc` crate re-exported from `crates/openhuman-core/src/lib.rs`.- External crates: `axum` (HTTP server/router), `tokio` (`TcpListener`, tasks), `tokio_util` (`CancellationToken`, `ReaderStream`), `uuid`, `base64`, `rand`, `urlencoding`, `serde`/`serde_json`.## Used bydiff --git a/crates/openhuman-core/src/inference/README.md b/crates/openhuman-core/src/inference/README.mdindex 16aa3ccf92..50754979c0 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-core/src/core/jsonrpc.rs` (`/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/` (`/v1/chat/completions`, `/v1/models`), accepting either the core bearer or a stable external API key.## Eventsdiff --git a/crates/openhuman-core/src/inference/http/mod.rs b/crates/openhuman-core/src/inference/http/mod.rsindex f69fc83eb0..f3be178fd8 100644--- a/crates/openhuman-core/src/inference/http/mod.rs+++ b/crates/openhuman-core/src/inference/http/mod.rs@@ -2,7 +2,7 @@//!//! ## Mounting//!-//! The router is mounted by `crates/openhuman-core/src/core/jsonrpc/http/mod.rs`:+//! The router is mounted by `crates/openhuman-rpc/src/server/http/mod.rs`://! ```ignore//! .nest("/v1", crate::inference::http::router())//! ```diff --git a/crates/openhuman-core/src/inference/http/server.rs b/crates/openhuman-core/src/inference/http/server.rsindex 058f306ca1..554b632f69 100644--- a/crates/openhuman-core/src/inference/http/server.rs+++ b/crates/openhuman-core/src/inference/http/server.rs@@ -3,7 +3,7 @@//! ## Mounting//!//! The router returned by [`router()`] is merged into the core axum server-//! in `crates/openhuman-core/src/core/jsonrpc/http/mod.rs` via `.nest("/v1", inference::http::router())`.+//! in `crates/openhuman-rpc/src/server/http/mod.rs` via `.nest("/v1", inference::http::router())`.//! It reuses the same bearer-token auth middleware that guards `/rpc`.//!//! ## Authenticationdiff --git a/crates/openhuman-core/src/integrations/composio/README.md b/crates/openhuman-core/src/integrations/composio/README.mdindex 08194f9d6d..b851c02268 100644--- a/crates/openhuman-core/src/integrations/composio/README.md+++ b/crates/openhuman-core/src/integrations/composio/README.md@@ -146,7 +146,7 @@ From `tools.rs` (`all_composio_agent_tools`, registered only when `agent::subage## Events-Subscribers/handlers for trigger and config-change events still live in `crate::memory::sync::composio::bus` (re-exported here via `bus.rs`). All three are registered by one call, `register_composio_trigger_subscriber()`, from `crates/openhuman-core/src/core/jsonrpc.rs` (~2158, right after `init_composio_trigger_history`):+Subscribers/handlers for trigger and config-change events still live in `crate::memory::sync::composio::bus` (re-exported here via `bus.rs`). All three are registered by one call, `register_composio_trigger_subscriber()`, from `crates/openhuman-rpc/src/server/` (~2158, right after `init_composio_trigger_history`):- **`ComposioTriggerSubscriber`**, reacts to `DomainEvent::ComposioTriggerReceived` (published by `platform::socket::event_handlers` when the backend emits `composio:trigger`); archives the event to `trigger_history` and routes it through `agent::triage::run_triage` unless `OPENHUMAN_TRIGGER_TRIAGE_DISABLED`, `composio.triage_disabled`, or `composio.triage_disabled_toolkits` opts out.- **`ComposioConnectionCreatedSubscriber`**, reacts to `DomainEvent::ComposioConnectionCreated` (published by `composio_authorize`); waits for the connection to go active, invalidates and eagerly warms the integrations cache, then runs the initial profile fetch + sync.@@ -185,7 +185,7 @@ Published from `ops/` via `crate::core::bus::BUS.publish` (`crate::core::events:- `crates/openhuman-core/src/core/all.rs`: registers the controllers.- `crates/openhuman-core/src/tools/{mod,ops}.rs`, `tools/schemas/composio.rs`: wires agent tools into the tool registry.-- `crates/openhuman-core/src/core/jsonrpc.rs`: at startup initializes trigger history and registers the three bus subscribers.+- `crates/openhuman-rpc/src/server/`: at startup initializes trigger history and registers the three bus subscribers.- `crates/openhuman-core/src/channels/runtime/startup/start_channels.rs` (`start_channels`), the one caller of `start_periodic_sync()`. `core/runtime/services.rs`'s `composio_integration_sync` job only runs `memory::sources::reconcile::ensure_composio_sources`; its comment explains why the periodic loop is not started there.- `crates/openhuman-core/src/agent/**`: session-host/subagent spawning (`integrations_agent`), triage escalation and debug (e.g. `agent/subagent_host/`, `agent/orchestration/tools/`, `agent/debug/mod.rs`).- `crates/openhuman-core/src/platform/socket/event_handlers.rs`: parses `composio:trigger` and publishes `ComposioTriggerReceived`.diff --git a/crates/openhuman-core/src/integrations/task_sources/README.md b/crates/openhuman-core/src/integrations/task_sources/README.mdindex 5f1af24071..9c3f456acb 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-core/src/core/jsonrpc.rs` (~2159) calls+- `crates/openhuman-rpc/src/server/` (~2159) 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@@ -137,7 +137,7 @@ The additive idempotent `ingested_tasks.card_id` migration preserves older datab## Used by- `crates/openhuman-core/src/core/all.rs`: registers controllers + schemas into the global RPC registry.-- `crates/openhuman-core/src/core/jsonrpc.rs`: at startup registers the connection subscriber (bus.rs).+- `crates/openhuman-rpc/src/server/`: at startup registers the connection subscriber (bus.rs).- `crates/openhuman-core/src/core/runtime/services.rs`: at startup starts the periodic poll as part of the task-source polling bootstrap job.- `crates/openhuman-core/src/channels/runtime/startup/start_channels.rs`: `start_channels` registers the subscriber and starts the poll for the channels runtime.- `crates/openhuman-core/src/core/events.rs`: defines/classifies the three `TaskSource*` event variants under domain `"task_sources"`.diff --git a/crates/openhuman-core/src/mcp/registry/README.md b/crates/openhuman-core/src/mcp/registry/README.mdindex 42a39b4fbb..62de733d6f 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 reconnectsupdate the map. `connected_overview()` reads tool snapshots from that map;it does not call an MCP server on each chat turn.-- `crates/openhuman-core/src/core/jsonrpc.rs`: the `/oauth/mcp/callback`+- `crates/openhuman-rpc/src/server/`: 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/mcp/registry/stub.rs b/crates/openhuman-core/src/mcp/registry/stub.rsindex d4c7c164b3..381438c12d 100644--- a/crates/openhuman-core/src/mcp/registry/stub.rs+++ b/crates/openhuman-core/src/mcp/registry/stub.rs@@ -90,7 +90,7 @@ pub mod oauth {/// Always errors: no pending-authorization map exists in this build, so a/// callback can only be a stale/blind hit. The real function returns the- /// same `Err(String)` shape for an unknown state, and its `core/jsonrpc/http/oauth_mcp.rs`+ /// same `Err(String)` shape for an unknown state, and its `openhuman-rpc/src/server/http/oauth_mcp.rs`/// caller already renders that as an error page.pub async fn complete(_config: &Config, _state: &str, _code: &str) -> Result<String, String> {Err(DISABLED_MSG.to_string())diff --git a/crates/openhuman-core/src/memory/ops/README.md b/crates/openhuman-core/src/memory/ops/README.mdindex 692b25036a..ad9b2025de 100644--- a/crates/openhuman-core/src/memory/ops/README.md+++ b/crates/openhuman-core/src/memory/ops/README.md@@ -1,7 +1,7 @@# opsRPC handlers for the memory system: each returns `Outcome<T>`-(`crate::rpc::Outcome`, `openhuman_rpc::Outcome` re-exported through+(`crate::core::Outcome`, `openhuman_rpc::Outcome` re-exported through`pub use openhuman_rpc as rpc;` in `crates/openhuman-core/src/lib.rs`).`memory::ops` is re-exported flat from `crate::memory::mod` (`pub useops::*;`), and `memory::rpc` is an alias of this module (`pub use ops asdiff --git a/crates/openhuman-core/src/platform/about_app/README.md b/crates/openhuman-core/src/platform/about_app/README.mdindex 3739e70bb2..6460fce9cd 100644--- a/crates/openhuman-core/src/platform/about_app/README.md+++ b/crates/openhuman-core/src/platform/about_app/README.md@@ -58,7 +58,7 @@ None. No `store.rs`. The catalog is a compile-time `&'static [Capability]` const## Dependencies-- `crate::rpc::Outcome`: return-type contract for ops/handlers.+- `crate::core::Outcome`: return-type contract for ops/handlers.- `crate::core::all::{ControllerFuture, RegisteredController}`: controller registration types (schemas.rs).- `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller schema definitions (schemas.rs).diff --git a/crates/openhuman-core/src/platform/connectivity/README.md b/crates/openhuman-core/src/platform/connectivity/README.mdindex 7cb7b42a97..9d96b44c54 100644--- a/crates/openhuman-core/src/platform/connectivity/README.md+++ b/crates/openhuman-core/src/platform/connectivity/README.md@@ -44,7 +44,7 @@ None: the module holds no state. The diag snapshot reads only the environment, t- `crate::platform::socket::manager::global_socket_manager`: read the live backend Socket.IO `ConnectionStatus` and last error for the diag snapshot.- `crate::core::all::{ControllerFuture, RegisteredController}`: controller registration types.- `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller schema shape.-- `crate::rpc::Outcome`: RPC return envelope (`Outcome::single_log`).+- `crate::core::Outcome`: RPC return envelope (`Outcome::single_log`).- External crates: `reqwest` (HTTP fingerprint probe of a listener's `GET /` root), `tokio` (async `TcpListener`, retry backoff), `serde`/`serde_json`, `url`, `tracing`/`log`.## Used bydiff --git a/crates/openhuman-core/src/platform/cost/README.md b/crates/openhuman-core/src/platform/cost/README.mdindex 8f246f9a2c..da8541e273 100644--- a/crates/openhuman-core/src/platform/cost/README.md+++ b/crates/openhuman-core/src/platform/cost/README.md@@ -68,13 +68,13 @@ None. The module has no `bus.rs` and no `DomainEvent` publishers/subscribers.- `crate::inference::provider::types::UsageInfo` (re-exported as `crate::inference::provider::UsageInfo`): provider usage payload translated into `TokenUsage` in `global.rs`.- `crate::core::all`: `ControllerFuture`, `RegisteredController` for controller registration.- `crate::core`: `ControllerSchema`, `FieldSchema`, `TypeSchema`.-- `crate::rpc::Outcome`: RPC return wrapper.+- `crate::core::Outcome`: RPC return wrapper.- External: `chrono`, `serde`/`serde_json`, `uuid`, `parking_lot`, `once_cell`, `anyhow`, `tempfile` (tests).## Used by- `crates/openhuman-core/src/core/all.rs`: registers `all_cost_registered_controllers` / `all_cost_controller_schemas`.-- `crates/openhuman-core/src/core/jsonrpc.rs`: calls `cost::init_global(cfg.cost.clone(), &workspace_dir)` at bootstrap.+- `crates/openhuman-rpc/src/server/`: calls `cost::init_global(cfg.cost.clone(), &workspace_dir)` at bootstrap.- `crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs`, `agent/tinyagents/turn_outcome.rs`, `agent/tinyagents/host/budget_gate.rs`, and `agent/subagent_host/`: call `cost::record_provider_usage` after provider calls to log per-turn (and subagent) usage.- `crates/openhuman-core/src/tools/mod.rs`: re-exports `platform::cost::tools::*`.- `crates/openhuman-core/src/config/schema/identity_cost.rs`: `CostConfig` retains legacy budget-display fields for wire compatibility.diff --git a/crates/openhuman-core/src/platform/doctor/README.md b/crates/openhuman-core/src/platform/doctor/README.mdindex a740ec4068..574994032f 100644--- a/crates/openhuman-core/src/platform/doctor/README.md+++ b/crates/openhuman-core/src/platform/doctor/README.md@@ -70,7 +70,7 @@ None of its own (no `store.rs`). It only **reads** existing state owned by other- `crate::inference::{provider, local}`: `provider::list_providers` (model targets) and `local::ollama_base_url` (embedding probe).- `crate::api::{config, jwt}`: `effective_api_url` fallback resolution and `get_session_token` for sign-in state.- `crate::core::all::{ControllerFuture, RegisteredController}`, `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller/schema plumbing.-- `crate::rpc::Outcome`: handler return contract.+- `crate::core::Outcome`: handler return contract.- External: `reqwest` (blocking client + URL parse), `serde`/`serde_json`, `chrono`, `anyhow`.## Used bydiff --git a/crates/openhuman-core/src/platform/health/README.md b/crates/openhuman-core/src/platform/health/README.mdindex b37dea62a6..bc9dfb00dc 100644--- a/crates/openhuman-core/src/platform/health/README.md+++ b/crates/openhuman-core/src/platform/health/README.md@@ -70,13 +70,13 @@ None on disk. State lives in a process-global `OnceLock<HealthRegistry>` (lazy-i- `crate::core::bus::BUS.subscribe` (`crate::core::events::DomainEvent`, `tinybus::SubscriptionHandle`): to receive system/channel events.- `crate::core::all` (`ControllerFuture`, `RegisteredController`) and `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller registry wiring.-- `crate::rpc::Outcome`: RPC handler return contract.+- `crate::core::Outcome`: RPC handler return contract.- External crates: `chrono` (RFC3339 timestamps), `parking_lot::Mutex`, `serde`/`serde_json`, `async_trait`.## Used by- `crates/openhuman-core/src/core/all.rs`: registers `all_health_*` controllers into the registry.-- `crates/openhuman-core/src/core/jsonrpc.rs`: references health (snapshot/system_info surface).+- `crates/openhuman-rpc/src/server/`: 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/platform/service/README.md b/crates/openhuman-core/src/platform/service/README.mdindex fa5520b292..b599e7f790 100644--- a/crates/openhuman-core/src/platform/service/README.md+++ b/crates/openhuman-core/src/platform/service/README.md@@ -74,7 +74,7 @@ Subscribes (in `bus.rs`):- `RestartSubscriber` (`name = "service::restart"`): on `SystemRestartRequested`, atomically claims a one-shot gate, calls `trigger_self_restart_now` to spawn a replacement process, then `process::exit(0)` after 150ms.- `ShutdownSubscriber` (`name = "service::shutdown"`): on `SystemShutdownRequested`, claims its gate and `process::exit(0)` after 150ms (no respawn).-Both subscribers are registered idempotently from `crates/openhuman-core/src/core/jsonrpc.rs` at startup via `register_restart_subscriber` / `register_shutdown_subscriber`; handles are held in process-lifetime `OnceLock`s so they are never dropped.+Both subscribers are registered idempotently from `crates/openhuman-rpc/src/server/` at startup via `register_restart_subscriber` / `register_shutdown_subscriber`; handles are held in process-lifetime `OnceLock`s so they are never dropped.## Persistence@@ -88,13 +88,13 @@ Both subscribers are registered idempotently from `crates/openhuman-core/src/cor- `crate::config`: `Config` (paths, config dir) for every lifecycle/path operation; `config::rpc::load_config_with_timeout` in the schema handlers.- `crate::core::bus::BUS` (`tinybus::OnceBus<DomainEvent>`): `publish` / `subscribe` for restart/shutdown orchestration; `crate::core::events::DomainEvent` for the event catalog.- `crate::core` (`ControllerSchema`, `FieldSchema`, `TypeSchema`) and `crate::core::all` (`ControllerFuture`, `RegisteredController`): controller schema/registration contract.-- `crate::rpc::Outcome`: standard RPC result envelope.+- `crate::core::Outcome`: standard RPC result envelope.- External: `anyhow`, `serde`/`serde_json`, `tokio`, `async_trait`, plus OS CLIs (`launchctl`, `systemctl`, `schtasks`).## Used by- `crates/openhuman-core/src/core/all.rs`: registers the service controllers (`all_service_registered_controllers`).-- `crates/openhuman-core/src/core/jsonrpc.rs`: registers the restart/shutdown event-bus subscribers at startup.+- `crates/openhuman-rpc/src/server/`: registers the restart/shutdown event-bus subscribers at startup.- `crates/openhuman-core/src/platform/doctor/core.rs`: reads `service::daemon::state_file_path`.- `crates/openhuman-core/src/platform/update/ops.rs` (`rpc::service_restart` after a self-replace), `crates/openhuman-core/src/config/ops/loader/runtime_flags.rs` (`mock::mock_agent_running`), `crates/openhuman-core/src/desktop/app_state/ops/{types,runtime_snapshot}.rs` (`ServiceState`/`ServiceStatus`, `status`): call into `crate::platform::service`.- `crates/openhuman-core/src/tools/mod.rs`: re-exports `platform::service::tools::*`.diff --git a/crates/openhuman-core/src/platform/socket/README.md b/crates/openhuman-core/src/platform/socket/README.mdindex ecfefe0f4d..6b473a3bd7 100644--- a/crates/openhuman-core/src/platform/socket/README.md+++ b/crates/openhuman-core/src/platform/socket/README.md@@ -86,7 +86,7 @@ None of its own. State (`status`, `socket_id`, `error`, attached `WebhookRouter`## Used by- `crates/openhuman-core/src/core/all.rs`: registers the socket controllers.-- `crates/openhuman-core/src/core/jsonrpc.rs` (`set_global_socket_manager` at bootstrap), `crates/openhuman-core/src/core/runtime/services.rs` (backend auto-connect with `token_provider_from_config`), `crates/openhuman-core/src/core/observability.rs`: reference the socket namespace/state.+- `crates/openhuman-rpc/src/server/` (`set_global_socket_manager` at bootstrap), `crates/openhuman-core/src/core/runtime/services.rs` (backend auto-connect with `token_provider_from_config`), `crates/openhuman-core/src/core/observability.rs`: reference the socket namespace/state.- `crates/openhuman-core/src/platform/connectivity/rpc.rs`: connectivity/status surfacing.- `crates/openhuman-core/src/skills/webhooks/{ops.rs,bus.rs}`: emit webhook responses back through the global manager.- `crates/openhuman-core/src/security/devices/tunnel_client.rs`: emits tunnel frames/registration over the socket.diff --git a/crates/openhuman-core/src/platform/startup/README.md b/crates/openhuman-core/src/platform/startup/README.mdindex 5ebfb15882..a2f9f21b7f 100644--- a/crates/openhuman-core/src/platform/startup/README.md+++ b/crates/openhuman-core/src/platform/startup/README.md@@ -1,6 +1,6 @@# startup-Generic OpenHuman process-startup helpers. Currently a thin, stateless module whose sole job is to run one-shot workspace migrations during core boot. It centralizes "do this once when the process comes up" logic so the transport layer (`crates/openhuman-core/src/core/jsonrpc.rs`) can fire it without owning migration details. Failures are logged and never abort startup: individual migration helpers own their own idempotency markers.+Generic OpenHuman process-startup helpers. Currently a thin, stateless module whose sole job is to run one-shot workspace migrations during core boot. It centralizes "do this once when the process comes up" logic so the transport layer (`crates/openhuman-rpc/src/server/`) can fire it without owning migration details. Failures are logged and never abort startup: individual migration helpers own their own idempotency markers.## Responsibilities@@ -43,7 +43,7 @@ No own state/store. It triggers migrations that mutate on-disk workspace artifac## Used by-- `crates/openhuman-core/src/core/jsonrpc.rs` (core boot path): the only caller; invokes `run_workspace_migrations(&workspace_dir)` during core startup, after approval-gate wiring and before MCP registry boot-spawn.+- `crates/openhuman-rpc/src/server/` (core boot path): the only caller; invokes `run_workspace_migrations(&workspace_dir)` during core startup, after approval-gate wiring and before MCP registry boot-spawn.## Notes / gotchasdiff --git a/crates/openhuman-core/src/platform/update/README.md b/crates/openhuman-core/src/platform/update/README.mdindex 868153502c..d80903638f 100644--- a/crates/openhuman-core/src/platform/update/README.md+++ b/crates/openhuman-core/src/platform/update/README.md@@ -61,7 +61,7 @@ None. No `store.rs`: staged binaries are written to the filesystem (current-exe- `crate::core::bus`: `BUS.publish`, `crate::core::events::DomainEvent`, and `bus::init()` to bring up the in-process broker.- `crate::core::observability`: Sentry reporting + transient-failure classifiers (`report_error`, `is_updater_transient_message`, `is_updater_transient_http_status`).- `crate::core::all`: `ControllerFuture`, `RegisteredController` (schemas wiring); `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`.-- `crate::rpc::Outcome`: RPC return contract.+- `crate::core::Outcome`: RPC return contract.- External crates: `reqwest` (HTTP), `url` (URL validation), `serde`/`serde_json`, `tokio`.## Used bydiff --git a/crates/openhuman-core/src/security/approval/README.md b/crates/openhuman-core/src/security/approval/README.mdindex 3f8fb6b2d9..9ce9f8c063 100644--- a/crates/openhuman-core/src/security/approval/README.md+++ b/crates/openhuman-core/src/security/approval/README.md@@ -76,14 +76,14 @@ SQLite DB at `{workspace_dir}/approval/approval.db`, table `pending_approvals` (- `crate::core::bus::BUS` + `crate::core::events::DomainEvent` to surface approval prompts/decisions.- `crate::core::all`: `ControllerFuture` / `RegisteredController` for the controller registry.- `crate::core` (`ControllerSchema`, `FieldSchema`, `TypeSchema`): schema definitions.-- `crate::rpc::Outcome`: RPC return contract.+- `crate::core::Outcome`: RPC return contract.- `crate::config::Config`: workspace dir (DB path) plus the boot-time `autonomy.auto_approve` snapshot; `config::ops::add_auto_approve_tool` persists "Always allow".- `crate::security`: `live_policy::current()` for the live "Always allow" list and `POLICY_DENIED_MARKER` for deny reasons.- `tinymemory_core::store::safety::sanitize_text`: scrub secrets out of stored execution-error strings.## Used by-- `crates/openhuman-core/src/core/jsonrpc.rs`: installs the global gate (`ApprovalGate::init_global`) at startup and wires the approval RPCs.+- `crates/openhuman-rpc/src/server/`: installs the global gate (`ApprovalGate::init_global`) at startup and wires the approval RPCs.- `crates/openhuman-core/src/core/all.rs`: registers the controller schemas.- `crates/openhuman-core/src/agent/tinyagents/middleware.rs` (`ApprovalSecurityMiddleware`, a `wrap_tool` middleware on every turn path): routes external-effect tool calls through the gate before `execute()` and records the terminal audit row.- `crates/openhuman-core/src/web_chat/`: sets `APPROVAL_CHAT_CONTEXT`, hosts `ApprovalSurfaceSubscriber`, and routes typed yes/no replies to `approval_decide`.diff --git a/crates/openhuman-core/src/security/approval/gate_triage_tests.rs b/crates/openhuman-core/src/security/approval/gate_triage_tests.rsindex 32f8fa68b2..feeff6c9c5 100644--- a/crates/openhuman-core/src/security/approval/gate_triage_tests.rs+++ b/crates/openhuman-core/src/security/approval/gate_triage_tests.rs@@ -214,7 +214,7 @@ async fn intercept_with_workflow_require_approval_persists_and_ttl_denies() {/// A parked approval must be recoverable from its thread alone.////// The card is delivered to the UI as ONE fire-and-forget socket emit-/// (`web_chat::event_bus` → `core::socketio::emit_web_channel_event`). If that+/// (`web_chat::event_bus` → `openhuman_rpc::server::socketio::emit_web_channel_event`). If that/// emit misses — the addressed client's room is empty because it reloaded, the/// rejoining socket was not yet in the thread room, or the bridge dropped the/// frame on broadcast lag — nothing re-sends it, and the turn stays parked withdiff --git a/crates/openhuman-core/src/security/credentials/README.md b/crates/openhuman-core/src/security/credentials/README.mdindex 47d96d0797..4bd40867b2 100644--- a/crates/openhuman-core/src/security/credentials/README.md+++ b/crates/openhuman-core/src/security/credentials/README.md@@ -95,7 +95,7 @@ Note: `list_provider_credentials_by_prefix` and the Composio-direct/secret helpe- `crate::memory`: bind memory client to the active workspace after activation.- `crate::inference::host_runtime`, `crate::voice::{server,dictation_listener,always_on}`: credential-gated services started/stopped.- `crate::api::config`, `::jwt`, `::rest`: backend API URL, JWT `exp` decode, `BackendOAuthClient` plus OAuth/handoff types.-- `crate::core::all` (`ControllerFuture`, `RegisteredController`), `crate::core` (`ControllerSchema`/`FieldSchema`/`TypeSchema`), `crate::core::events::DomainEvent` plus `tinybus::EventHandler`, `crate::rpc::Outcome`: controller registry, RPC envelope, and event bus.+- `crate::core::all` (`ControllerFuture`, `RegisteredController`), `crate::core` (`ControllerSchema`/`FieldSchema`/`TypeSchema`), `crate::core::events::DomainEvent` plus `tinybus::EventHandler`, `crate::core::Outcome`: controller registry, RPC envelope, and event bus.## Used bydiff --git a/crates/openhuman-core/src/security/devices/README.md b/crates/openhuman-core/src/security/devices/README.mdindex ca3fa33faf..1796cafba1 100644--- a/crates/openhuman-core/src/security/devices/README.md+++ b/crates/openhuman-core/src/security/devices/README.md@@ -53,7 +53,7 @@ None. This domain has no `tools.rs` and owns no agent tools.## Events-Subscriber registered at startup from `crates/openhuman-core/src/core/jsonrpc.rs` via `register_device_tunnel_subscriber`. `DeviceTunnelSubscriber` (`name() = "device::tunnel"`, `domains() = ["device"]`) **handles**:+Subscriber registered at startup from `crates/openhuman-rpc/src/server/` via `register_device_tunnel_subscriber`. `DeviceTunnelSubscriber` (`name() = "device::tunnel"`, `domains() = ["device"]`) **handles**:- `DevicePeerOnline` / `DevicePeerOffline` → update `PEER_STATUS`.- `DeviceTunnelFrame` → complete handshake + persist `PairedDevice`.@@ -90,13 +90,13 @@ Separately, encrypted X25519 private keys are persisted as `enc2:` strings (via- `crate::platform::socket::global_socket_manager`: reuse the shared backend Socket.IO connection to emit `tunnel:*` events (no second WebSocket).- `crate::core::bus::BUS` (`.publish`, `.subscribe`) plus `crate::core::events::DomainEvent` and `tinybus::EventHandler`: pub/sub for device tunnel events.- `crate::core::all` (`ControllerFuture`, `RegisteredController`) and `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller registry contract.-- `crate::rpc::Outcome`: RPC handler return type.+- `crate::core::Outcome`: RPC handler return type.- External crates: `rusqlite`, `chacha20poly1305`, `x25519-dalek`, `base64`, `sha2`, `chrono`, `once_cell`, `tokio`, `async_trait`, `anyhow`.## Used by- `crates/openhuman-core/src/core/all.rs`: registers the `devices` controllers/schemas and namespace branch.-- `crates/openhuman-core/src/core/jsonrpc.rs`: calls `register_device_tunnel_subscriber()` at startup.+- `crates/openhuman-rpc/src/server/`: calls `register_device_tunnel_subscriber()` at startup.- `crates/openhuman-core/src/platform/socket/event_handlers.rs`: parses raw `tunnel:*` Socket.IO events into `DomainEvent`s that this domain consumes, using this domain's `tunnel_client` wire types (`TunnelPeerStatus`, `TunnelFrame`).## Notes / gotchasdiff --git a/crates/openhuman-core/src/skills/webhooks/README.md b/crates/openhuman-core/src/skills/webhooks/README.mdindex 56a462a5b9..9bbfcacd40 100644--- a/crates/openhuman-core/src/skills/webhooks/README.md+++ b/crates/openhuman-core/src/skills/webhooks/README.md@@ -63,7 +63,7 @@ None. This domain owns no `tools.rs` agent tools.## Events-Subscriber (in `bus.rs`): `WebhookRequestSubscriber`, with `name() = "webhook::request_handler"` and `domains() = ["webhook"]`. Registered in `register_domain_subscribers()` (`crates/openhuman-core/src/core/jsonrpc.rs`, called from `bootstrap_core_runtime()`), gated on the `Skills` domain group being enabled (`plan.skills`) and installed at most once per process; `channels/runtime/startup/start_channels.rs` deliberately does not register it, to avoid double-registration when both startup paths run in the same process.+Subscriber (in `bus.rs`): `WebhookRequestSubscriber`, with `name() = "webhook::request_handler"` and `domains() = ["webhook"]`. Registered in `register_domain_subscribers()` (`crates/openhuman-rpc/src/server/`, called from `bootstrap_core_runtime()`), gated on the `Skills` domain group being enabled (`plan.skills`) and installed at most once per process; `channels/runtime/startup/start_channels.rs` deliberately does not register it, to avoid double-registration when both startup paths run in the same process.- Subscribes: `DomainEvent::WebhookIncomingRequest` (published by the socket transport in `socket/event_handlers.rs`).- Publishes: `DomainEvent::WebhookRegistered` / `WebhookUnregistered` (from the router on registration changes; `WebhookUnregistered`, the `registration_changed` debug event and the route re-persist all fire only when a registration was actually removed. Unregistering an absent tunnel is a silent no-op that returns `Ok(false)`, see #6091), `DomainEvent::WebhookReceived` (when routed to a target), `DomainEvent::WebhookProcessed` (always, with status/elapsed/error).@@ -88,14 +88,14 @@ Note that nothing in the production startup path currently constructs a `Webhook- `crate::agent::triage`: `TriggerEnvelope`, `run_triage`, `apply_decision`, `TriageOutcome` for agent-tunnel routing and `trigger_agent`.- `crate::config::{Config, rpc::load_config_with_timeout}`: config for backend-proxy RPCs.- `crate::api::{BackendOAuthClient, config::effective_backend_api_url, jwt::get_session_token}`: authenticated backend tunnel CRUD/bandwidth calls.-- `crate::rpc::Outcome`: handler return contract.+- `crate::core::Outcome`: handler return contract.## Used by- `crates/openhuman-core/src/core/all.rs`: registers the controllers/schemas into the RPC registry.- `crates/openhuman-core/src/platform/socket/manager.rs`: stores the `WebhookRouter` (`set_webhook_router` / `webhook_router`) on the socket manager; ops/bus retrieve it from there.- `crates/openhuman-core/src/platform/socket/event_handlers.rs`: publishes `WebhookIncomingRequest` from the socket and reads the shared router slot.-- `crates/openhuman-core/src/core/jsonrpc.rs`: registers `WebhookRequestSubscriber` in `register_domain_subscribers()` and provides the RPC transport surface.+- `crates/openhuman-rpc/src/server/`: registers `WebhookRequestSubscriber` in `register_domain_subscribers()` and provides the RPC transport surface.- `crates/openhuman-core/src/core/events.rs`: defines the `Webhook*` `DomainEvent` variants this module uses.## Notes / gotchasdiff --git a/crates/openhuman-core/src/test_support/README.md b/crates/openhuman-core/src/test_support/README.mdindex c0118a2da2..1b9a155da6 100644--- a/crates/openhuman-core/src/test_support/README.md+++ b/crates/openhuman-core/src/test_support/README.md@@ -62,7 +62,7 @@ This module owns no state of its own. It mutates and reads state owned by other- `crate::web3::wallet`: `prepared_quotes_for_test` and `PreparedTransaction` to snapshot prepared quotes.- `crate::core::all`: `ControllerFuture`, `RegisteredController` for handler wiring.- `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller schema types.-- `crate::rpc::Outcome`: standard RPC result envelope; `crate::rpc` is the `openhuman-rpc` crate re-exported by `pub use openhuman_rpc as rpc;` in `crates/openhuman-core/src/lib.rs`.+- `crate::core::Outcome`: standard RPC result envelope; `crate::rpc` is the `openhuman-rpc` crate re-exported by `pub use openhuman_rpc as rpc;` in `crates/openhuman-core/src/lib.rs`.## Used bydiff --git a/crates/openhuman-core/src/tools/registry/README.md b/crates/openhuman-core/src/tools/registry/README.mdindex 304d672f8e..f447072a1c 100644--- a/crates/openhuman-core/src/tools/registry/README.md+++ b/crates/openhuman-core/src/tools/registry/README.md@@ -55,7 +55,7 @@ No owned persistence. `diagnostics()` reads the MCP write-audit log through `cra- `crate::mcp::server` (`McpToolSpec`, `tool_specs()`): MCP stdio tool source for registry entries.- `crate::mcp::registry::connections` (`all_connected_tools()` / `all_connected_tools_for_config()`, defined inside `mcp/registry/mod.rs`; empty-returning stubs in `mcp/registry/stub.rs` when the `mcp` feature is disabled): live MCP client server tools, fetched via `block_in_place` only on the multi-thread runtime.- `crate::mcp::audit` (`list_writes`, `McpWriteListQuery`; stubbed under `mcp/audit/stub.rs` without the `mcp` feature): write-audit health.-- `crate::rpc::Outcome`: RPC result envelope.+- `crate::core::Outcome`: RPC result envelope.## Used bydiff --git a/crates/openhuman-core/src/tools/timeout/README.md b/crates/openhuman-core/src/tools/timeout/README.mdindex 1373f4497b..86190f9a34 100644--- a/crates/openhuman-core/src/tools/timeout/README.md+++ b/crates/openhuman-core/src/tools/timeout/README.md@@ -56,7 +56,7 @@ The global timeout governs non-scripting tools only, since a hung network or MCP- `crates/openhuman-core/src/tools/impl/system/{shell,node_exec,npm_exec,python_exec}.rs`: scripting tools, unbounded by default, explicit `timeout_secs` via `explicit_call_timeout_*`.- `crates/openhuman-core/src/agent/tools/delegate.rs`: bounds the delegated provider chat call with `tool_execution_timeout_secs`.- `crates/openhuman-core/src/config/ops/agent.rs`: `apply_agent_settings` calls `set_tool_timeout_secs` after persisting; `get_agent_settings` reports `effective_timeout_secs`/`env_override`.-- `crates/openhuman-core/src/core/jsonrpc.rs`: `register_domain_subscribers` seeds the runtime value from config on the always-on core boot path, so channel-less or web-chat-only cores get the configured timeout too (#5027).+- `crates/openhuman-rpc/src/server/`: `register_domain_subscribers` seeds the runtime value from config on the always-on core boot path, so channel-less or web-chat-only cores get the configured timeout too (#5027).- `crates/openhuman-core/src/agent/harness/harness_gap_tests.rs`: pins `parse_tool_timeout_secs` default and boundary behavior.## Notes and gotchasdiff --git a/crates/openhuman-core/src/voice/README.md b/crates/openhuman-core/src/voice/README.mdindex 3ce0daaf4f..846065258e 100644--- a/crates/openhuman-core/src/voice/README.md+++ b/crates/openhuman-core/src/voice/README.md@@ -108,7 +108,7 @@ channels that predate the typed event bus:- `DictationEvent` (`pressed`/`released`): `publish_dictation_event` / `subscribe_dictation_events`.- transcription text: `publish_transcription` / `subscribe_transcription_results`.-`crates/openhuman-core/src/core/socketio.rs` subscribes to both broadcast+`crates/openhuman-rpc/src/server/socketio.rs` subscribes to both broadcastchannels and forwards them to Socket.IO clients (so dictation hotkeys andresults reach the frontend without Tauri-side shortcut registration).@@ -144,14 +144,14 @@ transcription count, rolling recent-transcript buffer for context) behind a- `crate::desktop::accessibility` (macOS only): focused-text inspection (`focused_text_context_verbose`) and the Swift globe-key listener (`globe_listener_start` / `globe_listener_poll`) used in place of rdev for the Fn key.- `crate::api`: `BackendOAuthClient`, `effective_backend_api_url`, `get_session_token` for backend-proxied reply-speech and the realtime signed-URL bootstrap.- `crate::modules::voice` (`tinyvoice`): see Contract crates above.-- `crate::core::all` (`ControllerFuture`, `RegisteredController`), `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`, `crate::core::bus::BUS` + `crate::core::events` (event publishing), `crate::core::logging` (CLI run init), and `crate::rpc::Outcome`.+- `crate::core::all` (`ControllerFuture`, `RegisteredController`), `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`, `crate::core::bus::BUS` + `crate::core::events` (event publishing), `crate::core::logging` (CLI run init), and `crate::core::Outcome`.- External crates: `cpal` (capture), `rdev` (hotkeys), `enigo` + `arboard` (paste insertion), `reqwest` (external provider HTTP + realtime bootstrap), `tokio`/`tokio-util`, `once_cell`.## Used by- `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-core/src/core/socketio.rs`: subscribes to the dictation/transcription broadcast buses and forwards them to Socket.IO clients.-- `crates/openhuman-core/src/core/jsonrpc.rs`: WebSocket upgrade for streaming dictation (`streaming::handle_dictation_ws`).+- `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-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/voice/audio_toolkit/README.md b/crates/openhuman-core/src/voice/audio_toolkit/README.mdindex 426c20c8c2..c64e2c6f00 100644--- a/crates/openhuman-core/src/voice/audio_toolkit/README.md+++ b/crates/openhuman-core/src/voice/audio_toolkit/README.md@@ -70,7 +70,7 @@ No durable domain store. Side effects are filesystem writes within the workspace- `crate::security`: `SecurityPolicy` / `ToolOperation` to gate the agent tools.- `tinytools`: `Tool`, `ToolResult`, `PermissionLevel`.- `crate::core::all` / `crate::core`: `RegisteredController`, `ControllerFuture`, `ControllerSchema`, `FieldSchema`, `TypeSchema` for RPC registration.-- `crate::rpc::Outcome`: controller/op return contract.+- `crate::core::Outcome`: controller/op return contract.- External crates: `lettre` (email message + attachment), `base64`, `chrono`, `uuid`.## Used bydiff --git a/crates/openhuman-core/src/voice/reply_speech.rs b/crates/openhuman-core/src/voice/reply_speech.rsindex ed5712034c..82adfbe1eb 100644--- a/crates/openhuman-core/src/voice/reply_speech.rs+++ b/crates/openhuman-core/src/voice/reply_speech.rs@@ -213,7 +213,7 @@ pub async fn synthesize_reply(// `flatten_authed_error` maps the typed `BackendApiError::Unauthorized`// (expected session-lapse 401 from `authed_json`) onto the `SESSION_EXPIRED`- // sentinel so the JSON-RPC layer (`core/jsonrpc/classify.rs::is_session_expired_error`)+ // sentinel so the JSON-RPC layer (`openhuman-rpc/src/server/classify.rs::is_session_expired_error`)// classifies it as session expiry and skips Sentry, matching the #3384// team/billing pattern. The previous `e.to_string()` produced the raw// "backend rejected session token on POST /openai/v1/audio/speech" Displaydiff --git a/crates/openhuman-core/src/voice/streaming.rs b/crates/openhuman-core/src/voice/streaming.rsindex b7692c237d..6f41705586 100644--- a/crates/openhuman-core/src/voice/streaming.rs+++ b/crates/openhuman-core/src/voice/streaming.rs@@ -29,7 +29,7 @@//! ## Authentication//! `GET /ws/dictation` is authenticated at the upgrade boundary (C4 / issue #1924).//! The browser WebSocket API cannot set arbitrary request headers on upgrade, so the-//! check lives in `dictation_ws_handler` (`crates/openhuman-core/src/core/jsonrpc/http/dictation.rs`), not here: it requires+//! check lives in `dictation_ws_handler` (`crates/openhuman-rpc/src/server/http/dictation.rs`), not here: it requires//! the per-process core bearer via `Authorization: Bearer <token>` (native callers) or//! `?token=<token>` (browser clients), plus the same origin allowlist Socket.IO enforces,//! and rejects the upgrade with 401/403 before this function runs. Do NOT add adiff --git a/crates/openhuman-core/src/web3/wallet/README.md b/crates/openhuman-core/src/web3/wallet/README.mdindex bbfd43f89f..c92ced5e7b 100644--- a/crates/openhuman-core/src/web3/wallet/README.md+++ b/crates/openhuman-core/src/web3/wallet/README.md@@ -136,7 +136,7 @@ None. The module publishes or subscribes no `DomainEvent`s and has no `bus.rs`.- `crate::security::approval::APPROVAL_CHAT_CONTEXT`: task-local chat owner (`thread_id`/`client_id`) used to bind quotes to their originating thread.- `tinytools`: `Tool`/`ToolResult`/`ToolCallOptions` for the agent tools.- `crate::core::all` (`ControllerFuture`, `RegisteredController`) and `crate::core` (`ControllerSchema`, `FieldSchema`, `TypeSchema`): RPC controller registry wiring.-- `crate::rpc::Outcome`: standard RPC return shape.+- `crate::core::Outcome`: standard RPC return shape.- `tinywallet-bus` (`vendor/tinywallet/crates/tinywallet-bus`, optional, gated by the `web3` feature; features `btc`, `evm`, `solana`, `tron`, `keccak`, `net`, `wire`, `eip712`, `abi`, `tx-codec`): the contract crate. It owns address formats (parsing/validation/conversion) and the wire types crossing the `Transport` seam (`SecretMaterial`, `TransactionSpec`, `NetworkId`), the ERC-20/EIP-712 encoders, and the Tron verifier. Per Cargo.toml's own rationale, this is taken as the contract crate and not the root `tinywallet` crate: key derivation, transaction building, signing and the chain clients (including the `bitcoin` crate and its native secp256k1 build) live inside that loaded module now, so this binary links none of it. The root `tinywallet` crate is still a dev-dependency, used only so test fixtures can derive a known account from a BIP-39 vector phrase.- Other external crates: `curve25519-dalek` (optional, pulled in by the `web3` feature; Solana off-curve ATA check), `bs58` (Solana base58 program ids/addresses), `sha2` (Solana ATA/PDA derivation), `hex`, `reqwest`, `serde`/`serde_json`, `tempfile`, `parking_lot`, `once_cell`. `k256`, `coins-bip39`, `ed25519-dalek` and the root `tinywallet` crate are test-only here (the `web3` feature does not enable `k256`/`coins-bip39`): they back the `cfg(test)` local signers in `chains/solana.rs`, `execution.rs` and the test fixtures, so unit tests can run without a loaded module.diff --git a/crates/openhuman-core/src/web3/wallet/stub.rs b/crates/openhuman-core/src/web3/wallet/stub.rsindex 9f25ca588b..50bce92ba7 100644--- a/crates/openhuman-core/src/web3/wallet/stub.rs+++ b/crates/openhuman-core/src/web3/wallet/stub.rs@@ -13,7 +13,7 @@//! mirror below until that build is green again.//!//! Consumers covered here (all outside `wallet`, so all must keep compiling):-//! - `core/jsonrpc/classify.rs` — `WALLET_NOT_CONFIGURED_MESSAGE`+//! - `openhuman-rpc/src/server/classify.rs` — `WALLET_NOT_CONFIGURED_MESSAGE`//! - `test_support/introspect.rs` — `prepared_quotes_for_test`,//! `PreparedTransaction`//! - `core/all.rs` — `all_wallet_registered_controllers`@@ -28,7 +28,7 @@ use crate::core::Outcome;/// `Result`. Shared so callers/log-greps see one stable string.const DISABLED_MSG: &str = "web3/wallet feature disabled at compile time";-/// Mirrors the real `ops::WALLET_NOT_CONFIGURED_MESSAGE` verbatim. `core/jsonrpc/classify.rs`+/// Mirrors the real `ops::WALLET_NOT_CONFIGURED_MESSAGE` verbatim. `openhuman-rpc/src/server/classify.rs`/// compares Sentry-noise errors against this exact string, so it must not drift.pub const WALLET_NOT_CONFIGURED_MESSAGE: &str = "wallet is not configured; run wallet setup first";diff --git a/crates/openhuman-core/src/web3/x402/README.md b/crates/openhuman-core/src/web3/x402/README.mdindex bf1d33a6b0..85cc941601 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-core/src/core/jsonrpc.rs` (around line 2477): calls+- `crates/openhuman-rpc/src/server/` (around line 2477): 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.mdindex 4662d5f75c..a0d1da113b 100644--- a/crates/openhuman-core/src/web_chat/README.md+++ b/crates/openhuman-core/src/web_chat/README.md@@ -10,7 +10,7 @@ runner behind both surfaces.## Request lifecycle-1. `core/socketio.rs` receives a `chat:start` socket event and calls+1. `openhuman-rpc/src/server/socketio.rs` receives a `chat:start` socket event and calls[`start_chat`] (`ops/start_chat.rs`) with the raw message, thread/client ids,and any model/profile/locale/queue-mode overrides.2. `start_chat` preprocesses `[FILE:...]`/`[IMAGE:...]` attachment markers@@ -129,8 +129,8 @@ Namespace `channel`, registered via## Events-- Broadcasts `WebChannelEvent` (defined in `core/socketio.rs`) over an- in-process `tokio::sync::broadcast` channel. `core/socketio.rs` forwards it+- 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 itto the connected Socket.IO client; `core/jsonrpc.rs` forwards the samestream to the JSON-RPC `/events` SSE endpoint; `channels/bus/subscriber.rs`subscribes to collect the reply for an inbound provider message.@@ -165,7 +165,7 @@ Namespace `channel`, registered via## Called by-- `core/socketio.rs`: the `chat:start` and `chat:cancel` handlers call+- `openhuman-rpc/src/server/socketio.rs`: the `chat:start` and `chat:cancel` handlers call`start_chat` / `cancel_chat_scoped`, and forward `WebChannelEvent`s to theclient.- `core/jsonrpc.rs`: subscribes the event stream for `/events` SSE anddiff --git a/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rsindex 7ddac734db..7dd7981b7f 100644--- a/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_rate_limit_classification_tests.rs@@ -167,7 +167,7 @@ async fn start_chat_chat_error_event_serializes_structured_fields_to_json_wire()let _serial = FORCED_ERROR_TEST_LOCK.lock().await;// The JSON-RPC SSE endpoint emits chat_error by running// `serde_json::to_value(&event)` over the WebChannelEvent struct- // (see `core/socketio.rs::emit_web_channel_event`). This pins the+ // (see `openhuman-rpc/src/server/socketio.rs::emit_web_channel_event`). This pins the// resulting JSON keys so the frontend contract stays stable: the// FE reads exactly `error_source`, `error_retryable`,// `error_retry_after_ms`, `error_provider`, `error_fallback_available`diff --git a/crates/openhuman-rpc/README.md b/crates/openhuman-rpc/README.mdindex 9d802eac36..0c6a3f7a24 100644--- a/crates/openhuman-rpc/README.md+++ b/crates/openhuman-rpc/README.md@@ -14,7 +14,7 @@ HTTP client.- `pub struct RpcOutcome<T>` / `fn new` / `fn single_log` / `fn into_cli_compatible_json`, in `lib.rs`: a handler result plus its log lines, the type domain `ops.rs` operations return (see `AGENTS.md`'s module-shape table).- `pub fn apply_log_envelope(value, logs) -> Value`, in `lib.rs`: the single definition of the bare-vs-wrapped response-shape rule; see its doc comment before touching it.- `pub fn unwrap_rpc(value: &Value) -> &Value`, in `lib.rs`: client-side unwrapping of nested `result`/`data` envelopes.-- `pub struct StructuredRpcError` / `pub const STRUCTURED_RPC_ERROR_SENTINEL`, in `structured_error.rs`: a typed error envelope, sentinel-encoded into the controller `Result<_, String>` channel and decoded by `crates/openhuman-core/src/core/jsonrpc.rs`.+- `pub struct StructuredRpcError` / `pub const STRUCTURED_RPC_ERROR_SENTINEL`, in `structured_error.rs`: a typed error envelope, sentinel-encoded into the controller `Result<_, String>` channel and decoded by `crates/openhuman-rpc/src/server/`.- `pub struct HttpRpcResponse`, in `client.rs` (feature `http-client`): verbatim status and body from an OpenHuman RPC endpoint.- `pub fn post_json_rpc(url, token, body) -> Result<HttpRpcResponse, String>`, in `client.rs` (feature `http-client`): POSTs a JSON-RPC body with a 30s timeout and disables redirects when a bearer token is set.- `pub fn bearer_header(token: Option<&str>) -> Option<String>`, in `client.rs` (feature `http-client`): normalizes a token into an `Authorization` header value.diff --git a/crates/openhuman-tinyhumans/src/hosted/announcements/README.md b/crates/openhuman-tinyhumans/src/hosted/announcements/README.mdindex f41c950acf..042ab9e1f9 100644--- a/crates/openhuman-tinyhumans/src/hosted/announcements/README.md+++ b/crates/openhuman-tinyhumans/src/hosted/announcements/README.md@@ -52,7 +52,7 @@ anything. Dismissal is tracked client-side by announcement idcall.- `crate::api::flatten_authed_error`: flattens any non-404 backend/sessionerror for the RPC caller.-- `crate::rpc::Outcome` (re-export of `openhuman_rpc`): return wrapper+- `crate::core::Outcome` (re-export of `openhuman_rpc`): return wrappercarrying value + log line.## Gatingdiff --git a/crates/openhuman-tinyhumans/src/hosted/billing/README.md b/crates/openhuman-tinyhumans/src/hosted/billing/README.mdindex c525cfc9a2..ba5335ec14 100644--- a/crates/openhuman-tinyhumans/src/hosted/billing/README.md+++ b/crates/openhuman-tinyhumans/src/hosted/billing/README.md@@ -71,7 +71,7 @@ None of its own; stateless adapter. The only state it reads is the backend sessi- `crate::api::jwt::get_session_token`: reads the stored app-session JWT.- `crate::api::BackendOAuthClient`: performs the authenticated JSON HTTP request (`authed_json`).- `crate::config::Config`: config struct (`api_url`); `config::rpc::load_config_with_timeout` in handlers.-- `crate::rpc::Outcome`: standard RPC return/logging wrapper.+- `crate::core::Outcome`: standard RPC return/logging wrapper.- `crate::core::all::{ControllerFuture, RegisteredController}` and `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller registry types.- External crates: `reqwest` (`Method`), `serde`/`serde_json`, `urlencoding` (path-segment encoding for `paymentMethodId`).diff --git a/crates/openhuman-tinyhumans/src/hosted/referral/README.md b/crates/openhuman-tinyhumans/src/hosted/referral/README.mdindex d513fc93fb..48c0b5713f 100644--- a/crates/openhuman-tinyhumans/src/hosted/referral/README.md+++ b/crates/openhuman-tinyhumans/src/hosted/referral/README.md@@ -52,7 +52,7 @@ None of its own. The domain is stateless: it reads the backend session token fro- `crate::api::BackendOAuthClient`: issues authenticated JSON requests (`authed_json`) to the backend.- `crate::config::Config`: config struct passed into ops; `config::rpc::load_config_with_timeout` is used by the schema handlers.- `crate::core::all::{ControllerFuture, RegisteredController}` and `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller registry types.-- `crate::rpc::Outcome`: return wrapper carrying value + logs.+- `crate::core::Outcome`: return wrapper carrying value + logs.- Test-only: `crate::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME}` for seeding session tokens in unit tests.## Used bydiff --git a/crates/openhuman-tinyhumans/src/hosted/team/README.md b/crates/openhuman-tinyhumans/src/hosted/team/README.mdindex 083f093979..d8a8437e02 100644--- a/crates/openhuman-tinyhumans/src/hosted/team/README.md+++ b/crates/openhuman-tinyhumans/src/hosted/team/README.md@@ -73,7 +73,7 @@ None local. State lives in the hosted backend. The only stored value it reads is- `crate::api::BackendOAuthClient`: HTTP client; `authed_json(token, method, path, body)` performs the authed call.- `crate::config::Config`: config passed into every op; `config::rpc::load_config_with_timeout` loads it inside each `handle_*`.- `crate::core::all::{ControllerFuture, RegisteredController}` and `crate::core::{ControllerSchema, FieldSchema, TypeSchema}`: controller registry types.-- `crate::rpc::Outcome`: return wrapper (`single_log`).+- `crate::core::Outcome`: return wrapper (`single_log`).- `reqwest` (`Method`, `Url`) for HTTP + path building; `serde` / `serde_json` for params and bodies.## Used bydiff --git a/scripts/life-scenarios/DIAGNOSIS.md b/scripts/life-scenarios/DIAGNOSIS.mdindex e07cf2a789..97b7687c69 100644--- a/scripts/life-scenarios/DIAGNOSIS.md+++ b/scripts/life-scenarios/DIAGNOSIS.md@@ -215,7 +215,7 @@ call 15 because they spent rounds on Cause 1.`turn_run_finalize.rs:210` computes `hit_cap`, and it does reach some consumers— `flows/ops/builder.rs:336` reads `last_turn_hit_cap`. But `grep hit_cap` over-`web_chat/` returns nothing, and `TurnUsagePayload` (`core/socketio.rs:353`)+`web_chat/` returns nothing, and `TurnUsagePayload` (`openhuman-rpc/src/server/socketio.rs:353`)carries `input_tokens`, `output_tokens`, `cached_input_tokens`, `cost_usd`,`context_window`, `subagents` — and no cap flag.diff --git a/scripts/life-scenarios/FINDINGS.md b/scripts/life-scenarios/FINDINGS.mdindex 967b8caf06..1066705ca5 100644--- a/scripts/life-scenarios/FINDINGS.md+++ b/scripts/life-scenarios/FINDINGS.md@@ -232,7 +232,7 @@ do.**Still open:** the other half of this finding — **the caller cannot tell.** `turn_run_finalize.rs:210` computes `hit_cap` and`flows/ops/builder.rs:336` consumes it, but `grep hit_cap` over `web_chat/`-finds nothing and `TurnUsagePayload` (`core/socketio.rs:353`) has no cap field.+finds nothing and `TurnUsagePayload` (`openhuman-rpc/src/server/socketio.rs:353`) has no cap field.On the path the desktop app uses, a truncated turn arrives as an ordinary`chat_done` — indistinguishable from a complete answer except by reading theprose.diff --git a/scripts/shortcuts/review/prompts/fix.md b/scripts/shortcuts/review/prompts/fix.mdindex 842ac02e01..312c7c83bf 100644--- a/scripts/shortcuts/review/prompts/fix.md+++ b/scripts/shortcuts/review/prompts/fix.md@@ -60,7 +60,7 @@ Run a CodeRabbit-style review against these axes:**Project standards** (from `CLAUDE.md`)- New Rust functionality under `crates/openhuman-core/src/<domain>/`, not root-level `.rs` files.-- Domain exposure via `schemas.rs` + registry — not ad-hoc branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-core/src/core/jsonrpc/`.+- Domain exposure via `schemas.rs` + registry — not ad-hoc branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-rpc/src/server/`.- No dynamic `import()` in production `app/src` code.- Frontend `VITE_*` reads via `app/src/utils/config.ts`.- `crates/openhuman-app` is desktop-only.diff --git a/scripts/shortcuts/review/prompts/review.md b/scripts/shortcuts/review/prompts/review.mdindex 55b835919e..451f111ea7 100644--- a/scripts/shortcuts/review/prompts/review.md+++ b/scripts/shortcuts/review/prompts/review.md@@ -37,7 +37,7 @@ Skipping this produces shallow reviews that miss architectural issues.**Project standards** (from `CLAUDE.md`)- New Rust functionality lives in a subdirectory under `crates/openhuman-core/src/`, not root-level `.rs` files.-- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `core/jsonrpc/`.+- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `openhuman-rpc/src/server/`.- No dynamic `import()` in production `app/src` code.- Frontend reads `VITE_*` via `app/src/utils/config.ts`, not `import.meta.env` directly.- `crates/openhuman-app` is desktop-only; no Android/iOS branches there.diff --git a/scripts/shortcuts/work/prompts/start.md b/scripts/shortcuts/work/prompts/start.mdindex 37ef3df7ab..3d7679ae58 100644--- a/scripts/shortcuts/work/prompts/start.md+++ b/scripts/shortcuts/work/prompts/start.md@@ -27,7 +27,7 @@ Ground the change in the existing codebase before writing any code:- New functionality goes in a **dedicated subdirectory** under `crates/openhuman-core/src/<domain>/`. Do **not** add new standalone `*.rs` files at the `crates/openhuman-core/src/` root.- Domain `mod.rs` is export-focused; operational code in `ops.rs` / `store.rs` / `types.rs` / `schemas.rs`.-- Expose features through the controller registry — never add domain branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-core/src/core/jsonrpc/`.+- Expose features through the controller registry — never add domain branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-rpc/src/server/`.- Use the event bus singletons (`publish_global` / `subscribe_global` / `register_native_global` / `request_native_global`); never construct `EventBus` / `NativeRegistry` directly.- Return `Outcome<T>` per `AGENTS.md`.diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex 66d492d9d8..63f4551a99 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -2850,7 +2850,7 @@ async fn json_rpc_thread_not_found_errors_are_structured() {assert_eq!(append_err["data"]["thread_id"], thread_id);// The transport layer no longer stamps the RPC method into the structured// error data — the domain controller emits a method-agnostic envelope and- // core/jsonrpc/http/rpc_handler.rs surfaces it verbatim. The frontend keys on `kind` ++ // openhuman-rpc/src/server/http/rpc_handler.rs surfaces it verbatim. The frontend keys on `kind` +// `thread_id` (see `coreRpcClient.isThreadNotFoundRpcData`), not method.assert!(append_err["data"]["method"].is_null(),diff --git a/tests/observability_wallet_expected_e2e.rs b/tests/observability_wallet_expected_e2e.rsindex f15e8a1afd..7209db4369 100644--- a/tests/observability_wallet_expected_e2e.rs+++ b/tests/observability_wallet_expected_e2e.rs@@ -8,7 +8,7 @@//! inverted in both directions at once.//!//! The part that regressed is specifically the **context-wrapped** form.-//! `core/jsonrpc/http/rpc_handler.rs` already demoted the bare sentinel via an exact-equality+//! `openhuman-rpc/src/server/http/rpc_handler.rs` already demoted the bare sentinel via an exact-equality//! predicate, but `hosted/orchestration/schemas.rs` lifts the wallet error//! into an RPC failure with//!