UNPKG

@mickdarling/dollhousemcp

Version:

DollhouseMCP - A Model Context Protocol (MCP) server that enables dynamic AI persona management from markdown files, allowing Claude and other compatible AI assistants to activate and switch between different behavioral personas.

112 lines 2.85 kB
/** * Core persona management operations */ import { Persona } from '../types/persona.js'; import { PersonaValidator } from './PersonaValidator.js'; import { IndicatorConfig } from '../config/indicator-config.js'; export declare class PersonaManager { private personas; private activePersona; private currentUser; private loader; private validator; private indicatorConfig; constructor(personasDir: string, indicatorConfig: IndicatorConfig); /** * Initialize and load all personas */ initialize(): Promise<void>; /** * Reload all personas from disk */ reload(): Promise<void>; /** * Get all loaded personas */ getAllPersonas(): Map<string, Persona>; /** * Find a persona by identifier (filename, name, or unique_id) */ findPersona(identifier: string): Persona | undefined; /** * Activate a persona */ activatePersona(identifier: string): { success: boolean; message: string; persona?: Persona; }; /** * Deactivate the current persona */ deactivatePersona(): { success: boolean; message: string; }; /** * Get the active persona */ getActivePersona(): Persona | null; /** * Get persona indicator for responses */ getPersonaIndicator(): string; /** * Create a new persona */ createPersona(name: string, description: string, category: string, instructions: string): Promise<{ success: boolean; message: string; filename?: string; }>; /** * Edit an existing persona */ editPersona(personaName: string, field: string, value: string): Promise<{ success: boolean; message: string; }>; /** * Validate a persona */ validatePersona(identifier: string): { found: boolean; validation?: ReturnType<PersonaValidator['validatePersona']>; }; /** * Set current user identity */ setUserIdentity(username: string | null, email?: string): void; /** * Get current user identity */ getUserIdentity(): { username: string | null; email: string | null; }; /** * Clear user identity */ clearUserIdentity(): void; /** * Update indicator configuration */ updateIndicatorConfig(config: IndicatorConfig): void; /** * Get current indicator configuration */ getIndicatorConfig(): IndicatorConfig; /** * Helper to get current user for attribution */ private getCurrentUserForAttribution; /** * Generate trigger keywords from persona name */ private generateTriggers; /** * Increment version number */ private incrementVersion; } //# sourceMappingURL=PersonaManager.d.ts.map