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
refactor(update): move update agent tools into the update domain
Steven Enamakeldba91f3fd4fd
diff --git a/crates/openhuman-core/src/platform/update/README.md b/crates/openhuman-core/src/platform/update/README.mdindex f2456e3848..cd7b9de857 100644--- a/crates/openhuman-core/src/platform/update/README.md+++ b/crates/openhuman-core/src/platform/update/README.md@@ -20,6 +20,7 @@ Self-update domain for the `openhuman-core` binary. Checks GitHub Releases (`tin| `crates/openhuman-core/src/platform/update/scheduler.rs` | `run(UpdateConfig)` periodic checker loop + `tick()`; publishes startup/health events. Floor `MIN_INTERVAL_MINUTES = 10`. || `crates/openhuman-core/src/platform/update/schemas.rs` | Controller registry: `all_controller_schemas`, `all_registered_controllers`, `schemas(fn)`, and `handle_*` thunks delegating to `ops`. || `crates/openhuman-core/src/platform/update/types.rs` | Serde types: `UpdateInfo`, `VersionInfo`, `UpdateRunResult`, `UpdateApplyResult`, `GitHubRelease`, `GitHubAsset`. |+| `crates/openhuman-core/src/platform/update/tools.rs` | Agent tools for checking and applying updates, registered by `tools/ops.rs`. || `crates/openhuman-core/src/platform/update/*_tests.rs` | Sibling test suites (`core_tests`, `ops_tests`, `ops_tests_2_tests`, `scheduler_tests`, `schemas_tests`), included via `#[path]`. |## Public surface@@ -41,7 +42,7 @@ All under namespace `update` (i.e. `openhuman.update_*`):`apply` and `run` are gated by `enforce_update_mutation_policy` (fail-closed if config can't load) and re-validate the URL (must be HTTPS GitHub host) and asset name (must start `openhuman-core-`, no path separators / `..`).## Agent tools-Not owned here: the domain has no `tools.rs`. Two cross-cutting system tools wrap it: `crates/openhuman-core/src/tools/impl/system/update_check.rs` (read-only, calls `update::rpc::update_check`) and `crates/openhuman-core/src/tools/impl/system/update_apply.rs` (calls `update::rpc::update_run`).+The domain owns two agent tools in [`tools.rs`](./tools.rs): `update_check` (read-only, calls `update::rpc::update_check`) and `update_apply` (calls `update::rpc::update_run`). Their model-facing names and behavior remain stable.## EventsNo `bus.rs`. The scheduler *publishes* (via `crate::core::bus::BUS.publish`):@@ -67,7 +68,7 @@ None. No `store.rs`: staged binaries are written to the filesystem (current-exe## Used by- `crates/openhuman-core/src/core/all.rs`: registers `all_update_registered_controllers()` / `all_update_controller_schemas()` into the controller registry.- `crates/openhuman-core/src/core/runtime/services.rs`: spawns `update::scheduler::run(config.update)` as a background service at core start when `ServiceSet::update_scheduler` is set (the desktop shell turns it off in `host::desktop_builder` because it updates through the Tauri updater; `ServiceSet::desktop()` itself leaves it on).-- `crates/openhuman-core/src/tools/impl/system/update_check.rs` and `update_apply.rs`: agent tools wrapping the RPC layer.+- `crates/openhuman-core/src/platform/update/tools.rs`: agent tools wrapping the RPC layer.## Notes / gotchas- **`staging_dir` is intentionally ignored** by `update_apply`: it always uses the safe default (current-exe parent dir) regardless of caller input, for security.diff --git a/crates/openhuman-core/src/platform/update/mod.rs b/crates/openhuman-core/src/platform/update/mod.rsindex a5986d63fe..c60bc30856 100644--- a/crates/openhuman-core/src/platform/update/mod.rs+++ b/crates/openhuman-core/src/platform/update/mod.rs@@ -3,8 +3,10 @@ pub mod ops;pub mod scheduler;mod schemas;mod types;+mod tools;pub use self::core::*;+pub use self::tools::{UpdateApplyTool, UpdateCheckTool};pub use ops as rpc;pub use schemas::{all_controller_schemas as all_update_controller_schemas,diff --git a/crates/openhuman-core/src/tools/README.md b/crates/openhuman-core/src/tools/README.mdindex 074fad58b5..31950687b3 100644--- a/crates/openhuman-core/src/tools/README.md+++ b/crates/openhuman-core/src/tools/README.md@@ -139,7 +139,8 @@ Where the built-in tools come from:| `detect_tools`, `curl`, `pushover` | `tinytools_std` || `http_request`, `web_fetch` | `tinytools_std::network`, wired with host limits, TinyJuice extraction and the x402 handler in [`impl/network/host.rs`](./impl/network/host.rs) || `current_time`, `resolve_time`, `ask_user_clarification` | `tinyagents_harness_tools` |-| `shell`, `install_tool`, `schedule`, `proxy_config`, `update_check`, `update_apply`, `retrieve_tool_output` | [`impl/system/`](./impl/system/) |+| `shell`, `install_tool`, `schedule`, `proxy_config`, `retrieve_tool_output` | [`impl/system/`](./impl/system/) |+| `update_check`, `update_apply` | [`platform/update/tools.rs`](../platform/update/tools.rs) || `gitbooks_search`, `gitbooks_get_page`, `mcp_list_servers`, `mcp_list_tools`, `mcp_call_tool`, `mcp_<server>_<tool>` | [`impl/network/`](./impl/network/) (MCP tools behind `mcp`) || `gmail_unsubscribe` | [`integrations/gmail/`](../integrations/gmail/) || `browser`, `browser_open` | [`impl/browser/`](./impl/browser/) (behind `modules`) |diff --git a/crates/openhuman-core/src/tools/impl/README.md b/crates/openhuman-core/src/tools/impl/README.mdindex 883f7f7aaa..4e62b90242 100644--- a/crates/openhuman-core/src/tools/impl/README.md+++ b/crates/openhuman-core/src/tools/impl/README.md@@ -26,7 +26,7 @@ tested but no production assembly site constructs it today.| Family | Tools | Registration gate || --- | --- | --- |-| [`system/`](./system/) | `ShellTool`, `InstallToolTool`, `DetectToolsTool`, `CurrentTimeTool`, `ResolveTimeTool`, `ScheduleTool`, `ProxyConfigTool`, `PushoverTool`, update tools, workspace and retrieval helpers. |+| [`system/`](./system/) | `ShellTool`, `InstallToolTool`, `DetectToolsTool`, `CurrentTimeTool`, `ResolveTimeTool`, `ScheduleTool`, `ProxyConfigTool`, `PushoverTool`, workspace and retrieval helpers. || [`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. 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`, 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` 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 |@@ -35,6 +35,8 @@ tested but no production assembly site constructs it today.## Notes+- The update tools are owned and registered from [`platform/update/tools.rs`](../platform/update/tools.rs), alongside the update domain they call.+- `document/` and `presentation/` are kept structurally parallel (validateinput, allocate artifact, generate bytes off the async runtime, finalize orfail the artifact) so further artifact-producing tools follow the same shape.diff --git a/crates/openhuman-core/src/tools/impl/system/mod.rs b/crates/openhuman-core/src/tools/impl/system/mod.rsindex c3932264cc..8070455008 100644--- a/crates/openhuman-core/src/tools/impl/system/mod.rs+++ b/crates/openhuman-core/src/tools/impl/system/mod.rs@@ -11,8 +11,6 @@ mod shell;mod shell_description;mod shell_saas;mod shell_support;-mod update_apply;-mod update_check;use crate::security::SecurityPolicy;use crate::tools::implementations::filesystem::gate::security_scoped_to_root;@@ -23,8 +21,6 @@ pub use proxy_config::ProxyConfigTool;pub use retrieve_tool_output::{retrieve_tool_output_tool, RetrieveToolOutputTool};pub use schedule::ScheduleTool;pub use shell::ShellTool;-pub use update_apply::UpdateApplyTool;-pub use update_check::UpdateCheckTool;/// Clone and scope `security` to the run's workspace descriptor, if any.pub(in crate::tools::implementations) fn security_for_tool_context(diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rsindex 083598e5ac..b9ef13b758 100644--- a/crates/openhuman-core/src/tools/ops.rs+++ b/crates/openhuman-core/src/tools/ops.rs@@ -3,6 +3,7 @@ use super::implementations::network::{McpListServersTool, McpListToolsTool};use super::*;use crate::config::Config;use crate::modules::tinybox::host_runtime::{NativeRuntime, RuntimeAdapter};+use crate::platform::update::{UpdateApplyTool, UpdateCheckTool};use crate::security::{AuditLogger, SecurityPolicy};use std::sync::Arc;use tinyagents_harness_tools::{CurrentTimeTool, ResolveTimeTool};