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
docs(runtime): document SaaS host tool groups and boot guard rules
Steven Enamakele58c9f667d09
diff --git a/crates/openhuman-core/src/core/runtime/README.md b/crates/openhuman-core/src/core/runtime/README.mdindex dc6440a764..cb6a9531fc 100644--- a/crates/openhuman-core/src/core/runtime/README.md+++ b/crates/openhuman-core/src/core/runtime/README.md@@ -149,8 +149,9 @@ user's `Config`. The first SaaS boot locks it (`lock_mode`), and from then onthrough `runtime/saas.rs`:- `SaasConfig` is the **operator's** file. It sets `root`,- `service_token_file` (defaults to `<root>/service.token`), `tool_allowlist`,- `rpc_allowlist_extra`, `max_agents_open`, `idle_evict_secs`,+ `service_token_file` (defaults to `<root>/service.token`), `tool_allowlist`+ (host tool groups, see `user_agents/README.md`), `[sandbox]` (the shell+ container), `rpc_allowlist_extra`, `max_agents_open`, `idle_evict_secs`,`shared_backend_api_key` and `custom_definitions`. Unknown keys are refused.- `runtime/boot_guard.rs` refuses the boot, listing every problem at once,when:@@ -159,7 +160,10 @@ through `runtime/saas.rs`:- single-user or back-door environment variables are set(`OPENHUMAN_WORKSPACE`, `OPENHUMAN_DEV_CONNECT`, backend tokens,`OPENHUMAN_CORE_TOKEN`, approval gate or sandbox switched off);- - an allowlist is non-empty before its isolation has shipped;+ - `tool_allowlist` names something other than a tool group, or allowlists+ `host_shell` without a working Docker, with network `host`, no image, or+ 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/`, sodiff --git a/crates/openhuman-core/src/core/runtime/saas.rs b/crates/openhuman-core/src/core/runtime/saas.rsindex b7b4d6639b..6eb05726cb 100644--- a/crates/openhuman-core/src/core/runtime/saas.rs+++ b/crates/openhuman-core/src/core/runtime/saas.rs@@ -44,8 +44,8 @@ pub struct SaasConfig {/// The container every user shell command runs in.#[serde(default)]pub sandbox: SaasSandboxConfig,- /// Extra RPC methods the operator exposes. Refused by the boot guard until- /// the per-user RPC surface ships.+ /// Extra RPC methods the operator exposes. Refused by the boot guard: the+ /// per-user RPC surface is the reviewed `user_agents::surface` list.#[serde(default)]pub rpc_allowlist_extra: Vec<String>,/// Most user agents kept open at once.diff --git a/crates/openhuman-core/src/user_agents/README.md b/crates/openhuman-core/src/user_agents/README.mdindex 2514ac9474..9144b9bde3 100644--- a/crates/openhuman-core/src/user_agents/README.md+++ b/crates/openhuman-core/src/user_agents/README.md@@ -16,6 +16,7 @@ process. A single-user core never serves it: its controllers belong to| `gateway.rs` | Which context a gateway request runs under: the operator plane, or the agent of the user named in `X-OpenHuman-User`, after the signature check || `surface.rs` | What a user may call: `USER_METHODS`, the exact allowlist applied at dispatch, in the controller list and in `/schema`; the operator scope sees only the operator plane; user thread-id rules || `background.rs` | The SaaS background loop: every minute it sweeps idle agents and runs each agent's queued memory jobs (deferred ingests, belief builds) under that agent's context |+| `tools.rs` | Which agent tools a user gets: the operator's host tool groups (`host_files`, `host_shell`), the hard-deny list, the tool-list filter, the approval gate's SaaS verdict, and the container policy for a user's shell || `credentials.rs` | A user agent's TinyHumans credential, stored beside its config || `ops.rs` | `provision` / `deprovision` / `list` / `status` / `set_credential` / `clear_credential`, returning `Outcome<T>` || `schemas.rs` | The `user_agents.*` controllers |@@ -34,6 +35,23 @@ process. A single-user core never serves it: its controllers belong toconfig and `session_agent = <id>`, and has no domain family or tool group ofits own yet. Work for a user runs under it, which is what the config loader,the session store and the per-thread caches key on.+- **Host tools are opt-in and confined.** A user's context has no `Platform`+ family, so shell and file tools are absent unless the operator lists their+ group in `tool_allowlist`:+ - `host_files` (`file_read`, `file_write`, `edit`, `apply_patch`, `grep`,+ `glob`, `list`, `csv_export`, `read_workspace_state`) runs in-process,+ confined by the forced policy to the agent's `sandbox/`. In SaaS the+ policy grants neither `~/OpenHuman/projects` nor `/tmp/openhuman`, which+ every user would share.+ - `host_shell` runs every command in a fresh Docker container+ (`[sandbox]`: image, network, memory and CPU limits): read-only root+ filesystem, all capabilities dropped, no host environment, and the+ agent's `sandbox/` as its only writable mount. If the container cannot+ start, the command fails; it never falls back to the host.+ - Tools that change the process, install code or reach shared state are+ hard-denied whatever the allowlist says (`tools::HARD_DENIED`).+ - There is no per-user approval surface, so the approval gate never parks+ in SaaS: it allows tools from an allowlisted group and refuses the rest.- **Deprovisioning archives.** The agent's directory moves to`<root>/deprovisioned/<id>-<unix-secs>/`. Nothing is deleted.