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
docs: update README references from old module paths to new runtime structure
Steven Enamakele846856fd3c1
diff --git a/crates/openhuman-core/src/agent/learning/README.md b/crates/openhuman-core/src/agent/learning/README.mdindex 1b89b852b3..1701354dec 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-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).+- `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, 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/channels/README.md b/crates/openhuman-core/src/channels/README.mdindex 3c821ded72..7a7c77aa81 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-rpc/src/server/`: `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/cron/scheduler_gate/README.md b/crates/openhuman-core/src/cron/scheduler_gate/README.mdindex 7f23aede13..56474743ce 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 86bcc25cf2..b5307ab56c 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-rpc/src/server/`: `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 ca514267bd..57db78edc6 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-rpc/src/server/`: 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-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/flows/README.md b/crates/openhuman-core/src/flows/README.mdindex 8b40796162..933a35ac65 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-rpc/src/server/`: 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/integrations/composio/README.md b/crates/openhuman-core/src/integrations/composio/README.mdindex b851c02268..6202cd3e29 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-rpc/src/server/` (~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-rpc/src/server/`: 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 9c3f456acb..6aa2891bca 100644--- a/crates/openhuman-core/src/integrations/task_sources/README.md+++ b/crates/openhuman-core/src/integrations/task_sources/README.md@@ -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-rpc/src/server/`: 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/platform/cost/README.md b/crates/openhuman-core/src/platform/cost/README.mdindex da8541e273..cacfa4547b 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-rpc/src/server/`: calls `cost::init_global(cfg.cost.clone(), &workspace_dir)` at bootstrap.+- `crates/openhuman-core/src/core/runtime/subscribers.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/service/README.md b/crates/openhuman-core/src/platform/service/README.mdindex b599e7f790..0f17ee7ca9 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-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.+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-rpc/src/serv## Used by- `crates/openhuman-core/src/core/all.rs`: registers the service controllers (`all_service_registered_controllers`).-- `crates/openhuman-rpc/src/server/`: 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 6b473a3bd7..5e1bafdb5b 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-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/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 a2f9f21b7f..4b614363ed 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-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.+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-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.+- `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 f9772ee97d..ca4e6f81da 100644--- a/crates/openhuman-core/src/security/README.md+++ b/crates/openhuman-core/src/security/README.md@@ -144,7 +144,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 9ce9f8c063..5d2cc5be73 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-rpc/src/server/`: installs the global gate (`ApprovalGate::init_global`) at startup and wires the approval RPCs.+- `crates/openhuman-core/src/core/runtime/subscribers.rs`: 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`.@@ -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, and 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` and 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 1796cafba1..829c246f4d 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-rpc/src/server/` 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-rpc/src/server/`: 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 b13e4619b4..4f6da13a73 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`: returns 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`, since `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 or 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` plus `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` plus `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/subscribers.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 second 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 9bbfcacd40..9a617620d1 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-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.+Subscriber (in `bus.rs`): `WebhookRequestSubscriber`, with `name() = "webhook::request_handler"` and `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-rpc/src/server/`: 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 86190f9a34..2066d13a64 100644--- a/crates/openhuman-core/src/tools/timeout/README.md+++ b/crates/openhuman-core/src/tools/timeout/README.md@@ -7,7 +7,7 @@ Process-wide wall-clock timeout policy for tool execution (the node/tool runtimeHighest precedence first:1. `OPENHUMAN_TOOL_TIMEOUT_SECS` environment variable, an operator override. When set to a valid value (`1..=3600`) it always wins; config pushes are ignored while it is present.-2. The persisted config value (`[agent].agent_timeout_secs`), pushed in via `set_tool_timeout_secs` at startup (from `core::jsonrpc::register_domain_subscribers`, the always-on core boot path) and on every `config.update_agent_settings` RPC.+2. The persisted config value (`[agent].agent_timeout_secs`), pushed in via `set_tool_timeout_secs` at startup (from `core::runtime::subscribers::register_domain_subscribers`, the always-on core boot path) and on every `config.update_agent_settings` RPC.3. The built-in `DEFAULT_TIMEOUT_SECS` (`120`) default.## Responsibilities@@ -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-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/core/runtime/subscribers.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-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/web3/x402/README.md b/crates/openhuman-core/src/web3/x402/README.mdindex 85cc941601..30baae47e1 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 theirdiff --git a/crates/openhuman-core/src/web_chat/README.md b/crates/openhuman-core/src/web_chat/README.mdindex a0d1da113b..c324849471 100644--- a/crates/openhuman-core/src/web_chat/README.md+++ b/crates/openhuman-core/src/web_chat/README.md@@ -168,7 +168,7 @@ Namespace `channel`, registered via- `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 and+- `core/runtime/subscribers.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` feature