import type { LLMProvider } from './llm.types'; import type { ScanResult } from './scanner.types'; import type { RunnableConfig } from '@langchain/core/runnables'; export interface ChatMessage { role: 'user' | 'assistant' | 'system'; content: string; metadata?: Record; } export interface ChatHistory { messages: ChatMessage[]; summary?: string; } export interface AgentContext { executionId: string; projectPath: string; files: string[]; fileContents: Map; projectMetadata: Record; previousResults: Map; config: Record; query?: string; languageHints: LanguageHint[]; tokenBudget: number; scanResult: ScanResult; existingDocs?: Map; isIncrementalMode?: boolean; refinementGaps?: { qualityScore: number; priority: 'high' | 'medium' | 'low'; needsUpdate: boolean; improvements: string[]; lastEvaluated: string; }; dependencyGraph?: { imports: Array<{ source: string; target: string; imports?: string[]; type: 'local' | 'external' | 'framework'; resolvedPath?: string; }>; modules: Array<{ name: string; path: string; files: string[]; dependencies: string[]; exports: string[]; }>; graph: { nodes: Array<{ id: string; type: 'file' | 'module' | 'external'; name: string; }>; edges: Array<{ from: string; to: string; type: 'import' | 'require'; }>; }; }; vectorStore?: { searchFiles: (query: string, topK?: number) => Promise>; cleanup: () => void; }; hybridRetrieval?: { retrieve: (query: string, config?: { strategy?: 'vector' | 'graph' | 'hybrid' | 'smart'; topK?: number; vectorWeight?: number; graphWeight?: number; includeRelatedFiles?: boolean; maxDepth?: number; similarityThreshold?: number; }) => Promise>; getStats: () => { hasVectorStore: boolean; hasDependencyGraph: boolean; graphStats?: { totalNodes: number; totalEdges: number; modules: number; }; }; }; } export interface AgentFile { filename: string; content: string; title: string; category?: string; order?: number; mergeStrategy?: 'replace' | 'append' | 'section-update'; sectionId?: string; } export interface AgentResult { agentName: string; status: 'success' | 'partial' | 'failed'; data: Record; summary: string; markdown: string; files?: AgentFile[]; confidence: number; tokenUsage: TokenUsage; executionTime: number; errors: string[]; warnings: string[]; metadata: Record; } export declare enum AgentPriority { CRITICAL = 1, HIGH = 2, MEDIUM = 3, LOW = 4, OPTIONAL = 5 } export interface AgentCapabilities { supportsParallel: boolean; requiresFileContents: boolean; dependencies: string[]; supportsIncremental: boolean; estimatedTokens: number; supportedLanguages: string[]; } export interface LanguageHint { language: string; framework?: string; confidence: number; indicators: string[]; coverage: number; } export interface TokenUsage { inputTokens: number; outputTokens: number; totalTokens: number; cachedInputTokens?: number; cacheCreationTokens?: number; estimatedCost?: number; } export interface AgentMetadata { name: string; version: string; description: string; priority: AgentPriority; capabilities: AgentCapabilities; tags: string[]; outputFilename?: string; } export type AgentStreamCallback = (chunk: { agentName: string; type: 'token' | 'progress' | 'result'; content: string | number | Partial; }) => void; export interface AgentExecutionOptions { streaming?: boolean; onStream?: AgentStreamCallback; timeout?: number; retryOnFailure?: boolean; maxRetries?: number; llmConfig?: Partial; runnableConfig?: RunnableConfig; maxQuestionsPerIteration?: number; skipSelfRefinement?: boolean; searchMode?: 'vector' | 'keyword'; } export interface LLMConfig { provider: LLMProvider; model: string; temperature: number; maxTokens: number; topP?: number; frequencyPenalty?: number; presencePenalty?: number; } export interface FileStructureAnalysis { summary: string; structure: { organizationStrategy: string; keyDirectories: string[]; directoryPurposes: Record; [key: string]: unknown; }; patterns: { architectural: string[]; organizational: string[]; [key: string]: unknown; }; conventions: { naming: string[]; grouping: string[]; [key: string]: unknown; }; recommendations: string[]; warnings: string[]; [key: string]: unknown; } export interface DependencyAnalysis { summary: string; metrics: Record; insights: string[]; vulnerabilities: Array<{ package: string; severity: string; description: string; [key: string]: unknown; }>; recommendations: string[]; warnings: string[]; [key: string]: unknown; } export declare enum ArchitecturalStyle { MONOLITHIC = "monolithic", MICROSERVICES = "microservices", LAYERED = "layered", EVENT_DRIVEN = "event-driven", HEXAGONAL = "hexagonal", SERVERLESS = "serverless", MODULAR_MONOLITH = "modular-monolith" } export interface ComponentInfo { name: string; type: string; description: string; responsibilities: string[]; dependencies: string[]; technologies: string[]; [key: string]: unknown; } export interface ArchitectureAnalysis { style: ArchitecturalStyle; components: ComponentInfo[]; layers: string[]; integrations: string[]; diagram: string; insights: string[]; summary: string; warnings: string[]; [key: string]: unknown; } //# sourceMappingURL=agent.types.d.ts.map