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

@@ -541,9 +541,10 @@ describe('detect-custom-files — skills/ directory missing from MSD_MANAGED_DIR
// #3023 adversarial-review finding — detect-custom-files was blind to a
// runtime-renamed shared-hook bundle (MSD_PREFIX_MANAGED_DIRS hardcoded
// 'hooks'; a pi install's bundle lives at 'msd-hooks/', so the whole
// directory — and any user file inside it — was invisible to the scan and
// therefore never backed up before the next clean-install wipe).
// 'hooks'; a runtime whose bundle lives elsewhere was invisible to the scan
// and therefore never backed up before the next clean-install wipe). The
// only runtime that ever renamed the bundle (pi) has been removed; the
// remaining tests pin the default hooks/ behaviour.
describe('detect-custom-files — renamed shared-hooks bundle (#3023 finding 1)', () => {
let tmpDir;
@@ -561,47 +562,6 @@ describe('detect-custom-files — renamed shared-hooks bundle (#3023 finding 1)'
fs.writeFileSync(path.join(dir, '.msd-runtime'), runtimeId);
}
// Regression test — fails before the fix: with 'hooks' hardcoded, absDir
// resolves to <configDir>/hooks, which does not exist for a pi install, so
// the scan never even looks inside msd-hooks/.
test('pi-shaped install: a user-added msd-prefixed file under msd-hooks/ is reported as custom', () => {
writeManifest(tmpDir, {
'msd-hooks/msd-context-monitor.js': '// real MSD hook\n',
});
writeRuntimeMarker(tmpDir, 'pi');
fs.writeFileSync(
path.join(tmpDir, 'msd-hooks', 'msd-my-own-hook.js'),
'// user-added hook, not shipped by MSD\n',
);
const result = runMsdTools(['detect-custom-files', '--config-dir', tmpDir], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const json = JSON.parse(result.output);
assert.ok(
json.custom_files.includes('msd-hooks/msd-my-own-hook.js'),
`expected msd-hooks/msd-my-own-hook.js to be reported as custom; got: ${JSON.stringify(json.custom_files)}`
);
});
test('pi-shaped install: the same file is NOT reported as custom once it is tracked in the manifest', () => {
writeManifest(tmpDir, {
'msd-hooks/msd-context-monitor.js': '// real MSD hook\n',
'msd-hooks/msd-my-own-hook.js': '// now shipped/tracked\n',
});
writeRuntimeMarker(tmpDir, 'pi');
const result = runMsdTools(['detect-custom-files', '--config-dir', tmpDir], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const json = JSON.parse(result.output);
assert.ok(
!json.custom_files.includes('msd-hooks/msd-my-own-hook.js'),
`manifest-tracked file must not be reported as custom; got: ${JSON.stringify(json.custom_files)}`
);
});
test('claude-shaped install: behavior at hooks/ is byte-identical to before the fix', () => {
writeManifest(tmpDir, {
'hooks/msd-context-monitor.js': '// real MSD hook\n',
@@ -623,29 +583,6 @@ describe('detect-custom-files — renamed shared-hooks bundle (#3023 finding 1)'
);
});
test('runtime undeterminable (no .msd-runtime marker): the fallback still finds a user file under msd-hooks/', () => {
writeManifest(tmpDir, {
'agents/msd-executor.md': '# MSD Executor\n',
});
// Deliberately no .msd-runtime marker written — simulates an install
// predating #2297, or an unreadable/corrupt registry lookup.
fs.mkdirSync(path.join(tmpDir, 'msd-hooks'), { recursive: true });
fs.writeFileSync(
path.join(tmpDir, 'msd-hooks', 'msd-my-own-hook.js'),
'// user-added hook, not shipped by MSD\n',
);
const result = runMsdTools(['detect-custom-files', '--config-dir', tmpDir], tmpDir);
assert.ok(result.success, `Command failed: ${result.error}`);
const json = JSON.parse(result.output);
assert.ok(
json.custom_files.includes('msd-hooks/msd-my-own-hook.js'),
`expected the fallback scan to find msd-hooks/msd-my-own-hook.js; got: ${JSON.stringify(json.custom_files)}`
);
});
test('agents/ and skills/ scanning is unaffected by the hooks-dir resolution change', () => {
writeManifest(tmpDir, {
'agents/msd-executor.md': '# MSD Executor\n',