Skip to content

Channel: Telegram (migrate from Cortex) #29

@shetty4l

Description

@shetty4l

Goal

Move TelegramChannel from Cortex to Wilson, consolidating all channel implementations in one place.

Current state

  • TelegramChannel lives in cortex/src/channels/telegram/
  • Config (telegramBotToken, telegramAllowedUserIds) lives in ~/.config/cortex/config.json
  • Telegram is "realtime" (p0) — messages bypass thalamus buffering and go directly to cortex inbox

Why move

  • Wilson owns all external I/O (channels are adapters, not brain logic)
  • Calendar, Email, Web channels already live/will live in Wilson
  • Keeps Cortex focused on reasoning (brain), Wilson on sensing/acting (organism)
  • Centralizes secrets (bot tokens) in Wilson config

Migration plan

  1. Copy src/channels/telegram/ from Cortex to Wilson
  2. Add channels.telegram config in Wilson: { enabled, botToken, allowedUserIds, ... }
  3. Wire TelegramChannel into Wilson's ChannelRegistry
  4. Telegram ingestion: POST to cortex /receive (like CalendarChannel)
  5. Telegram delivery: poll cortex outbox (new endpoint or existing /outbox/poll)
  6. Remove Telegram from Cortex (delete channel code, remove config fields)
  7. Update production configs on Mac Mini

Open questions

  • Should Telegram poll outbox like other effectors, or use a push/webhook model?
  • How to handle the "realtime" priority routing (currently in-process thalamus.receive())?

Dependencies

  • Wave 2.5 merged (done)
  • Outbox polling for external effectors (may need new endpoint or auth changes)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions