diff --git a/Makefile b/Makefile index 8c75263..38b8292 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,8 @@ MANIFESTS := \ plugins/zero/.claude-plugin/plugin.json \ plugins/zero/.codex-plugin/plugin.json \ plugins/zero/.factory-plugin/plugin.json \ - plugins/zero-gemini/gemini-extension.json + plugins/zero-gemini/gemini-extension.json \ + plugins/zero-roo/manifest.json # The manifest read for the current version (all of MANIFESTS stay in lockstep). VERSION_SOURCE := plugins/zero/.claude-plugin/plugin.json diff --git a/README.md b/README.md index ce4d9fb..7d54a0c 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ installation, use the guides below. Pick your agent: - **[Codex app](guides/codex-app.md)** - **[Droid](guides/droid.md)** - **[Gemini CLI](guides/gemini-cli.md)** +- **[Roo Code](guides/roo-code.md)** - **[Anything else (standalone installer)](guides/generic.md)** — works in any agent with a shell (and for humans at a terminal) @@ -73,5 +74,5 @@ mechanics — live in the per-host guides. ## Status This repo is built up iteratively, one carefully reviewed PR at a time. Today -it ships the **Claude Code**, **Codex**, **Droid**, and **Gemini CLI** plugins; -additional hosts (Cursor) will land in subsequent PRs. +it ships the **Claude Code**, **Codex**, **Droid**, **Gemini CLI**, and +**Roo Code** plugins; additional hosts will land in subsequent PRs. diff --git a/guides/roo-code.md b/guides/roo-code.md new file mode 100644 index 0000000..40c0b89 --- /dev/null +++ b/guides/roo-code.md @@ -0,0 +1,52 @@ +# Zero for Roo Code + +How to install Zero in Roo Code and keep it up to date. + +## Install + +### Inside Roo Code + +Install the Zero runtime once: + +```bash +curl -fsSL https://zero.xyz/install.sh | bash +``` + +Build the Roo adapter from this repository, then copy it into your project: + +```bash +scripts/build-roo.sh +cp -R dist/zero-roo/. /path/to/your/project/ +``` + +Open the project in VS Code with Roo Code installed, then: + +1. Open Roo Code's MCP settings and confirm the `zero` server from + `.roo/mcp.json`. +2. Confirm MCP servers are enabled. +3. Use `/zero` or ask Roo: *"Help me set up and test Zero."* + +If Roo Code prompts to approve MCP tools, keep paid or state-changing tools +confirmation-gated. The adapter leaves `alwaysAllow` empty by default. + +### From the terminal + +```bash +curl -fsSL https://zero.xyz/install.sh | bash +scripts/build-roo.sh +cp -R dist/zero-roo/. /path/to/your/project/ +``` + +Restart VS Code if Roo does not pick up the new project files immediately, then +ask Roo: *"Help me set up and test Zero."* + +## Staying up to date + +Roo Code does not currently provide lifecycle hooks for this adapter. To update +Zero, re-run: + +```bash +curl -fsSL https://zero.xyz/install.sh | bash +scripts/build-roo.sh +cp -R dist/zero-roo/. /path/to/your/project/ +``` diff --git a/plugins/zero-gemini/gemini-extension.json b/plugins/zero-gemini/gemini-extension.json index 69ea920..ac48f52 100644 --- a/plugins/zero-gemini/gemini-extension.json +++ b/plugins/zero-gemini/gemini-extension.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.", "mcpServers": { "zero": { diff --git a/plugins/zero-roo/README.md b/plugins/zero-roo/README.md new file mode 100644 index 0000000..c8d1b68 --- /dev/null +++ b/plugins/zero-roo/README.md @@ -0,0 +1,37 @@ +# zero-roo (overlay - not directly installable) + +This directory is **not** a complete Roo Code project adapter on its own. It +holds the Roo-specific files: + +- `manifest.json` - versioned release marker for this adapter +- `roo/mcp.json` - project-level MCP configuration for `https://mcp.zero.xyz` +- `roo/commands/zero.md` - `/zero` command instructions +- `roo/rules/zero.md` - project rule that tells Roo Zero is available +- `roo/marketplace-mcp.json` - exact Zero MCP payload for a future Roo + Marketplace listing + +The `zero` skill is copied from [`../zero/`](../zero/) during packaging so Roo +receives the same skill body as the other hosts. + +## How the adapter is built + +Roo reads project skills from `.roo/skills/` and `.agents/skills/`, project MCP +servers from `.roo/mcp.json`, project rules from `.roo/rules/`, and project +commands from `.roo/commands/`. `scripts/build-roo.sh` assembles those pieces +into `dist/zero-roo/`: + +``` +dist/zero-roo/ + ├── .agents/skills/zero/SKILL.md + ├── .roo/commands/zero.md + ├── .roo/mcp.json + ├── .roo/rules/zero.md + ├── .roo/skills/zero/SKILL.md + ├── manifest.json + └── roo/marketplace-mcp.json +``` + +Roo has no documented lifecycle hooks, so this adapter does not auto-provision +or auto-update the runner. Users install the shared Zero CLI/runtime with the +standalone installer and refresh project files by rebuilding/copying the +adapter. diff --git a/plugins/zero-roo/manifest.json b/plugins/zero-roo/manifest.json new file mode 100644 index 0000000..13f257a --- /dev/null +++ b/plugins/zero-roo/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "zero-roo", + "version": "1.4.0", + "description": "Roo Code adapter for Zero: project skills, remote MCP configuration, rules, and slash command template.", + "homepage": "https://zero.xyz", + "repository": "https://github.com/officialzeroxyz/zero-plugins", + "license": "MIT" +} diff --git a/plugins/zero-roo/roo/commands/zero.md b/plugins/zero-roo/roo/commands/zero.md new file mode 100644 index 0000000..ebb0df4 --- /dev/null +++ b/plugins/zero-roo/roo/commands/zero.md @@ -0,0 +1,16 @@ +--- +description: Use Zero to find and call an external capability +argument-hint: +--- + +Use the Zero skill to handle this request. + +1. Resolve the `zero` runner. +2. Search for the requested capability with `zero search`. +3. Inspect the chosen result with `zero get`. +4. Explain any cost and get confirmation before `zero fetch`. +5. Call the capability with a narrow `--max-pay` cap. +6. Summarize the result and include the Zero run ID when available. + +Never use `zero review` unless the user explicitly asks you to review a +completed Zero run. diff --git a/plugins/zero-roo/roo/marketplace-mcp.json b/plugins/zero-roo/roo/marketplace-mcp.json new file mode 100644 index 0000000..96a44f5 --- /dev/null +++ b/plugins/zero-roo/roo/marketplace-mcp.json @@ -0,0 +1,15 @@ +{ + "name": "Zero", + "description": "Connect Roo Code to Zero for capability search, account authorization, and funding status over MCP.", + "config": { + "type": "streamable-http", + "url": "https://mcp.zero.xyz", + "alwaysAllow": [], + "disabled": false + }, + "notes": [ + "Keep alwaysAllow empty by default.", + "Only add known read-only Zero MCP tools after verifying their names in Roo.", + "Paid capability calls should go through the zero runner with an explicit --max-pay cap and user confirmation." + ] +} diff --git a/plugins/zero-roo/roo/mcp.json b/plugins/zero-roo/roo/mcp.json new file mode 100644 index 0000000..98e908f --- /dev/null +++ b/plugins/zero-roo/roo/mcp.json @@ -0,0 +1,10 @@ +{ + "mcpServers": { + "zero": { + "type": "streamable-http", + "url": "https://mcp.zero.xyz", + "alwaysAllow": [], + "disabled": false + } + } +} diff --git a/plugins/zero-roo/roo/rules/zero.md b/plugins/zero-roo/roo/rules/zero.md new file mode 100644 index 0000000..42419ee --- /dev/null +++ b/plugins/zero-roo/roo/rules/zero.md @@ -0,0 +1,10 @@ +# Zero + +Zero is available in this project through the `zero` skill and the Zero MCP +server. When a request needs an external capability that Roo does not provide +natively, use the Zero workflow instead of telling the user to sign up for a +separate service. + +Resolve the `zero` runner before the first call. If it is not on `PATH`, use +`$HOME/.zero/runtime/bin/zero`. Do not create a wallet for the user. Ask for +explicit confirmation before any `zero fetch` call that may spend money. diff --git a/plugins/zero/.claude-plugin/plugin.json b/plugins/zero/.claude-plugin/plugin.json index 6b83198..59e52a7 100644 --- a/plugins/zero/.claude-plugin/plugin.json +++ b/plugins/zero/.claude-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.", "author": { "name": "Zero", "url": "https://zero.xyz" }, "homepage": "https://zero.xyz", diff --git a/plugins/zero/.codex-plugin/plugin.json b/plugins/zero/.codex-plugin/plugin.json index e90630a..3a8d304 100644 --- a/plugins/zero/.codex-plugin/plugin.json +++ b/plugins/zero/.codex-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill.", "author": { "name": "Zero", "url": "https://zero.xyz" }, "homepage": "https://zero.xyz", diff --git a/plugins/zero/.factory-plugin/plugin.json b/plugins/zero/.factory-plugin/plugin.json index 6b83198..59e52a7 100644 --- a/plugins/zero/.factory-plugin/plugin.json +++ b/plugins/zero/.factory-plugin/plugin.json @@ -1,6 +1,6 @@ { "name": "zero", - "version": "1.3.3", + "version": "1.4.0", "description": "Discover and call paid AI capabilities (x402 / MPP) with automatic, wallet-backed payment. Search a live index of external services — image/video/audio generation, web scraping, data enrichment, real-time data, messaging — then call them and pay per use. Bundles the 'zero' skill and the Zero MCP connector.", "author": { "name": "Zero", "url": "https://zero.xyz" }, "homepage": "https://zero.xyz", diff --git a/scripts/build-roo.sh b/scripts/build-roo.sh new file mode 100755 index 0000000..731609c --- /dev/null +++ b/scripts/build-roo.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash +# +# Assemble the Roo Code adapter into dist/zero-roo/. +# +# Usage: +# scripts/build-roo.sh # assemble dist/zero-roo/ +# scripts/build-roo.sh --tar OUT.tgz # also write a tarball + +set -euo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +SHARED="$ROOT/plugins/zero" +OVERLAY="$ROOT/plugins/zero-roo" +OUT="$ROOT/dist/zero-roo" + +TARBALL="" +if [ "${1:-}" = "--tar" ]; then + TARBALL="${2:?--tar requires an output path}" +fi + +for f in \ + "$OVERLAY/manifest.json" \ + "$OVERLAY/roo/mcp.json" \ + "$OVERLAY/roo/marketplace-mcp.json" \ + "$OVERLAY/roo/rules/zero.md" \ + "$OVERLAY/roo/commands/zero.md" \ + "$SHARED/skills/zero/SKILL.md"; do + [ -f "$f" ] || { echo "build-roo: missing required input: $f" >&2; exit 1; } +done + +rm -rf "$OUT" +mkdir -p \ + "$OUT/.roo/skills/zero" \ + "$OUT/.roo/rules" \ + "$OUT/.roo/commands" \ + "$OUT/.agents/skills/zero" \ + "$OUT/roo" + +cp "$OVERLAY/manifest.json" "$OUT/manifest.json" +cp "$OVERLAY/roo/mcp.json" "$OUT/.roo/mcp.json" +cp "$OVERLAY/roo/marketplace-mcp.json" "$OUT/roo/marketplace-mcp.json" +cp "$OVERLAY/roo/rules/zero.md" "$OUT/.roo/rules/zero.md" +cp "$OVERLAY/roo/commands/zero.md" "$OUT/.roo/commands/zero.md" +cp "$SHARED/skills/zero/SKILL.md" "$OUT/.roo/skills/zero/SKILL.md" +cp "$SHARED/skills/zero/SKILL.md" "$OUT/.agents/skills/zero/SKILL.md" + +echo "build-roo: assembled $OUT" +find "$OUT" -type f | sed "s#^$ROOT/##" | sort + +if [ -n "$TARBALL" ]; then + mkdir -p "$(dirname "$TARBALL")" + tar -czf "$TARBALL" -C "$OUT" . + echo "build-roo: wrote $TARBALL" +fi