import { statSync } from "node:fs";
import { homedir } from "node:os";
import type { SessionInjectedRulesCache } from "./cache";
import { createContentHash, isDuplicateByContentHash, isDuplicateByRealPath, shouldApplyRule } from "./matcher";
import type { FindRuleFilesOptions } from "./rule-file-finder";
import type { RuleScanCache } from "./rule-scan-cache";
import { saveInjectedRules } from "./storage";
type ToolExecuteOutput = {
    title: string;
    output: string;
    metadata: unknown;
};
type DynamicTruncator = {
    truncate: (sessionID: string, content: string) => Promise<{
        result: string;
        truncated: boolean;
    }>;
};
type RuleFileReader = (path: string, encoding: "utf-8") => string;
export interface ParsedRuleCacheStats {
    entries: number;
    bodyBytes: number;
}
export declare function clearParsedRuleCache(): void;
export declare function getParsedRuleCacheStats(): ParsedRuleCacheStats;
export interface TranscriptHydrationHook {
    hydrateSession(sessionID: string): Promise<ReadonlySet<string>>;
}
export declare function createRuleInjectionProcessor(deps: {
    workspaceDirectory: string;
    truncator: DynamicTruncator;
    getSessionCache: (sessionID: string) => SessionInjectedRulesCache;
    getSessionRuleScanCache?: (sessionID: string) => RuleScanCache;
    ruleFinderOptions?: FindRuleFilesOptions;
    readFileSync?: RuleFileReader;
    statSync?: typeof statSync;
    homedir?: typeof homedir;
    shouldApplyRule?: typeof shouldApplyRule;
    isDuplicateByRealPath?: typeof isDuplicateByRealPath;
    createContentHash?: typeof createContentHash;
    isDuplicateByContentHash?: typeof isDuplicateByContentHash;
    saveInjectedRules?: typeof saveInjectedRules;
    transcriptHydration?: TranscriptHydrationHook;
}): {
    processFilePathForInjection: (filePath: string, sessionID: string, output: ToolExecuteOutput) => Promise<void>;
};
export {};
