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:
@@ -100,8 +100,7 @@ function tempDir(prefix) {
|
||||
before(() => {
|
||||
// --- worktree fixture: a linked git worktree on an agent-* branch, used by
|
||||
// msd-worktree-path-guard.js's deny case (absolute path escaping the active
|
||||
// worktree's git root) and msd-windsurf-pre-write.js's deny case (same
|
||||
// escape shape, different protocol). ---------------------------------------
|
||||
// worktree's git root). ---------------------------------------
|
||||
const mainRepo = tempDir('hooks-crash-main-');
|
||||
gitOrThrow(['init', '-q', mainRepo], { timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
|
||||
gitOrThrow(['-C', mainRepo, 'config', 'user.email', 'hooks-crash@test.local'], { timeoutMs: GIT_FIXTURE_TIMEOUT_MS });
|
||||
@@ -277,34 +276,6 @@ const TABLE = [
|
||||
assert.equal(r.stderr, out.reason);
|
||||
},
|
||||
},
|
||||
{
|
||||
file: 'msd-windsurf-pre-command.js',
|
||||
stdinTimeoutMs: 10000,
|
||||
declaredOnCrash: null, // catch calls allow(undefined) directly — no HOOK_ON_CRASH declared
|
||||
allow: () => ({ payload: { tool_info: { command_line: 'ls -la' } } }),
|
||||
deny: () => ({ payload: { tool_info: { command_line: 'rm -rf /' } } }),
|
||||
assertDeny: (r) => {
|
||||
assert.equal(r.stdout, '', 'deny(undefined, reason) must skip the fd 1 write entirely');
|
||||
assert.match(r.stderr, /rm -rf targeting the filesystem root/);
|
||||
},
|
||||
},
|
||||
{
|
||||
file: 'msd-windsurf-pre-write.js',
|
||||
stdinTimeoutMs: 10000,
|
||||
declaredOnCrash: null, // catch calls allow(undefined) directly — no HOOK_ON_CRASH declared
|
||||
// #3911: this hook's deny path depends on bounded (2000ms) spawnSync(git,
|
||||
// ...) probes, same shape as msd-worktree-path-guard.js above.
|
||||
gitProbeMayRace: true,
|
||||
allow: () => ({ payload: { tool_info: { file_path: 'nonexistent.txt' } }, cwd: os.tmpdir() }),
|
||||
deny: () => ({
|
||||
payload: { tool_info: { file_path: path.join(fixtures.mainRepo, 'README.md') } },
|
||||
cwd: fixtures.worktreePath,
|
||||
}),
|
||||
assertDeny: (r) => {
|
||||
assert.equal(r.stdout, '', 'deny(undefined, reason) must skip the fd 1 write entirely');
|
||||
assert.match(r.stderr, /resolves to git root/);
|
||||
},
|
||||
},
|
||||
{
|
||||
file: 'msd-statusline.js',
|
||||
stdinTimeoutMs: 3000,
|
||||
@@ -383,8 +354,8 @@ describe('hooks-crash-policy: C1 normal allow -> exit 0', () => {
|
||||
describe('hooks-crash-policy: C2 normal deny -> exit 2, correct stream(s)', () => {
|
||||
const denyRows = TABLE.filter((row) => typeof row.deny === 'function');
|
||||
|
||||
test('exactly 7 hooks in this table declare a deny case', () => {
|
||||
assert.equal(denyRows.length, 7, denyRows.map((r) => r.file).join(', '));
|
||||
test('exactly 5 hooks in this table declare a deny case', () => {
|
||||
assert.equal(denyRows.length, 5, denyRows.map((r) => r.file).join(', '));
|
||||
});
|
||||
|
||||
for (const row of denyRows) {
|
||||
@@ -496,7 +467,7 @@ describe('hooks-crash-policy: C4 stdin never closes -> bounded termination, not
|
||||
//
|
||||
// The C2 loop above tolerates a raced timeout but cannot FORCE one: on a
|
||||
// quiet machine the git probes in msd-worktree-path-guard.js,
|
||||
// msd-workflow-guard.js, and msd-windsurf-pre-write.js always answer well
|
||||
// and msd-workflow-guard.js always answer well
|
||||
// inside their 2000ms budget, so C2 alone would never actually exercise the
|
||||
// undetermined-probe branch. This suite forces the timeout deterministically
|
||||
// by putting a stub `git` on PATH that sleeps past every affected hook's own
|
||||
@@ -556,13 +527,6 @@ describe('hooks-crash-policy: #3911 git-probe timeout forced via a stub git -> a
|
||||
};
|
||||
},
|
||||
},
|
||||
{
|
||||
file: 'msd-windsurf-pre-write.js',
|
||||
build: () => ({
|
||||
payload: { tool_info: { file_path: 'msd-3911-stub-target.txt' } },
|
||||
cwd: os.tmpdir(),
|
||||
}),
|
||||
},
|
||||
];
|
||||
|
||||
for (const c of CASES) {
|
||||
|
||||
Reference in New Issue
Block a user