/** * Deterministic passage extraction for the investigate pipeline * (T3, docs/plans/investigate-pipeline DESIGN D4, PRD AC-5). * * Splits content into sentence windows with character-index tracking, * keeps the windows containing >= 1 term as a whole word (case-folded), * dedupes by exact quote equality, caps at 5 first-encounter passages. * * Boundary-char ownership: the terminator that ended a window * (`.`/`!`/`?`/`\n`) belongs to the window; the separator run * (spaces/tabs after a terminator) belongs to neither window. The * round-trip pin — content.slice(...charRange) === quote for every * passage — holds byte-exactly under this rule, and is invariant to * it (any slicing convention preserves the pin). * * Byte-stable: no clocks, no randomness, no locale-dependent casing * beyond toLowerCase. Self-contained: no imports. */ export interface Passage { quote: string; charRange: [number, number]; } export interface ExtractPassagesArgs { content: string; terms: string[]; } /** Normalize the term set: trim, case-fold, drop empties, dedupe. */ export declare function normalizeTerms(terms: string[]): string[]; /** * Ideographic sentence terminators (issue #276): the ideographic full * stop 。 (U+3002) and the fullwidth !?. They terminate UNCONDITIONALLY * — no space lookahead — because unspaced scripts never satisfy the * ASCII rule's lookahead. Clause commas (,、) are deliberately NOT * terminators: they separate clauses inside a sentence, not sentences. * Exported: investigate-claims.ts's splitClaims shares this grammar. */ export declare const IDEOGRAPHIC_TERMINATORS: Set; /** A window is [start, end) with the terminator char owned by the window. */ export interface Window { start: number; end: number; } /** * Split content into sentence windows on `[.!?]` terminators followed * by a space (the literal `[.!?] +` grammar), the unconditional * ideographic set (issue #276, see {@link IDEOGRAPHIC_TERMINATORS}), * plus newline boundaries, tracking exact offsets into the original * content. Newlines terminate but never separate: "here.\n" ends at * the `\n`. */ export declare function splitWindows(content: string): Window[]; /** * Extract passages: sentence windows of `content` containing >= 1 of * `terms` as a whole word (case-folded), deduped by exact quote, * capped at 5 first-encounter. Empty term set -> [] (valid). */ export declare function extractPassages({ content, terms }: ExtractPassagesArgs): Passage[]; //# sourceMappingURL=investigate-extract.d.ts.map