import type { ToolResultStore, OffloadEntry } from '../agent/types.js'; export interface FileToolResultStoreOptions { /** 工具结果存储目录(默认 {cwd}/data/tool-results) */ storeDir: string; /** 上下文卸载存储目录(默认 {cwd}/data/offload) */ offloadDir: string; } /** * 基于文件系统的工具结果存储 * 将超大工具结果写入 {storeDir}/{callId}.json */ export declare class FileToolResultStore implements ToolResultStore { private storeDir; private offloadDir; constructor(options: FileToolResultStoreOptions); write(callId: string, content: string): string; read(callId: string): string | null; has(callId: string): boolean; /** * 列出所有已保存结果的 call_id(基于文件名,可原样传回 read/has — * getFilePath 的消毒规则对这些 id 幂等) */ keys(): string[]; delete(callId: string): boolean; writeOffload(entry: Omit, content: string): string; readOffload(nodeId: string): string | null; listOffloads(sessionId: string): OffloadEntry[]; /** 清理过期结果(默认超过 24 小时) */ cleanup(maxAgeMs?: number): number; private getFilePath; } //# sourceMappingURL=file-tool-result-store.d.ts.map