Skip to content

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

Merge upstream/main into oh-browser-unattended

Steven Enamakelef58603be3f6
diff --cc crates/openhuman-core/src/config/schema/README.md
index d6886fbfc4,d6bd2c24f5..fea1863bd8
--- a/crates/openhuman-core/src/config/schema/README.md
+++ b/crates/openhuman-core/src/config/schema/README.md
@@@ -17,46 -17,45 +17,46 @@@ is mounted as a submodule of [`load/dir
| `config.toml` section | File | Struct |
| --- | --- | --- |
- | `[agent]`, `[orchestrator]`, `[teams.*]`, `[agents.*]` | `agent.rs` | `AgentConfig`, `OrchestratorModelConfig`, `TeamModelConfig`, `DelegateAgentConfig` |
- | `[autonomy]` | `autonomy.rs` | `AutonomyConfig` — feeds `security::SecurityPolicy` |
- | `[[capability_providers]]` | `capability_providers.rs` | `CapabilityProviderConfig` |
- | `[channels_config]`, `[sandbox]` | `channels.rs` | `ChannelsConfig` and per-provider configs re-exported from `tinychannels_bus`; `SandboxConfig`, `ResourceLimitsConfig`, `AuditConfig`, and `SecurityConfig` (only `DaemonConfig` embeds the last one) |
- | `[claude_agent_sdk]` | `claude_agent_sdk.rs` | `ClaudeAgentSdkConfig` |
- | `[[cloud_providers]]`, `primary_cloud`, `*_provider` slugs | `cloud_providers.rs` | `CloudProviderCreds`, `CloudProviderType`, `AuthStyle` |
- | `[context]` | `context.rs` | `ContextConfig` |
- | `[cost]` | `identity_cost.rs` | `CostConfig`, `ModelPricing` |
- | `[dashboard]` | `dashboard.rs` | `DashboardConfig`, `DiagramViewerConfig`, `EventStreamConfig`, `ModelHealthConfig` |
- | `[dictation]` | `dictation.rs` | `DictationConfig`, `DictationActivationMode` |
- | `[ephemeral_route]` | `ephemeral_route.rs` | `EphemeralRoute` |
- | `[cron]` | `cron.rs` | `CronConfig` |
- | `[hooks]` | `hooks.rs` | `HooksConfig` |
- | `[hosting]` | `hosting.rs` | `HostingConfig` |
+ | `[agent]`, `[orchestrator]`, `[teams.*]`, `[agents.*]` | [`agent.rs`](./agent.rs) | `AgentConfig`, `OrchestratorModelConfig`, `TeamModelConfig`, `DelegateAgentConfig` |
+ | `[autonomy]` | [`autonomy.rs`](./autonomy.rs) | `AutonomyConfig`: feeds `security::SecurityPolicy` |
+ | `[[capability_providers]]` | [`capability_providers.rs`](./capability_providers.rs) | `CapabilityProviderConfig` |
+ | `[channels_config]`, `[sandbox]` | [`channels.rs`](./channels.rs) | `ChannelsConfig` and per-provider configs re-exported from `tinychannels_bus`; `SandboxConfig`, `ResourceLimitsConfig`, `AuditConfig`, and `SecurityConfig` (only `DaemonConfig` embeds the last one) |
+ | `[claude_agent_sdk]` | [`claude_agent_sdk.rs`](./claude_agent_sdk.rs) | `ClaudeAgentSdkConfig` |
+ | `[[cloud_providers]]`, `primary_cloud`, `*_provider` slugs | [`cloud_providers.rs`](./cloud_providers.rs) | `CloudProviderCreds`, `CloudProviderType`, `AuthStyle` |
+ | `[context]` | [`context.rs`](./context.rs) | `ContextConfig` |
+ | `[cost]` | [`identity_cost.rs`](./identity_cost.rs) | `CostConfig`, `ModelPricing` |
+ | `[dashboard]` | [`dashboard.rs`](./dashboard.rs) | `DashboardConfig`, `DiagramViewerConfig`, `EventStreamConfig`, `ModelHealthConfig` |
+ | `[dictation]` | [`dictation.rs`](./dictation.rs) | `DictationConfig`, `DictationActivationMode` |
+ | `[ephemeral_route]` | [`ephemeral_route.rs`](./ephemeral_route.rs) | `EphemeralRoute` |
+ | `[cron]` | [`cron.rs`](./cron.rs) | `CronConfig` |
+ | `[hooks]` | [`hooks.rs`](./hooks.rs) | `HooksConfig` |
+ | `[hosting]` | [`hosting.rs`](./hosting.rs) | `HostingConfig` |
| `[learning]` | `learning.rs` | `LearningConfig`, `ReflectionSource` |
- | `[local_ai]` | `local_ai.rs` | `LocalAiConfig`, `LocalAiUsage` |
- | `[modules]` | `modules.rs` | `ModulesConfig`, `ModuleOverride`: controls only whether compiled-in modules load. The loadable *set* is fixed by `crate::modules::registry` |
- | `[node]` | `node.rs` | `NodeConfig` (managed Node.js toolchain for skills) |
- | `[observability]` | `observability.rs` | `ObservabilityConfig`, `AgentTracingConfig` |
- | `[privacy]` | `privacy.rs` | `PrivacyConfig`, `PrivacyMode` |
- | `[proxy]` | `proxy.rs` | `ProxyConfig`, `ProxyScope`, plus `runtime_proxy_config()` / `set_runtime_proxy_config()` process-wide accessors |
- | `[[model_routes]]`, `[[embedding_routes]]` | `routes.rs` | `ModelRouteConfig`, `EmbeddingRouteConfig` |
- | `[runtime]` (+ `[runtime.docker]`), `[shell]`, `[reliability]`, `[scheduler]` | `runtime.rs` | `RuntimeConfig`, `DockerRuntimeConfig`, `ShellConfig`, `ReliabilityConfig`, `SchedulerConfig` |
- | `[runtime_pool]` | `runtime_pool.rs` | `RuntimePoolConfig`, `RuntimePoolLangConfig` |
- | `[runtime.local_jail]` | `runtime_local_jail.rs` | `LocalJailConfig` — filesystem grants for the local OS jail |
- | `[runtime_python]` | `runtime_python.rs` | `RuntimePythonConfig` |
- | `[scheduler_gate]` | `scheduler_gate.rs` | `SchedulerGateConfig`, `SchedulerGateMode` |
- | `[memory]` (engine, `engines.<id>`, `conversations`, `context`, `sources`, embedding settings) | `memory.rs` | `MemoryConfig`, `MemoryEngineSettings`, `MemoryConversationsConfig`, `MemoryContextConfig`, `MemorySourceConfig` (see `docs/specs/memory-v2.md`) |
- | `[task_sources]` | `task_sources.rs` | `TaskSourcesConfig` |
- | `[tokenjuice]` | `tokenjuice.rs` | `TokenjuiceConfig` |
+ | `[local_ai]` | [`local_ai.rs`](./local_ai.rs) | `LocalAiConfig`, `LocalAiUsage` |
+ | `[modules]` | [`modules.rs`](./modules.rs) | `ModulesConfig`, `ModuleOverride`: controls only whether compiled-in modules load. The loadable *set* is fixed by `crate::modules::registry` |
+ | `[node]` | [`node.rs`](./node.rs) | `NodeConfig` (managed Node.js toolchain for skills) |
+ | `[observability]` | [`observability.rs`](./observability.rs) | `ObservabilityConfig`, `AgentTracingConfig` |
+ | `[privacy]` | [`privacy.rs`](./privacy.rs) | `PrivacyConfig`, `PrivacyMode` |
+ | `[proxy]` | [`proxy.rs`](./proxy.rs) | `ProxyConfig`, `ProxyScope`, plus `runtime_proxy_config()` / `set_runtime_proxy_config()` process-wide accessors |
+ | `[[model_routes]]`, `[[embedding_routes]]` | [`routes.rs`](./routes.rs) | `ModelRouteConfig`, `EmbeddingRouteConfig` |
+ | `[runtime]` (+ `[runtime.docker]`), `[shell]`, `[reliability]`, `[scheduler]` | [`runtime.rs`](./runtime.rs) | `RuntimeConfig`, `DockerRuntimeConfig`, `ShellConfig`, `ReliabilityConfig`, `SchedulerConfig` |
+ | `[runtime_pool]` | [`runtime_pool.rs`](./runtime_pool.rs) | `RuntimePoolConfig`, `RuntimePoolLangConfig` |
+ | `[runtime.local_jail]` | [`runtime_local_jail.rs`](./runtime_local_jail.rs) | `LocalJailConfig`: filesystem grants for the local OS jail |
+ | `[runtime_python]` | [`runtime_python.rs`](./runtime_python.rs) | `RuntimePythonConfig` |
+ | `[scheduler_gate]` | [`scheduler_gate.rs`](./scheduler_gate.rs) | `SchedulerGateConfig`, `SchedulerGateMode` |
+ | `[memory]` (engine, `engines.<id>`, `conversations`, `context`, `sources`, embedding settings) | [`memory.rs`](./memory.rs) | `MemoryConfig`, `MemoryEngineSettings`, `MemoryConversationsConfig`, `MemoryContextConfig`, `MemorySourceConfig` (see [`docs/specs/memory-v2.md`](../../../../../docs/specs/memory-v2.md)) |
+ | `[task_sources]` | [`task_sources.rs`](./task_sources.rs) | `TaskSourcesConfig` |
+ | `[tokenjuice]` | [`tokenjuice.rs`](./tokenjuice.rs) | `TokenjuiceConfig` |
| tool-related sections (see below) | `tools/` | (multiple structs) |
- | `[update]` | `update.rs` | `UpdateConfig`, `UpdateRestartStrategy` |
- | `[voice_server]` | `voice_server.rs` | `VoiceServerConfig`, `SttEngine`, `VoiceActivationMode` |
- | `[[voice_providers]]`, `stt_provider` / `tts_provider` | `voice_providers.rs` | `VoiceProviderCreds`, `BuiltinVoiceProvider`, `BUILTIN_VOICE_PROVIDERS` |
+ | `[update]` | [`update.rs`](./update.rs) | `UpdateConfig`, `UpdateRestartStrategy` |
+ | `[voice_server]` | [`voice_server.rs`](./voice_server.rs) | `VoiceServerConfig`, `SttEngine`, `VoiceActivationMode` |
+ | `[[voice_providers]]`, `stt_provider` / `tts_provider` | [`voice_providers.rs`](./voice_providers.rs) | `VoiceProviderCreds`, `BuiltinVoiceProvider`, `BUILTIN_VOICE_PROVIDERS` |
| top-level `Config` and its scalar keys | `types.rs` (+ `types/config.rs`, `types/model_ids.rs`) | `Config`, `ModelRegistryEntry`, `MODEL_*` / `DEFAULT_MODEL` constants |
- | built-in defaults | `defaults.rs` | `impl Default for Config` and per-field `default_*` fns |
+ | built-in defaults | [`defaults.rs`](./defaults.rs) | `impl Default for Config` and per-field `default_*` fns |
- `tools/mod.rs` groups the tool-facing sections: `browser.rs` (`BrowserConfig`,
+ [`tools/mod.rs`](./tools/mod.rs) groups the tool-facing sections: `browser.rs` (`BrowserConfig`,
-`BrowserComputerUseConfig`), `http.rs` (`HttpRequestConfig`, `CurlConfig`),
+`BrowserComputerUseConfig`, and the `unattended_actions` allow-list with its
+known names in `UNATTENDED_BROWSER_ACTIONS`), `http.rs` (`HttpRequestConfig`, `CurlConfig`),
`integrations.rs` (`IntegrationsConfig`, `ComposioConfig`, `SecretsConfig`),
`mcp.rs` (`McpServerConfig`, `McpClientConfig`, `GitbooksConfig`),
`multimodal.rs` (`MultimodalConfig`, `MultimodalFileConfig`), `search.rs`
diff --cc crates/openhuman-core/src/config/schema/tools/browser.rs
index ed93590d88,823f33f1ad..74a99db0bc
--- a/crates/openhuman-core/src/config/schema/tools/browser.rs
+++ b/crates/openhuman-core/src/config/schema/tools/browser.rs
@@@ -86,69 -86,14 +86,75 @@@ pub struct BrowserConfig
pub max_task_steps: usize,
#[serde(default = "default_task_timeout_secs")]
pub task_timeout_secs: u64,
+ /// Gated browser action kinds a trusted unattended turn (a cron job, a
+ /// background job, or a workflow without `require_approval`) may take
+ /// without the interactive host approval it cannot get. Empty, the
+ /// default, keeps every such action behind the approval gate. Known names
+ /// are [`UNATTENDED_BROWSER_ACTIONS`]; any other entry is ignored with a
+ /// warning. Chat, channel and unlabelled turns are never affected.
+ #[serde(default)]
+ pub unattended_actions: Vec<String>,
+ /// Keep, per site, the plan a finished browser task ran and the elements
+ /// it found, and hand them to the next task there
+ /// (`modules::browser_sites`). Kept in the workspace only, never in the
+ /// agent's memory.
+ #[serde(default = "default_true")]
+ pub learn_from_tasks: bool,
}
+/// Action kinds `[browser] unattended_actions` may name: the gated direct
+/// actions, by their TinyComputer wire names, plus `task_step` for a browser
+/// task paused at `needs_approval`.
+pub const UNATTENDED_BROWSER_ACTIONS: &[&str] = &[
+ "click",
+ "double_click",
+ "fill",
+ "type",
+ "press",
+ "select",
+ "check",
+ "task_step",
+];
+
+fn normalized_action(raw: &str) -> String {
+ raw.trim().to_ascii_lowercase()
+}
+
+impl BrowserConfig {
+ /// Whether `kind` is a known gated action listed in `unattended_actions`.
+ /// Says nothing about the turn; callers check its origin separately.
+ pub fn allows_unattended(&self, kind: &str) -> bool {
+ self.unattended_kind(kind).is_some()
+ }
+
+ /// The canonical, static name of `kind` when it is a known gated action
+ /// listed in `unattended_actions`. Both sides are trimmed and lowercased.
+ /// Being static, it is safe to log whatever the caller passed in.
+ pub fn unattended_kind(&self, kind: &str) -> Option<&'static str> {
+ let kind = normalized_action(kind);
+ let canonical = UNATTENDED_BROWSER_ACTIONS
+ .iter()
+ .copied()
+ .find(|known| *known == kind)?;
+ self.unattended_actions
+ .iter()
+ .any(|listed| normalized_action(listed) == canonical)
+ .then_some(canonical)
+ }
+
+ /// Entries of `unattended_actions` that name no known action kind. They
+ /// allow nothing; the loader reports them so a typo is not silent.
+ pub fn unknown_unattended_actions(&self) -> Vec<String> {
+ self.unattended_actions
+ .iter()
+ .filter(|listed| {
+ !UNATTENDED_BROWSER_ACTIONS.contains(&normalized_action(listed).as_str())
+ })
+ .cloned()
+ .collect()
+ }
+}
+
fn default_viewport_width() -> u32 {
1280
}
@@@ -197,7 -142,7 +203,8 @@@ impl Default for BrowserConfig
download_dir: None,
max_task_steps: default_max_task_steps(),
task_timeout_secs: default_task_timeout_secs(),
+ unattended_actions: Vec::new(),
+ learn_from_tasks: true,
}
}
}
diff --cc crates/openhuman-core/src/tools/impl/README.md
index 00beb0f8a2,ac05f4d1c5..16137f6bb1
--- a/crates/openhuman-core/src/tools/impl/README.md
+++ b/crates/openhuman-core/src/tools/impl/README.md
@@@ -29,13 -29,13 +29,13 @@@ tested but no production assembly site
| Family | Tools | Registration gate |
| --- | --- | --- |
- | `system/` | `ShellTool`, `NodeExecTool`, `NpmExecTool`, `PythonExecTool`, `InstallToolTool`, `DetectToolsTool` (from `tinytools_std`), `CurrentTimeTool` and `ResolveTimeTool` (imported directly from `tinyagents_harness::tools` at their call sites; no local copy), `ScheduleTool`, `ProxyConfigTool`, `PushoverTool`, `LspTool`, `ToolStatsTool`, `UpdateCheckTool`, `UpdateApplyTool`, `InsertSqlRecordTool`, `WorkspaceStateTool`, `RetrieveToolOutputTool` (from `tinyjuice::host`, wired by `retrieve_tool_output_tool`); shell failure rendering lives in `tinytools_std::command_output` | `node_exec`/`npm_exec` and `shell`'s PATH injection need the `runtime-node` Cargo feature plus `node.enabled`; `python_exec` needs `runtime_python.enabled`; `LspTool` needs `OPENHUMAN_LSP_ENABLED` (`lsp_capability_enabled`); `ToolStatsTool` needs `learning.enabled` and `learning.tool_tracking_enabled`; `InsertSqlRecordTool` is exported, not registered; the rest are always registered |
- | `filesystem/` | Host adapter only: `SecurityPolicy` implements `tinytools_std::filesystem::FsGate`. The tools (`FileReadTool`, `FileWriteTool`, `EditFileTool`, `ApplyPatchTool`, `GrepTool`, `GlobTool`, `ListFilesTool`, `ReadDiffTool`, `CsvExportTool`, `GitOperationsTool`, `RunLinterTool`, `RunTestsTool`, `UpdateMemoryMdTool`) live in `tinytools_std::filesystem` and are imported directly by `tools/ops.rs` | always registered, except `ReadDiffTool`, `RunLinterTool`, and `RunTestsTool`, which are exported, not registered |
- | `browser/` | `BrowserTool` (TinyComputer browser members and tasks), `BrowserOpenTool` (simple TinyComputer navigation), `ImageInfoTool` | Both browser tools need `browser.enabled` and the `modules` feature, and are deferred until `tool_search`; `ImageInfoTool` remains direct. Browser navigation uses the shared `http_request.allowed_domains` policy, and the checksum-pinned TinyComputer release module. Consequential actions go through the forced approval gate; `browser_unattended.rs` lets trusted cron/background/approval-free workflow turns skip it for the kinds listed in `[browser] unattended_actions`. |
- | `network/` | `HttpRequestTool`, `WebFetchTool`, `CurlTool`, `GitbooksSearchTool`, `GitbooksGetPageTool`, `GmailUnsubscribeTool`, and under the `mcp` Cargo feature `McpListServersTool`, `McpListToolsTool`, `McpCallTool`; `url_guard.rs` is the shared SSRF/allowlist validator, not a tool | `http_request`, `web_fetch`, `curl`, `gmail_unsubscribe` always registered; `gitbooks_*` need `gitbooks.enabled` and, when the active profile sets an `mcp_allowlist`, an entry named `gitbooks`; `mcp_list_servers`/`mcp_list_tools`/`mcp_call_tool` register only when the static `[[mcp_client.servers]]` registry (after the profile allowlist) is non-empty |
- | `document/` (feature `documents`) | `DocumentTool` (`generate_document`) | always registered when compiled. Builds `.docx` bytes via the pure-Rust `engine` module (`docx-rs`, no subprocess) inside `spawn_blocking` + `tokio::time::timeout`; allocates the artifact with `agent::artifacts::create_artifact` (kind `Document`), persists `args.json` next to it for the failed-card Retry path, then `finalize_artifact` or `fail_artifact` |
- | `presentation/` (feature `documents`) | `PresentationTool` (`generate_presentation`) | always registered when compiled. Same shape as `document/` with `ppt-rs` producing `.pptx` and kind `Presentation` |
- | `meta/` | `deferred` (`strip_deferred_from_visible`, `deferred_tool_names`, the `TOOL_SEARCH_NAME` belt opt-in constant); `collapse` helpers (`resolve`, `merge_action_schemas`, `args_without_action`, `strictest_permission`, `any_external_effect`, `unknown_action_message`, `CollapsedAction`) | not registered: `deferred` is the host's half of `ToolExposure::Deferred`: the session builder (`agent/session_host/builder/builder_build.rs`) uses it to split a belt into the advertised set and the still-registered deferred set, and the tinyagents harness advertises its intrinsic `tool_search` / `tool_call` bridge over the latter (ranked per `agent/tinyagents/discovery`). The `collapse` helpers are used by `cron/tools/collapsed.rs` and `memory/tools/collapsed.rs` to merge a multi-action tool's per-action schemas and permissions into one entry |
+ | [`system/`](./system/) | `ShellTool`, `NodeExecTool`, `NpmExecTool`, `PythonExecTool`, `InstallToolTool`, `DetectToolsTool` (from `tinytools_std`), `CurrentTimeTool` and `ResolveTimeTool` (imported directly from `tinyagents_harness::tools` at their call sites; no local copy), `ScheduleTool`, `ProxyConfigTool`, `PushoverTool`, `LspTool`, `ToolStatsTool`, `UpdateCheckTool`, `UpdateApplyTool`, `InsertSqlRecordTool`, `WorkspaceStateTool`, `RetrieveToolOutputTool` (from `tinyjuice::host`, wired by `retrieve_tool_output_tool`); shell failure rendering lives in `tinytools_std::command_output` | `node_exec`/`npm_exec` and `shell`'s PATH injection need the `runtime-node` Cargo feature plus `node.enabled`; `python_exec` needs `runtime_python.enabled`; `LspTool` needs `OPENHUMAN_LSP_ENABLED` (`lsp_capability_enabled`); `ToolStatsTool` needs `learning.enabled` and `learning.tool_tracking_enabled`; `InsertSqlRecordTool` is exported, not registered; the rest are always registered |
+ | [`filesystem/`](./filesystem/) | Host adapter only: `SecurityPolicy` implements `tinytools_std::filesystem::FsGate`. The tools (`FileReadTool`, `FileWriteTool`, `EditFileTool`, `ApplyPatchTool`, `GrepTool`, `GlobTool`, `ListFilesTool`, `ReadDiffTool`, `CsvExportTool`, `GitOperationsTool`, `RunLinterTool`, `RunTestsTool`, `UpdateMemoryMdTool`) live in `tinytools_std::filesystem` and are imported directly by `tools/ops.rs` | always registered, except `ReadDiffTool`, `RunLinterTool`, and `RunTestsTool`, which are exported, not registered |
-| [`browser/`](./browser/) | `BrowserTool` (TinyComputer browser members and tasks), `BrowserOpenTool` (simple TinyComputer navigation), `ImageInfoTool` | Both browser tools need `browser.enabled` and the `modules` feature, and are deferred until `tool_search`; `ImageInfoTool` remains direct. Browser navigation uses the shared `http_request.allowed_domains` policy, and the checksum-pinned TinyComputer release module. |
++| [`browser/`](./browser/) | `BrowserTool` (TinyComputer browser members and tasks), `BrowserOpenTool` (simple TinyComputer navigation), `ImageInfoTool` | Both browser tools need `browser.enabled` and the `modules` feature, and are deferred until `tool_search`; `ImageInfoTool` remains direct. Browser navigation uses the shared `http_request.allowed_domains` policy, and the checksum-pinned TinyComputer release module. Consequential actions go through the forced approval gate; `browser_unattended.rs` lets trusted cron/background/approval-free workflow turns skip it for the kinds listed in `[browser] unattended_actions`. |
+ | [`network/`](./network/) | `HttpRequestTool`, `WebFetchTool`, `CurlTool`, `GitbooksSearchTool`, `GitbooksGetPageTool`, `GmailUnsubscribeTool`, and under the `mcp` Cargo feature `McpListServersTool`, `McpListToolsTool`, `McpCallTool`; `url_guard.rs` is the shared SSRF/allowlist validator, not a tool | `http_request`, `web_fetch`, `curl`, `gmail_unsubscribe` always registered; `gitbooks_*` need `gitbooks.enabled` and, when the active profile sets an `mcp_allowlist`, an entry named `gitbooks`; `mcp_list_servers`/`mcp_list_tools`/`mcp_call_tool` register only when the static `[[mcp_client.servers]]` registry (after the profile allowlist) is non-empty |
+ | [`document/`](./document/) (feature `documents`) | `DocumentTool` (`generate_document`) | always registered when compiled. Builds `.docx` bytes via the pure-Rust `engine` module (`docx-rs`, no subprocess) inside `spawn_blocking` + `tokio::time::timeout`; allocates the artifact with `agent::artifacts::create_artifact` (kind `Document`), persists `args.json` next to it for the failed-card Retry path, then `finalize_artifact` or `fail_artifact` |
+ | [`presentation/`](./presentation/) (feature `documents`) | `PresentationTool` (`generate_presentation`) | always registered when compiled. Same shape as `document/` with `ppt-rs` producing `.pptx` and kind `Presentation` |
+ | [`meta/`](./meta/) | `deferred` (`strip_deferred_from_visible`, `deferred_tool_names`, the `TOOL_SEARCH_NAME` belt opt-in constant); `collapse` helpers (`resolve`, `merge_action_schemas`, `args_without_action`, `strictest_permission`, `any_external_effect`, `unknown_action_message`, `CollapsedAction`) | not registered: `deferred` is the host's half of `ToolExposure::Deferred`: the session builder (`agent/session_host/builder/builder_build.rs`) uses it to split a belt into the advertised set and the still-registered deferred set, and the tinyagents harness advertises its intrinsic `tool_search` / `tool_call` bridge over the latter (ranked per `agent/tinyagents/discovery`). The `collapse` helpers are used by `cron/tools/collapsed.rs` and `memory/tools/collapsed.rs` to merge a multi-action tool's per-action schemas and permissions into one entry |
## Notes
diff --cc docs/TEST-COVERAGE-MATRIX.md
index bc5f54485c,95b843a1ac..50a2a35ef2
--- a/docs/TEST-COVERAGE-MATRIX.md
+++ b/docs/TEST-COVERAGE-MATRIX.md
@@@ -327,7 -328,7 +328,8 @@@ End-to-end coverage of the agent harnes
| 7.1.1 | Open URL | RU+WD | `crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs`, `app/test/e2e/specs/tool-browser-flow.spec.ts` | ✅ | `browser_open` is a deferred one-shot TinyComputer entry point. |
| 7.1.2 | Browser Automation | RU+WD | `crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs`, `app/test/e2e/specs/tool-browser-flow.spec.ts` | ✅ | `browser` is deferred until `tool_search`; tests cover task limits, TinyComputer task pauses, session reuse, policy rebinds, and host confirmation. |
| 7.1.3 | Browser Connections | VU+RU | `app/src/components/settings/panels/BrowserConnectionsPanel.test.tsx`, `crates/openhuman-core/src/modules/browser_tests.rs` | ✅ | Readiness, launch settings, and the shared website policy are configured in Connections. |
- | 7.1.4 | Unattended browser actions | RU | `crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs`, `crates/openhuman-core/src/config/schema/tools/browser_tests.rs`, `crates/openhuman-core/src/config/schema/load_env_overlay_context_tests.rs`, `crates/openhuman-core/src/security/approval/gate_forced_tests.rs` | 🟡 | `[browser] unattended_actions` lets Cron/Background/approval-free Workflow turns take listed gated actions (and `task_step`) without the forced gate; WebChat, channels, CLI, Unknown and `require_approval` workflows stay gated. RU drives `BrowserTool::execute` under a CoreContext-scoped turn origin for every origin; allowed actions log kind + digest only, unknown names are counted, not echoed. No E2E: the action needs the native TinyComputer module and Chromium, which the test lanes do not carry and must not download. |
+ | 7.1.4 | Browser site memory | RU+VU | `crates/openhuman-core/src/modules/browser_sites_tests.rs`, `app/src/components/settings/panels/BrowserConnectionsPanel.test.tsx` | ✅ | A finished task's plan (for the same goal and facts) and the elements it found are kept per site in the workspace and handed to the next task there. Fact values, page text, rescued runs' plans and reused plans that fail are not kept; entries expire after 30 days unused. The learning switch and "forget learned sites" live in Browser settings. |
++| 7.1.5 | Unattended browser actions | RU | `crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs`, `crates/openhuman-core/src/config/schema/tools/browser_tests.rs`, `crates/openhuman-core/src/config/schema/load_env_overlay_context_tests.rs`, `crates/openhuman-core/src/security/approval/gate_forced_tests.rs` | 🟡 | `[browser] unattended_actions` lets Cron/Background/approval-free Workflow turns take listed gated actions (and `task_step`) without the forced gate; WebChat, channels, CLI, Unknown and `require_approval` workflows stay gated. RU drives `BrowserTool::execute` under a CoreContext-scoped turn origin for every origin; allowed actions log kind + digest only, unknown names are counted, not echoed. No E2E: the action needs the native TinyComputer module and Chromium, which the test lanes do not carry and must not download. |
### 7.2 Network
diff --cc docs/gitbooks/en/SUMMARY.md
index 0000000000,7d0311fe27..9057603478
mode 000000,100644..100644
--- a/docs/gitbooks/en/SUMMARY.md
+++ b/docs/gitbooks/en/SUMMARY.md
@@@ -1,0 -1,105 +1,106 @@@
+ # Table of contents
+
+ ## Overview
+
+ - [Welcome to OpenHuman](README.md)
+ - [Getting Started](overview/getting-started.md)
+ - [Roadmap](overview/roadmap.md)
+ - [Auto-update](overview/auto-update.md)
+ - [Troubleshooting Sign-In](overview/troubleshooting-sign-in.md)
+
+ ## Guides
+
+ - [Guides](guides/README.md)
+ - [Create my personal AI assistant](guides/personal-assistant.md)
+ - [Use OpenHuman with a local model](guides/local-model.md)
+ - [Use multiple local LLM servers](guides/multiple-local-llm-servers.md)
+ - [Keep sensitive data private](guides/privacy-sensitive-data.md)
+ - [Recover from a failed installation](guides/recover-failed-installation.md)
+ - [Move OpenHuman to a new PC](guides/move-to-new-pc.md)
+ - [Organize my project folders](guides/organize-project-folders.md)
+ - [Create a doctor-specific assistant](guides/doctor-assistant.md)
+ - [Create a safe companion for a child](guides/child-safe-companion.md)
+
+ ## Features
+
+ - [Chat](features/chat.md)
+ - [Memory](features/memory.md)
+ - [Connections](features/connections.md)
+ - [Settings](features/settings.md)
+ - [The Mascot](features/mascot/README.md)
+ - [Third-party Integrations](features/integrations/README.md)
+ - [Triggers](features/integrations/triggers.md)
+ - [MCP Servers & Skills](features/integrations/mcp-and-skills.md)
+ - [The Orchestrator](features/orchestration.md)
+ - [Workflows](features/workflows.md)
+ - [Messaging Channels](features/channels.md)
+ - [Goals & Todos](features/goals-and-todos.md)
+ - [Personalization & Self-Learning](features/personalization.md)
+ - [Themes & Theme Studio](features/theming.md)
+ - [Smart Token Compression](features/token-compression.md)
+ - [Automatic Model Routing](features/model-routing/README.md)
+ - [Local models & bring your own key](features/model-routing/local-and-byok-models.md)
+ - [Local AI (optional)](features/model-routing/local-ai.md)
+ - [Native Tools](features/native-tools/README.md)
+ - [Web Search](features/native-tools/web-search.md)
+ - [Web Scraper](features/native-tools/web-scraper.md)
+ - [Coder](features/native-tools/coder.md)
+ - [Documents](features/native-tools/documents.md)
+ - [Image Tools](features/native-tools/image-tools.md)
+ - [Image & Video Generation](features/native-tools/media-generation.md)
+ - [Browser & Computer Control](features/native-tools/browser-and-computer.md)
+ - [Cron & Scheduling](features/native-tools/cron.md)
+ - [Voice](features/native-tools/voice.md)
+ - [Memory Tools](features/native-tools/memory-tools.md)
+ - [Third-party Integrations](features/native-tools/integrations.md)
+ - [Agent Coordination](features/native-tools/agent-coordination.md)
+ - [System & Utilities](features/native-tools/system-and-utilities.md)
+ - [Notifications & Activity](features/notifications-and-activity.md)
+ - [Wallet](features/wallet.md)
+ - [Hosting](features/hosting.md)
+ - [Billing, Cost & Usage](features/billing-and-usage.md)
+ - [iOS Companion](features/ios-companion.md)
+ - [Approval Gate](features/approval-gate.md)
+ - [Privacy & Security](features/privacy-and-security.md)
+ - [Privacy Mode](features/privacy-mode.md)
+ - [OS Keyring & Secret Storage](features/os-keyring-and-secret-storage.md)
+ - [Platform & Availability](features/platform.md)
+ - [Cloud Deploy](features/cloud-deploy.md)
+
+ ## Developing
+
+ - [Overview](developing/README.md)
+ - [Rust Quickstart](developing/quickstart.md)
+ - [Getting Set Up](developing/getting-set-up.md)
+ - [Architecture](developing/architecture/README.md)
+ - [Deep Architecture Reference](developing/architecture.md)
+ - [Agent Harness](developing/architecture/agent-harness.md)
+ - [Flows on TinyAgents](developing/architecture/flows-on-tinyagents.md)
+ - [Memory](developing/architecture/memory.md)
+ - [MCP Registry](developing/architecture/mcp-registry.md)
+ - [Security](developing/architecture/security.md)
+ - [Frontend](developing/architecture/frontend.md)
+ - [Tauri Shell](developing/architecture/tauri-shell.md)
+ - [Building the Rust Core](developing/building-rust-core.md)
+ - [Loadable modules](developing/loadable-modules.md)
+ - [Performance and footprint](developing/performance.md)
+ - [Pluggable engines](developing/engines.md)
+ - [Jev](developing/jev.md)
+ - [Embedding OpenHuman](developing/embedding.md)
+ - [One TinyHumans API key](developing/tinyhumans-api-key.md)
+ - [Hooks](developing/hooks.md)
+ - [MCP Server](developing/mcp-server.md)
+ - [Claude Code CLI provider](developing/providers/claude-code.md)
++- [TinyComputer browser on Linux and Docker](developing/tinycomputer-docker.md)
+ - [Theming (Token System)](developing/theming.md)
+ - [Testing Strategy](developing/testing-strategy.md)
+ - [E2E Testing](developing/e2e-testing.md)
+ - [Agent Observability](developing/agent-observability.md)
+ - [Release Policy](developing/release-policy.md)
+ - [AgentBox marketplace deployment (historical)](developing/agentbox-deployment.md)
+ - [Chromium Embedded Framework (historical)](developing/cef.md)
+
+ ## Legal
+
+ - [Terms & Conditions](legal/terms-of-use.md)
+ - [Privacy Policy](legal/privacy-policy.md)
diff --cc docs/gitbooks/en/developing/tinycomputer-docker.md
index 0000000000,0000000000..fb3f39d974
new file mode 100644
--- /dev/null
+++ b/docs/gitbooks/en/developing/tinycomputer-docker.md
@@@ -1,0 -1,0 +1,173 @@@
++---
++description: Run the TinyComputer browser headless in a Linux container, with a locally built module and unattended automation.
++---
++
++# TinyComputer browser on Linux and Docker
++
++The `browser` tool drives Chromium through the TinyComputer module
++(`libtinycomputer.so`). The compiled module registry pins TinyComputer
++releases only for the platforms they are published for. When none is pinned
++for your Linux host, or you need the module built from the exact
++`vendor/tinycomputer` gitlink your core was built from, build it yourself and
++point the core at it with a module override.
++
++This page covers the container recipe, the loader's directory rules, the
++browser settings a headless research agent needs, and how to let cron-driven
++turns click and type without an interactive approval.
++
++{% hint style="warning" %}
++A local build is the operator's own artifact. Never copy its SHA-256 into
++`crates/openhuman-core/src/modules/registry/` as a release pin: pins come
++only from a published release.
++{% endhint %}
++
++## 1. Build the module in a builder stage
++
++`vendor/tinycomputer/scripts/build-module` does everything the loader needs.
++It runs `cargo build --locked --release -p tinycomputer --lib` and installs
++`libtinycomputer.so` into `TINYCOMPUTER_MODULE_DIR` (mode `644`, directory
++`755`). It writes a `modules.toml` beside the library naming its SHA-256, then
++walks every parent directory and fails early if the loader would refuse one.
++
++Initialize the nested submodules first (`git submodule update --init
++--recursive vendor/tinycomputer`). TinyComputer vendors its own TinyBus,
++agent-browser and agent-desktop. Build from the same checkout as the core:
++the host refuses a module whose TinyComputer contract version is incompatible
++with its own.
++
++```dockerfile
++# Builds libtinycomputer.so from the gitlink this checkout records.
++FROM rust:1.96.1-bookworm AS tinycomputer
++RUN apt-get update && apt-get install -y --no-install-recommends \
++ build-essential pkg-config ca-certificates \
++ libasound2-dev libxdo-dev libxtst-dev libx11-dev \
++ && rm -rf /var/lib/apt/lists/*
++WORKDIR /src/tinycomputer
++COPY vendor/tinycomputer/ ./
++# Root-owned, 755 all the way up: what the loader accepts.
++ENV TINYCOMPUTER_MODULE_DIR=/opt/tinycomputer
++RUN scripts/build-module
++```
++
++Then add it to the runtime stage of the repository `Dockerfile` (which
++already carries the `libasound2`, `libxdo3`, `libxtst6` and `libx11-6`
++runtime libraries the module links), together with Chromium:
++
++```dockerfile
++RUN apt-get update && apt-get install -y --no-install-recommends \
++ chromium fonts-liberation \
++ && rm -rf /var/lib/apt/lists/*
++# Copy the library and its modules.toml attestation together.
++COPY --from=tinycomputer /opt/tinycomputer/ /opt/tinycomputer/
++RUN chown -R root:root /opt/tinycomputer \
++ && chmod 755 /opt/tinycomputer \
++ && chmod 644 /opt/tinycomputer/libtinycomputer.so /opt/tinycomputer/modules.toml
++```
++
++### What the loader checks
++
++The TinyBus loader (`vendor/tinybus/crates/tinybus/src/module/host.rs`)
++refuses the artifact unless all of these hold:
++
++- **Every directory from `/` down to the module's own** is owned by root or
++ by the user the core runs as (uid `10001` in the image). None may be group-
++ or world-writable unless it carries the sticky bit. A symlinked path
++ component is refused, and the library itself is opened with `O_NOFOLLOW`.
++ Do not put the module on a bind mount or named volume: those are usually
++ owned by another user or writable by a group.
++- **The file** is a regular `.so` under 512 MiB.
++- **`modules.toml` beside it**, when present, names the library's exact
++ SHA-256. A mismatch is a refusal, so a rebuilt library needs the
++ `modules.toml` that `build-module` regenerated. Keep the two together.
++ Without that attestation the module still loads but is not an attested
++ recipient, so confidential calls such as `StartTask` (the `task` action) are
++ not delivered to it.
++
++A refused or faulted module stays refused until the core restarts.
++
++## 2. Load it with a module override
++
++```toml
++[modules]
++overrides = [{ id = "tinycomputer", path = "/opt/tinycomputer/libtinycomputer.so" }]
++```
++
++`id` is the registry id (`tinycomputer`) and `path` an absolute path to the
++library. An override is checked before the search path and the release
++cache, and bypasses the compiled release digest, which is why only the
++operator's own config can name one (`config/schema/modules.rs`,
++`modules::ops::local_override`). `[modules] enabled` must stay `true` (the
++default).
++
++## 3. Browser settings for a headless research agent
++
++```toml
++[browser]
++enabled = true
++headless = true
++chrome_path = "/usr/bin/chromium"
++# Keep cookies and logins across sessions and restarts.
++profile_mode = "persistent"
++profile_path = "/home/openhuman/.openhuman/browser-profile"
++download_dir = "/home/openhuman/.openhuman/browser-downloads"
++# Opt-in: see "Unattended actions" below.
++unattended_actions = ["click", "press"]
++
++[http_request]
++# The browser shares this list; "*" is stripped for the browser.
++allowed_domains = ["example.com", "docs.example.org"]
++```
++
++- `chrome_path` is passed to the module as the browser executable. Debian's
++ `chromium` package installs `/usr/bin/chromium`.
++- `profile_mode = "persistent"` requires an **absolute** `profile_path`, and
++ `download_dir` must be absolute too. The session is refused otherwise. Put
++ both under the workspace volume (`/home/openhuman/.openhuman` in the
++ image), which the entrypoint chowns to the core's user, so they survive
++ container restarts.
++- Navigation obeys `[http_request].allowed_domains`. An empty list refuses
++ every session. To let the browser go anywhere, set
++ `OPENHUMAN_BROWSER_ALLOW_ALL=1` in the container environment instead of
++ adding `"*"`.
++- agent-browser adds `--no-sandbox` and `--disable-dev-shm-usage` by itself
++ when it detects a container, a root user or a small `/dev/shm`.
++
++## 4. Unattended actions
++
++By default, every click, double-click, fill, type, key press, select and
++check goes through the forced host approval gate. So does a browser task
++paused at `needs_approval`. The forced gate parks only for a live WebChat
++turn and denies everything else, so without the setting below a cron job can
++open and read pages but never follow a "next page" link.
++
++`[browser] unattended_actions` names the action kinds a **trusted unattended
++turn** may take without that approval:
++
++| Name | Covers |
++| ----------------------- | ----------------------------------------------------------------------------------------------------------- |
++| `click`, `double_click` | Clicking an element, including `find` with `find_action = "click"` |
++| `fill`, `type` | Writing text into a field |
++| `press` | A key press such as `Enter` |
++| `select`, `check` | Choosing an option, ticking a box |
++| `task_step` | A browser `task` paused at `needs_approval` before an irreversible step, approved through `confirm_pending` |
++
++- The tool reads the turn origin from the per-turn `CoreContext` that the
++ cron, background-job and workflow entry points scope around their turn.
++- **Only** turns whose origin is `TrustedAutomation` with source `Cron`,
++ `Background`, or `Workflow { require_approval: false }` qualify.
++- WebChat, external channels (Telegram, Slack, …), CLI and direct chat,
++ unlabelled turns, and workflows with `require_approval = true` keep the
++ forced gate exactly as before, even for a listed action.
++- The default is an empty list, which changes nothing.
++- An unknown name allows nothing. At load the core logs a warning with the
++ number of unknown entries (never their text) and the list of known names.
++- Each allowed action is logged at `info` with the action kind, the first 12
++ hex characters of its digest and the origin class. Selectors, typed values,
++ page content and the job id are never logged. Grep for
++ `[browser] unattended action allowed`.
++- Payment checkpoints are not `needs_approval` pauses. A task still stops
++ there whatever this list says.
++
++`task_step` waves through steps the task controller itself marks
++irreversible, such as sending, submitting or deleting. List it only for jobs
++whose prompt and allowed websites you control.
diff --cc docs/gitbooks/en/features/approval-gate.md
index 0000000000,61537d3a56..c4a939d909
mode 000000,100644..100644
--- a/docs/gitbooks/en/features/approval-gate.md
+++ b/docs/gitbooks/en/features/approval-gate.md
@@@ -1,0 -1,158 +1,160 @@@
+ ---
+ description: >-
+ The agent asks before it does anything risky. When the autonomy policy is
+ on, risky actions wait for your approval and are denied if you don't answer.
+ icon: shield-check
+ ---
+
+ # Approval gate
+
+ The approval gate sits between the agent and the outside world. When the agent wants to do something your autonomy tier says needs a check, the gate stops the call, shows you what is about to happen, and waits for your decision. Actions your tier already allows run without a prompt. On the `full` tier, for example, a write is never prompted.
+
+ {% hint style="warning" %}
+ The autonomy policy is off by default, and the gate is part of it. With `[autonomy] enabled = false`, command classification, the tier table, the allowlist, the hourly action budget, `workspace_only` and `forbidden_paths` do nothing, and acting tool calls run without a prompt. The exceptions are the forced approvals below.
+
+ This is deliberate. Agents are expected to run inside a container, a platform jail or a Docker sandbox that already provides isolation, and a shell that refuses ordinary shell syntax is not a usable shell. To turn the policy on, set `[autonomy] enabled = true` in `config.toml`.
+ {% endhint %}
+
+ ## What still holds with the policy off
+
+ Three protections do not depend on `[autonomy] enabled`:
+
+ - Credential stores and system roots stay unreachable. `~/.ssh`, `~/.gnupg`, `~/.aws` and system roots are always refused, as are `..` traversal and null bytes in a path.
+ - Hard blocks inside the tools themselves, including the tool-policy middleware, always run.
+ - Sandboxing is separate. The platform jail and the Docker backend are chosen by `[runtime]` and the session's origin, not by the autonomy tier. See [Privacy and security](privacy-and-security.md).
+
+ Everything below describes the policy with `[autonomy] enabled = true`.
+
+ ## What triggers a prompt
+
+ The agent classifies every acting tool call into a command class. Your autonomy tier then decides whether that class runs, prompts or is blocked.
+
+ | Command class | What it covers |
+ | ------------- | ----------------------------------------------------------------- |
+ | Read | Provably read-only or observational (a curated allowlist) |
+ | Write | Changes state. This is the default for anything unrecognized |
+ | Network | Reaches the network (curl, wget, ssh, scp, and so on) |
+ | Install | Installs an OS or global language package |
+ | Destructive | Catastrophic, irreversible or privilege-escalating |
+
+ You pick the tier in **Settings > Permissions** (`[autonomy].level`):
+
+ | Tier | Read | Write | Network, Install, Destructive |
+ | ---------------------------------------------- | ----- | ------ | ----------------------------- |
+ | `readonly` | Allow | Block | Block |
+ | `supervised` (default when the policy is on) | Allow | Prompt | Prompt |
+ | `full` | Allow | Allow | Prompt |
+
+ A call that lands on Prompt waits at the gate. A call that lands on Block is refused, and no approval can override it.
+
+ Classification fails closed. A command that is not provably read-only counts as at least a write. In a piped command the highest class wins, so `ls | curl ...` is Network. A quoted heredoc body (`<< 'EOF' ... EOF`) is treated as data and not scanned. An unquoted one (`<< EOF`) is expanded and scanned.
+
+ ## How a request flows
+
+ ```text
+ agent wants to act
+ │
+ ▼
+ classify command ──► Block ──► refused
+ │
+ Prompt
+ │
+ ▼
+ on "Always allow" list? ──► yes ──► run immediately
+ │ no
+ ▼
+ park call · persist pending row · emit approval_request
+ │
+ ▼
+ ┌──────────────┬───────────────┬────────────┐
+ ▼ ▼ ▼ ▼
+ Approve Always allow Deny 10-min TTL
+ (once) (+ allowlist) │
+ │ │ │ ▼
+ ▼ ▼ ▼ Deny
+ run run refused (fail closed)
+ ```
+
+ A parked call shows an approval card above the chat composer. The card has the tool name, a one-line summary of the action and the redacted command. You have three choices:
+
+ - **Approve** runs this one call.
+ - **Always allow** runs it and adds the tool to your `auto_approve` list, so it skips the prompt next time.
+ - **Deny** refuses the call.
+
+ You can also type "yes" or "no" in chat, and the reply goes to the parked request.
+
+ ## Always allow
+
+ Choosing **Always allow** saves the tool name to `[autonomy].auto_approve` and reloads the policy. The gate then lets that tool through on later turns. To be prompted again, remove the entry in **Settings > Agent access**.
+
+ The default list is `file_read`, `memory_search`, `memory_list`, `get_time`, `list_dir`, `glob` and `grep`. Four of those names no longer match a registered tool. Memory is now one tool called `memory`, the clock is `current_time`, and directory listing is `list`. So only `file_read`, `glob` and `grep` have any effect.
+
+ ## auto_approve_all
+
+ `[autonomy].auto_approve_all` approves every call without asking. Before you enable it, know three things:
+
+ - A call from an unlabelled call site is still denied, and the hard blocks inside the tools still apply.
+ - It skips parking, not just the prompt. A triage dispatch from a connector or webhook payload normally parks and writes an audit row. With this flag it runs at once and writes no audit row, so those dispatches leave no approval trail.
+ - It does not override a forced approval.
+
+ ## Forced approvals
+
+ Browser page interactions cannot be pre-authorized. Every `click`, `double_click`, `fill`, `type`, `press`, `select` and `check` goes through a forced approval, which works differently:
+
+ - Every shortcut is skipped. `auto_approve_all`, the `auto_approve` list and per-flow tool trust are ignored. The call parks even with `[autonomy] enabled = false`.
+ - The decision is one-time. **Always allow** is refused, so you can only approve once or deny.
+ - It needs a live chat. A turn that is not a web-chat turn is denied instead of parked, so a cron job, channel message or flow cannot drive your browser.
+
+ The card names the action, the page origin and a SHA-256 digest that ties the action to that URL. If the page navigates while you decide, the approved action is refused and not replayed on the new page.
+
+ ## Fail-closed behavior
+
+ Every path that is not an approval ends in a denial:
+
+ - A parked request lives for 10 minutes. If you have not decided by then, it is denied.
+ - If saving the request fails or the channel drops, the call is denied.
+ - On timeout the gate re-reads the stored decision first, so an approval that landed at the last moment still wins.
+
+ Pending requests are stored in SQLite (`{workspace_dir}/approval/approval.db`) and survive a core restart. After an approved tool finishes, the gate records the outcome (success or error) as an audit trail. Error text is sanitized and capped. Everything stored or broadcast is redacted first: personal data and chat content are scrubbed and home paths are stripped.
+
+ ## What the turn's origin decides
+
+ The gate is interactive, so a parked call needs a surface that can answer it. The turn's origin decides what gets parked and what passes straight through:
+
+ | Turn origin | At the gate |
+ | --- | --- |
+ | Cron and internal background jobs | Allowed, no row, no event |
+ | A saved flow's pre-declared action | Allowed, no row, no event |
+ | CLI, a delegated sub-agent, and a triage dispatch started on your own machine | Allowed, no row, no event |
+ | Web chat | Parks for your decision |
+ | A triage dispatch from a connector or webhook payload | Parks and writes a pending-approval row |
+ | An external channel turn (Telegram, Slack and so on) | Parks and writes a row |
+ | An unlabelled call site | Denied |
+
+ A triage dispatch that your own machine started keeps the authority its caller already had. One steered by an outside payload parks and leaves an audit row. No surface can decide a background park yet, so it expires at the timeout. You get the audit trail, not a working escalation, and `auto_approve_all` gives up even that.
+
++The browser's consequential actions (click, fill, type, key press, select, check, and a task's `needs_approval` step) are the exception. They use the **forced** gate, which ignores auto-approval and denies every turn that is not a routable WebChat chat, cron included. An operator opts specific action kinds back in for cron, background and approval-free workflow turns with `[browser] unattended_actions`. See [TinyComputer browser on Linux and Docker](../developing/tinycomputer-docker.md#4-unattended-actions).
++
+ An external channel turn parks because remote input is untrusted. The row is written, and you can still decide on the thread card before the timeout.
+
+ ## Configuration and RPC
+
+ - `[autonomy].enabled` is the master switch for the policy. It is `false` by default. Forced approvals and the always-forbidden floor work without it.
+ - `OPENHUMAN_APPROVAL_GATE` set to `0` or `false` skips installing the gate even with the policy on. With no gate, Prompt-class calls run unprompted.
+ - `[autonomy].level` and `[autonomy].auto_approve` set the tier and the allowlist. Change them with the `config.update_autonomy_settings` RPC or in the settings panels.
+
+ The `approval` controller exposes three JSON-RPC methods:
+
+ | Method | Purpose |
+ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
+ | `openhuman.approval_list_pending` | The live queue of parked requests. |
+ | `openhuman.approval_list_recent_decisions` | Decided and executed audit rows (`limit` 1 to 500, default 50), shown in **Settings > Approval history**. |
+ | `openhuman.approval_decide` | Applies a decision (`approve_once`, `approve_always_for_tool` or `deny`). |
+
+ The two list methods return an empty list, not an error, when no gate is installed. `decide` returns an error when the gate is absent or the request is unknown or already decided.
+
+ ## See also
+
+ - [Privacy and security](privacy-and-security.md): what leaves the machine, and the layers underneath this one.
+ - [Security architecture](../developing/architecture/security.md): command classification and policy internals.
+ - [Agent access settings](settings.md): where the tier, the trusted roots and the allowlist are edited.
diff --cc docs/gitbooks/en/features/native-tools/browser-and-computer.md
index 0000000000,4f0077d87f..7f9f578fcc
mode 000000,100644..100644
--- a/docs/gitbooks/en/features/native-tools/browser-and-computer.md
+++ b/docs/gitbooks/en/features/native-tools/browser-and-computer.md
@@@ -1,0 -1,103 +1,105 @@@
+ ---
+ description: >-
+ Read and drive a real browser and a real desktop: accessibility snapshots,
+ element references, bounded tasks that stop at a payment page, and a small
+ decision model that picks each step.
+ icon: display
+ ---
+
+ # Browser and computer control
+
+ When the agent needs to use a computer the way a person would, by opening a page, reading the screen, clicking a button or typing a phrase, these tools do it. Desktop and browser control both come from one loadable module, TinyComputer. It downloads on first use.
+
+ ## Two surfaces, one model
+
+ Desktop and browser produce the same kind of "screen": a compact list of things a person could interact with. Each item has a role, a name, a value, its states, the actions it supports, and the labels of the boxes it sits in. The list is capped at 254 controls. Both surfaces offer the same short list of actions (click, type, check, uncheck, expand, collapse, scroll, wait, press), so the agent learns one vocabulary.
+
+ Elements are addressed by reference, never by coordinates or CSS selectors. A desktop reference like `@s8f3k2p9:e1` is tied to the snapshot that produced it. Acting on it either reaches the element that was described or fails with a stale-reference error telling the agent to look again. It never clicks whatever has moved into that spot since. Browser references survive a redraw, because they are marks that last as long as the element is on the page.
+
+ ## Browser
+
+ The browser is a real Chrome or Chromium, driven over the Chrome DevTools Protocol by a library built into the module. Chrome runs as its own process, but nothing sits between it and the module: no driver binary, no local HTTP bridge and no second OpenHuman process.
+
+ - **Open** a session. You can launch a fresh browser (headless or headed) or attach to the Chrome you already have running. Attaching matters because many sites turn away a fresh automated browser but serve a person's own. When a task ends, an attached browser is only disconnected, never closed.
+ - **Snapshot** the page. The default mode, `sight`, runs a small in-page script that reads the page the way a person sees it: real links, buttons and fields, plus anything with a pointer cursor, a click handler or a tab stop. It drops hidden, zero-size, transparent and disabled items. It marks items below the fold as offscreen and items behind a dialog as covered. It falls back to the accessibility tree when it can't read a page, and `perception: "tree"` forces the tree.
+ - **Act**: click (optionally into a new tab), fill, type, press, select, check, hover, scroll, wait, read and go back.
+ - **Read** the page as text, Markdown or serialized DOM, and **evaluate** JavaScript.
+ - **Downloads**: list the browser's download events and wait for a completed file. A page snapshot alone doesn't prove a file finished.
+
+ Screenshots are never returned inline. A reply carries a handle that the agent reads in chunks and releases when done.
+
++Clicks, typing, key presses and other consequential actions ask for your approval in the chat first. A scheduled job has nobody to ask, so by default it can only open and read pages. An operator can let cron, background and approval-free workflow turns take specific actions with `[browser] unattended_actions`. See [TinyComputer browser on Linux and Docker](../../developing/tinycomputer-docker.md#4-unattended-actions).
++
+ Sessions are bounded. The module allows up to 8 at once. OpenHuman keeps at most 6 per conversation thread with a 30-minute idle timeout, so a long chat reuses one browser and doesn't open a new one every turn. A session can be restricted to a set of origins.
+
+ ## Desktop
+
+ Desktop control reads the operating system's accessibility tree, the same interface a screen reader uses. It covers running apps, windows, displays, Notification Center entries, the clipboard and screenshots.
+
+ Actions go through the accessibility API and not through synthesized input. By default they don't steal focus, move your cursor or touch the clipboard, so a run can continue while you use the machine. A headed mode and real mouse and key events exist for apps that need them, but they are the exception.
+
+ For dense apps, a skeleton snapshot stops at three levels and returns structure without leaf detail. That is the difference between tens of thousands of tokens and a few hundred.
+
+ ## Tasks
+
+ Above these basics sits a bounded task loop. You describe the outcome, the module plans the steps, and a small decision model ([Jev](../../developing/jev.md)) picks every click. A task starts and returns at once with a status, which the agent polls and answers:
+
+ | Status | What it means |
+ | ------------------------------- | ----------------------------------------------------------------- |
+ | `running` | Working. |
+ | `needs_input` | A field it can't fill without you. |
+ | `needs_approval` | An irreversible step. Only an explicit approval releases it. |
+ | `needs_human` | A captcha, OTP, 2FA or login. No model can get past it. |
+ | `needs_plan` | Plain language with no planner configured. |
+ | `checkpoint` | Stopped on purpose, with the page left open. |
+ | `done`, `failed`, `cancelled` | Final states. |
+
+ Two rules hold for every task:
+
+ - **Reaching a payment page always stops the task.** It becomes a checkpoint that can't be continued, with the page left open for a person. The agent does not pay.
+ - **Secret values never reach a model.** Facts you mark secret are shared as `${name}` templates. The planner, the decision model and the rescue model see only the name, and the value is typed locally into the field.
+
+ Page and screen text is treated as data, never as instructions. The safety rules are plain code, not model judgment.
+
+ ## Agent tools
+
+ | Tool | What it does |
+ | --- | --- |
+ | `browser` | Everything above through one `action` argument: `open`, `snapshot`, `read_page`, `click`, `fill`, `type`, `get_text`, `get_title`, `get_url`, `wait`, `press`, `hover`, `scroll`, `is_visible`, `find`, `task`, `task_continue`, `task_cancel`, `confirm_pending`, `list_downloads`, `wait_download`, `close`. |
+ | `browser_open` | Opens a URL and returns a session. |
+ | `desktop_list_apps`, `desktop_list_windows` | What is running and where. |
+ | `desktop_launch` | Starts an app. |
+ | `desktop_snapshot`, `desktop_find` | Reads the screen, or looks for one thing on it. |
+ | `desktop_goal`, `desktop_continue_goal` | Runs a desktop task and answers its stops. |
+
+ Irreversible steps go through OpenHuman's [approval gate](../approval-gate.md), tied to a digest of the exact action and URL. If no approval gate is installed, the action is denied.
+
+ ## Platform support
+
+ | Platform | Desktop | Browser |
+ | --- | --- | --- |
+ | macOS | Yes. Needs Accessibility permission, plus Screen Recording for screenshots and Automation for the Notification Center opener. | Yes |
+ | Windows | Yes | Yes |
+ | Linux | No | No |
+
+ A permission check runs before the first read. An accessibility API called by an unauthorized process usually returns an empty tree, not an error, and that looks the same as an app with no buttons. A missing permission produces a named refusal that says which setting to change.
+
+ Linux is not supported. The module registry publishes no Linux build, so neither desktop control nor browser automation is available there, even though the browser engine itself would run.
+
+ ## Settings
+
+ **Connections > Computer Control** holds all of it: the module's status and contract version, the decision model (Jev, OpenJEV or Levanto Sage) and which route it bills through, the planner and rescue models, and the browser section (executable path, perception mode and allowed domains).
+
+ `[desktop] approvals_enabled` defaults to `false`. It governs one narrow thing: the module's own confirmation stop in the middle of a desktop goal. When it is off, the core continues automatically after the module re-observes and re-validates the exact target. When it is `true`, that stop shows as an approval card. It does not weaken the [approval gate](../approval-gate.md). An irreversible step still needs approval, and with no gate installed it is denied. Desktop goal confirmations are single-use and expire after 10 minutes.
+
+ ## What it is good for
+
+ - Driving sites that have no API and no [native integration](../integrations/README.md).
+ - Multi-step UI flows where each snapshot shows the next element to act on.
+ - Automating a local app from inside a chat.
+
+ ## See also
+
+ - [Web scraper](web-scraper.md): when you only need the article, not the whole page.
+ - [Jev](../../developing/jev.md): the decision model that picks each step.
+ - [Approval gate](../approval-gate.md): what gets parked, and what happens with no gate installed.
diff --cc gitbooks/SUMMARY.md
index 5db1cda183,7d0311fe27..9057603478
--- a/gitbooks/SUMMARY.md
+++ b/gitbooks/SUMMARY.md
@@@ -70,26 -88,16 +88,17 @@@
- [Jev](developing/jev.md)
- [Embedding OpenHuman](developing/embedding.md)
- [One TinyHumans API key](developing/tinyhumans-api-key.md)
+ - [Hooks](developing/hooks.md)
+ - [MCP Server](developing/mcp-server.md)
+ - [Claude Code CLI provider](developing/providers/claude-code.md)
++- [TinyComputer browser on Linux and Docker](developing/tinycomputer-docker.md)
+ - [Theming (Token System)](developing/theming.md)
- [Testing Strategy](developing/testing-strategy.md)
- [E2E Testing](developing/e2e-testing.md)
+ - [Agent Observability](developing/agent-observability.md)
- [Release Policy](developing/release-policy.md)
+ - [AgentBox marketplace deployment (historical)](developing/agentbox-deployment.md)
- [Chromium Embedded Framework (historical)](developing/cef.md)
- - [Theming (Token System)](developing/theming.md)
- - [Agent Observability](developing/agent-observability.md)
- - [Hooks](developing/hooks.md)
- - [MCP Server](developing/mcp-server.md)
- - [Claude Code CLI Provider](developing/providers/claude-code.md)
- - [AgentBox Deployment](developing/agentbox-deployment.md)
- - [TinyComputer browser on Linux and Docker](developing/tinycomputer-docker.md)
- - [Architecture](developing/architecture/README.md)
- - [Deep Architecture Reference](developing/architecture.md)
- - [Agent Harness](developing/architecture/agent-harness.md)
- - [Flows on TinyAgents (crates/openhuman-core/src/flows/)](developing/architecture/flows-on-tinyagents.md)
- - [Memory (crates/openhuman-core/src/memory/)](developing/architecture/memory.md)
- - [MCP Registry (crates/openhuman-core/src/mcp/registry/)](developing/architecture/mcp-registry.md)
- - [Security (crates/openhuman-core/src/security/)](developing/architecture/security.md)
- - [Frontend (app/src/)](developing/architecture/frontend.md)
- - [Tauri Shell (crates/openhuman-app/)](developing/architecture/tauri-shell.md)
## Legal
diff --cc gitbooks/features/approval-gate.md
index 3a76f25b1b,61537d3a56..c4a939d909
--- a/gitbooks/features/approval-gate.md
+++ b/gitbooks/features/approval-gate.md
@@@ -81,28 -109,37 +109,39 @@@ The card names the action, the page ori
## Fail-closed behavior
- Every non-approve path resolves to **Deny**:
+ Every path that is not an approval ends in a denial:
- - **Timeout**: a parked request lives for 10 minutes; if undecided it is transitioned to a terminal `deny`.
- - **Persist failure** or a dropped channel: denied.
- - The timeout path re-reads the stored decision first, so an approval that committed in the race still wins.
+ - A parked request lives for 10 minutes. If you have not decided by then, it is denied.
+ - If saving the request fails or the channel drops, the call is denied.
+ - On timeout the gate re-reads the stored decision first, so an approval that landed at the last moment still wins.
- Pending requests are stored in SQLite (`{workspace_dir}/approval/approval.db`) and **survive a core restart**. After an approved tool finishes, the gate records a write-once execution outcome (success / error, error text sanitized and capped) as a durable audit trail. Everything persisted or broadcast is redacted first: PII and chat content are scrubbed and home paths stripped.
+ Pending requests are stored in SQLite (`{workspace_dir}/approval/approval.db`) and survive a core restart. After an approved tool finishes, the gate records the outcome (success or error) as an audit trail. Error text is sanitized and capped. Everything stored or broadcast is redacted first: personal data and chat content are scrubbed and home paths are stripped.
- ---
+ ## What the turn's origin decides
+
+ The gate is interactive, so a parked call needs a surface that can answer it. The turn's origin decides what gets parked and what passes straight through:
- ## Background and cron bypass
+ | Turn origin | At the gate |
+ | --- | --- |
+ | Cron and internal background jobs | Allowed, no row, no event |
+ | A saved flow's pre-declared action | Allowed, no row, no event |
+ | CLI, a delegated sub-agent, and a triage dispatch started on your own machine | Allowed, no row, no event |
+ | Web chat | Parks for your decision |
+ | A triage dispatch from a connector or webhook payload | Parks and writes a pending-approval row |
+ | An external channel turn (Telegram, Slack and so on) | Parks and writes a row |
+ | An unlabelled call site | Denied |
- The gate is **interactive-only**. Background, triage, and cron turns carry no chat context, so there's nobody to answer a prompt. These turns are pre-authorized and pass straight through (no row, no event). Approval is only enforced for live chat turns.
+ A triage dispatch that your own machine started keeps the authority its caller already had. One steered by an outside payload parks and leaves an audit row. No surface can decide a background park yet, so it expires at the timeout. You get the audit trail, not a working escalation, and `auto_approve_all` gives up even that.
+The browser's consequential actions (click, fill, type, key press, select, check, and a task's `needs_approval` step) are the exception. They use the **forced** gate, which ignores auto-approval and denies every turn that is not a routable WebChat chat, cron included. An operator opts specific action kinds back in for cron, background and approval-free workflow turns with `[browser] unattended_actions`. See [TinyComputer browser on Linux and Docker](../developing/tinycomputer-docker.md#4-unattended-actions).
+
- ---
+ An external channel turn parks because remote input is untrusted. The row is written, and you can still decide on the thread card before the timeout.
- ## Configuration & RPC
+ ## Configuration and RPC
- - **`OPENHUMAN_APPROVAL_GATE`**: set to `0` / `false` to skip installing the gate entirely. With no gate, `Prompt`-class calls run unprompted. On by default.
- - **`[autonomy].level`** and **`[autonomy].auto_approve`**: tier and allowlist, via the `config.update_autonomy_settings` RPC or Settings → Agent access.
+ - `[autonomy].enabled` is the master switch for the policy. It is `false` by default. Forced approvals and the always-forbidden floor work without it.
+ - `OPENHUMAN_APPROVAL_GATE` set to `0` or `false` skips installing the gate even with the policy on. With no gate, Prompt-class calls run unprompted.
+ - `[autonomy].level` and `[autonomy].auto_approve` set the tier and the allowlist. Change them with the `config.update_autonomy_settings` RPC or in the settings panels.
The `approval` controller exposes three JSON-RPC methods:
diff --cc gitbooks/features/native-tools/browser-and-computer.md
index dd5da9fb62,4f0077d87f..7f9f578fcc
--- a/gitbooks/features/native-tools/browser-and-computer.md
+++ b/gitbooks/features/native-tools/browser-and-computer.md
@@@ -9,24 -18,83 +18,85 @@@ Elements are addressed by reference, ne
## Browser
- - **Open** a URL in an embedded webview the agent can read back from.
- - **Snapshot** the current page's accessibility/DOM structure, including stable element references for later actions.
+ The browser is a real Chrome or Chromium, driven over the Chrome DevTools Protocol by a library built into the module. Chrome runs as its own process, but nothing sits between it and the module: no driver binary, no local HTTP bridge and no second OpenHuman process.
- The browser surface runs through CEF (Chromium Embedded Framework) and includes a security layer that scopes what pages can do. See [Chromium Embedded Framework](../../developing/cef.md) for the platform details.
+ - **Open** a session. You can launch a fresh browser (headless or headed) or attach to the Chrome you already have running. Attaching matters because many sites turn away a fresh automated browser but serve a person's own. When a task ends, an attached browser is only disconnected, never closed.
+ - **Snapshot** the page. The default mode, `sight`, runs a small in-page script that reads the page the way a person sees it: real links, buttons and fields, plus anything with a pointer cursor, a click handler or a tab stop. It drops hidden, zero-size, transparent and disabled items. It marks items below the fold as offscreen and items behind a dialog as covered. It falls back to the accessibility tree when it can't read a page, and `perception: "tree"` forces the tree.
+ - **Act**: click (optionally into a new tab), fill, type, press, select, check, hover, scroll, wait, read and go back.
+ - **Read** the page as text, Markdown or serialized DOM, and **evaluate** JavaScript.
+ - **Downloads**: list the browser's download events and wait for a completed file. A page snapshot alone doesn't prove a file finished.
+
+ Screenshots are never returned inline. A reply carries a handle that the agent reads in chunks and releases when done.
+Clicks, typing, key presses and other consequential actions ask for your approval in the chat first. A scheduled job has nobody to ask, so by default it can only open and read pages. An operator can let cron, background and approval-free workflow turns take specific actions with `[browser] unattended_actions`. See [TinyComputer browser on Linux and Docker](../../developing/tinycomputer-docker.md#4-unattended-actions).
+
- ## Computer (mouse + keyboard)
+ Sessions are bounded. The module allows up to 8 at once. OpenHuman keeps at most 6 per conversation thread with a 30-minute idle timeout, so a long chat reuses one browser and doesn't open a new one every turn. A session can be restricted to a set of origins.
+
+ ## Desktop
+
+ Desktop control reads the operating system's accessibility tree, the same interface a screen reader uses. It covers running apps, windows, displays, Notification Center entries, the clipboard and screenshots.
+
+ Actions go through the accessibility API and not through synthesized input. By default they don't steal focus, move your cursor or touch the clipboard, so a run can continue while you use the machine. A headed mode and real mouse and key events exist for apps that need them, but they are the exception.
+
+ For dense apps, a skeleton snapshot stops at three levels and returns structure without leaf detail. That is the difference between tens of thousands of tokens and a few hundred.
+
+ ## Tasks
+
+ Above these basics sits a bounded task loop. You describe the outcome, the module plans the steps, and a small decision model ([Jev](../../developing/jev.md)) picks every click. A task starts and returns at once with a status, which the agent polls and answers:
+
+ | Status | What it means |
+ | ------------------------------- | ----------------------------------------------------------------- |
+ | `running` | Working. |
+ | `needs_input` | A field it can't fill without you. |
+ | `needs_approval` | An irreversible step. Only an explicit approval releases it. |
+ | `needs_human` | A captcha, OTP, 2FA or login. No model can get past it. |
+ | `needs_plan` | Plain language with no planner configured. |
+ | `checkpoint` | Stopped on purpose, with the page left open. |
+ | `done`, `failed`, `cancelled` | Final states. |
+
+ Two rules hold for every task:
+
+ - **Reaching a payment page always stops the task.** It becomes a checkpoint that can't be continued, with the page left open for a person. The agent does not pay.
+ - **Secret values never reach a model.** Facts you mark secret are shared as `${name}` templates. The planner, the decision model and the rescue model see only the name, and the value is typed locally into the field.
+
+ Page and screen text is treated as data, never as instructions. The safety rules are plain code, not model judgment.
+
+ ## Agent tools
+
+ | Tool | What it does |
+ | --- | --- |
+ | `browser` | Everything above through one `action` argument: `open`, `snapshot`, `read_page`, `click`, `fill`, `type`, `get_text`, `get_title`, `get_url`, `wait`, `press`, `hover`, `scroll`, `is_visible`, `find`, `task`, `task_continue`, `task_cancel`, `confirm_pending`, `list_downloads`, `wait_download`, `close`. |
+ | `browser_open` | Opens a URL and returns a session. |
+ | `desktop_list_apps`, `desktop_list_windows` | What is running and where. |
+ | `desktop_launch` | Starts an app. |
+ | `desktop_snapshot`, `desktop_find` | Reads the screen, or looks for one thing on it. |
+ | `desktop_goal`, `desktop_continue_goal` | Runs a desktop task and answers its stops. |
+
+ Irreversible steps go through OpenHuman's [approval gate](../approval-gate.md), tied to a digest of the exact action and URL. If no approval gate is installed, the action is denied.
+
+ ## Platform support
+
+ | Platform | Desktop | Browser |
+ | --- | --- | --- |
+ | macOS | Yes. Needs Accessibility permission, plus Screen Recording for screenshots and Automation for the Notification Center opener. | Yes |
+ | Windows | Yes | Yes |
+ | Linux | No | No |
+
+ A permission check runs before the first read. An accessibility API called by an unauthorized process usually returns an empty tree, not an error, and that looks the same as an app with no buttons. A missing permission produces a named refusal that says which setting to change.
+
+ Linux is not supported. The module registry publishes no Linux build, so neither desktop control nor browser automation is available there, even though the browser engine itself would run.
+
+ ## Settings
+
+ **Connections > Computer Control** holds all of it: the module's status and contract version, the decision model (Jev, OpenJEV or Levanto Sage) and which route it bills through, the planner and rescue models, and the browser section (executable path, perception mode and allowed domains).
- - **Mouse** - move, click, drag.
- - **Keyboard** - type text, send key chords.
- - **Human path** - moves and clicks follow human-like trajectories rather than teleporting, so they don't trip naive bot detection.
+ `[desktop] approvals_enabled` defaults to `false`. It governs one narrow thing: the module's own confirmation stop in the middle of a desktop goal. When it is off, the core continues automatically after the module re-observes and re-validates the exact target. When it is `true`, that stop shows as an approval card. It does not weaken the [approval gate](../approval-gate.md). An irreversible step still needs approval, and with no gate installed it is denied. Desktop goal confirmations are single-use and expire after 10 minutes.
- ## What it's good for
+ ## What it is good for
- - Driving sites that don't have an API or a [native integration](../integrations/README.md).
- - Multi-step UI flows where an interactive DOM snapshot provides the next actionable element.
- - Automating local apps from inside a chat.
+ - Driving sites that have no API and no [native integration](../integrations/README.md).
+ - Multi-step UI flows where each snapshot shows the next element to act on.
+ - Automating a local app from inside a chat.
## See also