refactor: drop 12 runtimes, keep Claude, Codex, OpenCode, Cursor, ZCode, Antigravity
Removes kilo, kimi, kimi-code, copilot, windsurf, augment, trae, qwen, hermes, cline, codebuddy and pi end to end: capability descriptors, installer branches and converters (bin/install.js 14.9k -> 11.2k lines), TypeScript converters, hook surfaces and runtime homes, review lanes qwen/kimi-code, the two pi migrations, Kimi payload normalization in the hook guards, dead hostBehaviors vocabulary, launcher home probes, fixtures, runtime-specific tests and the prose that presented them as supported. Installer output for the six kept runtimes is byte-identical to before the prune. The Kimi tool-vocabulary tests in workflow-guard, read-guard and read-injection-scanner are left in place pending a decision.
This commit is contained in:
@@ -9,16 +9,9 @@
|
||||
* (`runtimeMap`, `allRuntimes`, `parseRuntimeInput`, `buildRuntimePromptText`)
|
||||
* instead of regexing bin/install.js source text.
|
||||
*
|
||||
* #1928: Google sunset Gemini CLI (2026-06-18) and the `gemini` runtime was
|
||||
* removed from MSD (Antigravity CLI is the successor). The runtime option
|
||||
* numbering below is renumbered accordingly — option 9 (formerly gemini) is
|
||||
* now hermes, and the "All" shortcut moved from 17 to 16.
|
||||
*
|
||||
* #1925: ZCode (Z.ai) added as option 16; the "All" shortcut moved from 16 to 17.
|
||||
*
|
||||
* #2102: pi added as option 13 (alphabetical slot between opencode and qwen) —
|
||||
* qwen/trae/windsurf/zcode each shift up one slot (14/15/16/17), and the "All"
|
||||
* shortcut moves from 17 to 18.
|
||||
* The supported runtimes are claude, antigravity, codex, cursor, opencode and
|
||||
* zcode (options 1-6); the "All" shortcut is option 7. (#1928 removed gemini;
|
||||
* a later prune removed the other unsupported runtimes.)
|
||||
*/
|
||||
|
||||
process.env.MSD_TEST_MODE = '1';
|
||||
@@ -44,83 +37,41 @@ describe('multi-runtime selection parsing', () => {
|
||||
test('single choice returns single runtime', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('1'), ['claude']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('2'), ['antigravity']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('3'), ['augment']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('4'), ['cline']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('5'), ['codebuddy']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('6'), ['codex']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('7'), ['copilot']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('8'), ['cursor']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('3'), ['codex']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('4'), ['cursor']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('5'), ['opencode']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('6'), ['zcode']);
|
||||
});
|
||||
|
||||
test('comma-separated choices return multiple runtimes', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,7,9'), ['claude', 'copilot', 'hermes']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('2,3'), ['antigravity', 'augment']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('3,6'), ['augment', 'codex']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,3,5'), ['claude', 'codex', 'opencode']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('2,3'), ['antigravity', 'codex']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('3,6'), ['codex', 'zcode']);
|
||||
});
|
||||
|
||||
test('space-separated choices return multiple runtimes', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('1 7 9'), ['claude', 'copilot', 'hermes']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('8 12'), ['cursor', 'kilo']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('1 3 5'), ['claude', 'codex', 'opencode']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('4 6'), ['cursor', 'zcode']);
|
||||
});
|
||||
|
||||
test('mixed comma and space separators work', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('1, 7, 9'), ['claude', 'copilot', 'hermes']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('2 , 8'), ['antigravity', 'cursor']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('1, 3, 5'), ['claude', 'codex', 'opencode']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('2 , 4'), ['antigravity', 'cursor']);
|
||||
});
|
||||
|
||||
test('single choice for hermes', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('9'), ['hermes']);
|
||||
test('choice 7 returns all runtimes', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('7'), allRuntimes);
|
||||
});
|
||||
|
||||
test('single choice for kilo', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('12'), ['kilo']);
|
||||
});
|
||||
|
||||
test('single choice for opencode', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('13'), ['opencode']);
|
||||
});
|
||||
|
||||
test('single choice for pi', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('14'), ['pi']);
|
||||
});
|
||||
|
||||
test('single choice for qwen', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('15'), ['qwen']);
|
||||
});
|
||||
|
||||
test('single choice for trae', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('16'), ['trae']);
|
||||
});
|
||||
|
||||
test('single choice for windsurf', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('17'), ['windsurf']);
|
||||
});
|
||||
|
||||
test('single choice for zcode', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('18'), ['zcode']);
|
||||
});
|
||||
|
||||
test('single choice for kimi', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('10'), ['kimi']);
|
||||
});
|
||||
|
||||
test('single choice for kimi-code (#2454)', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('11'), ['kimi-code']);
|
||||
});
|
||||
|
||||
test('choice 19 returns all runtimes', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('19'), allRuntimes);
|
||||
});
|
||||
|
||||
test('choice 19 returns all runtimes when mixed with separators or other tokens', () => {
|
||||
// CR feedback: tokenized inputs that include 19 (e.g. trailing comma, or
|
||||
// alongside other choices) must still expand to all-runtimes — previously
|
||||
// only the bare all-runtimes option matched, so "19," or "19 1" silently installed a
|
||||
// subset.
|
||||
assert.deepStrictEqual(parseRuntimeInput('19,'), allRuntimes);
|
||||
assert.deepStrictEqual(parseRuntimeInput('19 1'), allRuntimes);
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,19'), allRuntimes);
|
||||
assert.deepStrictEqual(parseRuntimeInput(' 19 '), allRuntimes);
|
||||
test('choice 7 returns all runtimes when mixed with separators or other tokens', () => {
|
||||
// CR feedback: tokenized inputs that include the "All" option (e.g. trailing
|
||||
// comma, or alongside other choices) must still expand to all-runtimes —
|
||||
// previously only the bare all-runtimes option matched, so "7," or "7 1"
|
||||
// silently installed a subset.
|
||||
assert.deepStrictEqual(parseRuntimeInput('7,'), allRuntimes);
|
||||
assert.deepStrictEqual(parseRuntimeInput('7 1'), allRuntimes);
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,7'), allRuntimes);
|
||||
assert.deepStrictEqual(parseRuntimeInput(' 7 '), allRuntimes);
|
||||
});
|
||||
|
||||
test('empty input defaults to claude', () => {
|
||||
@@ -135,18 +86,18 @@ describe('multi-runtime selection parsing', () => {
|
||||
});
|
||||
|
||||
test('invalid choices mixed with valid are filtered out', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,20,7'), ['claude', 'copilot']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('abc 3 xyz'), ['augment']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,20,3'), ['claude', 'codex']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('abc 3 xyz'), ['codex']);
|
||||
});
|
||||
|
||||
test('duplicate choices are deduplicated', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,1,1'), ['claude']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('7,7,9,9'), ['copilot', 'hermes']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('3,3,5,5'), ['codex', 'opencode']);
|
||||
});
|
||||
|
||||
test('preserves selection order', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('9,1,7'), ['hermes', 'claude', 'copilot']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('12,2,8'), ['kilo', 'antigravity', 'cursor']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('5,1,3'), ['opencode', 'claude', 'codex']);
|
||||
assert.deepStrictEqual(parseRuntimeInput('6,2,4'), ['zcode', 'antigravity', 'cursor']);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -154,27 +105,13 @@ describe('install.js exports multi-select runtime metadata', () => {
|
||||
const expectedRuntimeMap = {
|
||||
'1': 'claude',
|
||||
'2': 'antigravity',
|
||||
'3': 'augment',
|
||||
'4': 'cline',
|
||||
'5': 'codebuddy',
|
||||
'6': 'codex',
|
||||
'7': 'copilot',
|
||||
'8': 'cursor',
|
||||
'9': 'hermes',
|
||||
'10': 'kimi',
|
||||
'11': 'kimi-code',
|
||||
'12': 'kilo',
|
||||
'13': 'opencode',
|
||||
'14': 'pi',
|
||||
'15': 'qwen',
|
||||
'16': 'trae',
|
||||
'17': 'windsurf',
|
||||
'18': 'zcode',
|
||||
'3': 'codex',
|
||||
'4': 'cursor',
|
||||
'5': 'opencode',
|
||||
'6': 'zcode',
|
||||
};
|
||||
const expectedRuntimes = [
|
||||
'claude', 'antigravity', 'augment', 'cline', 'codebuddy', 'codex',
|
||||
'copilot', 'cursor', 'hermes', 'kimi', 'kimi-code', 'kilo', 'opencode', 'pi',
|
||||
'qwen', 'trae', 'windsurf', 'zcode',
|
||||
'claude', 'antigravity', 'codex', 'cursor', 'opencode', 'zcode',
|
||||
];
|
||||
|
||||
test('runtimeMap exports every option key bound to the right runtime', () => {
|
||||
@@ -191,33 +128,14 @@ describe('install.js exports multi-select runtime metadata', () => {
|
||||
'allRuntimes has no duplicates');
|
||||
});
|
||||
|
||||
test('"All" shortcut (option 19) selects every runtime', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('19'), allRuntimes);
|
||||
});
|
||||
|
||||
test('--kimi flag selects Kimi (Python kimi-cli) without interactive prompt', () => {
|
||||
assert.deepStrictEqual(selectRuntimesFromArgs(['--kimi']), ['kimi']);
|
||||
});
|
||||
|
||||
test('--kimi-code flag selects Kimi Code (Node CLI) without interactive prompt (#2454)', () => {
|
||||
assert.deepStrictEqual(selectRuntimesFromArgs(['--kimi-code']), ['kimi-code']);
|
||||
test('"All" shortcut (option 7) selects every runtime', () => {
|
||||
assert.deepStrictEqual(parseRuntimeInput('7'), allRuntimes);
|
||||
});
|
||||
|
||||
test('--zcode flag selects ZCode without interactive prompt', () => {
|
||||
assert.deepStrictEqual(selectRuntimesFromArgs(['--zcode']), ['zcode']);
|
||||
});
|
||||
|
||||
test('--pi flag selects pi without interactive prompt', () => {
|
||||
assert.deepStrictEqual(selectRuntimesFromArgs(['--pi']), ['pi']);
|
||||
});
|
||||
|
||||
test('--all flag includes Kimi exactly once', () => {
|
||||
const selected = selectRuntimesFromArgs(['--all']);
|
||||
assert.ok(selected.includes('kimi'), '--all includes kimi');
|
||||
assert.strictEqual(selected.filter((runtime) => runtime === 'kimi').length, 1,
|
||||
'--all includes kimi exactly once');
|
||||
});
|
||||
|
||||
test('--all flag includes ZCode exactly once', () => {
|
||||
const selected = selectRuntimesFromArgs(['--all']);
|
||||
assert.ok(selected.includes('zcode'), '--all includes zcode');
|
||||
@@ -225,33 +143,12 @@ describe('install.js exports multi-select runtime metadata', () => {
|
||||
'--all includes zcode exactly once');
|
||||
});
|
||||
|
||||
test('--all flag includes pi exactly once', () => {
|
||||
const selected = selectRuntimesFromArgs(['--all']);
|
||||
assert.ok(selected.includes('pi'), '--all includes pi');
|
||||
assert.strictEqual(selected.filter((runtime) => runtime === 'pi').length, 1,
|
||||
'--all includes pi exactly once');
|
||||
});
|
||||
|
||||
test('prompt lists pi (14), ZCode (18), and All (19)', () => {
|
||||
test('prompt lists ZCode (6) and All (7)', () => {
|
||||
const prompt = stripAnsi(buildRuntimePromptText());
|
||||
assert.ok(/\b9\)\s*Hermes Agent\b/.test(prompt),
|
||||
'prompt lists Hermes Agent as option 9');
|
||||
assert.ok(/\b10\)\s*Kimi\b/.test(prompt),
|
||||
'prompt lists Kimi as option 10');
|
||||
assert.ok(/Kimi\s+\(~\/\.config\/agents, then ~\/\.agents if existing\)/.test(prompt),
|
||||
'prompt shows the Kimi first-existing generic root policy');
|
||||
assert.ok(/\b11\)\s*Kimi Code\b/.test(prompt),
|
||||
'prompt lists Kimi Code as option 11 (#2454)');
|
||||
assert.ok(/\b14\)\s*pi\b/.test(prompt),
|
||||
'prompt lists pi as option 14');
|
||||
assert.ok(/\b15\)\s*Qwen Code\b/.test(prompt),
|
||||
'prompt lists Qwen Code as option 15');
|
||||
assert.ok(/\b16\)\s*Trae\b/.test(prompt),
|
||||
'prompt lists Trae as option 16');
|
||||
assert.ok(/\b18\)\s*ZCode\b/.test(prompt),
|
||||
'prompt lists ZCode as option 18');
|
||||
assert.ok(/\b19\)\s*All\b/.test(prompt),
|
||||
'prompt lists All as option 19');
|
||||
assert.ok(/\b6\)\s*ZCode\b/.test(prompt),
|
||||
'prompt lists ZCode as option 6');
|
||||
assert.ok(/\b7\)\s*All\b/.test(prompt),
|
||||
'prompt lists All as option 7');
|
||||
});
|
||||
|
||||
test('prompt does not list Gemini (removed #1928)', () => {
|
||||
@@ -269,11 +166,11 @@ describe('install.js exports multi-select runtime metadata', () => {
|
||||
// Behavioral assertion: same set of choices in different separators
|
||||
// produces the same selection, and duplicates collapse.
|
||||
assert.deepStrictEqual(
|
||||
parseRuntimeInput('1,7,9'),
|
||||
parseRuntimeInput('1 7 9'),
|
||||
parseRuntimeInput('1,3,5'),
|
||||
parseRuntimeInput('1 3 5'),
|
||||
'comma- and space-separated input yield identical selections'
|
||||
);
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,1,7,7'), ['claude', 'copilot'],
|
||||
assert.deepStrictEqual(parseRuntimeInput('1,1,3,3'), ['claude', 'codex'],
|
||||
'duplicates collapsed in order');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user