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 crates/openhuman-core/src/core/README.md,crates/openhuman-core/src/memory/guard
Steven Enamakelfe219d787d4b
diff --git a/crates/openhuman-core/src/core/README.md b/crates/openhuman-core/src/core/README.mdindex 65f3730643..3010252f4d 100644--- a/crates/openhuman-core/src/core/README.md+++ b/crates/openhuman-core/src/core/README.md@@ -41,7 +41,7 @@ logic; every controller it exposes is implemented by a domain module under| `legacy_aliases.rs` | `resolve_legacy` — rewrites retired method names before dispatch; mirrors `app/src/services/rpcMethods.ts`'s `LEGACY_METHOD_ALIASES`. || `observability.rs` | `report_error` + Sentry `before_send` filters that drop deterministic provider/updater noise. || `log_redaction.rs` | `scrub_secrets` — regex secret scrubbing shared by the Sentry path and always-on log path. |-| `rpc_log.rs` | `format_request_id` / `redact_params_for_log` — per-line RPC log formatting used by `dispatch.rs` and `jsonrpc.rs`. |+| `rpc_log.rs` | `redact_params_for_log` (key-name redaction for the `[rpc:dispatch]` trace log in `dispatch.rs`) plus `format_request_id` / `summarize_rpc_result` / `redact_result_for_trace` helpers with no caller yet. || `logging.rs` | `init_for_cli_run` / `init_for_embedded` — logger setup for each host kind. || `shutdown.rs` | Graceful shutdown signal plumbing. || `sentry_transport.rs` | Sentry client setup, gated by the `crash-reporting` feature. |@@ -128,16 +128,17 @@ Each subscribing domain owns a `bus.rs`; subscriber names use`jsonrpc.rs` builds the Axum router (`build_core_http_router`) behind the`http-server` feature: `POST /rpc`, `GET /health`, `GET /schema`,`GET /events` (SSE), `GET /events/webhooks`, `GET /events/domain`,-`GET /ws/dictation`, and the desktop/Telegram OAuth callback routes. The+`GET /ws/dictation`, the `/auth`, `/auth/telegram`, and+`/oauth/mcp/callback` callback routes, and a nested `/v1` OpenAI-compatible+inference router (`inference::http`). Thedispatch surface itself (`invoke_method`, `parse_json_params`,`default_state`, the `run_server*` `CoreBuilder` shims,`register_domain_subscribers`, `bootstrap_core_runtime`) stays compiled in aslim build with no listener bound, so the CLI and `CoreRuntime::invoke` keepworking without the HTTP feature.-`socketio.rs` bridges live domain events (web-chat, dictation, overlay-attention, core notifications, transcription, companion state) onto-Socket.IO for the desktop shell's webviews. The socketioxide/axum transport+`socketio.rs` bridges live domain events onto Socket.IO for the desktop+shell's webviews. The socketioxide/axum transportbodies are gated on `http-server`, but the payload types(`WebChannelEvent`, `TurnUsagePayload`, `SubagentUsagePayload`,`SubagentProgressDetail`) stay compiled in every build because roughly ten@@ -146,9 +147,17 @@ mod socketio;` in `mod.rs` is deliberately ungated for the same reason.`COMPANION_STATE_BUS` is a broadcast channel for shell-originated companionlifecycle events that still need to reach the native macOS notch WKWebView,which has no Tauri IPC bridge and connects to the core's Socket.IO endpoint-directly. `spawn_web_channel_bridge` fans a handful of domain broadcast-channels — including `desktop::overlay::subscribe_attention_events` (see-`desktop/overlay/README.md`) — out to every connected Socket.IO client.+directly. `spawn_web_channel_bridge` spawns one forwarding task per source:+web-chat events (`web_chat::subscribe_web_channel_events`, delivered to the+initiating client's room and the `thread:<id>` room, not broadcast),+dictation hotkeys and transcription results (`voice::dictation_listener`),+overlay attention bubbles (`desktop::overlay::subscribe_attention_events`,+see `desktop/overlay/README.md`), core notifications+(`desktop::notifications`), companion state, and — read off `BUS` as+`DomainEvent`s — session expiry, MCP setup secret requests, memory sync and+tree-build progress, channel listener health, and active-workspace changes.+Everything except web-chat is broadcast to every connected client, most under+both a colon- and an underscore-separated event name.## Auth@@ -170,9 +179,14 @@ header.prints the banner, resolves controller schemas grouped by namespace, anddispatches through the same registry RPC uses. `agent_cli.rs`,`memory_cli.rs`, and `subsystems_cli.rs` are domain-specific CLI subcommand-trees; `cli_capability.rs` is the one CLI-only exception to "wire through the-registry" — it answers build/config facts (e.g. which features this binary-was compiled with) that have no RPC analog.+trees. `cli_capability.rs` is the one CLI-only exception to "degradation is+absence": over `/rpc` and in the agent tool list an unadvertised memory+capability family is simply unregistered, but the CLI keeps its subcommand+arm and reports the build/config fact (`capability_unavailable_message`:+which bound memory driver does not advertise which family) so a human does+not mistake silence for a typo. It resolves the binding itself because plain+CLI invocations never build a `CoreContext`, so the ambient gate would+answer "everything allowed".## `runtime/` and `subsystem/`diff --git a/crates/openhuman-core/src/memory/guard/README.md b/crates/openhuman-core/src/memory/guard/README.mdindex 0fca5fd869..3820e24905 100644--- a/crates/openhuman-core/src/memory/guard/README.md+++ b/crates/openhuman-core/src/memory/guard/README.md@@ -26,9 +26,9 @@ raw driver, and there is no second, unguarded shape to reach for instead.- Family decorators (`families.rs` + `families_part_0{1..4}.rs`) — one`decorator!`-generated struct per optional capability family (`GuardedTree`,`GuardedProfile`, `GuardedGraph`, … — 23 of the contract's 26 families),- each present exactly when the bound driver advertises that family. The- "ten decorators" / "thirteen families" figures in the rustdoc predate the- contract growing.+ each present exactly when the bound driver advertises that family. (The+ "ten decorators" / "thirteen families" figures still in `families.rs`,+ `policy.rs` and `test_support.rs` predate the contract growing.)- `mandatory.rs` — the three families every driver has (`MemoryCore`,`MemoryRecall`, `MemoryPortability`), where steps 3, 4 and 6 land for thealways-present surface.diff --git a/crates/openhuman-core/src/memory/ops/README.md b/crates/openhuman-core/src/memory/ops/README.mdindex ca1f2a9934..211a4aa73f 100644--- a/crates/openhuman-core/src/memory/ops/README.md+++ b/crates/openhuman-core/src/memory/ops/README.md@@ -12,13 +12,13 @@ rpc;`) kept for call sites that predate the tinymemory-core extraction.| Module | RPC family || ------ | ---------- || `envelope.rs` | `ApiEnvelope`/`ApiError` wrapping shared by every envelope-style handler (init, list_documents, query_namespace, recall_*, ai_*_memory_file). |-| `helpers.rs` | Formatting, default constants, path validators, and `active_memory_client` — the unguarded driver lookup used where no typed contract twin exists yet. |-| `guard.rs` | `active_memory_guard` — the guarded-driver lookup handlers use instead of `helpers::active_memory_client` when the operation has a typed contract twin (`docs/specs/memory-guard-allowlist.md`). |+| `helpers.rs` | Formatting, default constants, path validators, and `current_workspace_dir`. It used to own `active_memory_client`, the unguarded engine lookup; that is gone (#5560) and the file carries a note where it stood. |+| `guard.rs` | `active_memory_guard` — how a handler reaches the guarded driver (`CoreContext::memory()` under dispatch, a `binding::for_workspace` fallback for pre-context tests). Handlers that need the binding itself use `memory::binding::for_config`. || `documents.rs` | Document/namespace direct API and the envelope-style façade (`memory_init`, `memory_list_documents`, `memory_query_namespace`, `recall_*`). || `kv_graph.rs` | Key-value and knowledge-graph handlers. || `sync.rs` | `memory_sync_*` and `memory_ingestion_status`. || `learn.rs` | `memory_learn_all`. |-| `provider.rs` | `memory_provider_status` / `memory_subsystem_status` — reports what the memory driver slot is bound to; deliberately bypasses the guard (a liveness probe is not product code). |+| `provider.rs` | `memory_provider_status` / `memory_subsystem_status` — reports what the memory driver slot is bound to; its health probe deliberately uses `unguarded_provider()` (a liveness probe is not product code; allowlisted in `../bypass_allowlist_tests.rs`). || `files.rs` | `ai_*_memory_file` handlers (`tokio::fs`). || `maintenance.rs` | Scheduler-driven housekeeping against the `Maintenance` capability family. || `tool_memory.rs` | Tool-scoped rule read/write handlers. |@@ -26,22 +26,23 @@ rpc;`) kept for call sites that predate the tinymemory-core extraction.## The ops ↔ schemas mirror-`memory::ops` and [`memory::schemas`](../schemas/) mirror each other-one-to-one by RPC family (`documents`, `kv_graph`, `sync`, `learn`,-`provider`, `files`, `tool_memory`, plus `core_recall`/`ingest` split out of-`documents`' schema side). `schemas` defines the wire-facing-`ControllerSchema`s and thin handler glue; `ops` holds the actual business-logic each handler calls into. Each schema family publishes its own+The seven handler families (`documents`, `kv_graph`, `sync`, `learn`,+`provider`, `files`, `tool_memory`) each have a twin in+[`memory::schemas`](../schemas/); `envelope`, `helpers`, `guard` and+`maintenance` are ops-only. `schemas` defines the wire-facing+`ControllerSchema`s and thin handler glue; `ops` holds the logic each handler+calls into. On the schema side `documents` is partitioned three ways+(`core_recall` / `documents` / `ingest`), which is why nine`all_<family>_controller_schemas()` / `all_<family>_registered_controllers()`-pair so `core::all` can register one capability family at a time rather than-the namespace as a whole.+pairs come out of seven files — so `core::all` can register one capability+family at a time rather than the namespace as a whole.-Do not confuse `memory::schemas/` (this mirror, one submodule per `ops`-family) with `memory::schema/` (singular) — that is a different module: the-controller-schema *definitions* (`definitions.rs`), handler glue-(`handlers.rs`) and registry (`registry.rs`) that stayed host-side from-before the family split, exposing its own `all_controller_schemas` /-`all_registered_controllers`.+Do not confuse `memory/schemas/` (this mirror) with `memory/schema/`+(singular) — that is the `memory_tree` namespace's controller schemas+(`definitions.rs` / `handlers.rs` / `registry.rs`: chunk store, entities,+graph and maintenance methods), deliberately kept as one registry and+re-exported through `memory::tree::all_memory_tree_*`, which `core/all.rs`+registers from the tree domain's own push site.## Wiring@@ -54,11 +55,12 @@ family behind its own alias re-exported from `memory::mod`:`all_memory_kv_graph_registered_controllers`,`all_memory_sync_registered_controllers`,`all_memory_learn_registered_controllers`,-`all_memory_provider_registered_controllers` (never capability-gated — it is-what *reports* the bound driver's capabilities), and-`all_memory_tool_memory_registered_controllers`. Registering a subset (or-none) is how a build can turn a capability family off without losing the-`memory.provider_status` surface that explains why.+`all_memory_provider_registered_controllers`, and+`all_memory_tool_memory_registered_controllers`. Each push is tagged with the+`Capability` the family needs (`Core`, `Documents`, `Ingest`, `Graph`,+`Sources`, `Tree`, `ToolMemory`) so dispatch drops it when the bound driver+does not advertise that capability; `files` (host file I/O) and `provider`+(the RPC that *reports* the capability set) are pushed untagged.## Tests@@ -68,5 +70,5 @@ Each family has a `*_tests.rs` sibling (`documents_tests.rs`,`provider_tests.rs`, `sync_tests.rs`, `tool_memory_tests.rs`), plus thelegacy `../ops_tests.rs` (gated on `feature = "modules"`) that predates theper-family split and exercises private helpers via `super::*`. Tests that-drive the process-wide memory client serialize on-`GLOBAL_MEMORY_TEST_LOCK` to avoid racing on one SQLite connection.+touch the shared workspace serialize on `GLOBAL_MEMORY_TEST_LOCK` (lock order+is that lock first, then `documents_tests.rs`'s env-var lock).