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
feat(sandbox): document and test the sandbox component toggle
Steven Enamakel1f103dcb045b
diff --git a/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rs b/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rsindex 6776a0be4f..157dc27a9a 100644--- a/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rs+++ b/crates/openhuman-core/src/platform/about_app/catalog_localai_settings_mobile.rs@@ -386,7 +386,7 @@ Capability {Configurable per agent/session/channel with safe defaults for non-main sessions.",how_to: "Set sandbox_mode = \"sandboxed\" in agent.toml, or configure runtime.kind = \\"docker\" in the TOML config. Use openhuman.sandbox_status / \- openhuman.sandbox_resolve_policy RPC to inspect.",+ openhuman.sandbox_resolve_policy RPC to inspect. Switched off by [components] sandbox = false (also set by the legacy [sandbox] enabled = false), which never loads the TinyBox module, runs commands unjailed under the Rust path checks, and answers COMPONENT_DISABLED:sandbox.",status: CapabilityStatus::Beta,privacy: None,},diff --git a/gitbooks/developing/components.md b/gitbooks/developing/components.mdindex 8eeaf28a41..14878c2d81 100644--- a/gitbooks/developing/components.md+++ b/gitbooks/developing/components.md@@ -59,6 +59,7 @@ The first load of an older config moves these once into `[components]`, and the| `OPENHUMAN_TINYMEMES` set to an off value | `components.memes = false` || `OPENHUMAN_DISABLE_CHANNEL_LISTENERS=1` | `components.channels = false` at load (env override, kept for one release; `OPENHUMAN_COMPONENT_CHANNELS` wins) || `[dictation] enabled`, `[voice_server] auto_start` and `always_on_enabled` all explicitly `false` | `components.voice = false` (any other mix keeps voice on) |+| `[sandbox] enabled = false` (or `[security.sandbox] enabled = false`) | `components.sandbox = false` (`enabled = true` or unset keeps it on; the old key is kept) || `[composio] enabled` | dropped; it was never read |A `components.*` key already present in the file always wins over its legacy flag, so the migration is idempotent and turning a component back on sticks.@@ -74,3 +75,7 @@ A `components.*` key already present in the file always wins over its legacy fla## Voice`voice = false` removes the `voice` domain family, so `voice.*` answers `COMPONENT_DISABLED:voice`. The embedded voice server, the dictation hotkey listener and always-on listening do not start whatever `[dictation] enabled`, `[voice_server] auto_start` and `always_on_enabled` say, and `tinyvoice` is never downloaded, attested or loaded. `about_app` and `modules.list` report voice as disabled. The Cargo `voice` feature is unchanged.++## Sandbox++`sandbox = false` means the TinyBox module is never downloaded, attested, loaded or initialised, and `sandbox.*` answers `COMPONENT_DISABLED:sandbox`. Sandboxed execution takes the documented fallback, the same as `[sandbox] enabled = false` or `OPENHUMAN_SANDBOX=off`: the command runs unjailed and the Rust path checks, the always-forbidden credential floor and the security policy still apply. TinyBox registers no tools and starts no background services. `modules.list` reports `tinybox` as `disabled`, `about_app` marks the sandbox capability as disabled, and the host `DomainSet` still wins. A SaaS core still requires the per-user container path, so with the module disabled it fails closed instead of running unsandboxed.diff --git a/tests/components_e2e.rs b/tests/components_e2e.rsindex 42c980f4b1..2205254f25 100644--- a/tests/components_e2e.rs+++ b/tests/components_e2e.rs@@ -51,6 +51,7 @@ fn disabled_component_answers_component_disabled_over_json_rpc() {config.components.mcp = false;config.components.voice = false;config.components.channels = false;+ config.components.sandbox = false;tinyhumans_boot::boot();let _runtime = CoreBuilder::new(HostKind::Library).config(config)@@ -105,6 +106,20 @@ fn disabled_component_answers_component_disabled_over_json_rpc() {"{channels}");+ // The sandbox namespace answers the same typed error.+ let sandbox = rpc(&base, "openhuman.sandbox_status").await;+ assert_eq!(+ sandbox.pointer("/error/message").and_then(Value::as_str),+ Some("COMPONENT_DISABLED:sandbox"),+ "{sandbox}"+ );+ assert_eq!(+ sandbox+ .pointer("/error/data/component")+ .and_then(Value::as_str),+ Some("sandbox")+ );+// `modules.list` reports the same modules as Disabled, and only them.let listed = rpc(&base, "openhuman.modules_list").await;let modules = listed@@ -125,6 +140,7 @@ fn disabled_component_answers_component_disabled_over_json_rpc() {Some("disabled"),"{listed}");+ assert_eq!(state_of("tinybox").as_deref(), Some("disabled"), "{listed}");assert_ne!(state_of("tinydocs").as_deref(),Some("disabled"),