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
Merge remote-tracking branch 'refs/remotes/upstream/main' into pr/6226
Steven Enamakel9a895bd48986
diff --cc AGENTS.mdindex 077ff2cc5a,26a4d2e852..83db26fc7b--- a/AGENTS.md+++ b/AGENTS.md@@@ -1,1310 -1,353 +1,355 @@@# OpenHuman- **AI assistant for communities — React + Tauri v2 desktop app with a Rust core (JSON-RPC / CLI) embedded in-process.**-- Architecture docs: [`gitbooks/developing/architecture.md`](gitbooks/developing/architecture.md) | [Frontend](gitbooks/developing/architecture/frontend.md) | [Tauri shell](gitbooks/developing/architecture/tauri-shell.md) | [Agent harness](gitbooks/developing/architecture/agent-harness.md)-- ----- ## Repository layout-- | Path | Role |- | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------- |- | **`app/`** | pnpm workspace `openhuman-app`: Vite + React (`app/src/`) and Vitest tests |- | **`crates/openhuman-app/`** | Detached Cargo workspace for the Tauri desktop host |- | **`crates/openhuman-core/`** | Core package wrappers (`api`, transports, CLI, embedding API, binaries); links the domain tree below with `#[path]` |- | **`crates/openhuman-tui/`** | Standalone `openhuman-tui` terminal frontend; embeds `openhuman-core` in-process |- | **`src/openhuman/`** | Authoritative Rust domain implementation |- | **`Cargo.toml`** (root) | Virtual Cargo workspace; `cargo build --bin openhuman-core` selects the `openhuman` member |- | **`docs/`** | Deep internals. Public contributor docs in `gitbooks/developing/`. |-- Commands assume **repo root**. Root `package.json` is `openhuman-repo` (private, pnpm-enforced).-- ----- ## Runtime scope-- - **Shipped product**: desktop — Windows, macOS, Linux. No Android/iOS in the Tauri host.- - **Core runs in-process** as a tokio task (sidecar removed PR #1061). Lifecycle: `core_process::CoreProcessHandle` in `crates/openhuman-app/src/core_process.rs`. Frontend RPC → `http://127.0.0.1:<port>/rpc` with per-launch hex bearer handed in-memory via `run_server_embedded_with_ready(rpc_token: Some(_))`. Renderer reads bearer via `core_rpc_token` Tauri command. `OPENHUMAN_CORE_TOKEN` still honoured for CLI/docker/cloud. Set `OPENHUMAN_CORE_REUSE_EXISTING=1` for external core debugging.-- **Where logic lives:**-- - **Rust domains** (`src/openhuman/`): business logic, execution, domains, and persistence. Authoritative.- - **Rust wrappers** (`crates/openhuman-core/`): CLI, RPC/transport, and embedding surfaces.- - **Terminal UI** (`crates/openhuman-tui/`): ratatui frontend over the in-process core.- - **Tauri + React** (`app/`): UX, screens, navigation, bridging. Presents and orchestrates only.-- ----- ## iOS client (experimental, non-shipping)-- Connects to desktop core via `ConnectionProfile` transport strategies in `app/src/services/transport/`: `LanHttpTransport`, `TunnelTransport` (E2E encrypted XChaCha20-Poly1305), `CloudHttpTransport`. Key paths: PTT plugin `packages/tauri-plugin-ptt/`, iOS screens `app/src/pages/ios/`, devices domain `src/openhuman/security/devices/`, tunnel crypto `app/src/lib/tunnel/`. Build: `pnpm tauri:ios:dev` (stock `@tauri-apps/cli`, not vendored CEF). Backend dep: `tinyhumansai/backend#709`.-- ----- ## Commands (from repo root)+ OpenHuman is a React and Tauri v2 desktop assistant with an in-process Rust+ core. The core also exposes JSON-RPC and a CLI.++ Architecture: [overview](gitbooks/developing/architecture.md),+ [frontend](gitbooks/developing/architecture/frontend.md),+ [Tauri shell](gitbooks/developing/architecture/tauri-shell.md), and+ [agent harness](gitbooks/developing/architecture/agent-harness.md).++ ## Repository map++ | Path | Purpose |+ | --- | --- |+ | `app/src/` | Vite and React frontend |-| `app/src-tauri/` | Thin desktop host |-| `src/core/` | Transport, dispatch, auth, and runtime composition |++| `crates/openhuman-app/` | Thin desktop host |++| `crates/openhuman-core/` | Core package wrappers, transport, dispatch, auth, and runtime composition |++| `crates/openhuman-tui/` | Standalone terminal frontend |+ | `src/openhuman/` | Business domains |-| `src/main.rs` | `openhuman-core` CLI |++| `crates/openhuman-core/src/main.rs` | `openhuman-core` CLI |+ | `tests/` | Rust integration and JSON-RPC tests |+ | `gitbooks/` | Public product and contributor documentation |+ | `docs/` | Internal maintainer documentation |+ | `vendor/` | Recursive git submodules |++ Run commands from the repository root. The root package is a private pnpm+ workspace.++ ## Product boundaries++ - The shipped Tauri product targets Windows, macOS, and Linux.+ - The experimental iOS client is not part of the shipped desktop host. Its+ transport implementations live in `app/src/services/transport/`.+ - The Rust core owns business rules, persistence, execution, RPC, and CLI+ behavior.+ - The frontend and Tauri shell present or orchestrate core behavior. Do not+ duplicate core policy in TypeScript or shell code.+ - The desktop core runs as a tokio task managed by- `app/src-tauri/src/core_process.rs`. Frontend RPC uses the per-launch bearer++ `crates/openhuman-app/src/core_process.rs`. Frontend RPC uses the per-launch bearer+ returned through the `core_rpc_token` command.+ - `OPENHUMAN_CORE_REUSE_EXISTING=1` connects the shell to an external core for+ debugging.++ ## Common commands```bash- pnpm dev # Vite dev server only- pnpm dev:app # Full Tauri desktop dev (CEF, loads env via scripts/load-dotenv.sh)- pnpm build # Production UI build- pnpm typecheck # tsc --noEmit (alias: compile)- pnpm lint # ESLint --cache- pnpm format # Prettier write + cargo fmt- pnpm format:check # Prettier check + cargo fmt --check-- # Rust+ pnpm install+ pnpm dev+ pnpm dev:app+ pnpm build+ pnpm typecheck+ pnpm lint+ pnpm format+ pnpm format:check+ pnpm test+ pnpm test:coverage+ pnpm test:rust+cargo check --manifest-path Cargo.tomlcargo build --manifest-path Cargo.toml --bin openhuman-core- cargo build --manifest-path Cargo.toml -p openhuman-tui- cargo check --manifest-path crates/openhuman-app/Cargo.toml # or: pnpm rust:check-cargo check --manifest-path app/src-tauri/Cargo.toml++cargo check --manifest-path crates/openhuman-app/Cargo.toml- # macOS Apple Silicon workaround (llama.cpp)+ # Apple Silicon workaround for llama.cppGGML_NATIVE=OFF cargo check --manifest-path Cargo.toml```- `pnpm core:stage` is a no-op (sidecar removed).-- **Build speed**: the root workspace and detached desktop manifest both set `[profile.dev.package."*"] debug = false` — dependencies compile without DWARF in `dev`/`test` (faster builds + smaller `target/`); our own crates keep full debuginfo so panics/backtraces still resolve to file:line. Keep this stanza in sync across `Cargo.toml` and `crates/openhuman-app/Cargo.toml` if you touch profiles.-- **Binary size**: both `[profile.release]` blocks set `lto = "thin"`, `codegen-units = 1` and `strip = "symbols"` (#5541) — measured at **116.9 MB → 67.1 MB** for `openhuman-core` on the product feature set, with no feature removed and no dependency dropped. The win is not about dependencies: `cargo bloat` puts **59.5% of `.text` in `openhuman_core` itself** and only ~15 MB across all 379 third-party packages, and there is no hotspot — it is ~110k monomorphized methods, of which the default 16 codegen units emitted many twice (`Config::load_or_init_with_env_lookup::{{closure}}` appeared 6× at ~40 KB, and it is not even generic). `strip` is safe because Sentry symbolicates **server-side** from the separate dSYM/PDB/DWP that `scripts/upload_sentry_symbols.sh` uploads, matched by a debug ID `strip` preserves; if that ever broke, the script hard-exits on zero DIFs (#1403) instead of shipping un-symbolicated. Do not drop `debug = "line-tables-only"` — that is what makes the dSYM useful. `[profile.ci]` deliberately overrides all three, so the fast CI lanes are unaffected; release builds are slower by design.-- **Two-lane CI model**: **CI Lite** (`ci-lite.yml`, quick — pushes to `main` + PRs targeting `main` or `release`): quality checks per changed area plus unit tests **only for the changed files** — `vitest related` for `app/src` changes and domain-scoped `cargo llvm-cov` (libtest filter derived from `src/<a>/<b>/…`) for Rust — still gated at ≥ 80% diff coverage. Config-level changes (lockfile, Cargo.toml/lock, vitest config, `src/lib.rs`, …) fall back to the full suite (`scripts/ci/vitest-changed-coverage.sh`, `scripts/ci/rust-coverage-changed.sh`). **CI Full** (`ci-full.yml`, slow — PRs targeting the long-lived `release` branch + every push to it): complete unit suites, Rust mock-backend E2E, Playwright, and the full desktop E2E matrix on 3 OSes, aggregated by the `CI Full Gate` check (except the Playwright spec run — non-blocking signal while flaky, #3615). `release` advances when a maintainer dispatches `promote-main-to-release.yml` (pushes a merge commit from `main` into `release` — no standing PR) and when fix PRs opened directly against `release` merge (those run both lanes, with `CI Full Gate` blocking the merge; the post-merge push re-runs CI Full). Production releases are always cut from `release`; staging builds may be cut from `main` or `release` by selecting that workflow-dispatch ref. Release-source cuts back-merge `release` into `main` via `scripts/release/merge-release-into-main.sh`, and version-bump commits carry `[skip ci]`. Long build/test commands must run through `scripts/ci-cancel-aware.sh`, whose Actions-API watchdog stops cancelled builds inside container jobs (docker exec swallows runner signals).-- **CI build topology**: full-suite E2E is **build-once-then-fanout** on all three OSes — `build-{linux,macos,windows}-full` compile/bundle the app once and upload it as a per-run workflow artifact, and the shard jobs (`e2e-*-full`) `needs:` that job and download it instead of each shard rebuilding on a cold cache (`.github/workflows/e2e-reusable.yml`). Linux desktop packaging (`build-desktop.yml`) does a **single** `cargo tauri build`: libcef.so is resolved from the restored CEF cache (or a targeted `cargo build -p cef-dll-sys` prewarm on a cold cache) rather than a throwaway `--no-bundle` full build. The root core crate and the Tauri shell are still **separate Cargo worlds** (two `Cargo.lock`, two `target/`); converging them into one workspace is tracked as follow-up in #3877.-- **Tests**: `pnpm test` (Vitest) · `pnpm test:coverage` · `pnpm test:rust` (`scripts/test-rust-with-mock.sh`).- **Quality**: ESLint + Prettier + Husky. Pre-push hook runs `pnpm rust:check`.-- ### Agent debug runners (`scripts/debug/`)-- Summary-sized stdout; full output teed to `target/debug-logs/`. Add `--verbose` to stream raw.-- ```bash- pnpm debug unit # full Vitest suite- pnpm debug unit src/components/Foo.test.tsx # one file- pnpm debug unit -t "renders empty state" # filter by name- pnpm debug e2e test/e2e/specs/smoke.spec.ts # WDIO E2E- pnpm debug rust # cargo tests- pnpm debug rust json_rpc_e2e # targeted- pnpm debug logs # list recent- pnpm debug logs last # print most recent- ```-- ### Coverage requirement (merge gate)-- PRs need **≥ 80% coverage on changed lines** via `diff-cover` over Vitest + `cargo-llvm-cov` lcov. Enforced by the coverage jobs (`frontend-coverage`/`rust-core-coverage`/`rust-tauri-coverage`/`coverage-gate`) in `.github/workflows/ci-lite.yml`.-- ----- ## Configuration-- - **[`.env.example`](.env.example)** — Rust core, Tauri shell, backend URL, logging. Load: `source scripts/load-dotenv.sh`.- - **[`app/.env.example`](app/.env.example)** — `VITE_*` vars. Copy to `app/.env.local`.- - **Frontend config** centralized in [`app/src/utils/config.ts`](app/src/utils/config.ts) — never read `import.meta.env` directly elsewhere.- - **Rust config**: TOML `Config` struct (`src/openhuman/config/schema/types.rs`) with env overrides (`load.rs`).-- ### Agent access & security-- The `[autonomy]` block (`src/openhuman/config/schema/autonomy.rs`) drives `SecurityPolicy` (`src/openhuman/security/policy.rs`). Tiers: `readonly` / `supervised` / `full` × `workspace_only` × `trusted_roots` × `allow_tool_install`. Edit via `config.update_autonomy_settings` RPC or Settings → Agent access.-- **Two path roots** (`src/openhuman/config/schema/types.rs`):-- - **`action_dir`** — agent's read/write root. Acting tools resolve relative paths here. Default: `~/OpenHuman/projects` (`OPENHUMAN_ACTION_DIR`).- - **`workspace_dir`** — internal state (`~/.openhuman/users/<id>/workspace`). Agent tools **cannot** write here — enforced by `is_workspace_internal_path` fail-closed regardless of tier/trusted_roots.-- **Command permission model**: `classify_command` → `CommandClass` (`Read`/`Write`/`Network`/`Install`/`Destructive`); unrecognized = `Write`. `gate_decision(class, tier)` → `Allow`/`Prompt`/`Block`. System/credential dirs unconditionally blocked (`is_always_forbidden`).-- **Approval gate** ON by default (opt out: `OPENHUMAN_APPROVAL_GATE=0`). Parks interactive chat turns only; background/cron allowed through. Frontend surfaces via `ApprovalRequestCard`. 10-min TTL → Deny.-- **Sandbox backends** (opt-in per agent via `sandbox_mode = "sandboxed"`): Docker (remote/cron), Local OS jail (Landlock/Seatbelt/AppContainer, desktop), Noop fallback. In-Rust path hardening applies regardless.-- ### Hooks — two unrelated things with one name-- **In-process hooks** (`src/openhuman/agent/hooks.rs`, `agent/stop_hooks.rs`) are Rust traits an *embedding host* installs by compiling against the core: `PostTurnHook`, `ToolHook`, `StopHook`. `ToolHook` now answers with a `ToolHookDecision` (`Proceed` / `ProceedWith(args)` / `Deny(reason)` / `Ask(reason)`) and `after_tool_context` may append text to a tool result. Both come with defaults that bridge to the old `Result<()>` pair, so existing implementations compile unchanged — but a hook that only vetoes is now the degenerate case, not the contract.-- **Configurable hooks** (`src/openhuman/hooks/`) are user-authored scripts declared in `hooks.json`, taking [Cursor's contract](https://cursor.com/docs/hooks) verbatim — event names, stdin envelope, stdout decision, exit code 2 = deny — so a script ports between hosts. Full guide: [`gitbooks/developing/hooks.md`](gitbooks/developing/hooks.md).-- Four things to know before touching that domain:-- - **It mounts on the existing seams, not new call sites.** `hooks::bridge` registers itself as an embedder `ToolHook` + `PostTurnHook`. Only the moments with no seam at all (`beforeSubmitPrompt`, `subagentStart`/`Stop`) get their own entry point, in `hooks::ops` — and of those, `subagent_stopped` is still waiting for a caller (see `is_wired()` below).- - **Shell/file/MCP events are derived from tool calls.** OpenHuman has no separate shell-execution call site — `beforeShellExecution` is the `shell` tool going through the tool seam, reshaped into a Cursor-shaped payload. Both the generic and the specialised event fire, generic first. `SHELL_TOOLS`/`READ_TOOLS`/`WRITE_TOOLS` in `bridge.rs` are the mapping; extend those rather than adding a call site.- - **`HookEvent::is_wired()` is load-bearing honesty.** Five events (`sessionStart`, `sessionEnd`, `preCompact`, `afterAgentThought`, `subagentStop`) are fully defined but have no call site yet — `hooks::ops::subagent_stopped` is written and complete, but `subagent_runner` fires only the start side, so nothing reaches the stop one. The loader warns when one is configured and `hooks.list` reports `wired: false`. Flip the flag when the call site lands — never optimistically.- - **Strictest verdict wins, and layers concatenate.** Four `hooks.json` layers merge by appending, and `HookOutput::merge` folds deny over ask over allow, so a project file can never loosen an operator's rule. Do not "fix" the layering into an override model.-- Gating events run sequentially in the turn's path; observational ones are spawned and never block it (`HookEvent::is_gating` is the single place that split lives). With nothing configured the bridge is not installed, so an unconfigured host pays nothing per tool call.-- ----- ## Testing-- ### Unit (Vitest)-- - Co-locate as `*.test.ts(x)` under `app/src/**`. Config: `app/test/vitest.config.ts`.- - Run: `pnpm test` or `pnpm test:coverage`. Prefer behavior over implementation. No real network, no time flakes.-- ### Shared mock backend-- - Core: `scripts/mock-api-core.mjs` · Server: `scripts/mock-api-server.mjs` · E2E: `app/test/e2e/mock-server.ts`.- - Admin: `GET /__admin/health`, `POST /__admin/reset`, `POST /__admin/behavior`, `GET /__admin/requests`.- - Manual: `pnpm mock:api`.-- ### E2E (WDIO — dual platform)-- Full guide: [`gitbooks/developing/e2e-testing.md`](gitbooks/developing/e2e-testing.md).-- - **Linux (CI)**: `tauri-driver` (WebDriver :4444). **macOS (local)**: Appium Mac2 (XCUITest :4723).- - Specs: `app/test/e2e/specs/*.spec.ts`. Use `element-helpers.ts` helpers, never raw `XCUIElementType*`.- - `e2e-run-spec.sh` creates/cleans temp `OPENHUMAN_WORKSPACE` by default.-- ### Rust tests-- ```bash- pnpm test:rust- bash scripts/test-rust-with-mock.sh --test json_rpc_e2e- ```-- ----- ## Frontend (`app/src/`)-- **Provider chain** (`App.tsx`): `Sentry.ErrorBoundary` → `Redux Provider` → `PersistGate` → `BootCheckGate` → `CoreStateProvider` → `SocketProvider` → `ChatRuntimeProvider` → `HashRouter` → `CommandProvider` → `ServiceBlockingGate` → `AppShell`.-- No `UserProvider`/`AIProvider`/`SkillProvider` — auth lives in `CoreStateProvider` via `fetchCoreAppSnapshot()` RPC.-- **State** (`store/`): Redux Toolkit slices — `accounts`, `agentProfile`, `announcement`, `channelConnections`, `chatRuntime`, `connectivity`, `coreMode`, `deepLinkAuth`, `layout`, `locale`, `mascot`, `notification`, `persona`, `providerSurface`, `ptt`, `socket`, `theme`, `thread`, `userErrors` (authoritative list: `store/index.ts`; persistence via `userScopedStorage`). Prefer Redux over ad-hoc `localStorage`.-- **Services** (`services/`): `apiClient`, `socketService`, `coreRpcClient`, `coreCommandClient`, `chatService`, `analytics`, `notificationService`, `daemonHealthService`, plus domain `api/*` clients. Always use `coreRpcClient` (which invokes the `relay_http_rpc` Tauri command) for core RPC.-- **Analytics**: use `Button analyticsId="stable-content-free-id"` for shared button interactions, `AnalyticsPageTracker` once inside the router, and `trackAnalyticsEvent` from `components/analytics` for successful domain outcomes (messages, automation runs, connections, etc.). Native controls and links may use `data-analytics-id` directly. Use privacy-safe dimensions only; never send user-authored text, entity IDs, filenames, credentials, or error messages. `services/analytics.ts` is the consent/provider implementation, not the feature-code API.-- **Routing** (`AppRoutes.tsx`, HashRouter): `/` (Welcome), `/auth`, `/onboarding/*`, `/chat/:threadId?`, `/human`, `/brain`, `/connections`, `/flows` (+ `/flows/:id`, `/flows/draft`), `/invites`, `/notifications`, `/rewards`, `/settings/*`, `/feedback`. Back-compat redirects: `/home`→`/chat`, `/skills`→`/connections`, `/channels`→`/connections?tab=messaging`, `/intelligence` & `/activity`→`/settings/notifications`, `/routines` & `/workflows`→`/settings/automations`, `/webhooks`→`/settings/integrations#webhooks`. No `/login`, `/mnemonic`, `/agents`, `/conversations`.-- **AI config**: bundled prompts in `src/openhuman/agent/prompts/` ship via `tauri.conf.json` resources and are read core-side (`app/src/lib/ai/` holds agent-context helpers, not prompt loaders).-- ----- ## Tauri shell (`crates/openhuman-app/`)-- Thin desktop host. Key modules: `core_process`, `core_rpc`, `dictation_hotkeys`, `file_logging`, `mascot_native_window`, `window_state`, `imessage_scanner`.-- The CDP-driven provider scanners (`discord_scanner`, `slack_scanner`, `telegram_scanner`, `whatsapp_scanner`, `wechat_scanner`, `gmessages_scanner`), the `webview_accounts` surface they ran inside, and the in-app Meet call window (`meet_call`, `meet_audio`, `meet_video`, `meet_scanner`, `fake_camera`) were removed in #5478 — CDP only exists under a Chromium engine, and the app moved to Wry in #5456. `imessage_scanner` is unaffected: it reads `chat.db` natively and never used CDP. Meet has since been removed from the product entirely (see below), so the `src/openhuman/meet/` and `backend_bot` paths those notes referred to are gone.-- IPC commands (authoritative list: `generate_handler!` in `crates/openhuman-app/src/lib.rs`): `core_rpc::relay_http_rpc`, `core_rpc_url`, `core_rpc_token`, `start_core_process`/`restart_core_process`, update commands (`check_app_update`, `apply_core_update`, …), window commands (`activate_main_window`, `mascot_window_*`, `notch_window_*`), `workspace_paths::*`, `artifact_commands::*`, hotkeys (dictation/PTT/companion), `native_notifications::*`, `mcp_commands::*`, `loopback_oauth::*`.-- ### Child webviews — no new JS injection-- Child webviews **must not** grow new JS injection. No new `build_init_script` / `RUNTIME_JS` blocks, and no new injected `.js` assets. **New behavior lives in Rust-side IPC hooks.**-- That is now the only destination. The rule previously offered three — "CEF handlers, CDP from scanner modules, or Rust-side IPC hooks" — and #5478 removed the first two: there are no CEF handlers (the runtime is Wry as of #5456) and no scanner modules or CDP layer. The surfaces the rule was written to protect (the embedded provider webviews) are gone with them, so today it governs the webviews the shell still owns.-- **This is a narrowing, not a licence.** Losing two destinations does not make injection into the remaining webviews acceptable; it means the one sanctioned route is Rust-side IPC. If a future feature genuinely needs page-side script — the plausible candidate is re-serving WhatsApp / WeChat / Google Messages via Wry's `eval`, noted as out of scope in #5478 — that is a **deliberate decision to take first**, not something to read into this paragraph.-- Audit new Tauri plugins for `js_init_script` calls.-- ----- ## Rust core (`src/`)-- ### Module wire contracts — one `*-bus` crate per loadable module-- A capability that runs in a loaded module is reached over the bus, and a host- cannot import Rust items from a `cdylib`. So every module ships an ordinary- crate carrying its **call vocabulary** — interface names, member names, request- and response types, and the contract version — and this crate links that and- nothing else from the module's repository. Each is a git submodule consumed by- `path` (not published to crates.io, so no `[patch.crates-io]` entry — same shape- as `tinyhumans-sdk`).-- | Contract crate | Gate | Reached from |- | --- | --- | --- |- | `tinydocs-bus` | `documents` | `modules/documents.rs`, `tools/impl/document/` (as `format`) |- | `tinyvoice-bus` | `voice` | `modules/voice.rs` |- | `tinyjuice-bus` | **none** — `inference::tokenjuice` is kernel | `inference/tokenjuice/types.rs`, `modules/tokenjuice_host.rs` |- | `tinyruntime-bus` | none — `ShellTool` holds an `Option<Arc<NodeBootstrap>>` field | `modules/runtime.rs`, `runtime/**` |- | `tinywallet-bus` | `web3` | `modules/wallet.rs`, `web3/**` |- | `tinymcp-bus` | `mcp` | `mcp/**` |- | `tinychannels-bus` | **none** — the channel vocabulary is kernel surface | `core/events.rs`, `config/schema/channels.rs`, `security/pairing.rs`, `cron/bus.rs`, `memory/conversations/bus.rs`, `channels/traits.rs` |-- After cloning: `git submodule update --init --recursive vendor/`.-- **What this binary takes from each repository is its `-bus` contract crate, not- its root crate.** The root crate holds the implementation the TinyBus module- carries, and this binary does not link it. `tinymcp` is the one exception, and a- temporary one: its path dependency stays until `tinymcp-bus` grows the members- the host reaches for (see the `Cargo.toml` comment and tinyhumansai/tinymcp#4).-- **Never re-declare a contract type here.** Each of these crates replaced a copy- that had already drifted or was one edit away from it — `tools/impl/document/- format/` was 1,873 lines differing from `crates/tinydocs-bus/src/` only in- doc-link paths, `modules/voice.rs` redeclared four types with a comment- explaining that it had to, and `inference/tokenjuice/types.rs` was 259 lines- headed "shared with the separately compiled module" and shared by convention- alone. A field added on one side of a copy is a decode failure on the other with- nothing to catch it, and for the document specs it is worse than that: those- specs are also what an LLM is shown as a JSON tool schema, so a limit that moves- upstream becomes a tool description promising what the module does not enforce.-- **Call members by their constant, never by a string.** `methods::GENERATE_DOCX`,- not `"GenerateDocx"`. A rename upstream is then a compile error here instead of- a `MemberNotFound` at runtime.-- **`registry.rs` is the one place a name is still written out by hand.** It is a- `const` table and cannot name a gated crate, so the `_tests.rs` beside each- module client assert its `bus_name` / `object_path` against the contract's- `BUS_NAME` / `OBJECT_PATH`. A mismatch is not a compile error — it is a- `NameHasNoOwner` at first use, in the field, on whichever platform nobody tested.-- **Host policy stays host-side.** The contract says what a module may send; it- does not decide what this host will act on. When a type becomes foreign, the- policy attached to it becomes a free function rather than moving upstream —- `modules/voice.rs`'s `clamped` (a volume that reaches an `osascript` command),- `vad_config_from_server_config` (this host persists seconds, the module speaks- milliseconds), and `hallucination_mode_wire`.-- The split follows one rule, and it is worth stating because it decides where- the *next* extraction goes: **a crate owns what is the same for every host; the- host owns what depends on its own runtime, config, or threat model.** The- contract crates are therefore synchronous, I/O-free, and runtime-free.-- | Crate | Owns | OpenHuman keeps |- | --- | --- | --- |- | `tinydocs-bus` | the `.docx` / `.pptx` spec types, their size limits and validation | the artifact pipeline, the `spawn_blocking` hop, and the generation deadline — `src/openhuman/tools/impl/document/` |- | `tinywallet-bus` | the TinyWallet wire contract and bus member names, the BTC / EVM / Solana / Tron address formats, the EIP-712 and ERC-20 encoders, and the Tron verification codec | RPC endpoint resolution, transaction assembly and broadcast, key custody — `src/openhuman/web3/` |-- Consequences worth knowing before touching either seam:-- - **A `-bus` crate may hold logic, not only types, and that is deliberate.**- Four wallet rules are the host's to run synchronously: validating an address- before a spec is sent (a rejected input rather than a failed call), hashing- EIP-712 typed data for the x402 payment path, encoding ERC-20 calldata, and- verifying the txid and contents of what a Tron node handed back. That last one- is not optional — Tron has the *node* build the transaction, so the check has- to happen wherever the decision to sign is made. `tinydocs-bus`' spec- validators set the same precedent.- - **`tinywallet-bus` rejects an uppercase `0X` EVM prefix, matching the code it- replaced, which rejected that prefix too.** The old path went through `ethers_core::types::Address`'s- `FromStr`, which is `fixed-hash`'s and strips only a lowercase `0x`- (`fixed-hash-0.8.0/src/hash.rs`, `input.strip_prefix("0x")`), so `0X…` failed- hex decoding there too. The behaviour is unchanged, verified against the old- code path rather than assumed — do not "fix" it into leniency.- - **Bitcoin has two rules, not one.** `btc::validate` is the recipient rule;- `btc::validate_sender` additionally requires P2WPKH. Using the first where- the second belongs accepts an address that only fails later, at signing time.- - **The root `tinywallet` crate survives as a dev-dependency only.** Test- fixtures derive a known account through its `key` gate. Cargo does not link- dev-dependency features into the shipped binary, so this does not put- `bitcoin`, `coins-bip39` or a native `secp256k1` build back into the product.- - **Document generation is synchronous on purpose.** A crate that guessed at an- executor or a deadline would be wrong for every host that guessed- differently, so `document/engine.rs` supplies exactly that policy and nothing- else. `DocumentError::GenerationTimeout` therefore has no contract equivalent- and can only be produced host-side.- - **`tinydocs_bus::Error` is `#[non_exhaustive]`.** The `From` impl in- `document/types.rs` needs its catch-all arm; it degrades an unmapped variant- to `GenerationFailed` and logs, so a crate bump that adds a case worth- handling structurally shows up rather than being swallowed.- - **The JSON tool schema did not change.** `GenerateDocumentInput` is the- contract's `DocumentSpec` re-exported under its historical name, with field- names unchanged; `the_json_wire_shape_is_unchanged_by_the_extraction` pins- that.- - **Each crate's gates ride OpenHuman's existing ones**: `tinydocs-bus` is- exclusive to `documents`, `tinywallet-bus` to `web3`. Both are default-OFF for- contributors and product-ON, and both are already forwarded to the desktop- shell.-- ### Backend API access — `crates/openhuman-core/src/api/` over `tinyhumans-sdk`-- Calls to the TinyHumans cloud backend go through the vendored- [`tinyhumans-sdk`](https://github.com/tinyhumansai/sdk) crate at- `vendor/tinyhumans-sdk` (git submodule, path dependency — the crate is not on- crates.io, so unlike the other `vendor/` crates it has no `[patch.crates-io]`- entry). **The SDK is the source of truth for backend routes.** A route missing- from it belongs upstream in the SDK repo, not re-implemented in `crates/openhuman-core/src/api/`.-- The split:-- - **SDK** — routes, URL building, percent-encoding, credential headers,- `{success,data}` envelope handling, and the admin/webhook-receiver route gate.- - **`crates/openhuman-core/src/api/`** — the OpenHuman-specific layer on top: session-token retrieval- (`jwt.rs`), base-URL/env resolution (`config.rs`), and the error- classification + Sentry policy in `rest.rs`.-- `BackendOAuthClient` owns a `TinyHumansClient` built with- `with_http_client(...)` so the SDK inherits this crate's transport — platform- TLS (schannel on Windows for corporate TLS-inspection proxies, rustls- elsewhere), the 120s/15s timeouts, `http1_only`, and the `x-core-version` /- `x-tauri-version` / `x-sdk-name` headers. A session token is bound per call:- `authed_json` does `self.sdk.clone().with_token(Some(jwt))`, so the stored- client stays token-less and concurrent calls with different bearers cannot- race. (`clone()` is Arc-backed — the connection pool is shared, only the token- field differs.)-- ### Product identity — `x-sdk-name` (`crates/openhuman-core/src/api/product.rs`)-- OpenHuman, OpenCompany and Medulla share one login and all three reach the- backend through this crate, so every backend-bound request carries- `x-sdk-name` for the backend to attribute it to a product- (`src/utils/sdkSource.ts` in `tinyhumansai/backend`). The value defaults to- `openhuman`; an embedding product overrides it **once during startup, before it- builds any backend client**:-- ```rust- use openhuman_core::api::{set_product_identity, ProductIdentity};-- if let Some(identity) = ProductIdentity::new("opencompany") {- set_product_identity(identity);- }- ```-- It is a process-global (`OnceLock<RwLock<_>>`, same shape as- `config::schema::proxy`'s runtime proxy config) rather than a constructor- argument because `BackendOAuthClient::new` is called from ~35 sites across the- domains — none of which a downstream product owns. `BackendOAuthClient` and- `IntegrationClient` read the identity into their default headers when they are- built, so a later `set_product_identity` does not re-tag clients that already- exist — set it during startup, before the first client, and the distinction- never arises. (`MedullaClient` happens to read it per request, but do not rely- on that.)-- Five client paths attach it, and each needs its own edit because none shares a- request-building code path with the others:-- | Path | Where |- | ---- | ----- |- | `BackendOAuthClient` | both the reqwest transport (`build_backend_reqwest_client`, so `raw_client()` multipart uploads are covered too) and the SDK's `with_default_headers` |- | `IntegrationClient` (`/agent-integrations/*`) | the SDK's `with_default_headers` **only** — its separate `download_client` is deliberately untagged, see below |- | `MedullaClient` | `authed()` for HTTP, and **separately** `sse::StreamState::connect` — the SSE handshake authenticates with a `?token=` query parameter and never reaches `authed()` |- | `desktop::app_state::ops` (`GET /auth/me`) | its local `build_client()` default headers — a hand-rolled TLS client, not `BackendOAuthClient`'s |- | `agent::progress_tracing::langfuse` (`POST /telemetry/langfuse/ingestion`) | at the call site — a bare `reqwest::Client::new()` against the backend's Langfuse proxy route |-- **Adding a backend call means adding the header.** The two entries at the- bottom of that table were missed on the first pass and caught in review: both- hand-roll a `reqwest` client against `effective_backend_api_url` with a session- bearer, so neither inherits anything from the three wrapper types above. When- you add a backend-bound request, the question is not "did I use the right- client" but "does *this* request carry `x-sdk-name`". `grep` for- `bearer_authorization_value` and `header(AUTHORIZATION` to find the hand-rolled- ones — those are the paths that go unattributed silently.-- `ProductIdentity::new` sanitises with the same allowlist-and-truncate rule- `sanitize_client_version` applies to `x-core-version`, so the wrapped value can- never carry CR/LF and header construction cannot fail.-- **Deliberately untagged — do not "fix" these.** `IntegrationClient`'s- `download_client` fetches `/agent-integrations/file-storage/files/{id}/download`,- which answers a 302 to presigned S3. reqwest follows redirects and strips only- *sensitive* headers (Authorization, Cookie, …) when the host changes, so a- custom header like `x-sdk-name` survives onto the storage request; attaching it- per-request does not help, because redirected requests carry the original- headers too. Scoping it to the first hop would mean hand-rolling redirect- following, which is not worth it when every other call in the same session is- already tagged. MCP servers (`mcp::http_client`) and third-party BYOK inference- endpoints are excluded for the same reason: they are not our backend, and- telling an unrelated operator which TinyHumans product a user runs discloses- something for no benefit.-- **Not covered** (would need upstream changes, tracked separately): managed- inference and embeddings go out through `tinyagents`' own clients, and the- Socket.IO upgrade sets no HTTP headers at all — its auth rides in the- Socket.IO CONNECT payload. The flow-run Langfuse exporter- (`flows::tinyflows::langfuse_export`) posts to the same- `/telemetry/langfuse/ingestion` proxy as the agent-turn path but goes through- `tinyagents::LangfuseClient`, which builds its own `reqwest::Client` internally- and exposes no seam for default headers or an injected client — so flow traces- stay unattributed until `tinyagents` gains one.-- **Every SDK-backed call must map its error through `classify_sdk_error`.** That- function mirrors `authed_json`'s classification exactly (401 →- `Unauthorized`/`SESSION_EXPIRED`, channel-message 404 → `MessageNotFound`,- announcements 404 → `AnnouncementNotFound`, transient statuses logged not- reported). Skipping it would change a route's Sentry and session-expiry- behaviour purely by moving it onto a typed SDK method. `rest_tests.rs` pins the- two paths' equivalence — keep that as call sites migrate.-- ### Domain layout (`src/openhuman/`)-- ~31 domain directories — authoritative list: `ls -d src/openhuman/*/`. Major families: agent (`agent` — with `agent/{artifacts,context,experience,file_state,harness_init,learning,orchestration,plan_review,profiles,registry,session_db,session_import,tinyagents}`), memory (`memory` — with `memory/{agent,conversations,diff,goals,people,queue,search,sources,store,sync,tinycortex,tool_memory,tree}`), skills/flows (`skills` — with `skills/{catalog,runtime,webhooks}` —, `flows` — with `flows/{tinyflows,rhai}`), inference/AI (`inference` — with `inference/{embeddings,tokenjuice}` —, `routing`), MCP (`mcp` — with `mcp/{server,registry,audit,config_servers,http_client}`), runtimes (`runtime` — with `runtime/{node,python,python_server,pool,javascript}` —, `sandbox` — with `sandbox/cwd_jail`), channels (`channels`), web3 (`web3` — with `web3/{wallet,x402}`), plus kernel domains (`platform` — with `platform/{about_app,connectivity,cost,doctor,health,proc_metrics,service,socket,startup,update}` —, `config` — with `config/{migrations,migration_helpers,workspace}` —, `cron` — with `cron/scheduler_gate` —, `integrations`, `security` — with `security/{approval,credentials,keyring,keyring_consent,encryption,prompt_injection,devices}` —, `threads` — with `threads/{goals,todos}` —, `tools` — with `tools/{registry,status,timeout,agent_policy}` —, `util` — with `util/{text,retry,tls,types}` —, `voice`, …).-- **Family directories (in progress).** The flat tree is being collapsed so that **one directory equals one feature gate**: a capability spread across sibling top-level dirs costs a `#[cfg]` per dir plus five parallel registries to keep in sync. Landed so far (124 → 28 top-level dirs, 0 root-level `*.rs`): `util/` (incl. `util/sanitize`), `mcp/{server,registry,audit,config_servers,http_client}`, `sandbox/cwd_jail`, `cron/scheduler_gate`, `runtime/`, `media/`, `voice/audio_toolkit`, `web3/{wallet,x402}`, `medulla/chat`, `flows/{tinyflows,rhai}`, `desktop/` (accessibility, app_state, dashboard, notifications, overlay, provider_surfaces), `hosted/` (announcements, billing, referral, team — all thin proxies to the TinyHumans backend), `threads/{goals,todos}`, `tools/{registry,status,timeout,agent_policy}`, `platform/` (about_app, connectivity, cost, doctor, health, proc_metrics, service, socket, startup, update), `config/{migrations,migration_helpers,workspace}`, `integrations/{composio,file_storage,task_sources}`, `skills/{catalog,runtime,webhooks}`, `inference/{embeddings,tokenjuice}`, `security/{approval,credentials,keyring,keyring_consent,encryption,prompt_injection,devices}` (the kernel security family — never gated), and `agent/{experience,orchestration,registry,harness_init,session_db,session_import,context,profiles,learning,plan_review,file_state,artifacts,tinyagents}` (the agent harness is kernel and is never gated; `agent/` stayed put as the parent rather than becoming `agent/core`, which would have cost ~999 extra import rewrites for no gate benefit), and `memory/{store,sync,tree,search,sources,queue,diff,goals,conversations,tool_memory,tinycortex,agent,people}` (the largest family, moved last; `memory/` stayed put as the parent — a `memory → memory/core` rename would have cost ~545 extra rewrites — with the pre-existing `memory/sync.rs` renamed to `memory/sync_events.rs` to free the name for `memory_sync`, and `memory_tools` landing as `memory/tool_memory` to avoid the pre-existing `memory/tools/` agent-tool directory). Plan, target tree, and move-PR rules: [`docs/specs/2026-08-02-core-kernel-domain-reorg.md`](docs/specs/2026-08-02-core-kernel-domain-reorg.md).-- A move never changes the wire surface — RPC namespaces are string literals in `ControllerSchema`, not derived from module paths — so **do not rename namespace strings to match new paths**.--- **Removed product surfaces.** Four capabilities were deleted from the core and the- UI rather than gated off, so there is no flag that brings them back:-- | Removed | What went | Notes |- | --- | --- | --- |- | Desktop companion | `crates/openhuman-app/src/companion{,_commands}.rs`, the `companion` Redux slice, `CompanionPanel`, `companionEvents`, the overlay/notch companion modes | Shell + UI only; the core never owned it. `mascot_native_window`, `notch_window` and `ptt_overlay` are unaffected. |- | AgentBox | `agent/agentbox/`, the `agentbox` RPC namespace, the GMI MaaS provider bridge, the `AgentBoxPanel` settings page | Moved to [tinybox](https://github.com/tinyhumansai/tinybox). The unauthenticated `/run` and `/jobs/` routes left `core::auth`'s public-path list with it — `agentbox_run_and_jobs_paths_are_no_longer_public` pins that they stay authenticated. |- | Meetings | the `meet` Cargo gate and `openhuman::meet/` (join validation, live agent loop, backend bot), `MeetConfig`, the `meet`/`meet_agent`/`agent_meetings` namespaces, every `BackendMeet*`/`Meeting*` `DomainEvent`, the meetings UI, and `integrations/recall_calendar` (its only purpose was Meet auto-join) | `DomainGroup::Meet` is gone, so `DomainGroup::COUNT` dropped 23 → 22. The approval gate's in-call branch went with it — nothing set `APPROVAL_IN_CALL_CONTEXT` any more. |- | Subconscious | `openhuman::subconscious/` (engine, heartbeat, planner, monitors, triggers, user_thread), the `openhuman subconscious` CLI, the monitor + `notify_user` agent tools, the Brain/Activity subconscious tabs | `DomainGroup::Automation` now means cron alone. **`HeartbeatConfig` stays** — `threads::goals::continuation` reads `heartbeat.goal_continuation_enabled` / `goal_idle_minutes`, and **the `subconscious` provider role stays** because `agent::triage::routing` resolves its provider through it. |- | TinyPlace | `openhuman::tinyplace/`, hosted orchestration, relay controllers/events/services, pairing support, the TinyPlace dependency and submodule, Agent World and Brain orchestration UI, routes, settings, tests, and documentation | The Medulla harness envelope is now core-owned. The security path denylist retains the legacy `tinyplace` directory name so upgraded workspaces cannot expose old private state to agent file tools. |-- One compatibility behavior deliberately survived and should not be "cleaned up":- `threadFilter`'s `MEETINGS_LABELS` still routes historical meeting-labelled- threads so existing user data does not leak into the General bucket.-- **Removed agent-tool families.** A second, narrower removal: six families left- the *agent tool surface* while their RPC controllers stayed registered, because- the dashboard still calls them. The distinction matters — "the tool is gone" is- not "the domain is gone", and only one of these took its domain with it:-- | Removed family | Tools gone | Domain / RPC |- | --- | --- | --- |- | `apify_*` | `apify_run_actor`, `apify_get_run_status`, `apify_get_run_results` + the `[integrations].apify` toggle | Deleted. **`openhuman.tools_apify_linkedin_scrape` stays** — onboarding's ContextGatheringStep calls it, and `agent::learning::linkedin_enrichment` reaches the backend route directly, not through the deleted tools. |- | `people_*` | all 7 | `memory/tools/people.rs` deleted; the `people` RPC surface and `memory/people/` (address book, the `contacts` gate) stay. |- | `thread_*` | all 17, plus `transcript_search` | `threads/tools.rs` deleted; the `threads` domain stays — it is `DomainGroup::Threads` kernel surface and backs the whole chat UI. `todo_*` and `goal_*` are untouched. |- | `billing_*`, `team_*`, `referral_*` | all 34 | `hosted/{billing,team,referral}/tools.rs` deleted; every controller stays (32 `team` and 5 `billing` frontend call sites). |-- One agent went with them: **`account_admin_agent`** (its belt was billing +- team + referral). `account_admin_agent`'s read-only- half — `session_state`, `session_get_user`, `credential_list`,- `oauth_connect_url`, `oauth_list` — moved to `settings_agent`: that is account- *state*, which is settings territory, and has nothing to do with the money- movement that went away.-- **Known regression, accepted:** removing `thread_list` from the orchestrator- reopens #4744 — "list my recent conversation threads" has no direct route and- the model will fall back to `retrieve_memory`, which walks the memory *tree*,- the wrong index. `tests/orchestrator_thread_list_wiring.rs`, which existed to- pin that fix, was deleted with the tool. If threads need a chat route again, the- cheap fix is a single read-only `thread_list` rather than restoring the family.-- **Skills runtime**: the QuickJS per-skill VM engine is gone. `src/openhuman/skills/` holds skill metadata/tool descriptors; execution of installed `SKILL.md` workflows lives in `src/openhuman/skills/runtime/` (starts/cancels runs, hosts the `skill_executor` agent, reuses `runtime::node`/`runtime::python`, which are clients for the `tinyruntime` module).-- ### Tool calling lives in tinyagents — `src/openhuman/agent/dispatcher.rs` is a seam-- How a model is told to ask for a tool, how the ask is parsed, how results are- rendered back, and how a transcript is replayed onto the provider wire are one- thing — a **dialect** — and all four live in- `tinyagents::harness::tool_calling::dialect` (`XmlDialect` / `PFormatDialect` /- `NativeDialect`). They belong together because a catalogue advertising one- grammar next to a parser expecting another is a silent whole-turn failure: the- model emits a call, nothing recognises it, the iteration is spent, and no error- is logged anywhere.-- `dispatcher.rs` keeps two things and delegates the rest:-- - **The vocabulary.** `ParsedToolCall` / `ToolExecutionResult` are named for- ~190 call sites, and `ConversationMessage` is the durable JSONL record on- existing installations' disks. The crate speaks its own thin `TranscriptEntry`- instead, so the conversions in `dispatcher.rs` are the seam — field-wise maps- that keep the wire bytes identical while the logic sits upstream. **A- conversion that decides something is a second implementation in disguise; put- the judgement in the crate.**- - **The `Tool` trait object.** The crate takes `ToolSchema`s, never a host's- tool type — same reason the parse seam already documents: depending on- OpenHuman's `Tool` would make the crate unusable by a second host.-- Two consequences worth knowing before editing this area:-- - **Executing a tool did not move and will not.** The security policy, approval- gate, sandbox, per-call timeout and progress events are OpenHuman's. A dialect- decides what the model reads and writes; it never decides what is allowed to- happen. That line is what keeps the policy auditable in one place.- - **The catalogue has one renderer.** `ToolsSection` calls the crate's- `render_pformat_catalogue`, which builds each `Call as:` signature from the- same schema its parser reconstructs arguments from — so prompt order and parse- order agree by construction. The local copy this replaced carried a comment- promising the two "stay in lockstep", which is the shape of a bug waiting to- happen, not a guarantee. `humanize_tool_name` and `context_detail_from_args`- now live in `tinytools` and are re-exported by both this crate and tinyagents- — see the section below.--- ### The tool vocabulary lives in `tinytools` — `tools/traits.rs` is a re-export-- The `Tool` trait, `ToolResult` / `ToolContent`, `ToolSpec`, `PermissionLevel`,- `ToolScope`, `ToolCategory`, `ToolCallOptions`, `ToolTimeout`,- `WorkspaceDescriptor` and `SandboxMode` are defined in- [`tinytools`](https://github.com/tinyhumansai/tinytools), which **tinyagents- also depends on**. That is the whole point: `tinytools::Tool` and the trait the- harness runs a loop over are the *same* trait, so a tool is implemented once and- both sides accept it, with no conversion at the seam to get subtly wrong.-- `src/openhuman/tools/traits.rs` and `src/openhuman/skills/types.rs` stay as the- import paths ~190 and ~14 call sites already name; both are now short- re-exports. New code may name either.-- **It is vendored through tinyagents, not beside it.** The dependency is- `vendor/tinyagents/vendor/tinytools/crates/tinytools` — the exact path tinyagents- itself declares. A second `vendor/tinytools` submodule of our own would be a- *different package* to cargo, and `tinytools::ToolResult` from one would not be- the same type as from the other; every tool here would stop satisfying the- harness's trait, with a type error naming the same path twice. After cloning:- `git submodule update --init --recursive vendor/`.-- Four things to know before editing this area:-- - **The edge points one way, and `ToolRunContext` is why.** tinyagents depends- on tinytools, so tinytools cannot name `ToolExecutionContext` — that would be- a cycle. A tool that needs its isolated worktree root takes- `Option<&dyn ToolRunContext>` instead, which tinyagents implements for its own- context type. The trait exposes the workspace, the thread id and the turn- output budget and nothing else; the run id, event sink and cancellation token- stay harness-internal, because a tool reaching for those is reaching into the- run rather than doing its job. tinytools' CI fails if `tinyagents` appears- anywhere in its forward dependency tree.- - **Host-specific tool metadata rides on an erased extension.**- `Tool::host_extension` / `host_call_extension` return `dyn Any`, and- `traits::pack_registry_handle` / `traits::generated_runtime_context` downcast- them back. `PackRegistryHandle` and `GeneratedToolRuntimeContext` are *our*- concepts and a shared vocabulary has no business naming them. Two tools and- one test use this; everything else returns `None` and pays nothing.- - **Nothing that decides anything moved.** tinytools lets a tool *declare* the- privilege it needs and whether it reaches outside the machine. What to do- about those declarations is still ours and stays in one auditable place: the- `SecurityPolicy`, the approval gate, the sandbox, `tools/policy.rs`,- `tools/timeout/`, `tools/agent_policy/` and the whole `tools/registry/` +- `tools/toolpacks/` surface. `tools/schemas.rs` likewise stays — those are RPC- controllers bound to `crate::core`.- - **The MCP conversion is a free function, not a `From` impl.**- `skills::types::tool_result_from_mcp` — once `ToolResult` became foreign, the- orphan rule forbade the trait impl. It is still written exactly once, because- spelled out at each call site it would be three chances to get the error flag- the wrong way round.-- `tinytools` costs the kernel floor **+1 package / +1 name / 0 native builds**- (it adds no third-party crate this profile did not already have) and cannot be- gated: `tools/` is kernel surface, so the trait compiles in every build. See the- 2026-08-29 entry in `scripts/kernel-floor.limits`.-- **Rules:**-- - New functionality → dedicated subdirectory (`openhuman/<domain>/mod.rs` + siblings). No new root-level `*.rs` files.- - **Tool ownership**: domain tools live in that domain's `tools.rs`, re-exported via `src/openhuman/tools/mod.rs`. Only cross-cutting families stay in `tools/impl/`.- - **Memory source identity**: per-item IDs are dedupe keys only; set `metadata.path_scope` to stable collection scope.- - **Controller-only exposure**: use the registry, not branches in `cli.rs`/`jsonrpc.rs`.-- ### Canonical module shape-- | File | When | Role |- | ------------ | ---------------------------- | --------------------------------------------------------------------------------------------- |- | `mod.rs` | always | Export-focused only: `mod`/`pub mod` + `pub use` + controller schema pair. No business logic. |- | `types.rs` | domain has types | Serde domain types. |- | `store.rs` | domain persists | Persistence layer. |- | `ops.rs` | domain has logic | Business logic + handlers returning `RpcOutcome<T>`. |- | `schemas.rs` | RPC-facing | Controller schemas + `handle_*` fns delegating to `ops.rs`. |- | `tools.rs` | domain owns agent tools | Tool implementations. |- | `bus.rs` | domain has event subscribers | `EventHandler` impls. |- | tests | new/changed behavior | Inline `#[cfg(test)] mod tests` or sibling `*_tests.rs`. |-- ### Controller migration checklist-- 1. `mod.rs`: add `mod schemas;`, re-export `all_controller_schemas`/`all_registered_controllers`.- 2. `schemas.rs`: define schemas, handlers delegating to `ops.rs`.- 3. Wire into `crates/openhuman-core/src/core/all.rs`. Remove from `crates/openhuman-core/src/core/dispatch.rs`.-- ### `crates/openhuman-core/src/core/` — transport only-- Modules: `all`, `auth`, `cli`, `dispatch`, `event_bus/`, `jsonrpc`, `logging`, `observability`, `types`, etc. No business logic here.-- ### Running a turn as a library call — `Harness`-- `CoreBuilder` composes a core and `embed::Core` gives it typed methods; **`openhuman_core::Harness` is the front door that turns a prompt into a reply**, with model/provider, workspace, access tier, MCP servers and skills as typed builder inputs.-- ```rust- let harness = Harness::builder()- .provider(Provider::openai_compatible(base_url, key).model("gpt-5"))- .workspace(Workspace::Ephemeral) // or ::Dir(path) / ::Inherit- .access(Access::full())- .session(Session::local("my-host"))- .backend_url(backend)- .mcp(McpServer::stdio("gh", "gh-mcp", ["stdio"])) // #[cfg(feature = "mcp")]- .skills_dir("./skills") // #[cfg(feature = "skills")]- .build().await?;-- let out = harness.run("Summarize this repo.").await?;- let next = harness.turn("Now the risks.").session(&out.session_id).send().await?;- ```-- Layering: `embed::Core::agent()` is the typed turn surface for a host that already owns a `CoreRuntime` (the shell, an existing embedder); `Harness` builds that runtime for you and owns the workspace's lifetime. `embed::Core::auth()` types the session store. Everything routes through `CoreRuntime::invoke`, never `ops::*`, so `DomainSet` gating is honoured — see `crates/openhuman-core/src/embed/call.rs`.-- **Five things that bite, each of which cost a debugging session to find:**-- - **`CoreBuilder::config(..)` alone configures boot and nothing else.** RPC handlers do not receive it — they call `config::ops::load_config_with_timeout()` per dispatch, which re-runs `Config::load_or_init()` and re-resolves the process-global workspace. The config is published on `CoreContext::embedder_config` and that loader prefers it; without that branch an embedder watches its turns run against `~/.openhuman` while believing otherwise.- - **`config_path` is not cosmetic — set it with `workspace_dir`.** Credential state, auth profiles and the keyring file backend resolve against its *parent*, not against the workspace. Setting only `workspace_dir` yields a harness that looks hermetic and reads the operator's real credentials. `Harness` puts it beside the workspace (`<root>/config.toml` next to `<root>/workspace`), the same shape `load_or_init` produces.- - **A custom provider is gated on an active app session** (`verify_session_active`), even for a host that supplied the endpoint and key itself — the gate exists to stop an unregistered *desktop* user routing around registration and cannot tell the two apart. `Session::local(..)` satisfies it without asserting anything at the backend.- - **Point `backend_url` somewhere real or stubbed.** The core makes non-inference backend calls regardless of where inference goes. Signed out of the hosted backend, those are rejected, a rejection publishes `SessionExpired`, and the *next* turn then fails the provider gate for reasons unrelated to the turn.- - **The access tier is only half of "allowed to act".** The other half is the turn origin, a task-local the approval gate fail-closes on. Setting `autonomy.level = full` and no origin gives an agent whose `shell` / `edit` / `apply_patch` all refuse while the transcript still reads plausibly. `Access::full()` sets both; that is the whole reason the type exists.-- **One `Harness` per process.** The keyring master key, the RPC bearer, the global event bus and the `Once`-guarded domain subscribers are process-scoped, so a second one would silently share them. `build()` returns `HarnessError::AlreadyRunning` instead. Lifting this is phase 3 of `docs/plans/pluggable-core/`. The caller also owns the tokio runtime and **must** size it with `AGENT_WORKER_STACK_BYTES` / `MAX_BLOCKING_THREADS` — the default 2 MiB worker stack overflows on a turn that delegates to a sub-agent and aborts the process, which is why `examples/run_turn.rs` does not use `#[tokio::main]`.-- **Skills are copied, not linked**, into `<workspace>/skills`. Discovery rejects symlinked bundle dirs and symlinked manifests deliberately (that root is scanned with no trust marker), so a link is silently skipped — skills that look configured and are absent from the turn. `Workspace::Inherit` refuses the copy rather than leaving bundles in the operator's install.-- Example: `examples/run_turn.rs`. End-to-end test: `tests/harness_embed.rs`.-- ### Runtime composition — `ServiceSet` + `DomainSet` + `ToolGroups` on `CoreBuilder`-- Three independent runtime axes on `CoreBuilder` (`crates/openhuman-core/src/core/runtime/builder.rs`):-- - **`ServiceSet`** selects which *background services / transports* run (`rpc_http`, `socketio`, `cron`, `channels`, `heartbeat`, …). Presets: `desktop()` / `headless_api()` / `none()`.- - **`DomainSet`** selects which *domain families* exist at runtime, one flag per `DomainGroup` (`crates/openhuman-core/src/core/all.rs`). Presets: `full()` (default — byte-identical to before #4796), `harness()` (agent + memory + threads + config + security only), `none()`. Every controller is tagged with its `DomainGroup` at the single registration site in `crates/openhuman-core/src/core/all.rs`; the live surface (controllers/`/schema`/dispatch, agent tools, stores, subscribers) is filtered by the ambient `CoreContext::domains()`. A gated domain's controllers become unknown-method, its agent tools absent, its stores/subscribers uninitialized. `examples/embed_headless.rs` uses `DomainSet::harness()`; `examples/embed_kernel.rs` uses `DomainSet::kernel()` — the floor (threads + config + security, with `agent`/`memory` OFF) that a host opts subsystems back into by field assignment. Per-gate Cargo `[features]` (children #4797–#4804) narrow the compile-time surface further; `DomainSet` is the runtime axis they compose with.-- - **`ToolGroups`** selects how each *tool group* reaches the model, one mode per compiled-in pack in `tools/toolpacks/registry.rs` (`src/openhuman/tools/toolpacks/groups.rs`). Presets: `packed()` (default — every group withheld, byte-identical to before the type existed), `advertised()`, `none()`, plus `.with(id, mode)`. Also on `Harness::builder()`.-- **The third axis exists because the pack table answers a compression question, and a library embedder is asking a capability question.** Packs were built for one host's problem — an orchestrator whose fixed per-turn cost is dominated by tool schemas — and membership is compiled in for a good reason: a pack that config or RPC could edit would let a caller move a dangerous tool out of the reviewed surface. But `openhuman_core` is also consumed as a library, and there the group id is the natural unit of *what this product has at all*. A host embedding the harness to summarise documents has no use for the crypto belt at any disclosure level; a host doing its own routing may want every schema on the wire because it does not pay the orchestrator's budget. Neither is expressible by membership, which only ever says "advertised or withheld".-- So `GroupMode` has three states, not two:-- | `GroupMode` | Schemas on the wire | Registered and callable |- | --- | --- | --- |- | `Advertised` | yes | yes |- | `Withheld` | no (reached via `load_skill` / `use_skill`) | yes |- | `Off` | no | **no** |-- `Off` is the state that could not be said before, and it is the one an embedder reaches for most — absence beats a registered tool that fails, the same reasoning the `flows` compile gate already documents. Enforcement is two-sited and mirrors the existing filters: `Off` drops the tool in `all_tools_with_runtime`'s post-filter block (a third `retain`, right after the `DomainSet` and memory-capability ones), and `Withheld` is what `strip_packed_from_visible` acts on. **The three narrow, they never widen** — `Advertised` cannot conjure a tool that a Cargo gate compiled out or that the ambient `DomainSet` dropped.-- **Packs now carry an `owners` list, and a pack is skipped entirely for its owner.** This is new with the raw-tool packs and was not needed before: the original packs held only synthesised `delegate_*` tools, which exist on the orchestrator alone. A pack over raw tools is different — `settings_agent` exists precisely to run `config_*` / `health_*` / `service_*`, so withholding the `system` pack from it would put a `load_skill` round trip in front of the first call of every one of its turns and hide nothing that was idle. Its whole belt *is* the pack. `strip_packed_from_visible` therefore takes the agent id.-- **`DomainGroup` tracks family directories 1:1.** After the domain reorg (#5328) each variant names a `src/openhuman/` family, so the runtime axis stopped sweeping half the surface into the `Platform` catch-all. Groups: the harness families (`Agent`, `Memory`, `Threads`, `Config`, `Security`), the compile-gate families (`Flows`, `Skills`, `Mcp`, `Channels`, `Web3`, `Voice`, `Media`, `Medulla`), the families carved out of `Platform` (`Inference`, `Integrations`, `Automation` = cron, `Runtimes` = runtime + sandbox, `Desktop`, `Hosted`, `Modules` = the native module host), and `Platform` itself — now only the kernel surfaces with no family of their own (`platform/`, `tools/`, `http_host/`, `test_support/`).-- That realignment fixed two real defects, both pinned by tests in `crates/openhuman-core/src/core/all_tests.rs`:-- - `harness()` claimed "agent + memory + threads + config + security" but silently dropped `agent::{harness_init, artifacts, learning}`, `security::{credentials, devices}`, `config::{workspace, migration_helpers}`, `memory::people` and `skills::webhooks` into `Platform`. An agent harness that never registers `harness_init` is a latent bug.- - `embedded()` had to set `platform: true` purely to reach credentials and config, which dragged the desktop and hosted-backend surfaces along with it. Those are `Desktop` / `Hosted` now and stay off.-- **Adding a family directory means four edits, all compiler-enforced:** the `DomainGroup` variant (`crates/openhuman-core/src/core/all.rs`), the `DomainSet` field + `allows()` arm + every preset (`crates/openhuman-core/src/core/runtime/builder.rs`).-- Three more consumers are *not* compiler-enforced — `tool_group()` (`tools/ops.rs`), `StoreInitPlan` (`runtime/context.rs`) and `DomainSubscriberPlan` (`core/jsonrpc.rs`) — so **drift guards** stand in for the compiler. Each forces every variant into exactly one of two lists (owns-a-store / storeless, registers-subscribers / none, owns-tools / tool-less), so adding a family cannot compile-and-forget:-- - `domain_group_all_lists_every_variant` is the root of trust. `DomainGroup::index()` is an exhaustive `match`, so a new variant is a compile error there first; this test then fails until `DomainGroup::ALL` and `COUNT` catch up. The other guards iterate `ALL`, so they are only as good as this one.- - `every_domain_group_is_accounted_for_in_tool_group` tests the *function*, not a built registry — which tools a registry contains depends on config flags, security tier and enabled integrations, so a registry-derived assertion passes or fails for unrelated reasons. `REPRESENTATIVE` holds one real tool name per family; `representative_tool_names_are_real` keeps that table from rotting into dead strings.-- These are not theoretical. Two bugs of exactly this shape shipped before the guards existed: `harness_init` sat in `Platform` so `DomainSet::harness()` never registered it, and the `Inference` rule matched `tokenjuice_` while the live tool is `tinyjuice_retrieve` (`tokenjuice_retrieve` is a migration alias), so CCR retrieval leaked to `Platform`. **Match tool names against the owning crate's constants, not a guessed prefix.** A controller whose store keys on a different group than its `push(...)` tag gives you a live RPC surface with no store behind it.-- ### Compile-time domain gates (Cargo `[features]`)-- Per-domain Cargo features drop whole domains **at compile time** (smaller binary, fewer deps), composing with the runtime `DomainSet` axis above.-- **There are TWO gate sets, and confusing them is the main hazard here.**-- | Set | Where it lives | What it is |- | --- | --- | --- |- | **Contributor** | `[features] default` in `Cargo.toml` | What a bare `cargo check`, `cargo test` and rust-analyzer compile. 10 cheap gates. **~353 packages / 2 native builds** (`libsqlite3-sys`, `ring`). |-- > **`modules` is in `default`, and it is the one gate here that is not optional.**- > The table below has documented it as Contrib=ON since it landed and- > `scripts/ci/product-features.txt` has always listed it, but it was missing from- > `[features] default` — so a bare `cargo test --lib -- memory::` failed **26**- > tests (582 passed / 26 failed), every one a "null vs module" assertion, because- > `memory::binding::module_provider` took its `#[cfg(not(feature = "modules"))]`- > arm and bound `NullMemoryProvider`. A further 15 module-gated tests did not- > exist at all. With the gate on: **623 passed, 0 failed.** A default set that- > cannot run its own test suite is not an inner loop, so this one stays.- > It is also the cheapest gate in the list — **+9 packages / +5 unique names**- > (`ureq`, `ureq-proto`, `utf8-zero`, `toml_edit`, `toml_write`) and **zero** new- > native builds; the native list is identical with it on and off. Nothing like- > the cohorts that motivated splitting `default` from the product set. It does- > **not** move the kernel floor — that profile is `--no-default-features- > --features flows` and never reads this list.- | **Product** | `scripts/ci/product-features.txt` | What the shipped desktop app has. 16 gates. **540 packages / 7 native builds** (adds `bzip2-sys`, `libgit2-sys`, `libz-sys`, `zstd-sys`). |-- `default` used to be the product set, which made the inner loop pay for the whole product on every edit — web3's ethers/secp256k1 cohort, `documents`' zstd/bzip2 native builds (since removed from the graph entirely — the codecs run in a module now), the cpal/hound/arboard/enigo/rdev stack behind `voice`+`inference`, `contacts`' macOS objc2 cohort, and `crash-reporting`'s sentry tree. Those are default-OFF now. **This did not change what ships**: the shell has set `default-features = false` since #1061 and never inherited `default` anyway. The ratatui cohort is owned by the separate `openhuman-tui` package rather than a core feature.-- What it *did* change: **a lane that relies on default features no longer covers the product.** Every CI lane that builds or tests the product passes `--features "$(bash scripts/ci/product-features.sh)"` — clippy, the unit lane, the coverage lane, `scripts/test-rust-with-mock.sh`. If you add a lane, decide which of the two sets it is testing and say so in a comment. Four `tests/*.rs` targets carry `required-features` for the same reason (`json_rpc_e2e`, `raw_coverage_all`, `observability_smoke`, `x402_twit_sh_live`); without those gates cargo **silently skips** them and the run still exits 0 — the same trap `--bins` without `bin-tools` already had.-- > **Adding a gate to either set? You must forward it to the desktop shell.**- > `crates/openhuman-app/Cargo.toml` declares `openhuman_core` with `default-features = false` (set in #1061, before gates existed), so the shipped app does **not** inherit the core's `default` list. A gate in the product set but not in the shell's `features` list is **compiled out of the shipped desktop app** — with no build error and no failing test. This is not hypothetical: `voice` shipped missing from v0.58.19 to v0.61.x (56 users, ~93k Sentry events, #4901), and `tokenjuice-treesitter` was never forwarded once since #4123 and failed *soft*, silently degrading AST compression (#4918).- > `scripts/ci/check-feature-forwarding.mjs` (the **Feature Forwarding Gate** lane) asserts three things: the shell forwards **exactly** `product-features.txt` (set equality, both directions), every name in that file is a real core gate, and every `default` gate is forwarded or allow-listed. The equality check is the load-bearing one — the old subset-of-`default` check would have passed **vacuously** once `default` stopped being the product set, silently re-arming #4901. If a gate genuinely must not ship, add it to `INTENTIONALLY_NOT_FORWARDED` **with a reason** — an explicit exclusion is the only way "deliberate" stays distinguishable from "forgotten".- > A gate in **neither** set (today `e2e-test-support`) gets no compile coverage from the normal lanes at all, so the feature-gate-smoke lane checks it explicitly. Put new ones there too. `e2e-test-support` was in this position for its whole life without being listed here or checked anywhere (#6086).-- **Slim-profile convention** (no `full` meta-feature): build slim variants with `cargo build -p openhuman --no-default-features --features "<explicit list of gates you want>"`. Selecting the package matters now that the workspace also contains `openhuman-tui`. This mirrors the existing standalone-feature style (`sandbox-landlock`, `browser-native`, …). Example — everything except voice:-- ```bash- # check / build without the voice family (incl. audio_toolkit)- GGML_NATIVE=OFF cargo check --manifest-path Cargo.toml \- -p openhuman --no-default-features- ```-- #### The kernel profile, and the floor ratchet that protects it-- `-p openhuman --no-default-features --features flows` is the **kernel profile**: the surface a- second host would embed to get workflow execution and nothing else. It is measured- and ratcheted, because unmeasured it grows — `rusqlite`/bundled and- `tokio-tungstenite` remain unconditional today (`git2`/vendored-libgit2 left the- kernel profile with the `libgit2-sys` + `libz-sys` shed below, once it moved- behind the `memory-git` gate, since deleted outright), and none would likely have landed that way had a- number moved in CI when they did.+ Use the summary-sized debug runners for long test output:```bash- scripts/kernel-floor.sh flows # CI Linux: 304 packages / 281 names / 3 native- scripts/kernel-floor.sh flows --json- scripts/check-kernel-floor.sh # the CI ratchet (Rust Feature-Gate Smoke lane)- scripts/dep-sim.py --cut-nothing # calibration: must equal kernel-floor.sh- scripts/dep-sim.py --cut arboard,enigo,rdev # project a cohort before doing it+ pnpm debug unit [test-file]+ pnpm debug unit -t "test name"+ pnpm debug e2e [spec]+ pnpm debug rust [filter]+ pnpm debug logs last```- **CI Linux baseline 2026-08-09: 302 packages / 279 unique names / 2 native- builds** (`libsqlite3-sys`, `ring`). **This is the target** — MIGRATION-PLAN G6- set 2 native builds as the goal, and the profile is there, down from 418 names- / 6 native when the program started. The four that left: `aws-lc-sys` (the- tinychannels rustls pin), `lzma-sys` (the `runtime-node` gate), and- `libgit2-sys` + `libz-sys` together (the `memory-git` gate, now deleted along- with the `memory::diff` surface it guarded — libgit2 is out of every profile). The macOS graph- resolves a few packages higher because of target-specific edges; the CI ratchet- is intentionally calibrated on Linux.-- Reaching the target does not retire the ratchet — it is what stops the floor- growing back, and an unmeasured floor grows. `libsqlite3-sys` and `ring` are- both load-bearing (the memory store and TLS), so this is the floor, not a- waypoint.- Limits live in `scripts/kernel-floor.limits`; the ratchet fails on growth **and** on- a shed that was not written back, since an unratcheted improvement grows back- unnoticed.-- **Size a cohort with `dep-sim.py`, never by adding up `cargo tree -i` results.**- Per-dependency arithmetic over-counts shared subtrees and misses crates that only- become droppable once a *sibling* is cut — it is how an earlier estimate of ~167- was produced, and that number is wrong. The simulator parses `cargo tree` (not- `cargo metadata`, whose resolve graph is maximal and over-reports by ~36 crates- here, counting dev-dependencies and unenabled target-specific edges), so it agrees- with cargo's feature resolution by construction. CI asserts that calibration.-- **49 of 84 direct dependencies contribute zero exclusive crates.** "Make dep X- optional" usually saves nothing on its own — `git2`, `rusqlite`, `reqwest`,- `tokio` and `tokio-tungstenite` have multiple parents. Gate the- whole cohort or expect a delta of 0.-- Two columns because there are two sets (see above): **Contrib** is `[features] default`,- **Product** is `scripts/ci/product-features.txt`.-- | Feature | Contrib | Product | Gates | Drops deps |- | ------- | ------- | ------- | ----- | ---------- |- | `voice` | OFF | ON | the `openhuman::voice` family (incl. `voice::audio_toolkit`) — STT/TTS providers, dictation server, always-on listening, podcast audio + email | `hound`, `lettre` |- | `inference` | OFF | ON | the `cpal` audio-device stack: microphone capture for voice, plus `desktop::accessibility::permissions`' mic-permission probe. Implied by `voice`. Off ⇒ the probe reports `Unknown`. **The name is historical** — it used to gate the bundled whisper.cpp STT engine, which no longer exists (see the scope note below); do not rename it, it is forwarded by name from the shell manifest and asserted by `INFERENCE_COMPILED_IN` | `cpal` |- | `web3` | OFF | ON | the `openhuman::web3` family (`web3`, `web3::wallet`, `web3::x402`) — crypto wallet (multi-chain sign/broadcast), swaps/bridges/dapp calls, x402 machine payments | `bitcoin`, `curve25519-dalek` |- | `media` | ON | ON | `openhuman::media::generation` (the `media_generate_*` agent tools) + `openhuman::media::image` scaffold | none (surface-only) |- | `documents` | OFF | ON | the `generate_document` / `generate_presentation` agent tools and PDF text extraction during multimodal ingest. **The synthesis is not in this build** — all three run in the `tinydocs` TinyBus module (see below), so this gate turns on the tools and the host policy around them: the artifact pipeline, the deadlines, image resolution under the security policy. The dependency is `tinydocs-bus`, the wire contract crate, and nothing else from that repository. Implies `modules`. Off ⇒ both tools absent from the tool list rather than degraded, and PDF ingest degrades a file to a reference instead of extracted text | **39 crates**, and they leave `Cargo.lock` entirely: `docx-rs`, `ppt-rs`, `pdf-extract` plus `lopdf`, `syntect`, `pulldown-cmark`, `xml-rs`, `quick-xml`, `zip 0.6`, `zstd`, `bzip2`, `encoding_rs`, `euclid`, `ttf-parser`, the CFF/Type1/CMap parsers, … Product profile 505 → 448 names |- | `modules` | ON | ON | `openhuman::modules` — the dynamic module host: the loader that admits a compiled `cdylib` through tinybus's ABI descriptor, manifest, dependency and SHA-256 gates, the compiled-in registry of modules this build trusts, and the `modules` RPC namespace. Implied by `documents`. Off ⇒ `modules.*` is unknown-method and nothing can load a native module | none in the product profile (`ureq`, `flate2`, `tar`, `zip 2`, `tempfile`, `toml` are already there) — **but see the kernel-floor note**: this feature exists so `tinybus/modules` is not enabled on the dependency itself, which would put a `dlopen` loader into the kernel profile where `tinybus` is always-on |- | `skills` | ON | ON | `openhuman::skills` + `openhuman::skills::runtime` + `openhuman::skills::catalog` domains — SKILL.md discovery/parse/install, workflow execution + run logs, remote catalogs, the `skill_setup` / `skill_executor` builtin agents, and the 16 skill agent tools | none (see below) |- | `flows` | ON | ON | `openhuman::flows` (saved automation graphs — create/run/schedule, the `workflow_builder` + `flow_discovery` agents), `openhuman::flows::tinyflows` (engine seam), `openhuman::flows::rhai` (`.ragsh` language-workflow tool). Pulls the four tinyflows workspace crates — see the seam note below | `tinyflows`, `tinyflows-catalog`, `tinyflows-copilot`, `tinyflows-sqlite`, `jaq-core`, `jaq-std`, `jaq-json`, `rhai` |- | `mcp` | ON | ON | `openhuman::mcp::server` (the `openhuman mcp` stdio/HTTP server), `openhuman::mcp::registry` (dynamic Smithery installs — `mcp_clients` RPC namespace, SQLite, boot spawn, supervisor, OAuth), `openhuman::mcp::audit` (write-audit log), and the static config-declared server set in `openhuman::mcp::config_servers`. ~19 agent tools, ~20k LOC | **none** — and the `tinymcp` module extraction does not change that either; see the scope note |- | `channels` | ON | ON | `openhuman::channels` (external-messaging providers — Telegram/Discord/Slack/Signal/WhatsApp/iMessage/IRC/… — plus the channel runtime, controllers, host, proactive messaging + inbound dispatch) and the `webview_notifications` bridge domain. **Carve-outs `channels::{traits, cli}` stay ungated.** The family now owns **no agent tool** — the three `whatsapp_data_*` tools were its only ones and went with the store (see below) — which is why `DomainGroup::Channels` is in `TOOL_LESS` in `tools/ops_tests.rs`. | **none in the kernel profile** — the gate swaps `tinychannels` for `tinychannels-bus` one-for-one, because every heavy dep it carried is shared. It buys ~31.7k lines of compile surface, not crates. The email + lark cohorts are shed only relative to a `channels`-ON build |- | `contacts` | OFF | ON | `memory::people::address_book`'s macOS CNContactStore reader — the address-book seeding path for the people domain. Leaf gate over a **pre-existing** off-state: the module already shipped a non-macOS `imp` stub returning an empty contact list, so the gate only widens that stub's cfg. `read`/`read_with`/`AddressBookError`/`SystemContactsSource` and the whole `people` RPC surface stay compiled in every build; off ⇒ a refresh seeds nothing instead of failing. | **6** on macOS (`objc2`, `objc2-foundation`, `objc2-contacts`, `block2` + 2 transitive). **No-op on Linux/Windows** — never in those graphs, so the kernel-floor ratchet does not move. Verify cross-target: `cargo tree --target aarch64-apple-darwin -e normal -i objc2-contacts --no-default-features` (294 → 288 packages). |- | `runtime-node` | OFF | ON | `runtime::node` (the client that asks the `tinyruntime` module for a Node.js toolchain), the `runtime::javascript` language slot, `runtime::pool::node`, the `node_exec` / `npm_exec` agent tools, and the `node_runtime` harness-init step. **Facade + stub** — `ShellTool` holds `Option<Arc<NodeBootstrap>>` and `shell.rs` is kernel, so the module cannot simply vanish; `runtime/node/stub.rs` carries the `NodeBootstrap` type surface while registration sites are leaf-gated. **The generic native-tool dispatcher (`runtime::node::ops` / `runtime::node::types`) is NOT gated** — it backs both the gated `javascript.*` controllers and the ungated `flows` `oh:` `NativeToolBackend`, so native flow tools (`memory_search`, file, shell, …) keep working when the managed Node runtime is off. Off ⇒ `try_cached`/`probe_installed` return `None` and the shell never prepends a managed bin dir, identical to today's `node.enabled = false` path. | **Nothing any more.** This gate used to shed `xz2` and its static liblzma C build; download and extraction moved into the `tinyruntime` module, so that native build left the manifest for **every** configuration rather than only for slim ones. The gate still buys the absence of the tools and controllers. |-- **Facade pattern (pathfinder for the other gates).** `pub mod voice;` is **always compiled** as a facade: the real submodules are `#[cfg(feature = "voice")]`, and a `#[cfg(not(feature = "voice"))] mod stub;` (`src/openhuman/voice/stub.rs`) re-exposes the same public surface that always-on / other-gated callers use (`server`, `dictation_listener`, `streaming`, `reply_speech`, `cloud_transcribe`, `cli`, `create_stt_provider`, `effective_stt_provider`, `publish_ptt_transcript_committed`) with no-op / `None` / disabled-error bodies. Callers therefore do **not** need per-call `#[cfg]`. When voice is off: the voice/audio controllers are unregistered (unknown-method over `/rpc`, absent from `/schema`), the `audio_generate_podcast` agent tools are absent, and `openhuman voice` returns a "voice disabled" error. Stub signatures must match the real ones exactly — the disabled build (`--no-default-features`) is the **only** thing that catches drift, so run it before pushing any change to the voice surface.-- **Scope note — there is no local STT engine any more.** The bundled whisper.cpp engine (in-process `whisper-rs` plus the `whisper-cli` subprocess fallback), its GGML model/binary downloader (`inference::local::install_whisper` + the `inference.install_whisper` / `inference.whisper_install_status` RPCs), and the `whisper-rs` / `whisper-rs-sys` dependencies were **deleted** from both Cargo worlds. Speech-to-text is now always a hosted HTTP call, and *which* host is a user choice: `voice_server.stt_engine` (`backend` / `elevenlabs` / `openai`) resolved by `voice::factory::effective_stt_provider`, with an explicit `stt_provider` routing string still overriding it. `config::migrations` (9 → 10, `retire_local_whisper_stt`) rewrites a persisted `stt_provider = "whisper"` to `"cloud"`; the factory does **not** silently remap it, so an unmigrated value fails by name instead of hiding.-- The `voice` gate still does not drop `llama` or `cpal`: `cpal` belongs to the `inference` gate above, and `llama`/`whisper` inference for the *local model runtime* is a separate concern. Earlier revisions of this note promised a future `inference` gate that would shed whisper — that gate exists and sheds `cpal`; whisper left the graph entirely instead.-- **`web3` gate — first gate that sheds real crypto deps.** Same facade pattern: `pub mod wallet;` / `pub mod web3;` / `pub mod x402;` stay always-compiled, real submodules are `#[cfg(feature = "web3")]`, and each domain's `stub.rs` re-exposes the always-on caller surface with disabled-error / empty bodies. When off, the wallet/web3/x402 controllers are unregistered, the web3 swap/bridge/dapp agent tools are absent (via `all_web3_agent_tools()` → empty), and the exclusive `bitcoin` (BTC P2WPKH PSBT) + `ethers-core` / `ethers-signers` / `coins-bip39` (EVM/mnemonic signing, used by the multi-chain wallet's EVM path) deps are dropped. `curve25519-dalek` (used for Solana off-curve ATA here) is **not** among them — it stays enabled transitively through the always-on `ed25519-dalek`. The stubs cover `WALLET_NOT_CONFIGURED_MESSAGE`, `status`, `secret_material`, `WalletChain`, `prepare_transfer`/`execute_prepared` (+ param/result types), `solana_cluster`/`SolanaCluster`, `wallet::rpc::redact_rpc_url`, and the `all_*_registered_controllers`/`all_*_controller_schemas`/`all_web3_agent_tools` entry points. Two caller families still need per-call `#[cfg(feature = "web3")]` because they name concrete gated types rather than a stubbable aggregator: the six `Wallet*Tool` + `X402RequestTool` registrations in `tools/ops.rs`, the `wallet::tools::*` glob in `tools/mod.rs`, and the x402 402-retry path in `tools/impl/network/http_request.rs` (with the feature off a 402 returns to the caller unpaid).-- `core/all.rs`'s `flows` registration builds a `Vec` and conditionally `push`es rather than using a `vec![]` literal, because an element of a `vec![]` cannot carry `#[cfg]`.-- Run the disabled build (`--no-default-features`) before pushing any change to the wallet/web3/x402 surface — it is the only drift catcher. Prove a claimed shed with `scripts/assert-shed.sh`, **not** `cargo tree -i`: the latter exits non-zero when a crate is absent and reports dev-dependency-only survivors as present.-- **Leaf-gate variant (`media`, #4804).** Unlike `voice`, the `media` gate needs **no** stub facade: `media::generation` has a single caller (the `build_media_tools` call in `src/openhuman/tools/ops.rs`, itself `#[cfg(feature = "media")]`) and `openhuman::media::image` is unwired scaffold (#2997), so both modules are simply `#[cfg(feature = "media")] pub mod …`. It is a **surface-only** gate: media generation is backend-proxied (`reqwest`, shared) and the `image` crate is shared with channel upload, so no exclusive deps are shed — the issue's "sheds media processing dependencies" / "controllers unregistered" DoD lines are superseded (Media is agent-tools-only; no controller/store/subscriber is tagged `Media`). When a gated domain is a true leaf, prefer this over the facade+stub.- **`skills` gate — the type carve-out (read before adding the next gate).** The three skill domains follow the same facade+stub shape as `voice`, with one important refinement: **`skills` is not a leaf — it is partly load-bearing infrastructure.** `src/openhuman/tools/traits.rs` re-exports the crate's unified `ToolResult` / `ToolContent` out of `skills::types`, and ~236 files consume them (`mcp`, `runtime::node`, every `Tool` impl). `Workflow` / `WorkflowFrontmatter` / `WorkflowScope` from `skills::ops_types` likewise appear in always-on agent-harness and prompt signatures. Gating `skills` wholesale would take down the entire tool trait system, MCP, and the Node runtime.-- So `skills::types` and `skills::ops_types` stay **compiled in both directions** — they are inert serde/std-only definitions with zero coupling to their gated siblings — and only *behaviour* is gated. `src/openhuman/skills/stub.rs` therefore mirrors **functions only** and re-exports the real types (`pub use super::ops_types::{Workflow, …}`), so there is **zero type duplication** — strictly less drift surface than the `voice` stub, which had to re-declare `SttResult` + the `SttProvider` trait because those live inside its gated tree.-- > **Generalizable rule for the remaining gates:** put a domain's inert types in a dep-free submodule and leave it **ungated**; stub only the behaviour. Reach for a stub type only when the type genuinely cannot be carved out.-- Two places the carve-out doesn't reach, and why they are `#[cfg]` at the call site instead of stubbed:-- - `agent/registry/agents/loader.rs` — the `skill_setup` / `skill_executor` `BuiltinAgent` entries. `include_str!` embeds the agent TOML from disk regardless of module gating, so the entry itself must disappear.- - `agent/task_dispatcher/executor.rs` — the workflow-resolution branch. `registry::get_workflow` returns `Option<WorkflowDefinition>`, which flattens in `AgentDefinition` and is destructured at the call site; stubbing it would mean re-declaring that struct (exactly what the carve-out avoids). With the domain compiled out no handle can resolve to a skill, so falling through to the builtin-agent branch is correct, not degraded.-- **Dep note:** `skills = []` — the empty list is **intentional, do not "fix" it**. Unlike `voice` (`hound`/`lettre`), these domains have no exclusive dependencies: every crate they touch is shared with always-on domains, and `runtime::node` / `runtime::python` are used by Agent / Flows / Memory too. This gate's value is tool-surface + prompt-bloat + startup cost, **not** binary size.-- When skills are off: the `skills` / `skill_runtime` / `skill_registry` controllers are unregistered (unknown-method over `/rpc`, absent from `/schema`), the 16 skill agent tools (incl. `run_workflow` / `await_workflow`) are **absent** from the tool list rather than degraded to an error, the `skill_setup` / `skill_executor` builtin agents are gone, and the boot-time remote catalog refresh is skipped. Composes with the runtime `DomainSet::skills` flag (#4796) — that axis needed no change here; #4798 is compile-time only.-- **Leaf-gate pattern (`flows`).** Where `voice` needs a stub facade, `flows` needs **none** — and deliberately so. Every symbol reached from outside the gate is a *registration site* (controller push in `crates/openhuman-core/src/core/all.rs`, the `FlowTriggerSubscriber` in `crates/openhuman-core/src/core/jsonrpc.rs`, boot reconcile in `crates/openhuman-core/src/core/runtime/services.rs`, agent-tool `vec!` elements in `src/openhuman/tools/ops.rs`, `BuiltinAgent` entries in `agent/registry/agents/loader.rs`). Registration sites want **absence**: a stub that registered a controller returning `Err("flows disabled")` would make `flows.*` a *known* method that fails at runtime — the opposite of the intended "unknown method / omitted tool". So the family carries a **single** `#[cfg(feature = "flows")]` on `pub mod flows;` in `src/openhuman/mod.rs` — the nested `flows::tinyflows` and `flows::rhai` submodules inherit it — and each call site carries its own `#[cfg]`. The leaf gate holds only because no always-compiled domain has a real code edge into the tree: `memory/tools.rs` and `memory/tools/flavour.rs` name `flows::tinyflows` in comments only. There is no `openhuman flows` CLI subcommand, so no CLI stub is needed either. When flows is off: the `flows.*` controllers are unregistered (unknown-method over `/rpc`, absent from `/schema`), all 25 flow agent tools + the `rhai_workflows` tool are absent, and the `workflow_builder` / `flow_discovery` built-in agents are not advertised.-- **What is in `flows/` and what is upstream.** The domain used to own its whole- stack; most of it was not OpenHuman's. Four crates in the vendored tinyflows- workspace now carry the parts that are true for anyone storing and authoring- workflows, and what stayed here is the **connector layer** — the part that could- not be anything else:-- | Upstream crate | What moved | What `flows/` kept |- | --- | --- | --- |- | `tinyflows-catalog` | `Flow` / `FlowRevision` / `FlowRun` / `FlowDraft` / `FlowSuggestion` and friends, the run + build cancellation registries, the n8n importer, and the save/run safety predicates (`trigger_is_automatic`, `enforce_side_effect_approval`, `graph_has_actionable_nodes`) | `node_contracts.rs` — the *host overlay* on `tinyflows::catalog`: what a `tool_call` slug resolves to here, which trigger kinds this host actually dispatches |- | `tinyflows-sqlite` | the `flows.db` catalog schema and every query, the JSON draft store, the durable run checkpointer | `store.rs` / `draft_store.rs` — one substitution each, `<workspace_dir>/flows`, and nothing else |- | `tinyflows-copilot` | the `workflow_builder` + `flow_discovery` standing archetypes and the builder turn brief | `agents/*/prompt.rs` (appending this host's runtime sections) and `agent.toml` (this host's registry format) |- | `tinyflows` | the authoring checks that are statements about the *graph* or the *engine*: `gates` (envelope violations, prose written as a `=`-expression, a tool arg reading an agent field no schema declares), `compat` (fan-in topologies the engine's barrier relief cannot execute safely), `preflight` (the mock run that proves an outbound arg can resolve), the schema-aware dry-run mocks, and the step-capturing `RunObserver` | `tinyflows/caps/` — every capability adapter: this host's LLM, agent harness, tools, HTTP, sandboxed code, memory |-- **`ops.rs` keeps the gates that need this host's vocabulary, and only those.**- Which agent ids resolve, which Composio slugs and connections exist, what a- toolkit's live output schema says, whether a provider is reachable, whether an- upload path is workspace-relative — none of that is knowable upstream. What left- was the opposite: analysis that only ever read the graph. Three of those had- drifted into near-duplicates of code the engine already had (`collect_expressions`,- `parse_node_binding`, an envelope-kind table, a jq-keyword list), which is the- usual reason to look.-- **`tinyflows/caps/` is a connector directory and stays one.** The one exception- was `mocks.rs`, whose every doc comment explained how the engine's own mocks- fail a good graph — a fact about the engine, so it went with them. The other- ~685 lines name `integrations`, `memory`, `security`, `skills` and `config` on- almost every screen; that is the seam working, not work left undone.-- Two rules follow, and both are load-bearing:-- - **A `store.rs` wrapper body that does more than `dir(config)` is host policy- that has leaked into persistence.** That is the only reason those 36- one-line functions are spelled out instead of being a `pub use`.- - **`tinyflows-copilot` may not grow a harness dependency.** It names no tool- trait, no agent registry and no model client, which is exactly what lets the- desktop panel, the medulla plane and a CLI share one copilot. `tinytools` is- not published, so a path dependency on it from that crate would resolve to a- *second* `tinytools` package here and every tool would stop satisfying the- harness trait — the duplication hazard the `tinytools` note above describes.- The `Tool` impls in `builder_tools.rs` are the seam, and they stay here.-- **Scope note (`flows` deps):** the gate sheds `tinyflows` + its `jaq-core` / `jaq-std` / `jaq-json` JSON-query stack, and `rhai`. It does **not** shed `tinyagents` — 26+ domains consume that crate. The issue-level DoD line reading "sheds the rhai scripting engine" is therefore true only at the **feature** level: `rhai` arrives via `tinyagents/repl`, which the root `Cargo.toml` no longer enables directly — the `flows` feature turns it on. Dropping `flows` drops `repl`, which drops `rhai`; `tinyagents` itself stays. Verify a claimed shed with `cargo tree -i <crate> --no-default-features` (must return nothing) — compiling clean is **not** proof that a dep was dropped.-- **Testing gotcha (applies to every gate).** The CI smoke lane runs `cargo check` only — it never runs `cargo test --no-default-features`, so CI stays green while the disabled-build **test** suite is broken. Tests that hard-assert a gated family (`.expect("a flows.* method exists")`, `assert!(full_ns.contains("flows"))`, `group_for_namespace("flows")`, built-in-agent id lists) must be `#[cfg]`-gated in lockstep with the feature. Run `GGML_NATIVE=OFF cargo test -p openhuman --lib --no-default-features core::` locally before pushing any gate change.-- #### The `mcp` gate-- Follows the voice facade+stub pattern for `mcp::server` / `mcp::registry` / `mcp::audit` (`stub.rs` in each), with two refinements worth copying:-- - **The family root `pub mod mcp;` is UNGATED.** It cannot carry `#[cfg(feature = "mcp")]` for two independent reasons: `mcp::http_client` is always compiled (below), and the three facades each ship a `stub.rs` that must resolve in an `mcp`-less build. The gate is pushed down onto each member in `src/openhuman/mcp/mod.rs` — the rule a family root with a stub or an ungated member must follow. `mcp::config_servers` is leaf-gated there; `mcp::http_client` is not gated at all.-- - **Type carve-out.** Inert, dependency-free type modules stay **ungated**: `mcp::registry::types`, `mcp::audit::types`, `mcp::server::tools::types` (`McpToolSpec`). They are `serde`/`serde_json`-only data consumed by always-compiled callers (the orchestrator prompt builder, `tool_registry`). Both builds therefore share the **one real type definition** — the stubs carry behaviour only, so struct fields can never drift between the enabled and disabled builds. `ConnectedServerOverview` was moved from `connections.rs` into `types.rs` for exactly this reason and is re-exported from `connections` so existing paths still resolve.- - **Split facade — the old `mcp_client` directory did not match the dependency graph, so the reorg split it three ways.** Its transport primitives went to the **ungated** `mcp::http_client` (`McpHttpClient`, `redact_endpoint`, `McpUnauthorizedError`); its static server set + stdio transport + setup agent went to the **leaf-gated** `mcp::config_servers`; and `sanitize` left the family entirely for `util::sanitize`. The `gitbooks` docs tool dials `McpHttpClient` directly (GitBook is modelled as a legacy MCP server), and the orchestrator prompt sanitizes **skill** descriptions through `util::sanitize::sanitize_for_llm` — neither has anything to do with MCP, and stubbing them would silently break a docs tool and corrupt the orchestrator prompt in slim builds. **The gate follows the real dependency graph, not the directory name.** A bonus of keeping `http_client` compiled: the `McpServerNeedsAuth` classifier coupling test in `core::observability` stays always-compiled — no `#[cfg]`, no wording-drift leak.-- **Scope note — the `mcp` gate drops ZERO dependencies, and the module extraction does not change that.** The history is worth keeping because both halves of it are counter-intuitive.-- Before the extraction there was no MCP SDK in this crate at all: the entire protocol stack was hand-rolled over tokio process stdio + `reqwest` + `axum`, every one of which is load-bearing for non-MCP domains. So the gate shed nothing, and the issue-level DoD line claiming it "sheds the MCP SDK / transport stack" was superseded by that correction.-- After the extraction the stack lives in `tinymcp`, and the natural expectation — recorded in the `Cargo.toml` comment and in `scripts/kernel-floor.limits`' 2026-08-22 entry — was that loading it as a TinyBus module would take `reqwest` and `rusqlite` out of the always-on graph with it. **Measured, it does not.** In the kernel profile `rusqlite` has six parents (`openhuman` itself, `tinyagents`, `tinychannels`, `tinycortex`, `tinymcp`, `tinymemory-core`) and `reqwest` has ten. `scripts/dep-sim.py --cut tinymcp` projects the whole shed at **−1 package / −1 name / 0 native**: the `tinymcp` package itself, and nothing underneath it. This is the same shape as the TinyMemory port — a module boundary buys a *compilation* boundary, not a dependency shed, whenever the module's dependencies are already shared with kernel surface.-- The gate is still worth having for the ~20k LOC / ~19 agent tools / RPC surface it removes. The `mcp = []` feature list in `Cargo.toml` is intentionally empty — do not "fix" it by adding `dep:` entries.-- **Step two of the extraction is registry-entered but not wired.** `src/openhuman/modules/registry.rs` pins the `tinymcp` v0.3.1 release, so the module can be downloaded, verified and loaded; the host still calls the library directly, and `Cargo.toml` still declares both `tinymcp` and `tinymcp-bus`. Cutting the path dependency needs contract additions that `tinymcp-bus` v0.3.1 does not carry — `OAuthComplete`, a connected-overview member for the already-exported `ConnectedServerOverview`, the boot-connect and reconnect-supervisor passes, the `ServerDetail` / `AuthDetection` / `AuthKind` reply types, the registry curation helpers, an error anchor for the `McpServerNeedsAuth` classifier coupling test in `crates/openhuman-core/src/core/observability.rs`, and `render_tool_result` / `redact_endpoint` for the ungated `gitbooks` tool. It also needs a per-`data_dir` object seam of the shape `modules::memory` already uses, because `mcp::host` keys one store per workspace and a loaded module receives one `data_dir` at load — and a desktop session moves workspace on login and again on logout. Those are upstream in `tinyhumansai/tinymcp` and must land and be released first.-- **Static vs dynamic — the naming is INVERTED from intuition.** Both halves must be gated or the gate is only half-applied:-- | Module | Despite the name, it is… | Backed by | Agent tools |- | ------ | ------------------------ | --------- | ----------- |- | `mcp::config_servers` | the **STATIC**, config-declared server set (`[[mcp_client.servers]]` in TOML → `McpServerRegistry::from_config`) | TOML config | `mcp_list_servers`, `mcp_list_tools`, `mcp_call_tool` |- | `mcp::registry` | the **DYNAMIC**, user-installed Smithery servers (live connection map, boot spawn, supervisor, OAuth) | SQLite `mcp_clients.db` | 11 × `mcp_registry_*` |-- **CLI when compiled out.** `crates/openhuman-core/src/core/cli.rs` is deliberately **untouched**: the `"mcp" | "mcp-server"` arm resolves to the stub's `run_stdio_from_cli`, which returns a "mcp feature disabled at compile time … rebuild with `--features mcp`" error. Deleting the arm would let `mcp` fall through to generic namespace resolution and fail with `unknown namespace: mcp` — which reads like a user typo rather than a build fact, and would leave an MCP host (Claude Desktop / Cursor) hanging on stdout that never speaks JSON-RPC. Pinned by `mcp_subcommand_reports_disabled_build_when_gate_off` in `crates/openhuman-core/src/core/cli_tests.rs`.-- **Dangling `mcp_agent` in the orchestrator TOML is expected and safe.** `agent.toml` is data and cannot be `#[cfg]`'d, so the orchestrator keeps listing `mcp_agent` in `subagents` even when the agent is compiled out. Both resolution sites already tolerate unknown ids — `collect_orchestrator_tools` warns and skips, `validate_tier_hierarchy` `continue`s — so the core still boots. `orchestrator_tolerates_unresolvable_subagent_id` / `orchestrator_tolerates_absent_mcp_agent` in `loader.rs` pin that contract; do not "tighten" unknown-subagent handling into a hard error without re-checking them. `crates/openhuman-core/src/core/legacy_aliases.rs`'s frontend-catalog drift tests ignore gated namespaces for the same data-vs-code reason.-- `crates/openhuman-core/src/core/all.rs` needs **no** `#[cfg]` for this gate: the stub aggregators return empty vecs, so the registration sites keep compiling unchanged.-- ### Loadable native modules — `src/openhuman/modules/`-- A capability can live outside this binary. A module is a compiled `cdylib`- speaking the tinybus module ABI: downloaded from a pinned release, verified- against a digest compiled into `modules::registry`, admitted through tinybus's- ABI and manifest gates, and attached to a private in-process broker as an- ordinary bus peer. The core then calls it over that bus like any other service.- `documents` is the first consumer — `.docx` / `.pptx` synthesis and PDF- extraction all happen in the `tinydocs` module.-- **What it buys is a dependency boundary that survives compilation.** A codec is- not kernel work, and each one drags a tree of parsers into a binary that mostly- does something else. Moving one out removes its dependencies from the build- rather than merely gating them: `documents` went from 39 crates to none.-- **What it costs is process isolation, and that is not small.** A loaded module- shares this address space, these privileges and this crash domain; tinybus's- deadlines, bounded queues and caught panics contain ordinary misbehaviour, not a- segfault. `dlopen` runs code before any symbol can be inspected, so the ABI,- manifest and digest gates decide what is **admitted**, never what is **safe**.- Modules are first-party code that ships separately. Anything untrusted belongs in- a process.-- **tinybus never unloads a library.** A module that is refused or faulted is- failed until the process restarts, which is why `modules::ops` caches failures- instead of retrying — the alternative is paying a download and a `dlopen` per- tool call to reach the same error.-- Five decisions worth knowing before touching this:-- - **The registry is a compiled-in `const` table.** Which modules exist, which- interfaces they claim, and which bytes are legitimate are build-time decisions.- Neither config nor RPC can name an artifact: a registry a server could add- entries to would be remote code execution with a download step. `[modules]`- config controls only whether modules load, whether this host may fetch them,- and where a developer's own build lives.- - **Digests are pinned in source as the host's half of a two-sided check.**- tinybus fetches the release's own `checksum.toml`, compares it with ours,- hashes the download, and extracts only after. Pinning here makes the check- auditable offline and makes a release re-cut under the same tag stop matching- rather than silently replacing what runs in-process. Take the values verbatim- from the release; never recompute them from a local build.- - **Artifact selection returns an ordered list, not one answer.** A target triple- is not enough — a `.so` built against glibc 2.39 fails to `dlopen` on a 2.35- host with a symbol-version error the ABI gate cannot phrase helpfully. So- releases publish per-distro artifacts, `modules::platform` probes glibc, prefers- the newest build that could work, and falls through on admission failure. A musl- or BSD host gets an empty list: "unsupported" beats a download that cannot load.- - **Admission is permissive, deliberately.** Strict mode additionally refuses a- module whose rustc version differs from the host's, and the real published- artifact **is** refused that way — released artifacts are built on whatever- toolchain CI had and this crate pins its own, so mismatch is the normal case.- Strict mode would have meant the feature never worked in the field while every- local build looked fine. Everything protecting the address space is still- enforced; only the toolchain string is relaxed.- - **Modules run on their own broker**, because `OnceBus::init_in_process` builds- its `Broker` privately and `ModuleHost::new` needs one. The consequence: a- module cannot publish a `DomainEvent`. Fine for a codec; revisit if a module- ever needs to emit events.-- **The bus belongs to whichever runtime creates it.** In the core that is the one- runtime the process has. In tests it is not: two `#[tokio::test]` functions each- build their own, and the second to call a loaded module finds a broker whose tasks- died with the first — the call **hangs** until some deadline above it fires. Any- test driving a real module must be the only one in its process, which is why the- module-backed tool tests are `#[ignore]`d rather than merely gated on an artifact.- Run them one at a time with `OPENHUMAN_MODULE_PATH` pointing at a directory- holding the built library.-- **Payloads in and out are not symmetric.** Inbound bytes ride a tinybus stream- opened alongside the call, so flow control and the size cap are the bus's. Replies- cannot: `Interface::call` receives no caller identity and no connection, so a- served object cannot open a stream back to its caller. A produced document is held- by the module and pulled in chunks. A reply-stream seam upstream would remove that- half.-- **`modules` must not be enabled on the tinybus dependency directly.** `tinybus` is- always-on kernel surface, so `features = ["modules"]` there puts a loader plus- `ureq` and an archive stack into the kernel profile for a host that can never use- one — 305 → 308 packages, which the kernel-floor ratchet caught. It is forwarded- from this crate's own `modules` feature instead.-- #### Release cache, boot preload, and the loading state-- **Every module load goes through a persistent, verified cache.** `ops::resolve`- loads the pinned release with tinybus's `load_github_release_cached`, which- keeps the archive, its extraction and the manifest digest under- `install_dir(config)/<id>/<version>/<host_key>/` (`~/Library/Caches/openhuman/modules`- on macOS, `~/.cache/openhuman/modules` on Linux). A warm launch re-hashes the- archive against the registry pin and maps the library without the network; a- cold launch downloads into a staging sibling and commits with one rename, and- the versions no longer pinned are pruned afterwards. Before this existed every- launch downloaded every module — five on the desktop — serialised behind one- lock, and tinybus's default HTTP client had no connect timeout, so a single- black-holed CDN address cost the OS SYN timeout (75 s on macOS, ~2 min on- Linux) per module while every memory call and the chat turn waited behind it.-- Three host-side rules ride on it:-- - **`LoadPolicy::Eager` runs at boot now.** `start_bootstrap_jobs` spawns- `modules::boot::load_declared_modules` behind `ServiceSet::memory_queue`; it- installs the memory host callbacks first (a module admitted without them- resolves no embedder) and then resolves TinyMemory off the request path. The- function had no product caller from the day it landed.- - **Resolution is per module, and the wait is bounded.** `modules::resolution`- gives each module a slot: the first caller runs the load as a- process-lifetime task on the module runtime and everyone else waits on a- watch channel, so a caller that gives up cancels nothing and two modules- never queue behind each other. `ensure_loaded_within` bounds the wait.- `ModuleMemoryProvider::proxy` uses an 8 s grace for reads and answers- `MemoryError::Unavailable` ("memory is still starting") instead of hanging- into the UI's 30 s RPC deadline; writes (`store`, the syncs, `shutdown`, …)- wait it out because a dropped write is lost work. `modules.list` reports- `Loading`, and `health()` answers `Degraded` — never `Down`, which is the- signal that rebinds the fallback driver — while a load is in flight.- - **The chat turn's one inline memory await is bounded** — 3 s around- `recall_situational_preferences_on` in `core_turn.rs`; citations and autosave- were already spawned off the path.-- #### The memory seam — one contract, two live paths (#5560)-- Memory is the second module consumer, and it is **half migrated**. Read this- before touching `src/openhuman/memory/`.-- **The contract is `tinymemory-api`, and `crate::openhuman::memory::api` is a- re-export of it — not a copy.** `3ee5a3cad` inlined that crate as 10,894 lines- under `src/openhuman/memory/api/`, every file byte-identical to- `vendor/tinymemory/crates/tinymemory-api/src/` apart from doc-comment paths. Nothing behaved- differently, which is what made it worth undoing: the contract is the vocabulary- the host, `ModuleMemoryProvider`, and the separately compiled module all speak,- and the module compiles against the **crate**. A verbatim copy made the host's- `MemoryError`, `Chunk`, `Capabilities` and `MemoryProvider` distinct types from- the ones on the wire. `api::wire` is where that bit hardest — its own docs, and- `modules/memory.rs`, both justify sharing the error table because- reimplementing it "is what would let a `PathEscape` arrive as an `Invalid`" —- and while the host held a private copy of that table the sentence described an- intention rather than the build. `memory/api.rs` is a short `pub use` now;- `memory/api_identity_tests.rs` pins the identity with type equalities, so a- re-inlining fails to compile rather than passing silently.-- **`memory::api` is the contract surface, not an alias for the crate.** It- exports only what actually crosses the bus, derived from both directions —- outbound from `modules/memory.rs`, inbound from `modules/memory_host.rs`. Whole- namespaces where the namespace *is* wire vocabulary (`capabilities`, `chunks`,- `error`, `goals`, `health`, `provider` with its `provider::types` payloads,- `recall`, `tool_memory`, `tree`, `types`, `wire`), plus `CONTRACT_VERSION` for- version negotiation. Three exclusions are deliberate and each has a reason:-- - **`host`** is re-exported as **two types, not the namespace** — only- `MemoryEvent` and `SpacyResponse` cross the bus. The rest of- `tinymemory_api::host` is the *in-process engine-embedding* seam (the- persisted `MemoryConfig` sections, `MemoryHostConfig`, `EmbeddingProvider`,- `MemoryEventSink`), which the host hands to `tinymemory-core` directly and- which never touches a module.- - **`null`** is the fallback driver `memory::binding` installs when no module is- available — what runs when nothing crosses the bus, so the opposite of- contract. Name `tinymemory_api::null` at the call site.- - **`traits`**, **`version`** and **`is_compatible`** had zero uses in `src/`;- they were alias surface only.-- That is the point of the split: `tinymemory-api` is *also* the crate this host- embeds the engine through, and "the module contract" and "the host's own use of- the crate" are different surfaces. Reaching the second one by naming- `tinymemory_api::` directly keeps the difference visible in the source rather- than in someone's memory. **Do not widen `memory::api` back out to the whole- crate** — if a new path needs something not exported there, the question to- answer first is whether it crosses the bus.-- **`tinymemory-api` stays; `tinymemory-core` has left the product build (#5560,- 2026-08-31).** The API crate is the host-owned contract and is meant to be a- dependency. The *engine* crate used to be linked beside it — 1.44 MB of `.text`- — and is not any more: it, `tinycortex`, `tinycortex-api`, the `tinymemory`- facade and `tinymemory-tinycortex` are all out of the **normal** dependency- graph. Verify rather than trust the manifest, because the two can disagree:- `cargo tree -e normal -i <crate>` under the product feature set prints "nothing- to print" for each.-- Two survivals are deliberate and neither puts the engine back in the product:-- - **`[dev-dependencies]`** carries `tinycortex`, `tinymemory-core` and- `tinymemory-tinycortex` for the ~11 test files that drive a real in-process- engine. Cargo does not link dev-dependency features into the shipped binary —- the same precedent the root `tinywallet` entry already sets.- - **`optional = true`**, reached by two default-OFF-for-the-product features.- `rss-bench` keeps `tinycortex` and `tinymemory-core` available to the two- `library_profile` bins, which measure the in-process engine and cannot use a- dev-dependency because a `[[bin]]` never sees one. `memory-engine-seams`- compiles `memory::host_impls` for the ~24 `tests/*.rs` integration targets- that install the host seams — a `tests/` target links this crate as an- ordinary dependency, where `cfg(test)` is false, so `#[cfg(test)]` would not- have reached them however the engine was declared. It is in `default`- (so every test lane picks it up without composing a new feature string) and- allow-listed in `INTENTIONALLY_NOT_FORWARDED`; neither feature is in- `scripts/ci/product-features.txt`.-- The `[patch]` entries for `tinycortex` / `tinycortex-api` stay in the **root**- manifest and must not be removed with the dependencies. Dropping a direct- dependency and dropping its patch are different things: `tinycortex-api` is- unpublished (and the crates.io `tinycortex` is a stale 0.1.1 without the engine- features), the engine crates still reached as dev-dependencies name both by- version requirement, so removing a patch fails **resolution** ("no matching- package named `tinycortex-api` found") before anything compiles. Both point into- tinymemory's own vendored engine, `vendor/tinymemory/vendor/tinycortex` — there- is no top-level `vendor/tinycortex` submodule any more — so the engine the tests- link is the one the prebuilt module was built from, and a tinymemory re-pin- moves it. The shell manifest (`crates/openhuman-app/Cargo.toml`) carries **no** such- entries: dev-dependencies of a path dependency are never resolved there and- nothing forwards `memory-engine-seams` / `rss-bench`, so its copies sat under- `[[patch.unused]]` in `crates/openhuman-app/Cargo.lock` from #5560 until they were- removed (`cargo tree --locked --all-features -e normal,dev,build --manifest-path- crates/openhuman-app/Cargo.toml -i tinycortex` → not in the graph).-- `memory/direct_engine_refs_tests.rs` is still the ratchet over direct- `tinymemory_core::` references, but **its non-empty list no longer implies a- linked engine** — it scans source text and cannot see `cfg`, and none of its- ten remaining entries is in the product build: seven are `#[cfg(test)]`-only,- one is `memory/host_impls.rs` behind the default-only `memory-engine-seams`- feature, and two are the `rss-bench` bins, behind a feature the product set- never enables. Draining them is a correctness goal (a second,- unpoliced door into the subsystem), not a binary-size one.-- **Most of what remains is blocked upstream, not here.** `modules::registry` pins- the TinyMemory module to a released, SHA-256-verified artifact, so a new bus- method is a `tinymemory` release plus a registry re-pin before it is a host- change. Adding a `MemoryProvider` method without that produces a driver that- answers `Unsupported` — strictly worse than the direct call, because the failure- moves from compile time to run time. The gap list in that lint's module docs is **stale as of 2026-08-23**: retrieval- filters, chunk reads, the entity-kind filter, source listing and the people- domain all landed as real capability families (`MemoryRetrieval`,- `MemoryChunks`, `MemoryPeople`, `MemoryProfile`, `MemoryEpisodic`), and- `ModuleMemoryProvider` implements all of them bar `as_episodic`. What blocks- migrating onto them is **release lag, not seam width** — see the release note- below. The `source_scope` task-local is no longer a gap either: it is host- policy, it lives in `memory::source_scope`, and the scope crosses the bus as a- `SourceScope` value.-- **Task-locals do not cross the bus, and both of the ones here are permission- checks that fail OPEN.** The module is a separately compiled `cdylib` with its- own statics, so a task-local set host-side reads as absent inside it — and- absent means *unrestricted* for `source_scope` and *exclude nothing* for the- self-echo exclusion. Never let a memory call infer either from ambient state:- pass `memory::source_scope::as_bus_scope()` and `RecallOpts::exclude_session_id`- explicitly. The engine's scoped/unscoped function pairs exist for this reason —- `cover_window_scoped`, `query_source_scoped`, `drill_down_scoped`,- `fetch_leaves_scoped`. **The unsuffixed twin reads the engine's task-local and- must not be called from this host.**-- **The module release lags the vendored source.** `modules::registry` pins a- released, SHA-256-verified artifact; the vendored submodule is routinely ahead- of it. Check the *tag*, not the working tree, before migrating onto a family:- `git -C vendor/tinymemory show <tag>:crates/tinymemory-module/src/lib.rs | grep '"ListChunks"'`.- Migrating onto a method the pinned artifact does not serve yields a runtime- `Unsupported` — strictly worse than the direct call, because the failure moves- from compile time to run time.-- **The `SourceKind` trap is gone — do not re-derive it.** This note used to warn- that `tinymemory_core::store::chunks::types::SourceKind` resolved to- `tinycortex_api::chunks::SourceKind` and was **not** the contract's- `SourceKind`, so swapping the import was a type error rather than a free carve-- out. `tinycortex-api` is now a deprecated re-export of `tinymemory-bus`, and the- two resolve to the **same item**; the engine's chunk types are re-exported from- `crate::engine::backend::chunks`, which lands in the same place. Verified with a- compile-time identity probe (a function taking the engine path and returning the- contract path), then by repointing every OpenHuman call site — the compiler is- the proof. Prefer `tinymemory_api::chunks::…` in new code.-- The general shape of the warning still holds for *other* pairs: two crates with- near-identical types are a real hazard, and a "free carve-out" is only free once- the compiler says so. Probe before assuming, in either direction.-- #### The `openhuman-tui` crate-- The tabbed terminal UI is the standalone `openhuman-tui` workspace package in `crates/openhuman-tui/`. It depends on and boots `openhuman-core` in-process; the core package has no ratatui/crossterm dependencies or `tui` feature. The historical `openhuman tui` / `chat` arms remain only as migration diagnostics that point users to `openhuman-tui` instead of falling through to an `unknown namespace` error.- - **No controllers, no agent tools, no `all.rs` changes.** The TUI is a pure *client* of existing registered controllers — it boots the core in-process (`CoreBuilder::new(HostKind::detect_standalone()).domains(DomainSet::full()).services(ServiceSet::none())`), sends chat turns through `web_chat`, reads a bounded in-memory copy of the file-only core log stream, edits only curated safe config getters/updaters, and invokes auth controllers for account/status actions. Never render `config.get` wholesale because the full snapshot can contain secrets.- - **Terminal hygiene is load-bearing.** `logging::init_for_tui` installs a **file-only** subscriber (never stderr) — a single core boot log on stdout/stderr would corrupt the alternate-screen UI. `terminal::TerminalGuard` restores raw mode + the main screen on `Drop`, and a panic hook chains a restore ahead of the default hook. All `[tui]` state-transition logs go to the file, never `println!`.- - **Independent of the desktop shell** (the app ships its own Tauri UI). The pure reducer lives in `crates/openhuman-tui/src/state.rs` (`TranscriptState::apply_event`) with unit tests, so most behaviour is testable without a terminal.-- Verify the boundary with `cargo tree -p openhuman -i ratatui` (must return nothing) and build the terminal client with `cargo check -p openhuman-tui`.- #### The `channels` gate (#4801 — last child of #4795)-- Leaf-gate pattern with **two ungated carve-outs and no stub file** — the reach-map put every gated symbol at a *registration/leaf* call site, so absence (unknown-method / omitted tool), not a disabled-error stub, is the correct off-state (same rationale as `flows`).-- - **The gate now owns the crate.** This bullet has been rewritten twice, and the history is the useful part. It first read "Sheds ZERO dependencies — do NOT re-litigate", on the premise that **`tinychannels` can never be gated out**: `config/schema/channels.rs` re-exports its config types, `DomainEvent` embeds `ChannelInboundEnvelope` in an always-on enum, and `security/pairing.rs` re-exports its pairing helpers. It then became "sheds 28 crates" once the two heavy *providers* (`email_channel`'s lettre/async-imap/mail-parser, `lark`'s axum + prost) were gated **inside** the vendored crate, while the premise was left standing.-- The premise is now false, and deliberately so. Splitting **`tinychannels-bus`** out of the crate (the same shape as `tinydocs-bus` / `tinywallet-bus`) moved all three always-on pins into a transport-free contract crate — envelopes, intents, `ChannelsConfig`, controller metadata, relay frames, the session-key rules and the pairing helpers. `tinychannels-bus` is unconditional; **`tinychannels` is `optional = true`**, and the provider stack and relay transport loop go behind the gate with it.-- **Measured, this sheds ZERO dependencies, and you should expect that.** The kernel profile is **288 packages / 270 names / 2 native before and after** — a diff of the two package lists is literally one line, `tinychannels` out, `tinychannels-bus` in. Every heavy crate tinychannels carried is shared with kernel surface (`rusqlite` has six parents, `reqwest` ten), so removing its *parent* frees nothing. This is the third time this exact result has been recorded here — the TinyMemory port and the `tinymcp` extraction both landed at −1/−1/0 for the same reason — so **do not open this seam expecting a dependency win.**-- What it does buy is a **compilation** boundary and an architectural one: a `channels`-less build compiles **~31.7k lines instead of ~39.3k**, since only the ~7.6k-line contract crate remains. And the contract is now a real `-bus` crate, which is the prerequisite for moving the providers out of the binary entirely.-- **The module now exists upstream; what is missing is a release.**- `tinychannels` carries `crates/tinychannels-module`, a `cdylib` serving- `ai.tinyhumans.tinychannels.Channels` (`StartChannel` / `StopChannel` /- `SendMessage` / `ListChannels` / `ChannelStatus`) and calling the host's- `ChannelsHost` object for inbound traffic. Provider construction was lifted out- of `channels/runtime/startup.rs` into `tinychannels::factory::build_channels`, so- the module and this host build the same providers from the same config instead of- from two copies — credential hydration, the proxy-aware HTTP clients and the- `ChannelHost` capability surface stay here, as host policy.-- **There is deliberately no `TINYCHANNELS` entry in `modules::registry` yet.**- That table pins SHA-256 digests taken verbatim from a published release, and- `tinychannels` has not cut one. Do not invent digests or compute them from a- local build — a registry entry that a server could satisfy with different bytes- is the whole thing the digest exists to prevent. The order is: release the- module, then pin it, then switch `channels/runtime` onto the bus.-- **The module step, if it is taken, is worth roughly −20 packages.** Unlike the gate, that one is not zero: `scripts/dep-sim.py --features "$(bash scripts/ci/product-features.sh)" --cut tinychannels` projects **398/369/2 → 378/351/2, i.e. −20 packages / −18 names / 0 native**. Measure with the simulator rather than summing `cargo tree -i` results, which over-counts shared subtrees. Two things gate that work and neither is in this repo: the providers need a **host-callback object** for inbound traffic (a served object cannot open a stream back to its caller, so `tinychannels-bus` already declares `HOST_BUS_NAME` for it, the same shape as `modules/memory_host.rs`), and `modules::registry` pins SHA-256-verified release artifacts, so a `tinychannels` release must land first.-- **Never re-declare a contract type host-side.** `channels/traits.rs` — the ungated carve-out — points at `tinychannels_bus`, not `tinychannels`, precisely because the implementation crate is optional and the vocabulary is not. Same rule as every other `-bus` crate: a field added on one side of a copy is a decode failure on the other, with nothing to catch it.-- That mattered: gating the crate out would have required stubbing ~28 items, among them `constant_time_eq`/`hash_token` (a wrong stub is a security bug) and `build_session_key_for_inbound_envelope`, which derives a **persisted** conversation key that `memory_conversations/bus.rs` writes — silent data regrouping if it ever drifted. Gate the providers, never the crate.-- Two couplings to keep in mind when touching this: **`voice` also requires `dep:tinychannels` + `tinychannels/email`**, because `voice::audio_toolkit::ops` delivers generated podcasts through `EmailChannel` — a voice-enabled, channels-less build still needs the provider, and this is now the *only* reason such a build links the implementation crate at all. And `providers/discord/api_tests.rs` uses `axum` for a mock server unrelated to Lark, so axum is dual-declared as a dev-dependency in tinychannels and must stay that way.-- (`whatsapp-web` is a **refinement inside** the gate — `whatsapp-web = ["channels", "tinychannels/whatsapp-web"]`.)- - **Two ungated carve-outs.** `pub mod traits;` (a one-line `tinychannels_bus` `Channel`/`SendMessage` re-export) and `pub mod cli;` (`CliChannel`, a dependency-free local stdin/stdout REPL) stay compiled in **all** builds — both are reached by the always-on agent-harness interactive loop (`agent::harness::session::runtime::run_interactive`). Same shape as the other ungated carve-outs. `channels::mod.rs` `#[cfg(feature = "channels")]`s everything else; nothing inside the gated submodules changes.- - **The in-app web chat is NOT gated.** `openhuman::web_chat` (RPC namespace `channel`, decoupled from `channels/` in #5002 + #5003 which also moved `learning` out) is core product surface and stays always-compiled even though its runtime tag is `DomainGroup::Channels`. Its registration push in `crates/openhuman-core/src/core/all.rs` is deliberately left ungated; the both-ways test pins `channel` present with the feature OFF.- - **Three mis-housed imports were retargeted (no stub needed).** `cron/bus.rs` (`Channel`/`SendMessage`/`ChannelMessage`) and `memory_conversations/bus.rs` (`ChannelMessage` + `context::conversation_history_key`) reached the gated domain only to pick up contract vocabulary that actually lives in `tinychannels_bus`; pointing them straight at the contract crate removes the always-on → gated edge. `voice/audio_toolkit/ops.rs` (`providers::email_channel::EmailChannel`) is different — `EmailChannel` is a provider, not contract vocabulary, so it stays on `tinychannels` itself (and is why voice keeps `dep:tinychannels` — see above). The old `channels::` paths were 1-line delegations / `pub use` re-exports of exactly these.- - **Leaf-gated call sites** (each carries its own `#[cfg]`): the controller-registration pushes in `crates/openhuman-core/src/core/all.rs` (channels controllers, `webview_notifications`), the `ChannelInboundSubscriber` + web-only-proactive block in `crates/openhuman-core/src/core/jsonrpc.rs`, and `spawn_channels_service` in `crates/openhuman-core/src/core/runtime/services.rs`. `webview_notifications` moved under `desktop/` in the family reorg and stays leaf-gated there. String-match arms (`"channels" =>` descriptions) stay **ungated** — they are data.- - **`start_bootstrap_jobs`' `services.channels` block keeps running slim** — it drives composio sync / workspace-memory sync / orchestration drain and names **no** `channels::` symbol, so it stays ungated by design.- - **No CLI change.** There is no `openhuman channels` subcommand; generic namespace resolution yields "unknown namespace" when off (the `flows` precedent — acceptable).- - **Both-ways tests.** `channels_controllers_{registered_when_feature_on,absent_when_feature_off}` in `crates/openhuman-core/src/core/all_tests.rs` pin the controller surface (the OFF half also asserts `channel`/web_chat survives), and `whatsapp_data_tools_are_gone_in_every_build` in `src/openhuman/tools/ops_tests.rs` pins that the removed tool family stays removed in both directions of the gate. CI's smoke lane runs `cargo check` only, so run `cargo test -p openhuman --lib --no-default-features core::all::tests` locally after touching any gated surface.-- ### Event bus (`crates/openhuman-core/src/core/event_bus/`)-- Typed pub/sub + native request/response. Both singletons — use module-level functions.-- - **Broadcast** (`publish_global`/`subscribe_global`): fire-and-forget, many subscribers.- - **Native request/response** (`register_native_global`/`request_native_global`): one-to-one typed dispatch, zero serialization, internal-only.-- Core types: `DomainEvent` (events.rs), `EventBus` (bus.rs), `NativeRegistry` (native_request.rs), `EventHandler`/`SubscriptionHandle` (subscriber.rs).-- Domains: `agent`, `memory`, `channel`, `cron`, `skill`, `tool`, `webhook`, `system`.-- Each domain owns `bus.rs` with handlers. Convention: `<Purpose>Subscriber`, `name()` → `"<domain>::<purpose>"`.-- **Adding events:** add to `DomainEvent`, extend `domain()` match, create `<domain>/bus.rs`, register at startup, publish via `publish_global`, and bump `EVENTS_VERSION` in [`crates/openhuman-core/src/core/bus.rs`](crates/openhuman-core/src/core/bus.rs) — minor for an added variant or field, major (plus a new interface name) for anything an older subscriber cannot parse. Peers exchange that version through the manifest, so skipping the bump turns a version skew into a decode failure later instead of a startup warning.-- **Adding native handlers:** define req/resp types (`Send + 'static`, not `Serialize`), register at startup keyed by `"<domain>.<verb>"`, dispatch via `request_native_global`.-- ----- ## Design & patterns-- **Visual**: primary `#2F6EF4`, sage/amber/coral semantics, Inter + Cabinet Grotesk + JetBrains Mono. Canonical tokens in [`app/src/styles/tokens.css`](app/src/styles/tokens.css) (RGB channel triples); [`app/tailwind.config.js`](app/tailwind.config.js) wraps each as `rgb(var(--token) / <alpha-value>)`.-- **Key rules:**-- - File size: prefer ≤ ~500 lines.- - **No dynamic imports** in production `app/src` — static `import`/`import type` only. Guard heavy paths with try/catch. Exceptions: test files, `.d.ts`, config files.- - **i18n**: all UI text through `useT()` from `app/src/lib/i18n/I18nContext`. Add each key to `en.ts` **and real translations to every locale file** (`ar`, `bn`, `de`, `es`, `fr`, `hi`, `id`, `it`, `ko`, `pl`, `pt`, `ru`, `zh-CN`), preserving interpolation placeholders exactly. Translation values must not contain em dashes (`U+2014`); use natural, locale-appropriate punctuation and phrasing, never literal or machine-sounding copy. Run `pnpm i18n:check`, `pnpm i18n:english:check`, and the i18n coverage test before submitting changes.- - **Dual socket sync**: keep `socketService`/MCP transport aligned with core socket behavior.- - **Tauri guard**: use `isTauri()` or wrap `invoke(...)` in try/catch — never check `window.__TAURI__` directly.- - **Generated docs**: some architecture docs contain generated blocks marked `<!-- BEGIN/END GENERATED: … -->` sourced from code (today: the frontend provider chain in [`gitbooks/developing/architecture/frontend.md`](gitbooks/developing/architecture/frontend.md), from the `@generated-source:provider-chain` marker in `app/src/App.tsx`). Don't hand-edit between the markers — update the code source, then run `pnpm docs:generate`. CI (`pnpm docs:check`, the **Docs Drift** lane) fails on stale generated docs. Generator + tests: `scripts/generate-architecture-docs.mjs`.-- ----- ## Debug logging (must follow)-- - Default to **verbose diagnostics** on new/changed flows.- - Log entry/exit, branches, external calls, retries/timeouts, state transitions, errors.- - Stable grep-friendly prefixes (`[domain]`, `[rpc]`), correlation fields (request IDs, method names).- - Rust: `log`/`tracing` at `debug`/`trace`. App: namespaced `debug`.- - **Never** log secrets or full PII.- - Changes lacking logging are incomplete.-- ----- ## Feature design workflow-- Specify → prove in Rust → prove over RPC → surface in UI → test.-- 1. **Specify** — ground in existing domains, controller patterns, JSON-RPC naming (`openhuman.<namespace>_<function>`).- 2. **Implement in Rust** — domain logic + unit tests.- 3. **JSON-RPC E2E** — extend `tests/json_rpc_e2e.rs` / `scripts/test-rust-with-mock.sh`.- 4. **UI** — React + `coreRpcClient` (`relay_http_rpc`). Keep rules in core.- 5. **App unit tests** — Vitest.- 6. **App E2E** — desktop specs.-- Update `src/openhuman/platform/about_app/` when adding/removing/renaming user-facing features. Define E2E scenarios up front covering happy paths, failures, auth gates.-- ----- ## Git workflow-- Contribute via your fork. Recommended remotes:-- ```text- origin [email protected]:<your-username>/openhuman.git (push here)- upstream [email protected]:tinyhumansai/openhuman.git (fetch-only)- ```-- - **Never write code on `main`.** Branch off `upstream/main` for all work.- - Issues and PRs on upstream `tinyhumansai/openhuman`.- - Push to `origin` (fork), never `upstream`. PRs with `--head <your-username>:<branch>`.- - Use issue/PR templates verbatim.- - On push blockers: fix your own hook failures; bypass with `--no-verify` only for unrelated pre-existing breakage (call out in PR body).-- ----- ## Platform notes-- - **Vendored CEF-aware `tauri-cli`**: only the vendored CLI at `crates/openhuman-app/vendor/tauri-cef/crates/tauri-cli` bundles Chromium correctly. Stock `@tauri-apps/cli` produces broken bundles. Reinstall: `cargo install --locked --path crates/openhuman-app/vendor/tauri-cef/crates/tauri-cli`.- - **macOS deep links**: require built `.app` bundle, not just `tauri dev`.- - **Windows deep links**: `openhuman://` registered via `tauri-plugin-deep-link::register_all`. Check in `crates/openhuman-app/src/deep_link_registration_check.rs`.- - **Core standalone debugging**: `./target/debug/openhuman-core serve` (token at `{workspace}/core.token`). Public endpoints: `GET /health`, `GET /schema`, `GET /events`.-- ----- ## Coding philosophy-- - **Unix-style modules**: small, single-responsibility, composed through clear boundaries.- - **Tests before the next layer**: untested code is incomplete.- - **Docs with code**: update AGENTS.md or architecture docs when rules or behavior change.+ Long CI build or test commands must run through+ `scripts/ci-cancel-aware.sh`. Do not export `CARGO_TARGET_DIR`; the repository+ already configures shared build output where appropriate.++ Keep matching profile settings synchronized between `Cargo.toml` and-`app/src-tauri/Cargo.toml`:++`crates/openhuman-app/Cargo.toml`:++ - Development dependencies use `debug = false`.+ - Release builds use thin LTO, one codegen unit, symbol stripping, and+ `debug = "line-tables-only"`.++ ## Testing and CI++ CI Lite runs area-specific checks and changed-line coverage on PRs to `main`+ or `release`. CI Full runs the complete suites for `release`. Changed-line+ coverage must be at least 80 percent.++ - Frontend unit tests are colocated as `*.test.ts` or `*.test.tsx` under+ `app/src/`. Use Vitest and test behavior rather than implementation.+ - Rust domain tests live beside their modules. Use+ `scripts/test-rust-with-mock.sh` for tests that need the shared mock backend.+ - JSON-RPC behavior belongs in Rust E2E tests, commonly+ `tests/json_rpc_e2e.rs`.+ - Frontend flows need mocked browser or desktop E2E coverage under+ `app/test/e2e/specs/`.+ - E2E code must use `element-helpers.ts`, not raw platform element types.+ - Tests must not call real backend or third-party services.+ - Avoid time-based flakes and real network access in unit tests.++ Shared mock backend:++ - Core routes: `scripts/mock-api-core.mjs`+ - Server: `scripts/mock-api-server.mjs`+ - E2E adapter: `app/test/e2e/mock-server.ts`+ - Manual start: `pnpm mock:api`++ ## Configuration and security++ - Copy environment settings from `.env.example` and `app/.env.example`.+ - Frontend environment access is centralized in `app/src/utils/config.ts`.+ Do not read `import.meta.env` elsewhere.+ - Rust configuration is defined under+ `src/openhuman/config/schema/` and loaded through its config operations.++ The autonomy policy is security-sensitive:++ - `action_dir` is the agent's permitted read and write root.+ - `workspace_dir` stores internal state and is never an acting-tool target.+ - Unknown commands classify as writes.+ - System and credential paths are always forbidden.+ - The approval gate is on by default. Interactive requests expire as denied+ after ten minutes.+ - Sandboxed agents use the platform jail or Docker backend. Rust path checks+ still apply if the sandbox falls back.++ Do not weaken `is_workspace_internal_path`, `is_always_forbidden`,+ `classify_command`, or approval behavior to make a feature work.++ ## Frontend++ The provider chain is documented and generated from `app/src/App.tsx`.+ Update the source marker and run `pnpm docs:generate`; do not hand-edit+ generated documentation blocks.++ - Redux Toolkit is the default state layer. The authoritative slice list is in+ `app/src/store/index.ts`.+ - Persist user state through `userScopedStorage`, not ad hoc+ `localStorage`.+ - Use `coreRpcClient` for core RPC. It delegates to the+ `relay_http_rpc` Tauri command.+ - Auth state comes from `CoreStateProvider` and+ `fetchCoreAppSnapshot()`.+ - Routes are defined in `AppRoutes.tsx`. Check that file before adding links+ or redirects.+ - Bundled agent prompts live under `src/openhuman/agent/prompts/`, not in the+ frontend.++ Analytics:++ - Shared buttons use a stable, content-free `analyticsId`.+ - Successful domain outcomes use `trackAnalyticsEvent` from+ `components/analytics`.+ - Never send user text, entity IDs, filenames, credentials, or error messages.++ UI rules:++ - Use `useT()` for user-facing text and add real translations for every+ locale.+ - Preserve interpolation placeholders across translations.+ - Run `pnpm i18n:check`, `pnpm i18n:english:check`, and the i18n coverage+ test.+ - Do not use dynamic imports in production `app/src`.+ - Use `isTauri()` or catch `invoke` failures. Do not inspect+ `window.__TAURI__` directly.+ - Canonical visual tokens live in `app/src/styles/tokens.css`.++ ## Tauri shell+-Keep `app/src-tauri/` thin. The authoritative IPC list is the-`generate_handler!` call in `app/src-tauri/src/lib.rs`.++Keep `crates/openhuman-app/` thin. The authoritative IPC list is the++`generate_handler!` call in `crates/openhuman-app/src/lib.rs`.++ Do not add JavaScript injection to child webviews. New behavior belongs in+ Rust-side IPC hooks. Audit new Tauri plugins for `js_init_script`.++ The app uses Wry. Do not restore CEF or CDP scanner assumptions. The native+ iMessage scanner remains separate because it reads `chat.db` directly.++ ## Rust domain structure++ Business logic belongs under `src/openhuman/<domain>/`. Do not add flat-`src/openhuman/*.rs` domain files or business logic to `src/core/`.++`src/openhuman/*.rs` domain files or business logic to++`crates/openhuman-core/src/core/`.++ Preferred module shape:++ | File | Purpose |+ | --- | --- |+ | `mod.rs` | Module declarations, re-exports, and controller aggregators |+ | `types.rs` | Serde domain types |+ | `store.rs` | Persistence |+ | `ops.rs` | Business operations returning `RpcOutcome<T>` |+ | `schemas.rs` | Controller schemas and thin handlers |+ | `tools.rs` | Domain-owned agent tools |+ | `bus.rs` | Event subscribers |+ | `*_tests.rs` | Focused behavior tests |++ Additional rules:+-- Wire controllers through the registry in `src/core/all.rs`. Do not add++- Wire controllers through the registry in `crates/openhuman-core/src/core/all.rs`. Do not add+ namespace branches to `cli.rs` or `jsonrpc.rs`.+ - RPC namespace strings are wire contracts and do not follow directory+ renames.+ - Domain tools live with their domain and are re-exported through+ `src/openhuman/tools/mod.rs`. Keep only cross-cutting tools in+ `tools/impl/`.+ - Stable memory collection scope belongs in `metadata.path_scope`; item IDs+ are deduplication keys.+ - Update `src/openhuman/platform/about_app/` when user-visible capabilities+ change.++ ## Tool, harness, and runtime boundaries++ `tinyagents` owns tool-call dialects, parsing, catalog rendering, transcript+ replay, and the agent loop. `tinytools` owns the shared `Tool` trait and tool+ types. OpenHuman owns execution policy, approvals, sandboxing, timeouts, and+ progress events.++ - Use the `tinytools` copy vendored through `vendor/tinyagents/`; a second path+ creates incompatible Rust types.+ - Keep conversions mechanical. Policy decisions belong in OpenHuman.+ - `openhuman_core::Harness` is the public prompt-to-reply API. Calls go through+ `CoreRuntime::invoke`, not directly to domain operations.+ - Set `config_path` with `workspace_dir`, and set a turn origin with its access+ tier. `Access::full()` configures both access fields.+ - Use one `Harness` per process. Copy skills into its workspace because skill+ discovery rejects symlinked bundles.++ `CoreBuilder` controls background services with `ServiceSet`, runtime domains+ with `DomainSet`, and tool visibility with `ToolGroups`. These controls only+ narrow capabilities.++ Cargo default features define the contributor build;+ `scripts/ci/product-features.txt` defines the shipped product. The Tauri shell+ disables default features, so product gates must be forwarded explicitly in-`app/src-tauri/Cargo.toml` and checked by++`crates/openhuman-app/Cargo.toml` and checked by+ `scripts/ci/check-feature-forwarding.mjs`. Test both enabled and disabled+ builds after changing a gate. Use `scripts/assert-shed.sh` or+ `scripts/dep-sim.py` before claiming a dependency reduction.+ ## Loadable modules and bus contracts++ Each loadable module has a small `*-bus` contract crate for interface names,+ method constants, request and response types, and its contract version.++ | Contract | Feature or role |+ | --- | --- |+ | `tinydocs-bus` | `documents` |+ | `tinyvoice-bus` | `voice` |+ | `tinyjuice-bus` | inference kernel |+ | `tinyruntime-bus` | runtime clients |+ | `tinywallet-bus` | `web3` |+ | `tinymcp-bus` | `mcp` |+ | `tinychannels-bus` | channel vocabulary |++ Rules:++ - Never redeclare a contract type in OpenHuman.+ - Call members through contract constants, not string literals.+ - Contract crates stay synchronous and free of I/O and runtime dependencies.+ - Shared wire behavior belongs in the contract. Runtime, config, and security+ policy stay in the host.+ - Test the handwritten registry metadata against each contract's bus name and+ object path.+ - Initialize recursive submodules before building: `git submodule update+ --init --recursive vendor/`.++ Native modules are first-party `cdylib` files loaded into the core process.+ They share its privileges and crash domain.++ - Only the compiled registry may select artifacts.+ - Pin release checksums from the published release. Do not compute replacement+ pins from a local build.+ - Keep ABI, manifest, dependency, and digest admission checks.+ - Do not unload or repeatedly retry a faulted module in the same process.+ - Untrusted code belongs in a separate process.+ - Do not enable the `modules` feature directly on the unconditional+ `tinybus` dependency. Forward it from OpenHuman's own feature.++ Memory uses `tinymemory-api` as its contract. `memory::api` is a selective+ re-export of the wire surface, not a place to copy or widen the whole crate.+ Pass source scope and self-echo exclusions explicitly because task-local state+ does not cross a module boundary. Confirm that a method exists in the pinned+ module release before migrating a host call to it.++ ## Backend API++ Backend calls use the vendored `tinyhumans-sdk`. Add missing backend routes to+ that SDK rather than recreating them in `src/api/`.++ `src/api/` owns OpenHuman session-token lookup, base URL selection, transport+ configuration, and error classification. Every SDK error must pass through+ `classify_sdk_error`.++ Every TinyHumans backend request must carry a sanitized `x-sdk-name`:++ - `BackendOAuthClient`+ - `IntegrationClient`, except redirected file downloads+ - `MedullaClient`, including its separate SSE handshake+ - desktop `GET /auth/me`+ - the agent Langfuse ingestion request++ Set `ProductIdentity` once during startup before building clients. Do not add+ this header to third-party endpoints, MCP servers, BYOK inference endpoints, or+ presigned storage redirects.++ Search for `bearer_authorization_value` and `header(AUTHORIZATION` when+ auditing hand-built backend requests.++ ## Event bus+-`src/core/bus.rs` owns the process-wide `BUS` singleton. Use `BUS.publish` and++`crates/openhuman-core/src/core/bus.rs` owns the process-wide `BUS` singleton. Use `BUS.publish` and+ `BUS.subscribe` for domain events. Use `BUS.native()` for typed, in-process+ request and response calls that carry values which cannot cross a serialized+ transport.++ Each subscribing domain owns a `bus.rs`. Subscriber names use+ `<domain>::<purpose>`.++ When adding an event:++ 1. Add it to `DomainEvent`.+ 2. Extend the `domain()` match.+ 3. Register its subscriber at startup.-4. Bump `EVENTS_VERSION` in `src/core/bus.rs`.++4. Bump `EVENTS_VERSION` in `crates/openhuman-core/src/core/bus.rs`.++ Native request and response types must be `Send + 'static` and do not need+ serialization.++ ## Logging and code quality++ - Prefer files under roughly 500 lines and split by responsibility.+ - Add grep-friendly debug or trace logs for new flows, branches, external+ calls, retries, timeouts, state changes, and errors.+ - Include useful correlation fields such as request IDs and method names.+ - Never log credentials, tokens, full user content, or other sensitive data.+ - Keep generated documentation synchronized with `pnpm docs:generate` and+ verify it with `pnpm docs:check`.+ - Update code and documentation together when a contract changes.++ ## Git and platform notes++ - Work happens on a branch, never directly on `main`.+ - Push feature branches to the contributor fork and open PRs against+ `tinyhumansai/openhuman`.+ - Use the issue and PR templates.+ - Fix hook failures caused by your changes.+ - macOS deep links require a built app bundle.+ - Windows registers `openhuman://` through `tauri-plugin-deep-link`.+ - Standalone debugging uses `./target/debug/openhuman-core serve`. Public+ endpoints are `GET /health`, `GET /schema`, and `GET /events`.diff --cc crates/openhuman-core/Cargo.tomlindex 59796b3b4a,0000000000..cb8b166c05mode 100644,000000..100644--- a/crates/openhuman-core/Cargo.toml+++ b/crates/openhuman-core/Cargo.toml@@@ -1,1516 -1,0 +1,1516 @@@+# The host package manifest lives under `crates/`, while its implementation+# intentionally remains at the repository root: `src/openhuman/` is the core+# domain tree. The host-facing wrappers live beside this manifest under+# `src/{api,core,embed,rpc}`. Auto-discovery is disabled because+# Cargo only scans beside this manifest; the repository layout gate requires+# every root `tests/*.rs` and `examples/*.rs` file to have an explicit target.+[package]+name = "openhuman"+version.workspace = true+edition.workspace = true+description = "OpenHuman core business logic and RPC server"+# The crate ships a verbatim GPLv3 `LICENSE` file but carried no `license` key,+# which left the grant ambiguous to every tool that reads metadata rather than+# the file (cargo-deny, crates.io, SBOM generators). Declared explicitly as+# `only` — not `or-later` — to match `medulla-public` and the `GPL-3.0-only`+# first-party crates in the closure (`tinyagents`).+license.workspace = true+repository.workspace = true+readme = "../../README.md"+autobins = false+# build.rs globs tests/raw_coverage/*.rs into the single `raw_coverage_all`+# integration target (see tests/raw_coverage_all.rs). Those files used to be ~76+# individual `tests/*.rs` targets, each statically relinking the whole crate —+# collapsing them into one target removes ~75 full-crate link steps per test run.+build = "../../build.rs"+autotests = false+autoexamples = false+autobenches = false++# `cargo machete` reports a dependency as unused when no `use` names it, and+# this list is empty because there is nothing left to excuse (#5560).+#+# It used to hold `tinymemory` (the facade) and `tinymemory-tinycortex` (the+# TinyCortex adapter), on the reasoning that both were load-bearing for DRIVER+# ADMISSION — the memory subsystem resolved its engine through `tinymemory`'s+# driver registry, and the adapter made TinyCortex admissible as that engine —+# so that dropping either would compile clean and fail at runtime.+#+# **That reasoning expired rather than being wrong.** `memory::binding::admit`+# is pure string matching against `MODULE_ID` and refuses+# `DriverClass::Embedded` outright, so nothing here resolves an engine through+# the facade's registry any more; the engine runs in the `tinymemory` TinyBus+# module. The facade is deleted and the adapter moved to `[dev-dependencies]`,+# where its only consumers (test fixtures) already lived.+#+# The principle it was written to protect still holds for whatever lands here+# next: an unsuppressed false positive is how a real finding gets ignored the+# time after.+[package.metadata.cargo-machete]+ignored = []++[[bin]]+name = "openhuman-core"+path = "src/main.rs"++[[bin]]+name = "test-mcp-stub"+path = "src/bin/test_mcp_stub.rs"++[[bin]]+name = "openhuman-fleet"+path = "src/bin/fleet.rs"+# The fleet supervisor embeds the axum control-plane server, so it only builds+# with the HTTP transport compiled in (#5048). Under `--no-default-features`+# (no `http-server`) this target is skipped rather than failing to link.+required-features = ["http-server", "bin-tools"]++# Embedded-RSS benchmark harness (#5046). Gated behind the default-OFF+# `rss-bench` feature so no benchmark code enters the shipped build. Build with+# `cargo build --release --features rss-bench --bin rss-bench`.+#+# It survives the engine removal because it never measured the engine: it builds+# an `Agent` roster over its own in-file `NoopMemory` and samples RSS, and its+# own doc comment explains that it hand-rolls that store rather than asking the+# factory, because `create_memory(backend = "none")` never returned a no-op+# backend. What the feature used to name the engine crates for was two+# `library-profile` *scenarios* — see that target's comment below; the binary+# itself is still here.+[[bin]]+name = "rss-bench"+path = "src/bin/rss_bench.rs"+required-features = ["rss-bench"]++# Stateful library profiling workloads (real sub-agent delegation, flows graphs+# and skill runs under a hermetic mock provider). Local/dev only, and the+# subject of every script in `scripts/profile/`.+#+# Two of its scenarios are gone with the in-process engine: `memory-ingest`+# drained the memory queue and `cold-phases` checkpointed the engine bootstrap+# through `tinymemory_core::store::MemoryClient`. The other six never named an+# engine symbol, which is why this binary survives rather than going with them.+[[bin]]+name = "library-profile"+path = "src/bin/library_profile/main.rs"+required-features = ["rss-bench"]++# ── Integration tests that need a PRODUCT gate ──────────────────────────────+#+# `[features] default` is the contributor set and no longer turns on `voice`,+# `web3`, `crash-reporting` or `inference`. These four `tests/` targets name+# symbols that only exist behind those gates, so without a `required-features`+# line a bare `cargo test` fails to COMPILE — not skip, fail — and the failure+# is in a file the contributor did not touch.+#+# `required-features` makes cargo skip the target instead, which is the honest+# outcome: the test exercises a domain that build does not contain. The CI+# product lanes pass `--features "$(scripts/ci/product-features.sh)"`, so every+# one of these still runs there, against the code that ships.+#+# Autodiscovery stays on for the other ~59 `tests/*.rs` targets; declaring a+# target explicitly only opts THAT file out of it.+#+# This replaces the per-symbol `#[cfg]` cleanup tracked in #5021 for these four+# files. #5021 is still the right fix for symbols named in the middle of an+# otherwise gate-free target — required-features is the blunt instrument, and+# it costs the whole target when the gate is off.+[[test]]+name = "observability_smoke"+path = "../../tests/observability_smoke.rs"+# The `is_*_event` Sentry filters are all `#[cfg(feature = "crash-reporting")]`.+required-features = ["crash-reporting"]++[[test]]+name = "x402_twit_sh_live"+path = "../../tests/x402_twit_sh_live.rs"+# `x402::tools::X402RequestTool` — the x402 domain is part of the web3 family.+required-features = ["web3"]++[[test]]+name = "json_rpc_e2e"+path = "../../tests/json_rpc_e2e.rs"+# `voice::reply_speech::{test_seam, TEST_SEAM_ENV}` — the reply-speech seam+# only exists in the real voice module, not the stub.+required-features = ["voice"]++[[test]]+name = "raw_coverage_all"+path = "../../tests/raw_coverage_all.rs"+# The merged raw-coverage target spans ~76 former files, so it reaches the+# widest surface of any single target: `lettre` (pulled in through the voice+# gate's `tinychannels/email`) and the local inference download service.+required-features = ["voice", "inference"]++[[test]]+name = "agent_approval_memory_coverage_e2e"+path = "../../tests/agent_approval_memory_coverage_e2e.rs"++[[test]]+name = "agent_builder_public"+path = "../../tests/agent_builder_public.rs"++[[test]]+name = "agent_harness_e2e"+path = "../../tests/agent_harness_e2e.rs"++[[test]]+name = "agent_harness_public"+path = "../../tests/agent_harness_public.rs"++[[test]]+name = "agent_multimodal_public"+path = "../../tests/agent_multimodal_public.rs"++[[test]]+name = "agent_turn_overrides_e2e"+path = "../../tests/agent_turn_overrides_e2e.rs"++[[test]]+name = "calendar_grounding_e2e"+path = "../../tests/calendar_grounding_e2e.rs"++[[test]]+name = "channels_host_boundary_e2e"+path = "../../tests/channels_host_boundary_e2e.rs"++[[test]]+name = "claude_code_stream_e2e"+path = "../../tests/claude_code_stream_e2e.rs"++[[test]]+name = "cli_model_overrides_e2e"+path = "../../tests/cli_model_overrides_e2e.rs"++[[test]]+name = "cli_sigpipe"+path = "../../tests/cli_sigpipe.rs"++[[test]]+name = "composio_list_tools_stack_overflow_regression"+path = "../../tests/composio_list_tools_stack_overflow_regression.rs"++[[test]]+name = "composio_post_oauth_retry_e2e"+path = "../../tests/composio_post_oauth_retry_e2e.rs"++[[test]]+name = "config_auth_app_state_connectivity_e2e"+path = "../../tests/config_auth_app_state_connectivity_e2e.rs"++[[test]]+name = "cwd_jail_e2e"+path = "../../tests/cwd_jail_e2e.rs"++[[test]]+name = "domain_modules_e2e"+path = "../../tests/domain_modules_e2e.rs"++[[test]]+name = "embeddings_rpc_e2e"+path = "../../tests/embeddings_rpc_e2e.rs"++[[test]]+name = "harness_embed"+path = "../../tests/harness_embed.rs"++[[test]]+name = "inference_provider_e2e"+path = "../../tests/inference_provider_e2e.rs"++[[test]]+name = "keyring_secretstore_e2e"+path = "../../tests/keyring_secretstore_e2e.rs"++[[test]]+name = "keyring_secretstore_fresh_e2e"+path = "../../tests/keyring_secretstore_fresh_e2e.rs"++[[test]]+name = "learning_phase4_integration_test"+path = "../../tests/learning_phase4_integration_test.rs"++[[test]]+name = "linux_cef_deb_runtime_e2e"+path = "../../tests/linux_cef_deb_runtime_e2e.rs"++[[test]]+name = "live_flows_demo_e2e"+path = "../../tests/live_flows_demo_e2e.rs"++[[test]]+name = "live_routing_e2e"+path = "../../tests/live_routing_e2e.rs"++[[test]]+name = "mcp_registry_e2e"+path = "../../tests/mcp_registry_e2e.rs"++[[test]]+name = "mcp_registry_multi_server"+path = "../../tests/mcp_registry_multi_server.rs"++[[test]]+name = "mcp_setup_e2e"+path = "../../tests/mcp_setup_e2e.rs"++[[test]]+name = "mcp_stdio_integration"+path = "../../tests/mcp_stdio_integration.rs"++[[test]]+name = "memory_roundtrip_e2e"+path = "../../tests/memory_roundtrip_e2e.rs"++[[test]]+name = "memory_sources_e2e"+path = "../../tests/memory_sources_e2e.rs"++[[test]]+name = "observability_wallet_expected_e2e"+path = "../../tests/observability_wallet_expected_e2e.rs"++[[test]]+name = "ollama_lifecycle_e2e"+path = "../../tests/ollama_lifecycle_e2e.rs"++[[test]]+name = "orchestrator_parallel_fanout_routing"+path = "../../tests/orchestrator_parallel_fanout_routing.rs"++[[test]]+name = "orchestrator_presentation_wiring"+path = "../../tests/orchestrator_presentation_wiring.rs"++[[test]]+name = "personality_e2e"+path = "../../tests/personality_e2e.rs"++[[test]]+name = "skill_registry_e2e"+path = "../../tests/skill_registry_e2e.rs"++[[test]]+name = "transcript_search_e2e"+path = "../../tests/transcript_search_e2e.rs"++[[test]]+name = "web_cancel_request_scoping"+path = "../../tests/web_cancel_request_scoping.rs"++[[test]]+name = "worker_b_domain_e2e"+path = "../../tests/worker_b_domain_e2e.rs"++[[test]]+name = "worker_c_modules_e2e"+path = "../../tests/worker_c_modules_e2e.rs"++[[example]]+name = "embed_headless"+path = "../../examples/embed_headless.rs"++[[example]]+name = "embed_kernel"+path = "../../examples/embed_kernel.rs"++[[example]]+name = "run_memory_doctor"+path = "../../examples/run_memory_doctor.rs"++[[example]]+name = "run_memory_reconcile"+path = "../../examples/run_memory_reconcile.rs"++[[example]]+name = "run_turn"+path = "../../examples/run_turn.rs"+++[lib]+name = "openhuman_core"+path = "src/lib.rs"+crate-type = ["rlib"]++[dependencies]+# tinyhumans-sdk — the typed Rust client for the TinyHumans backend API+# (https://github.com/tinyhumansai/sdk). Vendored as a git submodule under+# `vendor/` beside the other tiny* crates and consumed by path: the crate is not+# published to crates.io, so there is no `[patch.crates-io]` entry for it.+# This is the single source of truth for backend routes — `crates/openhuman-core/src/api/` is the+# OpenHuman-local adapter layer (session tokens, config, observability) that+# sits on top of it, not a second HTTP client. Anything missing here belongs+# upstream in the SDK repo, not re-implemented in `crates/openhuman-core/src/api/`.+# After cloning: `git submodule update --init vendor/tinyhumans-sdk`.+tinyhumans-sdk = { path = "../../vendor/tinyhumans-sdk", default-features = false }+# tinyflows — host-agnostic workflow engine (typed node graph → validate → compile →+# run on tinyagents). Powers the "Workflows" feature via the seam in+# `src/openhuman/tinyflows/` + the `flows::` domain. Pulls tinyagents 2.1 transitively+# (same version OpenHuman uses directly, preserving one trait identity). Published+# on crates.io and patched below to the vendored submodule.+#+# `mock` feature: enables `tinyflows::caps::mock::mock_capabilities()` — the+# deterministic in-memory capability bundle the flows `dry_run_workflow` agent+# tool (Phase 5b) runs a *draft* graph against so the workflow-builder agent can+# self-verify a proposal without any real side effects (no real LLM/tool/HTTP/code).+#+# Optional: exclusive to the default-ON `flows` feature (#4797). A slim build+# without `flows` drops this crate and its `jaq-*` JSON-query stack entirely.+tinyflows = { version = "0.8", features = ["mock"], optional = true }+# The saved-flow catalog and its SQLite backend, split out of this crate's+# `flows::` domain so a second host storing workflows does not have to reinvent+# them. `tinyflows-catalog` is the model (flows, revisions, runs, drafts,+# suggestions, the n8n importer, the save/run safety predicates);+# `tinyflows-sqlite` is one storage backend for it plus the engine checkpointer.+#+# Neither is published, so both are path dependencies into the same vendored+# workspace `tinyflows` itself comes from — one checkout, one `tinyflows`+# package, one `WorkflowGraph` type. Optional and exclusive to `flows` for the+# same reason the engine is.+tinyflows-catalog = { path = "../../vendor/tinyflows/crates/tinyflows-catalog", optional = true }+tinyflows-sqlite = { path = "../../vendor/tinyflows/crates/tinyflows-sqlite", optional = true }+# The authoring copilot's words: the `workflow_builder` / `flow_discovery`+# standing archetypes and the turn brief that opens a builder turn. Harness-free+# by construction — it names no tool trait and no model client — so this host+# keeps only the wiring: the `Tool` impls, the agent registry entries, and the+# prompt assembly that appends its own runtime sections.+tinyflows-copilot = { path = "../../vendor/tinyflows/crates/tinyflows-copilot", optional = true }+# TinyAgents — Rust LLM orchestration framework (LangGraph/LangChain-style):+# durable state graphs, agent-loop harness, model/tool registries, REPL ++# `.rag` workflow language. openhuman's agent engine + orchestration run on this+# crate's primitives via the adapter seam in `src/openhuman/agent/tinyagents/` (issue+# #4249): every turn drives through the harness; the workflow phase DAG, team+# member runtime, parallel fan-out, and multi-stage delegation run on graphs.+# We wire openhuman's own Provider/Tool, not the removed bundled openai client.+#+# tinyagents was split into a workspace of focused crates (tinyhumansai/tinyagents+# commit 612ea5e "refactor: split tinyagents into focused crates" and follow-on+# work): there is no longer a single `tinyagents` package. openhuman now depends+# directly on the members it actually uses — `tinyagents-harness` (agent loop,+# tools, middleware), `tinyagents-graph` (durable state graphs), `tinyagents-language`+# (`.rag`), `tinyagents-registry` (capability/model registry), and+# `tinyagents-session` (durable session history + run ledger, previously gated+# behind this crate's own `sqlite` feature — it is its own always-on crate now).+# The `sqlite` feature is enabled on the harness/graph crates now that openhuman's+# direct rusqlite pin is aligned to 0.40, avoiding duplicate `links = "sqlite3"`+# native bindings. Durable graph checkpoints still use `SqlRunLedgerCheckpointer`+# until the migration re-points those rows to the crate checkpointer.+# The `repl` feature/`rhai` scripting engine no longer exists in the split crates+# (see the tinyagents-harness module list) — the comment that used to describe+# `tinyagents/repl` gating `rhai` in for `flows` builds is stale; `rhai` is pulled+# in by `flows`'s own dependency on the `rhai` crate directly, not through tinyagents.+# None of these crates can be dropped: 26+ domains consume tinyagents.+# `multimodal` is not optional here: `agent::multimodal` is kernel surface —+# web chat and the agent harness both resolve attachment markers on every turn+# — so the gate is on for every OpenHuman build. It costs the dependency graph+# nothing: `base64`, `flate2` and `sha2` are all already resolved in the kernel+# profile, so turning it on moves neither the package count nor the native+# build count that `scripts/check-kernel-floor.sh` ratchets.+#+# A large share of the old crate's re-exported surface (Message, ModelRequest/+# Response, ToolCall/ToolSchema, Usage, embeddings, hosted-provider plumbing)+# moved further upstream still, into `tinyinference` (vendored as a submodule+# of vendor/tinyagents at vendor/tinyagents/vendor/tinyinference) — declared+# below as its own path dependency for the same "one checkout, one type+# identity" reason `tinytools` is.+tinyagents-harness = { path = "../../vendor/tinyagents/crates/tinyagents-harness", features = [+ "sqlite",+ "multimodal",+] }+tinyagents-graph = { path = "../../vendor/tinyagents/crates/tinyagents-graph", features = [+ "sqlite",+] }+tinyagents-language = { path = "../../vendor/tinyagents/crates/tinyagents-language" }+tinyagents-registry = { path = "../../vendor/tinyagents/crates/tinyagents-registry" }+tinyagents-session = { path = "../../vendor/tinyagents/crates/tinyagents-session" }+tinyinference = { path = "../../vendor/tinyagents/vendor/tinyinference/crates/tinyinference" }+# TinyTools — the tool vocabulary: the `Tool` trait, `ToolResult`, and the+# permission / scope / timeout classifications this host enforces around a call.+#+# Reached through tinyagents' own vendored checkout **on purpose**, not through+# a second `vendor/tinytools` submodule of our own. Two path dependencies on+# the same repository are two distinct packages to cargo, and+# `tinytools::ToolResult` from one would not be the same type as from the+# other — every tool in this crate would stop satisfying the harness's trait,+# with a type error that names the same path twice. tinyagents declares+# `vendor/tinytools/crates/tinytools` relative to itself, so naming that exact+# path here resolves to one package.+#+# No `[patch.crates-io]` entry: the crate is not published, so the path is the+# whole address — the same arrangement as `tinyhumans-sdk` and the `-bus`+# crates. After cloning: `git submodule update --init --recursive vendor/`.+tinytools = { path = "../../vendor/tinyagents/vendor/tinytools/crates/tinytools" }+# The memory *contract* — value types, the thirteen capability families, the+# `MemoryProvider` driver trait, and the null reference driver. A direct path+# dependency rather than a re-export, because `tinycortex::memory` aliases back+# only `{error, traits, types}`; `capabilities`, `provider`, `null`, `health`,+# `recall`, and `version` are reachable only through the api crate itself.+# Deliberately dependency-light (no rusqlite/git2/reqwest/regex/async runtime)+# so a third-party driver can compile against the contract without pulling in+# the embedded engine. No `[patch.crates-io]` entry is needed: cargo unifies+# this with the `path = "api"` dependency the engine crate already declares.+# `tinycortex-api` is gone with it. It had become a deprecated re-export of+# `tinymemory-bus`, so its one host use (`goals::GoalsDoc`) resolves to the+# identical item through the contract. Its `[patch]` entry stays too, for the+# reason given above.++# tinymemory — the engine-neutral memory layer+# (https://github.com/tinyhumansai/tinymemory). Owns the parts of the memory+# subsystem that are true for *any* engine: the driver-admission rules+# (`tinymemory::registry`) and the three mandatory capability families composed+# over the `Memory` storage trait (`tinymemory::mandatory`). TinyCortex stays+# the engine; this is the layer a second engine would enter through.+#+# Vendored as a git submodule under `vendor/` beside the other tiny* crates and+# consumed by path: the crate is not published to crates.io, so there is no+# `[patch.crates-io]` entry for it, and for the same reason+# `crates/openhuman-app/Cargo.toml` needs no `../../` twin — an unpublished path+# dependency resolves transitively through this manifest.+#+# `tinymemory-tinycortex` is the seam between TinyCortex's contract types and+# TinyMemory's. It names `tinycortex` by version requirement, so the+# `[patch.crates-io]` entry below unifies it onto *this* checkout's engine+# rather than the one pinned inside the tinymemory submodule.+#+# After cloning: `git submodule update --init --recursive vendor/tinymemory`.+# tinyruntime — the runtime router+# (https://github.com/tinyhumansai/tinyruntime). Only the *contract* crate is+# taken here, never the router itself: the router ships as a loadable TinyBus+# module, and a host that also compiled it would carry the download pipeline, the+# worker pool, and their dependency trees for nothing.+#+# `tinyruntime-bus` is deliberately dependency-light — `serde` and `serde_json`+# and nothing else — which is what makes naming the payload types cost this+# manifest almost nothing. The module's own CI asserts it stays that way.+#+# After cloning: `git submodule update --init --recursive vendor/tinyruntime`.+tinyruntime-bus = { path = "../../vendor/tinyruntime/crates/tinyruntime-bus" }++# The `tinymemory` facade is gone: no file in `src/` ever named it. It was+# kept for driver admission, but `memory::binding::admit` is pure string+# matching against `MODULE_ID` and refuses `DriverClass::Embedded` outright,+# so nothing here resolves an engine through the facade's registry.+tinymemory-api = { path = "../../vendor/tinymemory/crates/tinymemory-api" }+# tinyconnectors-bus — the OAuth connector wire contract+# (https://github.com/tinyhumansai/tinyconnectors). Payload types and member+# names for the connector surface, with no transport and no behaviour: this+# crate makes calls into the loaded `tinyconnectors` module and compiles none+# of it.+#+# These types previously came from `tinymemory-api::host::composio`, which held+# them only because two crates needed to name them and there was nowhere else+# both could. That is what this dependency fixes — one definition, owned by the+# crate that produces the shapes.+tinyconnectors-bus = { path = "../../vendor/tinyconnectors/crates/tinyconnectors-bus" }+# tinymemory-bus is the wire contract (method names, ABI). Normally transitive+# through tinymemory-api, but modules/memory.rs names the method constants+# directly (EXTRACT_ENTITIES, EMBED_TEXT, EMBEDDER_SLUG) — prefer compile+# errors on renaming over MemberNotFound at runtime.+tinymemory-bus = { path = "../../vendor/tinymemory/crates/tinymemory-bus" }+# `tinymemory-sources` is the source registry, its types and its readers, in a+# crate of its own. Taken directly rather than through `tinymemory-core`+# (OpenHuman#5560): `tinymemory_core::sources` is a thin layer over it —+# `sources::types` is already a `pub use` of this crate, and `sources::registry`+# is "the host's config path plus a write lock" around a `SourceRegistry` over+# the host's own `sources.toml`. The host owns that file; it does not need the+# engine to read it.+#+# It costs this crate no new dependency: serde, schemars, serde_json, anyhow,+# `tinymemory-api`, async-trait, walkdir, toml and uuid are all already here,+# and `network` adds reqwest / futures / tracing / chrono / tokio, which are+# too. No `rusqlite`, no `tinycortex`.+#+# `network` matches what `tinymemory-core` enables, so the GitHub / RSS /+# web-page readers exist. Their dispatch is deliberately NOT `reader_for` —+# see that module's docs and `memory::sources`'s.+tinymemory-sources = { path = "../../vendor/tinymemory/crates/tinymemory-sources", features = [+ "network",+] }+++# tinymcp — the Model Context Protocol client, extracted out of this tree+# (https://github.com/tinyhumansai/tinymcp). Owns both transports, the static+# config-declared server set, the dynamic registry with its store, supervisor+# and OAuth, and the write-audit log. What stays here is the host half: the RPC+# surface, the agent-facing tools, and the prompt-injection scan over remote+# tool definitions, which is host policy.+#+# `tinymcp-bus` is the wire contract — payload types and member names, with no+# transport and no runtime. The `schemars` feature is on because this crate+# generates a settings schema for the desktop application from those types+# rather than from a hand-kept copy.+#+# The path dependency on `tinymcp` itself is still the step-one arrangement. The+# registry entry step two calls for now exists — `src/openhuman/modules/registry.rs`+# pins the v0.3.2 release — but the host still calls the library directly, because+# `tinymcp-bus` v0.3.2 does not yet publish everything this host reaches for:+# `OAuthComplete`, a member returning the already-exported `ConnectedServerOverview`,+# the boot-connect and reconnect-supervisor passes, the `ServerDetail` /+# `AuthDetection` / `AuthKind` reply types, the registry curation helpers, an error+# anchor for the `McpServerNeedsAuth` classifier coupling test, and+# `render_tool_result` / `redact_endpoint` for the ungated `gitbooks` tool. It also+# needs a per-`data_dir` object seam of the shape `modules::memory` already uses,+# since `mcp::host` keys one store per workspace and a module gets one `data_dir` at+# load. Those are upstream work in tinyhumansai/tinymcp.+#+# Correcting what this comment used to promise: dropping the path dependency does+# NOT take reqwest/rusqlite with it. Measured in the kernel profile, `rusqlite` has+# six parents and `reqwest` ten, so `scripts/dep-sim.py --cut tinymcp` projects the+# entire shed at -1 package / -1 name / 0 native builds — the `tinymcp` package and+# nothing beneath it. The boundary buys compilation isolation, not a dependency shed.+#+# After cloning: `git submodule update --init vendor/tinymcp`.+# `default-features = false` drops the TinyBus adapter: this build calls the+# library directly and has no use for a bus inside it.+tinymcp = { path = "../../vendor/tinymcp/crates/tinymcp", default-features = false, features = [+ "rustls-tls",+] }+tinymcp-bus = { path = "../../vendor/tinymcp/crates/tinymcp-bus", features = ["schemars"] }+# The transport-free channel vocabulary: inbound envelopes, outbound intents,+# the config schema, controller metadata, relay frames and the session-key+# rules. UNCONDITIONAL, and deliberately so — `DomainEvent` embeds+# `ChannelInboundEnvelope`, `config/schema/channels.rs` re-exports the config+# types and `security/pairing.rs` re-exports the pairing helpers, so this+# vocabulary is always-on kernel surface. It costs serde/schemars and nothing+# this build did not already have.+tinychannels-bus = { version = "0.1", path = "../../vendor/tinychannels/crates/tinychannels-bus" }+# The provider stack that IMPLEMENTS that vocabulary — Telegram, Discord,+# Slack, IMAP, WhatsApp, the relay transport loop. Optional: it owns the+# `reqwest` / `rusqlite` / `rustls` / `tokio-tungstenite` cohort, which a+# workflow-only build has no use for. Enabled by `channels`, and by `voice`+# for `EmailChannel` alone.+tinychannels = { version = "0.1", features = ["relay-websocket"], optional = true }+# tinybus — the message bus. Owns what `crates/openhuman-core/src/core/event_bus/` used to: the typed+# pub/sub surface (`EventBus`, `EventHandler`, `SubscriptionHandle`), the+# in-process zero-serialization request registry (`NativeRegistry`), and peer+# version negotiation. Vendored as a git submodule beside the other tiny*+# crates and consumed by path.+#+# `DomainEvent` stays here, in `crates/openhuman-core/src/core/events.rs`: the catalog is OpenHuman's+# own vocabulary and a generic bus crate must not know it. tinybus is generic+# over the event type and `DomainEvent` implements `tinybus::Event`.+#+# After cloning: `git submodule update --init vendor/tinybus`.+# `uds` is on so the kernel can join a broker that out-of-process integrations+# are already attached to (`core::bus::init_over_socket`). `cli` is not: the+# `tinybus` binary is a developer tool, not something the kernel links.+#+# The dynamic module loader is NOT enabled here. It arrives through this+# crate's own default-ON `modules` feature, which forwards `tinybus/modules`.+# Enabling it unconditionally would put a `dlopen` loader in the kernel+# profile — `tinybus` is always-on surface, so `--no-default-features+# --features flows` would carry `ureq` and the archive stack for a host that+# never loads a module. The kernel-floor ratchet catches exactly that, and did.+tinybus = { path = "../../vendor/tinybus/crates/tinybus", default-features = false, features = ["macros", "uds"] }+serde = { version = "1", features = ["derive"] }+serde_json = "1"+serde_repr = "0.1"+serde_yaml = "0.9"+# dhat — heap profiler for the offline `library-profile` benchmark binary only.+# Default-OFF, dev-only: pulled in solely by the `rss-bench-dhat` feature so it+# never enters the shipped desktop/library build (same posture as `rss-bench`).+dhat = { version = "0.3", optional = true }+# (Removed `html2md` dep. dhat-rs profiling on real Gmail inboxes+# showed `html2md::walk` and `html2md::tables::handle` allocating+# ~894 MB peak heap on a 10 KB HTML input from Otter.ai-style emails+# (deeply-nested table-as-layout HTML). Cause: recursive walker holding+# per-frame Vec state across nesting layers + 5 sequential+# `regex::replace_all` passes in `clean_markdown` each producing a+# fresh full-size String. We now use a linear-time tag-and-entity+# stripper (`fast_html_to_text` in+# providers/gmail/post_process.rs) and prefer the email's+# `text/plain` MIME part when available.)+# TLS: rustls only in the base declaration, so Linux/macOS — including the+# headless embedding target (#5046) — link a single TLS stack + cert set+# (Mozilla webpki-roots). Windows re-adds `native-tls` via the+# `[target.'cfg(windows)'.dependencies]` block below (Cargo unions features+# per target), because `src/openhuman/tls/mod.rs` deliberately routes the+# Windows client through the SChannel/OS cert store for corporate MITM ++# AV root CAs. So the two TLS backends coexist only on Windows, never on+# the RAM-sensitive platforms.+reqwest = { version = "0.12", default-features = false, features = ["json", "blocking", "rustls-tls", "stream", "http2", "multipart", "socks"] }+# Already in-tree via reqwest/hyper; named directly so `IntegrationClient::get_bytes`+# can return `bytes::Bytes` without a copy.+bytes = "1"+tokio = { version = "1", features = ["full"] }+once_cell = "1.19"+parking_lot = "0.12"+log = "0.4"+libc = "0.2"+nu-ansi-term = "0.46"+env_logger = { version = "0.11", optional = true }+base64 = "0.22"+aes-gcm = "0.10"+argon2 = "0.5"+rand = "0.10"+dirs = "5"+sha2 = "0.10"+# NO `git2` HERE, DELIBERATELY — do not add it back. Every use of libgit2 in+# the memory stack lives in tinycortex: the diff ledger, the wiki mirror+# (`memory::store::content::wiki_git`), and the persona git-history reader.+# This crate never touches a repository itself, so a direct dependency here+# would be a declaration with no `use` behind it. It also invites a second+# major pin, and `git2` sets `links = "git2"` — two majors in one graph is a+# hard cargo error, not a warning. Nothing here now enables tinycortex's+# `git-diff` / `wiki-git` features either, so libgit2 is out of the graph+# entirely; re-adding a gate for it means re-adding the cohort.+hmac = "0.12"+# Archive handling for the Piper voice installer and the document tools. The+# Node.js and Python toolchain archives are no longer unpacked here — the+# `tinyruntime` module owns that — which is what let `xz2` and its static+# liblzma C build leave this manifest entirely.+tar = "0.4"+zip = { version = "2", default-features = false, features = ["deflate"] }+# gzip decoder for the Piper tar.gz binary releases on macOS / Linux. Already+# pulled in transitively by zip's `deflate` feature; declared directly so+# the installer module can `use flate2::read::GzDecoder`.+flate2 = "1"+# Real timeout around a blocking child wait, for the Claude Code auth probe.+# Guards against a broken binary on PATH hanging the caller forever.+wait-timeout = "0.2"+uuid = { version = "1", features = ["v4"] }+anyhow = "1.0"+async-trait = "0.1"+chacha20poly1305 = "0.10"+# Wipe master keys / decrypted secret buffers from memory on drop (audit C9).+# Already present transitively (resolved to 1.8.x via the *-dalek / cipher+# crates); declared directly so the keyring module can `use zeroize::Zeroizing`.+zeroize = "1"+x25519-dalek = { version = "2", features = ["static_secrets"] }+hkdf = "0.12"+hex = "0.4"+tokio-util = { version = "0.7", features = ["rt", "io"] }+# tokio-tungstenite is declared per-target below so the TLS backend+# (native-tls on Windows, rustls on macOS / Linux) matches the reqwest+# backend selected at each TLS call site.+futures = "0.3"+rusqlite = { version = "=0.40.2", features = ["bundled"] }+chrono = { version = "0.4", features = ["serde"] }+iana-time-zone = "0.1"+cron = "0.12"+futures-util = "0.3"+directories = "6"+toml = "1.0"+schemars = "1.2"+tracing = { version = "0.1", default-features = false }+tracing-log = { version = "0.2", optional = true }+tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi", "env-filter"] }+tracing-appender = { version = "0.2", optional = true }+urlencoding = "2.1"+motosan-ai-oauth = { version = "0.2", features = ["codex"] }+thiserror = "2.0"+chrono-tz = "0.10"+dotenvy = "0.15"+regex = "1.10"+# Multi-pattern fixed-string DFA matcher used by `routing::quality` for+# refusal/empty-noise detection on local-model responses. Already in the+# dep graph transitively via `regex` (which uses it for literal+# optimization); declared directly here so `openhuman` owns the+# version pin and the import isn't an unstable transitive surface.+aho-corasick = "1.1"+walkdir = "2"+glob = "0.3"+hostname = "0.4.2"+rustls = { version = "0.23", default-features = false, features = ["ring"] }+sysinfo = { version = "0.33", default-features = false, features = ["system"] }+keyring = { version = "3", features = ["apple-native", "windows-native", "linux-native"] }+clap = { version = "4.5", features = ["derive"], optional = true }+lettre = { version = "0.11.22", default-features = false, features = ["builder", "smtp-transport", "rustls-tls"], optional = true }+# HTTP + Socket.IO server transport — the `/rpc` JSON-RPC endpoint, `/v1`+# OpenAI-compat router, agentbox/http_host sub-servers, and the Socket.IO+# live-event bridge. Exclusive to the default-ON `http-server` feature (#5048):+# a slim/embedded build without it (`--no-default-features`) sheds `axum` ++# `socketioxide` and never binds a listener — the core still runs background+# services and answers over the CLI/native dispatch surface. See the+# `http-server` feature note below and `crates/openhuman-core/src/core/http_server_status.rs`.+axum = { version = "0.8", default-features = false, features = ["http1", "json", "tokio", "query", "ws", "macros"], optional = true }+sentry = { version = "0.47.0", default-features = false, optional = true, features = ["backtrace", "contexts", "panic", "tracing", "debug-images", "httpdate"] }+tokio-stream = { version = "0.1.18", default-features = false, features = ["sync"] }+url = "2"+socketioxide = { version = "0.15", features = ["extensions"], optional = true }+tempfile = "3"+cpal = { version = "0.15", optional = true }+enigo = { version = "0.3", optional = true }+arboard = { version = "3", optional = true }+rdev = { version = "0.5", optional = true }+fs2 = "0.4"+# Cross-platform battery probe for the scheduler gate. Maintained fork of+# the abandoned `battery` crate; same `use battery::*;` API surface. Used+# only by `openhuman::scheduler_gate::signals` to decide when to throttle+# background LLM work on laptops.+starship-battery = { version = "0.10", optional = true }+# Multi-chain wallet signing.+# - bitcoin: P2WPKH PSBT build/sign/broadcast (includes secp256k1).+# - ed25519-dalek: Solana transaction signing.+# - bs58: Solana base58 addresses + Tron base58check addresses.+ed25519-dalek = { version = "2", default-features = false, features = ["std", "rand_core"] }+bs58 = { version = "0.5", default-features = false, features = ["std", "check"] }+# Shared BIP-39 mnemonic → seed for non-EVM chains (BTC P2WPKH derivation,+# Tron secp256k1 derivation, Solana ed25519 SLIP-0010 derivation). Same crate+# ethers-signers uses internally, exposed as a direct dep so we can derive+# off the recovery phrase without going through the EVM signer wrapper.+coins-bip39 = { version = "0.8", optional = true }+# Solana off-curve check for ATA derivation (find_program_address).+curve25519-dalek = { version = "4", default-features = false, features = ["alloc"], optional = true }++fantoccini = { version = "0.22.0", optional = true, default-features = false, features = ["rustls-tls"] }+# The WhatsApp Web provider (and its `whatsapp-rust` / `wacore` / `serde-big-array`+# stack) now lives in the tinychannels crate; the `whatsapp-web` feature forwards+# to `tinychannels/whatsapp-web`.+# TinyDocs — the document wire contract, and nothing else.+#+# `tinydocs-bus` is the whole dependency: the spec types, their size limits,+# the validation rules, the PNG/JPEG header reader, the error vocabulary and+# the member names. It is `serde` + `thiserror` and nothing else — no writer,+# no `tinybus`, no runtime. Synthesis happens in the `tinydocs` TinyBus module+# (`src/openhuman/modules/`), so this build carries the shape of a document+# without carrying the code that produces one, which is why `docx-rs`,+# `ppt-rs` and `pdf-extract` are absent from the graph entirely rather than+# merely gated.+#+# Sharing the contract rather than re-declaring it is the point. The specs are+# what an LLM is shown as a JSON tool schema and what the module validates+# against; two definitions of that would drift, and the drift would be a tool+# description promising limits the module does not enforce. This crate carried+# a verbatim copy of the contract for exactly that reason and paid exactly that+# risk — `src/openhuman/tools/impl/document/format/` was 1,873 lines that+# differed from `crates/tinydocs-bus/src/` only in doc-link paths.+#+# Vendored as a path dependency like `tinyhumans-sdk`: the crate is not+# published to crates.io, so there is no `[patch.crates-io]` entry for it.+# After cloning: `git submodule update --init vendor/tinydocs`.+#+# Optional: exclusive to the `documents` feature, which is **default-OFF,+# product-ON** — `[features] default` is the contributor set and this is not in+# it; `scripts/ci/product-features.txt` is what the shipped desktop app has, and+# it is. The comment here said "default-ON", which was true before #4919 split+# the two sets and has been wrong since.+tinydocs-bus = { path = "../../vendor/tinydocs/crates/tinydocs-bus", optional = true }++# TinyVoice — the voice wire contract, and nothing else.+#+# Same arrangement as `tinydocs-bus`: member names, the payload types the+# module answers with, and the contract version, at a cost of `serde`. The+# processing lives in the `tinyvoice` TinyBus module, so nothing here decodes+# audio. `src/openhuman/modules/voice.rs` used to redeclare these types with a+# comment saying it did so because this crate did not depend on TinyVoice;+# it does now.+#+# After cloning: `git submodule update --init vendor/tinyvoice`.+#+# Optional: exclusive to the `voice` feature — default-OFF, product-ON, the+# same split as `documents` above.+tinyvoice-bus = { path = "../../vendor/tinyvoice/crates/tinyvoice-bus", optional = true }++# TinyJuice — the compression wire contract, and nothing else.+#+# Same arrangement as `tinydocs-bus` and `tinyvoice-bus`: the payload types, the+# request and response envelopes, the member names and the contract version, at+# a cost of `serde`. The router, the compressors, the CCR cache and the rule+# engine all live in the `tinyjuice` module and are not in this build.+#+# `src/openhuman/inference/tokenjuice/types.rs` was a 259-line hand-copy of+# these types headed "Stable wire types shared with the separately compiled+# TinyJuice module" — shared by convention and checked by nobody. It is a+# re-export now.+#+# Not optional: `inference::tokenjuice` is always compiled (the compression+# middleware sits in the agent turn path, which is kernel), so the contract has+# no gate to hang off.+#+# After cloning: `git submodule update --init vendor/tinyjuice`.+tinyjuice-bus = { path = "../../vendor/tinyjuice/crates/tinyjuice-bus" }++# TinyHosts — the unified hosting API: one `Host` trait over a hosting provider,+# and the `launch` flow that puts a Next.js application, its database, its+# environment and its domains on it in the one order that works.+#+# The provider vocabulary stops inside the crate. What OpenHuman gets is the+# model — sites, deployments, databases, domains, analytics — so which provider+# a user pastes a key for is a config value here rather than a code path.+#+# Taken with the `vercel` provider only, which is the one that exists.+#+# Vendored as a path dependency like `tinyhumans-sdk`: the crate is not+# published to crates.io, so there is no `[patch.crates-io]` entry for it.+# After cloning: `git submodule update --init vendor/tinyhosts`.+#+# Optional: exclusive to the default-OFF `hosting` feature.+tinyhosts = { path = "../../vendor/tinyhosts", default-features = false, features = ["vercel"], optional = true }++# TinyWallet — host-agnostic multi-chain wallet primitives. Owns the address+# formats themselves: parsing, validation, and the conversions between their+# encodings for Bitcoin, EVM chains, Solana and Tron. Nothing about "is this a+# well-formed Solana address" is OpenHuman-specific, so the rules live where+# any host can reach them. What stays in `src/openhuman/web3/` is everything+# the crate deliberately refuses to own: RPC endpoint resolution, transaction+# assembly and broadcast, and key custody.+#+# Vendored as a path dependency like `tinyhumans-sdk`: the crate is not+# published to crates.io, so there is no `[patch.crates-io]` entry for it.+# After cloning: `git submodule update --init vendor/tinywallet`.+#+# Optional: exclusive to the `web3` feature — OFF in the contributor set+# (`[features] default`) and ON in the product set+# (`scripts/ci/product-features.txt`), so it ships but a bare `cargo check` does+# not pay for it. See the two-set note above `default`.+#+# Taken as `tinywallet-bus`, the contract crate, and NOT the root `tinywallet`+# crate. The root crate is where key derivation, transaction building, signing+# and the chain clients live, and those are the gates that pull the `bitcoin`+# crate and its native secp256k1 build; all of it happens inside the loaded+# `tinywallet` module now, so this binary links none of it. What the contract+# crate carries is exactly what a host still runs itself: the wire types that+# cross the bus, the bus member names, address validation, the EIP-712 and ERC-20+# encoders the x402 payment path builds with, the `Transport` seam this crate+# implements, and the Tron verifier that checks what a node handed back before+# a transaction is sent for signing.+#+# The root crate is still taken under [dev-dependencies], where test fixtures+# derive a known account. Dev-dependency features are not linked into the+# shipped binary, so that does not undo the shed.+tinywallet-bus = { path = "../../vendor/tinywallet/crates/tinywallet-bus", default-features = false, features = ["btc", "evm", "solana", "tron", "keccak", "net", "wire", "eip712", "abi", "tx-codec"], optional = true }++# secp256k1 signing over the digests the wallet module hands back. Pure Rust,+# and already in the graph beneath `coins-bip32` (which derives the key being+# used, via tinywallet's `key` gate), so naming it directly costs nothing and+# is what lets `bitcoin` go.+k256 = { version = "0.13", default-features = false, features = ["std", "ecdsa"], optional = true }++[target.'cfg(windows)'.dependencies]+# Windows: tokio-tungstenite uses native-tls (schannel) so wss://+# connections honor the Windows cert store, including corporate CAs+# installed by AV / TLS-inspection proxies. See run-dev-win.sh notes.+tokio-tungstenite = { version = "0.29", default-features = false, features = ["connect", "handshake", "native-tls"] }+# Windows re-adds reqwest's native-tls backend (dropped from the base decl in+# `[dependencies]`) so `tls::tls_client_builder()` can call `.use_native_tls()`+# and reach the SChannel/OS cert store — same rationale as tokio-tungstenite+# above. Cargo unions these features with the base rustls decl, so on Windows+# reqwest carries both backends; Linux/macOS keep rustls only.+reqwest = { version = "0.12", default-features = false, features = ["native-tls"] }+# AppContainer / process-jail backend in `openhuman::cwd_jail`.+# Feature list mirrors the Win32 surface used by cwd_jail/windows.rs:+# AppContainer profile APIs, ACL editing, STARTUPINFOEXW process spawn,+# and the GENERIC_* file access masks.+windows-sys = { version = "0.61", features = [+ "Win32_Foundation",+ "Win32_Security",+ "Win32_Security_Authorization",+ "Win32_Security_Isolation",+ "Win32_Storage_FileSystem",+ "Win32_System_Memory",+ "Win32_System_Threading",+] }++[target.'cfg(not(windows))'.dependencies]+# macOS / Linux: keep rustls + Mozilla webpki-roots — the historical+# default. Avoids pulling OpenSSL as a runtime dep on Linux.+tokio-tungstenite = { version = "0.29", default-features = false, features = ["connect", "handshake", "rustls-tls-webpki-roots"] }++[target.'cfg(target_os = "linux")'.dependencies]+landlock = { version = "0.4", optional = true }+rppal = { version = "0.22", optional = true }++[dev-dependencies]+# Turns on `tinyflows-sqlite`'s `test-fixtures` gate for test builds only: the+# flows test suite stages a terminal run flipped back to `running` and a+# `graph_json` column that does not deserialize, neither of which any production+# write path can produce. Declared here rather than in `[dependencies]` so the+# shipped binary never carries those two writers.+tinyflows-sqlite = { path = "../../vendor/tinyflows/crates/tinyflows-sqlite", features = ["test-fixtures"] }+# Test fixtures derive a known account from the BIP-39 vector phrase. Production+# does not derive at all — see the note on the main `tinywallet` entry. Cargo+# does not link dev-dependency features into the shipped binary, so enabling+# `key` here does not put the derivation stack back into the product.+tinywallet = { path = "../../vendor/tinywallet", default-features = false, features = ["key", "btc", "evm", "solana", "tron"] }+k256 = { version = "0.13", default-features = false, features = ["std", "ecdsa"] }+coins-bip39 = { version = "0.8" }+# The fake memory driver the host's own tests bind, in place of an in-process+# engine (openhuman#6161). It serves every optional family, so a handler that+# asks for one by accessor gets `Some` rather than taking the `None` arm as+# "unsupported" — which is the whole reason the fixture used to construct a real+# `TinycortexProvider`.+#+# It costs this manifest nothing. The crate is `publish = false` and reached by+# path like `tinymemory-api`, and its only dependencies are `tinymemory-api`,+# `async-trait`, `serde_json` and `anyhow` — all already in the product graph.+# By construction it cannot pull an engine back in: `tinymemory-conformance`+# refuses to depend on `tinymemory-core`, and its CI asserts that, because a+# conformance suite that reached an engine could not prove interchangeability.+tinymemory-conformance = { path = "../../vendor/tinymemory/crates/tinymemory-conformance" }+# Dual-declared on purpose (same shape as the `sentry`/`axum` entries): the+# optional dependency above is bin-only behind `bin-tools`, but+# `agent_orchestration::tools::tools_e2e_tests` (a #[cfg(test)] LIB module),+# `tests/memory_graph_sync_e2e.rs`, `tests/x402_twit_sh_live.rs` and+# `examples/embed_headless.rs` all call it with no feature #[cfg]. Without this+# line the test build breaks the moment `bin-tools` is off.+env_logger = "0.11"+# Enable sentry's TestTransport for runtime smoke of the observability+# before_send filter (see tests/observability_smoke.rs). `default-features+# = false` here is load-bearing — sentry's default feature set pulls in+# actix-web / actix-http / actix-server / sentry-actix and ~13 transitive+# crates we never use (and that bloat the dev Cargo.lock noticeably).+# TestTransport only needs the `test` feature.+sentry = { version = "0.47.0", default-features = false, features = ["test"] }+# axum is optional in `[dependencies]` (exclusive to the default-ON+# `http-server` feature, #5048), but ~17 `#[cfg(test)]` modules stand up+# in-process axum mock servers / call `build_core_http_router` regardless of+# the feature set under test. Declaring a plain (non-optional) dev-dep keeps+# those tests compiling in ALL test builds without per-file `#[cfg]` — mirrors+# the `sentry` dual-declaration above. The prod fns those tests exercise are+# still gated, so the *tests* naming them carry `#[cfg(feature = "http-server")]`.+axum = { version = "0.8", default-features = false, features = ["http1", "json", "tokio", "query", "ws", "macros"] }+# `tower` was a plain runtime dep only for its re-exports in the axum server+# path; with `http-server` optional it is test-only (tower::ServiceExt::oneshot+# drives the mock routers), so it lives here as a dev-dep now.+tower = { version = "0.5", default-features = false }+# Mock HTTP server for provider E2E tests (inference_provider_e2e).+wiremock = "0.6"+# Used in json_rpc_e2e to backdate mtime on stale lock files.+filetime = "0.2"+# `test-util` enables tokio's paused virtual clock (`start_paused`,+# `time::advance`) so the #4270 inference-heartbeat tests assert the periodic+# beat without real-time waits. Test-only — the runtime feature set in+# `[dependencies]` (`full`) intentionally excludes it.+tokio = { version = "1", features = ["test-util"] }- # Property-based testing for the adversarial-input surfaces (command classifier,- # encryption round-trip) — plan.md §6.3. Version already resolved in Cargo.lock.++# Property-based testing for adversarial command-classifier and encryption++# round-trip inputs. Version already resolved in Cargo.lock.+proptest = "1"++[features]+# THE CONTRIBUTOR SET — not the product set.+#+# This list is what a bare `cargo check`, `cargo test` and rust-analyzer+# compile. It is deliberately SMALLER than what the desktop app ships: the+# product set lives in `scripts/ci/product-features.txt` and is forwarded+# explicitly by `crates/openhuman-app/Cargo.toml`, with+# `scripts/ci/check-feature-forwarding.mjs` asserting the two are equal in both+# directions. Read that file's header before changing either list.+#+# Why the split: the gates left ON below cost almost nothing to compile, so+# keeping them on means `cargo check` and rust-analyzer still typecheck nearly+# all of the tree. The gates turned OFF are the ones that carry the graph —+# web3's ethers/secp256k1 cohort, `documents`' zstd/bzip2 native builds,+# `voice`+`inference`'s cpal/lettre/arboard/enigo/rdev stack, `contacts`'+# macOS objc2 cohort and `crash-reporting`'s sentry tree. The terminal-specific+# ratatui/crossterm cohort lives in the separate `openhuman-tui` package.+# Turning the core gates off takes a+# bare `cargo check` from 540 packages / 7 native builds down to ~350 / 2, which+# is the inner loop every contributor pays on every edit.+#+# THIS DOES NOT CHANGE WHAT SHIPS. The desktop shell has always set+# `default-features = false` (#1061), so it never inherited this list to begin+# with — that is exactly why the forwarding guard had to exist. What DOES+# change is that a lane relying on default features no longer covers the+# gated-off domains, so every CI lane that builds or tests "the product" now+# passes `--features "$(scripts/ci/product-features.sh)"`. If you add a lane,+# decide which of the two sets it is testing and say so.+# `modules` is in this list because the memory seam is not optional at test+# time. `memory::binding::module_provider` has a `#[cfg(not(feature =+# "modules"))]` arm that binds `NullMemoryProvider`, so without the gate a bare+# `cargo test --lib -- memory::` fails 26 tests, every one of them a "null vs+# module" assertion, and 15 further module-gated tests do not exist at all+# (582 passed / 26 failed, versus 623 passed / 0 failed with the gate on).+# A default set that cannot run its own test suite is not a usable inner loop.+# The cost is the smallest of any gate here: +9 packages / +5 unique names+# (`ureq`, `ureq-proto`, `utf8-zero`, `toml_edit`, `toml_write`) and **zero**+# new native builds — the native list is byte-identical with the gate on and+# off. That is nothing like the cohorts #4919 moved out of `default`, and it+# also brings the build in line with what AGENTS.md has always documented+# (`modules`: Contrib=ON, Product=ON) and with `scripts/ci/product-features.txt`,+# which already lists it. This does NOT move the kernel floor: that profile is+# `--no-default-features --features flows` and never reads this list.+default = ["media", "skills", "flows", "mcp", "channels", "medulla", "http-server", "scheduler-gate", "file-logging", "modules"]+# HTTP + Socket.IO server transport (#5048): the `/rpc` JSON-RPC endpoint and+# its auth middleware/CORS layer (`core::jsonrpc`, `core::auth`), the `/v1`+# OpenAI-compatible router (`inference::http`), the ad-hoc static-dir file+# server (`openhuman::http_host`), the AgentBox `/run` HTTP surface+# (`agentbox::http`), the WebSocket dictation stream+# (`inference::voice::streaming`), the `openhuman text-input run` dev server,+# the MCP Streamable-HTTP transport (`mcp::server::http`, additionally gated by+# `mcp`), and the Socket.IO live-event bridge (`core::socketio`). Default-ON —+# the desktop shell REQUIRES it (see the `HTTP_SERVER_COMPILED_IN` compile+# assert in `crates/openhuman-app/src/lib.rs`). Slim / headless-embedding builds opt+# out via `--no-default-features --features "<explicit list without+# http-server>"`, which drops the exclusive `axum` + `socketioxide` deps; the+# core then runs background services without binding a listener (`serve()`+# returns early) and is driven over the CLI / native dispatch surface instead.+#+# TYPE CARVE-OUT (see AGENTS.md): `core::socketio`'s inert event payload types+# (`WebChannelEvent`, `TurnUsagePayload`, `SubagentUsagePayload`,+# `SubagentProgressDetail`) stay compiled in BOTH builds — ~10 always-on+# domains construct them — so `pub mod socketio;` is UNGATED and only the+# socketioxide/axum-touching bodies are gated. Likewise `inference::http::types`+# and `EXTERNAL_OPENAI_COMPAT_PROVIDER` stay compiled for `core::auth`.+# Git-backed memory diff: snapshots as commits, checkpoints as tags, read+# markers as refs, diffs as git tree diffs (`openhuman::memory::diff`), plus the+# git-backed wiki content format in `memory::store::content::wiki_git`.+# Default-OFF, product-ON.+#+# The most expensive gate in the tree by native-build cost: it turns on+# tinycortex's `git-diff`/`wiki-git`, which carry `git2` with vendored libgit2,+# so turning it off drops `git2` + `libgit2-sys` + `libz-sys` and takes the+# kernel profile from 5 native C builds to 3. The cohort enters the graph+# through tinycortex only — this crate declares no `git2` of its own (see the+# note where it used to sit in `[dependencies]`).+#+# TYPE CARVE-OUT (see AGENTS.md): `memory::diff::types` stays compiled in BOTH+# builds. It re-exports tinycortex's `serde`-only diff wire types, which the+# always-on subconscious memory profile renders into prompts; a stub copy would+# be a second definition of one serde shape, free to drift. tinycortex makes the+# same split — its `memory::diff::{types,source}` are ungated, and only the+# git-touching `ledger`/`DiffEngine` half sits behind `git-diff`.+#+# Off-state: the `memory_diff` RPC namespace is unknown-method and absent from+# `/schema`; the `memory_diff` agent tool is absent from the tool list; the+# embedded driver stops advertising `Capability::Diff` and `as_diff()` returns+# `None`; and the three `ops` entry points always-on code calls return a+# build-fact error, so a post-sync snapshot or a subconscious diff is logged and+# skipped rather than silently reported as "nothing changed".+http-server = ["dep:axum", "dep:socketioxide"]+# Local audio-device access: the `cpal` capture stack behind voice recording+# and the accessibility microphone-permission probe. Default-ON. Slim /+# headless builds opt out via `--no-default-features --features "<explicit list+# without inference>"`, which drops the exclusive `cpal` dependency; the+# microphone probe then reports `Unknown`. `voice` requires this gate, so+# building `voice` always pulls `inference` in transitively.+#+# NOTE ON THE NAME (do not "fix" it to `audio`): this gate used to cover the+# bundled whisper.cpp STT engine (`whisper-rs` + the `whisper-rs-sys` CRT+# patch) as well. That engine is gone — STT is now cloud/engine-configurable+# only (`voice_server.stt_engine`, `voice::factory`) — so `cpal` is all that is+# left behind the gate. The gate name stays `inference` because it is forwarded+# by name from `crates/openhuman-app/Cargo.toml`, asserted by `INFERENCE_COMPILED_IN`,+# and referenced from `desktop::accessibility::permissions`; renaming it buys+# nothing and would silently drop the microphone probe from the shipped app if+# the forwarding list were not updated in lockstep.+inference = ["dep:cpal"]+# Office-document tools: the `generate_document` and `generate_presentation`+# agent tools, plus PDF text extraction during multimodal file ingest.+# Default-ON.+#+# The synthesis is NOT in this build. All three run in the `tinydocs` TinyBus+# module, downloaded and verified at first use (`src/openhuman/modules/`), so+# this gate turns on the tools and the host policy around them — the artifact+# pipeline, the deadlines, image resolution under the security policy — and+# `tinydocs` is here for the wire contract only. `docx-rs`, `ppt-rs` and+# `pdf-extract` are not in the dependency graph in any configuration.+#+# Leaf gate (no stub facade): when off, the two tools are absent from the tool+# list rather than degraded to an error, and PDF ingest degrades the file to a+# reference instead of extracted text+# (`agent::multimodal::extract_pdf_text`). Slim / headless builds opt out via+# `--no-default-features --features "<explicit list without documents>"`.+documents = ["modules", "dep:tinydocs-bus"]+# Hosting: the `hosting_*` agent tools that put a workspace on a real hosting+# provider — a site, a managed database wired into it, its environment, its+# domains, its deployments and the traffic they served. Default-OFF,+# product-ON: a host with no hosting credential has no use for the tools, and+# an agent that can deploy to the internet is authority a headless embedding+# should have to ask for.+#+# Leaf gate: when off, `openhuman::hosting` is not compiled and the tools are+# absent from the registry rather than degraded to an error. When on, they are+# still only registered once a credential actually resolves — from+# `[hosting].api_key` or the provider's environment variable — because a tool+# that cannot work is worse than a tool that is not there.+hosting = ["dep:tinyhosts"]+# The dynamic module host (`openhuman::modules`): the loader that admits a+# compiled `cdylib` through tinybus's ABI descriptor, manifest, dependency and+# SHA-256 gates, plus the `modules` RPC namespace and the registry of modules+# this build trusts. Default-ON, and implied by every gate whose work happens in+# a module — today that is `documents`.+#+# Off ⇒ the `modules.*` controllers are unregistered (unknown-method over+# `/rpc`, absent from `/schema`) and nothing can load a native module. Forwarding+# `tinybus/modules` here rather than on the dependency itself keeps the loader+# out of the kernel profile, where `tinybus` is always-on: a workflow-only host+# should not carry `ureq` and an archive stack to support a loader it cannot use.+#+# A loaded module is trusted in-process code with this process's privileges, and+# tinybus never unloads one. See `src/openhuman/modules/` before adding an entry+# to the registry.+modules = ["tinybus/modules"]+# Voice + audio_toolkit domains: STT/TTS providers, the standalone dictation+# server, always-on listening, and podcast audio generation/email delivery.+# Default-ON — the desktop app always ships with voice. Slim / headless builds+# opt out via `--no-default-features --features "<explicit list without voice>"`,+# which also drops the exclusive `lettre` (podcast email) dependency. `hound`+# used to be on that list; WAV framing moved to the `tinyvoice` module, so the+# crate left this graph entirely rather than merely being gated. Composes with the runtime `DomainSet::voice` flag (#4796): the+# feature narrows the compile-time surface, `DomainSet` gates it at runtime.+# Requires `inference` (the cpal capture stack), so enabling `voice` turns+# `inference` on transitively.+# `arboard`/`enigo`/`rdev` join here rather than getting their own gate: their+# only call sites are `voice::text_input` (clipboard + synthetic keystrokes to+# insert a dictated transcript) and `voice::hotkey` (the global push-to-talk+# listener), both already `#[cfg(feature = "voice")]`, and nothing outside+# `voice/` reaches them. Worth 17 crates — the largest single shed in the wave —+# because `arboard` alone drags an X11/wayland clipboard stack (11 crates) into+# any build that just wants workflow execution.+voice = [+ "inference",+ # Wake-word gating, command routing and hallucination detection run in the+ # `tinyvoice` module, so the voice domain needs the module host the same way+ # `documents` needs it for `tinydocs`. Without this, `--features voice`+ # alone fails to resolve `openhuman::modules` — which the product build+ # hides, because `documents` turns `modules` on anyway.+ "modules",+ # The member names and payload types the module answers with. Contract+ # only — `serde` and nothing else.+ "dep:tinyvoice-bus",+ "dep:lettre",+ "dep:arboard",+ "dep:enigo",+ "dep:rdev",+ # `audio_toolkit::ops` delivers generated podcasts through tinychannels'+ # EmailChannel, so the provider — and therefore the implementation crate —+ # has to exist even in a channels-less build. This is the ONE reason a+ # channels-less build still links the provider stack.+ "dep:tinychannels",+ "tinychannels/email",+]+# Web3 family: openhuman::web3 + web3::wallet + web3::x402 — the+# crypto wallet (multi-chain sign/broadcast), the high-level swap/bridge/dapp+# surface, and the x402 machine-payment protocol. Default-ON — the desktop app+# always ships with the wallet. Slim / headless builds opt out via+# `--no-default-features --features "<explicit list without web3>"`, which+# drops the exclusive `bitcoin` (P2WPKH PSBT) + `curve25519-dalek` (Solana+# off-curve ATA) + `ethers-core` / `ethers-signers` / `coins-bip39` (EVM/mnemonic+# signing, used by the multi-chain wallet's EVM path) dependencies. Composes+# with the runtime `DomainSet::Web3` flag (#4796): the feature narrows the+# compile-time surface, `DomainSet` gates it at runtime.+# `k256` and `coins-bip39` are gone from this list: nothing in the shipped+# binary derives a key or signs with secp256k1 any more — the wallet module+# does both. Both crates remain under [dev-dependencies], where test fixtures+# still derive a known account and check a signature against a fixed vector.+#+# `curve25519-dalek` stays: `associated_token_account` needs the off-curve check+# to derive a Solana ATA, which is address arithmetic rather than signing.+web3 = [+ "dep:tinywallet-bus",+ "dep:curve25519-dalek",+ "modules",+]++# Managed Node.js runtime: `runtime::node` (the client that asks the+# `tinyruntime` module for a toolchain), the `runtime::javascript` language slot+# over it, `runtime::pool::node`, the `node_exec` / `npm_exec` agent tools, and+# the `node_runtime` harness-init step. Default-ON. Slim builds opt out via+# `--no-default-features --features "<list without runtime-node>"`.+#+# This gate no longer sheds a dependency. It used to carry the exclusive `xz2`+# and its static liblzma C build; downloading and unpacking a toolchain moved to+# the `tinyruntime` module, so that native build left this manifest for every+# configuration rather than only for slim ones. What the gate still buys is the+# absence of the tools and controllers themselves.+#+# FACADE + STUB, not a leaf gate. `ShellTool` holds `Option<Arc<NodeBootstrap>>`+# for managed-Node PATH injection and `tools/impl/system/shell.rs` is kernel, so+# deleting the module would take the shell tool with it. `runtime/node/stub.rs`+# carries the `NodeBootstrap` type surface; registration sites (`node_runtime_step`,+# the `javascript` controllers, `node_exec`/`npm_exec`) are leaf-gated at their call+# sites, because registration sites want absence.+#+# The generic native-tool dispatcher (`runtime::node::ops` / `runtime::node::types`)+# is deliberately NOT gated: it backs both the gated `javascript.*` controllers and+# the ungated `flows` `oh:` `NativeToolBackend`, so native flow tools keep working+# when the managed Node runtime is compiled out.+#+# Off-state: `try_cached`/`probe_installed` return `None`, so the shell never+# prepends a managed bin dir — identical to today's `node.enabled = false` path.+runtime-node = []++# macOS Contacts seeding for the people domain: `memory::people::address_book`+# reads CNContactStore to seed handles. Default-ON. Slim / headless builds opt+# out via `--no-default-features --features "<list without contacts>"`, which+# sheds the exclusive `objc2` / `objc2-foundation` / `objc2-contacts` / `block2`+# cohort on macOS. Leaf gate with a pre-existing off-state: `address_book.rs`+# already carries a non-macOS `imp` stub returning an empty contact list, so the+# gate simply widens that stub's cfg — `read()`, `read_with()`,+# `AddressBookError` and `SystemContactsSource` stay compiled in every build and+# the `people` RPC surface is unchanged. Off ⇒ address-book refresh seeds+# nothing instead of failing.+#+# NOTE: no-op on Linux/Windows, where these crates were never in the graph.+# Verify the shed cross-target from any host:+# cargo tree --target aarch64-apple-darwin -e normal -i objc2-contacts \+# --no-default-features+#+# ── This gate is FORWARDED, and it was silently broken before it was ─────────+# The reader has never lived in this crate. It sits in the memory engine, and+# this feature used to enable four `objc2` crates *here* — which no file in+# `src/` names — while never reaching the crate that holds the `#[cfg]`. So the+# macOS arm of `address_book.rs` was always compiled out: `SystemContactsSource`+# returned the empty stub, `people.refresh_address_book` reported success having+# seeded nothing, and macOS paid to compile four unused crates for the trouble.+#+# That is the exact soft-failure shape as `voice` (#4901) and+# `tokenjuice-treesitter` (#4918): a gate that is not forwarded does not fail+# the build, it just quietly does nothing.+#+# The guard that used to catch it here, `contacts_feature_reaches_the_engine_+# reader`, is gone with the engine (openhuman#6161) and could not have been+# kept: it linked `tinycortex` from `#[cfg(test)]` to call the reader directly,+# which proves nothing about this crate's forwarding once this crate does not+# depend on the crate being forwarded to. The forward it guarded had already+# moved into the module's own manifest, which is where the equivalent+# assertion now belongs.+# Nothing host-side is gated on `contacts` any more — its whole job was+# forwarding into the engine so tinycortex's macOS CNContactStore reader+# compiled. That reader now lives in the `tinymemory` module, whose own+# manifest enables `tinycortex/contacts`, and `people.refresh_address_book`+# reaches it through `MemoryPeople::seed_from_address_book` over the bus.+#+# The gate name is kept because `scripts/ci/product-features.txt` and the+# shell's forwarded list are asserted equal by the Feature Forwarding Gate,+# and removing it from one without the other fails that lane.+contacts = []+# Media-generation + image domains: the `media_generate_*` agent tools+# (image/video via GMI through the backend) and the `openhuman::image` tool+# contracts scaffold. Default-ON. Slim builds opt out via+# `--no-default-features --features "<explicit list without media>"`.+# Composes with the runtime `DomainSet::media` flag (#4796).+# NOTE: this gate sheds no exclusive dependencies — media generation is+# backend-proxied (reqwest, shared). It is a surface-only gate (drops the tool+# code + module from the compile), not a dependency-shedding one. There are no+# controllers / stores / subscribers tagged `Media` (agent tools only), and+# `openhuman::image` is currently unwired scaffold (added #2997).+media = []+# Flows domains: the `flows::` automation surface (saved tinyflows graphs —+# create/run/schedule + the workflow_builder / flow_discovery agents), the+# `tinyflows::` adapter seam, and the `rhai_workflows::` language-workflow tool.+# Default-ON — the desktop app always ships with Workflows. Slim / headless+# builds opt out via `--no-default-features --features "<list without flows>"`,+# which drops `tinyflows` + its `jaq-core`/`jaq-std`/`jaq-json` JSON-query stack+# (the `rhai` scripting engine no longer rides along: tinyagents dropped its+# `repl`/`rlm` features, and nothing here referenced them). Composes with the+# runtime `DomainSet::flows` flag (#4796): the feature narrows the compile-time+# surface, `DomainSet` gates it at runtime.+# NOTE: this gate does NOT drop `tinyagents` itself — 26+ domains consume it.+flows = ["dep:tinyflows", "dep:tinyflows-catalog", "dep:tinyflows-copilot", "dep:tinyflows-sqlite"]+# Skills domains: `openhuman::skills` (metadata/discovery/install),+# `openhuman::skill_runtime` (SKILL.md execution + the skill_executor agent),+# and `openhuman::skill_registry` (remote catalogs + the skill_setup agent).+# Default-ON — the desktop app always ships with skills. Slim / headless builds+# opt out via `--no-default-features --features "<explicit list without skills>"`.+# Composes with the runtime `DomainSet::skills` flag (#4796): the feature+# narrows the compile-time surface, `DomainSet` gates it at runtime.+#+# The dep list is INTENTIONALLY EMPTY — do not "fix" it. Unlike `voice`+# (`hound`/`lettre`), these domains have no exclusive dependencies: every crate+# they touch (serde, serde_json, tokio, anyhow, async-trait, …) is shared with+# always-on domains, and `runtime_node`/`runtime_python` are used by Agent /+# Flows / Memory too. This gate's value is tool-surface + prompt-bloat ++# startup cost, NOT binary size.+#+# NOTE: `openhuman::skills::types` and `::ops_types` stay compiled even when+# this feature is OFF — `tools::traits` re-exports `ToolResult`/`ToolContent`+# out of `skills::types` and ~236 files consume them, so those inert serde+# types are a type carve-out, not part of the gated behaviour. See+# `src/openhuman/skills/stub.rs`.+skills = []+# MCP domains, all under the `mcp/` family: `mcp::server` (the `openhuman mcp`+# stdio/HTTP server exposing our tool surface), `mcp::registry` (dynamic+# Smithery installs — SQLite, lifecycle, `mcp_clients` RPC namespace),+# `mcp::audit` (write-audit log), and the static/config-declared server set in+# `mcp::config_servers`. Default-ON — the desktop+# app always ships with MCP. Composes with the runtime `DomainSet::mcp` flag+# (#4796): this feature narrows the compile-time surface, `DomainSet` gates it+# at runtime.+#+# INTENTIONALLY EMPTY — do NOT "fix" this by adding `dep:` entries. There is no+# MCP SDK in this crate: the whole protocol stack is hand-rolled over tokio+# process stdio + reqwest + axum, every one of which is load-bearing for+# non-MCP domains. So this gate drops ~20k LOC and ~19 agent tools but ZERO+# dependencies. The issue-level DoD line claiming it "sheds the MCP SDK /+# transport stack" is superseded by this correction (see AGENTS.md).+#+# NOTE: the family root `pub mod mcp;` and `mcp::http_client` stay ALWAYS+# compiled. `http_client` is a mis-housed shared utility (the gitbooks docs+# tool dials `McpHttpClient`; `core::observability` names+# `McpUnauthorizedError`), and the server/registry/audit stubs need their+# parent compiled. `sanitize` left the family entirely for `util::sanitize` —+# the orchestrator prompt sanitises *skill* descriptions through it. The gate+# follows the real dependency graph, not the directory name.+mcp = []+# Sentry crash/error reporting: the `sentry::init` guard + secret-scrubbing+# `before_send` hook (src/main.rs), the sentry-tracing bridge layer+# (core::logging), the ~24 `before_send` Event classifiers + the two+# `report_*_message` capture paths (core::observability), the session-boundary+# scope binding (credentials::sentry_scope), and the `openhuman sentry-test`+# CLI probe. Default-ON — the desktop app always ships with crash reporting.+# Slim / headless builds opt out via `--no-default-features --features+# "<explicit list without crash-reporting>"`, which drops the exclusive+# `sentry` dependency (and its transitive backtrace/contexts/panic/tracing/+# debug-images/reqwest/rustls stack) from the non-test build.+#+# TYPE CARVE-OUT (see AGENTS.md "Compile-time domain gates"): the sentry-free+# string classifiers (`is_transient_message_failure`,+# `is_insufficient_credits_message`, `contains_transient_transport_phrase`, …)+# and the `report_*_message` / `sentry_scope::{bind,clear}` signatures stay+# compiled in BOTH builds — only the `sentry::`-touching bodies are gated — so+# NO stub file is needed and always-on callers need no per-call `#[cfg]`. When+# off, `report_error_message`/`report_warning_message` still emit their+# `tracing::{error,warn}!` diagnostic, `sentry_tracing_layer()` degrades to a+# no-op `Identity` layer, and `openhuman sentry-test` returns a "built without+# the crash-reporting feature" error.+crash-reporting = ["dep:sentry"]++# Medulla integration: the HTTP/SSE client for the Medulla orchestration backend+# (`openhuman::medulla::client`) — durable sessions, event streaming, worker+# routing + roster, the operator task ledger and its GitHub sources, one-shot+# orchestration runs, the public feedback board, and the onboarding history+# reward. This is the real Medulla surface; it replaced the `medulla-local`+# supervised-child draft, which has been removed.+#+# Default-ON, but INTENTIONALLY NOT FORWARDED to the Tauri shell (allowlisted in+# scripts/lib/feature-forwarding.mjs): the desktop app is+# OpenHuman's own product and never dials a Medulla backend. The consumer is the+# Medulla TUI, which embeds this crate directly.+#+# Facade + type carve-out, NOT a leaf gate: `pub mod medulla;` is always+# compiled, and `medulla::contract` + `medulla::events` stay compiled in BOTH+# builds because `crates/openhuman-core/src/embed/` names those types in public signatures. Only+# `medulla::client` — everything that touches reqwest — is gated. This follows+# the rule the `skills` / `mcp` gates established: carve inert types+# out and gate behaviour, so the two builds share one type definition and+# cannot drift.+#+# Sheds ZERO exclusive dependencies — do NOT "fix" the empty list. `reqwest`,+# `futures`, `serde`, and `tokio` are all load-bearing for other domains; the+# gate's value is compile-time surface and RPC/tool reach, not binary size.+# Verify before ever claiming otherwise:+# cargo tree -i reqwest --no-default-features+medulla = []++# Channels domain: `openhuman::channels` (external-messaging providers — Telegram,+# Discord, Slack, Signal, WhatsApp, iMessage, IRC, … — plus the channel runtime,+# controllers, host, proactive messaging and inbound dispatch) together with the+# `webview_notifications` bridge domain. Default-ON — the desktop app always ships with+# channels. Slim / headless builds opt out via `--no-default-features --features+# "<explicit list without channels>"`. Composes with the runtime+# `DomainSet::Channels` flag (#4796): this feature narrows the compile-time+# surface, `DomainSet` gates it at runtime.+#+# This gate now owns the `tinychannels` CRATE, not just two of its providers.+# The three always-on pins that used to make the crate unconditional+# (`config/schema/channels.rs` re-exporting the config types, `DomainEvent`+# embedding `ChannelInboundEnvelope`, `security/pairing.rs` re-exporting the+# pairing helpers) now resolve through `tinychannels-bus`, the transport-free+# contract crate, which stays unconditional. What is left behind this gate is+# the provider stack and the relay transport loop.+#+# It sheds NO dependencies and is not meant to: measured, the kernel profile is+# 288 packages / 270 names / 2 native both before and after, and the package-list+# diff is one line (`tinychannels` out, `tinychannels-bus` in). Every heavy crate+# tinychannels carried is shared with kernel surface. What the gate buys is+# compile surface — ~31.7k lines a channels-less build no longer compiles — plus+# the contract crate the eventual module extraction needs.+#+# ONE caveat, and it is the reason a channels-less product build still links+# the crate: `voice` enables `dep:tinychannels` for `EmailChannel` alone+# (`audio_toolkit::ops` mails generated podcasts). A build with neither+# `channels` nor `voice` drops it entirely. (`whatsapp-web` refines this gate —+# see below — forwarding to the `tinychannels/whatsapp-web` provider feature.)+#+# NOTE: the in-app web chat (`openhuman::web_chat`, RPC namespace `channel`) is+# NOT gated by this feature even though its runtime tag is+# `DomainGroup::Channels` — it is core product surface and stays always+# compiled (decoupled from `channels/` in #5002). The `channels::{traits, cli}`+# carve-outs also stay ungated — `traits` is a 1-line tinychannels re-export and+# `cli::CliChannel` is the dep-free local REPL used by the always-on agent+# harness interactive loop. See AGENTS.md "channels gate" + `channels/mod.rs`.+# The crate itself is now droppable, which it was not before: splitting+# `tinychannels-bus` out moved every always-on pin into a contract crate. That+# is a compile-surface and architecture win, NOT a dependency win — see the+# measured note above before claiming otherwise.+channels = ["dep:tinychannels", "tinychannels/email", "tinychannels/lark"]+sandbox-landlock = ["dep:landlock"]+sandbox-bubblewrap = []+peripheral-rpi = ["dep:rppal"]+browser-native = ["dep:fantoccini"]+fantoccini = ["browser-native"]+landlock = ["sandbox-landlock"]+# The WhatsApp Web provider now lives in tinychannels; forward to its feature.+# It is a refinement INSIDE the `channels` gate — enabling it pulls in the whole+# channels domain (the provider re-exports live under `channels/providers/`).+whatsapp-web = ["channels", "tinychannels/whatsapp-web"]+# Exposes the destructive `openhuman.test_reset` RPC. Off by default; the E2E+# build (app/scripts/e2e-build.sh) flips it on. Shipped binaries never have+# this feature so the wipe RPC isn't even registered, let alone reachable.+e2e-test-support = []+# Compiles the embedded-RSS benchmark bin (#5046). Default-OFF and absent from+# `scripts/ci/product-features.txt`, so nothing shipped enables it. It is in+# NEITHER the contributor nor the product set, which is why the+# `Rust RSS Benchmark` lane names it explicitly.+#+# The list is EMPTY, and that is the whole point of this edit. It used to read+# `["dep:tinycortex", "dep:tinymemory-core"]`, but not for the benchmark's sake:+# a `[[bin]]` cannot use a dev-dependency, so this feature was what turned the+# engine on for the two `library-profile` bins that shared the gate. Those+# measured the in-process engine and went with it. The benchmark itself names no+# engine symbol and never did.+rss-bench = []+# Adds dhat heap profiling on top of `rss-bench` for the `library-profile`+# binary. Default-OFF, dev-only: installs dhat's global allocator, which+# perturbs RSS/timing numbers, so it is a separate opt-in feature rather than+# folded into `rss-bench`. Never forwarded to the shipped build.+rss-bench-dhat = ["rss-bench", "dep:dhat"]+# Compiles `memory::host_impls`, the host side of the seam traits the memory+# ENGINE declares, for builds that embed that engine in-process.+#+# The shipped product does not: its driver is the loaded TinyMemory module,+# which installs its own seams and calls back over the bus through+# `modules::memory_host`. What still embeds the engine is the test suite, which+# binds the in-process TinyCortex driver directly — legitimate there, because+# `tinymemory-core` is a dev-dependency and dev-dependency features are not+# linked into the shipped binary.+#+# Unit tests get it from `cfg(test)`. Integration tests under `tests/` are+# separate crates and `cfg(test)` does NOT reach them, which is the whole reason+# this feature exists rather than a bare `#[cfg(test)]`.+# Builds the `rss-bench` benchmark binary (#5046). Default-OFF, so it is never+# part of the shipped desktop/library build and the feature-forwarding gate+# (which only inspects the `default` list) never requires forwarding it.+# CLI argument parsing + logger init for the developer/ops binaries under+# `src/bin/` — today only `openhuman-fleet`. Default-OFF and NOT in `default`:+# nothing in the library reaches `clap` or `env_logger` (the one hit in+# `core/logging.rs` is a doc comment), so the shipped desktop build has no+# reason to carry a 14-crate CLI stack. Each owning `[[bin]]` declares+# `required-features = ["bin-tools"]`, so those targets are simply skipped+# rather than failing to link when it is off.+# Battery/AC probe feeding the scheduler's throttle decision. Default-ON.+# When off there is no hardware probe: `sample_power` reports "on AC, no charge+# signal", which is the same answer the real probe gives on a server or+# container. Consequence to be explicit about — `require_ac_power` and+# `battery_floor` are NOT enforced in such a build. CPU throttling and+# server-mode detection are unaffected.+# Rolling on-disk log files, plus the `log`->`tracing` bridge. Default-ON.+# Two consequences worth being explicit about when it is off:+# * nothing is written to disk, so a packaged desktop build has no durable+# log to attach to a support request. stderr and Sentry are unaffected.+# * `tracing-log` goes with it, so `log::*` records from dependencies stop+# reaching tracing in EVERY init path — including the stderr-only CLI one,+# which otherwise has nothing to do with file logging.+# `tracing` and `tracing-subscriber` are NOT part of this gate and stay always-on.+file-logging = ["dep:tracing-appender", "dep:tracing-log"]++scheduler-gate = ["dep:starship-battery"]++bin-tools = ["dep:clap", "dep:env_logger"]++[lints.rust]+unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage)'] }++# These project-wide shape/documentation lints describe intentional public APIs+# and long-standing module docs. Keep them explicitly baselined so `-D warnings`+# can make every other Clippy and rustc diagnostic a hard failure.+[lints.clippy]+borrowed_box = "allow"+doc_overindented_list_items = "allow"+field_reassign_with_default = "allow"+large_enum_variant = "allow"+result_large_err = "allow"+should_implement_trait = "allow"+too_many_arguments = "allow"+while_let_loop = "allow"diff --cc scripts/profile/README.mdindex 2f6fd0d6c4,906e7f72e4..d4e274b1d2--- a/scripts/profile/README.md+++ b/scripts/profile/README.md@@@ -2,9 -2,7 +2,7 @@@Reproducible benchmarking scripts for the OpenHuman Rust core as an embeddedlibrary (no RPC server), built around the `library-profile` and `rss-bench`- binaries (see `crates/openhuman-core/src/bin/library_profile/main.rs`). Full write-up:- [`docs/library-benchmarking.md`](../../docs/library-benchmarking.md). Prior- findings: [`docs/resource-profiling-session-2026-07-21.md`](../../docs/resource-profiling-session-2026-07-21.md).-binaries (see `src/bin/library_profile/main.rs`).++binaries (see `crates/openhuman-core/src/bin/library_profile/main.rs`).Five driver scripts: `library-bench.sh` (per-scenario RSS/duration),`library-cpu.sh` (samply), `library-heap.sh` (dhat), `library-fleet.sh`