Skip to content

Commit e64d8b4

Browse files
authored
Merge branch 'claude-code-best:main' into feat/add-openai-responses
2 parents d47fd03 + 3cb4828 commit e64d8b4

822 files changed

Lines changed: 6301 additions & 6490 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/skills/teach-me/SKILL.md

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ All teach-me data is stored under `.claude/skills/teach-me/records/`:
4141
.claude/skills/teach-me/records/
4242
├── learner-profile.md # Cross-topic notes (created on first session)
4343
└── {topic-slug}/
44-
└── session.md # Learning state: concepts, status, notes
44+
├── session.md # Learning state: concepts, status, notes
45+
└── {topic-slug}-notes.md # Learner-facing summary notes (generated at session end)
4546
```
4647

4748
**Slug**: Topic in kebab-case, 2-5 words. Example: "Python decorators" → `python-decorators`
@@ -275,7 +276,8 @@ Update `session.md` after each round:
275276
When all concepts mastered or user ends session:
276277

277278
1. Update `session.md` with final state.
278-
2. Update `.claude/skills/teach-me/records/learner-profile.md` (keep under 30 lines):
279+
2. **Generate learner-facing notes** — write `{topic-slug}-notes.md` in the topic directory. This is a standalone reference document the learner can review later. See "Notes Generation" below for format.
280+
3. Update `.claude/skills/teach-me/records/learner-profile.md` (keep under 30 lines):
279281

280282
```markdown
281283
# Learner Profile
@@ -293,7 +295,48 @@ Updated: {timestamp}
293295
- Python decorators (8/10 concepts, 2025-01-15)
294296
```
295297

296-
3. Give a brief text summary of what was covered, key insights, and areas for further study.
298+
4. Give a brief text summary of what was covered, key insights, and areas for further study.
299+
300+
## Notes Generation
301+
302+
At session end, generate a learner-facing notes file at `{topic-slug}/{topic-slug}-notes.md`. This file is **written for the learner to review later**, not for the tutor. It should be self-contained and organized as a quick-reference.
303+
304+
### Notes Structure
305+
306+
```markdown
307+
# {Topic} 核心笔记
308+
309+
## 1. {Section Name}
310+
{Key concept, mechanism, or principle}
311+
* **One-line summary**: {what it does / why it matters}
312+
* **Detail**: {brief explanation, 2-4 sentences max}
313+
* **Example** (if applicable): {code snippet, command, or concrete scenario}
314+
315+
---
316+
317+
## 2. {Section Name}
318+
...
319+
320+
---
321+
322+
## n. 实战参数 / Cheat Sheet (if applicable)
323+
{Practical commands, config, or quick-reference table}
324+
325+
| Parameter / Concept | What it does | Tuning tip |
326+
|---------------------|-------------|------------|
327+
| ... | ... | ... |
328+
```
329+
330+
### Notes Writing Rules
331+
332+
1. **Start with "what & why"** before "how". Each section should answer: what is this, why does it exist, what problem does it solve.
333+
2. **Use analogies sparingly but effectively**. Only include an analogy if it clarifies a non-obvious mechanism (e.g., "PagedAttention is like OS virtual memory paging").
334+
3. **Include trade-offs**. Every optimization or design choice has a cost. Always state it (e.g., "TP improves throughput but increases communication latency").
335+
4. **Code / command examples should be minimal**. Under 10 lines, self-contained, with comments explaining the key flags.
336+
5. **Organize by concept dependency**, not by chronological teaching order. Foundation concepts first, advanced ones last.
337+
6. **No quiz questions, no misconceptions, no tutor-side notes**. This is a clean reference document.
338+
7. **Language matches the session**. If the session was in Chinese, notes are in Chinese (technical terms can stay in English).
339+
8. **Keep it under 150 lines**. If it gets too long, the learner won't review it. Be ruthless about cutting fluff.
297340

298341
## Resuming Sessions
299342

.github/workflows/ci.yml

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,29 @@ on:
66
pull_request:
77
branches: [main]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
ci:
1114
runs-on: ubuntu-latest
1215

1316
steps:
14-
- uses: actions/checkout@v4
15-
16-
- uses: oven-sh/setup-bun@v2
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, 2026-04-25
18+
env:
19+
GIT_CONFIG_COUNT: 2
20+
GIT_CONFIG_KEY_0: init.defaultBranch
21+
GIT_CONFIG_VALUE_0: main
22+
GIT_CONFIG_KEY_1: advice.defaultBranchName
23+
GIT_CONFIG_VALUE_1: "false"
24+
25+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2, 2026-04-25
1726
with:
1827
bun-version: latest
1928

2029
- name: Install dependencies
30+
env:
31+
CLAUDE_CODE_SKIP_CHROME_MCP_SETUP: "1"
2132
run: bun install --frozen-lockfile
2233

2334
- name: Type check
@@ -26,12 +37,17 @@ jobs:
2637
- name: Test with Coverage
2738
run: |
2839
set -o pipefail
29-
bun test --coverage --coverage-reporter=lcov 2>&1 | grep -vE '^\s*(\(pass\)|\(skip\))' | sed '/^.*\/__tests__\/.*:$/d' | cat -s
40+
bun test --coverage --coverage-reporter lcov --coverage-dir coverage 2>&1 | grep -vE '^\s*(\(pass\)|\(skip\))' | sed '/^.*\/__tests__\/.*:$/d' | cat -s
41+
test -s coverage/lcov.info
42+
grep -q '^SF:' coverage/lcov.info
3043
3144
- name: Upload coverage to Codecov
32-
uses: codecov/codecov-action@v5
45+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
46+
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5, 2026-04-25
3347
with:
34-
file: ./coverage/lcov.info
48+
fail_ci_if_error: true
49+
files: ./coverage/lcov.info
50+
disable_search: true
3551
token: ${{ secrets.CODECOV_TOKEN }}
3652

3753
- name: Build

.github/workflows/publish-npm.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ jobs:
2020
publish:
2121
runs-on: ubuntu-latest
2222
steps:
23-
- uses: actions/checkout@v4
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, 2026-04-25
2424
with:
2525
ref: ${{ github.event.inputs.version || github.ref }}
2626

27-
- uses: actions/setup-node@v6
27+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6, 2026-04-25
2828
with:
2929
node-version: "24"
3030
registry-url: "https://registry.npmjs.org"
3131

3232
- name: Setup Bun
33-
uses: oven-sh/setup-bun@v2
33+
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2, 2026-04-25
3434
with:
3535
bun-version: latest
3636

@@ -66,7 +66,7 @@ jobs:
6666
} >> "$GITHUB_OUTPUT"
6767
6868
- name: Create GitHub Release
69-
uses: softprops/action-gh-release@v2
69+
uses: softprops/action-gh-release@3bb12739c298aeb8a4eeaf626c5b8d85266b0e65 # v2, 2026-04-25
7070
with:
7171
name: ${{ github.event.inputs.version || github.ref_name }}
7272
body: |

.github/workflows/release-rcs.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
packages: write
1818

1919
steps:
20-
- uses: actions/checkout@v4
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, 2026-04-25
2121

2222
- name: Login to GHCR
23-
uses: docker/login-action@v3
23+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3, 2026-04-25
2424
with:
2525
registry: ${{ env.REGISTRY }}
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.GITHUB_TOKEN }}
2828

2929
- name: Set up Docker Buildx
30-
uses: docker/setup-buildx-action@v3
30+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3, 2026-04-25
3131

3232
- name: Extract version
3333
id: version
@@ -47,7 +47,7 @@ jobs:
4747
echo "tags=$TAGS" >> "$GITHUB_OUTPUT"
4848
4949
- name: Build Docker image
50-
uses: docker/build-push-action@v5
50+
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5, 2026-04-25
5151
with:
5252
context: .
5353
file: packages/remote-control-server/Dockerfile

.github/workflows/update-contributors.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ jobs:
1111
update:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2, 2026-04-25
1515
with:
1616
token: ${{ secrets.GITHUB_TOKEN }}
1717

18-
- uses: jaywcjlove/github-action-contributors@main
18+
- uses: jaywcjlove/github-action-contributors@86707f6d4c2469ce6b46bc3367253ebd41ee242c # main, 2026-04-25
1919
with:
2020
token: ${{ secrets.GITHUB_TOKEN }}
2121
output: "contributors.svg"
2222
repository: ${{ github.repository }}
2323

24-
- uses: stefanzweifel/git-auto-commit-action@v5
24+
- uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403 # v5, 2026-04-25
2525
with:
2626
commit_message: "docs: update contributors"
2727
file_pattern: "contributors.svg"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ data
4343
.codex/skills/.system/**
4444
!.codex/prompts/
4545
!.codex/prompts/**
46+
teach-me
47+
credentials.json

AGENTS.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ bun run docs:dev
171171
| `packages/audio-capture-napi/` | 原生音频捕获(已恢复) |
172172
| `packages/color-diff-napi/` | 颜色差异计算(完整实现,11 tests) |
173173
| `packages/image-processor-napi/` | 图像处理(已恢复) |
174-
| `packages/modifiers-napi/` | 键盘修饰键检测(stub|
175-
| `packages/url-handler-napi/` | URL scheme 处理(stub|
174+
| `packages/modifiers-napi/` | 键盘修饰键检测(macOS FFI 实现|
175+
| `packages/url-handler-napi/` | URL scheme 处理(环境变量 + CLI 参数读取|
176176

177177
### Bridge / Remote Control
178178

@@ -254,13 +254,13 @@ Feature flags control which functionality is enabled at runtime. 代码中统一
254254
| Module | Status |
255255
|--------|--------|
256256
| Computer Use (`@ant/*`) | Restored — macOS + Windows + Linux(后端完整度不一) |
257-
| `*-napi` packages | `audio-capture-napi``image-processor-napi` 已恢复;`color-diff-napi` 完整;`modifiers-napi``url-handler-napi` 仍为 stub |
257+
| `*-napi` packages | 全部已恢复/实现:`audio-capture-napi``image-processor-napi` 已恢复;`color-diff-napi` 完整;`modifiers-napi`(macOS FFI);`url-handler-napi`(环境变量+CLI) |
258258
| Voice Mode | Restored — Push-to-Talk 语音输入(需 Anthropic OAuth) |
259259
| OpenAI/Gemini/Grok 兼容层 | Restored |
260260
| Remote Control Server | Restored — 自托管 RCS + Web UI |
261261
| Analytics / GrowthBook / Sentry | Empty implementations |
262-
| Magic Docs / LSP Server | Removed |
263-
| Plugins / Marketplace | Removed |
262+
| Magic Docs / LSP Server | Restored — Magic Docs 自动更新 + LSP 服务器管理器 |
263+
| Plugins / Marketplace | Restored — 插件安装/卸载/启用/禁用 + Marketplace 浏览 |
264264
| MCP OAuth | Simplified |
265265

266266
### Key Type Files

CLAUDE.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ bun run docs:dev
7676
### Runtime & Build
7777

7878
- **Runtime**: Bun (not Node.js). All imports, builds, and execution use Bun APIs.
79-
- **Build**: `build.ts` 执行 `Bun.build()` with `splitting: true`,入口 `src/entrypoints/cli.tsx`,输出 `dist/cli.js` + chunk files。Build 默认启用 19 个 feature(见下方 Feature Flag 段)。构建后自动替换 `import.meta.require` 为 Node.js 兼容版本(产物 bun/node 都可运行)。
79+
- **Build**: `build.ts` 执行 `Bun.build()` with `splitting: true`,入口 `src/entrypoints/cli.tsx`,输出 `dist/cli.js` + chunk files。Build 默认启用 19 个 feature(见下方 Feature Flag 段)。构建后自动替换 `import.meta.require` 为 Node.js 兼容版本(产物 bun/node 都可运行)。构建时会将 `vendor/audio-capture/``src/utils/vendor/ripgrep/` 复制到 `dist/vendor/` 下。
80+
- **Build (Vite)**: `vite.config.ts` + `scripts/post-build.ts`,chunk 输出到 `dist/chunks/`。post-build 同样复制 vendor 文件到 `dist/vendor/`
81+
- **Vendor 路径解析**: 构建后 chunk 文件位于 `dist/``dist/chunks/` 下,vendor 二进制在 `dist/vendor/``src/utils/ripgrep.ts``packages/audio-capture-napi/src/index.ts` 均通过 `import.meta.url` 路径中 `lastIndexOf('dist')` 定位 dist 根目录,再拼接 `vendor/` 子路径,确保不同构建产物层级下路径一致。
8082
- **Dev mode**: `scripts/dev.ts` 通过 Bun `-d` flag 注入 `MACRO.*` defines,运行 `src/entrypoints/cli.tsx`。默认启用全部 feature。
8183
- **Module system**: ESM (`"type": "module"`), TSX with `react-jsx` transform.
8284
- **Monorepo**: Bun workspaces — 15 个 workspace packages + 若干辅助目录 in `packages/` resolved via `workspace:*`
@@ -171,8 +173,8 @@ bun run docs:dev
171173
| `packages/audio-capture-napi/` | 原生音频捕获(已恢复) |
172174
| `packages/color-diff-napi/` | 颜色差异计算(完整实现,11 tests) |
173175
| `packages/image-processor-napi/` | 图像处理(已恢复) |
174-
| `packages/modifiers-napi/` | 键盘修饰键检测(stub|
175-
| `packages/url-handler-napi/` | URL scheme 处理(stub|
176+
| `packages/modifiers-napi/` | 键盘修饰键检测(macOS FFI 实现|
177+
| `packages/url-handler-napi/` | URL scheme 处理(环境变量 + CLI 参数读取|
176178

177179
### Bridge / Remote Control
178180

@@ -254,13 +256,13 @@ Feature flags control which functionality is enabled at runtime. 代码中统一
254256
| Module | Status |
255257
|--------|--------|
256258
| Computer Use (`@ant/*`) | Restored — macOS + Windows + Linux(后端完整度不一) |
257-
| `*-napi` packages | `audio-capture-napi``image-processor-napi` 已恢复;`color-diff-napi` 完整;`modifiers-napi``url-handler-napi` 仍为 stub |
259+
| `*-napi` packages | 全部已恢复/实现:`audio-capture-napi``image-processor-napi` 已恢复;`color-diff-napi` 完整;`modifiers-napi`(macOS FFI);`url-handler-napi`(环境变量+CLI) |
258260
| Voice Mode | Restored — Push-to-Talk 语音输入(需 Anthropic OAuth) |
259261
| OpenAI/Gemini/Grok 兼容层 | Restored |
260262
| Remote Control Server | Restored — 自托管 RCS + Web UI |
261263
| Analytics / GrowthBook / Sentry | Empty implementations |
262-
| Magic Docs / LSP Server | Removed |
263-
| Plugins / Marketplace | Removed |
264+
| Magic Docs / LSP Server | Restored — Magic Docs 自动更新 + LSP 服务器管理器 |
265+
| Plugins / Marketplace | Restored — 插件安装/卸载/启用/禁用 + Marketplace 浏览 |
264266
| MCP OAuth | Simplified |
265267

266268
### Key Type Files

0 commit comments

Comments
 (0)