import { Logger } from '../utils/logger'; import { ProjectContext } from '@sintesi/core'; import { AIAgents } from '../../../ai'; export interface ProjectConfig { binName?: string; packageName?: string; relevantCommands?: string[]; entryPoint?: string; appType?: 'cli' | 'web' | 'library' | 'backend' | 'unknown'; } export interface TechStack { frameworks: string[]; languages: string[]; libraries: string[]; infrastructure: string[]; } export declare class GenerationContextService { private logger; private cwd; private retrievalService; private skeletonizer; constructor(logger: Logger, cwd: string); /** * Initializes the RAG index if not already present. * Should be called explicitly before generation starts. */ ensureRAGIndex(): Promise; /** * Retrieve semantic context using RAG. */ retrieveContext(query: string): Promise; /** * Retrieve high-level conceptual context. */ retrieveConceptualContext(query: string): Promise; /** * Initializes AI Agents from environment variables. */ getAIAgents(verbose: boolean, plannerModelId?: string, writerModelId?: string): Promise; /** * Analyzes the project structure and retrieves the git diff. */ analyzeProject(baseRef?: string): Promise<{ context: ProjectContext; gitDiff: string; changedFiles: string[]; }>; /** * Detects Project configuration (binary name, package name, entry point, app type). */ detectProjectConfig(context: ProjectContext): ProjectConfig; /** * Analyze package.json to detect the technology stack. */ detectTechStack(context: ProjectContext): TechStack; /** * Generates a shared context prompt string including package info, CLI details, and git diff. */ generateContextPrompt(context: ProjectContext, gitDiff: string, projectConfig: ProjectConfig, techStack?: TechStack): string; /** * Helper to consistently provide repository information instructions. */ getSafeRepoInstructions(packageJson: any): string; /** * Reads the content of relevant files to provide context to the LLM. * Returns simply the content string for backward compatibility. */ readRelevantContext(item: { path: string; description: string; relevantPaths?: string[]; type?: string; }, context: ProjectContext): string; /** * Reads relevant context and returns both content string and list of utilized file paths. */ readRelevantContextWithFiles(item: { path: string; description: string; relevantPaths?: string[]; type?: string; }, context: ProjectContext): { content: string; files: string[]; }; } //# sourceMappingURL=generation-context.d.ts.map