56 Commits
Author SHA1 Message Date
dev-claudecodeandCursor 80713167d1 docs(changelog,readme): v1.5.1-beta.1
Bump version and add changelog for beta release since v1.5.0 stable.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-28 08:04:22 +08:00
Lan 7b1946c6b6 fix(codex): support max reasoning effort (#1727) 2026-08-28 07:29:09 +08:00
Yu ZhangClaude Sonnet 4.6 noreply@anthropic.comzhangyu.34
580df5ea98 fix(skills): include plugin skill roots safely (#1713)
* fix(skills): include plugin skill roots safely

* docs(codex): explain shared skill directories

Clarify why Codex discovers Superpowers and Claude-format skill layouts so the cross-runtime behavior is visibly intentional.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

---------

Co-authored-by: zhangyu.34 <zhangyu.34@bytedance.com>
2026-08-23 23:06:43 +08:00
1ddbac047c feat(kimi): native Kimi Code CLI dialect support (Fixes #1561) (#1564)
* fix(kimi): gate --work-dir flag on probe, like --print (#1476)

Same pattern as the #1456 / PR #1461 --print fix. Newer Kimi Code CLI
builds no longer accept --work-dir, exiting with `error: unknown option
--work-dir` whenever the user's config sets a non-default workspace
directory.

- agent/kimi/probe.go: kimiFlagSupport gains a WorkDir bool; the probe
  fills it from `kimi --help` (parseKimiHelpFlags already scans the
  --work-dir token, no parser changes needed).
- agent/kimi/session.go buildArgs: --work-dir is now emitted only when
  flagSupport.WorkDir is true. The agent still runs in the correct
  directory via exec.Command.Dir (set separately), so omitting the flag
  on modern CLIs is functionally equivalent for users on default dirs
  and graceful for users on non-default dirs whose CLI just ignores it.
- agent/kimi/probe_test.go: extend the legacy test to assert
  --work-dir is detected, add modernKimiHelpWithoutWorkDir constant
  that mirrors the build the reporter hits, plus full
  TestKimiFlagSupport_LegacyHelpSetsWorkDir /
  TestKimiFlagSupport_ModernWithoutWorkDir coverage of the probe mapping.
- agent/kimi/session_test.go: TestBuildArgs_WorkDirFlagGated (no flag
  on modern CLI) + TestBuildArgs_WorkDirFlagEmitted (legacy CLI keeps
  it). Also asserts the work-dir value doesn't leak into args when
  the gate is closed, catching a partial-gate future bug.

go test ./agent/kimi/... — all pass.

* feat(kimi): native Kimi Code CLI dialect support

Fixes #1561

The kimi agent targeted the legacy Python kimi-cli dialect; the newer
Node.js Kimi Code CLI (kimi-code) speaks a different one. Extend the
#1461/#1483 probe-gating approach to cover the remaining differences:

- probe: also detect --quiet; add isModernFlavor() using --print absence
  as the family discriminator established in #1456
- buildArgs: resume with -r instead of --resume on the modern dialect
  (--resume is rejected; -r matches the CLI's own resume hint); gate
  --quiet and emulate quiet mode via local event suppression when the
  binary dropped it; never pass --yolo/--auto (bare --prompt already
  auto-approves, and Kimi Code rejects combining them)
- stream-json: accept plain-string content for assistant/tool messages
  alongside the legacy block-array shape (format-tolerant, no gating)
- session continuity: capture the session id from Kimi Code's stdout
  meta line {"role":"meta","type":"session.resume_hint"} instead of the
  legacy plain-text/stderr hint
- session listing: scan both ~/.kimi/sessions and ~/.kimi-code/sessions,
  understand the Kimi Code state.json schema, honor its workDir field

Tests: real v0.26.0 --help fixture, per-dialect arg tests, content-shape
and meta-hint regression tests, dual-flavor session listing test, and an
env-guarded live e2e (KIMI_LIVE_E2E=1) that verifies anchor recall across
a resumed turn against the production binary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(kimi): don't report 0 messages for Kimi Code sessions in /list

Kimi Code CLI sessions have no context.jsonl; their transcript lives at
agents/main/wire.jsonl. Without a fallback, /list showed 0 messages for
every modern session. Count user turns from wire.jsonl (and use the first
user turn as the summary), matching legacy kimi-cli behavior.

Addresses review feedback on #1564.

* fix(kimi): adapt live e2e to main's Send(messageID, ...) signature

CI lint failed on the PR merge ref: main added a messageID string param to
AgentSession.Send (core/interfaces.go), but the PR still called the old 3-arg
form in live_e2e_test.go, so the merged code failed to compile
('not enough arguments in call to s.Send').

origin/main was merged into kimi-code-flavor (no conflicts); kimi's Send now
carries the 4-arg signature matching main. This updates the remaining 3-arg
call site to the new signature. agent/kimi and core compile, vet and tests green.

* fix(kimi): check f.Close error in transcript helpers (errcheck)

golangci-lint flagged the deferred file Close calls in the new
parseKimiTranscript/count* helpers as unchecked errors. Use an explicit
blank-assignment close to satisfy errcheck. agent/kimi still compiles,
vets and tests green.

* feat(kimi): native Kimi Code CLI dialect support

Fixes #1561

The kimi agent targeted the legacy Python kimi-cli dialect; the newer
Node.js Kimi Code CLI (kimi-code) speaks a different one. Extend the
#1461/#1483 probe-gating approach to cover the remaining differences:

- probe: also detect --quiet; add isModernFlavor() using --print absence
  as the family discriminator established in #1456
- buildArgs: resume with -r instead of --resume on the modern dialect
  (--resume is rejected; -r matches the CLI's own resume hint); gate
  --quiet and emulate quiet mode via local event suppression when the
  binary dropped it; never pass --yolo/--auto (bare --prompt already
  auto-approves, and Kimi Code rejects combining them)
- stream-json: accept plain-string content for assistant/tool messages
  alongside the legacy block-array shape (format-tolerant, no gating)
- session continuity: capture the session id from Kimi Code's stdout
  meta line {"role":"meta","type":"session.resume_hint"} instead of the
  legacy plain-text/stderr hint
- session listing: scan both ~/.kimi/sessions and ~/.kimi-code/sessions,
  understand the Kimi Code state.json schema, honor its workDir field

Tests: real v0.26.0 --help fixture, per-dialect arg tests, content-shape
and meta-hint regression tests, dual-flavor session listing test, and an
env-guarded live e2e (KIMI_LIVE_E2E=1) that verifies anchor recall across
a resumed turn against the production binary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* fix(kimi): don't report 0 messages for Kimi Code sessions in /list

Kimi Code CLI sessions have no context.jsonl; their transcript lives at
agents/main/wire.jsonl. Without a fallback, /list showed 0 messages for
every modern session. Count user turns from wire.jsonl (and use the first
user turn as the summary), matching legacy kimi-cli behavior.

Addresses review feedback on #1564.

* fix(kimi): adapt live e2e to main's Send(messageID, ...) signature

CI lint failed on the PR merge ref: main added a messageID string param to
AgentSession.Send (core/interfaces.go), but the PR still called the old 3-arg
form in live_e2e_test.go, so the merged code failed to compile
('not enough arguments in call to s.Send').

origin/main was merged into kimi-code-flavor (no conflicts); kimi's Send now
carries the 4-arg signature matching main. This updates the remaining 3-arg
call site to the new signature. agent/kimi and core compile, vet and tests green.

* fix(kimi): check f.Close error in transcript helpers (errcheck)

golangci-lint flagged the deferred file Close calls in the new
parseKimiTranscript/count* helpers as unchecked errors. Use an explicit
blank-assignment close to satisfy errcheck. agent/kimi still compiles,
vets and tests green.

* test(kimi): pin assistant string-content + tool_calls flush order (#1561)

Ported from #1586: an assistant event carrying plain-string content AND
tool_calls must surface the text as a thinking event (via
flushPendingAsThinking) before the tool-use event, not drop it silently.

* docs(changelog): add #1561 kimi-code dialect entry

---------

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
Co-authored-by: whyihaveyou <whyihaveyou@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: QZP <qzp@QZPdeMacBook-Air.local>
Co-authored-by: octopus <2841776039@qq.com>
2026-08-16 15:29:04 +08:00
cg33anddev-claudecode 6c86079800 fix(kimi): gate --work-dir flag on probe, like --print (#1476) (#1483)
Same pattern as the #1456 / PR #1461 --print fix. Newer Kimi Code CLI
builds no longer accept --work-dir, exiting with `error: unknown option
--work-dir` whenever the user's config sets a non-default workspace
directory.

- agent/kimi/probe.go: kimiFlagSupport gains a WorkDir bool; the probe
  fills it from `kimi --help` (parseKimiHelpFlags already scans the
  --work-dir token, no parser changes needed).
- agent/kimi/session.go buildArgs: --work-dir is now emitted only when
  flagSupport.WorkDir is true. The agent still runs in the correct
  directory via exec.Command.Dir (set separately), so omitting the flag
  on modern CLIs is functionally equivalent for users on default dirs
  and graceful for users on non-default dirs whose CLI just ignores it.
- agent/kimi/probe_test.go: extend the legacy test to assert
  --work-dir is detected, add modernKimiHelpWithoutWorkDir constant
  that mirrors the build the reporter hits, plus full
  TestKimiFlagSupport_LegacyHelpSetsWorkDir /
  TestKimiFlagSupport_ModernWithoutWorkDir coverage of the probe mapping.
- agent/kimi/session_test.go: TestBuildArgs_WorkDirFlagGated (no flag
  on modern CLI) + TestBuildArgs_WorkDirFlagEmitted (legacy CLI keeps
  it). Also asserts the work-dir value doesn't leak into args when
  the gate is closed, catching a partial-gate future bug.

go test ./agent/kimi/... — all pass.

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
2026-08-15 09:14:58 +08:00
022d661c1c feat(dingtalk): derive chat-list title from content (#1269) (#1288)
* feat(dingtalk): derive chat-list title from content (#1269)

Both Reply (sessionWebhook) and sendProactiveMessage (oToMessages/batchSend)
hardcoded markdown.title="reply", so every DingTalk chat list entry
showed the same preview regardless of what the agent said.

Replace with cardTitleFromContent(content):
  - strips markdown via core.StripMarkdown (already used by wecom/line)
  - takes first non-empty line
  - truncates to 20 runes (CJK counted as 1 rune so we never split mid-char)
  - falls back to 'reply' for empty / whitespace-only / pure-format /
    pure-emoji input

Behaviour:
  "**Standup notes** for today" -> "Standup notes for to"  (truncated)
  "你好世界..." (22 runes)        -> "你好世界..." (first 20 runes)
  "****"                          -> "reply"              (fallback)
  "🎉🎊"                          -> "reply"              (fallback)

Tests:
  TestCardTitleFromContent (22 subtests covering plain, markdown stripping,
    truncation, multi-byte CJK, fallback cases)
  TestCardTitleFromContent_UsedInReplyPayload (smoke test that the derived
    title actually flows into the outgoing sessionWebhook JSON payload)

Other platform adapters (feishu/telegram/slack/...) untouched.

Fixes #1269

* ci: retrigger #1288 CI (TestCUJ_H2_TwoPlatformsConcurrentNoBleed flaky)

#1288 (dingtalk chat-list title) is QA fresh review APPROVE on code (review
PRR_kwDORa0x388AAAABDNua8A, 0 P0/P1/P2/P3 blockers). Local TestCUJ_H2 runs
1/3 flaky on pr-1288, 3/3 PASS on origin/main; #1288 doesn't touch
core/cuj_test.go, so the failure is from #1348 CUJ framework's 30s tight
timeout, not from this PR.

Re-trigger CI via empty commit; if stable fail on 2-3 retries, the flaky
test fix belongs in #1348, not here.

---------

Co-authored-by: dev-claudecode <dev-claudecode@spaceship.local>
Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
2026-08-13 19:04:20 +08:00
cg33andClaude 2ca3218660 fix(i18n): clarify /model switch applies to current and future sessions (#1368) (#1373)
The /model confirmation copy used wording ('New sessions will use this model')
that misled users into thinking the current session still ran on the old
model and that they needed /new to see the switch take effect. In reality
cmdModel preserves the agent session id and re-invokes the runtime with
--resume <id> --model <new>, so the new model is live immediately for the
current turn and persists for all future sessions.

Updated MsgModelChanged in all 5 languages (en, zh-CN, zh-TW, ja, es) to
explicitly state 'this session and all future sessions will use it'.
Added CHANGELOG Fixed entry under Unreleased.

Co-authored-by: Claude <noreply@anthropic.com>
2026-08-13 16:45:06 +08:00
5bda5313c9 fix: prevent attachment filename collisions (#1557)
* fix(core): prevent attachment filename collisions (#1552)

Scope saved attachments by message ID, preserve duplicate names with unique paths, and make legacy flat-layout writes atomic and non-overwriting.

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

* fix(test): align cmd stub with new AgentSession.Send signature

Picks up the cmd/cc-connect/main_test.go stub missed by PR #1557; QA
flagged the lint failure (PR review 4718820336). The new core.AgentSession
interface added a messageID parameter, but the local stub still used the
old 3-arg form so the lint job failed and downstream CI jobs skipped.

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

* fix(lint): address errcheck + staticcheck on PR #1557

After the stub alignment in cc061b87, the next CI run surfaced two more
issues introduced by #1552:
- core/message.go writeAtomicNoOverwrite: 4 unchecked os.Remove / tmp.Close
  return values. Capture and log them at warn level on the cleanup paths.
- tests/release_local/turn_contract_test.go:953: QF1008 staticcheck noted
  that p.turnPlatform.snapshot() can use the embedded field directly
  (previewLifecyclePlatform embeds turnPlatform), so p.snapshot() is
  equivalent and shorter.

Verified locally with golangci-lint v2.11.4 (matching CI version):
  GOFLAGS=-tags=no_web golangci-lint run --new-from-rev origin/main \
    ./core/... ./cmd/... ./tests/release_local/turn_contract/...
→ 0 issues (the only filtered warning is the pre-existing web/embed.go
  dist dependency, unrelated to this PR).

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

---------

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-19 20:04:56 +08:00
52dfe8b7d4 fix(codex): surface gpt-5.x in /model chooser (drop stale allowlist) (#1546)
The API-fetch fallback in `fetchModelsFromAPI` filtered `GET /v1/models`
through `openaiChatModels`, a hard-coded 11-entry map added on
2026-03-02 and never updated. Every `gpt-5*` variant returned by
providers using `codex-cli >= 0.143` (including `gpt-5.6-sol`,
`gpt-5.6-terra`, `gpt-5.6-luna`) was silently dropped, so upgrading the
Codex CLI did not make GPT-5.6 selectable in cc-connect's /model chooser.

Users hitting the other three code paths — `readCodexModelCatalog`
(explicit `model_catalog_json` in `~/.codex/config.toml`),
`configuredModels` (explicit `models = [...]` in the provider config),
or `readCodexCachedModels` (last-resort read of
`~/.codex/models_cache.json`) — were unaffected.

Fix: replace the static map with `isCodexChatModel`, which uses pattern
rules so future frontier models (gpt-5.x, gpt-6, o5-*, codex-*) are
picked up automatically.

  Accept  gpt-* / chatgpt-* / codex-* / o1-* / o3-* / o4-* / o5-*
          plus bare o1, o3, o4, o5.
  Reject  any ID containing embedding, whisper, tts, dall-e,
          audio-preview, realtime, transcribe, moderation, image, or
          search-preview (so /v1/models cannot leak embedding, audio,
          image, or moderation models into a chat chooser).

45 unit tests cover the legacy chat families, GPT-5.0–5.6 (incl. Bedrock
variants), case-insensitivity, and every non-chat modality currently
served by /v1/models.

Reported by external user on WeChat: "5.6 的模型选不到,已经更新几次
cli 到 144 版本".

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-14 21:55:46 +08:00
hl1221hl 760079bca2 Add per-session idle timeout for live agent processes (#1338)
* FEAT: 添加会话空闲关闭live agent进程配置

* CHORE: 处理会话空闲关闭配置PR评审意见

* CHORE: 稳定会话空闲关闭测试
2026-07-05 07:13:45 +08:00
118dd3b697 feat(platform): add cloud_web platform for self-hosted IM gateways (#1282)
* feat(platform): add cloud_web platform for self-hosted IM gateways

Introduce the cloud_web platform with CWIP protocol support over websocket, long_poll, and gateway transports. Includes capability negotiation, inbound/outbound message handling, Web UI configuration with transport-specific fields and URL validation, documentation, build wiring, and integration tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cloud-web): satisfy errcheck lint for Close/Stop returns

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(cloud-web): address PR review feedback for #1282

Resolve reviewer feedback and rebase onto latest main:

- CHANGELOG: add cloud_web entry under Unreleased / Added
- gateway: fail closed when token is unset (reject all inbound webhooks)
- New(): require public_url when register_url is set for gateway transport,
  mirror the rule in client-side validation, and add a regression test
- forward perm:* card actions via IsPermissionResponse so the engine drops
  stale permission clicks instead of leaking allow/deny into the agent prompt
- ko.json: add Korean translations for the cloud_web setup/fields keys
- split cloudweb_test.go by transport (ws/poll/gateway + shared test helper)

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: jiagou123 <jiagou123@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Your Name <you@example.com>
2026-07-05 06:43:02 +08:00
7e1b53c61b fix(core): always emit absolute paths from SaveFilesToDisk/AppendFileRefs (#1459) (#1462)
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.

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-05 06:42:15 +08:00
qvictlandClaude Opus 4.7 e739e2eb57 fix(core): throttle message recall fallback probes (#1321)
* fix(core): throttle message recall fallback probes

Avoid repeatedly probing the platform for the same active message while retaining recall detection for new turns.

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

* chore(core): address recall probe review feedback

Document the Feishu recall probe fix and keep the monitor interval unchanged while relying on per-message throttling.

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

---------

Co-authored-by: Claude Code <noreply@anthropic.com>
2026-06-28 20:55:01 +08:00
303fd46de0 fix(claudecode): chmod 0o644 on per-spawn system-prompt temp file (#1429) (#1433)
writeTempAppendPromptFile (the 1% edge-case path for prompts that have
session-specific platform formatting or user append_system_prompt) used
os.CreateTemp, which leaves the file at mode 0600 owned by the
cc-connect process user (often root under systemd). When the agent
was spawned under a different run_as_user, the target user got EACCES
and the agent exited before reading any prompt.

Fix: f.Chmod(0o644) immediately after write, mirroring the shared
ensureSharedSystemPromptFile path (which already writes 0o644 via
writeFileAtomic). The per-spawn content is a superset of the already
shared base prompt, so 0644 is consistent with the shared file.

The shared-file path (ensureSharedSystemPromptFile, used for the
common 99% case where no platform/user append is set) is already 0644
and untouched here. The daemon-mode path resolution fix from #1419
and the v1.3.4 cmdline 8192 fix from #1376 are independent and not
modified.

Test: TestWriteTempAppendPromptFile_ReadableByOtherUser asserts the
on-disk mode is 0o644 (the run_as_user contract) and that an
O_RDONLY open succeeds — same access path the spawned agent uses
for --append-system-prompt-file.

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-28 20:34:02 +08:00
mchenziyi fd6dbcc320 feat: add reasonix agent adapter (#1281)
* feat: add reasonix agent adapter

Adds a new agent adapter for Reasonix, a multi-model coding agent.

The adapter communicates with a running 'reasonix serve' instance via its HTTP API:
- Submits prompts via POST /submit
- Consumes agent events via SSE /events
- Handles tool approval via POST /approve
- Supports mode switching (default/yolo/plan)
- Accumulates incremental reasoning chunks into single events

* fix: handle resp.Body.Close errors (errcheck lint) and fix close-before-status order

* fix: add SSE auto-reconnect with backoff when reasonix serve restarts

* fix: add unit tests, static assertions, error body, reconnect limit

10 unit tests with httptest. All pass -race. P2 fixes: static assertions, error body, max reconnect.

* fix: lint: check error returns in session_test.go (errcheck)

* fix: lint: check remaining fmt.Fprintf error in TestSSEReconnect

* fix: add reasonix to ALL_AGENTS in Makefile, fix CHANGELOG, add doc comments

P1: Added reasonix to ALL_AGENTS in Makefile so make build includes it by default.

P2: Fixed CHANGELOG Unreleased entry, added formatImages doc comment, serve_url normalize comment, normalizeMode auto/force comment.

* chore: retrigger CI
2026-06-25 07:46:06 +08:00
Yuanhao Luo 6fc59a3c6e feat(feishu): support mention_map for outbound bot-to-bot @ resolution (Fixes #1322) (#1341)
* feat(feishu): support mention_map for outbound bot-to-bot @ resolution

* feat(feishu): support mention_map for outbound bot-to-bot @ resolution (Fixes #1322)

* fix(feishu): update stale @mention test and doc comment for text-format output

After 40406328 made resolveMentionsInContent always emit the MsgTypeText
at syntax (<at user_id="...">), the legacy TestResolveMentions_CardFormat
assertion (expecting the card variant <at id=...>) started failing. Rename
the test to TestResolveMentions_MarkdownContent and assert the text-format
output instead — the behavior under test (markdown @name resolution) is
unchanged, only the expected at-tag format moved.

Also update the doc comment on resolveMentionsInContent that still
referenced "predicted message type" (that branch was removed).

No production behavior change.

* update comment of TestResolveMentions_MarkdownContent fun

* fix(feishu): restore lost test bodies from broken merge conflict resolution

* fix(feishu): restore missing closing braces broken by merge conflict resolution

The merge of main (26d897c) re-introduced the lost-brace bug: the new
TestNewPlatform_ImageBatchWindow was spliced in before the closing braces
of TestSendWithStatusFooter_NoFallbackOnNonMentionAt, leaving the for-loop
and function unclosed. This caused 10 typecheck errors (expected '(',
found TestXxx) and failed CI lint.

Add the two missing closing braces so the file compiles. All feishu
package tests pass (go test ./...).

* style(feishu): apply gofmt to fix trailing whitespace and map alignment

- platform_test.go: remove trailing whitespace on line 1789 comment
- feishu.go: drop blank line in footerElements map literal and realign
  colon spacing (gofmt); main is clean so this issue was introduced in
  this PR, not pre-existing

* docs(changelog): fix Feishu mention_map issue ref (PR #1341 -> Issue #1322)
2026-06-25 07:40:39 +08:00
cg33anddev-claudecode 79e3132fd8 fix(core): queue post-restart notification and dispatch on platform ready (#1383) (#1388)
cc-connect /restart used to send 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 — Tony-ooo reported this in #1383.

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 platform never reaches ready, so startup is never blocked
indefinitely.

Covers all AsyncRecoverablePlatform implementations (Telegram, Discord,
Weixin, Matrix) for free via the existing OnPlatformReady hook.

Tests:
- TestRestartNotify_DispatchesAfterPlatformReady
- TestRestartNotify_AlreadyReadySucceedsImmediately
- TestRestartNotify_RetriesOnSendFailure
- TestRestartNotify_ExhaustsRetriesNoHang
- TestRestartNotify_TimesOutIfPlatformNeverReady
- TestRestartNotify_NilNotifyIgnored

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
2026-06-23 07:21:42 +08:00
Yu Zhang fa86932f29 fix(core): make /history entry truncation configurable (#1291)
* fix(core): make history entry truncation configurable

* test(core): cover history truncation emoji boundary
2026-06-23 07:01:41 +08:00
66a6353c55 fix(feishu): coalesce batch images into single multi-image dispatch (#1395) (#1408)
The Feishu mobile client sends N batch-selected images as N separate
message events with very close create_time values. Dispatching each
event immediately caused core/engine's create_time watermark (PR #1168)
to drop the oldest image, so the agent only ever saw N-1 images
(issue #1395).

A per-session image buffer with a 150ms quiet window now merges the
burst into one core.Message carrying all images in send order. The
buffer only coalesces plain image messages (no parent_id) — quoted
images and replies keep the existing single-message path so the
PR #944 quoted-image behavior is preserved.

Stop() now flushes any pending batches synchronously so buffered
images aren't lost on shutdown.

Tests:
- TestDispatchMessageCoalescesImageBatch (2/3/4 image subtests)
- TestDispatchMessageSingleImageRegression
- TestDispatchMessageQuotedImageNotBatched (PR #944 path)
- TestFlushImageBatchesStopsPendingTimers
- TestFlushImageBatchesEmptySafe

Co-authored-by: dev-claudecode <dev-claudecode@cc-connect.local>
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-21 23:15:33 +08:00
Yu Zhang 5fb98a46c9 fix(core): drain queued messages in FIFO order (#1286)
* fix(core): drain queued messages in FIFO order

* test(core): cover queued drain stale watermark

* fix(core): preserve queued messages during session startup
2026-06-20 12:13:02 +08:00
cg33andClaude e8f0ba5de6 fix(skill): scan only depth-1 SKILL.md, ignore nested files (#1304) (#1317)
Previously `discoverSkillsInDir` recursed into every subdirectory looking
for SKILL.md. Any skill that shipped templates or examples under its own
subtree (e.g. `frontend-design/references/finance-report/SKILL.md`) would
leak those nested SKILL.md paths as phantom slash commands into platform
command menus — issue #1304 reports 101 leaked commands from one skill.

Switch the scan to depth-1 only: each immediate subdirectory of a skill
root is either a skill (has its own SKILL.md) or ignored. This matches
the Claude Code CLI convention and means the file under
`<root>/<skill>/references/...` is treated as a skill asset rather than
a sibling skill.

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-20 07:58:12 +08:00
ClaudeandCursor dc1c63b9eb release: v1.3.3 stable
Bump VERSION to v1.3.3 and npm/package.json to 1.3.3. Stabilizes the
v1.3.3-beta.1 -> v1.3.3-beta.5 line (~235 PRs since v1.3.2) plus 7
post-beta fixes (qoder streaming, weixin typing ticket, daemon
linger_other.go, wps-xiezuo newlines, /switch history loss, minimax TTS
trailer, provider-resume regression tests).

- Add changelogs/v1.3.3.md with themed summary (New Agents, Platform
  Capabilities, Core, Behavior Changes, Fixed)
- Prepend v1.3.3 section to CHANGELOG.md with highlights + post-beta
  delta + behavior-change checklist
- Refresh "What's New" in README.md and README.zh-CN.md to v1.3.3
- Fix CUJ test flake: bump TestCUJ_H2_TwoPlatformsConcurrentNoBleed
  deadline from 5s to 30s so it stays green under `-race -parallel=N`
  on constrained CI hosts (passes <2s in isolation)

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 23:02:36 +08:00
ClaudeandCursor b48781c0ad build: release v1.3.3-beta.5 — new agents, file attachments, /timer, /cancel, broad platform fixes
74 PRs from 28 contributors since v1.3.3-beta.4.

New agents:
- Google Antigravity (agy) (#1123)
- GitHub Copilot (#865)

New platform capabilities:
- QQ file send/receive via OneBot HTTP API (#323)
- WeCom SendFile in WebSocket mode (#1199)
- Feishu audio/video attachments as media (#1202)
- DingTalk reaction emoji (#1213)
- QQ Bot inline keyboards + INTERACTION_CREATE (#1131)

Core features: /timer, /cancel, session prune, agent-driven TTS, configurable shell.

Behavior notes: Telegram/Discord progress_style default = compact; DingTalk msgtype=file
now reaches the agent; engine permission keyword matching is @mention-tolerant.

See changelogs/v1.3.3-beta.5.md for the full list.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 10:29:46 +08:00
cg33anddev-claudecode da6b92f9f7 feat(cli): expose --silent flag for cron add (#858) (#1285)
* feat(cli): expose --silent flag for cron add (#858)

PR #875 (4ebcb7a5) exposed --silent on 'cron add' plus added 'silent'
to the bool case in 'cron edit'. PR #915 (7055ecd9) landed the edit-side
fix separately, so only the add side remains. Re-apply the add-side
diff on top of current main and add a help-text regression test.

Changes:
- runCronAdd: parse --silent, set body['silent'] = true.
- printCronAddUsage: document --silent option and example.
- cron_add_test.go: guard that --silent stays documented.

Build: go build -tags no_web ./cmd/cc-connect (success)
Tests: go test ./cmd/cc-connect -count=1 (pass, including new test)

Refs #858, #875

* docs(changelog): note cron add --silent flag

---------

Co-authored-by: dev-claudecode <dev-claudecode@spaceship.local>
2026-06-11 00:07:41 +08:00
7a3lv7 d0bc5ba522 feat(qqbot): add inline keyboard buttons and INTERACTION_CREATE event handling (#1131)
* feat(qqbot): add support for inline keyboard buttons and interaction events

- Update default intents to include INTERACTION_CREATE
- Implement SendWithButtons to send messages with inline keyboard buttons
- Encode permission decisions and session key in button_data for routing callbacks
- Handle INTERACTION_CREATE events to process button clicks as permission responses
- Create synthetic message for permission decisions and forward to engine
- Add ackInteraction to acknowledge INTERACTION_CREATE events via API call
- Add extensive tests for sending buttons, handling interactions, and edge cases

* fix(qqbot): ignore ackInteraction error and correct test URL check

- Suppress error from ackInteraction to avoid unused error variable warning
- Update test to expect corrected interaction URL path "/interactions/interact-1" instead of "/v2/interactions/interact-1"

* - Add sessionKey field to replyContext to embed in button_data and session routing
- Refactor SendWithButtons to use sessionKey from replyContext and validate emptiness
- Enhance replyContext construction with sessionKey in various message scenarios
- Implement new tests for sharing session keys in channel, empty session key errors,
  and interaction_create event permission routing
- Update config.example.toml to document new required intents for interaction support
- Modify changelog with instructions on enabling INTERACTION_CREATE intent (bit 26) for QQ Bot
- Permission requests now use clickable inline buttons instead of text replies, requiring
  enabling the INTERACTION capability in QQ Open Platform settings

* test(qqbot): ignore errors and returned values in test HTTP handlers
2026-06-02 10:22:30 +08:00
ClaudeandCursor 992b82ef94 fix: session busy lockup, AskUserQuestion empty answer, Feishu require_mention, DingTalk picture type
- fix(core): reject empty/whitespace content as AskUserQuestion answers (#1086)
  Platform delivery receipts arriving within ~500ms were accepted as valid answers,
  resolving the tool immediately with empty answers before the user could respond.

- fix(feishu): treat require_mention=false as alias for group_reply_all=true (#1141)
  Platform read group_reply_all from opts but users set require_mention=false;
  group messages without @mention were silently dropped.

- fix(dingtalk): accept msgtype="picture" as image message (#1128)
  DingTalk delivers image messages as either "image" or "picture" depending on client.
  "picture" fell through to the text handler (empty content) and was dropped.

- feat(core): add max_turn_time_mins config option for #1091
  Absolute wall-clock cap per agent turn that does NOT reset on tool-call events.
  Prevents long-running bash commands from permanently locking the session.
  Two-phase shutdown: soft stop (10s grace) then force-kill.
  Session is preserved; next message resumes via --resume.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 00:10:37 +08:00
ClaudeandCursor 8e04d66bf6 build: release v1.3.3-beta.3 — fix Windows cross-compile (CheckLinger stub)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-24 09:49:54 +08:00
Claude 4253763f6b build: release v1.3.3-beta.3 2026-05-24 08:52:29 +08:00
Claude f6a1a79460 build: release v1.3.3-beta.2 — Slack Assistant API, DingTalk richText, MAX webhook, and platform fixes 2026-05-09 09:13:00 +08:00
Claude 3a9bb44125 build: release v1.3.3-beta.1 — new agents, features, and platform fixes
Made-with: Cursor
2026-04-25 10:53:29 +08:00
Claude 19406df98f build: release v1.3.2 — session filter default off + config switch
Made-with: Cursor
2026-04-21 08:42:07 +08:00
Claude 48afa69f9d build: release v1.3.1 — session fixes, config preservation, weibo media
Made-with: Cursor
2026-04-20 23:24:04 +08:00
Claude d84cd3c8cb build: release v1.3.0 — web admin, lifecycle hooks, skill management
First stable 1.3 release with 555 commits since v1.2.1. Key features:
web admin UI, lifecycle event hooks, skill management page, global
provider management, cc-connect web CLI, and broad community contributions.

Made-with: Cursor
2026-04-19 20:44:52 +08:00
Claude 28513f30d1 build: release v1.2.2-beta.5 — embedded web admin, Discord proxy, multimodal fixes
Made-with: Cursor
2026-03-31 09:53:31 +08:00
Claude d50a797314 build: release v1.2.2-beta.4 — Weixin ilink, session/cron fixes, platforms
Bump npm to 1.2.2-beta.4 and document changes since v1.2.2-beta.3 in CHANGELOG.
2026-03-22 14:39:42 +08:00
huluma1314andHuluma 253ef30f4e Auto-compress context when token threshold exceeded (#231)
Co-authored-by: Huluma <huluma@HulumadeMac-mini.local>
2026-03-21 20:33:03 +08:00
Claude 44c61e2314 build: release v1.2.2-beta.3 — multi-user mode, ImageSender, workspace fixes 2026-03-19 22:52:47 +08:00
chenhg5andClaude Opus 4.6 9223201696 build: release v1.2.2-beta.2
- Feishu/Lark CLI onboarding with QR terminal display
- Pi agent support
- Session TUI browser
- Multi-workspace mode
- Role-based ACL system
- Bug fixes for rate limiter and session management

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 09:59:25 +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
chenhg5 ecea1ef36d build: release v1.2.2-beta.1 — interactive cards, security hardening, new features 2026-03-12 08:21:43 +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 Opus 4.6 35cd718369 build: release v1.2.0 — stable release with QQ Bot, iFlow agent, and more
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 22:44:45 +08:00
chenhg5andClaude Opus 4.6 1e61269629 build: release v1.2.0-beta.7
- Multi-bot relay binding support
- System-level systemd daemon mode
- Interactive command buttons
- Exec commands support
- Configurable idle timeout

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 21:07:22 +08:00
chenhg5 b8c0eed437 build: release v1.2.0-beta.6 — bot relay, session search, streaming preview control, voice qwen 2026-03-06 22:18:28 +08:00
chenhg5 53d5576b4b build: release v1.2.0-beta.5 — streaming preview, typing indicators, markdown rendering, rate limiting
Made-with: Cursor
2026-03-06 11:21:46 +08:00
chenhg5 c953bab72b build: release v1.2.0-beta.4 — streaming preview, typing indicators, markdown rendering, rate limiting
Made-with: Cursor
2026-03-06 11:04:54 +08:00
chenhg5 f1c8a4a214 build: release v1.2.0-beta.3 — streaming preview, typing indicators, markdown rendering, rate limiting
Made-with: Cursor
2026-03-06 10:54:55 +08:00
chenhg5 2ffeb240bd build: release v1.2.0-beta.2 — upgrade/restart/reload commands, session naming, group chat filtering, security hardening 2026-03-05 09:18:21 +08:00
chenhg5 cfd8004fe6 build: release v1.2.0-beta.1 — custom commands, skills, Discord slash menu, /config, /doctor, slow logs 2026-03-04 10:41:19 +08:00
chenhg5 ac6915e682 build: release v1.1.0 — first stable release with /compress, Telegram inline buttons, /model, /memory, /status 2026-03-03 14:38:30 +08:00