Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a79cbb9
fix(cli): reject unknown top-level commands (#353)
xxb Aug 13, 2026
065a705
feat: add sonnet[1m] to hardcoded fallback model list (#1107)
zhangyanbo2007 Aug 13, 2026
bc30f5a
fix(daemon): stub CheckLinger on non-Linux platforms (#1093)
ztdd88 Aug 13, 2026
2ca3218
fix(i18n): clarify /model switch applies to current and future sessio…
chenhg5 Aug 13, 2026
91a4d74
docs(readme): add Prerequisites section with agent-CLI-first install …
chenhg5 Aug 13, 2026
2c52b53
feat(agent/antigravity): bridge tool permissions to chat (#1328)
xxb Aug 13, 2026
7b93b08
feat(googlechat): add Google Chat platform adapter (#1424)
keinstn Aug 13, 2026
c22d5e2
feat(feishu): on-demand download of quoted files when user mentions b…
chenhg5 Aug 13, 2026
b97eea8
fix(dingtalk): extract @userid from content in natural Reply (#1250)
wgx521 Aug 13, 2026
57bf3fd
fix(core): apply tool_max_len to tool input in progress_style=card (F…
chenhg5 Aug 13, 2026
beab353
feat(core): accept TOML array form for agent cmd field (issue #1670) …
chenhg5 Aug 13, 2026
f8b8294
fix(core): keep code fences intact when splitting long replies (#1630)
xpflying Aug 13, 2026
022d661
feat(dingtalk): derive chat-list title from content (#1269) (#1288)
chenhg5 Aug 13, 2026
94e2154
fix(feishu): bootstrap context for first thread mention(修复机器人第一次进入话题,…
dongyusheng Aug 13, 2026
18c7dae
fix cloud-web TestGatewayWebhook on IPv6 dual-stack hosts (#1646)
zmlgit Aug 13, 2026
d743b14
fix(pi): fall back to models-store.json when enabledModels is unset (…
baizhu945 Aug 14, 2026
1c03a59
feat(pi): inject permission mode into agent process env (#1637)
baizhu945 Aug 14, 2026
d484ae6
feat(core): gate /commands addexec and /cron addexec behind admin_fro…
ssc806 Aug 14, 2026
a79e981
fix(web): render agent-type-aware permission mode options in ProjectD…
chenhg5 Aug 14, 2026
9fe3ea2
fix(weixin): treat sendmessage ret=-2 as a per-account send budget an…
lyjx29 Aug 14, 2026
6c86079
fix(kimi): gate --work-dir flag on probe, like --print (#1476) (#1483)
chenhg5 Aug 15, 2026
5f76298
feat(kimi): native Kimi Code CLI dialect support
whyihaveyou Jul 18, 2026
c9a3b4b
fix(kimi): don't report 0 messages for Kimi Code sessions in /list
Aug 6, 2026
8d14754
fix(kimi): adapt live e2e to main's Send(messageID, ...) signature
Aug 7, 2026
ed5d661
fix(kimi): check f.Close error in transcript helpers (errcheck)
Aug 7, 2026
4f05f8a
test(kimi): pin assistant string-content + tool_calls flush order (#1…
OctopusWen Aug 15, 2026
6174441
docs(changelog): add #1561 kimi-code dialect entry
OctopusWen Aug 15, 2026
af5235a
Merge branch 'kimi-code-flavor' into kimi-1564-rebase
OctopusWen Aug 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog
# Changelog

## Unreleased

Expand All @@ -20,11 +20,25 @@
- **feishu**: coalesce consecutive image messages from the same session into a single multi-image dispatch to fix first-image drop on batch sends (#1395). When the Feishu mobile client sends N images in quick succession, each image arrives as a separate `image` event with very close `create_time` values. Dispatching each immediately caused core/engine's `create_time` watermark (PR #1168) to drop the oldest image, so the agent only saw N-1 images. A per-session image buffer with a 150ms quiet window now merges the burst into one `core.Message` carrying all images, in send order. Single-image sends and quoted-image replies are unaffected.
- **claudecode**: fix per-spawn system-prompt temp file EACCES under `run_as_user` (#1429). The per-spawn temp file written by `writeTempAppendPromptFile` (the 1% edge-case path used when the prompt has session-specific platform formatting or user `append_system_prompt`) inherited `os.CreateTemp`'s 0600 mode and was owned by the cc-connect process user (often root under systemd). When the agent was spawned under a different `run_as_user`, it could not read the file and exited before any prompt was loaded. The file is now `chmod 0o644` immediately after write, matching the shared `ensureSharedSystemPromptFile` path. Prompt content is non-secret (a superset of the already-shared base prompt), so 0644 is consistent with the shared file. Does not affect the shared-file path (already 0644 since #1376) or the daemon-mode path resolution (#1419).
- **kimi**: gate `--work-dir` flag on `kimiFlagSupport.WorkDir` so the Kimi Code CLI build that dropped the flag no longer exits with `error: unknown option --work-dir` (#1476). Same probe-based pattern as the `--print` fix in #1456 / PR #1461: the agent probes `kimi --help` once at construction, then `buildArgs` emits the flag only when the installed CLI advertises it. The agent still runs in the correct directory because `exec.Command.Dir` is set separately, so legacy kimi-cli users (who still have `--work-dir`) keep non-default workspace support while modern-CLI users get clean startup.
- **kimi**: native Kimi Code CLI (Node.js `kimi-code`) dialect support (#1561). The newer CLI removed `--quiet` and `--resume`, moved the session resume hint from a plain-text line to a stdout JSON meta event (`{"role":"meta","type":"session.resume_hint",...}`), and emits assistant/tool `content` as a plain string instead of typed blocks — causing `error: unknown option`, silently dropped replies, and broken multi-turn continuity. The probe now also gates `--quiet` (emulated locally by suppressing thinking/tool events when unsupported), resume uses `-r <id>` on the modern dialect (the command the CLI's own hint prints), the meta resume-hint event restores the session ID, and the stream parser accepts both content shapes regardless of probed flavor. Session listing additionally scans `~/.kimi-code/sessions` with its `state.json` schema (`title`/`workDir`, honoring the workDir filter) and counts messages from `agents/main/wire.jsonl` so `/list` and `/delete` work for both CLI flavors. Legacy kimi-cli behavior is unchanged.
- **core**: queue post-restart notification and dispatch on platform ready (#1383). Previously `/restart` sent the success notification immediately after engine startup, racing the platform's async connect window (Telegram: ~2.6s). On a not-yet-ready platform the send was silently dropped at debug log level. The notify is now queued on the engine and dispatched when the target platform reaches `OnPlatformReady`, with bounded retry (3 attempts, 0/500/1500 ms backoff) on transient send failure. Failed sends log at warn level. A 10s safety timeout drops the notify with a warning if the target platform never reaches ready, so startup is never blocked indefinitely. Also covers Discord / Weixin / Matrix (other AsyncRecoverablePlatform implementations) for free.
- **core**: `SaveFilesToDisk` / `AppendFileRefs` always emit absolute paths (#1459). When a user configured a relative `work_dir` (e.g. `~/project` or `.cc-connect`), `SaveFilesToDisk` joined relative paths into the attachments directory and the resulting paths were passed verbatim into the agent's prompt. The spawned agent process — typically run from a different cwd by the platform adapter — could not resolve them and silently dropped every attachment. `SaveFilesToDisk` now calls `filepath.Abs(workDir)` up front and falls back to the raw value on error, and `AppendFileRefs` defensively absolutizes each entry. Both behaviors are covered by new tests for relative, absolute, and empty workDir; the empty-workDir case falls back to the process cwd so misconfigured deploys still get a writable attachments directory.

- **core**: prevent same-name file attachments from overwriting each other. `SaveFilesToDisk` now scopes files by message ID, keeps duplicate names distinct within one message, and uses an atomic no-overwrite fallback for legacy callers without a message ID (#1552).

## Unreleased

### Fixed
- **/model switch confirmation copy**: `MsgModelChanged` now explicitly states the
new model applies to the current session and all future sessions, removing the
misleading "new sessions" wording that made users think they needed `/new` to
see the change take effect (#1368).

## Unreleased

### Fixed
- **DingTalk message list title**: derive the `markdown.title` field on outgoing DingTalk messages from the message content (markdown stripped, first non-empty line, truncated to 20 runes) instead of the hardcoded `"reply"`. The DingTalk chat list now shows the actual reply preview instead of "reply" on every entry. Empty / pure-format / pure-emoji messages still fall back to "reply" so the title is never blank (#1269).

## v1.3.3 (2026-06-15)

First stable release of the 1.3.3 series. Stabilizes the v1.3.3-beta.1 → v1.3.3-beta.5
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ PLATFORMS := \
ALL_AGENTS := acp antigravity claudecode codex copilot cursor devin gemini iflow kimi opencode pi qoder tmux
ALL_PLATFORMS := feishu telegram discord slack dingtalk wecom weixin qq qqbot line weibo max matrix webex wps-agentspace tuitui
ALL_AGENTS := acp antigravity claudecode codex copilot cursor devin gemini iflow kimi opencode pi qoder reasonix tmux
ALL_PLATFORMS := feishu telegram discord slack dingtalk wecom weixin qq qqbot line weibo max matrix webex cloud_web tuitui
ALL_PLATFORMS := feishu telegram discord slack dingtalk wecom weixin qq qqbot line weibo max matrix webex cloud_web tuitui googlechat
ALL_EXTRAS := web

COMMA := ,
Expand Down
86 changes: 86 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,91 @@ High-level view of what each **built-in platform** can do in cc-connect.
</p>


## 📋 Prerequisites

> **Install in this exact order** — cc-connect is a bridge for local AI coding agents, so the agent CLI must be installed and authenticated *before* cc-connect starts. Skipping ahead will cause `cc-connect` to exit with `claudecode: claude CLI not found in PATH` (or similar for your chosen agent), and the Web UI on `:9820` will never come up.

### 1️⃣ Install your AI Agent CLI

Pick the agent you want to bridge. You need **at least one**.

```bash
# Claude Code (most common)
brew install --cask claude-code # macOS / Linux Homebrew
# or
npm install -g @anthropic-ai/claude-code # any platform via npm

# OpenAI Codex
npm install -g @openai/codex

# Google Gemini CLI
npm install -g @google/gemini-cli

# iFlow CLI
npm install -g @iflow-ai/iflow-cli

# Qoder CLI
curl -fsSL https://qoder.com/install | bash
```

For **Cursor Agent** and **OpenCode**, follow the official install pages:
- Cursor Agent: <https://docs.cursor.com/agent>
- OpenCode: <https://github.com/opencode-ai/opencode>

Verify the binary is on your `PATH`:

```bash
claude --version # or: codex / gemini / opencode / qodercli / cursor-agent ...
```

### 2️⃣ Authenticate the agent

Each agent has its own login flow — run the agent once interactively so it stores credentials in your home directory:

```bash
claude login # opens a browser to authenticate
# or
codex login # /gemini / opencode auth — see the agent's docs
```

If you skip this step, `cc-connect` will still start, but the agent will reject every prompt with an auth error.

### 3️⃣ Install cc-connect

```bash
# npm (any platform)
npm install -g cc-connect

# Homebrew (macOS / Linux)
brew install cc-connect

# Or download a binary from https://github.com/chenhg5/cc-connect/releases
```

### 4️⃣ Start cc-connect and open the Web UI

```bash
cc-connect # starts the service; first run auto-creates ~/.cc-connect/config.toml
```

On first launch, cc-connect prints something like:

```
Web admin: http://localhost:9820
```

Open that URL in your browser. If `9820` is already in use, pass `--web-port 9821` or set `web_port` in `config.toml`.

> **Note:** `cc-connect web` *only* opens the browser and the config UI — it does **not** start the service. You still need `cc-connect` running in another terminal.

### 5️⃣ Configure platform bot tokens in the Web UI

In the Web UI, create a project, then add at least one platform (Feishu / Telegram / Discord / Slack / DingTalk / WeChat Work / QQ / LINE / Weixin) and paste the bot token from that platform's developer console. Save and cc-connect will hot-reload.

That's it — send a message to your bot and cc-connect will relay it to your local agent.

---

## 🚀 Quick Start

### 🤖 Install & Configure via AI Agent (Recommended)
Expand Down Expand Up @@ -401,6 +486,7 @@ cc-connect update --pre # Include pre-releases
| WPS Xiezuo | [docs/wps-xiezuo.md](docs/wps-xiezuo.md) | WebSocket | No |
| Telegram | [docs/telegram.md](docs/telegram.md) | Long Polling | No |
| Slack | [docs/slack.md](docs/slack.md) | Socket Mode | No |
| Google Chat | [docs/googlechat.md](docs/googlechat.md) | Cloud Pub/Sub | No |
| Discord | [docs/discord.md](docs/discord.md) | Gateway | No |
| Weibo | [docs/weibo.md](docs/weibo.md) | WebSocket | No |
| WeChat Work | [docs/wecom.md](docs/wecom.md) | WebSocket / Webhook | No (WS) / Yes (Webhook) |
Expand Down
85 changes: 85 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,91 @@
</p>


## 📋 准备工作

> **请严格按照以下顺序安装** — cc-connect 是本地 AI 编程 Agent 的桥接工具,因此对应的 Agent CLI 必须先安装并完成登录认证,之后 cc-connect 才能正常启动。如果跳过前面的步骤直接启动 cc-connect,进程会直接退出并报错 `claudecode: claude CLI not found in PATH`(其他 Agent 报错类似),Web UI 在 `:9820` 也就无从访问。

### 1️⃣ 安装 AI Agent CLI

选择你要桥接的 Agent,至少装一个。

```bash
# Claude Code(最常用)
brew install --cask claude-code # macOS / Linux Homebrew
# 或
npm install -g @anthropic-ai/claude-code # 任意平台通过 npm

# OpenAI Codex
npm install -g @openai/codex

# Google Gemini CLI
npm install -g @google/gemini-cli

# iFlow CLI
npm install -g @iflow-ai/iflow-cli

# Qoder CLI
curl -fsSL https://qoder.com/install | bash
```

**Cursor Agent** 和 **OpenCode** 请参考各自的官方安装文档:
- Cursor Agent: <https://docs.cursor.com/agent>
- OpenCode: <https://github.com/opencode-ai/opencode>

确认可执行文件在 `PATH` 中:

```bash
claude --version # 或 codex / gemini / opencode / qodercli / cursor-agent ...
```

### 2️⃣ 完成 Agent 登录认证

每个 Agent 都有自己的登录流程 — 先在终端交互式跑一次,让它把凭据存到你的 home 目录:

```bash
claude login # 会在浏览器里打开授权页面
# 或
codex login # / gemini / opencode 等也类似,请参考各自文档
```

跳过这一步的话,cc-connect 仍能启动,但 Agent 会因为未认证拒绝所有请求。

### 3️⃣ 安装 cc-connect

```bash
# npm(任意平台)
npm install -g cc-connect

# Homebrew(macOS / Linux)
brew install cc-connect

# 也可以从 https://github.com/chenhg5/cc-connect/releases 直接下载二进制
```

### 4️⃣ 启动 cc-connect 并打开 Web UI

```bash
cc-connect # 启动服务;首次运行会自动生成 ~/.cc-connect/config.toml
```

首次启动时,cc-connect 会打印类似:

```
Web admin: http://localhost:9820
```

在浏览器里打开该地址。如果 `9820` 已被占用,可以传 `--web-port 9821` 或在 `config.toml` 里设置 `web_port`。

> **注意:** `cc-connect web` *只* 打开浏览器和配置界面,并**不会**启动服务本身。仍需要在另一个终端里跑 `cc-connect`。

### 5️⃣ 在 Web UI 里配置平台 Bot Token

在 Web UI 里新建一个项目,然后添加至少一个平台(飞书 / Telegram / Discord / Slack / 钉钉 / 企业微信 / QQ / LINE / 微信 ilink),把该平台开发者后台的 Bot Token 粘贴进去。保存后 cc-connect 会热加载。

至此完成 — 给你的 Bot 发条消息,cc-connect 就会把它转给本地的 Agent。

---

## 🚀 快速开始

### 🤖 通过 AI Agent 安装配置(推荐)
Expand Down
4 changes: 2 additions & 2 deletions agent/antigravity/antigravity.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func init() {
// Agent drives the Antigravity CLI (agy) in headless mode.
//
// Modes (maps to agy approval and sandbox flags):
// - "default": standard approval mode (prompt for each tool use)
// - "default": ask for each tool through the cc-connect permission bridge
// - "yolo": auto-approve all tools (--dangerously-skip-permissions)
// - "plan": read-only plan mode with terminal sandbox constraints (--sandbox)
type Agent struct {
Expand Down Expand Up @@ -284,7 +284,7 @@ func (a *Agent) GetMode() string {

func (a *Agent) PermissionModes() []core.PermissionModeInfo {
return []core.PermissionModeInfo{
{Key: "default", Name: "Default", NameZh: "默认", Desc: "Prompt for approval on each tool use", DescZh: "每次工具调用都需要确认"},
{Key: "default", Name: "Default", NameZh: "默认", Desc: "Ask for approval through cc-connect on each tool use", DescZh: "每次工具调用都通过 cc-connect 请求确认"},
{Key: "yolo", Name: "YOLO", NameZh: "全自动", Desc: "Auto-approve all tool calls", DescZh: "自动批准所有工具调用"},
{Key: "plan", Name: "Plan", NameZh: "规划模式", Desc: "Read-only plan mode in sandbox", DescZh: "只读沙箱规划模式"},
}
Expand Down
Loading