import type { GrepEngineRequest, GrepEngineResult } from "./engine.ts";
/** ABI, not the package's CalVer. Keep aligned with crates/senpi-grep. */
export declare const NATIVE_GREP_ABI_VERSION = "1";
/** The napi options/results are aligned with the frozen engine contract. */
export interface NativeGrepBinding {
    __senpiGrepAbi1(): string;
    grep(options: GrepEngineRequest, signal?: AbortSignal): Promise<GrepEngineResult>;
}
export interface NativeGrepCandidatePathOptions {
    packageDir?: string;
    moduleDir?: string;
    execPath?: string;
    env?: NodeJS.ProcessEnv;
    platform?: string;
    arch?: string;
}
export interface NativeGrepLoaderOptions extends NativeGrepCandidatePathOptions {
    requireBinding?: (modulePath: string) => unknown;
    isQuarantined?: (modulePath: string) => boolean;
}
export interface NativeGrepUnavailableDiagnostic {
    code: "native-unavailable";
    host: string;
    attemptedPaths: readonly string[];
    message: string;
    cause: string;
}
export type NativeGrepLoadResult = {
    native: NativeGrepBinding;
    diagnostic: null;
} | {
    native: null;
    diagnostic: NativeGrepUnavailableDiagnostic;
};
export declare class NativeGrepSentinelMismatchError extends Error {
    readonly code = "native-sentinel-mismatch";
    readonly modulePath: string;
    constructor(modulePath: string);
}
export declare function getNativeGrepCandidatePaths(options?: NativeGrepCandidatePathOptions): readonly string[];
export declare function loadNativeGrep(options?: NativeGrepLoaderOptions): NativeGrepLoadResult;
//# sourceMappingURL=native-loader.d.ts.map