export type GrepMode = "content" | "count" | "files";
export interface GrepEngineRequest {
    pattern: string;
    paths: string[];
    cwd: string;
    glob?: string[];
    type?: string;
    ignoreCase?: boolean;
    literal?: boolean;
    multiline?: boolean;
    hidden?: boolean;
    gitignore?: boolean;
    maxCount?: number;
    maxCountPerFile?: number;
    contextBefore?: number;
    contextAfter?: number;
    maxColumns?: number;
    mode?: GrepMode;
    timeoutMs?: number;
    lineStart?: number;
    lineEnd?: number;
    pcre2?: boolean;
}
export interface GrepEngineMatch {
    path: string;
    line: number;
    column?: number;
    text: string;
    isContext: boolean;
    truncated: boolean;
}
export interface GrepEngineFileCount {
    path: string;
    count: number | null;
    limitReached: boolean;
}
export interface GrepEngineWarning {
    path?: string;
    code: string;
    message: string;
}
export interface GrepEngineResult {
    matches: GrepEngineMatch[];
    fileCounts: GrepEngineFileCount[];
    counts: {
        matches: number | null;
        files: number;
        exact: boolean;
    };
    filesSearched: number;
    limitReached: boolean;
    perFileLimitReached: boolean;
    skippedOversized: number;
    prefixSearched: number;
    skippedBinary: number;
    missingPaths: string[];
    warnings: GrepEngineWarning[];
    timedOut: boolean;
    elapsedMs: number;
    effectivePattern: string;
    patternKind: "regex" | "sanitized" | "literal";
    regexEngine: "rust" | "pcre2";
}
export type GrepEngineErrorCode = "UNSUPPORTED_REGEX" | "INVALID_PATTERN" | "INVALID_GLOB" | "UNKNOWN_TYPE" | "PATH_NOT_FOUND" | "ABORTED" | "ENGINE_UNAVAILABLE";
export declare class GrepEngineError extends Error {
    readonly code: GrepEngineErrorCode;
    constructor(code: GrepEngineErrorCode, message: string);
}
export interface GrepEngine {
    readonly name: "native" | "rg";
    search(request: GrepEngineRequest, signal?: AbortSignal): Promise<GrepEngineResult>;
}
//# sourceMappingURL=engine.d.ts.map