/** * A dataset in the tool cache. * The type of the content is determined by the tool that added the dataset. */ export type ToolCacheDataset = { type: 'geojson'; content: GeoJSON.FeatureCollection; } | { type: 'columnData'; content: Record[]; } | { type: 'string'; content: string; } | { type: 'rowObjects'; content: unknown[][]; } | { type: 'json'; content: Record; } | { type: 'weights'; content: { weights: number[][]; weightsMeta: Record; }; } | { type: 'arrow'; content: unknown; }; /** * A singleton class to cache the results of tools. * */ export declare class ToolCache { private static instance; private cachedResults; private constructor(); static getInstance(): ToolCache; get toolCache(): Record; addDataset(toolCallId: string, additionalData: unknown): void; clearCache(): void; removeDataset(datasetName: string): void; hasDataset(datasetName: string): boolean; getDataset(datasetName: string): ToolCacheDataset | null; }