bc-code-intelligence-mcp
Version:
BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows
161 lines • 5.32 kB
TypeScript
/**
* BC Specialist Roleplay Engine
*
* Brings specialist personas to life through personality-driven responses,
* consistent character adoption, and context-aware knowledge integration.
*/
import { RoleplayEngine, RoleplayContext, SpecialistResponse, PersonalityTraits, RoleplayConfig } from '../types/roleplay-types.js';
import { SpecialistDefinition } from './specialist-loader.js';
import { SessionContext } from '../types/session-types.js';
import { MultiContentLayerService } from './multi-content-layer-service.js';
import { KnowledgeService } from './knowledge-service.js';
export declare class BCSpecialistRoleplayEngine implements RoleplayEngine {
private readonly layerService;
private readonly knowledgeService;
private config;
private responseTemplates;
private knowledgeRetriever;
constructor(layerService: MultiContentLayerService, knowledgeService: KnowledgeService, config?: Partial<RoleplayConfig>);
/**
* Generate a methodology-contextual response from a specialist
*/
generateResponse(context: RoleplayContext): Promise<SpecialistResponse>;
/**
* Establish methodology context before applying domain knowledge
*/
private establishMethodologyContext;
/**
* Check if user message is a direct question that should get immediate response
*/
private isDirectQuestion;
/**
* Provide immediate specialist response without methodology onboarding
*/
private provideDirectSpecialistResponse;
/**
* Apply knowledge within established methodology context
*/
private applyKnowledgeInMethodology;
/**
* Suggest appropriate methodologies based on user request and specialist expertise
*/
private suggestMethodologies;
/**
* Build methodology onboarding response
*/
private buildMethodologyOnboardingResponse;
/**
* Build response within established methodology context
*/
private buildMethodologyResponse;
/**
* Extract methodology keywords from user message
*/
private extractMethodologyKeywords;
/**
* Get methodologies relevant to specialist
*/
private getSpecialistMethodologies;
/**
* Extract user intent from message
*/
private extractUserIntent;
/**
* Analyze user message to suggest appropriate specialist
*/
suggestSpecialist(userMessage: string, currentContext?: SessionContext): Promise<{
specialist_id: string;
confidence: number;
reasoning: string;
}[]>;
/**
* Generate a specialist greeting for session start
*/
generateGreeting(specialist: SpecialistDefinition, context?: Partial<SessionContext>): Promise<SpecialistResponse>;
/**
* Generate handoff message when transferring between specialists
*/
generateHandoff(fromSpecialist: SpecialistDefinition, toSpecialist: SpecialistDefinition, context: RoleplayContext): Promise<{
farewell: SpecialistResponse;
introduction: SpecialistResponse;
}>;
/**
* Update configuration
*/
updateConfig(config: Partial<RoleplayConfig>): void;
/**
* Get personality analysis for a specialist
*/
analyzePersonality(specialist: SpecialistDefinition): PersonalityTraits;
/**
* Build personality-driven response
*/
private buildPersonalityResponse;
/**
* Generate personality-driven content
*/
private generatePersonalityContent;
/**
* Generate agent roleplay instructions (NOT direct user response)
*/
private generateBasicPersonalityResponse;
/**
* Generate style-appropriate opening
*/
private getStyleApproach;
/**
* Generate knowledge-based guidance
*/
private generateKnowledgeBasedGuidance;
/**
* Get specialist-specific perspective on a topic
*/
private getSpecialistPerspective;
/**
* Extract key guidance points from topic content
*/
private extractKeyGuidancePoints;
/**
* Extract implementation focus from content
*/
private extractImplementationFocus;
/**
* Extract best practices from content
*/
private extractBestPractices;
/**
* Extract pitfalls from content
*/
private extractPitfalls;
/**
* Summarize content into a concise phrase
*/
private summarizeIntoPhrase;
/**
* Generate general guidance when no specific topics match
*/
private generateGeneralGuidance;
private initializeResponseTemplates;
private getResponseTemplates;
private selectBestTemplate;
private fillTemplate;
private extractProblemApproach;
private extractCollaborationStyle;
private extractCharacteristicPhrases;
private buildGreeting;
private buildHandoffFarewell;
private buildHandoffIntroduction;
private calculateSpecialistConfidence;
private generateSuggestionReasoning;
private generateContextUpdates;
private suggestCollaborations;
private getApplicationContext;
/**
* Extract business entity or object from user message
*/
private extractEntityFromMessage;
private generateRecommendations;
private determineResponseType;
private calculateConfidenceLevel;
}
//# sourceMappingURL=roleplay-engine.d.ts.map