mirror of
https://github.com/nexu-io/open-design.git
synced 2026-07-07 14:38:42 +08:00
* feat: add per-agent MCP installer with source-deploy fallback
Wire Open Design's stdio MCP server into 14 coding agents via a single
`curl ... | sh -s <agent>` command. Two paths, chosen automatically:
Path 1 — a local `od` is found (PATH, packaged app, prior build):
register the agent via `od mcp install <agent>`.
Path 2 — no `od`: deploy from source (clone + pnpm install + build +
link + background daemon), then register.
- od mcp install <agent>: per-agent planner with cli/json/manual
strategies; resolves the launch spec from the running daemon and
falls back to a default stdio spec when offline.
- install-agent.sh: POSIX sh bootstrap that locates or source-deploys
`od` before forwarding; probes past the Unix octal-dump `od`.
* feat(installer): support OD_REF to pin clone branch for source deploy
* fix(installer): fail clearly when OD_HOME is a non-empty non-checkout dir
* fix(installer): place server name before -e flags for claude mcp add
claude's `mcp add` treats `-e/--env` as variadic (`<env...>`), so emitting
`-e KEY=val <name> --` made the CLI swallow the server name as an env value
("Invalid environment variable format: open-design"). Put the name first,
then env flags, then `--`, matching `claude mcp add <name> -e K=v -- <cmd>`.
* feat(plugins): claude/codex one-command install via plugin marketplace; drop install.sh
The install.sh route was load-bearing on a non-existent URL: PR body
advertised `curl -fsSL https://open-design.ai/install.sh | sh -s <agent>`
but Vercel serves the Next.js index page at `/install.sh`, not the
shell script. Bootstrap users got 173KB of HTML piped into sh and
nothing installed.
Re-scoped per maintainer call (lefarcen, 2026-06-01): drop the
self-deploy path entirely, assume the user installs `od` themselves
(brew / npm / DMG), and focus PR #3431 on the one-thing it
genuinely owns — wiring `od mcp` into the user's coding agent.
## Two install paths now
Agent User runs
───────────────── ──────────────────────────────────────────────────────
claude claude plugin marketplace add nexu-io/open-design
claude plugin install open-design@nexu-io/open-design
codex codex plugin marketplace add \
git@github.com:nexu-io/open-design.git
codex plugin install open-design@nexu-io/open-design
cursor / copilot od mcp install <slug>
cline / opencode (writes the agent's own JSON config — see
openclaw / etc. apps/daemon/src/mcp-agent-install.ts for the 14
supported agents)
Both paths land on the same launch spec: `od mcp --daemon-url <url>`
running as a stdio server, with whatever env the local daemon hands
back from /api/mcp/install-info. The plugin manifest hard-codes
`command: "od"` so it depends on `od` being on PATH — the maintainer's
existing install (brew/npm/DMG) is the source of truth, plugin install
is purely the wiring.
## What this commit does
- Delete deploy/scripts/install-agent.sh (~240 lines) — load-bearing
but unreachable (Vercel doesn't serve it), and the source-deploy
path it gated (clone / pnpm install / build daemon / link bin) is
out of PR scope per the re-scope above.
- Add .claude-plugin/marketplace.json — owner=nexu-io, exposes
open-design plugin at ./plugins/open-design.
- Add plugins/open-design/.claude-plugin/plugin.json — name +
displayName + description + mcpServers pointer to .mcp.json.
- Add plugins/open-design/.mcp.json — stdio server `od mcp
--daemon-url http://127.0.0.1:7456`, same shape /api/mcp/install-info
hands back.
The TypeScript planner + executor (apps/daemon/src/mcp-agent-install.ts,
runMcpInstall in cli.ts) and its tests are unchanged — they're the
true core for the 10 agents that don't have plugin marketplaces.
## Verified
- JSON validates for all 3 manifests.
- Daemon already serves stdio MCP on `od mcp` (pre-existing,
/api/mcp/install-info confirms).
- `claude plugin install open-design@nexu-io/open-design` flow: I
validated the same manifest shape on a sister repo (nexu-xray,
https://github.com/nexu-io/agent-pr-explore) and it installs cleanly
on Claude Code + codex from a single marketplace manifest.
## NOT verified yet (worth a smoke on this branch)
- The full `od mcp install <agent>` flow for the 10 non-plugin
agents (cursor / copilot / cline / opencode / openclaw / antigravity
/ gemini / trae / kimi / hermes-pi-vibe-print-only). The unit tests
cover plan generation; an end-to-end against a real `claude mcp
list` / a real cursor.mcp.json would catch shape regressions.
---------
Co-authored-by: qiongyu1999 <2694684348@qq.com>
Co-authored-by: lefarcen <ontf116@gmail.com>