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

@@ -1669,14 +1669,8 @@ test('shipped installer-migration checksums are locked to a committed baseline (
// fix-forward migration widens the scanned surface without touching 000.
'2026-07-17-opencode-baseline-commands-dir':
'sha256:3310ef32615b0b214f39f660f19a734ba1fe7d7200fe0a10b0ffc86fca15b39a',
// Migration 006 (NEW, added here per this test's own sanctioned "adding a new
// migration" case — not a shipped-body edit): retire pi's stale
// extensions/msd.cjs. #2470 renamed the installed extension to
// extensions/msd.js because pi's isExtensionFile() auto-discovery accepts
// only .ts/.js and silently skips everything else; without this migration the
// old path drops out of the manifest and uninstall can never remove it.
'2026-07-20-pi-extension-cjs-to-js':
'sha256:7cba8de555a7d09f23c19ea2409dc83586f91fb02c38d079aee2dd8e9744471d',
// Migration 006 (pi extension .cjs -> .js) was retired together with the pi
// runtime (prune-runtimes) — no baseline entry.
// Migration 007 (NEW, added here per this test's own sanctioned "adding a new
// migration" case — not a shipped-body edit): retire the pre-#2544
// {"type":"commonjs"} marker at the runtime config root. #2544 moved that
@@ -1689,14 +1683,8 @@ test('shipped installer-migration checksums are locked to a committed baseline (
// Migration 008: retire Cursor's duplicate commands/ surface (#2644).
'2026-07-29-cursor-retire-commands-surface':
'sha256:8d340681ea3bbe77ed36bb36996953b3753950d8f2360a1c8222f96b618c71ec',
// Migration 009 (NEW, added here per this test's own sanctioned "adding a new
// migration" case — not a shipped-body edit): retire pi's reserved hooks/
// directory now that the shared hook bundle installs at msd-hooks/ instead
// (#3023). pi warns on hooks/'s mere existence regardless of contents, so an
// upgraded install must have both the legacy files AND the emptied directory
// itself retired via the new remove-empty-dir action.
'2026-08-07-pi-retire-reserved-hooks-dir':
'sha256:bb58ef391b3ee6fb61f9cacadd05f54ed57c8f7454553ec68ef4c18dc26b19f2',
// Migration 009 (pi retire reserved hooks/ dir) was retired together with the
// pi runtime (prune-runtimes) — no baseline entry.
// Migration 010 (NEW, added here per this test's own sanctioned "adding a new
// migration" case): retire Antigravity's configHome skills/agents surfaces
// (#3738). Antigravity scans ~/.gemini/config for global discovery, so
@@ -2872,14 +2860,17 @@ describe('migration.plan()', () => {
//
// `fs.copyFileSync` follows symlinks. Before this hardening, a managed path
// replaced by a link would have had the LINK TARGET's bytes copied into the
// journal's backup tree — e.g. a `msd.cjs` symlinked at a private key would
// journal's backup tree — e.g. a managed hook file symlinked at a private key would
// land that key's contents under msd-migration-journal/. Nothing MSD installs
// is ever a symlink, so the faithful snapshot is the link itself.
{
const { describe, test } = require('node:test');
describe('symlinked managed path is snapshotted as a link, never dereferenced', () => {
const piExtensionMigration = require('../msd-core/bin/lib/installer-migrations/006-pi-extension-cjs-to-js.cjs');
// Vehicle: migration 001 (legacy orphan hook files) — runtime-agnostic and
// emits the same backup-and-remove action the retired pi migration did.
const legacyOrphanMigration = require('../msd-core/bin/lib/installer-migrations/001-legacy-orphan-files.cjs');
const MANAGED_REL = 'hooks/msd-notify.sh';
const SECRET = 'TOP-SECRET-PRIVATE-KEY-MATERIAL\n';
test('backup-and-remove on a symlinked managed file copies the link, not the referent', (t) => {
@@ -2889,7 +2880,7 @@ describe('migration.plan()', () => {
const secretPath = path.join(secretDir, 'id_rsa');
fs.writeFileSync(secretPath, SECRET, 'utf8');
const linkPath = path.join(configDir, 'extensions', 'msd.cjs');
const linkPath = path.join(configDir, ...MANAGED_REL.split('/'));
fs.mkdirSync(path.dirname(linkPath), { recursive: true });
try {
fs.symlinkSync(secretPath, linkPath);
@@ -2900,13 +2891,13 @@ describe('migration.plan()', () => {
// Manifest records the path as managed with a hash that cannot match the
// referent -> classification 'managed-modified' -> backup-and-remove.
writeManifest(configDir, { 'extensions/msd.cjs': sha256('the original extension\n') });
writeManifest(configDir, { [MANAGED_REL]: sha256('the original extension\n') });
const result = runInstallerMigrations({
configDir,
runtime: 'pi',
runtime: 'claude',
scope: 'global',
migrations: [piExtensionMigration],
migrations: [legacyOrphanMigration],
now: () => '2026-07-20T00:00:00.000Z',
});
@@ -2948,14 +2939,14 @@ describe('migration.plan()', () => {
const configDir = createTempInstall();
t.after(() => cleanup(configDir));
writeFile(configDir, 'extensions/msd.cjs', 'locally patched extension\n');
writeManifest(configDir, { 'extensions/msd.cjs': sha256('the original extension\n') });
writeFile(configDir, MANAGED_REL, 'locally patched extension\n');
writeManifest(configDir, { [MANAGED_REL]: sha256('the original extension\n') });
const result = runInstallerMigrations({
configDir,
runtime: 'pi',
runtime: 'claude',
scope: 'global',
migrations: [piExtensionMigration],
migrations: [legacyOrphanMigration],
now: () => '2026-07-20T00:00:00.000Z',
});
@@ -2973,7 +2964,7 @@ describe('migration.plan()', () => {
'locally patched extension\n',
'a real file must still be backed up by content so the user can recover it',
);
assert.ok(!fs.existsSync(path.join(configDir, 'extensions', 'msd.cjs')));
assert.ok(!fs.existsSync(path.join(configDir, ...MANAGED_REL.split('/'))));
});
// In-flight failure recovery: when a later step of the SAME apply() attempt
@@ -2997,7 +2988,7 @@ describe('migration.plan()', () => {
const secretPath = path.join(secretDir, 'id_rsa');
fs.writeFileSync(secretPath, SECRET, 'utf8');
const linkPath = path.join(configDir, 'extensions', 'msd.cjs');
const linkPath = path.join(configDir, ...MANAGED_REL.split('/'));
fs.mkdirSync(path.dirname(linkPath), { recursive: true });
try {
fs.symlinkSync(secretPath, linkPath);
@@ -3005,7 +2996,7 @@ describe('migration.plan()', () => {
t.skip('symlink creation unsupported on this platform/privilege');
return;
}
writeManifest(configDir, { 'extensions/msd.cjs': sha256('the original extension\n') });
writeManifest(configDir, { [MANAGED_REL]: sha256('the original extension\n') });
let fired = false;
fs.rmSync = function patched(target, options) {
@@ -3019,9 +3010,9 @@ describe('migration.plan()', () => {
assert.throws(() => runInstallerMigrations({
configDir,
runtime: 'pi',
runtime: 'claude',
scope: 'global',
migrations: [piExtensionMigration],
migrations: [legacyOrphanMigration],
now: () => '2026-07-20T00:00:00.000Z',
}), /injected post-delete failure/, 'the injected failure must propagate, not be swallowed');
@@ -3067,7 +3058,7 @@ describe('migration.plan()', () => {
const targetPath = path.join(secretDir, 'id_rsa');
fs.writeFileSync(targetPath, SECRET, 'utf8');
const linkPath = path.join(configDir, 'extensions', 'msd.cjs');
const linkPath = path.join(configDir, ...MANAGED_REL.split('/'));
fs.mkdirSync(path.dirname(linkPath), { recursive: true });
try {
fs.symlinkSync(targetPath, linkPath);
@@ -3075,13 +3066,13 @@ describe('migration.plan()', () => {
t.skip('symlink creation unsupported on this platform/privilege');
return;
}
writeManifest(configDir, { 'extensions/msd.cjs': sha256('the original extension\n') });
writeManifest(configDir, { [MANAGED_REL]: sha256('the original extension\n') });
const result = runInstallerMigrations({
configDir,
runtime: 'pi',
runtime: 'claude',
scope: 'global',
migrations: [piExtensionMigration],
migrations: [legacyOrphanMigration],
now: () => '2026-07-20T00:00:00.000Z',
});
assert.equal(fs.lstatSync(linkPath, { throwIfNoEntry: false }), undefined, 'link removed by apply');