/**
 * applyVisibleRegion
 *
 * Scopes the raw terminal text to the "visible region" declared by a
 * `tui/visible-region@1` spec before handing it to detect-status and
 * parse-approval matchers.
 *
 * Scope semantics:
 *   screen   → full text unchanged  (daemon already passes rendered screen)
 *   buffer   → full text unchanged
 *   tail     → last `tailChars` characters (default 4000)
 *   between-anchors → text between most recent (or first) top/bottom anchor
 *                     regex matches; falls back to full text if anchors not found
 *
 * selectAnchor:
 *   "last"  → use the LAST occurrence of the top anchor — useful for providers
 *             like Antigravity that redraw a separator + prompt on every turn;
 *             this excludes all scrollback above the current session frame.
 *   "first" → use the FIRST occurrence (default per schema).
 */
interface AnchorPatternSpec {
    pattern: string;
    flags?: string;
}
interface AnchorsSpec {
    top?: AnchorPatternSpec;
    bottom?: AnchorPatternSpec;
}
export interface VisibleRegionSpec {
    $schema?: 'adhdev:tui/visible-region@1';
    scope: 'screen' | 'tail' | 'buffer' | 'between-anchors';
    tailChars?: number;
    anchors?: AnchorsSpec;
    selectAnchor?: 'first' | 'last';
    stripCues?: string[];
}
/**
 * Apply the visible-region spec to `text` and return the scoped substring.
 * Never throws on missing anchors — falls back to the full text instead.
 */
export declare function applyVisibleRegion(spec: VisibleRegionSpec, text: string): string;
export {};
