- Replace `as never` with proper type inference via `Parameters<typeof fn>[0]`
- Fix `bot.catch()` to use `err.error` (grammy BotError root cause)
- Clean up orphaned forum topic when session creation fails
- Clarify assistant.ts comment: enqueuePrompt awaits full response,
system prompt response is intentionally discarded (not a race)
- Switch welcome message from Vietnamese to English for consistency
- Add CLAUDE.md for codebase guidance
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: d6de879eb433
The onBotReady/retry approach caused build issues. Revert to the
simpler inline pattern that is confirmed working.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 103f5e24c518
Move spawnAssistant and welcome message into onStart callback so
sendMessage is only called after the bot's polling connection is
established, preventing HttpError network failures on startup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: da7a404aae60
Show available agents, default agent, workspace from config in the
welcome message, and attach the inline menu keyboard so users can
take action immediately on startup.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 5440da1e2275
- Use native fetch to fix ETIMEDOUT on Node 20
- Add global bot.catch() error handler to prevent crashes
- Fix menu/permission callbacks using bot.callbackQuery() filter pattern
- Fix race condition: create topic before session so threadId is set
- Add threadId guard in sendMessage to drop early events
- Add inline keyboard menu system with /menu command
- Separate assistant spawn and welcome message error handling
- Suppress assistant system prompt response by deferring event wiring
- Fix ctx.match type handling for callback query context
- Wrap answerCallbackQuery in try-catch for expired callbacks
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Entire-Checkpoint: e1b57053426b