claude-code-best
d04f83aa6b
docs: 清理 sandbox 文章中的源码路径引用
...
移除末尾的源码阅读路径推荐和文中的具体文件路径,
保留以设计分析为主的内容结构不变。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 11:07:27 +08:00
claude-code-best
8582fa66f9
docs: 重写 Feature Flags,从源码列举改为编译时门控设计分析
...
移除 TypeScript 代码和源码路径,
聚焦编译时求值的零运行时开销设计、三种使用模式
和死代码消除的打包体积优化。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 11:04:58 +08:00
claude-code-best
463059b270
docs: 重写 Ant 特权世界,从源码枚举改为身份门控设计分析
...
移除 TypeScript 代码和源码行号引用,
聚焦构建时常量折叠的死代码消除机制、
Beta Header 的端到端功能隔离和 ABLATION_BASELINE 的实验设计。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 11:03:55 +08:00
claude-code-best
cda7703ec4
docs: 重写扩展性三章(MCP配置/协议/自定义Agent)
...
移除 TypeScript 代码、源码路径和传输层实现细节,
聚焦多来源合并的企业管控设计、内置vs外部的架构一致性、
工具描述截断的防护和 disallowedTools 黑名单优先的安全思维。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 11:02:51 +08:00
claude-code-best
2b1953ce8a
docs: 重写 Skills,从源码解剖改为 Prompt 即能力的设计分析
...
移除 TypeScript 代码、源码路径和 16 个 frontmatter 字段枚举,
聚焦 Prompt 即能力的核心哲学、inline vs fork 的上下文权衡、
Safe Properties 正向安全设计和条件激活的按需发现。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 11:00:46 +08:00
claude-code-best
d9174fa230
docs: 重写 Hooks,从源码解剖改为扩展机制设计分析
...
移除 TypeScript 代码、源码路径和完整的 JSON schema,
聚焦四种 Hook 能力的递进设计、异步 Hook 的非阻塞考量、
工作区信任的纵深防御和 Session Hook 的生命周期隔离。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:59:41 +08:00
claude-code-best
b7d5c0e8c3
docs: 重写 Auto Mode,从源码解剖改为分类器设计分析
...
移除 TypeScript 代码、源码路径索引和 prompt 模板细节,
聚焦两阶段分类流水线的速度/准确性权衡、
危险权限剥离的设计哲学和降级到更安全行为的策略。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:58:24 +08:00
claude-code-best
f5c4ab333d
docs: 重写 Plan Mode,从源码解剖改为先看后做设计分析
...
移除 TypeScript 代码和源码路径,
聚焦两个审批节点的设计、基于属性而非名单的权限控制、
Prompt-based 权限的一揽子授权和计划文件可编辑的合约设计。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:57:18 +08:00
claude-code-best
ea0d78af5f
docs: 重写权限模型,从源码解剖改为三级权限设计分析
...
移除 TypeScript 代码和源码路径,
聚焦八层优先级的设计考量、三维度匹配的安全关注点、
deny 优先的设计哲学和 Denial Tracking 的死循环防护。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:56:09 +08:00
claude-code-best
0b98ee1f4c
docs: 重写 Worktree 隔离,从源码解剖改为文件隔离设计分析
...
移除 TypeScript 代码和源码路径,
聚焦三类冲突问题、快速恢复路径的设计洞察、
fail-closed 安全防护哲学和子 Agent 自动清理策略。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:55:01 +08:00
claude-code-best
cf05a3b28b
docs: 重写子 Agent,从源码解剖改为 Agent 路径设计分析
...
移除 TypeScript 代码和源码路径,
聚焦三种子 Agent 路径的设计权衡、Fork 缓存优化、
工具池隔离的权限独立性和异步生命周期的后台化机制。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:53:49 +08:00
claude-code-best
271fd840e9
docs: 重写协调者与蜂群,从源码解剖改为协作模式设计分析
...
移除 TypeScript 代码、源码路径和 7 种任务类型枚举,
聚焦 Coordinator 先理解再分配的设计哲学、
Swarm 竞争认领的并发安全和模式选择指南。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:52:28 +08:00
claude-code-best
79baf14a8f
docs: 重写任务管理,从源码解剖改为双轨架构设计分析
...
移除 TypeScript 代码和源码路径,
聚焦 V1/V2 双轨的设计权衡、验证推动的阈值考量、
双向依赖的查询优化和多 Agent 认领的并发控制。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:51:23 +08:00
claude-code-best
5849b8b7f4
docs: 重写 Shell 执行,从源码解剖改为安全设计分析
...
移除 TypeScript 代码和源码路径,
聚焦只读判定的复合命令处理、AST 解析的 fail-safe 策略、
自动后台化的阻塞预算设计和专用工具 vs shell 的权衡。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:50:12 +08:00
claude-code-best
46fecb590b
docs: 重写搜索与导航,从源码解剖改为搜索策略设计分析
...
移除 TypeScript 代码、源码路径和适配器实现细节,
聚焦结果排序的设计假设、token预算控制、
多后端搜索的适配器选型和 WebFetch 安全防护层。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:49:18 +08:00
claude-code-best
29859a84ff
docs: 重写文件操作,从源码解剖改为工具设计分析
...
移除 TypeScript 代码、源码路径和实现常量,
聚焦风险分级设计、引号标准化的AI能力边界补偿、
原子性读改写的竞态防御和行尾处理的智能陷阱教训。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:48:20 +08:00
claude-code-best
83f56ed425
docs: 重写工具系统,从35字段列举改为设计分析
...
移除 TypeScript 类型定义、源码路径和 buildTool 代码,
聚焦统一接口的设计洞察(动态描述、校验-权限分离、
渲染一等公民)、分层注册策略和调用链路的错误处理设计。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:47:13 +08:00
claude-code-best
5301e0ba43
docs: 重写系统提示词,从源码走读改为动态组装设计分析
...
移除全部 TypeScript 代码、源码路径和实现常量,
聚焦数组缓存驱动的架构选择、三阶段管道设计、
三种缓存模式的选择逻辑和 CLAUDE.md 多级合并的安全考量。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 10:46:04 +08:00
claude-code-best
fedce003a5
docs: 重写项目记忆,从源码走读改为记忆系统设计分析
...
移除源码路径、TypeScript 函数和实现常量,
增加文件 vs 数据库的选型对比表、四类型分类法的设计约束分析、
智能召回架构和记忆漂移防御的设计考量。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 09:33:03 +08:00
claude-code-best
b01cd1371f
docs: 重写上下文压缩,从源码走读改为压缩策略设计分析
...
移除全部 TypeScript 类型定义、源码路径和实现常量,
聚焦三层递进策略的设计哲学、保留窗口的三约束平衡、
工具对完整性保证和压缩后重新注入的设计洞察。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 09:11:18 +08:00
claude-code-best
b844f639f9
docs: 重写令牌预算,移除实现常量和重复代码片段
...
聚焦 token 管理的设计考量:两级计数策略、分层压缩(截断→微压缩→自动压缩)、
缓存感知的压缩设计和 slot 优化设计哲学。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 06:46:48 +08:00
claude-code-best
0e2023590f
docs: 重写多轮对话,从源码走读改为会话编排设计分析
...
移除 TypeScript 类型定义、写入队列流程图和函数签名,
聚焦 QueryEngine 的设计理由、持久化方案选型(JSONL vs DB vs JSON)、
成本追踪三层架构和模型热切换的解耦设计。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 03:52:58 +08:00
claude-code-best
66131a7b76
docs: 重写流式响应,移除 API 事件类型枚举和代码片段
...
从核心设计选择讲起(流式不只是打字机效果),
将错误处理重组为三层防护体系,
增加 Provider 适配策略对比表和设计考量分析。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 00:32:48 +08:00
claude-code-best
2d07ffd0ce
docs: 重写 Agent Loop,从源码走读改为设计分析
...
移除所有源码行号、TypeScript 类型定义和函数签名,
聚焦循环四个阶段的设计考量、错误恢复哲学和状态管理原理,
增加"为什么不是批量执行"的设计论证。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-20 00:17:25 +08:00
claude-code-best
c742018b15
docs: 重写架构总览,移除源码引用,聚焦设计考量
...
保留五层架构框架,将源码追踪改为设计意图分析。
增加层间通信原则、入口概览表和导航指引,
设计原则从 Accordion 展开为独立章节。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-19 23:41:03 +08:00
claude-code-best
2eeb3fd103
docs: 重写项目动机,聚焦设计决策的动机与权衡
...
移除"白皮书"和"逆向工程"定位,以五个核心设计决策为主线,
每个决策从问题→决策→代价三个维度展开,增加决策间相互影响分析。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-19 23:22:14 +08:00
claude-code-best
a031f892b3
docs: 重写项目介绍,聚焦工程设计与考量
...
从新人视角重新审视,移除代码实现细节(polyfill/MACRO注入),
增加设计原则分析、架构权衡讨论和导航指引。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-19 22:44:04 +08:00
claude-code-best
cf69382943
docs: 完成大纲的编写
2026-04-19 22:37:49 +08:00
claude-code-best
494eab7204
feat: 接入内建 weixin channel(同 #301 重构版本) ( #303 )
...
* feat: 接入 weixin 服务层与命令入口
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* feat: 注册内建 weixin channel 插件
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* fix: 修正 channel permission relay 路由与能力判定
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* fix: 修复 builtin channel 的 ChannelsNotice 误报
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* docs: 补充内建 weixin channel 使用说明
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* docs: 更新微信 channel 接入计划状态
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* fix: 延迟加载 weixin 登录二维码依赖
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* fix: 改用 qrcode 生成 weixin 登录二维码
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* fix: 修正 vite 构建的 Windows 路径解析
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent )
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
* chore: 删除临时规划文档 wx_channel.md 并还原 package.json 排序
wx_channel.md 内容已整合到 docs/features/channels.md,不再需要。
package.json 中 @ant/model-provider 位置从原始位置被无意移动,还原。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: 将 weixin 模块从 src/ 迁移至 packages/weixin 工作区包
将 src/services/weixin/ 中的纯业务逻辑迁入 @claude-code-best/weixin
workspace 包,降低 src/ 耦合度。仅保留 server.ts 作为薄适配层。
- 迁移 7 个无修改的纯模块 (types/api/accounts/login/pairing/media/send)
- monitor.ts 内联 PERMISSION_REPLY_RE 正则,解除对 src/ 的依赖
- permissions.ts 本地定义 ChannelPermissionRequestParams 接口
- cli.ts 拆分:serve 子命令通过回调注入,login/access 保留在包内
- server.ts 重写为从 @claude-code-best/weixin 导入
- 新增 cli-serve.ts 作为 serve 入口薄壳
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: 修正 weixin barrel export 中 interface 的导出方式
ChannelPermissionRequestParams 是纯类型,必须用 export type 导出,
否则 Bun 运行时会报 "export not found" 错误。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: 将 server.ts 迁入 packages/weixin,彻底移除 src/services/weixin/
通过依赖注入(WeixinServerDeps)解耦 src/ 依赖(analytics、config、
MCP channel schema),server.ts 完全移入包内。cli.tsx 入口处一次性
注入所有依赖。
src/services/weixin/ 目录已完全删除。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: 修复 markdownToPlainText 中代码块正则的 ReDoS 风险
用非正则的线性扫描替代 \`\`\`[\s\S]*?\n([\s\S]*?)\`\`\` 匹配,
避免在含有大量重复 \`\`\` 序列的输入上触发多项式回溯。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
---------
Co-authored-by: 1111 <11111@asd.c>
Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-19 21:33:27 +08:00
claude-code-best
481e2a58a9
feat: 恢复 --channels 能力 ( #297 )
...
* feat: 恢复 --channels 能力
* docs: 添加 channels 注释
2026-04-19 10:24:34 +08:00
claude-code-best
c5edee431f
docs: 文档检查/check 20260419 ( #296 )
...
* docs: 修复文档巡检发现的 4 处错误
- daemon.md: 反映实际实现状态(supervisor/worker 已实现而非 stub)
- bridge-mode.md: API 操作数量从 7 修正为 9
- web-search-tool.md: 文件路径从 src/tools/ 修正为 packages/builtin-tools/src/tools/
- remote-control-self-hosting.md: 补充缺失的 RCS_WS_IDLE_TIMEOUT 和 RCS_WS_KEEPALIVE_INTERVAL 配置项
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 Safety 和 Context 文档中的代码引用和类型错误
- permission-model: 修正规则来源从"五层"到八层,优先级顺序对齐代码
- permission-model: PermissionUpdate 类型改为实际的 addRules/replaceRules 等
- permission-model: 补充 acceptEdits 和 dontAsk 两种权限模式
- permission-model: DENIAL_LIMITS 字段名对齐实际代码
- plan-mode: 工具路径从 src/tools/ 改为 packages/builtin-tools/src/tools/
- compaction: 修正 COMPACTABLE_TOOLS 和 POST_COMPACT_* 的行号
- project-memory: 修正 ENTRYPOINT_NAME 常量的行号
- system-prompt: 修正 SystemPrompt 类型定义文件路径和多个行号引用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修复 introduction 文档中的错误路径和行号引用
- why-this-whitepaper.mdx: BashTool 路径从 src/tools/ 修正为 packages/builtin-tools/src/tools/
- what-is-claude-code.mdx: 移除不存在的 Azure provider,改为实际的 7 种 provider
- architecture-overview.mdx: State 类型行号从 204 修正为 207
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修复 conversation/features 文档中的错误
- streaming.mdx: queryStreamRaw → queryModelWithStreaming 函数名修正
- streaming.mdx: Azure 提供商不存在,替换为实际 7 个提供商
- debug-mode.mdx: --inspect-wait 描述错误,实际使用 BUN_INSPECT 环境变量
- buddy.mdx: 补充缺失的 companionReact.ts、CompanionCard.tsx、index.ts
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修复文档巡检中的源码引用错误
- feature-flags.mdx: 修正 feature() 兜底描述,实际从 bun:bundle 导入而非 cli.tsx:3 内联
- feature-flags.mdx: 修正工具 require 路径为 @claude-code-best/builtin-tools 包路径
- ant-only-world.mdx: 修正 tools.ts 中 require 路径为包路径
- ant-only-world.mdx: 修正 INTERNAL_ONLY_COMMANDS 行号 (267-295) 和数量 (24+)
- skills.mdx: 修正 COMMANDS memoize 行号 258 → 299
- mcp-protocol.mdx: 修正 fetchToolsForClient LRU 缓存上限 20 → 100
- streaming.mdx: 修正流式事件引用
- file-operations.mdx: 修正工具路径引用
- search-and-navigation.mdx: 修正搜索工具引用
- shell-execution.mdx: 修正 shell 工具引用
- buddy.mdx: 补充缺失的 frontmatter 字段
- debug-mode.mdx: 修正调试模式描述
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 tools/agent 文档中的文件路径和行号引用
- 修正 TodoWriteTool、AgentTool、ToolSearchTool 等工具路径
src/tools/ → packages/builtin-tools/src/tools/
- 更新 Tool.ts、tools.ts、BashTool.tsx 中过时的行号引用
- 修正 WebSearchTool/WebFetchTool/EnterWorktreeTool/ExitWorktreeTool 路径
- 修正 AgentTool.tsx 中多行行号引用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 feature 文档中的文件路径和行号引用
- ultraplan.md: 更新文件行数(525/349/127)
- fork-subagent.md: 路径迁移 src/tools/ → packages/builtin-tools/
- mcp-skills.md: 修正 getMcpSkillCommands 行号 547→604,client.ts 行号 117→129
- kairos.md: 修正 getBriefSection/getProactiveSection 行号
- proactive.md: 修正 getProactiveSection 行号 860→864
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正顶层文档中的路径迁移和行号引用
- auto-updater.md: config.ts 行号 1735→1737,标注未接入启动流程的函数
- external-dependencies.md: WebSearchTool/WebFetchTool 路径迁移到 builtin-tools 包,Vertex 行号修正
- lsp-integration.md: LSPTool 路径从 src/tools/ 迁移到 packages/builtin-tools/
- stub-recovery-design-1-4.md: 修正 Windows 绝对路径链接为标准代码引用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 task 文档中的文件扩展名和路径引用
- task-004: AssistantSessionChooser.ts → .tsx, assistant.ts → .tsx
- task-003: cli.tsx 行号 249→272, markdownConfigLoader.ts 行号 29→35
- lan-pipes: SendMessageTool 路径迁移到 packages/builtin-tools/
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 补充 computer-use-tools-reference 缺失的 Windows 工具
添加遗漏的 open_terminal 和 activate_window 两个 Windows 专属工具,
修正工具总数 37→39,Windows 工具数 10→12。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 audit/bash-classifier/token-budget/tree-sitter 文档
- feature-flags-audit: ScheduleCronTool 路径迁移、DAEMON 状态更新为 COMPLETE、assistant 文件标记已补全、UDS 标记已实现
- bash-classifier: BashPermissionRequest 文件路径修正、withRetry 行号移除
- token-budget: attachments.ts 行号范围修正
- tree-sitter-bash: bashPermissions.ts 路径迁移到 packages/builtin-tools
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 langfuse-monitoring AgentTool 路径迁移
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 bridgeApi 行号和 Tool.ts 行号引用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 Safety/Extensibility 文档中的工具路径迁移和行号引用
- sandbox.mdx: shouldUseSandbox.ts 和 bashPermissions.ts 路径迁移至 packages/builtin-tools
- why-safety-matters.mdx: bashPermissions.ts 路径迁移(3 处)
- plan-mode.mdx: EnterPlanModeTool/prompt.ts 路径迁移
- auto-mode.mdx: Auto mode 指令行号 3464→3481
- hooks.mdx: AgentTool/runAgent.ts 路径迁移
- skills.mdx: SkillTool.ts 路径迁移
- custom-agents.mdx: Agent built-in 目录和 exploreAgent.ts 路径迁移
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 internals 文档引用计数和路径
- ant-only-world: USER_TYPE 引用计数 465→410+,工具路径迁移到 builtin-tools
- growthbook-ab-testing: growthbook.ts 行数 1156→1258
- hidden-features: 语音模式状态更新(audio-napi 已恢复)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正工具文档中的行号引用
- sub-agents: AgentTool.call 入口行号 340→387
- shell-execution: ShellCommand onTimeout 行号 129→144
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 feature 文档中的状态、路径和计数
- all-features-guide: 修正 feature flag 启用范围(dev only vs dev+build)
- tier3-stubs: 大量状态修正(stub→已实现),缩减过时条目
- workflow-scripts: 路径迁移到 builtin-tools,状态更新
- web-browser-tool: 工具状态缺失→已实现,路径迁移
- context-collapse: CtxInspectTool 状态缺失→已实现
- computer-use: 行号引用更新,平台分发描述修正
- computer-use-tools-reference: 工具数 39→38
- voice-mode: voiceModeEnabled 行数 55→54
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 更新 the-loop 查询循环行号引用
query.ts 代码变更后终止原因行号整体偏移约 40 行
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 补充 feature-flags-audit 完整 build 默认 feature 列表
添加 ULTRATHINK/LODESTONE/ACP/DAEMON 等 19 个缺失的 build 默认 feature,
修正 dev-only 特征标注(UDS_INBOX/LAN_PIPES/BG_SESSIONS/TEMPLATES)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 feature-flags-audit ConfigTool 路径迁移
ConfigTool 路径从 src/tools/ 迁移到 packages/builtin-tools/src/tools/
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 feature-flags-audit BashTool 路径迁移
BashTool 路径从 src/tools/ 迁移到 packages/builtin-tools/src/tools/
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 修正 feature-flags-audit SkillTool 路径迁移
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 更新 feature-flags-audit WorkflowTool 状态为已实现
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-19 09:30:00 +08:00
claude-code-best
2e9aaf4993
feat: ACP 协议版本 remote control ( #293 )
...
* fix: 添加 usage 字段缺失时的防御性防护
第三方 API(如智谱 GLM)在某些流式响应中不返回 usage 字段,
导致 usage.input_tokens 访问 undefined 崩溃并连锁影响后续所有请求。
- claude.ts: content_block_stop 创建消息时 fallback 到 EMPTY_USAGE
- LocalAgentTask.tsx: usage 为 undefined 时提前返回
- tokens.ts: getTokenCountFromUsage 加 null guard 和 ?? 0
- cost-tracker.ts: input_tokens/output_tokens 加 ?? 0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: ACP Plan 展示 — 支持 session/update plan 类型的可视化
补全 PlanUpdate 类型定义(PlanEntry/Priority/Status),新建 PlanView 组件
渲染进度条、状态图标和优先级标签,在 ChatInterface 中处理 plan 更新逻辑。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: 穷鬼模式下跳过 verification agent 以节省 token
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* test: 补充 RCS 后端 + 前端测试覆盖 (+116 tests)
后端新增 3 个测试文件 (70 tests):
- automationState: normalize/snapshot/equals 纯函数
- client-payload: toClientPayload 协议转换
- transport-normalize: normalizePayload + extractContent
前端新增 2 个测试文件 (46 tests):
- utils: formatTime/statusClass/truncate/extractEventText 等
- api-client: getUuid/setUuid/api GET/POST 错误处理
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: RCS ACP 页面添加权限模式选择器 + 权限响应修复
- 新增权限模式选择器 UI(6种模式:默认/自动接受编辑/跳过权限/规划/不询问/自动判断)
- 权限模式通过 ACP _meta 从 web → acp-link → agent 全链路传递
- 修复 PermissionPanel 点击"允许"发送 cancelled 而非 selected 的 bug
- 权限模式和模型选择持久化到 localStorage
- acp-link 直接连接路径同步支持 permissionMode 透传
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: RCS Web UI 重构 + QR 修复 + ACP 扫描自动跳转
- RCS Web UI 组件全面重构: Dialog 迁移 Radix UI, lazy loading,
主题系统改进, 组件样式优化
- IdentityPanel QR 码显示修复: requestAnimationFrame 延迟绘制
解决 Radix Dialog Portal 挂载时序问题
- ACP QR 扫描自动跳转: IdentityPanel 扫描 ACP 格式 { url, token }
后存储 sessionStorage 并跳转 /code/?acp=1
- 新增 ACPDirectView 组件: ACP 直连视图, 用 ACPClient 连接并
渲染 ACPMain 聊天界面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: ACP 权限管道改进 — 模式同步 + bypass 检测 + 统一权限流水线
- agent.ts: applySessionMode 同步 appState.toolPermissionContext.mode
- agent.ts: bypassPermissions 可用性检测 (非 root 或 sandbox 环境)
- permissions.ts: createAcpCanUseTool 接入 hasPermissionsToUseTool
统一权限流水线, 替代原来分散的处理逻辑
- permissions.ts: 支持 onModeChange 回调, 模式变更时实时同步
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: acp-link 支持 permissionMode 默认值传递给 agent
客户端 (Zed/VS Code 等) 的 new_session 不一定携带 permissionMode,
导致 agent 收到 _meta: undefined, permission 回退到 default。
修复: handleNewSession 使用 fallback 链:
客户端传值 > config.permissionMode > ACP_PERMISSION_MODE 环境变量
使用: ACP_PERMISSION_MODE=auto acp-link claude
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 更新文档及说明
* fix: 修复类型错误
* chore: 提交脚本
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-18 21:54:22 +08:00
Cheng Zi Feng
72a2093cd6
feat(remote-control): 优化 Web 展示、状态同步与桥接控制流程 ( #288 )
...
Co-authored-by: chengzifeng <chengzifeng@meituan.com >
2026-04-17 16:21:27 +08:00
claude-code-best
bddd146f25
feat: 重构供应商层次 ( #286 )
...
* refactor: 创建 @anthropic-ai/model-provider 包骨架与类型定义
- 新建 workspace 包 packages/@anthropic-ai/model-provider
- 定义 ModelProviderHooks 接口(依赖注入:分析、成本、日志等)
- 定义 ClientFactories 接口(Anthropic/OpenAI/Gemini/Grok 客户端工厂)
- 搬入核心类型:Message 体系、NonNullableUsage、EMPTY_USAGE、SystemPrompt、错误常量
- 主项目 src/types/message.ts 等改为 re-export,保持向后兼容
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: 提升 OpenAI 转换器和模型映射到 model-provider 包
- 搬入 OpenAI 消息转换(convertMessages)、工具转换(convertTools)、流适配(streamAdapter)
- 搬入 OpenAI 和 Grok 模型映射(resolveOpenAIModel、resolveGrokModel)
- 主项目文件改为 thin re-export proxy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: 搬入 Gemini 兼容层到 model-provider 包
- 搬入 Gemini 类型定义、消息转换、工具转换、流适配、模型映射
- 主项目 gemini/ 目录下文件改为 thin re-export proxy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: 搬入 errorUtils 并迁移消费者导入到 model-provider
- 搬入 formatAPIError、extractConnectionErrorDetails 等 errorUtils
- 迁移 10 个消费者文件直接从 @anthropic-ai/model-provider 导入
- 更新 emptyUsage、sdkUtilityTypes、systemPromptType 为 re-export proxy
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: compact 模型降级为 -1 模式(Opus→Sonnet, Sonnet→Haiku)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* docs: 添加 agent-loop 绘图
* Revert "feat: compact 模型降级为 -1 模式(Opus→Sonnet, Sonnet→Haiku)"
This reverts commit e458d6391d .
* docs: 添加简化版 agent loop
* fix: 修复 n 快捷键导致关闭的问题
* fix: 修复 node 下 ws 没打包问题
* docs: 修复链接
* test: 添加测试支持
* fix: 修复类型问题(#267 ) (#271 )
* fix: 修复 Bun 的 polyfill 问题
* fix: 类型修复完成
* feat: 统一所有包的类型文件
* fix: 修复构建问题
* test: 修复类型校验 (#279 )
* fix: 修复 Bun 的 polyfill 问题
* fix: 类型修复完成
* feat: 统一所有包的类型文件
* fix: 修复构建问题
* fix(remote-control): harden self-hosted session flows (#278 )
Co-authored-by: chengzifeng <chengzifeng@meituan.com >
* docs: update contributors
* build: 新增 vite 构建流程
* feat: 添加环境变量支持以覆盖 max_tokens 设置
* feat(langfuse): LLM generation 记录工具定义
将 Anthropic 格式的工具定义转换为 Langfuse 兼容的 OpenAI 格式,
并在 generation 的 input 中以 { messages, tools } 结构传入,
以便在 Langfuse UI 中查看完整的工具定义信息。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* feat: 添加对 ACP 协议的支持 (#284 )
* feat: 适配 zed acp 协议
* docs: 完善 acp 文档
* chore: 1.4.0
* conflict: 解决冲突
* feat: 添加测试覆盖率上报
* style: 改名加移动文件夹位置
* refactor: 移动测试用例及实现
* test: 修复测试用例完成
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
Co-authored-by: Cheng Zi Feng <1154238323@qq.com >
Co-authored-by: chengzifeng <chengzifeng@meituan.com >
Co-authored-by: claude-code-best <272536312+claude-code-best@users.noreply.github.com >
2026-04-17 09:33:14 +08:00
claude-code-best
c8d08d235b
Feat/integrate lint preview ( #285 )
...
* feat: 适配 zed acp 协议
* docs: 完善 acp 文档
* feat: integrate feature branches + daemon/job 命令层级化 + 跨平台后台引擎
Cherry-picked from origin/lint/preview (637c908 ), excluding lint-only changes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: correct detectMimeFromBase64 to decode raw bytes from base64
Cherry-picked from origin/lint/preview (ee36954 ).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: daemon 子进程 spawn 跨平台修复 + CliLaunchSpec 集中化重构
Cherry-picked from origin/lint/preview (c5f52cd ), excluding lint-only formatting changes.
- 新建 src/utils/cliLaunch.ts: 集中化 CLI 子进程启动层
- 修复 --daemon-worker=kind 等号格式解析
- 修复 daemon/bg fast path 缺少 setShellIfWindows()
- 修复 checkPathExists 用 existsSync 替代 execSync('dir')
- 7 个 spawn 站点迁移到 CliLaunchSpec
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: merge tsconfig.base.json into tsconfig.json with full compiler options
The cherry-pick from 637c908 dropped jsx/strict/etc settings when removing
tsconfig.base.json. This commit restores them in a single tsconfig.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: merge tsconfig.base.json into tsconfig.json with full compiler options
The cherry-pick from 637c908 dropped jsx/strict/etc settings when removing
tsconfig.base.json. This commit restores them in a single tsconfig.json.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-16 20:59:29 +08:00
claude-code-best
3cb1e50b25
feat: 添加对 ACP 协议的支持 ( #284 )
...
* feat: 适配 zed acp 协议
* docs: 完善 acp 文档
2026-04-16 20:31:50 +08:00
Cheng Zi Feng
fe08cacf8d
fix(remote-control): harden self-hosted session flows ( #278 )
...
Co-authored-by: chengzifeng <chengzifeng@meituan.com >
2026-04-16 10:46:31 +08:00
claude-code-best
2273a0bcfe
docs: 修复链接
2026-04-14 21:19:36 +08:00
claude-code-best
dad3ad2b8d
docs: 添加浏览器说明支持
2026-04-13 21:22:41 +08:00
claude-code-best
2fb1c9dcd8
feat: 工具层及 mcp 大重构 ( #252 )
...
* feat: 第一版大重构
* fix: 修复类型问题
* chore: 更新版本到 1.3.2
* Add brave as alternative WebSearchTool
* fix: 修正顺序
* fix: 修复对穷鬼模式的 auto dream 和 session memory 越过
* feat: 穷鬼模式去除 session-summary
* feat: 创建 builtin-tools 包,搬运所有工具实现
将 src/tools/ 下的全部 60 个工具目录迁移至 packages/builtin-tools/src/tools/,
内部导入路径已更新为 src/ alias 模式。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: 更新 src/ 中所有工具引用至 builtin-tools 包,删除 src/tools/
- src/tools.ts 及 178 个 src/ 文件的 import 路径从 ./tools/ 改为 builtin-tools/tools/
- 删除 src/tools/ 整个目录(已迁移至 packages/builtin-tools/)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* chore: 添加 builtin-tools 路径别名至 tsconfig,更新 bun.lock
- tsconfig.json 新增 builtin-tools/* 和 builtin-tools 路径映射
- 新增 packages/builtin-tools/src 至 include
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* refactor: 为 builtin-tools、mcp-client、agent-tools 添加 @claude-code-best 作用域前缀
所有包名及 import 路径统一添加 @claude-code-best/ 前缀:
- builtin-tools → @claude-code-best/builtin-tools
- mcp-client → @claude-code-best/mcp-client
- agent-tools → @claude-code-best/agent-tools
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: 修复 node 环境没有 bun 的问题
---------
Co-authored-by: Eric-Guo <eric.guocz@gmail.com >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-13 09:52:05 +08:00
Eric-Guo
711440474c
Add brave as alternative WebSearchTool
2026-04-12 22:23:11 +08:00
claude-code-best
14c46df881
docs: 清理垃圾文档
2026-04-12 17:32:28 +08:00
Dosion
e0e4ee41c2
docs: add complete features guide and rewrite LAN Pipes docs ( #246 )
...
- Add docs/features/all-features-guide.md — comprehensive guide covering
all 18 features across 13 PRs (Buddy, Remote Control, Voice, Chrome,
Computer Use, GrowthBook, Ultraplan, Daemon, Pipe IPC, LAN Pipes,
Monitor, Workflow, Coordinator, Proactive, History/Snip, Fork, etc.)
- Rewrite docs/features/lan-pipes.md — user-facing guide with step-by-step
quickstart, firewall config (Windows/macOS/Linux), command reference,
keyboard shortcuts, routing modes, permission forwarding, FAQ
- Rewrite docs/features/lan-pipes-implementation.md — developer reference
with updated architecture (hook extraction, ndjsonFramer, module singletons),
corrected code references, NDJSON protocol spec, attach flow sequence
Co-authored-by: unraid <local@unraid.local >
2026-04-12 11:37:51 +08:00
claude-code-best
423f114db6
docs: 更新 langfuse 文档
2026-04-11 23:53:21 +08:00
claude-code-best
09fc515edb
feat: 远程群控 ( #243 )
...
* feat: restore pipe IPC, LAN pipes, monitor tool, and PR-package features
Core IPC system (UDS_INBOX):
- PipeServer/PipeClient with UDS + TCP dual transport, NDJSON protocol
- PipeRegistry: machineId-based role assignment, file locking
- Master/slave attach, prompt relay, permission forwarding
- Heartbeat lifecycle with parallel isPipeAlive probes
- Commands: /pipes, /attach, /detach, /send, /claim-main, /pipe-status
LAN Pipes (LAN_PIPES):
- UDP multicast beacon (224.0.71.67:7101) for zero-config LAN discovery
- PipeServer TCP listener, PipeClient TCP connect mode
- Heartbeat auto-attaches LAN peers via TCP
- Cross-machine attach allowed regardless of role
- /pipes shows [LAN] peers with role + hostname/IP
- SendMessageTool supports tcp: scheme with user consent
Architecture — extracted hooks from REPL.tsx (~830 lines → ~20 lines):
- usePipeIpc: lifecycle (bootstrap, handlers, heartbeat, cleanup)
- usePipeRelay: slave→master message relay via module singleton
- usePipePermissionForward: permission request/cancel forwarding
- usePipeRouter: selected pipe input routing with role+IP labels
- Shared ndjsonFramer.ts replaces 3 duplicate NDJSON parsers
Key fixes applied during development:
- Multicast binds to correct LAN interface (not WSL/Docker)
- Beacon ref stored as module singleton (not Zustand state mutation)
- Heartbeat preserves LAN peers in discoveredPipes and selectedPipes
- Disconnect handler calls removeSlaveClient (fixes listener leak)
- cleanupStaleEntries probes without lock, writes briefly under lock
- getMachineId uses async execFile (not blocking execSync)
- globalThis.__pipeSendToMaster replaced with setPipeRelay singleton
- M key only toggles route mode when selector panel is expanded
- User prompt displayed in message list on pipe broadcast
- Broadcast notifications show [role] + hostname/IP for LAN peers
Other restored features:
- Monitor tool: /monitor command, MonitorTool, MonitorMcpTask lifecycle
- Daemon supervisor and remoteControlServer command
- Tools: SnipTool, SleepTool, ListPeersTool, SendUserFileTool,
WebBrowserTool, WorkflowTool, and 10+ stub→implementation rewrites
- Feature flags: UDS_INBOX, LAN_PIPES, MONITOR_TOOL, FORK_SUBAGENT,
KAIROS, COORDINATOR_MODE, WORKFLOW_SCRIPTS, HISTORY_SNIP
Tests: 2190 pass / 0 fail (15 new: lanBeacon 7, peerAddress 8)
* fix: resolve merge conflicts and fix all tsc/test errors after main merge
- Export ToolResultBlockParam from Tool.ts (14 tool files fixed)
- Migrate ink imports from ../../ink.js to @anthropic/ink (7 files)
- Fix toolUseID → toolUseId typo in monitor.ts and MonitorTool.tsx
- Add fallback values for string|undefined type errors (8 locations)
- Fix AppState type in assistant.ts, add NewInstallWizard stubs
- Fix ParsedRepository.repo → .name in subscribe-pr.ts
- Fix AgentId/string type mismatch in BackgroundTasksDialog.tsx
- Fix PipeRelayFn return type in pipePermissionRelay.ts
- Use PipeMessage type in usePipeRelay.ts
- Fix lanBeacon.test.ts mock type assertions
- Create missing MouseActionEvent class for ink package
- Use ansi: color format instead of bare "green"/"red"
- Resolve theme.permission access via getTheme()
Result: 0 tsc errors, 2496 tests pass, 0 fail
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
* fix: 恢复 /poor 的说明
---------
Co-authored-by: unraid <local@unraid.local >
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com >
2026-04-11 23:22:55 +08:00
CyberScrubber
81073135e2
docs: 审校 Agent 文档术语与架构描述准确性(docs/agent) ( #231 )
...
基于源码验证和官方文档对照,修正三份 Agent 文档的内容准确性:
coordinator-and-swarm.mdx:
- 对齐官方术语:Leader→Team Lead, teammate→Teammate, 引入 Mailbox 消息系统
- 修正 Swarm 门控为 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1(原文"默认启用"不准确)
- 拓扑描述改为"星型+P2P混合"(官方有 Team Lead 角色,非纯网状)
- 新增架构组件表、Mailbox 消息系统、Hook 事件(TeammateIdle/TaskCreated/TaskCompleted)、限制说明
- 新增持久化存储路径(~/.claude/teams/, ~/.claude/tasks/)
- 移除虚构的"高水位标记"(claimTask 仅使用文件锁)
- 修正 Scratchpad 描述(Workers 获得,非 Coordinator 拥有)
- 修复引号不匹配
sub-agents.mdx:
- 修正为三路径路由(命名 Agent / Fork / GP 回退),原文仅两种
- 补充 isForkSubagentEnabled() 三前提(feature flag + 非Coordinator + 非非交互式)
- 新增模型解析优先级(4级链 + inherit 运行时解析)
- 新增内置 Agent 表(Explore/Plan/GP/statusline-setup/claude-code-guide)
- 新增 Hook 事件表(frontmatter + settings.json 双级别)
- 补充异步生命周期完整链路(finalizeAgentTool → getWorktreeResult)
- 补充 transcript 存储路径和结果格式细节
worktree-isolation.mdx:
- 区分 createWorktreeForSession vs createAgentWorktree 两种函数
- 修正清理机制为 cleanupWorktreeIfNeeded(非 ExitWorktreeTool 手动操作)
- 补充 usedSparsePaths 字段
2026-04-10 18:00:42 +08:00
claude-code-best
dfce6d02f9
docs: 更新私有部署文档
2026-04-09 22:03:54 +08:00
CyberScrubber
8b2532a9c1
docs: fix documentation deviations from source code ( #220 )
...
* docs: 修正 docs/conversation 文档与源码的偏差(multi-turn/streaming/the-loop)
- multi-turn: TranscriptWriter→Project 私有类, 会话路径改用 sanitized-cwd,
补充 StoredCostState.lastDuration 字段, 模型切换改为 setModel(),
QueryEngine 状态补全 loadedNestedMemoryPaths/hasHandledOrphanedPermission,
行号改为符号引用
- streaming: STALL_THRESHOLD_MS 10s→30s, 新增 90s 主动空闲看门狗描述,
非流式降级补充 didFallBackToNonStreaming/executeNonStreamingRequest,
行号改为符号引用
- the-loop: 终止条件 7→11, 继续条件重整为 5 组层级结构,
max_output_tokens 拆分 escalate/recovery 子阶段,
prompt-too-long 拆分 collapse_drain/reactive_compact 子策略,
State 类型修正 autoCompactTracking 为可选, 行号改为符号引用
- 全部: 添加 sourceRef 版本锚定(3ec5675 )
* docs: 修正 docs/extensibility 文档与源码的偏差(custom-agents/hooks/skills)
- custom-agents: Verification 模型修正为 inherit, 补充 Plugin Agent 字段限制
(permissionMode/hooks/mcpServers 被安全忽略, isolation 仅 worktree),
加载流程修正为 6 层优先级, 补充 memory snapshot 门控条件
- hooks: 事件数 22→27(补充 Notification), Hook 类型定义位置修正为 3 个文件,
行号改为符号引用, Zod schema 范围修正, 去重键修正为四部分复合键,
registerFrontmatterHooks/clearSessionHooks 区分定义位置和调用位置
- skills: 字段数 17→16, 权限层级 4→5(补充 remote canonical auto-allow),
SAFE_SKILL_PROPERTIES 28→30, skillUsageTracking 路径修正,
行号改为符号引用
- mcp-protocol: 全部验证通过, 无需修改
- 全部: 添加 sourceRef 版本锚定(3ec5675 )
* Revert "docs: 修正 docs/extensibility 文档与源码的偏差(custom-agents/hooks/skills)"
* docs: 修正 docs/extensibility 文档与源码的偏差(hooks/skills/mcp-protocol)
hooks:
- 事件数 22→27(补充 Notification 事件)
- Hook 类型定义位置修正为 3 个文件分布
(schemas/hooks.ts / types/hooks.ts / utils/hooks/sessionHooks.ts)
- Zod schema 引用从硬编码行号改为符号引用
- hookSpecificOutput 表从 6 扩展至 15 个事件
(补全 permissionDecisionReason / PostToolUseFailure / SubagentStart 等)
- 去重键从 pluginRoot\0command 修正为四部分复合键
(pluginRoot\0shell\0command\0ifCondition)
- 全部硬编码行号改为符号引用以避免版本漂移
skills:
- parseSkillFrontmatterFields 字段数 17→16
- SAFE_SKILL_PROPERTIES 属性数 28→30
- checkPermissions 层级 4→5
- 第 2 层描述从"官方市场"修正为"远程 canonical"
mcp-protocol:
- 配置层级从"三级"修正为
"enterprise 独占或合并 user/project/local + plugin + claude.ai"
* docs: 修正 system-prompt.mdx 中 Boundary 章节的层级与可读性
- Boundary 插入条件从 ### 降为 blockquote,不再打断三种分块模式的并列结构
- 表格中 Boundary 缓存策略列补充说明其分割作用
- 新增 Boundary 概念释义(blockquote),解释其分割静态区/动态区以实现全局缓存的设计意图
2026-04-09 17:53:11 +08:00
CyberScrubber
73a18c30db
docs: 完善上下文工程核心定义与架构说明(docs/context) Provider 系统、Boundary 条件及兼容层说明 ( #204 )
...
- system-prompt.mdx: 新增 Provider 概述(1P/3P)与 Boundary 插入条件
- system-prompt.mdx: 新增 OpenAI/Gemini 兼容层章节
- compaction.mdx: 修正 COMPACTABLE_TOOLS 示例并补充 Microcompact 类型
- token-budget.mdx: 补充 3P Provider Token 计数差异说明
2026-04-08 18:09:26 +08:00
bonerush
91ee1428fa
Fix bug OpenAI tooluse,Improve error messaging for deferred-loading tools under OpenAI‑compatible models. ( #199 )
...
* fix: reorder tool and user messages for OpenAI API compatibility (#168 )
Fixes #168
OpenAI requires that an assistant message with tool_calls be immediately
followed by tool messages. Previously, convertInternalUserMessage
output user content before tool results, causing 400 errors.
Now tool messages are pushed first.
* fix: 修复OpenAI兼容层中deferred tools处理问题
提交描述:
修复了在使用OpenAI兼容API时TaskCreate工具调用失败的问题。
问题:
- 当使用OpenAI兼容API模型时,调用TaskCreate工具出现"InputValidationError: The required
parameter `subject` is missing"错误
- OpenAI兼容层没有正确处理deferred tools的过滤逻辑,导致工具schema没有被正确发送给模型
修复:
1. 在OpenAI兼容层中添加了与Anthropic API路径一致的deferred tools处理逻辑
2. 导入必要的工具搜索相关函数: isToolSearchEnabled, extractDiscoveredToolNames,
isDeferredTool等
3. 实现工具过滤逻辑:
- 检查工具搜索是否启用
- 构建deferred tools集合
- 过滤工具列表: 只包含非deferred工具或已发现的deferred工具
- 为deferred tools设置deferLoading标志
4. 修正了extractDiscoveredToolNames函数的导入路径错误
影响:
- 解决了TaskCreate工具调用时的参数验证错误
- 确保OpenAI兼容层与Anthropic API路径在处理deferred tools时行为一致
- 支持工具搜索功能在OpenAI兼容模式下正常工作
修改的文件:
- src/services/api/openai/index.ts - 主要修复文件
测试建议:
1. 使用OpenAI兼容API模型时,TaskCreate工具应该可以正常调用
2. 如果工具搜索功能启用,可能需要先使用ToolSearchTool来发现TaskCreate工具
3. 验证工具调用时不再出现"InputValidationError"错误
这个修复确保了当使用OpenAI兼容API(如Ollama、DeepSeek、vLLM等)时,deferred
tools(如TaskCreate)能够被正确处理,解决了工具调用失败的问题。
* fix: 更新工具模式未发送提示,增加OpenAI兼容模型使用指南
2026-04-08 18:08:59 +08:00