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:
Jakub Zych
2026-10-06 20:02:40 +02:00
parent 12ee75a509
commit 6cfa0c55d2
509 changed files with 1869 additions and 47737 deletions

View File

@@ -94,18 +94,6 @@ const GOLDEN = {
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── copilot ──────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// #1575: agents kind added (copilot cutover — .agent.md rename handled by _copyStaged).
'copilot/global': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'copilot/local': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── antigravity ──────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// #1575: agents kind added (antigravity cutover — scope-aware converter).
@@ -118,113 +106,6 @@ const GOLDEN = {
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── windsurf ─────────────────────────────────────────────────────────────────
// ADR-1235 step 1 (#1763): agents kind added to both scopes.
'windsurf/global': [
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'windsurf/local': [
{ kind: 'commands', destSubpath: 'workflows', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── augment ──────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// ADR-1235 step 1 (#1763): agents kind added.
'augment/global': [
{ kind: 'commands', destSubpath: 'commands', prefix: 'msd-' },
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'augment/local': [
{ kind: 'commands', destSubpath: 'commands', prefix: 'msd-' },
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── trae ─────────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// ADR-1235 step 1 (#1763): agents kind added.
'trae/global': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'trae/local': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── qwen ─────────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// ADR-1239 / #2092 Phase B Upgrade 1: agents kind added (native
// .qwen/agents/*.md subagent projection).
'qwen/global': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'qwen/local': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── hermes ───────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// #2875 Part 2: agents kind added (the inline loop wrote hermes agents too,
// via a new named branding converter — convertClaudeAgentToHermesAgent).
'hermes/global': [
{ kind: 'skills', destSubpath: 'skills/msd', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'hermes/local': [
{ kind: 'skills', destSubpath: 'skills/msd', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── codebuddy ────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// ADR-1235 step 1 (#1763): agents kind added.
'codebuddy/global': [
{ kind: 'commands', destSubpath: 'commands', prefix: 'msd-' },
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'codebuddy/local': [
{ kind: 'commands', destSubpath: 'commands', prefix: 'msd-' },
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── cline ────────────────────────────────────────────────────────────────────
// Old switch: scope='global' → [skills]; scope='local' → []. Matches descriptor.
// #2875 Part 2: agents kind added to global (the inline loop wrote cline
// agents too, via convertClaudeAgentToClineAgent).
// #2875 Part 2 defect fix (cline-local agents-drop regression, closed):
// cline was never scope-gated in the deleted inline loop either, so a real
// `cline --local` install ALSO wrote agent files pre-migration (to the
// project root, per hostBehaviors.localTargetIsProjectRoot). `local` now
// ALSO declares the agents kind (capabilities/cline/capability.json),
// restoring that behavior — see tests/agent-descriptor-parity.test.cjs's
// cline (local) H row and tests/cline-install.test.cjs's local-install
// regression test for the byte-parity / end-to-end proofs. `local` still
// declares no `skills` kind: cline-local commands are embedded in
// .clinerules, never materialized as skill files
// (hostBehaviors.localCommandsViaRules).
'cline/global': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'cline/local': [
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── kimi ─────────────────────────────────────────────────────────────────────
// Old switch: scope='global' → [skills, kimi-agents]; scope='local' → []. Matches descriptor.
'kimi/global': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'kimi-agents', destSubpath: 'agents', prefix: 'msd' },
],
'kimi/local': [],
// ── opencode ─────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// #2329: destSubpath corrected from singular 'command' to plural 'commands' —
@@ -246,29 +127,26 @@ const GOLDEN = {
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
// ── kilo ─────────────────────────────────────────────────────────────────────
// Old switch: no scope branch → local == global. 5b backfill restores this.
// #2875 Part 2: agents kind added (mirrors opencode — same combined-family
// install shape, same install-engine.cts installOpencodeFamilyArtifacts /
// installAgentsKindStandalone coverage).
'kilo/global': [
{ kind: 'commands', destSubpath: 'command', prefix: 'msd-' },
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
// ── zcode ────────────────────────────────────────────────────────────────────
// Same layout in both scopes: skills + commands + agents.
'zcode/global': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'commands', destSubpath: 'commands', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
'kilo/local': [
{ kind: 'commands', destSubpath: 'command', prefix: 'msd-' },
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
'zcode/local': [
{ kind: 'skills', destSubpath: 'skills', prefix: 'msd-' },
{ kind: 'commands', destSubpath: 'commands', prefix: 'msd-' },
{ kind: 'agents', destSubpath: 'agents', prefix: 'msd-' },
],
};
// ── Parametrized tests ────────────────────────────────────────────────────────
const RUNTIMES = [
'claude', 'cursor', 'codex', 'copilot',
'antigravity', 'windsurf', 'augment', 'trae', 'qwen',
'hermes', 'codebuddy', 'cline', 'kimi', 'opencode', 'kilo',
'claude', 'cursor', 'codex',
'antigravity', 'opencode', 'zcode',
];
for (const runtime of RUNTIMES) {
@@ -414,21 +292,13 @@ describe('resolveRuntimeArtifactLayout — scope defaults to global (descriptor-
assert.strictEqual(withDefault.kinds[i].prefix, withExplicit.kinds[i].prefix);
}
});
test('omitting scope yields global layout for kimi (2 kinds)', () => {
const layout = resolveRuntimeArtifactLayout('kimi', FAKE_DIR);
assert.strictEqual(layout.scope, 'global');
assert.strictEqual(layout.kinds.length, 2);
assert.strictEqual(layout.kinds[0].kind, 'skills');
assert.strictEqual(layout.kinds[1].kind, 'kimi-agents');
});
});
// ── Non-vacuous check: verify at least one multi-kind runtime ─────────────────
describe('resolveRuntimeArtifactLayout — multi-kind runtimes non-vacuous (descriptor-driven)', () => {
test('augment global returns 3 kinds (commands + skills + agents)', () => {
const layout = resolveRuntimeArtifactLayout('augment', FAKE_DIR, 'global');
test('opencode global returns 3 kinds (commands + skills + agents)', () => {
const layout = resolveRuntimeArtifactLayout('opencode', FAKE_DIR, 'global');
assert.strictEqual(layout.kinds.length, 3);
assert.strictEqual(layout.kinds[0].kind, 'commands');
assert.strictEqual(layout.kinds[1].kind, 'skills');
@@ -437,21 +307,4 @@ describe('resolveRuntimeArtifactLayout — multi-kind runtimes non-vacuous (desc
assert.strictEqual(typeof layout.kinds[1].stage, 'function');
assert.strictEqual(typeof layout.kinds[2].stage, 'function');
});
test('kimi global returns skills then kimi-agents', () => {
const layout = resolveRuntimeArtifactLayout('kimi', FAKE_DIR, 'global');
assert.strictEqual(layout.kinds.length, 2);
assert.strictEqual(layout.kinds[0].kind, 'skills');
assert.strictEqual(layout.kinds[1].kind, 'kimi-agents');
assert.strictEqual(layout.kinds[1].destSubpath, 'agents');
assert.strictEqual(layout.kinds[1].prefix, 'msd');
});
test('codebuddy global returns commands then skills then agents', () => {
const layout = resolveRuntimeArtifactLayout('codebuddy', FAKE_DIR, 'global');
assert.strictEqual(layout.kinds.length, 3);
assert.strictEqual(layout.kinds[0].kind, 'commands');
assert.strictEqual(layout.kinds[1].kind, 'skills');
assert.strictEqual(layout.kinds[2].kind, 'agents');
});
});