Add support for rich permission prompts using interactive cards when platforms support them. CardButtons now support Extra field for callback data. Implement fallback chain: inline buttons → cards → plain text. Includes i18n support and tests for all platforms.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add support for Lark platform alongside Feishu with shared implementation.
Update all error messages to include platform tag prefix.
Refactor platform initialization to handle both Feishu and Lark configurations.
Add tests for Lark platform specific behaviors.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add nil checks for card operations in core engine.
Improve token redaction utility and error handling.
Initialize delete mode state properly.
Fix error message in cc-connect update.
Add missing platform allowFrom checks.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
1. Unix socket permissions: 0o660 → 0o600 (owner-only access), preventing
other processes in the same group from injecting messages via the API.
2. Telegram bot token redaction: when file downloads fail, the bot token
embedded in the Telegram API URL is now replaced with [REDACTED] in
error messages to prevent token leakage in logs.
3. Startup warning for open allow_from: all platforms now log a WARN-level
message when allow_from is not configured, making it obvious that the
deployment permits all users. This surfaces the fail-open default so
operators can make an informed decision.
Ref #60
Slack dispatches `app_mention` events (not `message` events) when a bot
is @mentioned in a channel. Without handling this event type, the bot
only responds in DMs while silently ignoring channel mentions.
Add a `*slackevents.AppMentionEvent` case to `handleEvent` with the same
validation pipeline (bot filter, old-message guard, AllowList check,
session key generation) used for regular messages.
Also fix stale go.sum checksum for github.com/BurntSushi/toml.
Closes#48
* feat(cards): interactive card UI for slash commands on Feishu
- Add platform-agnostic Card model (core/card.go) with builder API
- Add CardSender/CardNavigable interfaces (core/interfaces.go)
- Implement Feishu card renderer using column_set for mobile layout
- Redesign all slash command responses to use interactive cards
- Add handleCardNav router and executeCardAction for in-place updates
- Convert /new /quiet /switch /stop to act: and nav: actions
- /help card uses tab buttons grouped by Session/Agent/Tools/System
- renderUpgradeCard: sync update check with 8s timeout
- Fix: return error card instead of nil in handleCardNav /list /switch
Made-with: Cursor
* fix(cards): address PR #52 review feedback
- Add enable_feishu_card config option (default true) so operators can
fall back to plain-text replies when card permissions are unavailable;
wraps Platform in interactivePlatform only when cards are enabled
- Fix goroutine leak in renderUpgradeCard: use buffered channel (cap 1)
so the background goroutine can always complete even after a timeout
- Fix /stop concurrent logic in executeCardAction: consolidate state
mutation under a single interactiveMu critical section
- Fix code indentation in platform/feishu/card.go (action map and
CardSelect/CardNote case blocks)
- Add unit tests for Card.RenderText and Card.HasButtons (core/card_test.go)
- Add Feishu platform tests for ReplyCard/SendCard and card renderer
(platform/feishu/platform_test.go)
- Update docs/feishu.md and README with enable_feishu_card option
Made-with: Cursor
Add error handling for silently ignored errors in the QQBot gateway:
- Hello payload parse (heartbeat_interval): log warning on failure
instead of silently falling back to hardcoded default
- READY payload parse (session_id): log warning on failure instead
of storing empty session ID that breaks resume
- InvalidSession payload parse (resumable bool): log warning on
failure instead of always treating as non-resumable
- Heartbeat WriteJSON: log failure for connection diagnostics
Add URL validation for Feishu post hyperlinks to prevent rejection of non-HTTP(S) URLs. Skip invalid links during markdown parsing.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add preprocessDingTalkMarkdown function to handle DingTalk-specific markdown rendering quirks:
- Convert leading spaces to non-breaking spaces
- Ensure proper line breaks between non-empty lines
- Preserve code blocks formatting
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add new i18n message keys for various command responses (switch, timeout, relay bindings).
Improve formatting of command list output with better descriptions and shell command display.
Adjust Feishu platform message type detection threshold for posts.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Merge upstream changes (iFlow agent, multi-bot relay, QQ Beta tag)
with our QQ Bot Official Platform additions. Resolved conflicts in
README.md, README.zh-CN.md, and cmd/cc-connect/main.go by combining
both sets of changes.
Code review fixes:
1. Fix msgSeqMap memory leak: replace unbounded sync.Map with TTL-based
map that evicts entries older than 5 minutes
2. Fix @mention not stripped: add stripAtMention() to parse and remove
the <@!botid> prefix from group message content
3. Filter empty messages: skip handler call when content is empty after
stripping (e.g. bare @bot with no text)
4. Fix reconnect race condition: add atomic.Bool guard to prevent
concurrent reconnectLoop goroutines
5. Add shard field to Identify payload per QQ official docs
6. Cap reconnect attempts at 30 to avoid infinite retry on config errors
New features:
7. Support receiving image attachments from group and C2C messages,
downloaded into core.ImageAttachment for agent consumption
8. Add docs/qqbot.md setup guide (bilingual EN/ZH)
9. Update README.md and README.zh-CN.md with QQ Bot platform entries
in support matrix, setup guide table, config examples, and project
structure
- add BotCommandInfo and CommandRegistrar interface for platform abstraction
- implement GetAllCommands to collect builtin/custom commands and skills
- add i18n descriptions for all 30 builtin commands (en/zh/zh-TW/ja/es)
- implement RegisterCommands for Telegram setMyCommands API integration
Add new `qqbot` platform type using the official QQ Bot API v2
(bot.q.qq.com), coexisting with the existing `qq` (OneBot v11) platform.
- OAuth2 token management with auto-refresh
- WebSocket gateway with heartbeat, reconnection, and resume
- GROUP_AT_MESSAGE_CREATE and C2C_MESSAGE_CREATE event handling
- REST API v2 message sending with msg_seq tracking
- No new dependencies (reuses gorilla/websocket)
- Add AddToBind() method to incrementally add projects to binding
- Add RemoveFromBind() method to remove specific project from binding
- Update /bind command to support multiple projects:
- /bind <project> - add project to binding
- /bind -<project> - remove specific project
- /bind remove - clear all bindings
- Add debug logging for telegram group message filtering
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add logic to delete stale preview messages when stream preview is degraded.
Implement PreviewCleaner interface for Telegram platform and add test coverage.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
- Code blocks/tables → card (schema 2.0 markdown)
- Many \n\n paragraphs (≥4, e.g. help, status) → post rich-text (preserves blank lines)
- Other markdown → post md tag (best native rendering)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add quiet mode status to /status command with i18n support
- Fix Feishu help command line breaks (use buildPostJSON instead of md tag)
- Improve tool message formatting (code block for long content)
- Strip XML tags from session summary display
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added StartTime tracking and IsOldMessage check to prevent processing of messages from before process startup. Implemented checks across all platforms with platform-specific timestamp handling. Includes tests for new functionality.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
- Improved `/switch` command to support session names and better matching logic
- Refactored markdown-to-HTML conversion with proper tag nesting and quote escaping
- Added detailed logging for streaming preview operations
- Fixed HTML tag validation in markdown tests
- Updated Telegram platform to handle HTML parsing errors gracefully
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add handler to ignore reaction deletion events similar to existing reaction creation handling.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Typing Indicator:
- Add TypingIndicator interface for "processing" feedback
- Discord: send typing status every 8 seconds
- Telegram: send chat typing action every 5 seconds
- Feishu: add emoji reaction, remove when done
Markdown HTML Escaping:
- Fix HTML special chars (<, >, &) escaping in all contexts
- Use placeholder strategy: extract code/links, escape all, restore
Streaming Preview:
- Remove trailing cursor character from preview messages
Feishu Card:
- Add wide_screen_mode config
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Streaming Preview:
- Add freeze() method to pause preview on permission prompts
- Improve finish() logic for better edge case handling
Markdown Rendering:
- Telegram: switch from Markdown to HTML mode with MarkdownToTelegramHTML
- Discord: use code-fence-aware message splitting
- Feishu: dual rendering strategy (card for code/tables, post for text)
- Feishu: support links, italic, strikethrough in inline parsing
- Feishu: use Patch API for card message updates
i18n:
- Use code blocks for permission prompt content
- Simplify button labels (remove emoji)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Streaming Preview:
- Real-time message preview during agent response (like "typing" indicator)
- Supported on Telegram, Discord, and Feishu
- Configurable interval, min delta chars, and max preview length
Rate Limiting:
- Per-session sliding-window rate limiter
- Prevents users from flooding the bot with messages
- Configurable max messages and window size
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 'name' command and improve descriptions for session management.
Move 'delete' command to group with other session commands.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Implement session deletion functionality across all agent implementations (claudecode, codex, cursor, gemini)
Add new /delete command with session lookup by ID/prefix
Add i18n support for delete-related messages
Update command help texts to include new delete command
Add SessionDeleter interface for agents supporting deletion
Implement core deletion logic with active session protection
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add new `/upgrade` command to check for updates and self-update the binary:
- Checks releases from both GitHub and Gitee APIs
- Supports semver comparison for version checking
- Downloads and replaces binary automatically (except Windows)
- Includes i18n support for all messages
- Adds Discord slash command integration
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add bot mention requirements for group messages across Discord, Feishu, and Telegram platforms:
- Discord: Only respond when bot is @mentioned in guild channels
- Feishu: Add bot openID detection and mention filtering for group chats
- Telegram: Add group message filtering and mention handling
Includes helper functions for mention stripping and detection.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Check for non-nil error before formatting error message to avoid wrapping nil errors.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
Add context-aware select statements when sending events to prevent blocking on closed channels. Implement secure argument logging using RedactArgs to mask sensitive flags. Add atomic file writes and locks for config safety. Improve session handling with mutex protection and deduplication checks.
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>
An empty http.Transport{} loses Go's default TLS settings, causing
NewBotAPIWithClient to hang on the initial getMe call. Only set a
custom transport when a proxy URL is actually provided.
Support HTTP/SOCKS5 proxy for Telegram API requests via config options:
proxy = "http://proxy.example.com:8080"
proxy_username = "user" # optional
proxy_password = "pass" # optional
Covers both bot API calls and file downloads. Follows the same
pattern as the existing wecom proxy implementation.
Closes#6
Implemented interactive buttons for permission prompts in Telegram platform:
- Added new `InlineButtonSender` interface for platforms supporting inline buttons
- Created `sendPermissionPrompt` method in Engine that uses buttons when available
- Added Telegram-specific implementation (`SendWithButtons` and callback handling)
- Support both English and Chinese button labels
- Includes fallback to text-only prompts when buttons fail
generated by llmgit
Co-Authored-By: Claude <noreply@anthropic.com>