import type { ErrorRecord } from '../types/error.types.js';
import type { ErrorRepository } from '../db/repositories/error.repository.js';
import type { ProjectRepository } from '../db/repositories/project.repository.js';
import type { SynapseManager } from '../synapses/synapse-manager.js';
import type { MatchingConfig } from '../types/config.types.js';
import type { EmbeddingEngine } from '../embeddings/engine.js';
import type { AutoResolutionService, AutoResolutionResult } from './auto-resolution.service.js';
import { type MatchResult } from '../matching/error-matcher.js';
export interface ReportErrorInput {
    project: string;
    errorOutput: string;
    filePath?: string;
    terminalId?: number;
    taskContext?: string;
    workingDirectory?: string;
    command?: string;
}
export interface ErrorQueryInput {
    projectId?: number;
    resolved?: boolean;
    search?: string;
    limit?: number;
}
export declare class ErrorService {
    private errorRepo;
    private projectRepo;
    private synapseManager;
    private logger;
    private eventBus;
    private matchingConfig;
    private embeddingEngine;
    private autoResolution;
    constructor(errorRepo: ErrorRepository, projectRepo: ProjectRepository, synapseManager: SynapseManager, matchingConfig?: MatchingConfig);
    setEmbeddingEngine(engine: EmbeddingEngine): void;
    setAutoResolution(service: AutoResolutionService): void;
    report(input: ReportErrorInput): {
        errorId: number;
        isNew: boolean;
        matches: MatchResult[];
        crossProjectMatches?: MatchResult[];
        suggestions?: AutoResolutionResult;
    };
    query(input: ErrorQueryInput): ErrorRecord[];
    matchSimilar(errorId: number): MatchResult[];
    resolve(errorId: number, solutionId?: number): void;
    getById(id: number): ErrorRecord | undefined;
    countSince(since: string, projectId?: number): number;
    getErrorChain(errorId: number): {
        parents: ErrorRecord[];
        children: ErrorRecord[];
    };
    private findCrossProjectMatches;
    private detectErrorChain;
    private buildContext;
}
