Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

docs(tinyhumans): add cross-references to module READMEs

Steven Enamakelf95e0664452c
diff --git a/crates/openhuman-core/src/modules/memory/README.md b/crates/openhuman-core/src/modules/memory/README.md
new file mode 100644
index 0000000000..6f4d7636ed
--- /dev/null
+++ b/crates/openhuman-core/src/modules/memory/README.md
@@ -0,0 +1,50 @@
+# modules/memory
+
+The host half of `ai.tinyhumans.tinymemory.Memory`: the code that lets the
+core's `memory` domain talk to the loaded `tinymemory` native module instead
+of an in-process engine. The module root is one level up at
+[`modules/memory.rs`](../memory.rs); this folder holds its submodules, split
+by responsibility rather than by line count.
+
+## What's in it
+
+| File | Role |
+| --- | --- |
+| `capabilities.rs` | The pinned artifact's advertised capability set (`ARTIFACT_CAPABILITIES`), checked against `Capability::ALL` at each release bump. |
+| `provider.rs` | `ModuleMemoryProvider` construction, bus-proxy resolution, and the error-mapping macro plumbing every `Memory*` trait file below builds on. |
+| `documents_tree.rs`, `entities_graph_diff.rs`, `goals_tools_sources.rs`, `sync_sessions_episodic.rs`, `people_chunks_retrieval.rs`, `ingest_answer.rs`, `core_provider.rs` | The `Memory*` trait forwarding, one file per memory subsystem family, each mirroring the module's wire surface method for method. |
+
+## Key types
+
+`ModuleMemoryProvider` (`provider.rs`) is the type that implements the core's
+`MemoryProvider` trait by forwarding every call over the bus to the loaded
+`tinymemory` module. Because the wire surface mirrors the trait one method for
+one method, there is no translation layer, only the bus call itself, error
+mapping through `tinymemory_api::wire`, and two decisions worth knowing about:
+
+- Construction is synchronous and does no I/O: `memory::binding::build` calls
+ `ModuleMemoryProvider::new` from contexts with no tokio runtime, so the
+ module is not loaded and the bus is not dialed until first use.
+- `capabilities()` is a synchronous trait method that only the module can
+ answer asynchronously, so it returns the pinned `ARTIFACT_CAPABILITIES` set
+ instead, and `verify()` cross-checks that against the module's own answer on
+ first use, logging loudly on disagreement.
+
+## How it fits
+
+This is the module-loading side of memory's pluggable-engine story: the
+domain-facing binding and contract live in
+[`memory::driver`](../../memory/driver/README.md) and
+[`memory::api`](../../memory/api.rs), and resolve to this provider when a
+workspace binds to the `tinymemory` driver. `modules::registry` (below) is
+what makes the `tinymemory` artifact itself loadable; this folder is what
+happens after it is loaded.
+
+## Where next
+
+- [`modules/registry`](../registry/README.md) for how the `tinymemory`
+ artifact is admitted (checksum, ABI, manifest).
+- [`memory/driver`](../../memory/driver/README.md) for the host-side contract
+ and why there is no in-process engine driver anymore.
+- [`modules/README.md`](../README.md) for the loading model this provider sits
+ on top of.
diff --git a/crates/openhuman-tinyhumans/README.md b/crates/openhuman-tinyhumans/README.md
index c8cb02e2c7..089fbc964f 100644
--- a/crates/openhuman-tinyhumans/README.md
+++ b/crates/openhuman-tinyhumans/README.md
@@ -50,11 +50,11 @@ openhuman_tinyhumans::install(openhuman_tinyhumans::InstallOptions::default())?;
| Module | Owns |
| --- | --- |
-| `transport` | `SdkBackendTransport`: one `reqwest::Client` per `TransportProfile`, built from the core's `api::headers` so TLS, timeouts and `x-core-version` / `x-tauri-version` / `x-sdk-name` are exactly what the core specifies; SDK route policy; `tinyhumans_sdk::Error` → `BackendTransportError` |
+| `transport` | `SdkBackendTransport`: one `reqwest::Client` per `TransportProfile`, built from the core's `api::headers` so TLS, timeouts and `x-core-version` / `x-tauri-version` / `x-sdk-name` are exactly what the core specifies; SDK route policy; `tinyhumans_sdk::Error` → `BackendTransportError`. See [`src/transport/README.md`](src/transport/README.md) |
| `install` | process-global installation, idempotent |
| `RuntimeBuilder` | embed builder + transport |
-| `hosted` | the hosted-backend RPC proxies (`billing`, `team`, `referral`, `announcements`), moved here from the core; `hosted::extension()` packages them as a `ControllerExtension` that `install()` registers with the core's registry under `DomainGroup::Hosted`. Wire names (`openhuman.billing_*`, …) are unchanged |
-| `session` | the host-side login/session owner (formerly the `openhuman-session` crate): `SessionClient` (login-token exchange, `GET /auth/me`), `CurrentUserCache`, `CoreLink` (credential handoff into whichever core the host owns), `SessionManager`, process-global `identity` for sync Sentry hooks. May use core utilities (`util::tls`, `api::product`) but never `openhuman_core::security::*`: the core only *takes* a credential |
+| `hosted` | the hosted-backend RPC proxies (`billing`, `team`, `referral`, `announcements`), moved here from the core; `hosted::extension()` packages them as a `ControllerExtension` that `install()` registers with the core's registry under `DomainGroup::Hosted`. Wire names (`openhuman.billing_*`, …) are unchanged. See [`src/hosted/README.md`](src/hosted/README.md) |
+| `session` | the host-side login/session owner (formerly the `openhuman-session` crate): `SessionClient` (login-token exchange, `GET /auth/me`), `CurrentUserCache`, `CoreLink` (credential handoff into whichever core the host owns), `SessionManager`, process-global `identity` for sync Sentry hooks. May use core utilities (`util::tls`, `api::product`) but never `openhuman_core::security::*`: the core only *takes* a credential. See [`src/session/README.md`](src/session/README.md) |
| `jev` | `install_jev_ranker()`, installing the Jev-backed `tool_search` ranker for a TinyHumans-connected core; see [`src/jev/README.md`](src/jev/README.md) and [`gitbooks/developing/jev.md`](../../gitbooks/developing/jev.md) |
| `jwt` | the SDK's JWT readers, for hosts that already depend on this crate |