feat: add Windsurf runtime support

Adds full Windsurf (by Codeium) runtime integration, following the same
pattern as the existing Cursor support. Windsurf uses .windsurf/ for
local config and ~/.windsurf/ for global config, with skills in
.windsurf/skills/ using the SKILL.md structure.

What:
- CLI flag --windsurf and interactive prompt option (8)
- Directory mapping (.windsurf local, ~/.windsurf global)
- Content converter functions (tool names, path replacements, brand refs)
- Skill copy function (copyCommandsAsWindsurfSkills)
- Agent conversion (convertClaudeAgentToWindsurfAgent)
- Install/uninstall branches
- Banner, help text, and issue template updates
- Windsurf conversion test suite (windsurf-conversion.test.cjs)
- Updated multi-runtime selection tests for 8 runtimes

Closes #1336

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-03-23 13:50:23 -04:00
parent ae69e6e9e4
commit 8579a30065
5 changed files with 417 additions and 22 deletions

View File

@@ -24,9 +24,10 @@ const runtimeMap = {
'4': 'codex',
'5': 'copilot',
'6': 'antigravity',
'7': 'cursor'
'7': 'cursor',
'8': 'windsurf'
};
const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor'];
const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigravity', 'cursor', 'windsurf'];
/**
* Simulate the parsing logic from promptRuntime without requiring readline.
@@ -35,7 +36,7 @@ const allRuntimes = ['claude', 'opencode', 'gemini', 'codex', 'copilot', 'antigr
function parseRuntimeInput(input) {
input = input.trim() || '1';
if (input === '8') {
if (input === '9') {
return allRuntimes;
}
@@ -73,8 +74,12 @@ describe('multi-runtime selection parsing', () => {
assert.deepStrictEqual(parseRuntimeInput('2 , 5'), ['opencode', 'copilot']);
});
test('choice 8 returns all runtimes', () => {
assert.deepStrictEqual(parseRuntimeInput('8'), allRuntimes);
test('single choice for windsurf', () => {
assert.deepStrictEqual(parseRuntimeInput('8'), ['windsurf']);
});
test('choice 9 returns all runtimes', () => {
assert.deepStrictEqual(parseRuntimeInput('9'), allRuntimes);
});
test('empty input defaults to claude', () => {
@@ -83,13 +88,13 @@ describe('multi-runtime selection parsing', () => {
});
test('invalid choices are ignored, falls back to claude if all invalid', () => {
assert.deepStrictEqual(parseRuntimeInput('9'), ['claude']);
assert.deepStrictEqual(parseRuntimeInput('10'), ['claude']);
assert.deepStrictEqual(parseRuntimeInput('0'), ['claude']);
assert.deepStrictEqual(parseRuntimeInput('abc'), ['claude']);
});
test('invalid choices mixed with valid are filtered out', () => {
assert.deepStrictEqual(parseRuntimeInput('1,9,4'), ['claude', 'codex']);
assert.deepStrictEqual(parseRuntimeInput('1,10,4'), ['claude', 'codex']);
assert.deepStrictEqual(parseRuntimeInput('abc 3 xyz'), ['gemini']);
});
@@ -105,7 +110,7 @@ describe('multi-runtime selection parsing', () => {
});
describe('install.js source contains multi-select support', () => {
test('runtimeMap is defined with all 7 runtimes', () => {
test('runtimeMap is defined with all 8 runtimes', () => {
for (const [key, name] of Object.entries(runtimeMap)) {
assert.ok(
installSrc.includes(`'${key}': '${name}'`),