mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-06-08 11:41:56 +08:00
docs(v2): runtime-split guide, CLAUDE.md gotchas, setup CJK autodetect
- docs/v2-build-and-runtime.md: new — runtime split rationale (Node host, Bun container), lockfile topology, supply-chain trade-offs, image build surface, two session-wake paths, CI shape, key invariants. Indexed from CLAUDE.md v2 Docs Index. - CLAUDE.md: Container Runtime (Bun) section with trigger/action gotchas a contributor editing the container must know (named-param prefix rule, bun:test vs vitest, bun.lock regeneration, no minimumReleaseAge for the Bun tree, no tsc build step, DELETE pragma invariant). CJK font support section for Claude sessions outside of /setup to proactively offer when they detect CJK signals. Development section updated with Bun commands. - .claude/skills/setup/SKILL.md: step 3b — auto-enable CJK fonts without asking if the user is already writing in CJK; otherwise ask only on clear signals (CJK timezone from step 2a). 3c renumbered from old 3b.
This commit is contained in:
@@ -89,7 +89,23 @@ Run `pnpm exec tsx setup/index.ts --step timezone` and parse the status block.
|
||||
- macOS: install via `brew install --cask docker`, then `open -a Docker` and wait for it to start. If brew not available, direct to Docker Desktop download at https://docker.com/products/docker-desktop
|
||||
- Linux: install with `curl -fsSL https://get.docker.com | sh && sudo usermod -aG docker $USER`. Note: user may need to log out/in for group membership.
|
||||
|
||||
### 3b. Build and test
|
||||
### 3b. CJK fonts
|
||||
|
||||
Agent containers skip CJK fonts by default (~200MB saved). Without them, Chromium-rendered screenshots and PDFs show tofu for Chinese/Japanese/Korean.
|
||||
|
||||
- **User writing to you in Chinese, Japanese, or Korean** → enable without asking. Mention it briefly.
|
||||
- **Resolved timezone from step 2a is a CJK region** (`Asia/Tokyo`, `Asia/Shanghai`, `Asia/Hong_Kong`, `Asia/Taipei`, `Asia/Seoul`) or other signal short of active CJK use → ask: "Enable CJK fonts? Adds ~200MB, lets the agent render CJK in screenshots and PDFs."
|
||||
- **Otherwise** → skip.
|
||||
|
||||
To enable, write `INSTALL_CJK_FONTS=true` to `.env`:
|
||||
|
||||
```bash
|
||||
grep -q '^INSTALL_CJK_FONTS=' .env && sed -i.bak 's/^INSTALL_CJK_FONTS=.*/INSTALL_CJK_FONTS=true/' .env && rm -f .env.bak || echo 'INSTALL_CJK_FONTS=true' >> .env
|
||||
```
|
||||
|
||||
The next step's build picks it up automatically.
|
||||
|
||||
### 3c. Build and test
|
||||
|
||||
Run `pnpm exec tsx setup/index.ts --step container -- --runtime docker` and parse the status block.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user