/**
 * Telegram Thread Store Service
 *
 * Persists Telegram chat conversations as markdown files so the
 * orchestrator can read conversation history after restart.
 *
 * Storage layout:
 *   ~/.crewly/telegram-threads/
 *     {chatId}.md          — Chat conversation file
 *
 * @module services/telegram/telegram-thread-store
 */
/**
 * TelegramThreadStoreService manages persistent storage of Telegram
 * chat conversations as markdown files.
 *
 * @example
 * ```typescript
 * const store = new TelegramThreadStoreService();
 * await store.appendUserMessage('12345', 'Alice', 'Hello bot!');
 * await store.appendBotReply('12345', 'Hello Alice!');
 * ```
 */
export declare class TelegramThreadStoreService {
    private baseDir;
    /**
     * Create a new TelegramThreadStoreService.
     *
     * @param crewlyHome - Base crewly home directory (defaults to ~/.crewly)
     */
    constructor(crewlyHome?: string);
    /**
     * Compute the file path for a chat conversation file.
     *
     * @param chatId - Telegram chat ID
     * @returns Absolute path to the chat markdown file
     */
    getChatFilePath(chatId: string): string;
    /**
     * Ensure the chat file exists, creating it with frontmatter if needed.
     *
     * @param chatId - Telegram chat ID
     * @param userName - Name of the user who started the conversation
     * @returns Absolute path to the chat file
     */
    ensureChatFile(chatId: string, userName: string): Promise<string>;
    /**
     * Append a user message to the chat conversation file.
     *
     * @param chatId - Telegram chat ID
     * @param userName - Display name of the sender
     * @param message - Message content
     */
    appendUserMessage(chatId: string, userName: string, message: string): Promise<void>;
    /**
     * Append a bot reply to the chat conversation file.
     *
     * @param chatId - Telegram chat ID
     * @param message - Bot response content
     */
    appendBotReply(chatId: string, message: string): Promise<void>;
    /**
     * Read the latest conversation thread file path for a given chat.
     *
     * @param chatId - Telegram chat ID
     * @returns Path to the thread file, or null if not found
     */
    getLatestThreadPath(chatId: string): Promise<string | null>;
}
/**
 * Get the TelegramThreadStoreService singleton.
 *
 * @returns The service instance or null if not initialized
 */
export declare function getTelegramThreadStore(): TelegramThreadStoreService | null;
/**
 * Set the TelegramThreadStoreService singleton.
 *
 * @param store - The service instance to set
 */
export declare function setTelegramThreadStore(store: TelegramThreadStoreService): void;
/**
 * Reset the TelegramThreadStoreService singleton (for testing).
 */
export declare function resetTelegramThreadStore(): void;
//# sourceMappingURL=telegram-thread-store.service.d.ts.map