Files
stack/plugins/telegram
Jarvis 6954e43bbb feat: local tier gateway with PGlite + Gitea-only publishing + repo linking
- Add PGlite (embedded Postgres) for local tier — gateway runs without
  external PG server. Same schema, same Drizzle API, zero module refactor.
- Install wizard now offers tier selection (local vs team).
  Local skips DATABASE_URL/VALKEY_URL, writes mosaic.config.json.
- Comment out npmjs publish step in CI (preserved for future use).
- Revert gateway publishConfig to Gitea registry, include in Gitea publish.
- Add repository field to all 23 publishable package.json files for
  Gitea package-to-repo linking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-04 13:32:02 -05:00
..

@mosaic/telegram-plugin

@mosaic/telegram-plugin connects a Telegram bot to the Mosaic gateway chat namespace so Telegram chats can participate in the same conversation flow as the web, TUI, and Discord channels.

Required Environment Variables

  • TELEGRAM_BOT_TOKEN: Bot token issued by BotFather
  • TELEGRAM_GATEWAY_URL: Base URL for the Mosaic gateway, for example http://localhost:3000

What It Does

  • Launches a Telegram bot with telegraf
  • Connects to ${TELEGRAM_GATEWAY_URL}/chat with socket.io-client
  • Maps Telegram chat.id values to Mosaic conversationId values
  • Forwards inbound Telegram text messages to the gateway as user messages
  • Buffers agent:start / agent:text / agent:end socket events and sends the completed response back to the Telegram chat

Getting a Bot Token

  1. Open Telegram and start a chat with @BotFather
  2. Run /newbot
  3. Follow the prompts to name the bot and choose a username
  4. Copy the generated token and assign it to TELEGRAM_BOT_TOKEN