import type { ParsedLine } from "./types.js";
/**
 * Regex contract: must capture date parts in fixed group order. Group 0 is
 * the full prefix match; groups 1..6 are date parts (year, month, day, hour,
 * minute, second). Source normalisers translate their grammar's groups into
 * this fixed shape via the `extractDateParts` callback, so the scanner stays
 * source-agnostic.
 */
export interface TimestampPrefixMatch {
    /** Year, four digits (e.g. 2024). */
    year: number;
    /** Month, 1-12. */
    month: number;
    /** Day-of-month, 1-31. */
    day: number;
    /** Hour, 0-23. */
    hour: number;
    /** Minute, 0-59. */
    minute: number;
    /** Second, 0-59. */
    second: number;
    /** Everything on the line after the consumed prefix. */
    remainder: string;
}
export type TimestampPrefixMatcher = (line: string) => TimestampPrefixMatch | null;
export type IsoFormatter = (parts: Omit<TimestampPrefixMatch, "remainder">) => string;
export interface ScanInput {
    /** Decoded text, lines split by `\n`. */
    text: string;
    /** Returns parsed timestamp + remainder for a matched line, or null. */
    matchPrefix: TimestampPrefixMatcher;
    /** Renders the matched date parts as the canonical ISO `dateSent`. */
    formatIso: IsoFormatter;
}
export interface ScanResult {
    parsedLines: ParsedLine[];
    /** Number of lines that matched the timestamp prefix (= parsedLines.length). */
    matchedCount: number;
}
/**
 * Walk `text` line by line. Lines that match `matchPrefix` start a new entry;
 * lines that don't match glue onto the preceding entry's body with `\n`.
 *
 * Returns an empty `parsedLines` array when no line matches the prefix —
 * the caller decides whether to route the input to a non-conversation path
 * (document chunker) or loud-fail.
 */
export declare function scanTimestampedLines(input: ScanInput): ScanResult;
//# sourceMappingURL=timestamp-scanner.d.ts.map