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

@@ -1,8 +1,14 @@
import { describe, it, expect, beforeEach, afterEach } from 'vitest';
import { GSDTools, GSDToolsError, resolveGsdToolsPath } from './gsd-tools.js';
import { mkdir, writeFile, rm } from 'node:fs/promises';
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import { tmpdir, homedir } from 'node:os';
import { fileURLToPath } from 'node:url';
const BUNDLED_GSD_TOOLS_PATH = fileURLToPath(
new URL('../../get-shit-done/bin/gsd-tools.cjs', import.meta.url),
);
describe('GSDTools', () => {
let tmpDir: string;
@@ -330,11 +336,13 @@ describe('GSDTools', () => {
expect(result).toBe(join(localBinDir, 'gsd-tools.cjs'));
});
it('falls back to global path when repo-local does not exist', () => {
it('falls back to bundled repo path when repo-local does not exist', () => {
const result = resolveGsdToolsPath(tmpDir);
expect(result).toBe(
join(homedir(), '.claude', 'get-shit-done', 'bin', 'gsd-tools.cjs'),
);
const expected = existsSync(BUNDLED_GSD_TOOLS_PATH)
? BUNDLED_GSD_TOOLS_PATH
: join(homedir(), '.claude', 'get-shit-done', 'bin', 'gsd-tools.cjs');
expect(result).toBe(expected);
});
it('constructor uses repo-local path when available', async () => {