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(skills): describe the registry host, paged RPC and error kinds (#7082)
oxoxDev2567fee4aebb
diff --git a/crates/openhuman-core/src/skills/README.md b/crates/openhuman-core/src/skills/README.mdindex ef93f44c89..856091af02 100644--- a/crates/openhuman-core/src/skills/README.md+++ b/crates/openhuman-core/src/skills/README.md@@ -139,7 +139,7 @@ there only while its bytes still match the binary| [`ops_discover.rs`](./ops_discover.rs), [`ops_discover/`](./ops_discover/) | `api.rs` (public entry points, metadata cache, trust check), `scan.rs` (root order and scan engine), `resource.rs` (`read_workflow_resource`). || [`ops_parse.rs`](./ops_parse.rs) | Frontmatter and body split, resource inventory. || [`ops_create.rs`](./ops_create.rs) | Scaffold a new skill with its sidecar. |-| [`ops_install.rs`](./ops_install.rs), [`ops_install/`](./ops_install/) | `fetch.rs` (URL installer), `url_validation.rs`, `uninstall.rs`. |+| [`ops_install.rs`](./ops_install.rs), [`ops_install/`](./ops_install/) | `fetch.rs` (URL installer: fetches through `tinyskills::fetch_skill_document`, then validates and writes with `install_validated_document`, which catalog installs share), `url_validation.rs`, `uninstall.rs`. || [`registry.rs`](./registry.rs) | Skills as agent definitions with inputs; `render_inputs_block`, `prune_legacy_default_workflows`. || [`preflight.rs`](./preflight.rs) | Pre-run gates (GitHub). || [`run_log.rs`](./run_log.rs) | Per-run streaming logs; `read_run_log_slice`, `scan_runs`. |@@ -149,7 +149,7 @@ there only while its bytes still match the binary| [`bundled/`](./bundled/) | Compiled-in skills and the builtin root. || [`schemas/`](./schemas/) | `controller_schemas.rs`, `handlers.rs`, `helpers.rs` (workspace resolution through `Config::load_or_init()` with a 30 second timeout), `wire_types.rs`. || [`stub.rs`](./stub.rs) | Facade used when the `skills` feature is off. |-| [`catalog/`](catalog/README.md) | Remote skill catalogs (`skill_registry.*`), install by entry id, the `skill_setup` agent. |+| [`catalog/`](catalog/README.md) | The `tinyskills` registry host (`skill_registry.*`): transport, configuration, paged browse, search and detail, install by entry id, the `skill_setup` agent. || [`runtime/`](runtime/README.md) | Run execution (`skill_runtime.*`): start, cancel, recent runs, log reads, Node/Python runtime resolution. || [`webhooks/`](webhooks/README.md) | Webhook tunnel routing. Nested here for historical reasons; not part of the `skills` feature. |@@ -213,7 +213,7 @@ rather than re-implementing it:| `resolve_skill`, `read_resource` (traversal, symlink, size, UTF-8 guards) | The `read_workflow_resource` wrapper and the empty `skill_id` check || `slugify`, `validate_*`, `scaffold_bundle` (containment, body preservation, `SKILL.md` to `WORKFLOW.md` migration) | Scope-to-root choice, the `workflow.toml` sidecar, `[[inputs]]` validation, re-discovery || `remove_bundle` | Root search order, error wording, the `WorkflowsChanged` publish |-| Install URL normalization and SSRF guards, document size and validation, `write_installed_document`, `redact_url` | The `reqwest` fetch, `Retry-After` and rate-limit messages, the ClawHub file-API exception, Sentry reporting |+| Install URL normalization, the guarded `fetch_skill_document` (HTTPS only, non-public addresses refused, pinned connections, re-validated redirects, size cap, timeout), document validation, `write_installed_document`, `redact_url` | `Retry-After` and rate-limit messages, Sentry reporting || `TriggerPattern` grammar and matching | `TriggeredWorkflowIndex` and the bus subscriber || Bundled-skill validate, digest, install, `is_current_materialization` | The `BUNDLED` table and the builtin root |diff --git a/crates/openhuman-core/src/skills/catalog/README.md b/crates/openhuman-core/src/skills/catalog/README.mdindex a6a93c4ac2..7e5dd9627e 100644--- a/crates/openhuman-core/src/skills/catalog/README.md+++ b/crates/openhuman-core/src/skills/catalog/README.md@@ -5,33 +5,39 @@ stable wire contract left unchanged by the module rename (JSON-RPC methods arestill `openhuman.skill_registry_<function>`, the CLI namespace is still`skill_registry`; see `tests/in_process/skill_registry_e2e.rs`).-Owns remote skill catalogs and installed-skill lifecycle:--- Fetch and cache registry catalogs.-- Refresh the remote catalog asynchronously on core load.-- Browse and search registry entries.-- Derive `SKILL.md` download URLs: Hermes bundled/optional skills from- `docsPath`, GitHub-hosted community skills from `sourceUrl` (blob/tree- rewritten to `raw.githubusercontent.com`), ClawHub from its file API by- slug, and skills.sh from the listed GitHub repo (located at install time).- LobeHub agents have no `SKILL.md`: they get no URL, search ranks them last,- and `install` returns an actionable error instead of a 404.-- Give entries unique ids (the source-qualified Hermes `identifier`, or the- name for bundled skills) and resolve install requests to exactly one entry.-- Install catalog entries into the user skills directory.-- Uninstall user-scope skills.+Hosts the `tinyskills` skill registry (`tinyskills::SkillRegistry`, the+`registry` feature) and adapts it to OpenHuman's RPC, agent tools and install+policy. The registry owns catalog fetching, the on-disk catalog store,+freshness, ranking, paging, facets, entry ids and `SKILL.md` resolution; this+module owns the HTTP transport, configuration, observability and installing+into the user skills directory.++- One process-wide registry (`registry::skill_registry`), configured from the+ environment and rebuilt when that configuration changes.+- A `reqwest` transport (`ReqwestTransport`) that honours the registry's+ contract: it connects only to the addresses the registry pinned, returns+ redirects to the registry's guard instead of following them, uses no proxy,+ and streams bodies within the registry's limits.+- The catalog is warmed asynchronously on core load. Reads serve the held+ catalog (`cached`) while a refresh runs and keep serving it, with+ `last_error`, when the registry cannot be reached.+- Entries without a `SKILL.md` download (LobeHub agents, portal pages) are+ `installable: false` and carry their `source_url`; installing one fails with+ `SKILL_REGISTRY_NO_DIRECT_DOWNLOAD` naming that page.+- Install catalog entries into the user skills directory; uninstall user-scope+ skills.- Host the built-in `skill_setup` agent.## Key files| File | Purpose || --- | --- |-| [`mod.rs`](./mod.rs) | Feature gate (`skills` Cargo feature) and module wiring; re-exports the controller aggregators |-| [`ops.rs`](./ops.rs) | Catalog fetch/cache, boot refresh, browse/search/sources/categories, entry ids, download-URL derivation, `find_catalog_entry`, `install_from_catalog` |-| [`download.rs`](./download.rs) | `SKILL.md` locations for ClawHub (file API) and skills.sh (GitHub repo probe plus tree lookup) |-| [`store.rs`](./store.rs) | Catalog cache at `~/.openhuman/skill-registry/cache.json`, with a 1-hour TTL, kept past TTL for stale-while-revalidate; `OPENHUMAN_SKILL_REGISTRY_CACHE_DIR` relocates it (tests) |+| [`mod.rs`](./mod.rs) | Feature gate (`skills` Cargo feature) and module wiring; re-exports the controller aggregators, `skill_registry`, `ReqwestTransport` and `HERMES_REGISTRY_ID` |+| [`registry.rs`](./registry.rs) | `RegistryConfig` (environment knobs below), the process registry handle, the `FileCatalogStore` location |+| [`transport.rs`](./transport.rs) | `ReqwestTransport`, the `tinyskills::RegistryTransport` implementation (pinned addresses, no redirects, no proxy, cached clients) |+| [`ops.rs`](./ops.rs) | Boot warm-up, paged browse/search, facets, detail, `install_from_catalog`, registry error messages and Sentry reporting || [`tools.rs`](./tools.rs) | LLM-callable tools `skill_registry_browse`, `skill_registry_search`, `skill_registry_sources`, `skill_registry_install`, `skill_registry_uninstall` |-| [`types.rs`](./types.rs) | `CatalogEntry` |+| [`types.rs`](./types.rs) | `RegistryCatalogEntry`, `CatalogQuery`, `CatalogPage`, `CatalogDetail`, and re-exported `tinyskills` registry types || [`schemas/controller_schemas.rs`](./schemas/controller_schemas.rs) | `skill_registry_*` `ControllerSchema` definitions and the registered-controller table || [`schemas/handlers.rs`](./schemas/handlers.rs) | Thin RPC handlers dispatching into `ops.rs` || [`schemas/wire_types.rs`](./schemas/wire_types.rs) | Request/response payload types for the handlers |@@ -43,14 +49,31 @@ Owns remote skill catalogs and installed-skill lifecycle:Functions in `schemas/controller_schemas.rs::all_skill_registry_controller_schemas`,all under the `skill_registry` namespace:-- `browse`: list cached (or force-refreshed) catalog entries.-- `search`: filter entries by query, source, and category.-- `sources`: distinct upstream sources present in the catalog.-- `categories`: distinct categories present in the catalog.+- `browse`: one page of catalog entries. Params: `page` (1-based),+ `page_size` (default 25, max 100), `source`/`sources`, `category`/`categories`,+ `force_refresh`. Returns `entries`, `total`, `page`, `page_size`,+ `total_pages`, `freshness` (`live` / `cached` / `local_fallback`),+ `fetched_at`, `refreshing` and `last_error`. Without `page` or `page_size` it+ returns every match in one page, built from summaries only (empty+ `download_url`; `installable` is authoritative).+- `search`: `browse` with a ranked `query`.+- `detail`: one entry by `entry_id`, with its `overview` and resolved+ `download_url`.+- `sources`: upstream sources present in the catalog, with per-source counts+ (`facets`) and the catalog's `freshness`.+- `categories`: categories present in the catalog, with counts and freshness.- `install`: install a catalog entry by `entry_id` into user scope.- `uninstall`: remove an installed user-scope skill by slug.- [`schemas`](./schemas): return the `skill_registry` controller schemas (CLI/RPC smoke-test generation).+Registry failures are reported as `SKILL_REGISTRY_<KIND>: <message>`, where+`<KIND>` is the upper-cased `tinyskills::RegistryErrorKind` (`TIMEOUT`,+`UNAVAILABLE`, `RATE_LIMITED`, `NOT_FOUND`, `NO_DIRECT_DOWNLOAD`,+`UPSTREAM_AMBIGUOUS`, `TOO_LARGE`, `MALFORMED`, `TRANSPORT`, ...). A rate-limit+message ends with `retry after <n>s` when the registry said how long to wait.+Only `transport_contract` and `malformed` catalog reads go to Sentry; outages+and throttling are logged.+## Agent tools and the `skill_setup` agent[`tools.rs`](./tools.rs) exposes the browse/search/sources/install/uninstall operations as@@ -82,17 +105,19 @@ Default catalog:https://hermes-agent.nousresearch.com/docs/api/skills.json```-Useful environment overrides for prod scripts and deterministic tests:+Environment overrides for prod scripts and deterministic tests:-```bash-OPENHUMAN_SKILL_REGISTRY_CATALOG_URL=https://example.com/skills.json-OPENHUMAN_SKILL_REGISTRY_DOWNLOAD_BASE_URL=https://example.com/skills-OPENHUMAN_SKILL_REGISTRY_REFRESH_ON_BOOT=0-```+| Variable | Effect |+| --- | --- |+| `OPENHUMAN_SKILL_REGISTRY_CATALOG_URL` | Read the Hermes index from this URL |+| `OPENHUMAN_SKILL_REGISTRY_DOWNLOAD_BASE_URL` | Serve every `SKILL.md` from `<base>/<name>/SKILL.md` |+| `OPENHUMAN_SKILL_REGISTRY_CACHE_DIR` | Catalog store directory (default `~/.openhuman/skill-registry`, file `hermes.json`) |+| `OPENHUMAN_SKILL_REGISTRY_REFRESH_ON_BOOT=0` | Skip the startup warm-up |+| `OPENHUMAN_SKILL_INSTALL_ALLOW_LOCAL_HTTP=1` | Allow plain `http` to loopback hosts (fixtures, local mirrors) |-`OPENHUMAN_SKILL_REGISTRY_REFRESH_ON_BOOT=0` disables the best-effort startup-refresh. By default, core startup spawns a background task that force-refreshes-the remote catalog and updates the local cache without blocking core readiness.+By default, core startup spawns a background task that warms the registry+without blocking core readiness. The pre-registry `cache.json` in the store+directory is removed on first use.Production smoke examples:@@ -107,13 +132,17 @@ openhuman-core skill_registry uninstall --name git-helperSecurity notes:-- `install` and `uninstall` do not implement their own file handling:- `ops::install_from_catalog` calls- `skills::ops_install::install_workflow_from_url` and the uninstall handler- calls `skills::ops_install::uninstall_workflow`, so the parent module's- hardened URL installer (HTTPS-only, size cap, private-IP rejection,- `SKILL.md` requirement) applies to catalog installs too.-- HTTP localhost installs require `OPENHUMAN_SKILL_INSTALL_ALLOW_LOCAL_HTTP=1` and are intended for local fixtures only.+- Catalog and pasted-URL installs fetch `SKILL.md` through the registry's+ guarded fetch (`tinyskills::fetch_skill_document`): HTTPS only (loopback+ `http` only with `OPENHUMAN_SKILL_INSTALL_ALLOW_LOCAL_HTTP=1`), non-public+ addresses refused after the guard's own DNS resolution, connections pinned to+ the checked addresses, every redirect hop re-validated, a size cap and a+ timeout.+- The fetched document is then validated and written by+ `skills::ops_install::install_validated_document`, the same path a pasted URL+ takes; uninstall goes through `skills::ops_install::uninstall_workflow`.+- A registry scan that blocks a document is logged; it does not yet refuse the+ install.## Further reading