UNPKG

@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.

44 lines 1.05 kB
/** * File locking utility for preventing race conditions * * Uses advisory locks with timeout and retry logic */ export interface LockOptions { timeout?: number; retryInterval?: number; stale?: number; } export declare class FileLock { private lockPath; private acquired; private lockId; private pendingTimeouts; private disposed; constructor(filePath: string); /** * Dispose the file lock and clear any pending timers. */ dispose(): void; /** * Acquire a lock on the file */ acquire(options?: LockOptions): Promise<boolean>; /** * Release the lock */ release(): Promise<void>; /** * Force release (use with caution) */ forceRelease(): Promise<void>; /** * Check if lock is held */ isLocked(): Promise<boolean>; /** * Execute a function with lock protection */ withLock<T>(fn: () => Promise<T>, options?: LockOptions): Promise<T | null>; private sleep; } //# sourceMappingURL=FileLock.d.ts.map