Commit Graph
259 Commits
Author SHA1 Message Date
chenhg5andClaude 07cd76f2bb feat(workspace): add multi-workspace support with bind command and i18n messages
Added support for managing multiple workspaces including:
- New workspace bind command to link existing directories
- Enhanced session management scoped to workspaces
- Improved error handling with localized messages
- Fixed interactive state lookup for multi-workspace contexts

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-13 09:13:49 +08:00
cg33 35cdb4daf1 Merge pull request #84 from kevinWangSheng/fix/launchd-restart-race
fix(daemon): retry launchd bootstrap after bootout to avoid race condition
2026-03-13 07:56:39 +08:00
cg33 9a6c8f02f4 Merge pull request #94 from Dreamupers/feat/cursor-available-models
feat(cursor): implement AvailableModels function to fetch models from…
2026-03-13 07:54:33 +08:00
q107580018andmac abc46cfd9b fix: remove duplicate slack app mention case (#89)
Co-authored-by: mac <mac@Mac-mini.local>
2026-03-13 07:52:18 +08:00
mofengandxinlingzhao 0628d55da2 feat(wecom): 新增企业微信 WebSocket 长连接模式 (#93)
* feat(wecom): add WebSocket long-connection mode for WeChat Work

Add WeChat Work AI Bot WebSocket support, enabling connection without
public URL, message encryption, or IP allowlist. Key implementation details:

- Use userID as chatid for single-chat scenarios (matching official SDK behavior)
- Add 500ms delay between multi-chunk sends to prevent out-of-order delivery
- Support text and pre-transcribed voice messages
- Exponential backoff reconnection with heartbeat-based dead connection detection

Made-with: Cursor

* docs(readme): add WebSocket mode for WeChat Work; test(wecom): add unit tests for WebSocket implementation

- Update README support matrix, setup guide, config examples and project
  structure to include the new WebSocket long-connection mode alongside
  existing Webhook
- Add 22 unit tests covering splitByBytes, handleMsgCallback chatID
  fallback, writeAndWaitAck, handleFrame ACK dispatch, generateReqID
  and newWebSocket

Made-with: Cursor

---------

Co-authored-by: xinlingzhao <xinlingzhao@tencent.com>
2026-03-13 07:46:59 +08:00
zxAgent fffc5847ea feat(cursor): implement AvailableModels function to fetch models from agent CLI and add fallback options 2026-03-13 01:19:26 +08:00
Shawn 6176f6d5e6 fix(feishu): sanitize non-HTTP URLs in markdown to prevent API rejection (closes #50) (#83) 2026-03-12 19:43:08 +08:00
q107580018andmac 949cf1a8f1 feat: add usage command for codex oauth (#80)
Co-authored-by: mac <mac@Mac-mini.local>
2026-03-12 19:39:50 +08:00
q107580018andmac cebe23f93c fix: support codex image attachments (#81)
Co-authored-by: mac <mac@Mac-mini.local>
2026-03-12 19:39:28 +08:00
Shawn 17ca997d8e fix(iflow): increase scanner buffer from 1MB to 10MB (closes #71) (#82) 2026-03-12 19:39:16 +08:00
Leigh StillardandClaude Opus 4.6 647398f765 feat: multi-workspace mode — single bot, multiple workspaces per channel (#79)
* feat: add multi-workspace mode and base_dir config fields

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add WorkspaceBindingManager for channel-to-workspace persistence

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add workspacePool for managing per-workspace agent state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add ChannelNameResolver interface and Slack implementation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add multi-workspace fields, SetMultiWorkspace, and idle reaper to Engine

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add resolveWorkspace method for channel-to-directory mapping

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: wire multi-workspace mode setup in main.go

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add workspace init flow for cloning repos and binding channels

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add /workspace commands (init, unbind, list, status)

Add handleWorkspaceCommand with subcommands:
- (no args): show current workspace binding for the channel
- init <git-url>: clone repo and bind workspace to channel
- unbind: remove workspace binding from channel
- list: show all workspace bindings for the project

Only available when multi-workspace mode is enabled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: wire multi-workspace routing into handleMessage with per-workspace agents

Add workspace resolution to handleMessage that resolves channels to workspace
directories, creates per-workspace agents with correct work_dir, and routes
messages through workspace-specific session managers. The normal (single-workspace)
code path is unchanged — all new logic is gated behind e.multiWorkspace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add integration tests for multi-workspace resolution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: resolve multi-workspace bugs found during live testing

Three bugs fixed:

1. App mention events not handled - Slack sends `app_mention` events
   (not `message.channels`) when the bot is @mentioned. Added
   AppMentionEvent handler in the Slack platform.

2. Bot mention prefix not stripped - app_mention text includes
   `<@UBOTID> ` prefix, breaking command parsing and workspace
   resolution. Now stripped before passing to engine.

3. Slash command syntax incompatible with Slack - `/workspace` commands
   were being intercepted by Slack as slash commands. Changed all
   user-facing references and prefix detection to use `workspace`
   without the leading slash.

Also added debug logging to handleEvent for diagnosing event delivery.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: instruct agent to use Slack mrkdwn formatting

Add Slack formatting guidelines to the agent system prompt so responses
use Slack's mrkdwn syntax instead of standard Markdown (e.g. *bold*
instead of **bold**, no ## headings).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 19:38:58 +08:00
kevinWangSheng 347b7c1b8c fix(daemon): retry launchd bootstrap after bootout to avoid race condition (closes #35) 2026-03-12 01:56:04 -07:00
bydsky 6b5657a1ff feat(gemini): fix io hang (#78)
* feat(gemini): fix io hang

* feat(gemini): fix io hang
2026-03-12 14:41:20 +08:00
chenhg5 ecea1ef36d build: release v1.2.2-beta.1 — interactive cards, security hardening, new features 2026-03-12 08:21:43 +08:00
chenhg5andClaude b84bbfc43f feat(i18n): add note text for permission card
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-12 08:06:06 +08:00
chenhg5andClaude 670b57021b feat(core): add card-based permission prompts with callback support
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>
2026-03-12 07:57:47 +08:00
Leigh StillardandClaude Opus 4.6 6ec4199e70 chore: update golang.org/x/crypto and golang.org/x/sys to latest (#77)
Update outdated standard library dependencies:
- golang.org/x/crypto: v0.0.0-20210421170649 → v0.48.0
- golang.org/x/sys: v0.0.0-20201119102817 → v0.42.0
- Go minimum version: 1.24.2 → 1.25.0 (required by x/sys v0.42.0)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 07:34:51 +08:00
chenhg5andClaude 47df97e35d feat(admin): add admin privilege system for privileged commands
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-12 07:26:28 +08:00
chenhg5andClaude dcbfdd672c feat(iflow): add configurable tool timeout and reset timer on partial completion
Add toolTimeoutSec field to Agent and Session structs to allow configurable timeout duration.
Reset pending tool timeout timer when partially completing tools.
Increase default timeout from 45s to 180s.
Add tests for timeout behavior and customization.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-12 07:04:08 +08:00
chenhg5andClaude df7d456646 feat(feishu): add lark platform support and improve error messages
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>
2026-03-12 06:49:34 +08:00
chenhg5andClaude 8818d3bed1 refactor(agent): optimize scanner buffer sizes
Updated buffer sizes for stdout scanners across all agent sessions:
- Initial buffer size reduced from 1MB to 64KB
- Max buffer size increased from 1MB to 10MB

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-12 06:34:02 +08:00
chenhg5andClaude 90f0e22f73 fix(core): handle nil cards and improve error handling
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>
2026-03-12 06:28:35 +08:00
Shawn ae13e2331a fix(security): harden access control, socket permissions, and token redaction (#68)
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
2026-03-12 06:09:28 +08:00
Shawn ef37f6f7ab fix(slack): handle AppMentionEvent for channel @mention support (#66)
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
2026-03-12 06:06:57 +08:00
Shawn b9e1aea339 fix(update): fallback to .tar.gz/.zip archive when bare binary returns 404 (#67)
The `cc-connect update` command downloads the bare binary asset (e.g.
`cc-connect-v1.1.0-linux-amd64`), but some releases only publish
archive assets (.tar.gz / .zip). When the bare binary returns HTTP 404,
the updater now falls back to downloading the corresponding archive and
extracting the binary from it.

Closes #25
2026-03-12 06:04:18 +08:00
q107580018andmac 6bdecaad49 feat: support explicit batch session deletion (#74)
* feat: support batch session deletion

* feat(feishu): add card-based delete flow

* fix(feishu): report missing selected sessions

---------

Co-authored-by: mac <mac@Mac-mini.local>
2026-03-12 06:01:02 +08:00
q107580018andmac 986faefb4a feat(codex): support reasoning effort switching (#70)
* feat(codex): support reasoning effort switching

* fix(codex): remove unsupported minimal effort

---------

Co-authored-by: mac <mac@Mac-mini.local>
2026-03-11 19:38:00 +08:00
bydsky ab322933c2 feat(gemini): add timeout flag (#62)
* feat(gemini): add timeout flag

* feat(gemini): default to no timeout

* feat(gemini): add config example and log
2026-03-11 15:40:50 +08:00
q107580018andmac 7a34ca4e00 feat(codex): fallback /model list to local models cache (#65)
Co-authored-by: mac <mac@Mac-mini.local>
2026-03-11 11:41:53 +08:00
chenhg5andClaude 4e29aeb4a2 chore: update go.sum dependencies
generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-11 11:09:12 +08:00
woqiqishi 13a750c1b5 feat(cards): interactive card UI for slash commands (Feishu) (#52)
* 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
2026-03-11 07:52:36 +08:00
bydsky 7ed5cff6b9 fix(skill): follow symbol link (#61) 2026-03-11 07:05:11 +08:00
chenhg5andClaude 53a0789d20 docs: add demo screenshots and star history to README
Add screenshot examples demonstrating multi-agent collaboration in Discord
and include star history chart visualization.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-10 22:45:25 +08:00
cg33 4ba3b714f6 Merge pull request #56 from kevinWangSheng/fix/qqbot-error-handling
fix(qqbot): handle json.Unmarshal and WriteJSON errors
2026-03-10 17:18:12 +08:00
cg33 5cb1f45ea2 Merge pull request #55 from zgq233333/fix/findProjectDir-underscore-handling
fix(claudecode): handle underscores in findProjectDir path matching
2026-03-10 17:14:44 +08:00
kevinWangSheng 18aff5d247 fix(qqbot): handle json.Unmarshal and WriteJSON errors
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
2026-03-10 00:46:21 -07:00
zhuguanqiandClaude Opus 4.6 931ec32257 fix(claudecode): handle underscores in findProjectDir path matching
Claude Code replaces underscores with hyphens when encoding project
paths as directory names (e.g. sandwichlab_core → sandwichlab-core).
findProjectDir only replaced path separators and colons, causing /list
to return empty for projects with underscores in their path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 11:43:45 +08:00
cg33 da5160ad52 Merge pull request #49 from q107580018/codex/fix-daemon-config-flag
fix: support daemon install config flag and correct go.sum checksum
2026-03-10 11:40:09 +08:00
chenhg5andClaude 1653e9caa3 feat(gemini): buffer assistant messages for classification
Add pendingMsgs buffer to geminiSession to accumulate assistant messages before classifying them as either EventThinking or EventText. This improves message handling by deferring classification until we have context from tool use or result events.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-10 11:14:22 +08:00
chenhg5andClaude 58f7b7068e feat(cursor): add interaction query handling and thinking buffer
Add support for handling interaction queries (webFetch/shell requests) and accumulate thinking deltas in a buffer before emitting completed events. Also adds WebFetch tool call type and debug logging.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-10 10:57:17 +08:00
chenhg5andClaude c77b94d139 feat(codex): add pending message buffering and improved event handling
Add pending message buffer to accumulate agent messages before classification.
Improve event handling with better logging and support for additional event types.
Add helper functions for text extraction and tool input processing.
Handle turn failures and flush messages appropriately for thinking/text events.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-10 10:40:29 +08:00
chenhg5 669257a6d8 Merge release/v1.2.1 into main 2026-03-09 23:03:13 +08:00
chenhg5andClaude Opus 4.6 6e3a83f3d6 build: release v1.2.1 — bug fixes and bind setup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 22:41:56 +08:00
chenhg5andClaude 7daa111397 feat(bind): add setup command and system prompt support
Add `/bind setup` command to write relay instructions to memory file.
Implement SystemPromptSupporter interface to detect native prompt support.
Add related i18n messages for setup flow and hint messages.
Update bind command to show setup hint when needed.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-09 22:40:14 +08:00
chenhg5andClaude 350a4d8b2d fix(engine): prevent stale event processing in agent sessions
Add drainEvents utility to clear buffered events between turns and apply it in processInteractiveMessage and cmdCompress to avoid processing stale events from previous agent interactions.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-09 22:40:14 +08:00
chenhg5andClaude 44f2dba697 fix(feishu): validate URLs before creating hyperlinks
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>
2026-03-09 22:40:14 +08:00
kevinWangSheng 67d8903386 fix(cron): log json.Unmarshal error instead of ignoring it
When the cron jobs file is corrupted, json.Unmarshal fails silently
and all scheduled tasks are lost without any log output. Add error
logging so the issue is visible in logs.
2026-03-09 22:40:14 +08:00
kevinWangSheng 500eefa57d fix(feishu): add nil checks for SenderId.OpenId and msg.Content
Prevent nil pointer panics when Feishu sends messages where
sender.SenderId.OpenId or msg.Content is nil.
2026-03-09 22:40:14 +08:00
kevinWangSheng f8b1d42431 fix(engine): stop idle timer during permission wait
The idle timer in processInteractiveEvents kept running while
the event loop was blocked waiting for a user permission response.
If the user took longer than eventIdleTimeout to respond, the timer
would fire and kill the session on the next loop iteration.

Stop the idle timer before waiting on pending.Resolved and restart
it after the permission is resolved.
2026-03-09 22:40:14 +08:00
chenhg5andClaude 1061d82be6 feat(bind): add setup command and system prompt support
Add `/bind setup` command to write relay instructions to memory file.
Implement SystemPromptSupporter interface to detect native prompt support.
Add related i18n messages for setup flow and hint messages.
Update bind command to show setup hint when needed.

generated by llmgit

Co-Authored-By: Claude <noreply@anthropic.com>
2026-03-09 21:22:54 +08:00