@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.
55 lines • 1.64 kB
TypeScript
/**
* Installation detection utilities
* Determines whether the application is running from npm or git installation
*/
export type InstallationType = 'npm' | 'git' | 'unknown';
export interface IFileSystem {
realpathSync(path: string): string;
existsSync(path: string): boolean;
statSync(path: string): {
isDirectory(): boolean;
};
}
export declare class InstallationDetector {
private static cachedType;
private static fsOverride;
private static importMetaUrlOverride;
private static readonly MAX_SEARCH_DEPTH;
/**
* Set filesystem operations for testing (DI)
*/
static setFileSystem(fs: IFileSystem | null): void;
/**
* Set import.meta.url for testing
*/
static setImportMetaUrl(url: string | null): void;
/**
* Get the current filesystem implementation
*/
private static getFs;
/**
* Get the current import.meta.url
*/
private static getImportMetaUrl;
/**
* Detect the installation type (npm global, git clone, or unknown)
*/
static getInstallationType(): InstallationType;
/**
* Get the npm global installation path if running from npm
*/
static getNpmGlobalPath(): string | null;
/**
* Get the git repository root path if running from git
*/
static getGitRepositoryPath(): string | null;
/**
* Get a human-readable description of the installation
*/
static getInstallationDescription(): string;
/**
* Clear the cached installation type (mainly for testing)
*/
static clearCache(): void;
}
//# sourceMappingURL=installation.d.ts.map