Skip to content

feat(installer): add Windsurf as an agent install target#952

Open
SEPURI-SAI-KRISHNA wants to merge 1 commit into
colbymchenry:mainfrom
SEPURI-SAI-KRISHNA:feat/add-windsurf-installer-target
Open

feat(installer): add Windsurf as an agent install target#952
SEPURI-SAI-KRISHNA wants to merge 1 commit into
colbymchenry:mainfrom
SEPURI-SAI-KRISHNA:feat/add-windsurf-installer-target

Conversation

@SEPURI-SAI-KRISHNA

Copy link
Copy Markdown

Add Windsurf (Codeium / Cognition) as an agent install target.

codegraph install and --target=windsurf now wire CodeGraph into Windsurf's MCP config so Cascade answers code questions through codegraph_explore instead of grepping.

What it does

  • Writes mcpServers.codegraph to ~/.codeium/windsurf/mcp_config.json.
  • codegraph uninstall removes only the codegraph entry; sibling MCP servers and the rest of the file are preserved.

Design decisions (Windsurf-specific quirks)

  • No type field. Windsurf's documented stdio entries are { command, args } (unlike Claude/Cursor's type: "stdio"). Matched the docs — same shape Antigravity uses — and pinned with a
    test.
  • Global-only. Windsurf reads only the single user-level mcp_config.json (no project-local file), so supportsLocation('local') returns false with a clear note, mirroring
    Codex/Antigravity. The path is os.homedir()-based on macOS/Linux/Windows alike — no %APPDATA% special case.
  • "Refresh" note on install. A valid config isn't loaded live; Windsurf only (re)loads MCP servers when you open the MCP panel and hit Refresh. The install surfaces this so users
    don't think the install silently failed.
  • No instructions file (per CLAUDE.md instructions duplicate MCP server instructions — wastes tokens every turn #529 — the MCP initialize response is the single source of truth).
  • Deliberately did not inject --path ${workspaceFolder} (Cursor's quirk): Windsurf is global-config-only and there's no evidence it expands that variable, so a speculative injection
    could break the install. Clean standard config is the safe choice; can be revisited if a cwd issue is confirmed.

Files

  • src/installer/targets/windsurf.ts (new)
  • src/installer/targets/registry.ts, types.ts (register + TargetId)
  • tests/installer-targets.test.ts (4 dedicated tests; also auto-covered by the parameterized contract loop)
  • CHANGELOG.md (entry under ### New Features)

Testing

  • vitest run tests/installer-targets.test.ts → 160/160 pass (parameterized contract suite — install idempotency, sibling preservation, uninstall reverses install, byte-equal
    re-run → unchanged — now runs against windsurf too).
  • tsc --noEmit clean; npm run build clean.
  • Manual CLI round-trip: install writes the correct shape → seeded a sibling server → uninstall removed only codegraph (sibling survived) → Refresh note surfaces.

Relationship to existing PR #488

There is one open PR that overlaps: #488 "Support 42 new AI agent targets for auto-installer" (by @coder11v), which lists Windsurf among 42 targets. I'm proposing this as a focused
alternative for the Windsurf slice because #488 currently looks hard to land:

  • Scope: 43 commits, 46 files, +6,192 / −402.
  • Stale: created 2026-05-27, last updated 2026-06-02 (no activity since), with unresolved merge conflicts the author noted they were "working to resolve."
  • No maintainer engagement (no review/approval/comments from @colbymchenry).

This PR is a single self-contained target (~180 lines + tests) that slots into the existing contract suite, with zero blast radius on the extraction/resolution/retrieval core. If
#488 lands first, this becomes redundant and can be closed; if not, it delivers Windsurf support on its own.

@SEPURI-SAI-KRISHNA

Copy link
Copy Markdown
Author

Hi @colbymchenry this adds Windsurf as a focused, single-file installer target following the documented targets/ + registry.ts pattern (no type field per Windsurf's docs, global-only config, "click Refresh" note). It slots into the existing parameterized contract suite 160/160 pass plus a CHANGELOG entry, and touches nothing in the extraction/resolution/retrieval core.

Heads-up on overlap: #488 also lists Windsurf among its 42 targets, but it looks stalled (unresolved conflicts, no activity in a few weeks). I'm offering this as a self-contained alternative for just the Windsurf slice happy to close it if #488 lands first, or to rebase if you'd prefer it go in standalone. Let me know which you'd like.

@coder11v

coder11v commented Jun 22, 2026

Copy link
Copy Markdown

Hello @SEPURI-SAI-KRISHNA I like the PR. I resolved merge conflicts with PR #488 but neither mine nor other agent target PRs that are open have had any maintainer comment yet, so just a heads up.

@SEPURI-SAI-KRISHNA

Copy link
Copy Markdown
Author

@coder11v thanks for heads-up

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.

2 participants