Skip to content

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

docs(modules): document module sources and component switches

Steven Enamakelbeb66c98262b
diff --git a/AGENTS.md b/AGENTS.md
index f418e40e49..c63a0275e6 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -624,6 +624,27 @@ They share its privileges and crash domain.
- Do not enable the `modules` feature directly on the unconditional
`tinybus` dependency. Forward it from OpenHuman's own feature.
+Module sources (`OPENHUMAN_MODULE_SOURCE`, `[modules] source`; details in
+`crates/openhuman-core/src/modules/README.md`, "Module source"):
+
+- `release` is the registry-pinned, digest-checked GitHub artifact. CI and
+ shipped builds use `release` only; never document or configure `linked` or
+ `source` for CI or production.
+- `linked` (in-process factory) and `source` (a locally built artifact from the
+ gitlink) are local development and local tests only.
+- Iterate with `scripts/modules/build.mjs`, check the pin with
+ `scripts/modules/pin-status.mjs` before pushing, and release and re-pin with
+ `scripts/modules/release-and-repin.mjs`.
+
+`[components]` (`config.toml`, `OPENHUMAN_COMPONENT_<NAME>=0|1`) holds one bool
+per tiny dependency, all default true. It resolves to a `ComponentSet` that only
+narrows the host's `DomainSet`, `ServiceSet` and `ToolGroups`, and takes effect
+on the next core start. It adds no Cargo gate. A disabled component's module is
+never downloaded, mapped or registered (`ModuleState::Disabled`,
+`LoadError::Disabled`), its tools are not registered, its RPC namespace answers
+`COMPONENT_DISABLED:<name>`, and `about_app` marks its capabilities `disabled`.
+See `gitbooks/developing/components.md`.
+
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
diff --git a/crates/openhuman-core/src/modules/README.md b/crates/openhuman-core/src/modules/README.md
index 9e474246de..5bc6d764d4 100644
--- a/crates/openhuman-core/src/modules/README.md
+++ b/crates/openhuman-core/src/modules/README.md
@@ -257,6 +257,15 @@ The host files for those three modules fingerprint the configuration and call
a sign-out reaches a module that is already serving. Secrets travel only in
that configuration, never in an ordinary method call or an RPC reply.
+### Disabled components
+
+`registry::COMPONENT_OF` maps every module id to its `[components]` switch
+(`registry_contract_tests` covers every record). `ops::ensure_loaded*` refuses
+a record whose component is off with `LoadError::Disabled` before any claim,
+download or `dlopen`; `modules.list` reports `ModuleState::Disabled`; boot skips
+the module and `search_path::load_enabled` leaves its search-path artifact
+unopened. See [components](../../../../gitbooks/developing/components.md).
+
### Boot
`boot::load_declared_modules` runs as a background bootstrap job
@@ -472,6 +481,7 @@ minimal build small.
## Further reading
+- [Module sources and `[components]` (AGENTS.md)](../../../../AGENTS.md)
- [Loadable modules](../../../../gitbooks/developing/loadable-modules.md)
- [tinybus submodule](../../../../vendor/tinybus/README.md)
- [Architecture overview](../../../../gitbooks/developing/architecture.md)