import type { DocumentId, ParsedUnit, ParserDiagnostic, ParserResult } from "@oscharko-dev/keiko-contracts";
export interface ParserOptions {
    readonly maxBytes: number;
    readonly maxUnitsPerDocument: number;
    readonly timeoutMs: number;
    readonly signal?: AbortSignal;
    readonly now: () => number;
}
export declare const DEFAULT_MAX_BYTES: number;
export declare const DEFAULT_MAX_UNITS = 50000;
export declare const DEFAULT_TIMEOUT_MS = 30000;
export interface ParserSelectionInput {
    readonly documentId: DocumentId;
    readonly bytes: Uint8Array;
    readonly extension: string;
    readonly mediaType: string;
    readonly languageHint?: string;
}
export interface ParserCapability {
    readonly parserId: string;
    readonly parserVersion: string;
    readonly matches: (input: ParserSelectionInput) => boolean;
}
export interface ParserAdapter {
    readonly capability: ParserCapability;
    readonly parse: (input: ParserSelectionInput, options: ParserOptions) => ParserResult;
}
export interface AsyncParserAdapter extends ParserAdapter {
    readonly parseAsync: (input: ParserSelectionInput, options: ParserOptions) => Promise<ParserResult>;
}
export interface InternalParserResult extends ParserResult {
    readonly normalizedText?: string;
}
export interface ParserRegistry {
    readonly list: () => readonly ParserAdapter[];
    readonly resolve: (input: ParserSelectionInput) => ParserResolution;
}
export type ParserResolution = {
    readonly kind: "matched";
    readonly adapter: ParserAdapter;
} | {
    readonly kind: "unsupported";
    readonly reason: string;
};
export type ParserErrorCode = "OVERSIZED_FILE" | "UNIT_LIMIT_REACHED" | "PARSER_TIMEOUT" | "PARSER_CANCELLED" | "MALFORMED_INPUT" | "UNSUPPORTED_FORMAT";
export declare const PARSER_ERROR_CODES: readonly ParserErrorCode[];
export type { ParserResult, ParsedUnit, ParserDiagnostic };
//# sourceMappingURL=types.d.ts.map