UNPKG

@spaik/mcp-server-roi

Version:

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

140 lines 5.95 kB
import { z } from 'zod'; /** * Response Adapter Service * * Adapts responses based on AI agent preferences, format requirements, * and interaction patterns for optimal consumption. */ export declare const ResponseFormatSchema: z.ZodEnum<["full_json", "executive_only", "narrative", "structured_summary", "conversational", "markdown_report", "csv_data", "visual_ready"]>; export declare const AgentPreferencesSchema: z.ZodObject<{ preferred_format: z.ZodEnum<["full_json", "executive_only", "narrative", "structured_summary", "conversational", "markdown_report", "csv_data", "visual_ready"]>; detail_level: z.ZodEnum<["minimal", "standard", "comprehensive"]>; language_style: z.ZodEnum<["formal", "casual", "technical", "executive"]>; include_visuals: z.ZodDefault<z.ZodBoolean>; max_response_tokens: z.ZodOptional<z.ZodNumber>; focus_areas: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; skip_sections: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { preferred_format: "narrative" | "full_json" | "executive_only" | "structured_summary" | "conversational" | "markdown_report" | "csv_data" | "visual_ready"; detail_level: "minimal" | "standard" | "comprehensive"; language_style: "formal" | "casual" | "technical" | "executive"; include_visuals: boolean; max_response_tokens?: number | undefined; focus_areas?: string[] | undefined; skip_sections?: string[] | undefined; }, { preferred_format: "narrative" | "full_json" | "executive_only" | "structured_summary" | "conversational" | "markdown_report" | "csv_data" | "visual_ready"; detail_level: "minimal" | "standard" | "comprehensive"; language_style: "formal" | "casual" | "technical" | "executive"; include_visuals?: boolean | undefined; max_response_tokens?: number | undefined; focus_areas?: string[] | undefined; skip_sections?: string[] | undefined; }>; export declare const AdaptedResponseSchema: z.ZodObject<{ format: z.ZodEnum<["full_json", "executive_only", "narrative", "structured_summary", "conversational", "markdown_report", "csv_data", "visual_ready"]>; content: z.ZodAny; metadata: z.ZodObject<{ original_format: z.ZodString; adaptation_notes: z.ZodArray<z.ZodString, "many">; tokens_saved: z.ZodOptional<z.ZodNumber>; quality_score: z.ZodNumber; }, "strip", z.ZodTypeAny, { original_format: string; adaptation_notes: string[]; quality_score: number; tokens_saved?: number | undefined; }, { original_format: string; adaptation_notes: string[]; quality_score: number; tokens_saved?: number | undefined; }>; }, "strip", z.ZodTypeAny, { metadata: { original_format: string; adaptation_notes: string[]; quality_score: number; tokens_saved?: number | undefined; }; format: "narrative" | "full_json" | "executive_only" | "structured_summary" | "conversational" | "markdown_report" | "csv_data" | "visual_ready"; content?: any; }, { metadata: { original_format: string; adaptation_notes: string[]; quality_score: number; tokens_saved?: number | undefined; }; format: "narrative" | "full_json" | "executive_only" | "structured_summary" | "conversational" | "markdown_report" | "csv_data" | "visual_ready"; content?: any; }>; export type ResponseFormat = z.infer<typeof ResponseFormatSchema>; export type AgentPreferences = z.infer<typeof AgentPreferencesSchema>; export type AdaptedResponse = z.infer<typeof AdaptedResponseSchema>; export declare class ResponseAdapter { private logger; private readonly AGENT_PROFILES; /** * Adapt response based on detected or specified preferences */ adaptResponse(response: any, preferences?: AgentPreferences, context?: any): Promise<AdaptedResponse>; /** * Detect agent type and preferences from interaction patterns */ detectAgentType(queryHistory: any[], currentQuery: any): Promise<{ agent_type: string; confidence: number; detected_patterns: string[]; recommended_preferences: AgentPreferences; }>; /** * Optimize response for specific use cases */ optimizeForUseCase(response: any, useCase: 'decision_making' | 'exploration' | 'reporting' | 'monitoring'): Promise<any>; /** * Convert response to specific output formats */ convertToFormat(response: any, targetFormat: 'json' | 'yaml' | 'xml' | 'html' | 'pdf_ready'): Promise<string>; private formatExecutiveOnly; private formatNarrative; private formatStructuredSummary; private formatConversational; private formatMarkdownReport; private formatCSVData; private formatVisualReady; private detectPreferences; private extractKeyMetrics; private extractDecisionPoints; private extractTopRecommendations; private extractTopRisks; private makeExecutiveLanguage; private applyTokenLimit; private generateAdaptationMetadata; private assessAdaptationQuality; private analyzeInteractionPatterns; private classifyAgentType; private calculateTypeConfidence; private extractFocusAreaData; private optimizeForDecisionMaking; private optimizeForExploration; private optimizeForReporting; private optimizeForMonitoring; private calculateHealthScore; private calculateChange; private generateAlerts; private convertToYAML; private objectToYAML; private convertToXML; private objectToXML; private escapeXML; private convertToHTML; private convertToPDFReady; private prepareROIChartData; private prepareTimelineData; private prepareValueDistribution; private prepareMetricsTable; private prepareKPIs; } export declare const responseAdapter: ResponseAdapter; //# sourceMappingURL=response-adapter.d.ts.map