import type { IMastraLogger } from '@mastra/core/logger'; import type { Server } from '@modelcontextprotocol/sdk/server/index.js'; interface ServerResourceActionsDependencies { getSubscriptions: () => Set; getLogger: () => IMastraLogger; getSdkServer: () => Server; } /** * Server-side resource actions for notifying clients about resource changes. * * This class provides methods for MCP servers to notify connected clients when * resources are updated or when the resource list changes. */ export declare class ServerResourceActions { private readonly getSubscriptions; private readonly getLogger; private readonly getSdkServer; /** * @internal */ constructor(dependencies: ServerResourceActionsDependencies); /** * Notifies subscribed clients that a specific resource has been updated. * * If clients are subscribed to the resource URI, they will receive a * `notifications/resources/updated` message to re-fetch the resource content. * * @param params - Notification parameters * @param params.uri - URI of the resource that was updated * @throws {MastraError} If sending the notification fails * * @example * ```typescript * // After updating a file resource * await server.resources.notifyUpdated({ uri: 'file://data.txt' }); * ``` */ notifyUpdated({ uri }: { uri: string; }): Promise; /** * Notifies clients that the overall list of available resources has changed. * * This sends a `notifications/resources/list_changed` message to all clients, prompting * them to re-fetch the resource list. Resource lists and templates are always evaluated * per request, so there is no server-side cache to clear. * * @throws {MastraError} If sending the notification fails * * @example * ```typescript * // After adding a new resource to your resource handler * await server.resources.notifyListChanged(); * ``` */ notifyListChanged(): Promise; } export {}; //# sourceMappingURL=resourceActions.d.ts.map