/** * PersonaHandler - Handles all persona-related MCP tool operations * * Provides the interface for activating, deactivating, listing, exporting, * and importing personas through MCP tools. * * Uses dependency injection for all services: * - PersonaManager for persona state and operations * - InitializationService for setup tasks * - PersonaIndicatorService for persona indicator formatting * * FIX: DMCP-SEC-006 - Security audit suppression * This handler delegates all operations to PersonaManager. * Audit logging happens in PersonaManager for CRUD operations. * @security-audit-suppress DMCP-SEC-006 */ import { PersonaExporter, PersonaImporter } from '../persona/export-import/index.js'; import { PersonaManager } from '../persona/PersonaManager.js'; import { InitializationService } from '../services/InitializationService.js'; import { PersonaIndicatorService } from '../services/PersonaIndicatorService.js'; /** * Handles all persona-related MCP tool operations */ export declare class PersonaHandler { private readonly personaManager; private readonly personaExporter; private readonly personaImporter; private readonly initService; private readonly indicatorService; private readonly activePersona; constructor(personaManager: PersonaManager, personaExporter: PersonaExporter, personaImporter: PersonaImporter | undefined, initService: InitializationService, indicatorService: PersonaIndicatorService, activePersona: { get: () => string | null; set: (value: string | null) => void; }); /** * List all available personas * Extracted from index.ts:515-557 */ listPersonas(): Promise<{ content: { type: string; text: string; }[]; }>; /** * Activate a persona by identifier (filename or name) * Extracted from index.ts:559-592 */ activatePersona(personaIdentifier: string): Promise; /** * Get currently active persona details * Extracted from index.ts:594-631 */ getActivePersona(): Promise<{ content: { type: string; text: string; }[]; }>; /** * Deactivate the currently active persona * Extracted from index.ts:633-648 */ deactivatePersona(): Promise<{ content: { type: string; text: string; }[]; }>; /** * Get detailed information about a specific persona * Extracted from index.ts:650-690 */ getPersonaDetails(personaIdentifier: string): Promise; /** * Reload personas from disk * Extracted from index.ts:692-702 */ reloadPersonas(): Promise<{ content: { type: string; text: string; }[]; }>; /** * Create a new persona * Extracted from index.ts:3753-4029 (277 lines - exact copy) */ createPersona(name: string, description: string, instructions: string, triggers?: string, metadata?: Record): Promise<{ content: { type: string; text: string; }[]; }>; /** * Export a persona to base64-encoded JSON * Extracted from index.ts:4635-4670 */ exportPersona(personaName: string): Promise<{ content: { type: string; text: string; }[]; }>; /** * Export all personas as a bundle * Extracted from index.ts:4790-4810 */ exportAllPersonas(includeDefaults?: boolean): Promise<{ content: { type: string; text: string; }[]; }>; /** * Import a persona from file path or JSON string * Extracted from index.ts:4701-4739 */ importPersona(source: string, overwrite?: boolean): Promise<{ content: { type: string; text: string; }[]; }>; editPersona(personaIdentifier: string, field: string, value: string): Promise<{ content: { type: string; text: string; }[]; }>; validatePersona(personaIdentifier: string): Promise<{ content: { type: string; text: string; }[]; }>; deletePersona(personaIdentifier: string): Promise<{ content: { type: string; text: string; }[]; }>; } //# sourceMappingURL=PersonaHandler.d.ts.map