import type { App } from "@modelcontextprotocol/ext-apps"; import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; import { type APP_DATA_SOURCES } from "../../constants"; type Source = (typeof APP_DATA_SOURCES)[number]; /** The data an app draws (CONTEXT.md, App data), and the server's record of how that went. */ export interface AppDataTracker { /** * The full data for this tool result, from the first of these that has it: * - the result's `_meta`, where the server inlines it; * - for an app made with `refetch`, the tool named in the result's `_meta.tool`, the * text's `tool`, or the app's own tool, run again with this call's input; * - without a tool there, the response itself, which is the full data under response_detail "full". * * @throws {Error} When the data isn't in the result and the app can't fetch it, or the fetch fails. */ load(result: Pick, agentResponse: unknown): Promise; /** Tells the server the app drew, from `source` when it drew without `load`. */ drawn(source?: Source): void; /** Tells the server the app could not draw. */ failed(error: unknown): void; } interface TrackOptions { /** The tool this app draws, used when the result does not name one. */ tool?: string; /** * Run the tool again for data missing from the result. Only for tomtom-data-viz: * running a TomTom tool again would be a second billed API request. */ refetch?: boolean; } export declare function trackAppData(app: App, { tool: defaultTool, refetch }?: TrackOptions): AppDataTracker; export {}; //# sourceMappingURL=appData.d.ts.map