[pull] main from claude-code-best:main#6
Open
pull[bot] wants to merge 526 commits into
Open
Conversation
feat: 添加 Exa AI 搜索适配器
fix: 将 highlight.js 改为静态导入以兼容 Bun --compile 模式
loadedGetLanguage 返回类型中 name 字段改为可选,匹配 highlight.js Language 类型中 name 为 string | undefined 的定义。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
移除 push 触发,仅保留每周一 schedule 触发。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
将 lazy require() 调用全部替换为静态 import,解决构建产物中 模块加载时序问题导致的 'undefined is not an object' 错误。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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>
- 从 DEFAULT_BUILD_FEATURES 注释掉 DAEMON(内存占用过高)
- remoteControlServer 命令门控从 feature('DAEMON') && feature('BRIDGE_MODE')
改为仅 feature('BRIDGE_MODE'),bridge 不再依赖 daemon
- --daemon-worker 快速路径改为运行时检测,未启用时输出明确错误提示
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 添加 Linux/macOS/Windows 各平台的安装命令 - 添加安装后的操作步骤(重启终端、验证安装、更新版本) - 同步更新中英文 README
SSH Remote 允许在本地运行交互式 REPL,同时将工具调用(Bash、文件读写等) 通过 SSH 隧道转发到远程主机执行。 核心模块: - SSHSessionManager: NDJSON 双向通信、权限转发、指数退避重连 - SSHAuthProxy: 本地认证代理 + SSH -R 反向端口转发,nonce 验证 - SSHProbe: 远端主机平台/架构/已有二进制探测 - SSHDeploy: 远端二进制部署(scp) - createSSHSession: 会话编排(probe → deploy → spawn → attach) 新增选项: - --remote-bin: 跳过 probe/deploy,使用自定义远端二进制 - ANTHROPIC_AUTH_NONCE: API 请求认证 nonce header 包含 17 个单元测试和完整文档。
docs: 添加 Bun 安装详细说明
feat: SSH Remote — 本地 REPL + 远端工具执行
新建 agent 后 clearAgentDefinitionsCache 漏清底层 loadMarkdownFilesForSubdir 的 memoize 缓存,导致新 agent 不会立即出现在列表中,需要重启才能生效。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
将 SKILL_LEARNING 加入 DEFAULT_BUILD_FEATURES, 构建产物中默认启用技能学习系统。
feat: 启用 SKILL_LEARNING 编译开关
将 `|| true` 替换为 `set -o pipefail`,使管道中 bun test 的非零退出码能正确传播,CI 在测试失败时正确报错。 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
- thinking.test.ts: 补 envUtils.js 防御性 mock,提供 isEnvDefinedFalsy 和 isEnvTruthy 正确实现,覆盖 6 个其他测试文件不完整 mock 导致的污染 - launchLocalVault.test.ts: 补 keychain.js 防御性 mock,强制抛 KeychainUnavailableError 使 store 走文件回退路径,覆盖 store.test.ts 和 keychain.test.ts 的 mock 残留 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
模型在未通过 SearchExtraTools 发现工具的情况下直接调用 ExecuteExtraTool, 因不知道工具 schema 导致参数错误(如 libraryName: undefined)。 双重修复: 1. ExecuteTool.call() 添加服务端拦截:检查目标 deferred 工具是否已被发现 2. 更新 <available-deferred-tools> 系统提示:要求先搜索再执行 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
禁用空白 issue,添加 Bug 报告和功能建议两个中文模板, 引导不相关问题前往 Discussions。 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
在 newSession/resumeSession/loadSession 中调用 switchSession, 确保 transcript 持久化、analytics 与 cost tracking 使用 ACP session ID, 而非内部默认 session ID。 - newSession 生成 sessionId 后立即对齐全局状态 - resumeSession 命中 fingerprint 缓存路径也对齐 - loadSession 在 sessionIdExists() 检查前对齐(lookup 依赖 getSessionId) - 补充 5 个测试覆盖上述路径,以及 prompt 不触发额外 switchSession
fix(acp): 对齐 ACP session ID 与全局会话状态
Spinner.tsx 的 token 聚合循环仅统计 in_process_teammate 类型任务, 漏掉了 local_agent(后台代理/verification agent)类型。当后台代理 运行时,主界面 spinner 一直显示 "↓ 0 tokens",因为 background agent 的 token 消耗未被纳入 teammateTokens 聚合。 同时在 inProcessRunner.ts 中,进程内队友完成时计算并设置 result (含 totalTokens/totalToolUseCount/content/usage),使详情弹窗可以 正确展示累计 token 消耗,不再仅依赖 progress.tokenCount 间歇更新。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
Map 以 querySource 为 key 存储每个来源的缓存命中率历史状态, 但 querySource 类型为 `any`,长时间会话中可能产生大量唯一值, Map 持续增长永不清理。 新增 MAX_SOURCE_ENTRIES = 50 上限,新增条目时若达到上限则 逐出最早插入的条目(Map 按插入顺序迭代)。 同时也新增 _resetCacheWarningStateForTest() 用于测试隔离。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
Vite/Rollup 构建时将 require() 通过 __toCommonJS() 包装 ESM 导出,
导致命名导出被包裹在 { default: namespace } 中,访问
extractMemoriesModule.initExtractMemories 为 undefined 触发 React
error boundary 崩溃。改用标准 ESM 动态 import() 绕过 CJS interop。
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
fix: 修复子代理 token 显示为 0 + cacheWarningStateBySource Map 内存泄漏
isOpenAIThinkingEnabled() 现在自动检测模型名包含 "mimo" 的模型 (与 DeepSeek 并列),因为 MiMo 同样使用 reasoning_content 字段 且支持 thinking mode。 buildOpenAIRequestBody() 在 chat_template_kwargs 中同时发送 thinking: true 和 enable_thinking: true,兼容 DeepSeek 自托管和 MiMo 的 thinking 启用格式。 已有 reasoning_content 回传逻辑(openaiConvertMessages.ts)和流 解析逻辑(openaiStreamAdapter.ts)无需修改,MiMo 与 DeepSeek 共用 相同的 reasoning_content 字段协议。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
PR #1226 的 CodeRabbit 审查指出:当 spinner-tree 模式开启时, local-agent(后台代理)的 token 消耗完全不可见,因为它们没有 在树中有独立行,但被 showSpinnerTree 的 guard 排除了。 修复:将 guard 从循环外移到循环内,仅对 in_process_teammate 任务在 tree 模式下跳过(它们有独立树行),local-agent 任务 始终计入 teammateTokens。 Closes: review comment from PR #1226 (originally belongs to PR #1225) Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
feat: 添加 MiMo 模型 thinking mode 自动检测与兼容
fix: showSpinnerTree 模式下保留 local-agent token 显示
* fix: 修复子代理 token 消耗在主 spinner 中始终显示为 0 Spinner.tsx 的 token 聚合循环仅统计 in_process_teammate 类型任务, 漏掉了 local_agent(后台代理/verification agent)类型。当后台代理 运行时,主界面 spinner 一直显示 "↓ 0 tokens",因为 background agent 的 token 消耗未被纳入 teammateTokens 聚合。 同时在 inProcessRunner.ts 中,进程内队友完成时计算并设置 result (含 totalTokens/totalToolUseCount/content/usage),使详情弹窗可以 正确展示累计 token 消耗,不再仅依赖 progress.tokenCount 间歇更新。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win> * fix: 为 cacheWarningStateBySource Map 设置上限防止内存泄漏 Map 以 querySource 为 key 存储每个来源的缓存命中率历史状态, 但 querySource 类型为 `any`,长时间会话中可能产生大量唯一值, Map 持续增长永不清理。 新增 MAX_SOURCE_ENTRIES = 50 上限,新增条目时若达到上限则 逐出最早插入的条目(Map 按插入顺序迭代)。 同时也新增 _resetCacheWarningStateForTest() 用于测试隔离。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win> * fix: 为 sessionStorage existingSessionFiles Map 添加容量上限 existingSessionFiles Map 缓存 sessionId → 文件路径映射以避免重复 stat 调用,但在 coordinator/swarm 模式下,每个子代理产生独立 sessionId,长时间运行的 daemon 会话可能累积数千条目。 新增 MAX_CACHED_SESSION_FILES = 200 上限,新增条目时若达到上限则 逐出最早插入的条目。同时在 _resetFlushState() 中清除此缓存以保证 测试隔离。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win> --------- Co-authored-by: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
- 在 call() 中 checkPermissions 之前调用目标工具的 validateInput(),防止模型传入不完整参数导致崩溃(如 TeamCreate 缺少 team_name → sanitizeName(undefined).replace() TypeError) - renderToolUseMessage 从 "Executing TeamCreate..." 简化为 "TeamCreate",与其他工具样式一致 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
* fix: Gemini 适配器补全 usage 字段映射 Gemini API 的 usageMetadata 包含 cachedContentTokenCount 字段, 但此前未映射到 Anthropic 格式的 cache_read_input_tokens,导致 cache_creation_input_tokens 和 cache_read_input_tokens 始终为 0。 同时 message_delta 事件此前只携带 output_tokens,缺失 input_tokens、cache_creation_input_tokens、cache_read_input_tokens, 导致下游从 message_delta 读取最终 token 计数时获取不完整数据。 修复: - 新增 cachedContentTokenCount → cache_read_input_tokens 映射 - message_start 和 message_delta 携带完整四个 usage 字段 - cache_creation_input_tokens 保持为 0(Gemini API 无等价概念) Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win> * fix: 添加 cachedContentTokenCount 到 GeminiUsageMetadata 类型 streamAdapter.ts 使用 usage.cachedContentTokenCount 但该字段未 在 GeminiUsageMetadata 类型中声明。CodeRabbit 审查发现此问题。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win> --------- Co-authored-by: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
* feat: Grok 适配完善 — 防御性 usage 合并 + thinking 自动检测 1. 提取 updateOpenAIUsage 到共享模块 openaiShared.ts,供 OpenAI 和 Grok 两条路径复用,消除 Grok 中重复的 spread 漏洞。 2. 在 requestBody.ts 的 isOpenAIThinkingEnabled() 中增加 Grok 模型 自动检测(模型名含 "grok"),与 DeepSeek/MiMo 并列。 3. messaging 层的 reasoning_content 回传(openaiConvertMessages.ts) 和流解析(openaiStreamAdapter.ts)无需修改,Grok 与 DeepSeek/MiMo 共用相同的 reasoning_content 字段协议。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win> * fix: 回退 Grok 从 isOpenAIThinkingEnabled 的自动检测 Grok 推理模型(如 grok-4.20-reasoning)自动进行推理,不需要 thinking/enable_thinking 请求参数。发送这些参数虽大概率被忽略 (OpenAI SDK 透传 unknown keys),但属于不正确行为。 Co-Authored-By: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win> --------- Co-authored-by: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
原实现仅检查 Bedrock/Vertex/Foundry,遗漏了 OpenAI、Gemini、Grok 三个通过 CLAUDE_CODE_USE_* 环境变量切换的第三方 provider。 这导致: - 命令可用性判定中 OpenAI/Gemini/Grok 用户被错误识别为 console 用户 (/fast、/install-github-app 两个 Anthropic 专有命令误显示) - auth status 显示中这些用户被误报为"未登录" Co-authored-by: deepseek-v4-pro[1m] <deepseek-ai@claude-code-best.win>
* feat: 添加 /goal 命令,支持长时间运行任务的目标管理 从 Codex 项目移植 /goal 命令到 Claude Code,实现: - Goal 状态管理模块(active/paused/budget_limited/complete) - /goal 斜杠命令(set/clear/pause/resume/complete) - Goal 模型工具(get/set/complete) - Continuation prompt 自动注入系统提示 - Token 用量自动追踪 Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win> * fix: goal 状态改为 session-scoped,避免多会话泄漏 将 currentGoal 单例替换为 Map<string, GoalState>,按 sessionId 隔离, 遵循 sessionIngress.ts 的模式。所有函数支持可选 sessionId 参数。 Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win> * fix: 对 goal 的 tokenBudget/tokensUsed 添加数值校验 setGoal 中 tokenBudget 非 finite 或负数时归零; updateGoalTokens 中 usage 非 finite 或负数时归零。 Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win> * fix: 暂停期间 goal 时间不再继续计数 新增 pausedAt/accumulatedActiveMs 字段,pauseGoal 累积已活跃时间, resumeGoal 重置 startTime,计时统一使用 getActiveElapsedMs()。 Co-Authored-By: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win> --------- Co-authored-by: mimo-v2.5-pro <XiaomiMiMo@claude-code-best.win>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )