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: add README files for core modules
Steven Enamakelc10f305cea8a
diff --git a/crates/openhuman-core/src/config/migrations/README.md b/crates/openhuman-core/src/config/migrations/README.mdindex 72d60572ee..3d79a6b374 100644--- a/crates/openhuman-core/src/config/migrations/README.md+++ b/crates/openhuman-core/src/config/migrations/README.md@@ -83,5 +83,5 @@ Does not own a `store.rs`. Its effects are written through other layers:- **Exact `==` gating (except 0→1).** Steps 1→2 through 12→13 guard on `schema_version == N`, not `< N+1`, so a failed earlier migration cannot be silently skipped. The first step uses `< 1`.- Idempotency is guaranteed twice over: externally by the `schema_version` gate, and internally, since every migration is a no-op when re-run on already-migrated data (for example, additive merges guarded by `contains`, `is_none()` field checks, absence of a `### PROFILE.md` block).- **5→6 shares one version bump for two modules.** Both `repair_http_request_limits` and `reconcile_orphaned_providers` run; the gate advances to 6 only if both succeed. Re-running the one that already succeeded on the next launch is a no-op.-- **Adding a migration:** add a `mod` with a `<name>_tests.rs`, bump `CURRENT_SCHEMA_VERSION`, and add a `if config.schema_version == N` branch in `run_pending` that calls the module and bumps + saves on success (see the mod.rs docstring). Do not rely on a migration to initialise fresh workspaces — they never cross any gate; put creation-time seeding in `seed_new_workspace`.+- Adding a migration: add a `mod` with a `<name>_tests.rs`, bump `CURRENT_SCHEMA_VERSION`, and add a `if config.schema_version == N` branch in `run_pending` that calls the module and bumps and saves on success (see the mod.rs docstring). Do not rely on a migration to initialise fresh workspaces; they never cross any gate. Put creation-time seeding in `seed_new_workspace` instead.- Migration `run(...)` fns return `anyhow::Result<…>` to match the runner's dispatch signature even when the transform is currently infallible, so a future I/O-backed step slots in without churning the runner.diff --git a/crates/openhuman-core/src/memory/README.md b/crates/openhuman-core/src/memory/README.mdindex e0158395e6..d7f5902da0 100644--- a/crates/openhuman-core/src/memory/README.md+++ b/crates/openhuman-core/src/memory/README.md@@ -15,28 +15,28 @@ runner and fails the link check.What stays here, per that split:-- **RPC surface**: [`schemas/`](schemas/) + [`schema/`](schema/), the+- RPC surface: [`schemas/`](schemas/) + [`schema/`](schema/), thememory\_\* controller registrations, and [`read_rpc/`](read_rpc/) for reads.-- **Agent tools**: [`tools/`](tools/), [`agent/`](agent/) (the memory agent+- Agent tools: [`tools/`](tools/), [`agent/`](agent/) (the memory agent+ prompt), and the consolidated `memory_query` agent tool in[`query/`](query/) (it came back from the extracted crate because theengine crate cannot name the `Tool` trait).-- **Guard**: [`guard/`](guard/), the taint/scope/budget policy gate over+- Guard: [`guard/`](guard/), the taint/scope/budget policy gate overevery provider call.-- **Driver binding**: [`binding.rs`](binding.rs) (`memory::binding::for_config`,+- Driver binding: [`binding.rs`](binding.rs) (`memory::binding::for_config`,the workspace-keyed driver binding the Layer rules below reference) and[`driver/`](driver/), which provider backs a workspace. The built-in driveris the compiled TinyMemory TinyBus module; there is no in-process enginedriver any more.-- **Ops**: [`ops/`](ops/), RPC handlers that delegate into the core.-- **Contract facade**: [`api.rs`](api.rs) (`memory::api`), the selective+- Ops: [`ops/`](ops/), RPC handlers that delegate into the core.+- Contract facade: [`api.rs`](api.rs) (`memory::api`), the selectivere-export of `tinymemory-api` that is the bus vocabulary: see its ownmodule docs for what it excludes and why.-- **Seam impls**: [`host.rs`](host.rs): `install_memory_event_sink` and+- Seam impls: [`host.rs`](host.rs): `install_memory_event_sink` and`MemoryHostConfig for Config`. Its sibling `host_impls.rs` held the half thatonly an in-process engine could use, and went with the engine when the testbuild stopped linking one (openhuman#6161).-- **Host-owned wire shapes**: [`rpc_models.rs`](rpc_models.rs) /+- Host-owned wire shapes: [`rpc_models.rs`](rpc_models.rs) /[`ingestion_models.rs`](ingestion_models.rs), the RPC request/responseshapes that used to live in `tinymemory_core::rpc_models`, re-exported flatfrom [`mod.rs`](mod.rs) (`pub use rpc_models::*`).diff --git a/crates/openhuman-core/src/memory/conversations/README.md b/crates/openhuman-core/src/memory/conversations/README.mdindex 12490b8f91..2acb03ba9b 100644--- a/crates/openhuman-core/src/memory/conversations/README.md+++ b/crates/openhuman-core/src/memory/conversations/README.md@@ -11,16 +11,16 @@ repeated here.## Three parts-- **`store/`**: the implementation: on-disk format, root lifecycle, sharded+- `store/`: the implementation: on-disk format, root lifecycle, shardedmetadata/message locks, the warm index cache, and CRUD/search. Everythingit exposes is re-exported from `mod.rs`, so callers always name`crate::memory::conversations::{…}`, never the `store` subtree directly.-- **`blocking.rs`**: `spawn_blocking` wrappers around every store entry+- `blocking.rs`: `spawn_blocking` wrappers around every store entrypoint. The store is synchronous and takes `parking_lot` locks acrossfsync'd file I/O, so calling it from an `async fn` directly would park atokio worker thread for the whole wait; request paths must go through`blocking` instead (#5156).-- **`bus.rs`**: the `core::bus` subscriber+- `bus.rs`: the `core::bus` subscriber(`register_conversation_persistence_subscriber`) that mirrors inbound andprocessed channel turns into the store, so channel transcripts (Slack,Telegram, …) persist alongside the UI's own threads.diff --git a/crates/openhuman-core/src/platform/about_app/README.md b/crates/openhuman-core/src/platform/about_app/README.mdindex 2415db7b97..37cdada279 100644--- a/crates/openhuman-core/src/platform/about_app/README.md+++ b/crates/openhuman-core/src/platform/about_app/README.md@@ -30,7 +30,7 @@ Re-exported from `mod.rs`:- **Catalog reads** (`catalog`): `all_capabilities()`, `capabilities_by_category(CapabilityCategory)`, `lookup(&str)`, `search(&str)`.- **Ops** (`ops`): `list_capabilities(Option<CapabilityCategory>) -> RpcOutcome<Vec<Capability>>`, `lookup_capability(&str) -> Result<RpcOutcome<Capability>, String>`, `search_capabilities(&str) -> RpcOutcome<Vec<Capability>>`.- **Schema registry** (`schemas`): `about_app_schemas(&str)`, `all_about_app_controller_schemas()`, `all_about_app_registered_controllers()`.-- **Types**: `Capability`, `CapabilityCategory`, `CapabilityPrivacy`, `CapabilityStatus`, `PrivacyDataKind`.+- Types: `Capability`, `CapabilityCategory`, `CapabilityPrivacy`, `CapabilityStatus`, `PrivacyDataKind`.## RPC / controllers@@ -72,7 +72,7 @@ No dependencies on other `openhuman` domains: capability metadata for other doma## Notes / gotchas- **`privacy: None` means "unknown", not "safe"** (per `types.rs` doc). UI must not treat an unannotated capability as local-only.-- **Adding/renaming/removing a user-facing feature requires editing `CAPABILITIES`**: this is the capability catalog that CLAUDE.md's "Capability catalog" rule points at. Keep ids stable; duplicate or empty ids panic at first catalog access via `ensure_validated`.+- Adding/renaming/removing a user-facing feature requires editing `CAPABILITIES`: this is the capability catalog that CLAUDE.md's "Capability catalog" rule points at. Keep ids stable; duplicate or empty ids panic at first catalog access via `ensure_validated`.- Privacy constants encode real third-party destinations (Hugging Face, GitHub Releases, Composio `backend.composio.dev`, SearXNG, configured embedding providers, ElevenLabs, etc.): the inline comments document why several were corrected away from the generic `DERIVED_TO_BACKEND` / `LOCAL_CREDENTIALS` defaults; mirror that diligence when adding network-touching capabilities.- `Capability` fields are all `&'static str` / copy types, so `Capability` is `Copy` and the read APIs cheaply return owned `Vec`s by copying.- A capability's `domain` is a free-text label and does not always equal its `category` wire name (e.g. `embeddings`, `wallet`, `runtime_python`, `devices`, `desktop_companion`, `security`, `tools`, `memory`).diff --git a/crates/openhuman-core/src/platform/service/README.md b/crates/openhuman-core/src/platform/service/README.mdindex 4bca8b1e54..b21e1a086d 100644--- a/crates/openhuman-core/src/platform/service/README.md+++ b/crates/openhuman-core/src/platform/service/README.md@@ -78,10 +78,10 @@ Both subscribers are registered idempotently from `crates/openhuman-core/src/cor## Persistence-- **Daemon-host prefs**: `daemon_host_config.json` next to the main config (`DaemonHostConfig { show_tray }`, default `true`); read/written async by `daemon_host.rs`.-- **Daemon state path**: `daemon_state.json` next to config (`daemon::state_file_path`), consumed by doctor/health (not written here).-- **Service unit files**: written by the per-OS impls (macOS plist in `~/Library/LaunchAgents`, Linux systemd user unit, Windows scheduled task).-- **Mock state**: `service-mock-state.json` (overridable via `OPENHUMAN_SERVICE_MOCK_STATE_FILE`) tracking `installed`/`running`/`agent_running`/forced `failures`, only when the mock is enabled.+- Daemon-host prefs: `daemon_host_config.json` next to the main config (`DaemonHostConfig { show_tray }`, default `true`); read/written async by `daemon_host.rs`.+- Daemon state path: `daemon_state.json` next to config (`daemon::state_file_path`), consumed by doctor/health (not written here).+- Service unit files: written by the per-OS impls (macOS plist in `~/Library/LaunchAgents`, Linux systemd user unit, Windows scheduled task).+- Mock state: `service-mock-state.json` (overridable via `OPENHUMAN_SERVICE_MOCK_STATE_FILE`) tracking `installed`/`running`/`agent_running`/forced `failures`, only when the mock is enabled.## Dependenciesdiff --git a/crates/openhuman-core/src/platform/socket/README.md b/crates/openhuman-core/src/platform/socket/README.mdindex 944c89865e..ecfefe0f4d 100644--- a/crates/openhuman-core/src/platform/socket/README.md+++ b/crates/openhuman-core/src/platform/socket/README.md@@ -93,7 +93,7 @@ None of its own. State (`status`, `socket_id`, `error`, attached `WebhookRouter`## Notes / gotchas-- **Event-name constants in `types.rs` (`runtime:socket-state-changed`, `server:event`) are grep-anchored**: the frontend subscribes to those exact strings; a rename silently breaks the Tauri event bridge (locked by a test).+- Event-name constants in `types.rs` (`runtime:socket-state-changed`, `server:event`) are grep-anchored: the frontend subscribes to those exact strings; a rename silently breaks the Tauri event bridge (locked by a test).- **Payload content is never logged** at any level: webhook bodies / channel messages / Composio payloads can carry PII, secrets, or tokens. Only byte-length and structural shape are logged. This also dodged a UTF-8 char-boundary panic that used to slice raw payloads at byte 500 (OPENHUMAN-TAURI-KC / #1814).- `connect` rejects an empty/whitespace token immediately rather than spawning a doomed retry loop; `connect_with_provider` does the same eager pre-check via the provider.- The reconnect loop bounds "fresh-token immediate retry" to **one** per cycle so a provider that returns a different non-empty token every call cannot hot-loop without sleeping or escalating (CodeRabbit Major, #2905).diff --git a/crates/openhuman-core/src/platform/startup/README.md b/crates/openhuman-core/src/platform/startup/README.mdindex c657cc1cc8..5ebfb15882 100644--- a/crates/openhuman-core/src/platform/startup/README.md+++ b/crates/openhuman-core/src/platform/startup/README.md@@ -47,7 +47,7 @@ No own state/store. It triggers migrations that mutate on-disk workspace artifac## Notes / gotchas-- **Non-fatal by design**: every migration branch logs and continues; a failed migration must never block startup.-- **Idempotency is delegated**: this module does not track whether a migration already ran: it relies on each helper's own `already_done` markers. Re-running is safe.-- **Grep-friendly log prefixes**: `[runtime]` for session-layout, `[migration::welcome-to-orchestrator]` for the thread/artifact migration.+- Non-fatal by design: every migration branch logs and continues; a failed migration must never block startup.+- Idempotency is delegated: this module does not track whether a migration already ran: it relies on each helper's own `already_done` markers. Re-running is safe.+- Grep-friendly log prefixes: `[runtime]` for session-layout, `[migration::welcome-to-orchestrator]` for the thread/artifact migration.- Module is intentionally minimal: no `types.rs`/`store.rs`/`schemas.rs` because it holds no domain types, no persisted state, and no RPC surface.diff --git a/crates/openhuman-core/src/platform/update/README.md b/crates/openhuman-core/src/platform/update/README.mdindex f9fe445b3b..65c48fd185 100644--- a/crates/openhuman-core/src/platform/update/README.md+++ b/crates/openhuman-core/src/platform/update/README.md@@ -71,10 +71,10 @@ None. No `store.rs`: staged binaries are written to the filesystem (current-exe## Notes / gotchas- **`staging_dir` is intentionally ignored** by `update_apply`: it always uses the safe default (current-exe parent dir) regardless of caller input, for security.-- **Fail-closed policy**: if `config.update.rpc_mutations_enabled` is false (or config fails to load) `apply`/`run` are rejected; `check`/`version` remain available.+- Fail-closed policy: if `config.update.rpc_mutations_enabled` is false (or config fails to load) `apply`/`run` are rejected; `check`/`version` remain available.- **Restart strategies** (`UpdateRestartStrategy`): `SelfReplace` publishes a `service_restart` (process exits shortly after the RPC returns; `restart_requested` reflects whether the publish succeeded); `Supervisor` stages only and expects an external supervisor to restart.-- **Scheduler interval floor**: requested `interval_minutes` is clamped up to `MIN_INTERVAL_MINUTES = 10` to avoid GitHub unauthenticated rate-limits; the first check runs immediately.+- Scheduler interval floor: requested `interval_minutes` is clamped up to `MIN_INTERVAL_MINUTES = 10` to avoid GitHub unauthenticated rate-limits; the first check runs immediately.- **Version compare** (`is_newer`) is dot-split numeric with `v`-prefix stripping: not full semver (no pre-release/build metadata handling).-- **Sentry hygiene**: transport-level reqwest failures (`is_connect`/`is_timeout`/`is_request`) and transient HTTP statuses are logged at `warn` and skipped from `report_error`; a regression guard test hits an unroutable TEST-NET-1 host to lock the classifier.-- **Test env locking**: tests touching `update_apply` take `config::TEST_ENV_LOCK` because the mutation policy is resolved through the process-global `OPENHUMAN_WORKSPACE` env var and would otherwise race.+- Sentry hygiene: transport-level reqwest failures (`is_connect`/`is_timeout`/`is_request`) and transient HTTP statuses are logged at `warn` and skipped from `report_error`; a regression guard test hits an unroutable TEST-NET-1 host to lock the classifier.+- Test env locking: tests touching `update_apply` take `config::TEST_ENV_LOCK` because the mutation policy is resolved through the process-global `OPENHUMAN_WORKSPACE` env var and would otherwise race.- Network-hitting paths (`update_check` success, `update_apply` success, scheduler `tick`) are deferred to integration tests, not unit-tested.diff --git a/crates/openhuman-core/src/runtime/javascript/README.md b/crates/openhuman-core/src/runtime/javascript/README.mdindex 9b68a46e3b..1d48f4106b 100644--- a/crates/openhuman-core/src/runtime/javascript/README.md+++ b/crates/openhuman-core/src/runtime/javascript/README.md@@ -51,7 +51,7 @@ through this facade's `all_javascript_*` aliases:| Method | Inputs | Outputs || --- | --- | --- |-| `javascript.list_tools` |: | `tools`: array of tool metadata (`name`, `description`, `category`, `permission_level`, `scope`, `supports_markdown`, `parameters`). |+| `javascript.list_tools` | none | `tools`: array of tool metadata (`name`, `description`, `category`, `permission_level`, `scope`, `supports_markdown`, `parameters`). || `javascript.execute_tool` | `tool_name` (required), `args` (optional Json, defaults to `{}`), `prefer_markdown` (optional bool) | `tool_name`, `elapsed_ms` (u64), `result` (MCP-style `ToolResult`: `{content, is_error, markdownFormatted?}`). |Handlers live in `runtime::node::rpc`, load config viadiff --git a/crates/openhuman-core/src/runtime/node/README.md b/crates/openhuman-core/src/runtime/node/README.mdindex f992abd460..623af40468 100644--- a/crates/openhuman-core/src/runtime/node/README.md+++ b/crates/openhuman-core/src/runtime/node/README.md@@ -123,10 +123,10 @@ crate: those went with the machinery.## Notes / gotchas-- **Naming asymmetry**: the directory is `node` but its RPC namespace and public+- Naming asymmetry: the directory is `node` but its RPC namespace and publicaliases are `javascript`. That indirection is what let the backend underneathbe replaced by a bus module without churning a single caller.-- **`build_runtime_tools` is not cheap**: each bridge call rebuilds the full tool+- `build_runtime_tools` is not cheap: each bridge call rebuilds the full toolregistry from `Config`. There is no caching at the bridge layer: thememoisation here is only for toolchain resolution.- **The local cache is not redundant with the module's.** The module memoisesdiff --git a/crates/openhuman-core/src/sandbox/README.md b/crates/openhuman-core/src/sandbox/README.mdindex 852c423750..09085eaea9 100644--- a/crates/openhuman-core/src/sandbox/README.md+++ b/crates/openhuman-core/src/sandbox/README.md@@ -56,17 +56,17 @@ backend, and delegates local OS-level confinement to `cwd_jail`.## Backend behavior-- **None**: `execute_unsandboxed` runs the command directly via+- None: `execute_unsandboxed` runs the command directly via`agent::platform_shell` after validating `working_dir` with`config::ensure_usable_cwd`.-- **Local**: `execute_local_jail` builds a `cwd_jail::Jail` rooted at+- Local: `execute_local_jail` builds a `cwd_jail::Jail` rooted at`policy.workspace_root`, applies `deny_net()` and any read-only mounts fromthe policy, and spawns through `cwd_jail::default_backend()` (falling backto `NoopBackend` if no OS jail is available on the host). Output iscaptured by redirecting stdout/stderr to temp files inside the jail root,because some backends (macOS Seatbelt) rebuild the command and drop pipedstdio.-- **Docker**: `docker::docker_exec` runs `docker run --rm` with the host+- Docker: `docker::docker_exec` runs `docker run --rm` with the host`action_dir` mounted read/write at `/workspace`, network `none` by default,`--cap-drop ALL` (plus policy-specified extra drops),`--security-opt no-new-privileges`, a read-only rootfs with `/tmp` and