import type { Message } from '../core/session/session-jsonl.js'; export declare const STALE_READ_PLACEHOLDER = "[\u5DF2\u7701\u7565\uFF1A\u8BE5\u8DEF\u5F84\u5728\u540E\u7EED\u5DF2\u88AB\u5199\u5165\u6216\u7F16\u8F91\uFF0C\u65E7\u8BFB\u53D6\u7ED3\u679C\u4E0D\u518D\u53EF\u9760\u3002\u5FC5\u8981\u65F6\u8BF7\u91CD\u65B0 read / device_file_read\u3002]"; export declare function isFileMutationTool(toolName: string): boolean; /** * High-confidence workspace paths rewritten by common shell mutation idioms. * Returns relative-looking path tokens (not full shell args). Empty when the * command does not look like a file rewrite (so plain `exec npm test` does not * poison stale-read tracking). * @internal exported for tests */ export declare function extractShellMutationPaths(command: string): string[]; /** * All workspace/device path keys a tool call touches. A single multi_edit / * apply_patch / move_file can mutate several files; returning every key lets * `invalidateStaleReadToolResults` invalidate stale reads for each. Read tools * always return at most one key. * * `toolPathKey` (single-value, for replay) delegates to the first key here. */ export declare function toolPathKeys(toolName: string, input: Record): string[]; export declare function toolPathKey(toolName: string, input: Record): string | null; export interface StaleReadInvalidateResult { messages: Message[]; invalidatedCount: number; savedChars: number; savedTokens: number; } export declare function invalidateStaleReadToolResults(messages: Message[]): StaleReadInvalidateResult; export declare const FILE_UNCHANGED_PLACEHOLDER = "[\u5DF2\u7701\u7565\uFF1A\u8BE5\u6587\u4EF6\u540E\u7EED\u88AB\u518D\u6B21\u8BFB\u53D6\u4E14\u5185\u5BB9\u5B8C\u5168\u4E00\u81F4\uFF0C\u5B8C\u6574\u5185\u5BB9\u89C1\u4E0B\u65B9\u8F83\u65B0\u7684\u8BFB\u53D6\u7ED3\u679C\uFF0C\u65E0\u9700\u91CD\u590D\u4FDD\u7559\u3002]"; export declare function isCompactedReadPlaceholder(content: string): boolean; export declare function dedupeUnchangedReadToolResults(messages: Message[]): StaleReadInvalidateResult; //# sourceMappingURL=stale-read-invalidate.d.ts.map