/** * Cursor Provider - Uses host AI capabilities via MCP sampling * * This provider delegates LLM calls to Cursor's built-in AI via MCP's * sampling capability (mcpServer.server.createMessage), allowing users * to leverage their Cursor subscription instead of configuring separate API keys. * * Architecture: Uses dependency injection to receive MCPSamplingService, * eliminating tight coupling to global state and enabling testability. * * HTTP Agent Pooling Status: ✅ NOT APPLICABLE * Reason: Uses MCP protocol, not direct HTTP requests * No HTTP connections to pool * * Self-registers with the LLM Provider Registry using dependency inversion pattern */ import type { LLMCompletionOptions, LLMCompletionResult } from '../../types/llm.types.js'; import type { MCPSamplingService } from '../../types/mcp.types.js'; import { BaseLLMProvider } from '../provider.interface.js'; export declare class CursorProvider extends BaseLLMProvider { name: import("../../config/providers.config.js").ProviderName; private mcpSampling; getAlternativeModels(currentModel?: string): string[]; validateModel(modelName: string): Promise; /** * Creates a CursorProvider instance * * @param config - Provider configuration (unused for Cursor, but required by base class) * @param mcpSampling - Optional MCP sampling service. If not provided, provider will not be configured. */ constructor(config: Record, mcpSampling?: MCPSamplingService); /** * Cursor provider is configured when MCP sampling service is available */ isConfigured(): boolean; /** * Complete the prompt using MCP sampling or guided completion */ complete(options: LLMCompletionOptions): Promise; private getMCPSampling; /** * Create a guided completion response when sampling is not available * This returns structured data for Cursor AI to process instead of trying to sample */ streamComplete(options: LLMCompletionOptions, onChunk: (chunk: string) => void): Promise; private createGuidedCompletion; /** * Format guided prompt for Cursor AI to process * Loads template from data/templates/GUIDED_COMPLETION.md and populates with variables */ private extractSystemPrompt; private formatGuidedPrompt; /** * Fallback inline formatting (used if template loading fails) * Maintains original functionality as safety net */ private formatGuidedPromptFallback; private formatMessages; } //# sourceMappingURL=cursor.provider.d.ts.map