Skip to content

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

docs(modules): document the linked module source

Steven Enamakelc0a60006bacb
diff --git a/crates/openhuman-core/src/modules/README.md b/crates/openhuman-core/src/modules/README.md
index db43219ea3..d50f54683c 100644
--- a/crates/openhuman-core/src/modules/README.md
+++ b/crates/openhuman-core/src/modules/README.md
@@ -137,7 +137,19 @@ global mode and `OPENHUMAN_MODULE_SOURCE_<ID>` (id upper-cased) one module.
- `release`: the chain below, pinned and digest-checked. The only mode CI and
shipped builds use; `scripts/ci/check-ci-module-source.mjs` (CI Lite) fails
if a workflow or CI script sets any other.
-- `linked`: the in-process factory registered by `openhuman-modules-linked`.
+- `linked`: the module linked into the running executable. The core exposes
+ only the seam (`modules::linked::register_linked(id, factory)`, re-exported as
+ `openhuman_rpc::embed::modules::register_linked`); the crate
+ `crates/openhuman-modules-linked` is the only place module implementation
+ crates are linked, and `install()` registers one factory per enabled module
+ feature. `ops::resolve` attaches the factory's `LinkedModule` through
+ `ModuleHost::attach_linked_with_config` with the same `module_config` a
+ released module gets (the executable's digest is the attestation). Only
+ `openhuman-cli` can reach the crate, as an optional dependency behind the
+ non-product `linked-modules` feature (`cargo run -p openhuman-cli --features
+ linked-modules`, then `OPENHUMAN_MODULE_SOURCE=linked`). tinybus never unloads
+ a module, so a process serves an id from one source only. See the crate docs
+ for which modules can be linked at the current vendor pins.
- `source`: a locally built artifact.
For local development and local tests only. When `linked` or `source` cannot be
diff --git a/docs/gitbooks/en/developing/loadable-modules.md b/docs/gitbooks/en/developing/loadable-modules.md
index b4d9fc7b5f..eb78b585b7 100644
--- a/docs/gitbooks/en/developing/loadable-modules.md
+++ b/docs/gitbooks/en/developing/loadable-modules.md
@@ -39,7 +39,7 @@ Every asset carries a SHA-256 copied verbatim from the published release's own c
Each step avoids the cost of the next:
1. Already serving on the host's broker.
-2. An operator override: a path in `[modules].overrides`, or a source mode (`[modules] source` / `OPENHUMAN_MODULE_SOURCE`, local development only; CI uses `release`).
+2. An operator override: a path in `[modules].overrides`, or a source mode (`[modules] source` / `OPENHUMAN_MODULE_SOURCE`, local development only; CI uses `release`). `linked` serves a module compiled into the running `openhuman-core` (build it with `--features linked-modules`, which links `crates/openhuman-modules-linked`; no product build or other host can reach that crate).
3. The module search path: `OPENHUMAN_MODULE_PATH`, then the platform data directories.
4. Bundled releases staged into the app at build time.
5. The release cache, downloading only if `[modules].allow_download` is true.
diff --git a/gitbooks/developing/loadable-modules.md b/gitbooks/developing/loadable-modules.md
index f1070d039b..a45252b974 100644
--- a/gitbooks/developing/loadable-modules.md
+++ b/gitbooks/developing/loadable-modules.md
@@ -57,7 +57,7 @@ Every asset carries a SHA-256 copied verbatim from the published release's own c
Each step avoids the cost of the next:
1. Already serving on the host's broker.
-2. An operator override: a path in `[modules].overrides`, or a source mode (`[modules] source` / `OPENHUMAN_MODULE_SOURCE`, local development only; CI uses `release`).
+2. An operator override: a path in `[modules].overrides`, or a source mode (`[modules] source` / `OPENHUMAN_MODULE_SOURCE`, local development only; CI uses `release`). `linked` serves a module compiled into the running `openhuman-core` (build it with `--features linked-modules`, which links `crates/openhuman-modules-linked`; no product build or other host can reach that crate).
3. The module search path: `OPENHUMAN_MODULE_PATH`, then the platform data directories.
4. Bundled releases staged into the app at build time.
5. The release cache, downloading only if `[modules].allow_download` is true.