Telegram-бот Boltun AI на grammY + Mastra

- Отвечает только администраторам из ADMIN_IDS
- Личности на чат: встроенные и пользовательские (/personas, /persona, /persona_add, /persona_del)
- Вопросы через /ask, упоминание, ответ боту или личку
- Сохраняет сообщения чата в SQLite; агент по просьбе читает их инструментом read_chat_messages
- Модели через OpenRouter (по умолчанию DeepSeek)
- Слои: libs, repositories, services, bot/handlers
- Dockerfile для деплоя в Dokploy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
yunogasai
2026-09-24 18:31:44 +02:00
commit 99c4660da9
32 changed files with 3173 additions and 0 deletions

16
src/types.ts Normal file
View File

@@ -0,0 +1,16 @@
export interface Persona {
id: string;
name: string;
prompt: string;
builtin: boolean;
}
export interface ChatMessage {
chatId: number;
messageId: number;
/** Unix-время в секундах, как в Telegram. */
date: number;
author: string;
text: string;
replyToMessageId: number | null;
}