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

35
package.json Normal file
View File

@@ -0,0 +1,35 @@
{
"name": "boltun-ai",
"version": "1.0.0",
"description": "Telegram-бот с AI-личностями на grammY + Mastra",
"private": true,
"type": "module",
"engines": {
"node": ">=22.13.0"
},
"scripts": {
"dev": "tsx watch --env-file-if-exists=.env src/index.ts",
"start": "node --env-file-if-exists=.env dist/index.js",
"build": "tsc",
"typecheck": "tsc --noEmit"
},
"packageManager": "pnpm@10.33.2",
"pnpm": {
"onlyBuiltDependencies": [
"better-sqlite3",
"esbuild"
]
},
"dependencies": {
"@mastra/core": "^1.70.0",
"better-sqlite3": "^13.0.3",
"grammy": "^1.46.0",
"zod": "^4.6.5"
},
"devDependencies": {
"@types/better-sqlite3": "^9.6.0",
"@types/node": "^26.6.2",
"tsx": "^4.23.15",
"typescript": "^7.0.2"
}
}