UNPKG

@spaik/mcp-server-roi

Version:

MCP server for AI ROI prediction and tracking with Monte Carlo simulations

213 lines 7.75 kB
import { z } from 'zod'; /** * Conversational Bridge Service * * Transforms structured responses into natural, conversational language * that feels like talking to a knowledgeable advisor rather than a system. */ export declare const ConversationStyleSchema: z.ZodEnum<["professional", "friendly", "executive", "technical", "educational"]>; export declare const ConversationalResponseSchema: z.ZodObject<{ message: z.ZodString; tone: z.ZodObject<{ style: z.ZodEnum<["professional", "friendly", "executive", "technical", "educational"]>; formality: z.ZodNumber; enthusiasm: z.ZodNumber; confidence: z.ZodNumber; }, "strip", z.ZodTypeAny, { confidence: number; style: "technical" | "executive" | "professional" | "friendly" | "educational"; formality: number; enthusiasm: number; }, { confidence: number; style: "technical" | "executive" | "professional" | "friendly" | "educational"; formality: number; enthusiasm: number; }>; elements: z.ZodObject<{ greeting: z.ZodOptional<z.ZodString>; context_acknowledgment: z.ZodOptional<z.ZodString>; main_content: z.ZodArray<z.ZodString, "many">; clarifications: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; closing: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { main_content: string[]; greeting?: string | undefined; context_acknowledgment?: string | undefined; clarifications?: string[] | undefined; closing?: string | undefined; }, { main_content: string[]; greeting?: string | undefined; context_acknowledgment?: string | undefined; clarifications?: string[] | undefined; closing?: string | undefined; }>; interactive: z.ZodObject<{ follow_up_questions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; suggested_topics: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; clarification_prompts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { follow_up_questions?: string[] | undefined; suggested_topics?: string[] | undefined; clarification_prompts?: string[] | undefined; }, { follow_up_questions?: string[] | undefined; suggested_topics?: string[] | undefined; clarification_prompts?: string[] | undefined; }>; metadata: z.ZodObject<{ word_count: z.ZodNumber; reading_time_seconds: z.ZodNumber; complexity_level: z.ZodEnum<["simple", "moderate", "complex"]>; jargon_count: z.ZodNumber; }, "strip", z.ZodTypeAny, { word_count: number; reading_time_seconds: number; complexity_level: "moderate" | "simple" | "complex"; jargon_count: number; }, { word_count: number; reading_time_seconds: number; complexity_level: "moderate" | "simple" | "complex"; jargon_count: number; }>; }, "strip", z.ZodTypeAny, { message: string; metadata: { word_count: number; reading_time_seconds: number; complexity_level: "moderate" | "simple" | "complex"; jargon_count: number; }; tone: { confidence: number; style: "technical" | "executive" | "professional" | "friendly" | "educational"; formality: number; enthusiasm: number; }; elements: { main_content: string[]; greeting?: string | undefined; context_acknowledgment?: string | undefined; clarifications?: string[] | undefined; closing?: string | undefined; }; interactive: { follow_up_questions?: string[] | undefined; suggested_topics?: string[] | undefined; clarification_prompts?: string[] | undefined; }; }, { message: string; metadata: { word_count: number; reading_time_seconds: number; complexity_level: "moderate" | "simple" | "complex"; jargon_count: number; }; tone: { confidence: number; style: "technical" | "executive" | "professional" | "friendly" | "educational"; formality: number; enthusiasm: number; }; elements: { main_content: string[]; greeting?: string | undefined; context_acknowledgment?: string | undefined; clarifications?: string[] | undefined; closing?: string | undefined; }; interactive: { follow_up_questions?: string[] | undefined; suggested_topics?: string[] | undefined; clarification_prompts?: string[] | undefined; }; }>; export type ConversationStyle = z.infer<typeof ConversationStyleSchema>; export type ConversationalResponse = z.infer<typeof ConversationalResponseSchema>; export declare class ConversationalBridge { private logger; private readonly CONVERSATION_TEMPLATES; /** * Transform response into conversational format */ transformToConversation(response: any, style?: ConversationStyle, context?: { user_expertise?: 'beginner' | 'intermediate' | 'expert'; previous_interactions?: number; urgency?: 'low' | 'medium' | 'high'; }): Promise<ConversationalResponse>; /** * Generate natural language explanations */ explainInNaturalLanguage(concept: string, data: any, targetAudience?: 'executive' | 'technical' | 'general'): Promise<string>; /** * Create conversational narratives from data */ createNarrative(data: any, narrativeType: 'success_story' | 'cautionary_tale' | 'comparison' | 'journey'): Promise<{ narrative: string; key_points: string[]; emotional_arc: string[]; }>; /** * Handle conversational context and memory */ maintainConversationFlow(currentResponse: any, conversationHistory: Array<{ role: 'user' | 'assistant'; content: string; timestamp: string; }>): Promise<{ contextual_response: string; references_to_past: string[]; conversation_continuity: number; }>; /** * Adapt language complexity based on audience */ adaptComplexity(content: string, targetComplexity: 'simple' | 'moderate' | 'complex', preserveAccuracy?: boolean): Promise<{ adapted_content: string; complexity_changes: string[]; accuracy_preserved: boolean; }>; private determineTone; private buildConversationElements; private generateInteractiveElements; private composeMessage; private calculateMetadata; private selectGreeting; private selectClosing; private buildMainContent; private phraseKeyInsight; private phraseRisk; private needsClarification; private generateClarifications; private generateFollowUpQuestions; private suggestRelatedTopics; private isComplex; private countJargon; private assessComplexity; private explainROI; private explainPaybackPeriod; private explainRiskFactors; private explainTimeline; private explainCosts; private explainGeneric; private createSuccessStory; private createCautionaryTale; private createComparisonNarrative; private createJourneyNarrative; private createGenericNarrative; private analyzeConversationContext; private buildContextualResponse; private findPastReferences; private calculateContinuity; private simplifyJargon; private shortenSentences; private addSimpleAnalogies; private addTechnicalDetails; private usePreciseTerminology; private verifyAccuracy; } export declare const conversationalBridge: ConversationalBridge; //# sourceMappingURL=conversational-bridge.d.ts.map