UNPKG

@mseep/atlas-mcp-server

Version:

A Model Context Protocol (MCP) server for ATLAS, a Neo4j-powered task management system for LLM Agents - implementing a three-tier architecture (Projects, Tasks, Knowledge) to manage complex workflows.

49 lines (48 loc) 1.6 kB
/** * Event types for database operations */ export declare enum DatabaseEventType { WRITE_OPERATION = "write_operation", READ_OPERATION = "read_operation", TRANSACTION_COMPLETE = "transaction_complete", ERROR = "error" } /** * Database event system to facilitate communication between services * Uses the publish-subscribe pattern to decouple components */ declare class DatabaseEventSystem { private emitter; private static instance; private constructor(); /** * Get the singleton instance */ static getInstance(): DatabaseEventSystem; /** * Subscribe to a database event * @param eventType Event type to subscribe to * @param listener Function to call when the event occurs */ subscribe<T>(eventType: DatabaseEventType, listener: (data: T) => void): void; /** * Unsubscribe from a database event * @param eventType Event type to unsubscribe from * @param listener Function to remove */ unsubscribe<T>(eventType: DatabaseEventType, listener: (data: T) => void): void; /** * Publish a database event * @param eventType Event type to publish * @param data Event data */ publish<T>(eventType: DatabaseEventType, data: T): void; /** * Subscribe to a database event only once * @param eventType Event type to subscribe to * @param listener Function to call when the event occurs */ subscribeOnce<T>(eventType: DatabaseEventType, listener: (data: T) => void): void; } export declare const databaseEvents: DatabaseEventSystem; export {};