Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 35 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
# Claude Code Best V2 (CCB)
# Claude Code Best V3 (CCB)

Anthropic 官方 [Claude Code](https://docs.anthropic.com/en/docs/claude-code) CLI 工具的源码反编译/逆向还原项目。目标是将 Claude Code 大部分功能及工程化能力复现。虽然很难绷, 但是它叫做 CCB(踩踩背)...

[项目解析文档在这里, 还非常初期想要](https://ccb.agent-aura.top/)
[项目解析文档在这里, 支持投稿 PR](https://ccb.agent-aura.top/)

赞助商占位符

- [x] v1 会完成跑通及基本的类型检查通过;
- [x] V2 会完整实现工程化配套设施;
- [ ] Biome 格式化可能不会先实施, 避免代码冲突
- [x] 构建流水线完成, 产物 Node/Bun 都可以运行
- [ ] V3 会实现多层级解耦, 很多比如 UI 包, Agent 包都可以独立优化;
- [x] V3 会写大量文档, 完善文档站点
- [ ] V4 会完成大量的测试文件, 以提高稳定性

> 我不知道这个项目还会存在多久, fork 不好使, git clone 或者下载 .zip 包才稳健;
> 我不知道这个项目还会存在多久, Star + Fork + git clone + .zip 包最稳健;
>
> 这个项目更新很快, 后台有 Opus 持续优化, 所以你可以提 issues, 但是 PR 暂时不会接受;
>
> Claude 已经烧了 300$ 以上, 如果你个人想赞助, 请随便找个机构捐款, 然后截图在 issues, 大家的力量是温暖的;
> Claude 已经烧了 600$ 以上, 如果你个人想赞助, 请随便找个机构捐款, 然后截图在 issues, 大家的力量是温暖的;
>
> 某些模型提供商想要赞助, 那么请私发一个 1w 额度以上的账号到 <claude-code-best@proton.me>; 我们会在赞助商栏直接给你最亮的位置

Expand Down Expand Up @@ -52,7 +52,15 @@ bun run dev
bun run build
```

构建采用 code splitting 多文件打包(`build.ts`),产物输出到 `dist/` 目录(入口 `dist/cli.js` + 约 450 个 chunk 文件)。构建出的版本 bun 和 node 都可以启动, 你 publish 到私有源可以直接启动
构建采用 code splitting 多文件打包(`build.ts`),产物输出到 `dist/` 目录(入口 `dist/cli.js` + 约 450 个 chunk 文件)。

构建出的版本 bun 和 node 都可以启动, 你 publish 到私有源可以直接启动

如果遇到 bug 请直接提一个 issues, 我们优先解决

## 相关文档及网站

<https://deepwiki.com/claude-code-best/claude-code>

## Star History

Expand Down Expand Up @@ -107,9 +115,14 @@ bun run build
| BriefTool | ✅ | 简短消息 + 附件发送 |
| TaskOutputTool | ✅ | 后台任务输出读取 |
| TaskStopTool | ✅ | 后台任务停止 |
| ListMcpResourcesTool | ✅ | MCP 资源列表 |
| ReadMcpResourceTool | ✅ | MCP 资源读取 |
| SyntheticOutputTool | ✅ | 非交互会话结构化输出 |
| ListMcpResourcesTool | ⚠️ | MCP 资源列表(被 specialTools 过滤,特定条件下加入) |
| ReadMcpResourceTool | ⚠️ | MCP 资源读取(同上) |
| SyntheticOutputTool | ⚠️ | 仅在非交互会话(SDK/pipe 模式)下创建 |
| CronCreateTool | ✅ | 定时任务创建(已移除 AGENT_TRIGGERS gate) |
| CronDeleteTool | ✅ | 定时任务删除 |
| CronListTool | ✅ | 定时任务列表 |
| EnterWorktreeTool | ✅ | 进入 Git Worktree(`isWorktreeModeEnabled()` 已硬编码为 true) |
| ExitWorktreeTool | ✅ | 退出 Git Worktree |

### 工具 — 条件启用

Expand All @@ -121,8 +134,6 @@ bun run build
| TaskGetTool | ⚠️ | 同上 |
| TaskUpdateTool | ⚠️ | 同上 |
| TaskListTool | ⚠️ | 同上 |
| EnterWorktreeTool | ⚠️ | `isWorktreeModeEnabled()` |
| ExitWorktreeTool | ⚠️ | 同上 |
| TeamCreateTool | ⚠️ | `isAgentSwarmsEnabled()` |
| TeamDeleteTool | ⚠️ | 同上 |
| ToolSearchTool | ⚠️ | `isToolSearchEnabledOptimistic()` |
Expand All @@ -135,7 +146,6 @@ bun run build
| 工具 | Feature Flag |
|------|-------------|
| SleepTool | `PROACTIVE` / `KAIROS` |
| CronCreate/Delete/ListTool | `AGENT_TRIGGERS` |
| RemoteTriggerTool | `AGENT_TRIGGERS_REMOTE` |
| MonitorTool | `MONITOR_TOOL` |
| SendUserFileTool | `KAIROS` |
Expand All @@ -144,7 +154,7 @@ bun run build
| WebBrowserTool | `WEB_BROWSER_TOOL` |
| SnipTool | `HISTORY_SNIP` |
| WorkflowTool | `WORKFLOW_SCRIPTS` |
| PushNotificationTool | `KAIROS` |
| PushNotificationTool | `KAIROS` / `KAIROS_PUSH_NOTIFICATION` |
| SubscribePRTool | `KAIROS_GITHUB_WEBHOOKS` |
| ListPeersTool | `UDS_INBOX` |
| CtxInspectTool | `CONTEXT_COLLAPSE` |
Expand Down Expand Up @@ -186,7 +196,7 @@ bun run build
| `/extra-usage` | ✅ | 额外用量信息 |
| `/fast` | ✅ | 切换 fast 模式 |
| `/feedback` | ✅ | 反馈 |
| `/files` | ✅ | 已跟踪文件 |
| `/loop` | ✅ | 定时循环执行(bundled skill,可通过 `CLAUDE_CODE_DISABLE_CRON` 关闭) |
| `/heapdump` | ✅ | Heap dump(调试) |
| `/help` | ✅ | 帮助 |
| `/hooks` | ✅ | Hook 管理 |
Expand Down Expand Up @@ -240,7 +250,7 @@ bun run build
| `/proactive` | `PROACTIVE` / `KAIROS` |
| `/brief` | `KAIROS` / `KAIROS_BRIEF` |
| `/assistant` | `KAIROS` |
| `/bridge` | `BRIDGE_MODE` |
| `/remote-control` (alias `rc`) | `BRIDGE_MODE` |
| `/remote-control-server` | `DAEMON` + `BRIDGE_MODE` |
| `/force-snip` | `HISTORY_SNIP` |
| `/workflows` | `WORKFLOW_SCRIPTS` |
Expand All @@ -254,7 +264,7 @@ bun run build

### 斜杠命令 — ANT-ONLY(不可用)

`/tag` `/backfill-sessions` `/break-cache` `/bughunter` `/commit` `/commit-push-pr` `/ctx_viz` `/good-claude` `/issue` `/init-verifiers` `/mock-limits` `/bridge-kick` `/version` `/reset-limits` `/onboarding` `/share` `/summary` `/teleport` `/ant-trace` `/perf-issue` `/env` `/oauth-refresh` `/debug-tool-call` `/agents-platform` `/autofix-pr`
`/files` `/tag` `/backfill-sessions` `/break-cache` `/bughunter` `/commit` `/commit-push-pr` `/ctx_viz` `/good-claude` `/issue` `/init-verifiers` `/mock-limits` `/bridge-kick` `/version` `/reset-limits` `/onboarding` `/share` `/summary` `/teleport` `/ant-trace` `/perf-issue` `/env` `/oauth-refresh` `/debug-tool-call` `/agents-platform` `/autofix-pr`

### CLI 子命令

Expand Down Expand Up @@ -282,7 +292,7 @@ bun run build
| 服务 | 状态 | 说明 |
|------|------|------|
| API 客户端 (`services/api/`) | ✅ | 3400+ 行,4 个 provider |
| MCP (`services/mcp/`) | ✅ | 24 个文件,12000+ 行 |
| MCP (`services/mcp/`) | ✅ | 34 个文件,12000+ 行 |
| OAuth (`services/oauth/`) | ✅ | 完整 OAuth 流程 |
| 插件 (`services/plugins/`) | ✅ | 基础设施完整,无内置插件 |
| LSP (`services/lsp/`) | ⚠️ | 实现存在,默认关闭 |
Expand All @@ -299,17 +309,17 @@ bun run build

| 包 | 状态 | 说明 |
|------|------|------|
| `color-diff-napi` | ✅ | 997 行完整 TypeScript 实现(语法高亮 diff) |
| `audio-capture-napi` | | stub,`isNativeAudioAvailable()` 返回 false |
| `image-processor-napi` | | stub,`getNativeModule()` 返回 null |
| `modifiers-napi` | | stub,`isModifierPressed()` 返回 false |
| `color-diff-napi` | ✅ | 1006 行完整 TypeScript 实现(语法高亮 diff) |
| `audio-capture-napi` | | 151 行完整实现(跨平台音频录制,使用 SoX/arecord) |
| `image-processor-napi` | | 125 行完整实现(macOS 剪贴板图片读取,使用 osascript + sharp) |
| `modifiers-napi` | | 67 行完整实现(macOS 修饰键检测,bun:ffi + CoreGraphics) |
| `url-handler-napi` | ❌ | stub,`waitForUrlEvent()` 返回 null |
| `@ant/claude-for-chrome-mcp` | ❌ | stub,`createServer()` 返回 null |
| `@ant/computer-use-mcp` | | stub,`buildTools()` 返回 [] |
| `@ant/computer-use-input` | | stub,仅类型声明 |
| `@ant/computer-use-swift` | | stub,仅类型声明 |
| `@ant/computer-use-mcp` | ⚠️ | 类型安全 stub(265 行,完整类型定义但函数返回空值) |
| `@ant/computer-use-input` | | 183 行完整实现(macOS 键鼠模拟,AppleScript/JXA/CGEvent) |
| `@ant/computer-use-swift` | | 388 行完整实现(macOS 显示器/应用管理/截图,JXA/screencapture) |

### Feature Flags(30 个,全部返回 `false`)
### Feature Flags(31 个,全部返回 `false`)

`ABLATION_BASELINE` `AGENT_MEMORY_SNAPSHOT` `BG_SESSIONS` `BRIDGE_MODE` `BUDDY` `CCR_MIRROR` `CCR_REMOTE_SETUP` `CHICAGO_MCP` `COORDINATOR_MODE` `DAEMON` `DIRECT_CONNECT` `EXPERIMENTAL_SKILL_SEARCH` `FORK_SUBAGENT` `HARD_FAIL` `HISTORY_SNIP` `KAIROS` `KAIROS_BRIEF` `KAIROS_CHANNELS` `KAIROS_GITHUB_WEBHOOKS` `LODESTONE` `MCP_SKILLS` `PROACTIVE` `SSH_REMOTE` `TORCH` `TRANSCRIPT_CLASSIFIER` `UDS_INBOX` `ULTRAPLAN` `UPLOAD_USER_SETTINGS` `VOICE_MODE` `WEB_BROWSER_TOOL` `WORKFLOW_SCRIPTS`

Expand Down
218 changes: 0 additions & 218 deletions RECORD.md

This file was deleted.

Loading
Loading