James Feng
f4a2fc542e
docs: fix SSH_REMOTE (stub) and BRIDGE_MODE (RCS verified working)
2026-06-04 23:30:59 +08:00
James Feng
faf3327868
docs: fix Sentry status — not removed, dormant like Langfuse (set SENTRY_DSN to activate)
2026-06-04 23:00:56 +08:00
James Feng
11dde90c4a
docs: update README — full capability audit (Chrome/Computer Use, /dream, Langfuse dormant, GrowthBook local fallback)
2026-06-04 22:58:18 +08:00
GhostDragon124
aefbc7072f
docs: update contributors
2026-06-04 14:40:18 +00:00
James Feng
a92144c344
docs: update README — main absorbs acp, factual numbers (52 MERGE, 586 files, ACP ✅ )
2026-06-04 22:39:06 +08:00
James Feng
580bcfa56a
merge: bring main (ccp-core baseline) into acp
2026-06-04 22:34:34 +08:00
claude-code-best
0397506694
chore: merge 4 upstream commits — Grok adapter, OpenAI image, CodeRabbit fix, tsc fix
2026-06-04 21:30:40 +08:00
James Feng
c7961967da
docs: sync 光明和阴影面 doc + update README numbers to 3699
...
- Copy doc from user manual to docs/
- Quality table: 3383 → 3699 (+692)
- Local dev section: 3383 tests → 3699 tests
- Version table: add v2.2.1, v2.2.2 entries
2026-06-04 21:04:06 +08:00
James Feng
7eb5530b2c
docs: sync 光明和阴影面 doc + update README numbers to 3699
...
- Copy doc from user manual to docs/
- Quality table: 3383 → 3699 (+692)
- Local dev section: 3383 tests → 3699 tests
- Version table: add v2.2.1, v2.2.2 entries
2026-06-04 21:03:57 +08:00
James Feng
0ced3044eb
docs: update test badge to 3699
2026-06-04 21:02:58 +08:00
James Feng
f2df2d7d85
docs: update test badge to 3699
2026-06-04 21:02:38 +08:00
James Feng
f1c7f7dc74
feat: full merge of f2e9af49 autonomy PR #386 — source + tests
...
Source integration points (previously missing from CCP):
- useScheduledTasks: export createScheduledTaskQueuedCommand, autonomy-backed
queue dedup with markAutonomyRunCancelled on dispose
- processUserInput: thread autonomy payload through to slash commands;
expose deferAutonomyCompletion on ProcessUserInputBaseResult
- processSlashCommand: accept autonomy arg; allowBackgroundForkedSlashCommands
test-only gate on ToolUseContext; defer/finalize autonomy in background fork
- handlePromptSubmit: claim stale autonomy commands before idle queue drain;
finalize autonomy on error paths
- Tool.ts: add allowBackgroundForkedSlashCommands to ToolUseContext
Tests ported from upstream f2e9af49 (11 files, +97 assertions):
- autonomyAuthority.test.ts — authority parsing, prompt assembly
- autonomyFlows.test.ts — managed flow lifecycle
- autonomyPersistence.test.ts — file locking, active retention
- autonomyQueueLifecycle.test.ts — queue partition/claim/finalize
- autonomyRuns.test.ts — state machine, dedup, formatters
- queryAutonomyProviderBoundary.test.ts — provider error finalization
- handlePromptSubmit.test.ts — stale autonomy filtering
- useScheduledTasks.test.ts — cron task → autonomy queue
- processSlashCommand.test.ts — slash command autonomy integration
- autonomy-lifecycle-user-flow.test.ts — CLI subprocess integration
- RemoteTriggerTool.test.ts — merged upstream assertion improvements
3699 pass, 0 fail (was 3602)
2026-06-04 20:57:07 +08:00
James Feng
9538ebd243
feat: full merge of f2e9af49 autonomy PR #386 — source + tests
...
Source integration points (previously missing from CCP):
- useScheduledTasks: export createScheduledTaskQueuedCommand, autonomy-backed
queue dedup with markAutonomyRunCancelled on dispose
- processUserInput: thread autonomy payload through to slash commands;
expose deferAutonomyCompletion on ProcessUserInputBaseResult
- processSlashCommand: accept autonomy arg; allowBackgroundForkedSlashCommands
test-only gate on ToolUseContext; defer/finalize autonomy in background fork
- handlePromptSubmit: claim stale autonomy commands before idle queue drain;
finalize autonomy on error paths
- Tool.ts: add allowBackgroundForkedSlashCommands to ToolUseContext
Tests ported from upstream f2e9af49 (11 files, +97 assertions):
- autonomyAuthority.test.ts — authority parsing, prompt assembly
- autonomyFlows.test.ts — managed flow lifecycle
- autonomyPersistence.test.ts — file locking, active retention
- autonomyQueueLifecycle.test.ts — queue partition/claim/finalize
- autonomyRuns.test.ts — state machine, dedup, formatters
- queryAutonomyProviderBoundary.test.ts — provider error finalization
- handlePromptSubmit.test.ts — stale autonomy filtering
- useScheduledTasks.test.ts — cron task → autonomy queue
- processSlashCommand.test.ts — slash command autonomy integration
- autonomy-lifecycle-user-flow.test.ts — CLI subprocess integration
- RemoteTriggerTool.test.ts — merged upstream assertion improvements
3699 pass, 0 fail (was 3602)
2026-06-04 20:56:53 +08:00
James Feng
80a8828691
fix: backfill upstream OpenAI fixes ( c82f5994, 901628b4) + regression tests
...
c82f5994 — fix(openai): stop_reason null, zero usage fields, max_tokens forwarding
- streamAdapter: defer message_delta/message_stop to after stream loop
so trailing usage chunks are captured; fill all 4 usage fields
- index.ts: assemble final AssistantMessage at message_stop (not per-block);
apply stop_reason from message_delta; reset partialMessage; post-loop
safety fallback for partial messages
- buildOpenAIRequestBody: accept and forward maxTokens → max_tokens
901628b4 — fix: OpenAI provider deferred MCP tool visibility
- index.ts: prepend deferred MCP tool text list so OpenAI model can discover
and request them via ToolSearchTool
- claude.ts: pass full tools (not filteredTools) to OpenAI path so deferred
tools are searchable
- index.ts: include already-discovered deferred tools in filteredTools so
their schemas are available after ToolSearchTool loads them
Tests added:
- queryModelOpenAI.isolated.ts (674 lines): stop_reason assembly, partialMessage
reset, max_tokens truncation warning, usage tracking, cost tracking
- queryModelOpenAI.runner.ts + .test.ts: isolated subprocess runner (CCP pattern)
- streamAdapter.test.ts: 665→130 lines expanded — deferred finish, trailing
usage, length→max_tokens mapping, full usage field assertions
- formatBriefTimestamp.test.ts: beforeAll/afterAll env save/restore
3602 pass, 0 fail
2026-06-04 20:21:14 +08:00
James Feng
12301713b9
fix: backfill upstream OpenAI fixes ( c82f5994, 901628b4) + regression tests
...
c82f5994 — fix(openai): stop_reason null, zero usage fields, max_tokens forwarding
- streamAdapter: defer message_delta/message_stop to after stream loop
so trailing usage chunks are captured; fill all 4 usage fields
- index.ts: assemble final AssistantMessage at message_stop (not per-block);
apply stop_reason from message_delta; reset partialMessage; post-loop
safety fallback for partial messages
- buildOpenAIRequestBody: accept and forward maxTokens → max_tokens
901628b4 — fix: OpenAI provider deferred MCP tool visibility
- index.ts: prepend deferred MCP tool text list so OpenAI model can discover
and request them via ToolSearchTool
- claude.ts: pass full tools (not filteredTools) to OpenAI path so deferred
tools are searchable
- index.ts: include already-discovered deferred tools in filteredTools so
their schemas are available after ToolSearchTool loads them
Tests added:
- queryModelOpenAI.isolated.ts (674 lines): stop_reason assembly, partialMessage
reset, max_tokens truncation warning, usage tracking, cost tracking
- queryModelOpenAI.runner.ts + .test.ts: isolated subprocess runner (CCP pattern)
- streamAdapter.test.ts: 665→130 lines expanded — deferred finish, trailing
usage, length→max_tokens mapping, full usage field assertions
- formatBriefTimestamp.test.ts: beforeAll/afterAll env save/restore
3602 pass, 0 fail
2026-06-04 20:20:21 +08:00
James Feng
98b93198c7
fix: 恢复 isOpenAIThinkingEnabled 和 buildOpenAIRequestBody 导出
...
thinking.test.ts 引用了两个已被删除的函数,导致模块加载失败
(1 fail + 1 error)。恢复了完整的 OpenAI thinking mode 支持:
- isOpenAIThinkingEnabled: env var OPENAI_ENABLE_THINKING 优先级最高,
其次自动检测 deepseek 系列模型名
- buildOpenAIRequestBody: 构建请求体,同时注入三种 thinking 格式
(OpenAI official / vLLM / chat_template),thinking 开启时排除 temperature
测试:3591 pass, 4 skip, 0 fail, 0 error(首次全绿)
2026-06-04 19:32:43 +08:00
James Feng
05cb6b0a7a
fix: 恢复 isOpenAIThinkingEnabled 和 buildOpenAIRequestBody 导出
...
thinking.test.ts 引用了两个已被删除的函数,导致模块加载失败
(1 fail + 1 error)。恢复了完整的 OpenAI thinking mode 支持:
- isOpenAIThinkingEnabled: env var OPENAI_ENABLE_THINKING 优先级最高,
其次自动检测 deepseek 系列模型名
- buildOpenAIRequestBody: 构建请求体,同时注入三种 thinking 格式
(OpenAI official / vLLM / chat_template),thinking 开启时排除 temperature
测试:3591 pass, 4 skip, 0 fail, 0 error(首次全绿)
2026-06-04 19:32:39 +08:00
James Feng
707cb24581
fix: fork子进程工具过滤漏洞 — 注入 filterParentToolsForFork 并重写测试
...
高危漏洞:fork 子 agent 继承了父进程全部工具,绕过了 gate layer 1 的
ALL_AGENT_DISALLOWED_TOOLS 限制(AgentTool/resumeAgent fork 路径用了
useExactTools=true,跳过了 resolveAgentTools 的正常过滤)。
修复:
- AgentTool.tsx fork路径注入 filterParentToolsForFork (对齐上游 CCB)
- resumeAgent.ts resumed-fork路径同样注入
- 测试从 grep 源码改写为运行时行为验证(import-chain + mock.module)
测试:3552 pass, 1 fail, 1 error (fail/error 为 ExecuteTool 老问题)
基线:5 fail → 1 fail + 1 error (AC11b ×2 修复)
2026-06-04 19:14:45 +08:00
James Feng
f6488bce8f
fix: fork子进程工具过滤漏洞 — 注入 filterParentToolsForFork 并重写测试
...
高危漏洞:fork 子 agent 继承了父进程全部工具,绕过了 gate layer 1 的
ALL_AGENT_DISALLOWED_TOOLS 限制(AgentTool/resumeAgent fork 路径用了
useExactTools=true,跳过了 resolveAgentTools 的正常过滤)。
修复:
- AgentTool.tsx fork路径注入 filterParentToolsForFork (对齐上游 CCB)
- resumeAgent.ts resumed-fork路径同样注入
- 测试从 grep 源码改写为运行时行为验证(import-chain + mock.module)
测试:3552 pass, 1 fail, 1 error (fail/error 为 ExecuteTool 老问题)
基线:5 fail → 1 fail + 1 error (AC11b ×2 修复)
2026-06-04 19:13:30 +08:00
James Feng
4cf28f1e40
fix(acp): 修复 2 个 ACP 测试失败,基线保持 5
...
- utils.ts: resolvePermissionMode 补上 source 参数,匹配上游
- bridge.test.ts: 去掉 undefined yield,用 if(false) yield 满足 biome
- ci.yml: 基线恢复 5 (ACP 134 pass / 0 fail)
2026-06-04 18:50:58 +08:00
James Feng
2ad6e5159c
chore(ci): acp 分支加入 CI + 基线 5→7
...
- ci.yml 触发分支加入 acp
- 基线调整: 5→7 (新增 2 个 ACP 测试非功能失败: 错误消息文案不匹配)
2026-06-04 18:44:59 +08:00
James Feng
0980c242a2
docs: 更新 README — ACP ✅ + 测试数 3383→3551 + build 586files
...
- ACP 状态从 ⚠️ stub 改为 ✅ 已引入,链接到 acp 分支
- MERGE 计数 49→52,SKIP 96→94,延后 1→0
- 新增 acp 分支同步记录
2026-06-04 18:26:15 +08:00
James Feng
3a542d4f50
feat(acp): 补充 promptConversion 模块 + 修复 build
...
- 从上流 c2ac9a74 拉取缺失的 promptConversion.ts 及测试
- build 586 文件通过,test 3551 (5 fail/1 error 基线一致)
- acp-link manager 以上游 CCB 最新版为准
2026-06-04 18:22:41 +08:00
James Feng
082f91aa80
feat: acp manager ( #304 )
...
* feat: acp 控制器第一版
* feat: acp-link 命令二合一
2026-06-04 18:15:31 +08:00
xuzhongpeng.xzp
6950401c06
fix(acp): 对齐 ACP session ID 与全局会话状态
...
在 newSession/resumeSession/loadSession 中调用 switchSession,
确保 transcript 持久化、analytics 与 cost tracking 使用 ACP session ID,
而非内部默认 session ID。
- newSession 生成 sessionId 后立即对齐全局状态
- resumeSession 命中 fingerprint 缓存路径也对齐
- loadSession 在 sessionIdExists() 检查前对齐(lookup 依赖 getSessionId)
- 补充 5 个测试覆盖上述路径,以及 prompt 不触发额外 switchSession
2026-06-04 18:13:51 +08:00
unraid
188bcea5ba
feat: 增强 ACP 桥接与权限处理
...
- 增强 ACP agent 测试覆盖
- 扩展 ACP bridge 测试用例
- 改进 ACP utils 权限管道
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-04 18:13:02 +08:00
James Feng
0b38268491
feat: 恢复 ACP 命令行入口 (--acp) 支持
2026-06-04 18:12:27 +08:00
James Feng
957076c5bd
feat: 恢复 Chrome MCP 浏览器自动化支持
...
- 添加 scripts/setup-chrome-mcp.mjs(从上游恢复)
- 添加 docs/features/chrome-use-mcp.md 使用文档
- 恢复 postinstall 中的 Chrome MCP 设置步骤
- CI 中加 CLAUDE_CODE_SKIP_CHROME_MCP_SETUP=1 避免无 Chrome 环境失败
2026-06-04 17:27:58 +08:00
James Feng
3bebd88501
fix(ci): 基线 4→5 (macOS 多出 ExecuteTool×2 + 1 error)
2026-06-04 17:18:01 +08:00
James Feng
941df7e498
fix(ci): bun test 输出写到文件避免 GitHub log 截断
2026-06-04 17:15:43 +08:00
James Feng
67515ccba9
fix(ci): 修复 bun test 非零退出码被 set -e 截断
2026-06-04 17:12:51 +08:00
James Feng
df7fa26d23
fix(ci): 调高测试基线 2→4(预存 AC11 + ExecuteTool 失败)
2026-06-04 17:10:29 +08:00
James Feng
c83542af8f
fix(ci): 修复 postinstall + Bun 版本对齐
...
- 移除缺失的 setup-chrome-mcp.mjs (CCB Chrome 集成,CCP 不需要)
- CI Bun: 1.3.11 → 1.3.14 (对齐本地环境)
2026-06-04 17:08:12 +08:00
GhostDragon124
a2f098a746
docs: update contributors
2026-06-04 09:06:11 +00:00
James Feng
e08b9b6e86
chore: 重新生成 bun.lock 修复 CI lockfile frozen 错误
2026-06-04 17:05:47 +08:00
James Feng
e806327608
feat: npm 离线打包脚本 — scripts/pack-npm.sh
...
一键构建 + 打包为 ccp-<version>.tgz:
bash scripts/pack-npm.sh
目标机器安装(需要 Bun):
npm install -g ./ccp-2.6.5.tgz
ccp --version
产物 5.5MB,包含 dist-nosplit/cli.js + bin wrapper
2026-06-04 16:13:29 +08:00
James Feng
452e2f01c8
docs: README 更新 — 测试数 3383、ACP stub 状态、上游同步章节
...
- 测试数: 3068 → 3383
- ACP: ✅ → ⚠️ stub (fail-closed),默认关闭
- 新增「上游同步策略」章节,180 commit 审查统计
- 版本更新记录 (v1.8.0 → v2.2.0)
2026-06-04 16:06:44 +08:00
James Feng
b5bcbdbd23
fix: 修复斜杠命令自动补全 — 光标前文本参与解析,Tab 补全保留光标后内容 (from upstream ad09f38f)
...
来源: upstream ad09f38f
修复:
- 只取光标前的 commandInput 参与命令解析,不把光标后文本算入
- Tab 补全时 splice 到光标位置,保留光标后已有内容
- 新增 34 个回归测试
Build: ✅ | Tests: 34/34 pass
2026-06-04 15:48:21 +08:00
James Feng
10dfcc6710
fix: Batch 1a — WebFetchTool header 安全加固 + 核心运行时修复 (from upstream c2ac9a74)
...
来源: upstream c2ac9a74 (dependency audit findings)
变更 (11 files):
- WebFetchTool: getResponseHeader() 防大小写不一致绕过安全校验 + 新测试
- langfuse: Windows USERPROFILE + homedir() 路径脱敏支持
- REPL.tsx: hideTimeout 清理、onInit/diagnosticTracker ref 闭包修复
- claude.ts: 移除冗余 = undefined 初始化
- query.ts: 移除 biome-ignore + 变量声明简化
- staticRender.tsx: 静态渲染完善
- ansiToPng.ts/bridgeMain.ts/SSETransport.ts/WebSocketTransport.ts: 代码质量
- useGlobalKeybindings/useVoiceIntegration: 质量修复
- 测试文件: sliceAnsi/stringUtils/envExpansion 防模板字面量转义
Build: ✅ 565 files | Tests: 65/65 pass (0 new failures)
2026-06-04 15:45:01 +08:00
claude-code-best
9df9e03765
fix: 修复模型的问题
2026-06-04 15:27:40 +08:00
claude-code-best
4ceeedee3f
fix: 禁用 opus[1m] 自动迁移,尊重用户手动删除 [1m] 后缀的选择
...
迁移逻辑过于激进,用户手动删除 [1m]] 后会被自动加回。
现在将 migrateOpusToOpus1m 改为 no-op,保留用户的手动模型选择。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-04 15:27:40 +08:00
claude-code-best
995d3a473c
fix: 修复 anthropic 煞笔的四个 bug ( #352 )
...
* fix: 移除文件编辑前必须先读取的限制
移除 FileEditTool 和 FileWriteTool 中的 "read before edit" 校验,
允许直接编辑未读取过的文件。保留文件修改过期检测。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* docs: 更新 teach-me 自动写 note 笔记的功能
* fix: 修复 DeepSeek V4 reasoning_content 回传导致的 400 错误
- 扩大模型名称检测范围,匹配所有 deepseek 模型(V4、R1 等)
- 始终保留 thinking blocks 为 reasoning_content 回传给 API
- 移除有 bug 的 turn boundary 剥离逻辑
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: Opus 4.6/4.7 默认推理 effort 从 medium 改为 high
Pro 和 Max/Team 订阅者的 Opus 默认 effort 之前被降级为 medium,
导致用户感知模型「变笨」。恢复为 high。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: 移除 thinkingClearLatched sticky-on 机制
空闲超过 1 小时后 thinkingClearLatched 会被触发且永不重置,
导致每轮 API 调用都清除 thinking 历史。完整移除该 latch 机制,
clearAllThinking 硬编码为 false。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: 移除 numeric_length_anchors 系统指令
删除「工具调用间文字 ≤25 词、最终回复 ≤100 词」的硬性限制。
ablation 测试显示该约束使整体智能下降 3%。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix: 修复测试中 reasoning_content 类型断言
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 14:59:49 +08:00
claude-code-best
fe9da6e5b9
fix: 代码审查修复 — 安全、性能和正确性
...
- triggersApi: 添加 assertSubscriptionBaseUrl 防止 OAuth token 泄露
- claude.ts: 修复流式响应 O(n^2) 字符串拼接,改用数组累积
- claude.ts: 移除未使用的 import,动态 import 改为静态 import
- StatusLine: BuiltinStatusLine 仅在 statusLineEnabled 时显示,修复双行问题
- local-vault: 修复 --reveal 标志位置解析 bug
- share: 修复 sk-proj-* OpenAI 密钥未脱敏问题
- store.ts: 临时文件改用同目录创建,避免跨文件系统 rename 失败
- store.ts: 添加空字符串 key 校验
- permissionValidation: 端口正则限制为有效 TCP 范围 0-65535
- 测试 mock 补全: schedule/vault/skill-store 测试文件
- 移除过期的 biome-ignore 注释
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-06-04 14:59:14 +08:00
James Feng
8485589ca7
fix: add typeof TungstenPill guard (partial cherry-pick a02a9fc)
...
8645d37 (Auth header) and a889ed8 (Gates reference) already present in CCP.
2026-06-04 14:58:21 +08:00
Alan
d0278e89c0
fix: support CRLF SSE frame parsing ( #223 )
2026-06-04 14:55:21 +08:00
claude-code-best
6362f1af99
fix: 修复 n 快捷键导致关闭的问题
2026-06-04 14:51:33 +08:00
claude-code-best
2074f6463f
fix: 修复 linux 端的安装问题
2026-06-04 14:51:33 +08:00
claude-code-best
5ed0fa572c
fix: 修复 cliHighlight 类型不兼容问题
...
loadedGetLanguage 返回类型中 name 字段改为可选,匹配 highlight.js
Language 类型中 name 为 string | undefined 的定义。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 14:51:33 +08:00
claude-code-best
6a025582cd
fix: 修复 ACP 模式下 messageSelector require 失败导致 submitMessage 崩溃
...
ACP 模式不加载完整的 React/Ink UI 组件,导致 require('src/components/MessageSelector.js')
返回 undefined。添加 try-catch 和 optional chaining fallback。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 14:51:33 +08:00
claude-code-best
3cc9545d3b
fix: 修复 DeepSeek V4 reasoning_content 回传导致的 400 错误
...
- 扩大模型名称检测范围,匹配所有 deepseek 模型(V4、R1 等)
- 始终保留 thinking blocks 为 reasoning_content 回传给 API
- 移除有 bug 的 turn boundary 剥离逻辑
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 14:51:32 +08:00