/** * Prompt templates for LLM-guided interview and analysis. * * All prompts are extracted here for: * - Easier maintenance and versioning * - Consistent formatting * - Potential future i18n support * - Testing and validation * * SECURITY NOTE: All user-provided data (tool descriptions, schemas, etc.) * is sanitized before inclusion in prompts to prevent prompt injection attacks. */ import type { MCPTool, MCPToolCallResult, MCPPrompt, MCPPromptGetResult } from '../transport/types.js'; import type { InterviewQuestion, ToolProfile, ServerContext, PromptQuestion } from '../interview/types.js'; import type { DiscoveryResult } from '../discovery/types.js'; import type { Persona } from '../persona/types.js'; import type { Workflow, WorkflowStep, WorkflowStepResult } from '../workflow/types.js'; /** * Default system prompt for documentation-focused interviews. */ export declare const DEFAULT_SYSTEM_PROMPT = "You are a technical documentation assistant helping to generate API documentation for software tools. Your task is to create helpful usage examples and documentation that developers can reference. All examples you generate are for documentation purposes only and will be used in developer guides and API references. Focus on being helpful and educational."; export interface QuestionGenerationContext { tool: MCPTool; maxQuestions: number; categoryGuidance: string; categoryList: string; skipErrorTests: boolean; serverContext?: ServerContext; previousErrors?: Array<{ args: Record; error: string; }>; } /** * Generate the prompt for creating interview questions for a tool. * * SECURITY: Tool name, description, and schema are sanitized to prevent * prompt injection attacks from malicious MCP servers. */ export declare function buildQuestionGenerationPrompt(ctx: QuestionGenerationContext): string; export interface ResponseAnalysisContext { tool: MCPTool; question: InterviewQuestion; response: MCPToolCallResult | null; error: string | null; persona: Persona; } /** * Generate the prompt for analyzing a tool response. * * SECURITY: Response content is sanitized to prevent prompt injection. */ export declare function buildResponseAnalysisPrompt(ctx: ResponseAnalysisContext): string; export interface ToolProfileSynthesisContext { tool: MCPTool; interactions: Array<{ question: InterviewQuestion; response: MCPToolCallResult | null; error: string | null; analysis: string; }>; } /** * Generate the prompt for synthesizing a tool profile. * * SECURITY: Tool data and interaction results are sanitized. */ export declare function buildToolProfileSynthesisPrompt(ctx: ToolProfileSynthesisContext): string; export interface OverallSynthesisContext { discovery: DiscoveryResult; toolProfiles: ToolProfile[]; } /** * Generate the prompt for synthesizing overall interview results. */ export declare function buildOverallSynthesisPrompt(ctx: OverallSynthesisContext): string; export interface WorkflowStepAnalysisContext { workflow: Workflow; step: WorkflowStep; stepIndex: number; response: MCPToolCallResult | null; error: string | undefined; } /** * Generate the prompt for analyzing a workflow step. */ export declare function buildWorkflowStepAnalysisPrompt(ctx: WorkflowStepAnalysisContext): string; export interface WorkflowSummaryContext { workflow: Workflow; stepResults: WorkflowStepResult[]; success: boolean; } /** * Generate the prompt for summarizing a workflow execution. */ export declare function buildWorkflowSummaryPrompt(ctx: WorkflowSummaryContext): string; export interface PromptQuestionGenerationContext { prompt: MCPPrompt; maxQuestions: number; } /** * Generate test cases for an MCP prompt. */ export declare function buildPromptQuestionGenerationPrompt(ctx: PromptQuestionGenerationContext): string; export interface PromptResponseAnalysisContext { prompt: MCPPrompt; question: PromptQuestion; response: MCPPromptGetResult | null; error: string | null; } /** * Generate the prompt for analyzing a prompt response. */ export declare function buildPromptResponseAnalysisPrompt(ctx: PromptResponseAnalysisContext): string; export interface PromptProfileSynthesisContext { prompt: MCPPrompt; interactions: Array<{ question: PromptQuestion; response: MCPPromptGetResult | null; error: string | null; analysis: string; }>; } /** * Generate the prompt for synthesizing a prompt profile. */ export declare function buildPromptProfileSynthesisPrompt(ctx: PromptProfileSynthesisContext): string; /** * Standard completion options for different prompt types. */ export declare const COMPLETION_OPTIONS: { /** For question generation - slightly higher temperature for variety */ readonly questionGeneration: { readonly temperature: 0.4; readonly responseFormat: "json"; readonly maxTokens: 2048; }; /** For response analysis - lower temperature for consistency */ readonly responseAnalysis: { readonly temperature: 0.3; readonly maxTokens: 1024; }; /** For profile synthesis - structured output */ readonly profileSynthesis: { readonly temperature: 0.3; readonly responseFormat: "json"; }; /** For overall summary - structured output */ readonly overallSynthesis: { readonly temperature: 0.3; readonly responseFormat: "json"; }; /** For workflow step analysis */ readonly workflowStepAnalysis: { readonly temperature: 0.3; readonly maxTokens: 1024; }; /** For workflow summary */ readonly workflowSummary: { readonly temperature: 0.3; readonly maxTokens: 1024; }; /** For prompt question generation */ readonly promptQuestionGeneration: { readonly temperature: 0.4; readonly responseFormat: "json"; readonly maxTokens: 2048; }; /** For prompt response analysis */ readonly promptResponseAnalysis: { readonly temperature: 0.3; readonly maxTokens: 1024; }; /** For prompt profile synthesis */ readonly promptProfileSynthesis: { readonly temperature: 0.3; readonly responseFormat: "json"; }; }; //# sourceMappingURL=templates.d.ts.map