fix: improve ingest runtime readiness

This commit is contained in:
Andrey Avtomonov 2026-05-17 02:08:28 +02:00
parent de72a10ffb
commit 564851508b
19 changed files with 927 additions and 25 deletions

View file

@ -25,13 +25,14 @@ describe('KTX setup config helpers', () => {
await markKtxSetupStateStepComplete(tempDir, 'project');
await markKtxSetupStateStepComplete(tempDir, 'project');
await markKtxSetupStateStepComplete(tempDir, 'llm');
await markKtxSetupStateStepComplete(tempDir, 'runtime');
await markKtxSetupStateStepComplete(tempDir, 'context');
expect(await readKtxSetupState(tempDir)).toEqual({
completed_steps: ['project', 'llm', 'context'],
completed_steps: ['project', 'llm', 'runtime', 'context'],
});
await expect(readFile(join(tempDir, '.ktx', 'setup', 'state.json'), 'utf-8')).resolves.toBe(
`${JSON.stringify({ completed_steps: ['project', 'llm', 'context'] }, null, 2)}\n`,
`${JSON.stringify({ completed_steps: ['project', 'llm', 'runtime', 'context'] }, null, 2)}\n`,
);
});

View file

@ -2,7 +2,16 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises';
import { join } from 'node:path';
import type { KtxProjectConfig } from './config.js';
export const KTX_SETUP_STEPS = ['project', 'llm', 'embeddings', 'databases', 'sources', 'context', 'agents'] as const;
export const KTX_SETUP_STEPS = [
'project',
'llm',
'embeddings',
'databases',
'sources',
'runtime',
'context',
'agents',
] as const;
export type KtxSetupStep = (typeof KTX_SETUP_STEPS)[number];