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

@@ -2443,7 +2443,7 @@ describe('#2393: MSD_ALLOW_SYMLINKED_DEST opt-in for intentional symlinked-dest
//
// The native-plugin copy previously confined only `nativePlugin.dir`, then
// joined `nativePlugin.file` onto the validated directory unchecked. #2470
// makes `file` a field we actively change (pi: msd.cjs -> msd.js), so the full
// makes `file` a field we actively change (msd.cjs -> msd.js), so the full
// dest path is now confined. Descriptors are first-party and compiled into the
// capability registry at build time, so this was never reachable in a shipped
// build — these tests keep it that way.
@@ -2454,21 +2454,21 @@ describe('_installNativePluginIfDeclared write-confinement', () => {
/** Build a src tree containing the declared plugin source. */
function stageSource() {
const src = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-np-src-'));
const full = path.join(src, 'pi', 'msd.cjs');
const full = path.join(src, 'pi-plugin', 'msd.cjs');
fs.mkdirSync(path.dirname(full), { recursive: true });
fs.writeFileSync(full, "'use strict';\n// plugin\n", 'utf8');
return src;
}
const behaviorsWith = (file) => ({
nativePlugin: { dir: 'extensions', file, source: 'pi/msd.cjs' },
nativePlugin: { dir: 'extensions', file, source: 'pi-plugin/msd.cjs' },
});
test('happy path: declared dir/file lands inside configDir', () => {
const configDir = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-np-cfg-'));
const src = stageSource();
try {
engine._installNativePluginIfDeclared('pi', configDir, behaviorsWith('msd.js'), src);
engine._installNativePluginIfDeclared('opencode', configDir, behaviorsWith('msd.js'), src);
assert.ok(
fs.existsSync(path.join(configDir, 'extensions', 'msd.js')),
'plugin should be copied to <configDir>/extensions/msd.js',
@@ -2491,7 +2491,7 @@ describe('_installNativePluginIfDeclared write-confinement', () => {
const src = stageSource();
try {
assert.throws(
() => engine._installNativePluginIfDeclared('pi', configDir, behaviorsWith(file), src),
() => engine._installNativePluginIfDeclared('opencode', configDir, behaviorsWith(file), src),
/escap|strict subpath|configHome|NUL byte/i,
`nativePlugin.file=${JSON.stringify(file)} must be rejected, not joined onto the validated dir`,
);
@@ -2509,7 +2509,7 @@ describe('_installNativePluginIfDeclared write-confinement', () => {
try {
const escapeFile = path.join('..', '..', path.basename(outside), 'pwned.js');
assert.throws(
() => engine._installNativePluginIfDeclared('pi', configDir, behaviorsWith(escapeFile), src),
() => engine._installNativePluginIfDeclared('opencode', configDir, behaviorsWith(escapeFile), src),
/escap|strict subpath|configHome/i,
);
assert.ok(
@@ -2528,7 +2528,7 @@ describe('_installNativePluginIfDeclared write-confinement', () => {
const src = fs.mkdtempSync(path.join(os.tmpdir(), 'msd-np-emptysrc-'));
try {
assert.doesNotThrow(() =>
engine._installNativePluginIfDeclared('pi', configDir, behaviorsWith('msd.js'), src),
engine._installNativePluginIfDeclared('opencode', configDir, behaviorsWith('msd.js'), src),
);
assert.ok(!fs.existsSync(path.join(configDir, 'extensions', 'msd.js')));
} finally {
@@ -3167,19 +3167,20 @@ describe('install()/uninstall() degrade (never abort) on a staging-root resoluti
test('install() proceeds and still writes msd-core/ when the staging root is a hostile symlink', () => {
withHostileStagingSymlink((tmp) => {
assert.doesNotThrow(() => install(false, 'cline'), 'install() must degrade, never throw, on a staging-root failure');
assert.ok(fs.existsSync(path.join(tmp, 'msd-core')), 'msd-core/ must still be installed despite the staging-root failure');
assert.doesNotThrow(() => install(false, 'claude'), 'install() must degrade, never throw, on a staging-root failure');
assert.ok(fs.existsSync(path.join(tmp, '.claude', 'msd-core')), 'msd-core/ must still be installed despite the staging-root failure');
});
});
test('uninstall() proceeds and still removes msd-core/ when the staging root is a hostile symlink', () => {
withHostileStagingSymlink((tmp) => {
// Bypass the (also-degrading) install() path to set up a realistic
// pre-existing msd-core/ without depending on install() itself.
fs.mkdirSync(path.join(tmp, 'msd-core'), { recursive: true });
fs.writeFileSync(path.join(tmp, 'msd-core', 'USER-PROFILE.md'), 'user content');
assert.doesNotThrow(() => uninstall(false, 'cline'), 'uninstall() must degrade, never throw, on a staging-root failure');
assert.ok(!fs.existsSync(path.join(tmp, 'msd-core')), 'msd-core/ must still be removed despite the staging-root failure');
// Set up a realistic pre-existing install. install() degrades (never
// aborts) under the same hostile staging root — proven by the test
// above — so it is safe to use as the setup step here.
install(false, 'claude');
assert.ok(fs.existsSync(path.join(tmp, '.claude', 'msd-core')), 'precondition: msd-core/ installed');
assert.doesNotThrow(() => uninstall(false, 'claude'), 'uninstall() must degrade, never throw, on a staging-root failure');
assert.ok(!fs.existsSync(path.join(tmp, '.claude', 'msd-core')), 'msd-core/ must still be removed despite the staging-root failure');
});
});
});