import type { SelectorStore } from "./selector-store.js"; import type { CacheProcessOptions, CacheProcessResult } from "./types.js"; /** 缓存更新选项 */ export interface CacheUpdateOptions { /** 缓存目录路径 */ cacheDir: string; /** SelectorStore 实例(从 llmClient 获取) */ selectorStore: SelectorStore; } /** 缓存更新结果 */ export interface CacheUpdateResult { /** 缓存文件总数 */ totalFiles: number; /** 已更新的选择器数量 */ updatedSelectors: number; /** 跳过的选择器数量(无对应 cssSelector 或非 xpath) */ skippedSelectors: number; /** 更新详情 */ details: Array<{ file: string; instruction: string; oldSelector: string; newSelector: string; }>; } /** * 遍历缓存目录中的 JSON 文件,将 xpath 选择器替换为 SelectorStore 中的 CSS 选择器。 * 仅处理以 "xpath=" 开头的选择器,非 xpath 选择器保持不变。 */ export declare function generalizeCacheSelectors(options: CacheUpdateOptions): CacheUpdateResult; /** * 统一缓存后处理函数 — 同时执行选择器泛化和 manifest 更新。 * 推荐在 afterAll 中调用。 */ export declare function processCacheAfterAll(options: CacheProcessOptions): CacheProcessResult; //# sourceMappingURL=cache-updater.d.ts.map