import type { CodeModuleRecord } from '../types/code.types.js';
import type { CodeModuleRepository } from '../db/repositories/code-module.repository.js';
import type { ProjectRepository } from '../db/repositories/project.repository.js';
import type { SynapseManager } from '../synapses/synapse-manager.js';
import type { EmbeddingEngine } from '../embeddings/engine.js';
export interface AnalyzeInput {
    project: string;
    name: string;
    filePath: string;
    language: string;
    source: string;
    description?: string;
}
export interface FindReusableInput {
    query?: string;
    language?: string;
    projectId?: number;
    limit?: number;
}
export declare class CodeService {
    private codeModuleRepo;
    private projectRepo;
    private synapseManager;
    private logger;
    private eventBus;
    private embeddingEngine;
    constructor(codeModuleRepo: CodeModuleRepository, projectRepo: ProjectRepository, synapseManager: SynapseManager);
    setEmbeddingEngine(engine: EmbeddingEngine): void;
    analyzeAndRegister(input: AnalyzeInput): {
        moduleId: number;
        isNew: boolean;
        reusabilityScore: number;
    };
    findReusable(input: FindReusableInput): CodeModuleRecord[];
    checkSimilarity(source: string, language: string): Array<{
        moduleId: number;
        score: number;
        matchType: string;
    }>;
    listModules(projectId?: number, language?: string, limit?: number): CodeModuleRecord[];
    getById(id: number): CodeModuleRecord | undefined;
    private computeModuleSimilarities;
    private indexDependencySynapses;
    listProjects(): Array<{
        id: number;
        name: string;
        path: string | null;
        language: string | null;
        framework: string | null;
        moduleCount: number;
    }>;
}
