refactor(workspace): rewrite @ktx/llm imports to relative paths

This commit is contained in:
Andrey Avtomonov 2026-05-21 03:09:44 +02:00
parent 8d2a36eb2f
commit 8c2333cc15
19 changed files with 38 additions and 18 deletions

View file

@ -1,4 +1,4 @@
import type { KtxModelRole } from '@ktx/llm';
import type { KtxModelRole } from '../../../../cli/src/llm/index.js';
import { type KtxLogger, noopLogger } from '../../core/index.js';
import type { AgentRunnerPort, KtxRuntimeToolSet } from '../../llm/index.js';
import type { MemoryAction } from '../../memory/index.js';

View file

@ -15,7 +15,7 @@ import {
type KtxLlmRuntimePort,
type KtxRuntimeToolSet,
} from '../llm/index.js';
import type { KtxEmbeddingProvider } from '@ktx/llm';
import type { KtxEmbeddingProvider } from '../../../cli/src/llm/index.js';
import type { KtxLocalProject } from '../project/index.js';
import { ktxLocalStateDbPath } from '../project/index.js';
import { PromptService } from '../prompts/index.js';

View file

@ -34,7 +34,7 @@ export interface RunLocalIngestOptions {
semanticLayerCompute?: KtxSemanticLayerComputePort;
queryExecutor?: KtxSqlQueryExecutorPort;
logger?: KtxLogger;
embeddingProvider?: import('@ktx/llm').KtxEmbeddingProvider | null;
embeddingProvider?: import('../../../cli/src/llm/index.js').KtxEmbeddingProvider | null;
}
export interface LocalIngestMcpOptions
@ -173,7 +173,7 @@ async function runScheduledPullJob(options: {
semanticLayerCompute?: KtxSemanticLayerComputePort;
queryExecutor?: KtxSqlQueryExecutorPort;
logger?: KtxLogger;
embeddingProvider?: import('@ktx/llm').KtxEmbeddingProvider | null;
embeddingProvider?: import('../../../cli/src/llm/index.js').KtxEmbeddingProvider | null;
}): Promise<LocalIngestResult> {
const runtime = createLocalBundleIngestRuntime(options);
const jobId = options.jobId ?? runtime.nextJobId();

View file

@ -1,4 +1,4 @@
import type { KtxModelRole } from '@ktx/llm';
import type { KtxModelRole } from '../../../cli/src/llm/index.js';
import type { KtxEmbeddingPort } from '../core/embedding.js';
import type { GitService, KtxFileStorePort, KtxLogger, SessionOutcome } from '../core/index.js';
import type { AgentRunnerPort, KtxLlmRuntimePort, KtxRuntimeToolSet } from '../llm/index.js';

View file

@ -1,4 +1,4 @@
import type { KtxModelRole } from '@ktx/llm';
import type { KtxModelRole } from '../../../../cli/src/llm/index.js';
import type { AgentRunnerPort, KtxRuntimeToolSet } from '@ktx/context';
import type { CaptureSession, MemoryAction } from '../../memory/index.js';
import { listTouchedSlSources, type TouchedSlSource } from '../../tools/index.js';

View file

@ -1,5 +1,5 @@
import type { AgentRunnerPort, KtxRuntimeToolSet } from '@ktx/context';
import type { KtxModelRole } from '@ktx/llm';
import type { KtxModelRole } from '../../../../cli/src/llm/index.js';
import type { EvictionUnit } from '../types.js';
import type { StageIndex } from './stage-index.types.js';

View file

@ -1,4 +1,4 @@
import { KtxMessageBuilder, splitKtxSystemMessages, type KtxLlmProvider } from '@ktx/llm';
import { KtxMessageBuilder, splitKtxSystemMessages, type KtxLlmProvider } from '../../../cli/src/llm/index.js';
import { generateText, Output, stepCountIs, type FlexibleSchema, type TelemetrySettings, type ToolSet } from 'ai';
import type { z } from 'zod';
import { noopLogger, type KtxLogger } from '../core/index.js';

View file

@ -1,7 +1,7 @@
import { appendFile, mkdir } from 'node:fs/promises';
import { dirname } from 'node:path';
import type { ModelMessage } from 'ai';
import type { KtxModelRole } from '@ktx/llm';
import type { KtxModelRole } from '../../../cli/src/llm/index.js';
type ProviderOptionsCarrier = { providerOptions?: unknown; [key: string]: unknown };
type ToolMap = Record<string, ProviderOptionsCarrier>;

View file

@ -1,4 +1,4 @@
import type { KtxEmbeddingProvider } from '@ktx/llm';
import type { KtxEmbeddingProvider } from '../../../cli/src/llm/index.js';
import type { KtxEmbeddingPort as KtxIngestEmbeddingPort } from '../core/embedding.js';
import type { KtxEmbeddingPort as KtxScanEmbeddingPort } from '../scan/types.js';

View file

@ -6,7 +6,7 @@ import {
type KtxLlmConfig,
type KtxLlmProvider,
type KtxModelRole,
} from '@ktx/llm';
} from '../../../cli/src/llm/index.js';
import { resolveKtxConfigReference } from '../core/config-reference.js';
import type { KtxProjectEmbeddingConfig, KtxProjectLlmConfig } from '../project/config.js';
import { AiSdkKtxLlmRuntime } from './ai-sdk-runtime.js';

View file

@ -1,4 +1,4 @@
import type { KtxModelRole } from '@ktx/llm';
import type { KtxModelRole } from '../../../cli/src/llm/index.js';
import type { z } from 'zod';
export interface KtxRuntimeToolOutput<TOutput = unknown> {

View file

@ -1,4 +1,4 @@
import { KTX_MODEL_ROLES } from '@ktx/llm';
import { KTX_MODEL_ROLES } from '../../../cli/src/llm/index.js';
import YAML from 'yaml';
import * as z from 'zod';
import { connectionConfigSchema } from './driver-schemas.js';

View file

@ -1,4 +1,4 @@
import type { createKtxEmbeddingProvider, createKtxLlmProvider, KtxEmbeddingProvider } from '@ktx/llm';
import type { createKtxEmbeddingProvider, createKtxLlmProvider, KtxEmbeddingProvider } from '../../../cli/src/llm/index.js';
import {
createDefaultLocalIngestAdapters,
getLocalStageOnlyIngestStatus,