feat: add Kilo CLI runtime support

This commit is contained in:
Alex Alecu
2026-03-31 15:59:31 +03:00
parent 1421dc07bc
commit ac4836d270
38 changed files with 1191 additions and 292 deletions

View File

@@ -14,14 +14,14 @@
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
import { execSync } from 'node:child_process';
import { mkdtemp, rm, readFile, stat, readdir } from 'node:fs/promises';
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import { tmpdir } from 'node:os';
import { fileURLToPath } from 'node:url';
import { homedir } from 'node:os';
import { GSD } from './index.js';
import { InitRunner } from './init-runner.js';
import { GSDTools } from './gsd-tools.js';
import { GSDTools, resolveGsdToolsPath } from './gsd-tools.js';
import { GSDEventStream } from './event-stream.js';
import { GSDEventType, PhaseStepType } from './types.js';
import type { GSDEvent, PhaseRunnerResult, RoadmapAnalysis } from './types.js';
@@ -38,7 +38,8 @@ try {
const __dirname = fileURLToPath(new URL('.', import.meta.url));
const sdkPromptsDir = join(__dirname, '..', 'prompts');
const GSD_TOOLS_PATH = join(homedir(), '.claude', 'get-shit-done', 'bin', 'gsd-tools.cjs');
const GSD_TOOLS_PATH = resolveGsdToolsPath(process.cwd());
const gsdToolsAvailable = existsSync(GSD_TOOLS_PATH);
// ─── Lifecycle step ordering for monotonicity check ──────────────────────────
@@ -54,7 +55,7 @@ const STEP_ORDER: Record<string, number> = {
// ─── Test suite ──────────────────────────────────────────────────────────────
describe.skipIf(!cliAvailable)('E2E Lifecycle: InitRunner → GSD.runPhase() full lifecycle', () => {
describe.skipIf(!cliAvailable || !gsdToolsAvailable)('E2E Lifecycle: InitRunner → GSD.runPhase() full lifecycle', () => {
let tmpDir: string;
let initSuccess: boolean = false;
let phase1Number: string | null = null;