Skip to content

Commit 8e4aea4

Browse files
docs: 维护两个新的文档
1 parent 5278ce1 commit 8e4aea4

4 files changed

Lines changed: 156 additions & 8 deletions

File tree

README.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
- [x] 构建流水线完成, 产物 Node/Bun 都可以运行
1313
- [x] V3 会写大量文档, 完善文档站点
1414
- [x] V4 会完成大量的测试文件, 以提高稳定性
15-
- [x] Buddy 小宠物回来啦
16-
- [x] Auto Mode 回归
15+
- [x] Buddy 小宠物回来啦 [文档](https://ccb.agent-aura.top/docs/features/buddy)
16+
- [x] Auto Mode 回归 [文档](https://ccb.agent-aura.top/docs/safety/auto-mode)
1717
- [x] 所有 Feature 现在可以通过环境变量配置, 而不是垃圾的 bun --feature
1818
- [x] V5 支持企业级的监控上报功能, 补全缺失的工具, 解除限制
1919
- [x] 移除牢 A 的反蒸馏代码!!!
20-
- [x] 补全 web search 能力(用的 Bing 搜索)!!!
21-
- [x] 支持 Debug
20+
- [x] 补全 web search 能力(用的 Bing 搜索)!!! [文档](https://ccb.agent-aura.top/docs/features/web-browser-tool)
21+
- [x] 支持 Debug [文档](https://ccb.agent-aura.top/docs/features/debug-mode)
2222
- [x] 关闭自动更新;
23-
- [x] 添加自定义 sentry 错误上报支持
24-
- [x] 添加自定义 GrowthBook 支持 (GB 也是开源的, 现在你可以配置一个自定义的遥控平台)
23+
- [x] 添加自定义 sentry 错误上报支持 [文档](https://ccb.agent-aura.top/docs/internals/sentry-setup)
24+
- [x] 添加自定义 GrowthBook 支持 (GB 也是开源的, 现在你可以配置一个自定义的遥控平台) [文档](https://ccb.agent-aura.top/docs/internals/growthbook-adapter)
2525
- [ ] V6 大规模重构石山代码, 全面模块分包
2626
- [ ] V6 将会为全新分支, 届时 main 分支将会封存为历史版本
2727

@@ -63,6 +63,16 @@ bun run build
6363

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

66+
## Feature Flags
67+
68+
所有功能开关通过 `FEATURE_<FLAG_NAME>=1` 环境变量启用,例如:
69+
70+
```bash
71+
FEATURE_BUDDY=1 FEATURE_FORK_SUBAGENT=1 bun run dev
72+
```
73+
74+
各 Feature 的详细说明见 [`docs/features/`](docs/features/) 目录,欢迎投稿补充。
75+
6676
## VS Code 调试
6777

6878
TUI (REPL) 模式需要真实终端,无法直接通过 VS Code launch 启动调试。使用 **attach 模式**
@@ -83,7 +93,8 @@ TUI (REPL) 模式需要真实终端,无法直接通过 VS Code launch 启动
8393
8494
## 相关文档及网站
8595

86-
<https://deepwiki.com/claude-code-best/claude-code>
96+
- **在线文档(Mintlify)**: [ccb.agent-aura.top](https://ccb.agent-aura.top/) — 文档源码位于 [`docs/`](docs/) 目录,欢迎投稿 PR
97+
- **DeepWiki**: <https://deepwiki.com/claude-code-best/claude-code>
8798

8899
## Star History
89100

docs/features/buddy.mdx

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
---
2+
title: "Buddy 宠物系统"
3+
description: "Buddy 是 CLI 中的虚拟宠物伴侣,通过 /buddy 命令孵化、互动,会出现在输入框旁边陪伴你写代码。"
4+
keywords: ["buddy", "宠物", "companion", "伴侣", "虚拟宠物"]
5+
---
6+
7+
## 概述
8+
9+
Buddy 是 Claude Code 内置的虚拟宠物系统。在 REPL 中通过 `/buddy` 命令可以孵化一只随机生成的宠物伴侣,它会出现在输入框旁边,陪伴你的编码过程。
10+
11+
> Feature Flag: `FEATURE_BUDDY=1`
12+
13+
## 启用方式
14+
15+
```bash
16+
FEATURE_BUDDY=1 bun run dev
17+
```
18+
19+
孵化窗口:2026 年 4 月 1-7 日期间启动时,会在 REPL 顶部显示彩虹色的 `/buddy` 提示。4 月 7 日之后命令仍然可用,但不再自动提示。
20+
21+
## 命令
22+
23+
| 命令 | 说明 |
24+
|---|---|
25+
| `/buddy` | 查看当前宠物信息和属性 |
26+
| `/buddy hatch` | 孵化一只新宠物(首次使用) |
27+
| `/buddy rehatch` | 重新随机生成宠物(替换现有) |
28+
| `/buddy pet` | 撸宠物,触发爱心动画 |
29+
| `/buddy mute` | 静音宠物(隐藏) |
30+
| `/buddy unmute` | 取消静音 |
31+
32+
## 宠物属性
33+
34+
### 物种(18 种)
35+
36+
| | | | |
37+
|---|---|---|---|
38+
| Duck | Goose | Blob | Cat |
39+
| Dragon | Octopus | Owl | Penguin |
40+
| Turtle | Snail | Ghost | Axolotl |
41+
| Capybara | Cactus | Robot | Rabbit |
42+
| Mushroom | Chonk | | |
43+
44+
### 稀有度
45+
46+
| 稀有度 | 星级 | 权重 |
47+
|---|---|---|
48+
| Common || 60% |
49+
| Uncommon | ★★ | 25% |
50+
| Rare | ★★★ | 10% |
51+
| Epic | ★★★★ | 4% |
52+
| Legendary | ★★★★★ | 1% |
53+
54+
孵化时基于种子随机决定,存在极低概率出现 Shiny(闪光)变体。
55+
56+
### 属性值
57+
58+
每只宠物拥有 5 项属性(0-100):
59+
60+
- **DEBUGGING** — 调试能力
61+
- **PATIENCE** — 耐心程度
62+
- **CHAOS** — 混乱指数
63+
- **WISDOM** — 智慧值
64+
- **SNARK** — 毒舌度
65+
66+
### 外观
67+
68+
每只宠物还有随机的外观配件:
69+
70+
- **眼睛**: `·` `` `×` `` `@` `°`
71+
- **帽子**: none, crown, tophat, propeller, halo, wizard, beanie, tinyduck
72+
73+
## 数据存储
74+
75+
宠物信息存储在 `~/.claude.json``companion` 字段中。宠物的外观属性(物种、稀有度、属性值等)基于用户 ID 的哈希确定性生成,不可通过编辑配置文件来篡改稀有度。
76+
77+
## 相关源码
78+
79+
| 文件 | 说明 |
80+
|---|---|
81+
| `src/commands/buddy/buddy.ts` | `/buddy` 命令处理 |
82+
| `src/buddy/companion.ts` | 宠物生成与加载 |
83+
| `src/buddy/types.ts` | 类型定义(物种、稀有度、属性) |
84+
| `src/buddy/sprites.ts` | 终端像素画渲染 |
85+
| `src/buddy/CompanionSprite.tsx` | React 组件(输入框旁显示) |
86+
| `src/buddy/useBuddyNotification.tsx` | 启动提示通知 |
87+
| `src/buddy/prompt.ts` | 宠物相关 prompt 模板 |

docs/features/debug-mode.mdx

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: "Debug 模式"
3+
description: "通过 VS Code attach 模式调试 CLI 运行时,支持断点、单步执行和变量查看。"
4+
keywords: ["debug", "调试", "VS Code", "inspect", "断点"]
5+
---
6+
7+
## 概述
8+
9+
TUI (REPL) 模式需要真实终端,无法直接通过 VS Code launch 启动调试。使用 **attach 模式**连接到正在运行的 Bun 进程。
10+
11+
## 步骤
12+
13+
### 1. 终端启动 inspect 服务
14+
15+
```bash
16+
bun run dev:inspect
17+
```
18+
19+
会输出类似 `ws://localhost:8888/xxxxxxxx` 的地址。
20+
21+
### 2. VS Code 附着调试器
22+
23+
1.`src/` 文件中打断点
24+
2. F5 → 选择 **"Attach to Bun (TUI debug)"**
25+
26+
> **注意**`dev:inspect``launch.json` 中的 WebSocket 地址会在每次启动时变化,需要同步更新两处。
27+
28+
## 原理
29+
30+
`dev:inspect` 脚本实际执行的是:
31+
32+
```bash
33+
bun --inspect-wait=localhost:8888/<token> run scripts/dev.ts
34+
```
35+
36+
Bun 的 `--inspect-wait` 参数启动一个 Chrome DevTools Protocol 兼容的 inspect 服务,等待调试器连接后才开始执行。VS Code 的 `bun` 扩展通过 WebSocket 连接到这个地址实现 attach。
37+
38+
## JetBrains IDE
39+
40+
理论上 JetBrains 系列(WebStorm / IntelliJ 等)也支持 attach 到 Bun inspect 服务(Run → Attach to Process),但尚未实际验证过。如果你验证成功,欢迎补充文档。
41+
42+
## 相关文件
43+
44+
| 文件 | 说明 |
45+
|---|---|
46+
| `package.json``dev:inspect` | 启动 inspect 服务的 npm script |
47+
| `.vscode/launch.json` | VS Code attach 调试配置 |
48+
| `scripts/dev.ts` | dev 模式入口,注入 MACRO defines |

mint.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@
109109
"docs/internals/growthbook-adapter",
110110
"docs/internals/sentry-setup",
111111
"docs/internals/hidden-features",
112-
"docs/internals/ant-only-world"
112+
"docs/internals/ant-only-world",
113+
"docs/features/debug-mode",
114+
"docs/features/buddy"
113115
]
114116
}
115117
],

0 commit comments

Comments
 (0)