/**
 * Google Chat Thread Store Service
 *
 * Persists Google Chat thread conversations as markdown files so the
 * orchestrator can read conversation history after restart.
 *
 * Storage layout:
 *   ~/.crewly/gchat-threads/
 *     {spaceId}/
 *       {threadId}.md          — Thread conversation file
 *
 * @module services/messaging/gchat-thread-store
 */
/**
 * GoogleChatThreadStoreService manages persistent storage of Google Chat
 * thread conversations as markdown files.
 *
 * @example
 * ```typescript
 * const store = new GoogleChatThreadStoreService();
 * await store.appendUserMessage('spaces/ABC', 'spaces/ABC/threads/XYZ', 'Steve', 'Hello');
 * await store.appendBotReply('spaces/ABC', 'spaces/ABC/threads/XYZ', 'Got it!');
 * ```
 */
export declare class GoogleChatThreadStoreService {
    private baseDir;
    /**
     * Create a new GoogleChatThreadStoreService.
     *
     * @param crewlyHome - Base crewly home directory (defaults to ~/.crewly)
     */
    constructor(crewlyHome?: string);
    /**
     * Compute the file path for a thread conversation file.
     *
     * @param space - Google Chat space name (e.g. "spaces/ABC123")
     * @param thread - Google Chat thread name (e.g. "spaces/ABC123/threads/XYZ")
     * @returns Absolute path to the thread markdown file
     */
    getThreadFilePath(space: string, thread: string): string;
    /**
     * Ensure the thread file exists, creating it with frontmatter if needed.
     *
     * @param space - Google Chat space name
     * @param thread - Google Chat thread name
     * @param userName - Name of the user who started the thread
     * @returns Absolute path to the thread file
     */
    ensureThreadFile(space: string, thread: string, userName: string): Promise<string>;
    /**
     * Append a user message to the thread conversation file.
     *
     * @param space - Google Chat space name
     * @param thread - Google Chat thread name
     * @param userName - Display name of the sender
     * @param message - Message content
     */
    appendUserMessage(space: string, thread: string, userName: string, message: string): Promise<void>;
    /**
     * Read recent messages from a thread file for context injection (#195).
     * Returns the last N messages as a formatted string. Strips frontmatter.
     *
     * @param space - Google Chat space name
     * @param thread - Google Chat thread name
     * @param maxMessages - Maximum number of messages to return
     * @returns Formatted recent messages string, or null if thread file doesn't exist
     */
    getRecentMessages(space: string, thread: string, maxMessages: number): Promise<string | null>;
    /**
     * Append a bot reply to the thread conversation file.
     *
     * @param space - Google Chat space name
     * @param thread - Google Chat thread name
     * @param message - Bot response content
     */
    appendBotReply(space: string, thread: string, message: string): Promise<void>;
}
/**
 * Get the GoogleChatThreadStoreService singleton.
 *
 * @returns The service instance or null if not initialized
 */
export declare function getGchatThreadStore(): GoogleChatThreadStoreService | null;
/**
 * Set the GoogleChatThreadStoreService singleton.
 *
 * @param store - The service instance to set
 */
export declare function setGchatThreadStore(store: GoogleChatThreadStoreService): void;
/**
 * Reset the GoogleChatThreadStoreService singleton (for testing).
 */
export declare function resetGchatThreadStore(): void;
//# sourceMappingURL=gchat-thread-store.service.d.ts.map