Skip to content

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

docs(runtime): document cluster settings and lease behaviour

Steven Enamakel687df39c9e10
diff --git a/crates/openhuman-core/src/core/runtime/README.md b/crates/openhuman-core/src/core/runtime/README.md
index 16543028b9..cdb32627aa 100644
--- a/crates/openhuman-core/src/core/runtime/README.md
+++ b/crates/openhuman-core/src/core/runtime/README.md
@@ -153,7 +153,11 @@ through `runtime/saas.rs`:
(host tool groups, see `profiles/README.md`), `[sandbox]` (the shell
container), `rpc_allowlist_extra`, `max_profiles_open`, `profile_ids`, `idle_evict_secs`,
`shared_backend_api_key`, `custom_definitions` and `require_user_signature`
- (default `true`). Unknown keys are refused.
+ (default `true`), and the cluster settings: `storage_url` (the shared
+ backend; `OPENHUMAN_STORAGE_URL` wins), `node_id` (else
+ `OPENHUMAN_NODE_ID`, else random per process), `advertise_url`,
+ `lease_ttl_secs` (default 30) and `operator_dir` (default
+ `<root>/operator`). Unknown keys are refused.
- `runtime/boot_guard.rs` refuses the boot, listing every problem at once,
when:
- the host kind is not `Saas`;
@@ -166,8 +170,11 @@ through `runtime/saas.rs`:
non-positive limits;
- `rpc_allowlist_extra` is non-empty (the per-user RPC surface is fixed);
- the root is relative, missing, world-writable or inside `~/.openhuman`;
- - the service token is missing, readable by others, or shorter than 32 bytes.
-- The operator plane boots with its own config under `<root>/operator/`, so
+ - the service token is missing, readable by others, or shorter than 32 bytes;
+ - the node is clustered (`advertise_url` set) without a storage URL whose
+ driver keeps compare-and-swap atomic across processes (SQLite, MongoDB).
+- The operator plane boots with its own config under `operator_dir()`
+ (`<root>/operator/` by default), so
it never resolves `~/.openhuman` or an `active_user.toml`. The gateway
bearer is the RPC token.
@@ -179,8 +186,9 @@ keeps the two planes apart: the operator scope reaches only the operator
plane, and a user's scope only the reviewed `USER_METHODS`.
`saas::build` installs the process's `profiles::ProfileHost`. Each open
profile (`<root>/users/<profile-id>/`, the desktop's user layout) runs under a
-context derived from the operator's, with its own forced config and
-`session_agent` (see `profiles/README.md`).
+context derived from the operator's, with its own forced config, policy,
+`profile` and `session_agent`, behind a lease that keeps it on one process
+(see `profiles/README.md`). `saas::build` also starts the lease heartbeat.
Three guards keep SaaS work from falling back to process-wide state: