export interface GraphNode {
    id: string;
    type: 'pattern' | 'category' | 'language' | 'framework' | 'outcome' | 'recommendation' | 'project_dna' | 'developer' | 'community_concept' | 'dna_fingerprint';
    label: string;
    weight: number;
    metadata?: Record<string, any>;
}
export interface GraphEdge {
    from: string;
    to: string;
    type: 'co_occurs' | 'follows' | 'similar' | 'conflicts' | 'category_of' | 'language_of' | 'causes' | 'improves' | 'reduces' | 'depends_on' | 'uses' | 'belongs_to' | 'related_to' | 'influences' | 'sequenced_after' | 'correlates_with' | 'alternative_to' | 'prerequisite';
    weight: number;
    metadata?: Record<string, any>;
}
export interface KnowledgeGraph {
    nodes: GraphNode[];
    edges: GraphEdge[];
    builtAt: number;
    version: number;
}
export interface GraphVersion {
    version: number;
    builtAt: number;
    nodeCount: number;
    edgeCount: number;
    summary: string;
}
export interface PathResult {
    nodes: string[];
    edges: string[];
    totalWeight: number;
    nodeLabels: string[];
    edgeTypes: string[];
}
export interface InfluenceScore {
    nodeId: string;
    label: string;
    score: number;
    evidence: string[];
}
export interface OutcomeCorrelation {
    fromPattern: string;
    toPattern: string;
    correlation: number;
    sampleSize: number;
    direction: 'positive' | 'negative' | 'neutral';
    evidence: string[];
}
export interface CommunityInsight {
    concept: string;
    developerCount: number;
    patternCount: number;
    topPatterns: string[];
    avgSuccessRate: number;
}
export interface GraphStoreData {
    graphs: Record<string, KnowledgeGraph>;
    versions: GraphVersion[];
    lastGraphId: string;
}
export declare function buildKnowledgeGraph(patterns: Array<{
    patternId: string;
    category: string;
    description: string;
    from: string;
    to: string;
    language?: string;
    framework?: string;
    conditions?: Array<{
        type: string;
        value: string;
    }>;
}>): KnowledgeGraph;
export declare function getKnowledgeGraph(): KnowledgeGraph;
export declare function getNodeNeighbors(nodeId: string, maxDepth?: number): {
    node: GraphNode;
    edges: GraphEdge[];
} | null;
export declare function findRelatedPatterns(patternId: string, limit?: number): Array<{
    patternId: string;
    relationship: string;
    weight: number;
}>;
export declare function getGraphStats(): {
    nodes: number;
    edges: number;
    patternNodes: number;
    categoryNodes: number;
    languageNodes: number;
    builtAt: number;
    version: number;
};
export interface ExtractedEntity {
    name: string;
    type: 'variable' | 'function' | 'class' | 'module' | 'framework' | 'concept';
    occurrences: number;
    patterns: string[];
}
export declare function extractEntities(patterns: Array<{
    patternId: string;
    from: string;
    to: string;
    description: string;
    category: string;
}>): ExtractedEntity[];
export interface InferredRelationship {
    from: string;
    to: string;
    type: 'depends_on' | 'similar_to' | 'prerequisite' | 'alternative_to' | 'conflicts_with';
    strength: number;
    evidence: string[];
}
export declare function inferRelationships(patterns: Array<{
    patternId: string;
    from: string;
    to: string;
    description: string;
    category: string;
}>): InferredRelationship[];
export interface TraversalPath {
    nodes: string[];
    edges: string[];
    totalWeight: number;
}
export declare function findPaths(from: string, to: string, maxDepth?: number): TraversalPath[];
export type NodeSource = 'pattern' | 'outcome' | 'recommendation' | 'project_dna' | 'developer' | 'community';
export interface NodeInput {
    id: string;
    type: GraphNode['type'];
    label: string;
    weight?: number;
    metadata?: Record<string, any>;
    source?: NodeSource;
}
export declare function addNodes(inputs: NodeInput[]): void;
export declare function addNode(input: NodeInput): void;
export declare function removeNode(nodeId: string): boolean;
export interface RelationshipInput {
    from: string;
    to: string;
    type: GraphEdge['type'];
    weight: number;
    evidence?: string[];
}
export declare function addRelationships(inputs: RelationshipInput[]): void;
export declare function addRelationship(input: RelationshipInput): void;
export declare function getNodeEdges(nodeId: string): GraphEdge[];
export declare function getNodesByType(type: GraphNode['type']): GraphNode[];
export declare function computeInfluence(patternOutcomes: Map<string, {
    successRate: number;
    usageCount: number;
    health: number;
}>): InfluenceScore[];
export declare function detectDependencies(patterns: Array<{
    patternId: string;
    description: string;
    from: string;
    to: string;
    category: string;
    conditions?: Array<{
        type: string;
        value: string;
    }>;
}>): RelationshipInput[];
export declare function detectConflicts(patterns: Array<{
    patternId: string;
    description: string;
    from: string;
    to: string;
    category: string;
}>): RelationshipInput[];
export declare function detectSequences(developerHistories: Array<Array<{
    patternId: string;
    timestamp: number;
}>>): RelationshipInput[];
export declare function computeOutcomeCorrelations(allOutcomes: Map<string, {
    successRate: number;
    usageCount: number;
    health: number;
}>): OutcomeCorrelation[];
export declare function linkProjectDNA(dnaFingerprint: {
    primaryLanguage: string;
    framework: string | null;
    architecture: string;
    complexity: string;
    maturity: string;
    testing: string;
    developmentStyle: string;
}, patternIds: string[]): RelationshipInput[];
export declare function buildCommunityGraph(allProfiles: Array<{
    developerId: string;
    languages: Record<string, number>;
    topCategories: string[];
    patternsUsed: number;
}>): {
    nodes: GraphNode[];
    edges: GraphEdge[];
};
export declare function getCommunityInsights(): CommunityInsight[];
export declare function discoverPaths(fromNode: string, toNode: string, maxDepth?: number): PathResult[];
export declare function getGraphVersion(): number;
export declare function resetGraph(): void;
export declare function exportGraphJSON(): string;
export declare function importGraphJSON(json: string): void;
export declare function ensureCloudGraphTable(): void;
export declare function recordCloudEntity(entity_name: string, entity_type: string, pattern_id: string): void;
export declare function getCloudEntities(): Array<{
    name: string;
    type: string;
    patternCount: number;
}>;
export declare function recordCloudRelationship(from: string, to: string, type: string, strength: number, evidence: string): void;
export declare function getCloudRelationships(): Array<{
    from: string;
    to: string;
    type: string;
    strength: number;
}>;
export declare function getCloudPathTraversal(from: string, to: string, maxDepth?: number): Array<{
    nodes: string[];
    edges: string[];
    totalWeight: number;
}>;
export declare function getCloudNodeNeighbors(nodeId: string): Array<{
    neighborId: string;
    edgeType: string;
    weight: number;
}>;
//# sourceMappingURL=knowledge-graph.d.ts.map