@dollhousemcp/mcp-server
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.
66 lines • 2.02 kB
TypeScript
/**
* Portfolio Manager - Manages the portfolio directory structure for all element types
*/
import { ElementType, PortfolioConfig } from './types.js';
export { ElementType };
export type { PortfolioConfig };
export declare class PortfolioManager {
private static instance;
private static instanceLock;
private static initializationLock;
private static initializationPromise;
private baseDir;
private constructor();
static getInstance(config?: PortfolioConfig): PortfolioManager;
/**
* Get the base portfolio directory
*/
getBaseDir(): string;
/**
* Get the directory for a specific element type
*/
getElementDir(type: ElementType): string;
/**
* Initialize the portfolio directory structure
* Uses locking to prevent race conditions during concurrent initialization
*/
initialize(): Promise<void>;
/**
* Perform the actual initialization - should only be called once
*/
private performInitialization;
/**
* Check if portfolio directory exists
*/
exists(): Promise<boolean>;
/**
* List all elements of a specific type
*/
listElements(type: ElementType): Promise<string[]>;
/**
* Get full path to an element file
*/
getElementPath(type: ElementType, filename: string): string;
/**
* Check if an element exists
*/
elementExists(type: ElementType, filename: string): Promise<boolean>;
/**
* Get legacy personas directory path (for migration)
*/
getLegacyPersonasDir(): string;
/**
* Check if legacy personas directory exists
*/
hasLegacyPersonas(): Promise<boolean>;
/**
* Get portfolio statistics
*/
getStatistics(): Promise<Record<ElementType, number>>;
/**
* Migrate from v1.4.2 singular directory names to v1.4.3 plural names
* This handles the upgrade path for existing users
*/
private migrateFromSingularDirectories;
}
//# sourceMappingURL=PortfolioManager.d.ts.map