import type { ContextDeletionTarget } from "../session-manager.ts";
import type { CompactableTranscript } from "./context-compaction-types.ts";
import type { ContextGrepDeletionMatch, ContextGrepDeletionSkipped } from "./context-deletion-tool-definitions.ts";
export declare function escapeRegExpLiteral(text: string): string;
export declare function assertSafeRegexPattern(pattern: string): void;
export declare function createGrepMatcher(pattern: string, regex: boolean, caseSensitive: boolean): RegExp;
export declare function assertSafeRegexScan(scanChars: number): void;
export declare function clampInteger(value: number | undefined, defaultValue: number, minimum: number, maximum: number): number;
export declare function textSlice(text: string, offset: number, maxChars: number): string;
export declare function findMatchIndex(matcher: RegExp, text: string): number;
export declare function snippetForMatch(text: string, matchIndex: number, contextChars: number): string;
export declare function currentTargetDeleted(targets: readonly ContextDeletionTarget[], target: ContextDeletionTarget): boolean;
export declare function addGrepCandidate(candidates: ContextDeletionTarget[], matches: ContextGrepDeletionMatch[], seenTargets: Set<string>, candidate: ContextDeletionTarget, match: ContextGrepDeletionMatch): void;
export declare function pushProtectedGrepSkip(skipped: ContextGrepDeletionSkipped[], match: ContextGrepDeletionMatch): void;
export declare function filterProtectedGrepCandidates(candidates: readonly ContextDeletionTarget[], matches: readonly ContextGrepDeletionMatch[], currentTargets: readonly ContextDeletionTarget[], transcript: CompactableTranscript, skipped: ContextGrepDeletionSkipped[]): {
    candidates: ContextDeletionTarget[];
    matches: ContextGrepDeletionMatch[];
};
//# sourceMappingURL=context-deletion-tool-helpers.d.ts.map