types.ts # Definitions for TelegramUpdate, MergedDb, UserLink, BillingCheckResult
webhook.ts # Handles secret verification and update parsing
router.ts # Routes messages to bound agents and provides Telegram API helpers
bindings.ts # Manages CRUD operations for telegram_chat_bindings in the platform-core DB
user-link.ts # Functions for resolving, ensuring, and linking users in the LucidMerged DB
billing.ts # Functions for checking launch permissions, tracking deployments, retrieving plan info, and creating Telegram checkouts
layer-client.ts # HTTP client for interacting with the Lucid Layer API
wizard.ts # Manages the multi-step launch wizard with a 30-minute TTL
keyboards.ts # Builders for inline keyboards
callbacks.ts # Handles callback queries (button taps)
commands/
index.ts # Dispatches commands
start.ts # Handles /start command for agent binding and account linking
launch.ts # Manages the /launch wizard
status.ts # Handles /status command
list.ts # Handles /list command
plan.ts # Handles /plan command
upgrade.ts # Manages /upgrade command and Stripe checkout
help.ts # Handles /help command