- Replace `as any` with `as never` + proper type annotations (convention)
- Add comment explaining why allowed_updates transformer is needed alongside bot.start()
- Fix bot.catch to extract root cause from grammY BotError via err.error
- Add depth limit (max 5) to extractContentText to prevent stack overflow
- Use required `status: string` type for tool_update metadata
- Added support for dynamic skill commands in the Telegram adapter, allowing for real-time command updates based on user interactions.
- Implemented methods to send and clean up skill commands, enhancing user experience with pinned messages and command autocomplete.
- Updated command handling to include skill-specific callbacks and keyboard generation for better interaction.
- Refactored existing command setup to accommodate new skill command features.
- Implemented typing indicators for assistant and core message handling to improve user experience.
- Added user notifications during session setup to inform them of potential delays.
- Introduced a warm-up function for the session to prime the model cache while the user types their first message.
- Introduced Transform streams for logging raw NDJSON data sent to and received from the agent.
- Updated the creation of ACP streams to include logging functionality for better debugging and monitoring.
- Updated logging system to use Pino for structured logging, including session-specific loggers.
- Refactored project structure in CLAUDE.md for better organization and clarity.
- Added new build scripts and commands in README.md for easier usage.
- Improved error handling and logging in core components and Telegram adapter.
- Introduced session log retention and cleanup functionality.
- Updated package.json and pnpm-lock.yaml to include new logging dependencies.
Re-add welcome message with dynamic agents/workspace info and
inline menu keyboard that was lost during upstream sync.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: c9102c7c128f
- Added new dependencies: @agentclientprotocol/sdk, @inquirer/prompts, grammy, nanoid, and zod.
- Updated build scripts to use TypeScript compiler directly and modified entry points for the CLI.
- Removed outdated pnpm workspace and TypeScript configuration files.
- Adjusted tsup configuration for improved output structure and TypeScript declaration generation.
- Updated tsconfig.publish.json to exclude build artifacts and test files.
- Modified tsup.config.ts to include the Telegram adapter as a separate entry point and removed unnecessary noExternal configuration.
- Refactored main.ts to load the Telegram adapter using a dedicated function for improved modularity and clarity.
- Auto-detect agents from PATH and node_modules/.bin (prefer claude-agent-acp)
- Validate Telegram bot token and chat ID against API
- Streamlined 3-step setup: Telegram, Agents, Workspace
- Auto-save config and auto-start after setup
- Fix bin entry to use cli.js for proper command routing
- Update setup-guide.md and README.md to match new flow
- Security defaults applied automatically (editable in config)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 605d217b3192
- 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
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