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: files changed .claude/agents/pr-manager-lite.md,.claude/agents/pr-manager.md,.claude/agents/p
Steven Enamakel5925b7353b3b
diff --git a/.claude/agents/pr-manager-lite.md b/.claude/agents/pr-manager-lite.mdindex 494dac7f94..d95aa11e73 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.rs`.+- Domain exposure via `schemas.rs` + registry — not ad-hoc branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-core/src/core/jsonrpc/`.- 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 303d936c64..5054eee778 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.rs`.+- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `core/jsonrpc/`.- 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 bd20cf112c..f2a866f842 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.rs`.+- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `core/jsonrpc/`.- 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/app/test/e2e/specs/agent-harness-behaviors.spec.ts b/app/test/e2e/specs/agent-harness-behaviors.spec.tsindex ab4525690b..a5d5316628 100644--- a/app/test/e2e/specs/agent-harness-behaviors.spec.ts+++ b/app/test/e2e/specs/agent-harness-behaviors.spec.ts@@ -12,7 +12,7 @@* Approval gate notes (verified against the codebase, not the issue text):* - `ApprovalGate` installs by default under the desktop shell and parks* `Prompt`-class external-effect tool calls on interactive chat turns- * (`crates/openhuman-core/src/core/jsonrpc.rs` boot path → `register_approval_surface_subscriber`).+ * (`crates/openhuman-core/src/core/runtime/bootstrap.rs` boot path → `register_approval_surface_subscriber`).* - Default autonomy is `Supervised` (`config/schema/autonomy.rs:157`), so the* `Write` command class routes through the gate as `Prompt`* (`security/policy/command_checks.rs:163-166`).diff --git a/crates/openhuman-app/src/core_process_tests.rs b/crates/openhuman-app/src/core_process_tests.rsindex 1e5f6d6f68..c1679f8893 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.rs::root_handler`.+ // Mirrors the JSON shape produced by `core/jsonrpc/http/mod.rs::root_handler`.let body = r#"{"name": "openhuman","ok": true,diff --git a/crates/openhuman-core/src/agent/harness_init/README.md b/crates/openhuman-core/src/agent/harness_init/README.mdindex 4f756614bf..f87f925cc2 100644--- a/crates/openhuman-core/src/agent/harness_init/README.md+++ b/crates/openhuman-core/src/agent/harness_init/README.md@@ -46,7 +46,7 @@ Steps delegate to existing idempotent provisioning code — `runtime::python`- `core::runtime::services::start_boot_once_jobs` spawns `run_harness_init`(fire-and-forget) when `ServiceSet.harness_init` is true. It is called from- `start_core_runtime_services` in `core/jsonrpc.rs`, deliberately outside+ `start_core_runtime_services` in `core/runtime/bootstrap.rs`, deliberately outside`bootstrap_core_runtime`, so a build-only embedder never starts it.- `ServiceSet` (`core/runtime/builder.rs`) turns it on in the `desktop()` and`embedded()` presets and off in `headless_api()` and `none()`.diff --git a/crates/openhuman-core/src/agent/learning/README.md b/crates/openhuman-core/src/agent/learning/README.mdindex 689bc0efb0..fe8f54e68a 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 — i.e. 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-core/src/core/runtime/subscribers.rs` (`register_domain_subscribers`, inside the `plan.agent` block — i.e. 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 52f2a0cc2d..7804307bed 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.rs` treats as "clear the app session and+ /// sentinel, which `core/jsonrpc/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.rs`) classify it as session expiry: it skips the+/// dispatcher (`core/jsonrpc/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.rs`'s `SessionExpired` publish+ // session to expire and `core/jsonrpc/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 fdfb15edab..896e5880b4 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.rs`'s `is_session_expired_error` treats that sentinel as+/// `core/jsonrpc/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.rs::is_session_expired_error` clear an+ // that would make `core/jsonrpc/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 629897daec..3fb8aca55d 100644--- a/crates/openhuman-core/src/channels/README.md+++ b/crates/openhuman-core/src/channels/README.md@@ -28,7 +28,7 @@ The domain lives behind the `channels` feature (default-ON, #4801), except two d| `controllers/` | `channels.*` RPC namespace, `OpenHumanChannelBackend`, provider definitions ([README](controllers/README.md)) || `tests/` | Cross-channel integration test suite (`#[cfg(all(feature = "channels", test))]`) |-Flat files: `bus.rs` (`ChannelInboundSubscriber`, handles `DomainEvent::ChannelInboundMessage` published by the socket transport layer in `platform/socket/event_handlers.rs` and replies through the REST API; registered by `register_domain_subscribers` in `core/jsonrpc.rs`, not here), `cli.rs` (ungated `CliChannel`), `commands.rs` (`doctor_channels` and listener health classification), `context.rs` (`ChannelRuntimeContext`, per-sender conversation history, timeouts), `proactive.rs` (`ProactiveMessageSubscriber`, subscribes `DomainEvent::ProactiveMessageRequested` and delivers to the active channel), `relay_runtime.rs` (`relay_runtime_fronts_channel` / `send_outbound_intent` — the process-local relay-websocket transport handle controller sends go through when the relay fronts a channel), `routes.rs` (per-sender route overrides and runtime commands), `system_prompt.rs`, `traits.rs` (ungated `Channel`/`SendMessage` re-export).+Flat files: `bus.rs` (`ChannelInboundSubscriber`, handles `DomainEvent::ChannelInboundMessage` published by the socket transport layer in `platform/socket/event_handlers.rs` and replies through the REST API; registered by `register_domain_subscribers` in `core/runtime/subscribers.rs`, not here), `cli.rs` (ungated `CliChannel`), `commands.rs` (`doctor_channels` and listener health classification), `context.rs` (`ChannelRuntimeContext`, per-sender conversation history, timeouts), `proactive.rs` (`ProactiveMessageSubscriber`, subscribes `DomainEvent::ProactiveMessageRequested` and delivers to the active channel), `relay_runtime.rs` (`relay_runtime_fronts_channel` / `send_outbound_intent` — the process-local relay-websocket transport handle controller sends go through when the relay fronts a channel), `routes.rs` (per-sender route overrides and runtime commands), `system_prompt.rs`, `traits.rs` (ungated `Channel`/`SendMessage` re-export).## Calls into@@ -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-core/src/core/runtime/subscribers.rs` — `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/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rsindex 47476b0137..167683eb88 100644--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs@@ -128,7 +128,7 @@ async fn start_channels_inner(mut config: Config) -> Result<()> {);}// Note: WebhookRequestSubscriber and ChannelInboundSubscriber are registered- // in bootstrap_core_runtime() (crates/openhuman-core/src/core/jsonrpc.rs) to avoid double-registration+ // in bootstrap_core_runtime() (crates/openhuman-core/src/core/runtime/bootstrap.rs) to avoid double-registration// when both startup paths run in the same process.let provider_runtime_options = provider::ProviderRuntimeOptions {diff --git a/crates/openhuman-core/src/core/event_bind_tokens.rs b/crates/openhuman-core/src/core/event_bind_tokens.rsindex 13a207bd4b..becd83cb7b 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.rs` consumes them.+//! and the `/events` handler in `crates/openhuman-core/src/core/jsonrpc/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 ec0a387b78..ff49886f60 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.///- /// `jsonrpc.rs` already demoted the *bare* message via+ /// `core/jsonrpc/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- // `jsonrpc.rs`, which redacts because its messages embed+ // `core/jsonrpc/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 fc1b59bfec..984e6dff48 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.rs`).+ // prefix (`rpc.invoke_method` re-emit shape from `crates/openhuman-core/src/core/jsonrpc/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/cron/scheduler_gate/README.md b/crates/openhuman-core/src/cron/scheduler_gate/README.mdindex 7ebc4d92a1..37514ac5fe 100644--- a/crates/openhuman-core/src/cron/scheduler_gate/README.md+++ b/crates/openhuman-core/src/cron/scheduler_gate/README.md@@ -59,7 +59,7 @@ Consumed in-process across the codebase (discoverable via `grep scheduler_gate`)- **Background workers / pipelines**: `memory/schema.rs`, `memory_queue/worker.rs`, `memory_tree/tree/rpc.rs`, `memory_sync/composio/periodic.rs`, `subconscious/engine.rs`, `learning/reflection.rs`, `autocomplete/core/engine.rs`, `task_sources/route.rs`, `agent/triage/evaluator.rs`.- **Inference layer**: `inference/provider/openhuman_backend.rs`, `inference/provider/factory.rs`, `inference/local/service/{vision_embed.rs,public_infer.rs}`, `inference/voice/postprocess.rs`.- **Credentials lifecycle** (signed-out kill switch): `credentials/ops.rs`, `credentials/bus.rs`.-- **Bootstrap / transport**: `core/jsonrpc.rs` (calls `init_global` during server bootstrap), `core/observability.rs`, plus the domain wiring in `openhuman/mod.rs` and config schema in `config/schema/scheduler_gate.rs`.+- **Bootstrap / transport**: `core/runtime/subscribers.rs` (calls `init_global` during server bootstrap), `core/observability.rs`, plus the domain wiring in `openhuman/mod.rs` and config schema in `config/schema/scheduler_gate.rs`.## Notes / gotchasdiff --git a/crates/openhuman-core/src/desktop/app_state/README.md b/crates/openhuman-core/src/desktop/app_state/README.mdindex b8537ff5e6..27dff36241 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-core/src/core/runtime/bootstrap.rs` — `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/notifications/README.md b/crates/openhuman-core/src/desktop/notifications/README.mdindex e5f336a95e..982d664083 100644--- a/crates/openhuman-core/src/desktop/notifications/README.md+++ b/crates/openhuman-core/src/desktop/notifications/README.md@@ -97,7 +97,7 @@ SQLite DB at `{workspace_dir}/notifications/notifications.db`, opened per-call v## 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/runtime/subscribers.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-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/flows/README.md b/crates/openhuman-core/src/flows/README.mdindex f834c7476c..4b6a510dc6 100644--- a/crates/openhuman-core/src/flows/README.md+++ b/crates/openhuman-core/src/flows/README.md@@ -35,7 +35,7 @@ from always-compiled code.## Public surface- `pub mod ops` (split into submodules under `ops/`, e.g. `ops/execution.rs`, `ops/resume.rs`, `ops/builder.rs`, `ops/triggers.rs`, `ops/drafts.rs`, `ops/discovery.rs`, `ops/wiring_warnings.rs`, `ops/inference_readiness.rs`) — CRUD (`flows_create/get/list/update/delete/duplicate/import/validate`), revision history (`flows_get_history`, `flows_rollback`), run lifecycle (`flows_run`, `flows_run_detached`, `flows_resume`, `flows_cancel_run`, `flows_list_runs`, `flows_list_all_runs`, `flows_get_run`, `flows_prune_runs`), `flows_set_enabled` (only `schedule` triggers need an enable-time binding — `cron::add_flow_schedule_job` / `cron::remove_job`; `app_event` flows are matched at dispatch time against enabled flows, and `webhook` binding is logged as not implemented), builder (`flows_build`, `flows_build_cancel`, `flows_search_tool_catalog`, `flows_get_tool_contract`, `flows_list_connections`, `flows_required_connections`, `flows_approval_manifest`), discovery (`flows_discover`, `flows_list_suggestions`, `flows_dismiss_suggestion`, `flows_mark_suggestion_built`), drafts (`flows_draft_create/get/update/list/delete/promote`), and boot/periodic reconciliation (`sweep_orphaned_running_runs_on_boot`, `reconcile_schedule_triggers_on_boot`, `sweep_expired_parked_runs`).-- `pub mod bus` (split into `bus/trigger.rs`, `bus/run_digest.rs`, `bus/dedup_commit.rs`) — three subscribers, all constructed in `core/jsonrpc.rs`: `FlowTriggerSubscriber` (the trigger → run bridge: `DomainEvent::FlowScheduleTick` and `ComposioTriggerReceived` are matched against enabled flows' trigger nodes and spawn `ops::flows_run`; `WebhookIncomingRequest` is observed and logged only — webhook dispatch is not implemented), `FlowRunDigestSubscriber` (on a successful `FlowRunFinished`, writes a run digest into the flow's private memory namespace), and `DedupCommitSubscriber` (on `FlowRunFinished`, commits or rolls back every `dedup` node's tentative key set). `extract_trigger_kind` / `extract_trigger_config` are reused by `ops` to decide what `flows_set_enabled` and `flows_update` must bind or rebind.+- `pub mod bus` (split into `bus/trigger.rs`, `bus/run_digest.rs`, `bus/dedup_commit.rs`) — three subscribers, all constructed in `core/runtime/subscribers.rs`: `FlowTriggerSubscriber` (the trigger → run bridge: `DomainEvent::FlowScheduleTick` and `ComposioTriggerReceived` are matched against enabled flows' trigger nodes and spawn `ops::flows_run`; `WebhookIncomingRequest` is observed and logged only — webhook dispatch is not implemented), `FlowRunDigestSubscriber` (on a successful `FlowRunFinished`, writes a run digest into the flow's private memory namespace), and `DedupCommitSubscriber` (on `FlowRunFinished`, commits or rolls back every `dedup` node's tentative key set). `extract_trigger_kind` / `extract_trigger_config` are reused by `ops` to decide what `flows_set_enabled` and `flows_update` must bind or rebind.- `pub mod catalogue` — lists saved flows as `Workflow` entries with `WorkflowScope::Flow` in the shared skill catalogue, so `skill_search` sees one list instead of skills and flows separately.- `pub mod node_contracts` — host overlay on `tinyflows::catalog`'s node-kind contracts: attaches host-specific facts (which `tool_call` slugs resolve to Composio vs. native `oh:` tools, which trigger kinds actually dispatch here) without touching the portable contracts. Re-exports `all_node_kind_contracts`, `node_kind_contract`, `NODE_KINDS`, `ConfigField`, `PortSpec`, `NodeKindContract`.- `mod store` / `mod draft_store` (private) — bind `tinyflows_sqlite::flows` / `tinyflows_sqlite::drafts` to `<workspace_dir>/flows`; `kv_get`, `kv_set`, and `upsert_flow_run_step` are re-exported from `store` for the `tinyflows::caps::FlowStateStore` seam and the run observer.@@ -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-core/src/core/runtime/subscribers.rs` — 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/hooks/README.md b/crates/openhuman-core/src/hooks/README.mdindex 38ef23d2a2..a0681aaabd 100644--- a/crates/openhuman-core/src/hooks/README.md+++ b/crates/openhuman-core/src/hooks/README.md@@ -115,7 +115,7 @@ therefore has no derived pre-event — denying it belongs to `preToolUse`. The## Wiring-- `crate::hooks::init(&cfg)` is called from `core/jsonrpc.rs` during core+- `crate::hooks::init(&cfg)` is called from `core/runtime/bootstrap.rs` during coreboot: it sets host context, reads config, and installs or uninstalls thebridge. Disabled (`config::schema::hooks::HooksConfig::enabled = false`)or empty config uninstalls the bridge entirely so an unconfigured host paysdiff --git a/crates/openhuman-core/src/inference/README.md b/crates/openhuman-core/src/inference/README.mdindex b4c783d22c..39d4a2dc96 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-core/src/core/jsonrpc/http/mod.rs` (`/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 b55df15bf8..f69fc83eb0 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.rs`:+//! The router is mounted by `crates/openhuman-core/src/core/jsonrpc/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 99f5a6de94..058f306ca1 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.rs` via `.nest("/v1", inference::http::router())`.+//! in `crates/openhuman-core/src/core/jsonrpc/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 8e458c8fe4..061564b3fb 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-core/src/core/runtime/subscribers.rs` (~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-core/src/core/runtime/subscribers.rs` — 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 8edcd0528e..d2b6fe96ff 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-core/src/core/runtime/subscribers.rs` (~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-core/src/core/runtime/subscribers.rs` — 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/README.md b/crates/openhuman-core/src/mcp/README.mdindex 7c6943ee99..60d65d4633 100644--- a/crates/openhuman-core/src/mcp/README.md+++ b/crates/openhuman-core/src/mcp/README.md@@ -82,7 +82,7 @@ more — that all lives in `tinymcp` now. Readhost service; it never fails (MCP being unavailable must not stop the corecoming up). `mcp::start_boot_jobs(config)` additionally spawns theinstalled-server boot pass and the reconnect supervisor. Both are called from-`core/jsonrpc.rs` (`start` on the RPC-enable path) and+`core/runtime/subscribers.rs` (`start` on the RPC-enable path) and`core/runtime/services.rs` (`start_boot_jobs` on the boot path); each isidempotent so the two callers can't double-register or double-spawn.diff --git a/crates/openhuman-core/src/mcp/registry/README.md b/crates/openhuman-core/src/mcp/registry/README.mdindex c2824067ee..dd1f31fc27 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-core/src/core/jsonrpc/http/oauth_mcp.rs` — the `/oauth/mcp/callback`route calls `oauth::complete`.- `crates/openhuman-core/src/tools/registry/ops.rs` and`crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs` —diff --git a/crates/openhuman-core/src/mcp/registry/stub.rs b/crates/openhuman-core/src/mcp/registry/stub.rsindex e60a49a475..d4c7c164b3 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.rs`+ /// same `Err(String)` shape for an unknown state, and its `core/jsonrpc/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/platform/cost/README.md b/crates/openhuman-core/src/platform/cost/README.mdindex d830972697..d785919889 100644--- a/crates/openhuman-core/src/platform/cost/README.md+++ b/crates/openhuman-core/src/platform/cost/README.md@@ -74,7 +74,7 @@ None. The module has no `bus.rs` and no `DomainEvent` publishers/subscribers.## 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-core/src/core/runtime/bootstrap.rs` — 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/cost/global_tests.rs b/crates/openhuman-core/src/platform/cost/global_tests.rsindex 591252865f..d8da04885d 100644--- a/crates/openhuman-core/src/platform/cost/global_tests.rs+++ b/crates/openhuman-core/src/platform/cost/global_tests.rs@@ -53,7 +53,7 @@ fn build_token_usage_emits_when_tokens_present_even_with_zero_cost() {////// The tracker is a process-wide `OnceCell` shared by every test in this/// binary — including the runtime-bootstrap tests, which call-/// `platform::cost::init_global` through `core/jsonrpc.rs`. A test therefore+/// `platform::cost::init_global` through `core/runtime/bootstrap.rs`. A test therefore/// cannot assume it owns the global, and **cannot assume the global is/// absent**: that is precisely why the two tests below assert on records/// written through whichever tracker is installed, rather than ondiff --git a/crates/openhuman-core/src/platform/health/README.md b/crates/openhuman-core/src/platform/health/README.mdindex 008b8b9bd4..ccec90d3c1 100644--- a/crates/openhuman-core/src/platform/health/README.md+++ b/crates/openhuman-core/src/platform/health/README.md@@ -76,7 +76,7 @@ None on disk. State lives in a process-global `OnceLock<HealthRegistry>` (lazy-i## Used by- `crates/openhuman-core/src/core/all.rs` — registers `all_health_*` controllers into the registry.-- `crates/openhuman-core/src/core/jsonrpc.rs` — references health (snapshot/system_info surface).+- `crates/openhuman-core/src/core/runtime/subscribers.rs` — references health (snapshot/system_info surface).- `crates/openhuman-core/src/channels/runtime/{startup,supervision}.rs` and `crates/openhuman-core/src/channels/tests/health.rs` — channel runtime updates component health.- `crates/openhuman-core/src/cron/scheduler.rs`, `crates/openhuman-core/src/platform/update/scheduler.rs` — emit/consume health signals.diff --git a/crates/openhuman-core/src/platform/service/README.md b/crates/openhuman-core/src/platform/service/README.mdindex 3c16fcb594..b498a65f40 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-core/src/core/runtime/subscribers.rs` at startup via `register_restart_subscriber` / `register_shutdown_subscriber`; handles are held in process-lifetime `OnceLock`s so they are never dropped.## Persistence@@ -94,7 +94,7 @@ Both subscribers are registered idempotently from `crates/openhuman-core/src/cor## 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-core/src/core/runtime/subscribers.rs` — 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 13e26873ed..904d884ea0 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-core/src/core/runtime/bootstrap.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-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 18f329a448..7b88387d21 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-core/src/core/runtime/bootstrap.rs`) 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-core/src/core/runtime/bootstrap.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.## Notes / gotchasdiff --git a/crates/openhuman-core/src/security/README.md b/crates/openhuman-core/src/security/README.mdindex 1c650c6cb7..bd75f8f6fa 100644--- a/crates/openhuman-core/src/security/README.md+++ b/crates/openhuman-core/src/security/README.md@@ -143,7 +143,7 @@ a feature work:`security/approval/gate.rs`'s`DEFAULT_APPROVAL_TTL` is 10 minutes and a timed-out park returns `Deny`;`approval_gate_boot_decision` (`core/types.rs`, applied in- `core/jsonrpc.rs`) always installs the gate for `HostKind::TauriShell` and+ `core/runtime/bootstrap.rs`) always installs the gate for `HostKind::TauriShell` andignores `OPENHUMAN_APPROVAL_GATE=0` there — only CLI, Docker, and libraryhosts may opt out.diff --git a/crates/openhuman-core/src/security/approval/README.md b/crates/openhuman-core/src/security/approval/README.mdindex 0d349d54fb..3d110bea48 100644--- a/crates/openhuman-core/src/security/approval/README.md+++ b/crates/openhuman-core/src/security/approval/README.md@@ -83,7 +83,7 @@ SQLite DB at `{workspace_dir}/approval/approval.db`, table `pending_approvals` (## Used by-- `crates/openhuman-core/src/core/jsonrpc.rs` — installs the global gate (`ApprovalGate::init_global`) at startup; wires the approval RPCs.+- `crates/openhuman-core/src/core/runtime/bootstrap.rs` — installs the global gate (`ApprovalGate::init_global`) at startup; 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`.@@ -101,7 +101,7 @@ SQLite DB at `{workspace_dir}/approval/approval.db`, table `pending_approvals` (- **Waiter registered before persist** so a fast `approval_decide` can't mark a request approved while no waiter exists (PR #2149).- **Orphan rows are intentionally preserved** across launches (issue #1339); deciding one is a DB-only audit update — no side effect can fire across processes, so the security invariant holds.- **`approve_always_for_tool` persistence is the RPC handler's job**, not the gate's — `gate.decide` only resolves the parked future and emits the audit event; `rpc::approval_decide` appends to `autonomy.auto_approve` + reloads the live policy (best-effort; failure degrades to prompting again).-- `OPENHUMAN_APPROVAL_GATE=0`/`false` skips installing the gate for CLI, Docker, and library hosts only (`approval_gate_boot_decision` in `crates/openhuman-core/src/core/types.rs`, applied in `core/jsonrpc.rs`); the Tauri shell always installs it and ignores the override. Where honored, `Prompt`-class calls run unprompted.+- `OPENHUMAN_APPROVAL_GATE=0`/`false` skips installing the gate for CLI, Docker, and library hosts only (`approval_gate_boot_decision` in `crates/openhuman-core/src/core/types.rs`, applied in `core/runtime/bootstrap.rs`); the Tauri shell always installs it and ignores the override. Where honored, `Prompt`-class calls run unprompted.- **A disabled autonomy policy parks nothing.** With `[autonomy] enabled = false` (the shipped default, see `security/README.md`) `SecurityPolicy::gate_decision` answers `Allow` for every class, so the acting tools' `external_effect_with_args` — which asks for `GateDecision::Prompt` — is `false` and the gate is never reached. The gate is still installed and still works the moment the policy is turned on; nothing here is special-cased on the flag.- A prior list-based `ApprovalManager` was removed; the gate is now the sole control reading the `autonomy.auto_approve` allowlist.diff --git a/crates/openhuman-core/src/security/devices/README.md b/crates/openhuman-core/src/security/devices/README.mdindex 442f390895..9535a462f7 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-core/src/core/runtime/subscribers.rs` via `register_device_tunnel_subscriber`. `DeviceTunnelSubscriber` (`name() = "device::tunnel"`, `domains() = ["device"]`) **handles**:- `DevicePeerOnline` / `DevicePeerOffline` → update `PEER_STATUS`.- `DeviceTunnelFrame` → complete handshake + persist `PairedDevice`.@@ -96,7 +96,7 @@ Separately, encrypted X25519 private keys are persisted as `enc2:` strings (via## 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-core/src/core/runtime/subscribers.rs` — 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/README.md b/crates/openhuman-core/src/skills/README.mdindex d80c29c237..a1ce877005 100644--- a/crates/openhuman-core/src/skills/README.md+++ b/crates/openhuman-core/src/skills/README.md@@ -29,7 +29,7 @@ Stub signatures must match the real ones exactly; `cargo check --no-default-feat| `search.rs` | `skill_search` — return a capped projection (id, name, description, scope, tags) for one matching skill instead of serializing the whole catalog, mirroring `tool_search`'s deferred-schema bargain. || `tools.rs` | LLM-callable wrappers: `WorkflowListTool` (`list_workflows`), `WorkflowDescribeTool` (`describe_workflow`), `WorkflowReadResourceTool` (`read_workflow_resource`), `WorkflowRecentRunsTool` (`list_workflow_runs`), `WorkflowReadRunLogTool` (`read_workflow_run_log`) are default-enabled; `WorkflowCreateTool` (`create_skill` — `create_workflow` belongs to the flows domain), `WorkflowInstallFromUrlTool` (`install_workflow_from_url`) and `WorkflowUninstallTool` (`uninstall_workflow`) form the default-OFF `workflow_manage` family in `tools/user_filter.rs`. Re-exported through `tools/mod.rs` behind `#[cfg(feature = "skills")]`. Launching a run is a separate tool (`RunWorkflowTool`/`AwaitWorkflowTool` in `agent/tools/run_workflow.rs`). || `bundled/` | Skills shipped **inside the binary** (including portable assets embedded by upstream crates such as `tinyflows-copilot`'s `flow-authoring` manual). `install`/`install_bundled_skills` materialise them under `<workspace>/.openhuman/builtin-skills/`; discovery scans that root as `WorkflowScope::Builtin` and only accepts a directory whose bytes still match the compiled bundle (`is_current_materialization`). Lowest scope precedence, so a user/project skill of the same name always wins. Nothing in the boot path calls `install_bundled_skills` today — only `search_tests.rs` does. |-| `bus.rs` | `TriggeredWorkflowIndex` + `TriggeredSkillSubscriber`: indexes skills that declare a `triggers:` list in frontmatter; `ensure_triggered_workflow_subscriber` (called from `channels/runtime/startup/start_channels.rs` and `core/jsonrpc.rs`) subscribes `skills::triggered_skill` on `BUS`. It only logs which skill(s) match a `DomainEvent`; launching an agent session for a match is not implemented here. |+| `bus.rs` | `TriggeredWorkflowIndex` + `TriggeredSkillSubscriber`: indexes skills that declare a `triggers:` list in frontmatter; `ensure_triggered_workflow_subscriber` (called from `channels/runtime/startup/start_channels.rs` and `core/runtime/bootstrap.rs`) subscribes `skills::triggered_skill` on `BUS`. It only logs which skill(s) match a `DomainEvent`; launching an agent session for a match is not implemented here. || `schemas/` | Controller schemas and thin handlers, split into `controller_schemas.rs`, `handlers.rs`, `helpers.rs`, `wire_types.rs`. Handlers resolve the workspace through `helpers.rs` (`resolve_workspace_dir`/`resolve_config`: `Config::load_or_init()` under a 30 s timeout, falling back to the default workspace). || `stub.rs` | Disabled-feature facade; see above. || `catalog/` | `skill_registry` — remote catalog fetch/cache/search, install/uninstall by entry id, the `skill_setup` agent. See [catalog/README.md](catalog/README.md). |diff --git a/crates/openhuman-core/src/skills/webhooks/README.md b/crates/openhuman-core/src/skills/webhooks/README.mdindex 8e1e294dde..c8d449c7e3 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`** — `name() = "webhook::request_handler"`, `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`** — `name() = "webhook::request_handler"`, `domains() = ["webhook"]`. Registered in `register_domain_subscribers()` (`crates/openhuman-core/src/core/runtime/subscribers.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.- **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).@@ -95,7 +95,7 @@ Note that nothing in the production startup path currently constructs a `Webhook- `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-core/src/core/runtime/subscribers.rs` — 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/tools/timeout/README.md b/crates/openhuman-core/src/tools/timeout/README.mdindex e6c7341860..3a0b3e08fe 100644--- a/crates/openhuman-core/src/tools/timeout/README.md+++ b/crates/openhuman-core/src/tools/timeout/README.md@@ -54,7 +54,7 @@ The global timeout governs **non-scripting** tools only — a hung network/MCP c- `crates/openhuman-core/src/tools/impl/system/{shell,node_exec,npm_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.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 (its ungated `INFRA: Once` block), so channel-less / web-chat-only cores get the configured timeout too (#5027).+- `crates/openhuman-core/src/core/runtime/subscribers.rs` — `register_domain_subscribers` seeds the runtime value from config on the always-on core boot path (its ungated `INFRA: Once` block), so channel-less / 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/boundary behaviour.## Notes / gotchasdiff --git a/crates/openhuman-core/src/voice/README.md b/crates/openhuman-core/src/voice/README.mdindex 97b222403c..2e13e1bb0e 100644--- a/crates/openhuman-core/src/voice/README.md+++ b/crates/openhuman-core/src/voice/README.md@@ -151,7 +151,7 @@ transcription count, rolling recent-transcript buffer for context) behind a- `crates/openhuman-core/src/core/all.rs` — registers the `voice` and `audio_toolkit` controllers (gated) and the `openhuman voice` CLI adapter (ungated, so the stub answers with a "voice disabled" error).- `crates/openhuman-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-core/src/core/jsonrpc/http/dictation.rs` — WebSocket upgrade for streaming dictation (`streaming::handle_dictation_ws`).- `crates/openhuman-core/src/platform/socket/event_handlers.rs` — spawns `realtime_harness::handle_voice_harness_turn` for each `voice:harness` socket event.- `crates/openhuman-core/src/web_chat/run_task.rs` — synthesizes agent reply speech and publishes PTT transcript-committed events.- `crates/openhuman-core/src/channels/host/adapters.rs` — channel-side STT provider dispatch and reply synthesis.diff --git a/crates/openhuman-core/src/voice/reply_speech.rs b/crates/openhuman-core/src/voice/reply_speech.rsindex 2c86479f31..025c6e45f1 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.rs::is_session_expired_error`)+ // sentinel so the JSON-RPC layer (`core/jsonrpc/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 ea79db1cd3..b7692c237d 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.rs`), not here: it requires+//! check lives in `dictation_ws_handler` (`crates/openhuman-core/src/core/jsonrpc/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/stub.rs b/crates/openhuman-core/src/web3/wallet/stub.rsindex ce93bedf64..daf3f4df31 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.rs` — `WALLET_NOT_CONFIGURED_MESSAGE`+//! - `core/jsonrpc/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::rpc::RpcOutcome;/// `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. `jsonrpc.rs`+/// Mirrors the real `ops::WALLET_NOT_CONFIGURED_MESSAGE` verbatim. `core/jsonrpc/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 9f87ece91b..8d0942abd8 100644--- a/crates/openhuman-core/src/web3/x402/README.md+++ b/crates/openhuman-core/src/web3/x402/README.md@@ -19,7 +19,7 @@ facade. The real payment machinery (`ops`, `schemas`, `store`, `tools`,`types`) is gated behind the default-ON `web3` Cargo feature (shared with`web3` and `web3::wallet`). When the feature is off, `stub.rs` takes itsplace and exposes only the three entry points with always-on callers:-`init_ledger` (a no-op; the boot call site in `core/jsonrpc.rs` is itself+`init_ledger` (a no-op; the boot call site in `core/runtime/bootstrap.rs` is itselfruntime-gated on `DomainGroup::Web3`), `all_x402_registered_controllers`, and`all_x402_controller_schemas` (both empty). `X402RequestTool`'s registrationand the `http_request` 402-retry path are `#[cfg(feature = "web3")]` at their@@ -114,7 +114,7 @@ which handles a 402 only as a silent fallback for any endpoint.- `crates/openhuman-core/src/core/all.rs` (~line 569) — wires`all_x402_registered_controllers` into the controller registry under`DomainGroup::Web3`.-- `crates/openhuman-core/src/core/jsonrpc.rs` (~line 2477) — calls+- `crates/openhuman-core/src/core/runtime/bootstrap.rs` (~line 2477) — calls`init_ledger(&workspace_dir, &x402_session)` at boot, itself runtime-gated on`DomainGroup::Web3`.diff --git a/crates/openhuman-core/src/web3/x402/stub.rs b/crates/openhuman-core/src/web3/x402/stub.rsindex 09fb1cdb3b..e4971b6254 100644--- a/crates/openhuman-core/src/web3/x402/stub.rs+++ b/crates/openhuman-core/src/web3/x402/stub.rs@@ -2,7 +2,7 @@//!//! Compiled only when the `web3` Cargo feature is OFF (see the gate in//! [`super`]). Only three entry points have always-on callers: `init_ledger`-//! (`core/jsonrpc.rs` boot, itself runtime-gated on `DomainGroup::Web3`) and+//! (`core/runtime/bootstrap.rs` boot, itself runtime-gated on `DomainGroup::Web3`) and//! the controller-registration pair (`core/all.rs`). The `X402RequestTool`//! registration and the http_request 402-retry path are `#[cfg(feature =//! "web3")]` at their call sites, so no other x402 surface is referenced when@@ -38,7 +38,7 @@ pub fn all_x402_registered_controllers() -> Vec<RegisteredController> {// Compiled only in the disabled build (`#[cfg(not(feature = "web3"))] mod stub;`// in `super`), so a plain `#[cfg(test)]` here runs only when x402 is compiled// out — it pins the disabled facade's callable no-op + empty-registration-// contract that `core/jsonrpc.rs` boot and `core/all.rs` rely on.+// contract that `core/runtime/bootstrap.rs` boot and `core/all.rs` rely on.#[cfg(test)]#[path = "stub_tests.rs"]mod tests;diff --git a/crates/openhuman-core/src/web_chat/README.md b/crates/openhuman-core/src/web_chat/README.mdindex 3a6f9309e4..0fcc873107 100644--- a/crates/openhuman-core/src/web_chat/README.md+++ b/crates/openhuman-core/src/web_chat/README.md@@ -130,12 +130,12 @@ Namespace `channel`, registered via- Broadcasts `WebChannelEvent` (defined in `core/socketio.rs`) over anin-process `tokio::sync::broadcast` channel. `core/socketio.rs` forwards it- to the connected Socket.IO client; `core/jsonrpc.rs` forwards the same+ to the connected Socket.IO client; `core/jsonrpc/http/events.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.- Subscribes to `DomainEvent` on `crate::core::bus::BUS` via threeprocess-lifetime, `OnceLock`-guarded subscribers registered at startup from- `core/jsonrpc.rs` and `channels/runtime/startup/start_channels.rs`:+ `core/runtime/bootstrap.rs` and `channels/runtime/startup/start_channels.rs`:`register_approval_surface_subscriber`(`ApprovalRequested`/`PlanReviewRequested` → `approval_request` /`plan_review_request`), `register_artifact_surface_subscriber`@@ -167,7 +167,7 @@ Namespace `channel`, registered via- `core/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 and+- `core/jsonrpc/http/events.rs` — subscribes the event stream for `/events` SSE andregisters the three `DomainEvent` surface subscribers at startup.- `core/all.rs` — registers `all_web_channel_registered_controllers()` under`DomainGroup::Channels`, deliberately *not* behind the `channels` featurediff --git a/crates/openhuman-rpc/src/structured_error.rs b/crates/openhuman-rpc/src/structured_error.rsindex ba0629b3ca..c14b70411d 100644--- a/crates/openhuman-rpc/src/structured_error.rs+++ b/crates/openhuman-rpc/src/structured_error.rs@@ -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.rs`.+/// `crates/openhuman-core/src/core/jsonrpc/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/scripts/shortcuts/review/prompts/fix.md b/scripts/shortcuts/review/prompts/fix.mdindex f319ccd543..cf4d496959 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.rs`.+- Domain exposure via `schemas.rs` + registry — not ad-hoc branches in `crates/openhuman-core/src/core/cli.rs` / `crates/openhuman-core/src/core/jsonrpc/`.- 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 e72a86c1fa..ae907a52a9 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.rs`.+- Controllers exposed via `schemas.rs` + registry, not ad-hoc branches in `core/cli.rs` / `core/jsonrpc/`.- 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 c0e20f9f65..8165936764 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.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/`.- Use the event bus singletons (`publish_global` / `subscribe_global` / `register_native_global` / `request_native_global`); never construct `EventBus` / `NativeRegistry` directly.- Return `RpcOutcome<T>` per `AGENTS.md`.diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex aafb21f023..b0b93ddb52 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- // jsonrpc.rs surfaces it verbatim. The frontend keys on `kind` ++ // core/jsonrpc/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 cc852d1c92..f15e8a1afd 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.-//! `jsonrpc.rs` already demoted the bare sentinel via an exact-equality+//! `core/jsonrpc/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//!