Skip to content

feat(zed): add ZERO-294 Zed adapter#52

Closed
spencercharest wants to merge 1 commit into
mainfrom
spencer/zero-311-zed-adapter-skills-context-server-acp-path
Closed

feat(zed): add ZERO-294 Zed adapter#52
spencercharest wants to merge 1 commit into
mainfrom
spencer/zero-311-zed-adapter-skills-context-server-acp-path

Conversation

@spencercharest

@spencercharest spencercharest commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Subtask: ZERO-311

Adds a Zed adapter for Zero without touching guides/agent-install.md:

  • project skill at .agents/skills/zero/SKILL.md
  • project Zed settings template at .zed/settings.json
  • Zero remote MCP context server via context_servers.zero.url
  • conservative agent.tool_permissions for the zero skill and read-only Zero terminal commands
  • scripts/build-zed.sh packaging into dist/zero-zed/
  • standalone consumer guide at guides/zed.md and README install link
  • version bump to 1.4.0 via make minor

Official Sources Used

Human Install / Update Flow

Best full-plugin path inside Zed:

  1. In Zed, install Claude Agent from the ACP Registry.
  2. Start a Claude Agent thread in the Agent Panel.
  3. Install Zero using the Claude Code guide. The existing Claude Code plugin then works inside Zed, including hooks and /zero.

Native Zed Agent path:

curl -fsSL https://zero.xyz/install.sh | bash
scripts/build-zed.sh
cp -R dist/zero-zed/. /path/to/your/project/

Then open the project in Zed, trust the worktree if prompted, and ask the native Agent: "Help me set up and test Zero."

If the project already has .zed/settings.json, merge the context_servers and agent.tool_permissions entries from dist/zero-zed/.zed/settings.json instead of overwriting it.

Updates are manual because Zed has no lifecycle hooks for this adapter:

curl -fsSL https://zero.xyz/install.sh | bash
scripts/build-zed.sh
cp -R dist/zero-zed/. /path/to/your/project/

Proposed guides/agent-install.md Notes

Do not merge these into guides/agent-install.md from this PR. Capture them during the later runbook rework:

  • Zed native Agent reads global skills from ~/.agents/skills/ and project-local skills from <worktree>/.agents/skills/ only.
  • Project-local skills require a trusted worktree before Zed loads them.
  • Zed does not read .claude/skills/ for native Agent skills.
  • Zed project settings can live in .zed/settings.json.
  • Add Zero's MCP server via:
    {
      "context_servers": {
        "zero": {
          "url": "https://mcp.zero.xyz"
        }
      }
    }
  • Zed prompts for OAuth when a remote MCP server has no configured Authorization header.
  • Recommended permissions should auto-allow only the zero skill and read-only terminal commands (zero search, zero get, zero runs, zero auth whoami). Keep zero fetch, zero review, wallet commands, and auth-changing commands confirmation-gated.
  • Zed's MCP extension API is command-backed Rust/Wasm extension code; because Zero MCP is already a remote HTTP server, use native context_servers.zero.url rather than a local proxy extension.
  • Zed has no SessionStart, UserPromptSubmit, or scriptable PreToolUse hook equivalent. Do not document automatic runner provisioning or automatic adapter updates for native Zed Agent.
  • The full-plugin path in Zed is ACP: install Claude Agent from Zed's ACP Registry and use the existing Claude Code Zero plugin inside that external agent.

Verification

Local validation:

make minor
scripts/build-zed.sh --tar dist/zero-zed.tgz
jq . plugins/zero-zed/manifest.json plugins/zero-zed/zed/settings.json dist/zero-zed/.zed/settings.json
make version
cmp -s plugins/zero/skills/zero/SKILL.md dist/zero-zed/.agents/skills/zero/SKILL.md
git diff --check
git diff -- guides/agent-install.md
tar -tzf dist/zero-zed.tgz | sort

Docker validation used copied host auth from ~/.zero:

docker run --rm \
  -v "$PWD":/workspace \
  -v "$HOME/.zero":/host-zero:ro \
  -v "$HOME/zeroclick/env":/tmp/host-env:ro \
  node:22-bookworm bash -lc 'cp -R /host-zero "$HOME/.zero" && npm install -g @zeroxyz/cli@latest && cd /workspace && scripts/build-zed.sh --tar dist/zero-zed-docker.tgz && zero auth whoami --json && zero search "cdn.withzero.xyz upload txt file" --json && zero get cdn-withzero-xyz-static-site-file-cdn-upload-a0d9f22f && zero fetch --json --capability cdn-withzero-xyz-static-site-file-cdn-upload-a0d9f22f https://cdn.withzero.xyz/api/v1/uploads -d @/tmp/zero-cdn-body.json --max-pay 0.001'

Zero E2E result:

Claude-style plugin compatibility and simpler install option

Full Claude Code plugin package support: No for native Zed Agent, yes through ACP/Claude Agent. Zed's native Agent does not install Claude Code .claude-plugin packages and does not read .claude/skills/. However, Zed can run Claude Code through its ACP/external-agent path; in that scenario the existing Zero Claude Code plugin works inside the Claude Agent.

What this means for users:

  • Recommended full-plugin path in Zed:

    1. Install Claude Agent from Zed's ACP Registry.
    2. Start a Claude Agent thread in Zed's Agent Panel.
    3. Install Zero using the normal Claude Code plugin instructions inside that Claude Agent environment.
    
  • Native Zed should be framed as a reduced skill + MCP path, not equivalent to the Claude plugin:

    curl -fsSL https://zero.xyz/install.sh | bash
    # download/extract the prebuilt zero-zed artifact or copy .agents/skills/zero and .zed/settings.json
  • scripts/build-zed.sh should be maintainer packaging only. For many users, ACP + existing Claude Code plugin is simpler and more capable than maintaining a native Zed template.

GitHub Releases / no-build install check

Result: No native Zed Agent GitHub Release install path for this adapter. Zed supports native skills/settings/context servers and ACP external agents, but this PR did not verify a native Zed installer that consumes GitHub Release assets for an Agent template.

Best no-build full-plugin path remains ACP + Claude Agent:

1. Install Claude Agent from Zed's ACP Registry.
2. Start a Claude Agent thread.
3. Install Zero using the normal Claude Code plugin flow.

For native Zed, a GitHub Release tarball can package .agents/skills/zero and .zed/settings.json so users do not run scripts/build-zed.sh, but it is a manual extract flow. For many users, ACP + the existing Claude Code plugin is the cleaner maintenance path.

PR State

Draft. The package, Zed settings JSON, copied-auth Zero loop, and CDN upload were verified in Docker. Full in-product verification still needs a human Zed Agent Panel session because this environment has no zed binary and Zed does not provide a documented headless Agent Panel/plugin loader path.

@spencercharest

Copy link
Copy Markdown
Collaborator Author

Folded into #63 as a matrix entry (zed in plugins/zero/agents.json) — standalone skills via ~/.agents/skills (Zed's documented global skills dir) + MCP data for ~/.config/zed/settings.json context_servers. No hooks (Zed has no hook system; proposal zed-industries/zed#57890 unshipped) and no non-interactive install path. The adapter-template work here stays available on this branch if we later ship per-host templates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant