/** * Memory Journal MCP Server - Progress Notification Utilities * * Utilities for sending MCP progress notifications during long-running operations. * Follows MCP 2025-11-25 specification for notifications/progress. */ /** * Minimal interface for sending MCP notifications. * Uses structural typing to avoid importing the deprecated Server class. */ interface NotificationSender { notification(notification: { method: 'notifications/progress'; params: { progressToken: string | number; progress: number; total?: number; message?: string; }; }): Promise; } /** Progress token from client request _meta */ export type ProgressToken = string | number; /** Context required to send progress notifications */ export interface ProgressContext { /** Object with notification method for sending progress updates */ server: NotificationSender; /** Progress token from request _meta (if client requested progress) */ progressToken?: ProgressToken; } /** * Send a progress notification to the client. * * Only sends if a progressToken was provided in the original request. * Silently no-ops if no token was provided. * * @param ctx - Progress context with server and optional token * @param progress - Current progress value (e.g., items processed) * @param total - Optional total value for percentage calculation * @param message - Optional human-readable status message */ export declare function sendProgress(ctx: ProgressContext | undefined, progress: number, total?: number, message?: string): Promise; /** * Create a progress reporter function for batch operations. * * @param ctx - Progress context * @param total - Total number of items to process * @param throttle - Report every N items (default: 10) * @returns Async function to call on each item processed */ export declare function createBatchProgressReporter(ctx: ProgressContext | undefined, total: number, throttle?: number): (current: number, message?: string) => Promise; export {}; //# sourceMappingURL=progress-utils.d.ts.map