import { ProjectContext, CodePattern } from './index'; import { EnhancedAnalysisResult } from './analysis'; export interface MemoryConfig { storage: { baseDirectory: string; encryptionEnabled: boolean; compressionEnabled: boolean; maxSizeBytes: number; cleanupInterval: number; }; retention: { conversationHistory: number; projectAnalysis: number; userPreferences: number; knowledgeGraph: number; sessionData: number; }; performance: { cacheSize: number; indexingEnabled: boolean; searchIndexSize: number; batchSize: number; }; synchronization: { enabled: boolean; remoteEndpoint?: string; conflictResolution: 'local' | 'remote' | 'merge' | 'prompt'; syncInterval: number; }; } export interface ConversationMessage { id: string; sessionId: string; timestamp: Date; role: 'user' | 'assistant' | 'system' | 'tool'; content: string; metadata: MessageMetadata; embedding?: number[]; tokens?: number; modelUsed?: string; } export interface MessageMetadata { projectPath?: string; commandContext?: string; fileContext?: string[]; toolsUsed?: string[]; codeGenerated?: boolean; errorOccurred?: boolean; userFeedback?: UserFeedback; intent?: MessageIntent; entities?: NamedEntity[]; sentiment?: SentimentAnalysis; } export interface UserFeedback { rating: 1 | 2 | 3 | 4 | 5; helpful: boolean; correctionProvided?: string; category?: 'accuracy' | 'relevance' | 'clarity' | 'completeness'; timestamp: Date; } export interface MessageIntent { primary: IntentType; secondary?: IntentType[]; confidence: number; parameters: Record; } export type IntentType = 'code_generation' | 'code_analysis' | 'debugging' | 'explanation' | 'refactoring' | 'testing' | 'documentation' | 'project_setup' | 'learning' | 'troubleshooting' | 'general_question'; export interface NamedEntity { text: string; type: EntityType; confidence: number; startOffset: number; endOffset: number; value?: string; } export type EntityType = 'file_path' | 'function_name' | 'class_name' | 'variable_name' | 'library_name' | 'technology' | 'programming_concept' | 'error_type' | 'command' | 'url' | 'version' | 'configuration_key'; export interface SentimentAnalysis { polarity: number; subjectivity: number; emotion?: EmotionType; confidence: number; } export type EmotionType = 'joy' | 'anger' | 'fear' | 'sadness' | 'surprise' | 'disgust' | 'neutral'; export interface ChatSession { id: string; startTime: Date; endTime?: Date; projectPath?: string; messageCount: number; totalTokens: number; modelUsed: string[]; topics: SessionTopic[]; outcomes: SessionOutcome[]; branchPoints: SessionBranch[]; tags: string[]; metadata: SessionMetadata; } export interface SessionTopic { name: string; confidence: number; firstMention: Date; lastMention: Date; messageIds: string[]; relatedEntities: string[]; codeElements: string[]; } export interface SessionOutcome { type: OutcomeType; description: string; success: boolean; filesModified: string[]; codeGenerated: number; issuesResolved: number; newIssuesFound: number; timestamp: Date; } export type OutcomeType = 'bug_fixed' | 'feature_implemented' | 'refactoring_completed' | 'documentation_added' | 'tests_created' | 'configuration_updated' | 'learning_achieved' | 'problem_diagnosed'; export interface SessionBranch { id: string; parentSessionId: string; branchPoint: Date; reason: string; divergenceContext: string; merged: boolean; mergeTime?: Date; } export interface SessionMetadata { device?: string; location?: string; timezone: string; userAgent?: string; cliVersion: string; workingDirectory: string; gitBranch?: string; gitCommit?: string; environment: Record; } export interface ProjectMemory { projectPath: string; projectId: string; created: Date; lastAccessed: Date; accessCount: number; context: ProjectContext; analysis: ProjectAnalysisHistory; insights: ProjectInsight[]; patterns: LearnedPattern[]; preferences: ProjectPreferences; evolution: ProjectEvolution; relationships: ProjectRelationship[]; } export interface ProjectAnalysisHistory { snapshots: AnalysisSnapshot[]; trends: AnalysisTrend[]; comparisons: AnalysisComparison[]; predictions: AnalysisPrediction[]; } export interface AnalysisSnapshot { id: string; timestamp: Date; version: string; result: EnhancedAnalysisResult; changesSinceLastSnapshot: AnalysisChange[]; triggers: SnapshotTrigger[]; } export interface AnalysisChange { type: 'added' | 'modified' | 'removed' | 'moved'; category: 'file' | 'function' | 'class' | 'dependency' | 'pattern'; target: string; description: string; impact: ChangeImpact; } export interface ChangeImpact { complexity: number; maintainability: number; security: number; performance: number; testCoverage: number; } export type SnapshotTrigger = 'scheduled' | 'significant_change' | 'git_commit' | 'deployment' | 'user_request' | 'dependency_update' | 'security_scan'; export interface AnalysisTrend { metric: string; values: TrendDataPoint[]; direction: 'improving' | 'declining' | 'stable'; velocity: number; forecast: TrendForecast; } export interface TrendDataPoint { timestamp: Date; value: number; context?: string; } export interface TrendForecast { nextValue: number; confidence: number; timeframe: number; factors: ForecastFactor[]; } export interface ForecastFactor { name: string; influence: number; confidence: number; } export interface AnalysisComparison { id: string; timestamp: Date; baseline: string; comparison: string; differences: AnalysisChange[]; summary: string; recommendations: string[]; } export interface AnalysisPrediction { type: PredictionType; confidence: number; timeframe: number; description: string; indicators: PredictionIndicator[]; preventionSteps: string[]; createdAt: Date; validatedAt?: Date; accuracy?: number; } export type PredictionType = 'maintenance_required' | 'security_vulnerability' | 'performance_degradation' | 'dependency_conflict' | 'architectural_debt' | 'scalability_issue'; export interface PredictionIndicator { name: string; value: number; threshold: number; severity: 'low' | 'medium' | 'high' | 'critical'; } export interface KnowledgeGraph { nodes: KnowledgeNode[]; edges: KnowledgeEdge[]; clusters: KnowledgeCluster[]; metrics: GraphMetrics; lastUpdated: Date; version: number; } export interface KnowledgeNode { id: string; type: NodeType; label: string; description?: string; properties: Record; metadata: NodeMetadata; embedding?: number[]; confidence: number; createdAt: Date; lastAccessedAt: Date; accessCount: number; } export type NodeType = 'concept' | 'technology' | 'pattern' | 'library' | 'framework' | 'function' | 'class' | 'file' | 'project' | 'user' | 'session' | 'problem' | 'solution' | 'best_practice' | 'anti_pattern'; export interface NodeMetadata { source: string; projectPaths: string[]; sessionIds: string[]; tags: string[]; importance: number; validity: number; recency: number; } export interface KnowledgeEdge { id: string; source: string; target: string; type: EdgeType; weight: number; properties: Record; confidence: number; createdAt: Date; evidenceCount: number; contexts: string[]; } export type EdgeType = 'uses' | 'implements' | 'extends' | 'depends_on' | 'conflicts_with' | 'replaces' | 'similar_to' | 'part_of' | 'leads_to' | 'caused_by' | 'prevents' | 'enables' | 'co_occurs_with'; export interface KnowledgeCluster { id: string; label: string; nodes: string[]; centroid: number[]; density: number; coherence: number; topics: string[]; createdAt: Date; } export interface GraphMetrics { nodeCount: number; edgeCount: number; density: number; clustering: number; centrality: Record; communities: Community[]; pathLengths: PathLength[]; } export interface Community { id: string; nodes: string[]; modularity: number; topics: string[]; } export interface PathLength { source: string; target: string; length: number; path: string[]; } export interface LearningSystem { userProfiles: UserProfile[]; adaptationRules: AdaptationRule[]; feedbackLoops: FeedbackLoop[]; improvementSuggestions: ImprovementSuggestion[]; performanceMetrics: LearningMetrics; } export interface UserProfile { id: string; preferences: UserPreferences; skillLevel: SkillAssessment; workPatterns: WorkPattern[]; codeStyle: CodeStyleProfile; communicationStyle: CommunicationStyle; learningHistory: LearningRecord[]; goals: UserGoal[]; context: UserContext; } export interface UserPreferences { verbosity: 'minimal' | 'concise' | 'detailed' | 'comprehensive'; explanation_depth: 'surface' | 'intermediate' | 'deep'; code_style: 'functional' | 'oop' | 'mixed' | 'adaptive'; examples_preference: 'minimal' | 'some' | 'many'; error_handling: 'strict' | 'permissive' | 'context_aware'; performance_focus: 'readability' | 'efficiency' | 'balanced'; testing_approach: 'tdd' | 'post_implementation' | 'minimal'; documentation_level: 'inline' | 'comprehensive' | 'external'; frameworks: Record; libraries: Record; patterns: Record; } export interface SkillAssessment { overall: SkillLevel; languages: Record; frameworks: Record; domains: Record; concepts: Record; lastAssessment: Date; confidence: number; trajectory: 'improving' | 'stable' | 'declining'; } export type SkillLevel = 'beginner' | 'intermediate' | 'advanced' | 'expert'; export interface WorkPattern { type: PatternType; frequency: number; context: string; timeOfDay: number[]; duration: number; outcomes: string[]; efficiency: number; } export type PatternType = 'debugging_session' | 'feature_development' | 'refactoring' | 'learning' | 'code_review' | 'documentation' | 'testing' | 'exploration'; export interface CodeStyleProfile { namingConventions: Record; indentationStyle: 'tabs' | 'spaces'; indentationSize: number; lineLength: number; commentStyle: 'inline' | 'block' | 'minimal' | 'comprehensive'; errorHandling: 'exceptions' | 'return_codes' | 'optional' | 'mixed'; asyncPatterns: 'callbacks' | 'promises' | 'async_await' | 'mixed'; testingStyle: 'unit' | 'integration' | 'e2e' | 'property_based'; consistency: number; } export interface CommunicationStyle { formality: 'casual' | 'professional' | 'technical'; pace: 'quick' | 'methodical' | 'thorough'; feedback_preference: 'direct' | 'diplomatic' | 'encouraging'; question_style: 'specific' | 'open_ended' | 'guided'; explanation_preference: 'conceptual' | 'practical' | 'example_driven'; error_response: 'immediate' | 'investigate_first' | 'collaborative'; } export interface LearningRecord { topic: string; timestamp: Date; context: string; method: LearningMethod; outcome: LearningOutcome; retention: number; application: ApplicationRecord[]; } export type LearningMethod = 'explanation' | 'example' | 'practice' | 'exploration' | 'debugging' | 'reading_code' | 'documentation'; export interface LearningOutcome { understanding: number; confidence: number; ability_to_apply: number; follow_up_needed: boolean; questions_remaining: string[]; } export interface ApplicationRecord { timestamp: Date; context: string; success: boolean; improvements: string[]; challenges: string[]; } export interface UserGoal { id: string; type: GoalType; description: string; priority: 'low' | 'medium' | 'high'; timeline: Date; progress: number; milestones: Milestone[]; blockers: string[]; resources: string[]; } export type GoalType = 'learn_technology' | 'improve_skill' | 'complete_project' | 'solve_problem' | 'optimize_workflow' | 'understand_concept'; export interface Milestone { id: string; description: string; completed: boolean; completedAt?: Date; evidence: string[]; } export interface UserContext { currentProjects: string[]; activeGoals: string[]; recentChallenges: string[]; workEnvironment: WorkEnvironment; teamSize: number; role: string; experience: number; timezone: string; availability: AvailabilityPattern[]; } export interface WorkEnvironment { type: 'individual' | 'team' | 'open_source' | 'enterprise'; constraints: string[]; tools: string[]; processes: string[]; codebase_size: 'small' | 'medium' | 'large' | 'enterprise'; legacy_code: boolean; } export interface AvailabilityPattern { dayOfWeek: number; startHour: number; endHour: number; timezone: string; productivity: number; } export interface ProjectInsight { id: string; type: InsightType; title: string; description: string; confidence: number; importance: number; evidence: Evidence[]; recommendations: string[]; createdAt: Date; validatedAt?: Date; impact: InsightImpact; } export type InsightType = 'architecture_pattern' | 'code_smell' | 'performance_bottleneck' | 'security_vulnerability' | 'maintainability_issue' | 'testing_gap' | 'dependency_risk' | 'scalability_concern' | 'best_practice_violation' | 'improvement_opportunity'; export interface Evidence { type: 'code_analysis' | 'user_feedback' | 'performance_data' | 'security_scan' | 'documentation'; source: string; data: Record; timestamp: Date; confidence: number; } export interface InsightImpact { scope: 'file' | 'module' | 'component' | 'system'; severity: 'low' | 'medium' | 'high' | 'critical'; effort_to_address: 'small' | 'medium' | 'large'; business_value: 'low' | 'medium' | 'high'; technical_debt: number; } export interface LearnedPattern { id: string; name: string; type: 'architectural' | 'design' | 'implementation' | 'testing' | 'deployment'; description: string; context: PatternContext; examples: PatternExample[]; benefits: string[]; drawbacks: string[]; alternatives: string[]; usage_frequency: number; success_rate: number; learned_from: LearningSource[]; } export interface PatternContext { projectTypes: string[]; languages: string[]; frameworks: string[]; domains: string[]; teamSizes: string[]; constraints: string[]; } export interface PatternExample { projectPath: string; filePath: string; code: string; explanation: string; outcome: 'successful' | 'problematic' | 'neutral'; lessons: string[]; } export interface LearningSource { type: 'user_code' | 'feedback' | 'analysis' | 'documentation' | 'external'; source: string; timestamp: Date; confidence: number; } export interface ProjectPreferences { codeStyle: CodeStyleProfile; architecturalChoices: Record; libraryPreferences: Record; testingStrategy: TestingStrategy; deploymentPreferences: DeploymentPreference[]; codeOrganization: CodeOrganization; documentationStyle: DocumentationStyle; } export interface TestingStrategy { approach: 'tdd' | 'bdd' | 'atdd' | 'post_implementation'; coverage_target: number; test_types: TestType[]; frameworks: string[]; mocking_strategy: 'minimal' | 'moderate' | 'extensive'; integration_approach: 'bottom_up' | 'top_down' | 'sandwich'; } export type TestType = 'unit' | 'integration' | 'e2e' | 'performance' | 'security' | 'accessibility'; export interface DeploymentPreference { environment: 'development' | 'staging' | 'production'; strategy: 'blue_green' | 'canary' | 'rolling' | 'recreate'; automation_level: 'manual' | 'semi_automated' | 'fully_automated'; monitoring: MonitoringPreference[]; } export interface MonitoringPreference { type: 'performance' | 'errors' | 'usage' | 'security' | 'business'; tools: string[]; alerting: 'immediate' | 'batched' | 'threshold_based'; } export interface CodeOrganization { structure: 'flat' | 'layered' | 'feature_based' | 'domain_driven'; naming_conventions: Record; file_organization: 'by_type' | 'by_feature' | 'hybrid'; dependency_direction: 'acyclic' | 'layered' | 'mixed'; } export interface DocumentationStyle { level: 'minimal' | 'moderate' | 'comprehensive'; format: 'inline' | 'markdown' | 'wiki' | 'generated'; audience: 'developers' | 'users' | 'mixed'; update_frequency: 'per_change' | 'per_release' | 'periodic'; } export interface ProjectEvolution { timeline: EvolutionEvent[]; phases: ProjectPhase[]; metrics: EvolutionMetrics; predictions: EvolutionPrediction[]; } export interface EvolutionEvent { timestamp: Date; type: EventType; description: string; impact: EvolutionImpact; triggers: string[]; outcomes: string[]; } export type EventType = 'technology_adoption' | 'architecture_change' | 'team_change' | 'requirement_change' | 'performance_improvement' | 'security_enhancement' | 'refactoring' | 'dependency_update' | 'deployment_change'; export interface EvolutionImpact { complexity_change: number; velocity_change: number; quality_change: number; team_satisfaction: number; user_satisfaction: number; } export interface ProjectPhase { name: string; startDate: Date; endDate?: Date; characteristics: PhaseCharacteristics; challenges: string[]; achievements: string[]; lessons: string[]; } export interface PhaseCharacteristics { primary_focus: 'planning' | 'development' | 'testing' | 'deployment' | 'maintenance'; team_size: number; velocity: number; quality_focus: number; innovation_level: number; technical_debt: number; } export interface EvolutionMetrics { development_velocity: TrendDataPoint[]; code_quality: TrendDataPoint[]; team_satisfaction: TrendDataPoint[]; user_adoption: TrendDataPoint[]; technical_debt: TrendDataPoint[]; security_posture: TrendDataPoint[]; } export interface EvolutionPrediction { aspect: 'velocity' | 'quality' | 'satisfaction' | 'adoption' | 'debt' | 'security'; prediction: number; confidence: number; timeframe: number; factors: PredictionFactor[]; recommendations: string[]; } export interface PredictionFactor { name: string; weight: number; trend: 'improving' | 'declining' | 'stable'; confidence: number; } export interface ProjectRelationship { targetProject: string; type: RelationType; strength: number; description: string; commonElements: string[]; learningOpportunities: string[]; riskFactors: string[]; } export type RelationType = 'similar_technology' | 'shared_team' | 'dependency' | 'template' | 'evolution' | 'competitor' | 'inspiration'; export interface AdaptationRule { id: string; name: string; description: string; condition: RuleCondition; action: RuleAction; priority: number; confidence: number; success_rate: number; usage_count: number; last_used: Date; created_at: Date; created_by: string; } export interface RuleCondition { type: 'pattern_match' | 'threshold' | 'context' | 'time_based' | 'user_behavior'; parameters: Record; logic: ConditionLogic; } export interface ConditionLogic { operator: 'and' | 'or' | 'not' | 'xor'; operands: (RuleCondition | ConditionLogic)[]; } export interface RuleAction { type: ActionType; parameters: Record; priority: number; rollback_strategy?: RollbackStrategy; } export type ActionType = 'adjust_response_style' | 'modify_suggestions' | 'update_preferences' | 'change_explanation_depth' | 'recommend_resources' | 'suggest_alternatives' | 'provide_context' | 'escalate_complexity' | 'simplify_approach'; export interface RollbackStrategy { trigger: string; action: string; timeout: number; } export interface FeedbackLoop { id: string; name: string; source: FeedbackSource; target: FeedbackTarget; metrics: FeedbackMetrics; adjustments: FeedbackAdjustment[]; effectiveness: number; created_at: Date; } export interface FeedbackSource { type: 'user_explicit' | 'user_implicit' | 'system_metrics' | 'external_data'; identifier: string; confidence: number; latency: number; } export interface FeedbackTarget { type: 'response_quality' | 'suggestion_relevance' | 'user_satisfaction' | 'system_performance'; identifier: string; measurement_method: string; } export interface FeedbackMetrics { response_time: number[]; accuracy: number[]; relevance: number[]; user_satisfaction: number[]; task_completion: number[]; } export interface FeedbackAdjustment { timestamp: Date; parameter: string; old_value: unknown; new_value: unknown; reason: string; expected_impact: string; actual_impact?: string; } export interface ImprovementSuggestion { id: string; type: ImprovementType; title: string; description: string; rationale: string; implementation: ImplementationPlan; benefits: Benefit[]; risks: Risk[]; priority: 'low' | 'medium' | 'high' | 'critical'; effort: 'small' | 'medium' | 'large'; confidence: number; created_at: Date; status: SuggestionStatus; } export type ImprovementType = 'workflow_optimization' | 'response_enhancement' | 'knowledge_expansion' | 'performance_improvement' | 'user_experience' | 'accuracy_improvement' | 'coverage_expansion'; export interface ImplementationPlan { steps: ImplementationStep[]; timeline: number; dependencies: string[]; resources_required: string[]; success_criteria: string[]; } export interface ImplementationStep { order: number; description: string; estimated_effort: number; dependencies: string[]; deliverables: string[]; } export interface Benefit { category: 'user_experience' | 'accuracy' | 'performance' | 'maintainability' | 'scalability'; description: string; quantified_impact?: string; confidence: number; } export interface Risk { category: 'technical' | 'user_experience' | 'performance' | 'compatibility' | 'maintainability'; description: string; probability: number; impact: number; mitigation: string; } export type SuggestionStatus = 'proposed' | 'under_review' | 'approved' | 'in_progress' | 'implemented' | 'validated' | 'rejected' | 'deferred'; export interface LearningMetrics { overall_performance: PerformanceMetrics; user_satisfaction: SatisfactionMetrics; knowledge_coverage: CoverageMetrics; adaptation_effectiveness: AdaptationMetrics; system_health: HealthMetrics; } export interface PerformanceMetrics { accuracy: MetricTimeSeries; response_time: MetricTimeSeries; throughput: MetricTimeSeries; error_rate: MetricTimeSeries; resource_utilization: MetricTimeSeries; } export interface SatisfactionMetrics { user_ratings: MetricTimeSeries; task_completion_rate: MetricTimeSeries; user_retention: MetricTimeSeries; feature_adoption: MetricTimeSeries; complaint_rate: MetricTimeSeries; } export interface CoverageMetrics { knowledge_domains: DomainCoverage[]; skill_levels: SkillCoverage[]; use_cases: UseCaseCoverage[]; languages: LanguageCoverage[]; frameworks: FrameworkCoverage[]; } export interface DomainCoverage { domain: string; coverage: number; confidence: number; gap_areas: string[]; improvement_areas: string[]; } export interface SkillCoverage { skill_level: SkillLevel; user_count: number; satisfaction: number; success_rate: number; common_challenges: string[]; } export interface UseCaseCoverage { use_case: string; frequency: number; success_rate: number; user_satisfaction: number; improvement_opportunities: string[]; } export interface LanguageCoverage { language: string; user_count: number; expertise_level: number; success_rate: number; knowledge_gaps: string[]; } export interface FrameworkCoverage { framework: string; user_count: number; expertise_level: number; success_rate: number; common_issues: string[]; } export interface AdaptationMetrics { rule_effectiveness: RuleEffectiveness[]; learning_rate: MetricTimeSeries; adaptation_speed: MetricTimeSeries; personalization_accuracy: MetricTimeSeries; context_awareness: MetricTimeSeries; } export interface RuleEffectiveness { rule_id: string; success_rate: number; usage_frequency: number; user_impact: number; performance_impact: number; last_evaluation: Date; } export interface HealthMetrics { system_uptime: MetricTimeSeries; memory_usage: MetricTimeSeries; storage_usage: MetricTimeSeries; cache_hit_rate: MetricTimeSeries; sync_success_rate: MetricTimeSeries; } export interface MetricTimeSeries { values: TimeSeriesPoint[]; trend: 'improving' | 'declining' | 'stable'; volatility: number; forecast: TimeSeriesPoint[]; } export interface TimeSeriesPoint { timestamp: Date; value: number; context?: string; } export interface MemoryStorage { conversations: StorageCollection; sessions: StorageCollection; projects: StorageCollection; users: StorageCollection; knowledge: StorageCollection; adaptations: StorageCollection; feedbacks: StorageCollection; suggestions: StorageCollection; } export interface StorageCollection { create(item: T): Promise; read(id: string): Promise; update(id: string, updates: Partial): Promise; delete(id: string): Promise; query(criteria: QueryCriteria): Promise>; index(fields: string[]): Promise; backup(): Promise; restore(backupId: string): Promise; } export interface QueryCriteria { filters: QueryFilter[]; sort?: QuerySort[]; limit?: number; offset?: number; include_embeddings?: boolean; } export interface QueryFilter { field: string; operator: 'eq' | 'ne' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'nin' | 'contains' | 'regex' | 'near'; value: unknown; options?: Record; } export interface QuerySort { field: string; direction: 'asc' | 'desc'; } export interface QueryResult { items: T[]; total: number; hasMore: boolean; nextOffset?: number; executionTime: number; cacheHit: boolean; } export interface SyncStatus { lastSync: Date; status: 'synced' | 'pending' | 'conflict' | 'error'; conflicts: SyncConflict[]; pendingChanges: number; nextSync: Date; } export interface SyncConflict { id: string; type: 'data' | 'schema' | 'permission'; local: unknown; remote: unknown; resolution: 'pending' | 'local' | 'remote' | 'merged'; resolver?: string; resolvedAt?: Date; } export interface SemanticSearch { query(text: string, options: SearchOptions): Promise; similarItems(item: string, type: NodeType, limit: number): Promise; conceptSearch(concept: string, context?: string): Promise; codeSearch(codePattern: string, language?: string): Promise; conversationSearch(intent: IntentType, context?: string): Promise; } export interface SearchOptions { types?: NodeType[]; timeRange?: TimeRange; confidence_threshold?: number; include_context?: boolean; max_results?: number; semantic_similarity?: boolean; boost_recent?: boolean; project_scope?: string[]; } export interface TimeRange { start: Date; end: Date; } export interface SearchResult { items: SearchResultItem[]; total: number; executionTime: number; query_analysis: QueryAnalysis; } export interface SearchResultItem { id: string; type: NodeType; title: string; snippet: string; relevance: number; context: string[]; metadata: Record; relationships: string[]; } export interface QueryAnalysis { intent: IntentType; entities: NamedEntity[]; concepts: string[]; context_hints: string[]; complexity: number; confidence: number; } export interface ConceptSearchResult extends SearchResult { related_concepts: ConceptRelation[]; learning_path: LearningStep[]; prerequisites: string[]; } export interface ConceptRelation { concept: string; relation_type: EdgeType; strength: number; examples: string[]; } export interface LearningStep { order: number; concept: string; description: string; resources: string[]; estimated_time: number; prerequisites: string[]; } export interface CodeSearchResult extends SearchResult { patterns: CodePattern[]; similar_implementations: CodeExample[]; best_practices: string[]; anti_patterns: string[]; } export interface CodeExample { code: string; language: string; framework?: string; context: string; explanation: string; source: string; quality: number; } export interface ConversationSearchResult extends SearchResult { message_threads: MessageThread[]; common_followups: string[]; related_topics: string[]; user_patterns: UserInteractionPattern[]; } export interface MessageThread { messages: ConversationMessage[]; outcome: SessionOutcome; satisfaction: number; duration: number; complexity: number; } export interface UserInteractionPattern { pattern: string; frequency: number; success_rate: number; context: string[]; recommendations: string[]; } export interface AdaptationDecision { type: 'difficulty' | 'pace' | 'content' | 'approach'; decision: string; reasoning: string; timestamp: Date; } //# sourceMappingURL=memory.d.ts.map