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

@@ -9,10 +9,9 @@
* `<runtime_compatibility>...</runtime_compatibility>` blocks, which must
* survive byte-for-byte verbatim (a runtime-comparison table that says
* "Claude Code" is describing Claude Code's own behavior, not this
* runtime's — brand-swapping it mislabels the comparison). The Windsurf
* converter got this fix; every sibling markdown/agent converter that also
* performs a "Claude Code" -> brand swap needed the SAME fix (#2284b
* follow-up).
* runtime's — brand-swapping it mislabels the comparison). Every
* markdown/agent converter that performs a "Claude Code" -> brand swap needs
* the SAME fix (#2284b follow-up).
*
* A per-converter regression test would only catch a REintroduction in the
* converter it targets — the exact shape of divergence CONTEXT.md's
@@ -30,46 +29,15 @@ const { describe, test } = require('node:test');
const assert = require('node:assert/strict');
const conv = require('../msd-core/bin/lib/runtime-artifact-conversion.cjs');
const capabilityRegistry = require('../msd-core/bin/lib/capability-registry.cjs');
// Qwen/Hermes brand-swap the "Claude Code" literal to a descriptor-driven
// value (runtime.hostBehaviors.brandingRewrites), not a hardcoded string —
// read the SAME source the converters themselves read, so this test can
// never drift from the shipped descriptor.
function brandingRewrite(runtime, key) {
return capabilityRegistry.runtimes[runtime].runtime.hostBehaviors.brandingRewrites[key];
}
const QWEN_BRAND = brandingRewrite('qwen', 'Claude Code');
const HERMES_BRAND = brandingRewrite('hermes', 'Claude Code');
/**
* Every runtime converter in src/runtime-artifact-conversion.cts that
* performs a "Claude Code" -> brand swap, normalized to a uniform
* `(content) => string` shape regardless of the underlying function's real
* signature (fixed-brand markdown converters vs descriptor-driven
* agent/rewrite functions).
* signature.
*/
const BRAND_SWAP_CONVERTERS = [
{ name: 'cursor', brand: 'Cursor', convert: (content) => conv.convertClaudeToCursorMarkdown(content) },
{ name: 'windsurf', brand: 'Windsurf', convert: (content) => conv.convertClaudeToWindsurfMarkdown(content) },
{ name: 'augment', brand: 'Augment', convert: (content) => conv.convertClaudeToAugmentMarkdown(content) },
{ name: 'trae', brand: 'Trae', convert: (content) => conv.convertClaudeToTraeMarkdown(content) },
{ name: 'codebuddy', brand: 'CodeBuddy', convert: (content) => conv.convertClaudeToCodebuddyMarkdown(content) },
{ name: 'cline', brand: 'Cline', convert: (content) => conv.convertClaudeToCliineMarkdown(content) },
// Dynamic (descriptor-driven) brand converters — same protected-region
// guard, brand value sourced from capability.json instead of a literal.
{ name: 'qwen-agent', brand: QWEN_BRAND, convert: (content) => conv.convertClaudeAgentToQwenAgent(content) },
{
name: 'qwen-runtime-rewrites',
brand: QWEN_BRAND,
convert: (content) => conv._applyRuntimeRewrites(content, 'qwen', '~/.qwen/', false, undefined),
},
{
name: 'hermes-runtime-rewrites',
brand: HERMES_BRAND,
convert: (content) => conv._applyRuntimeRewrites(content, 'hermes', '~/.hermes/', false, undefined),
},
];
// Floor, not an exact count (mirrors MINIMUM_MANIFEST_FAMILIES in
@@ -77,7 +45,7 @@ const BRAND_SWAP_CONVERTERS = [
// brand-swapping converter must be added here explicitly and reviewably.
// Lowering it is a deliberate act; this only guards it from silently
// shrinking underneath a refactor.
const MINIMUM_BRAND_SWAP_CONVERTER_COUNT = 9;
const MINIMUM_BRAND_SWAP_CONVERTER_COUNT = 1;
const PROTECTED_BLOCK =
'<runtime_compatibility>\n| Runtime | Claude Code | Other |\n|---|---|---|\n| x | Claude Code native | y |\n</runtime_compatibility>';