interface ToolOutput { toolCallId: string; data: unknown; sessionId?: string; } /** * ToolOutputManager handles storage and retrieval of tool execution results * Works on both client and server side with mutex protection for concurrent access */ export declare class ToolOutputManager { private toolOutputs; private mutex; private currentSessionId; /** * Start a new request session to track tool outputs for this specific request */ startSession(): Promise; /** * End the current request session */ endSession(): Promise; /** * Add a tool output to the manager * @param toolCallId - Unique identifier for the tool call * @param data - Data returned by the tool */ addToolOutput(toolCallId: string, data: unknown): Promise; /** * Get the most recent tool output * @returns The last tool output or null if none exists */ getLastToolOutput(): Promise; /** * Get the most recent tool output from the current session only * @returns The last tool output from current session or null if none exists */ getLastToolOutputFromCurrentSession(): Promise; /** * Check if there are any tool outputs from the current session * @returns True if there are tool outputs from current session, false otherwise */ hasToolOutputsInCurrentSession(): Promise; /** * Get all tool outputs from the current session * @returns Array of tool outputs from current session */ getToolOutputsFromCurrentSession(): Promise; /** * Find data by dataset name from all stored tool outputs * Searches through all tool outputs for objects containing the dataset name as a key * @param datasetName - Name of the dataset to search for * @returns The data associated with the dataset name, or null if not found */ findDataByDatasetName(datasetName: string): Promise; /** * Get all tool outputs (for debugging/admin purposes) * @returns Array of all tool outputs */ getAllToolOutputs(): Promise; /** * Clear all tool outputs */ clearAll(): Promise; /** * Check if there are any tool outputs stored * @returns True if there are tool outputs, false otherwise */ hasToolOutputs(): Promise; /** * Create an onToolCompleted callback function for use with tools * @returns A callback function that can be used with tool configurations */ createOnToolCompletedCallback(): (toolCallId: string, data?: unknown) => Promise; } export {};