- Use Zod-inferred types instead of non-existent type names
- Add writeNew() and getConfigPath() methods to ConfigManager
- Set enabled: true and note topic IDs are auto-created
- Use command -v instead of which for portability
- Match agent detection to actual binary names (claude-agent-acp)
- Clarify allowedUserIds parsing to string[]
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 6af3b249cdc2
Interactive first-run wizard that guides users through Telegram, agent,
workspace, and security configuration when no config file exists.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 9eb56d895bc1
- Fix deadlock: message handler was blocking grammy polling with await,
preventing callback_query updates from being received. Changed to
fire-and-forget pattern so polling remains unblocked.
- Fix middleware: callback queries were dropped because ctx.chat was
undefined; now falls back to ctx.callbackQuery.message.chat.id.
- Fix race condition: set session.pendingPermission before sending
permission UI to prevent timing issues.
- Fix allowed_updates: force inclusion of callback_query on every
getUpdates call via API config transformer.
- Improve tool display: pass content from ACP events through to
formatting, show tool name/kind/content in code blocks instead of
bare status text. Fix [object Object] by properly extracting nested
ACP content structures.
- Add bot error handler to prevent unhandled errors from crashing.
- Remove duplicate permission notification (adapter already sends it).
- Handle expired callback queries gracefully with try/catch.
- 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
- Fix deadlock: message handler was blocking grammy polling with await,
preventing callback_query updates from being received. Changed to
fire-and-forget pattern so polling remains unblocked.
- Fix middleware: callback queries were dropped because ctx.chat was
undefined; now falls back to ctx.callbackQuery.message.chat.id.
- Fix race condition: set session.pendingPermission before sending
permission UI to prevent timing issues.
- Fix allowed_updates: force inclusion of callback_query on every
getUpdates call via API config transformer.
- Improve tool display: pass content from ACP events through to
formatting, show tool name/kind/content in code blocks instead of
bare status text. Fix [object Object] by properly extracting nested
ACP content structures.
- Add bot error handler to prevent unhandled errors from crashing.
- Remove duplicate permission notification (adapter already sends it).
- Handle expired callback queries gracefully with try/catch.
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