@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.
41 lines • 1.63 kB
TypeScript
/**
* VerificationNotifier - Non-blocking OS dialog for verification codes (Issue #522)
*
* Spawns native OS dialogs to display verification codes directly to the human.
* The code is NEVER returned to the LLM via MCP tool responses.
*
* Why a separate service instead of reusing DisplayService?
* - DisplayService uses execSync (blocking). We need non-blocking spawn so
* the MCP response returns immediately.
* - DI-injectable for testability (integration tests run headless, can mock/spy).
* - Clean separation: DisplayService owns cross-platform dialog mechanics,
* VerificationNotifier owns the "fire-and-forget, never block the server" concern.
*
* @since v1.1.0
*/
/**
* Interface for verification code display.
* Implementations must NEVER return or log the code itself.
*/
export interface IVerificationNotifier {
/** Fire-and-forget: show the code in an OS dialog. Never throws. */
showCode(code: string, reason: string): void;
/** Whether the current platform supports OS dialogs. */
isAvailable(): boolean;
}
export declare class VerificationNotifier implements IVerificationNotifier {
/**
* Display the verification code via a native OS dialog.
*
* - Uses child_process.spawn with detached + unref for true fire-and-forget
* - Never throws (catches all errors internally)
* - Never logs the code itself
*/
showCode(code: string, reason: string): void;
isAvailable(): boolean;
private spawnMacOS;
private spawnLinux;
private spawnWindows;
private hasLinuxDialogTool;
}
//# sourceMappingURL=VerificationNotifier.d.ts.map