/** * @module memory/hermes-bridge * @description Cross-session integration with Hermes Agent session database. * * If the user has Hermes Agent installed (detected via ~/.hermes/ directory), * the memory subsystem can query Hermes session history for cross-session * context. This enables the agent to recall relevant conversations from * previous Hermes sessions while keeping the data local. * * If Hermes is not installed, all bridge functions return empty results — * the memory subsystem operates standalone. */ /** * @name HermesBridge * @description Bridges the SAP MCP memory subsystem with Hermes Agent session data. * * Detection: checks for ~/.hermes/ directory. If present, the bridge can query * the Hermes SQLite session database for relevant past conversations. */ export declare class HermesBridge { private readonly hermesDir; private readonly legacyDbPath; private readonly stateDbPath; private available; constructor(hermesDir?: string); /** * @name isAvailable * @description Checks whether Hermes Agent is installed on this machine. * Caches the result to avoid repeated filesystem checks. */ isAvailable(): boolean; /** * @name getHermesDir * @description Returns the Hermes installation directory. */ getHermesDir(): string; /** * @name searchSessions * @description Searches Hermes session history for relevant past conversations. * * This is a lightweight bridge — it reads the Hermes session database using * the same better-sqlite3 driver (opening a read-only connection). The query * uses FTS5 if the Hermes DB has it, otherwise falls back to LIKE search. * * @param query - Search query (natural language). * @param limit - Max results. Default 5. * @returns Array of session snippets with timestamps. */ searchSessions(query: string, limit?: number): Array<{ sessionId: string; title: string; snippet: string; timestamp: string; }>; /** * @name getRecentSessions * @description Returns recent Hermes sessions for context injection. * @param limit - Max sessions. Default 3. */ getRecentSessions(limit?: number): Array<{ sessionId: string; title: string; timestamp: string; }>; private getReadableDbPath; private hasModernStateSchema; private searchModernStateDb; private searchLegacySessionsDb; private hasTable; private toFtsPhrase; private formatTimestamp; } /** * @name hermesBridge * @description Singleton instance of the Hermes bridge. */ export declare const hermesBridge: HermesBridge; //# sourceMappingURL=hermes-bridge.d.ts.map