UNPKG

openai-assistants-mcp

Version:

OpenAI Assistants MCP Server - A Model Context Protocol server providing OpenAI Assistants API tools and resources. Features comprehensive assistant management, thread operations, message handling, and run execution with seamless stdio transport for Claud

124 lines 3.16 kB
/** * Prompt Registry - Central registry for managing MCP prompts * * This module implements the PromptRegistry interface and provides * centralized management of all available prompts for the MCP server. */ import { Prompt, PromptTemplate, PromptMessage, PromptRegistry as IPromptRegistry } from '../types/index.js'; /** * Implementation of the PromptRegistry interface */ export declare class PromptRegistry implements IPromptRegistry { private templates; constructor(); /** * Register all default prompt templates */ private registerDefaultTemplates; /** * Get all available prompts */ getPrompts(): Prompt[]; /** * Get a specific prompt by name */ getPrompt(name: string): Prompt | null; /** * Generate messages for a prompt with arguments */ generatePromptMessages(name: string, args?: Record<string, string>): PromptMessage[]; /** * Register a new prompt template */ registerPrompt(template: PromptTemplate): void; /** * Check if a prompt exists */ hasPrompt(name: string): boolean; /** * Get prompt template (internal use) */ getTemplate(name: string): PromptTemplate | null; /** * Get all prompt names */ getPromptNames(): string[]; /** * Get prompts by category */ getPromptsByCategory(category: string): Prompt[]; /** * Get prompts by tag */ getPromptsByTag(tag: string): Prompt[]; /** * Search prompts by name or description */ searchPrompts(query: string): Prompt[]; /** * Validate arguments for a prompt template */ private validateArguments; /** * Get registry statistics */ getStats(): { totalPrompts: number; categories: (string | undefined)[]; tags: string[]; promptsByCategory: any; }; /** * Export all prompts for debugging */ exportPrompts(): PromptTemplate[]; /** * Clear all prompts (for testing) */ clear(): void; /** * Reset to default prompts */ reset(): void; } /** * Global prompt registry instance */ export declare const promptRegistry: PromptRegistry; /** * Convenience functions for common operations */ /** * Get all available prompts */ export declare function getAvailablePrompts(): Prompt[]; /** * Get a specific prompt */ export declare function getPrompt(name: string): Prompt | null; /** * Generate prompt messages */ export declare function generatePromptMessages(name: string, args?: Record<string, string>): PromptMessage[]; /** * Check if a prompt exists */ export declare function hasPrompt(name: string): boolean; /** * Search prompts */ export declare function searchPrompts(query: string): Prompt[]; /** * Get prompts by category */ export declare function getPromptsByCategory(category: string): Prompt[]; /** * Get registry statistics */ export declare function getPromptRegistryStats(): { totalPrompts: number; categories: (string | undefined)[]; tags: string[]; promptsByCategory: any; }; //# sourceMappingURL=prompt-registry.d.ts.map