From 198ce149521f1f7899f2f4a0df646b0cb0791cad Mon Sep 17 00:00:00 2001 From: Spencer Charest Date: Sun, 14 Jun 2026 16:49:53 -0700 Subject: [PATCH] feat(continue): add ZERO-294 Continue CLI adapter --- Makefile | 3 +- README.md | 8 ++- guides/continue-cli.md | 36 ++++++++++ plugins/zero-continue/README.md | 60 +++++++++++++++++ .../continue/mcpServers/zero.yaml | 7 ++ .../zero-continue/continue/prompts/zero.md | 10 +++ plugins/zero-continue/continue/settings.json | 39 +++++++++++ plugins/zero-continue/manifest.json | 10 +++ plugins/zero-gemini/gemini-extension.json | 2 +- plugins/zero/.claude-plugin/plugin.json | 2 +- plugins/zero/.codex-plugin/plugin.json | 2 +- plugins/zero/.factory-plugin/plugin.json | 2 +- scripts/build-continue.sh | 65 +++++++++++++++++++ 13 files changed, 239 insertions(+), 7 deletions(-) create mode 100644 guides/continue-cli.md create mode 100644 plugins/zero-continue/README.md create mode 100644 plugins/zero-continue/continue/mcpServers/zero.yaml create mode 100644 plugins/zero-continue/continue/prompts/zero.md create mode 100644 plugins/zero-continue/continue/settings.json create mode 100644 plugins/zero-continue/manifest.json create mode 100755 scripts/build-continue.sh diff --git a/Makefile b/Makefile index 8c75263..7746a92 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-continue/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 3c553b6..d951217 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ installation, use the guides below. Pick your agent: web, desktop, and mobile - **[Codex (CLI)](guides/codex.md)** - **[Codex app](guides/codex-app.md)** +- **[Continue CLI (`cn`)](guides/continue-cli.md)** - **[Droid](guides/droid.md)** - **[Gemini CLI](guides/gemini-cli.md)** - **[Anything else (standalone installer)](guides/generic.md)** — works in any @@ -74,6 +75,8 @@ plugins/zero/ # the shared plugin: skill + hooks (+ Claude's └── .factory-plugin/ # Droid manifest plugins/zero-gemini/ # thin Gemini-only overlay (manifest + hook wiring) scripts/build-gemini.sh # assembles the installable Gemini extension into dist/ +plugins/zero-continue/ # thin Continue CLI overlay (hooks + MCP + prompt) +scripts/build-continue.sh # assembles the Continue project template into dist/ guides/ # per-host install guides + the agent install runbook ``` @@ -83,5 +86,6 @@ 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 +**Continue CLI** plugins; additional hosts (Cursor) will land in subsequent +PRs. diff --git a/guides/continue-cli.md b/guides/continue-cli.md new file mode 100644 index 0000000..acb7c9f --- /dev/null +++ b/guides/continue-cli.md @@ -0,0 +1,36 @@ +# Zero for Continue CLI + +How to install Zero in Continue CLI (`cn`) and keep it up to date. + +## Install + +### Inside Continue CLI + +Continue CLI does not have an in-session plugin installer. Install Zero from +the terminal, then restart `cn`. + +### From the terminal + +From the root of the project where you use Continue: + +```bash +rm -rf /tmp/zero-plugins +git clone --depth 1 https://github.com/officialzeroxyz/zero-plugins /tmp/zero-plugins +/tmp/zero-plugins/scripts/build-continue.sh +cp -R /tmp/zero-plugins/dist/zero-continue/. . +``` + +Restart Continue CLI: + +```bash +cn +``` + +Zero sets itself up automatically. Then ask Continue: *"Help me set up and +test Zero."* It walks you through signing in. + +## Staying up to date + +- The Zero runner updates at the start of each Continue CLI session. +- To update the project files, rerun the terminal install commands from this + guide. diff --git a/plugins/zero-continue/README.md b/plugins/zero-continue/README.md new file mode 100644 index 0000000..bad556d --- /dev/null +++ b/plugins/zero-continue/README.md @@ -0,0 +1,60 @@ +# zero-continue (overlay - not directly installable) + +This directory is **not** a complete Continue install on its own. It holds the +Continue-specific files that are overlaid with the shared Zero skill and hooks +from [`../zero/`](../zero/): + +- `manifest.json` - versioned metadata for this adapter +- `continue/settings.json` - Continue CLI hook wiring +- `continue/mcpServers/zero.yaml` - Zero MCP server config +- `continue/prompts/zero.md` - `/zero` prompt for Continue + +User-facing install instructions are in the +[Continue CLI guide](../../guides/continue-cli.md). + +## How the adapter is built + +Continue does not have a one-artifact plugin installer for skills and hooks. +`scripts/build-continue.sh` assembles an installable project template by +combining this overlay with the shared skill and hook scripts: + +``` +plugins/zero-continue/ # this overlay + ├── manifest.json # versioned adapter metadata + └── continue/ + ├── settings.json # Continue CLI hooks + ├── mcpServers/zero.yaml # streamable HTTP MCP config + └── prompts/zero.md # invokable /zero prompt + +scripts/build-continue.sh # assembles overlay + shared files -> dist/zero-continue/ + +dist/zero-continue/ # (git-ignored) files to copy into a project: + ├── manifest.json # <- plugins/zero-continue/ + ├── .claude/skills/zero/SKILL.md # <- plugins/zero/ (Continue compat path) + └── .continue/ + ├── settings.json # <- plugins/zero-continue/ + ├── skills/zero/SKILL.md # <- plugins/zero/ + ├── mcpServers/zero.yaml # <- plugins/zero-continue/ + ├── prompts/zero.md # <- plugins/zero-continue/ + └── zero/hooks/ + ├── auto-approve-zero.sh # <- plugins/zero/ + ├── ensure-runner.sh # <- plugins/zero/ + └── zero-context.sh # <- plugins/zero/ +``` + +## How Continue differs from Claude Code + +Continue CLI's hook system is intentionally Claude Code-compatible, but it +loads project hooks from `.continue/settings.json` as well as `.claude/`. +This overlay uses the Continue-owned path so it does not require users to +install the Claude Code plugin too. + +The shared hook scripts run unchanged: + +- `SessionStart` provisions the Zero runner. +- `UserPromptSubmit` injects the Zero availability reminder. +- `PreToolUse` auto-approves read-only `zero search`, `zero get`, + `zero review`, and `zero runs` shell calls. + +Continue executes hooks from the project root and sets `CONTINUE_PROJECT_DIR`, +so `settings.json` invokes scripts through that environment variable. diff --git a/plugins/zero-continue/continue/mcpServers/zero.yaml b/plugins/zero-continue/continue/mcpServers/zero.yaml new file mode 100644 index 0000000..1a42044 --- /dev/null +++ b/plugins/zero-continue/continue/mcpServers/zero.yaml @@ -0,0 +1,7 @@ +name: Zero MCP +version: 0.0.1 +schema: v1 +mcpServers: + - name: Zero + type: streamable-http + url: https://mcp.zero.xyz diff --git a/plugins/zero-continue/continue/prompts/zero.md b/plugins/zero-continue/continue/prompts/zero.md new file mode 100644 index 0000000..57d203a --- /dev/null +++ b/plugins/zero-continue/continue/prompts/zero.md @@ -0,0 +1,10 @@ +--- +name: zero +description: Search Zero for external capabilities and use the Zero runner safely +invokable: true +--- + +Use the `zero` skill to search Zero before saying a task is unavailable or +asking the user to sign up for an external service. Resolve the Zero runner, +run `zero search`, inspect with `zero get`, and call selected capabilities with +`zero fetch` using an explicit `--max-pay` cap. diff --git a/plugins/zero-continue/continue/settings.json b/plugins/zero-continue/continue/settings.json new file mode 100644 index 0000000..ba18c7a --- /dev/null +++ b/plugins/zero-continue/continue/settings.json @@ -0,0 +1,39 @@ +{ + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "bash \"${CONTINUE_PROJECT_DIR:-$PWD}/.continue/zero/hooks/ensure-runner.sh\"", + "statusMessage": "Preparing the Zero runner...", + "timeout": 120 + } + ] + } + ], + "UserPromptSubmit": [ + { + "hooks": [ + { + "type": "command", + "command": "bash \"${CONTINUE_PROJECT_DIR:-$PWD}/.continue/zero/hooks/zero-context.sh\"", + "timeout": 5 + } + ] + } + ], + "PreToolUse": [ + { + "matcher": "Bash", + "hooks": [ + { + "type": "command", + "command": "bash \"${CONTINUE_PROJECT_DIR:-$PWD}/.continue/zero/hooks/auto-approve-zero.sh\"", + "timeout": 5 + } + ] + } + ] + } +} diff --git a/plugins/zero-continue/manifest.json b/plugins/zero-continue/manifest.json new file mode 100644 index 0000000..3289878 --- /dev/null +++ b/plugins/zero-continue/manifest.json @@ -0,0 +1,10 @@ +{ + "name": "zero-continue", + "version": "1.4.0", + "description": "Continue CLI adapter for Zero. Ships the Zero skill, streamable HTTP MCP config, a /zero prompt, and Claude Code-compatible hooks for runner provisioning, context injection, and read-only Zero command approval.", + "author": { "name": "Zero", "url": "https://zero.xyz" }, + "homepage": "https://zero.xyz", + "repository": "https://github.com/officialzeroxyz/zero-plugins", + "license": "MIT", + "keywords": ["zero", "continue", "cn", "x402", "mpp", "payments", "capabilities", "mcp", "agent-tools"] +} 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/.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-continue.sh b/scripts/build-continue.sh new file mode 100755 index 0000000..31dcfea --- /dev/null +++ b/scripts/build-continue.sh @@ -0,0 +1,65 @@ +#!/usr/bin/env bash +# +# Assemble the Continue CLI adapter into dist/zero-continue/. +# +# Continue does not currently have a one-artifact plugin installer for skills +# and hooks, so this script builds a project template. The Continue-specific +# overlay lives in plugins/zero-continue/; shared Zero skill and hook scripts +# live once in plugins/zero/. +# +# Usage: +# scripts/build-continue.sh # assemble dist/zero-continue/ +# scripts/build-continue.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-continue" +OUT="$ROOT/dist/zero-continue" + +TARBALL="" +if [ "${1:-}" = "--tar" ]; then + TARBALL="${2:?--tar requires an output path}" +fi + +for f in \ + "$OVERLAY/manifest.json" \ + "$OVERLAY/continue/settings.json" \ + "$OVERLAY/continue/mcpServers/zero.yaml" \ + "$OVERLAY/continue/prompts/zero.md" \ + "$SHARED/hooks/auto-approve-zero.sh" \ + "$SHARED/hooks/ensure-runner.sh" \ + "$SHARED/hooks/zero-context.sh" \ + "$SHARED/skills/zero/SKILL.md"; do + [ -f "$f" ] || { echo "build-continue: missing required input: $f" >&2; exit 1; } +done + +rm -rf "$OUT" +mkdir -p \ + "$OUT/.claude/skills" \ + "$OUT/.continue/mcpServers" \ + "$OUT/.continue/prompts" \ + "$OUT/.continue/skills" \ + "$OUT/.continue/zero/hooks" + +cp "$OVERLAY/manifest.json" "$OUT/manifest.json" +cp "$OVERLAY/continue/settings.json" "$OUT/.continue/settings.json" +cp "$OVERLAY/continue/mcpServers/zero.yaml" "$OUT/.continue/mcpServers/zero.yaml" +cp "$OVERLAY/continue/prompts/zero.md" "$OUT/.continue/prompts/zero.md" + +cp -R "$SHARED/skills/zero" "$OUT/.continue/skills/zero" +cp -R "$SHARED/skills/zero" "$OUT/.claude/skills/zero" +cp "$SHARED/hooks/auto-approve-zero.sh" "$OUT/.continue/zero/hooks/auto-approve-zero.sh" +cp "$SHARED/hooks/ensure-runner.sh" "$OUT/.continue/zero/hooks/ensure-runner.sh" +cp "$SHARED/hooks/zero-context.sh" "$OUT/.continue/zero/hooks/zero-context.sh" +chmod +x "$OUT/.continue/zero/hooks/"*.sh + +echo "build-continue: 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-continue: wrote $TARBALL" +fi