Skip to content

Commit e399b6e

Browse files
author
luozihao
committed
docs: align README/AGENTS/skills with Bun as sole packaging engine
The READMEs still described the Bun build as an experimental pipeline running alongside the default Node.js SEA chain, and AGENTS.md still mentioned SEA packaging in CI plus a kimi-build workspace exclusion that no longer exists. Rewrite the fork-feature blurbs, add the missing Bun toolchain entry to the fork additions list, switch the docs/skill instructions to bun commands, and fix the native-stage comment whose default engine claim contradicted the code.
1 parent 76a2f35 commit e399b6e

9 files changed

Lines changed: 24 additions & 21 deletions

File tree

.agents/skills/sync-changelog/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ Check:
335335
Then run the docs build:
336336

337337
```bash
338-
pnpm --filter docs run build
338+
cd docs && bun run build
339339
```
340340

341341
### 8. Human Review Checkpoint
@@ -397,7 +397,7 @@ Fill in `.github/pull_request_template.md`. For changelog sync PRs:
397397

398398
- **Related Issue**: write `N/A — post-release docs maintenance` (no issue required).
399399
- **Problem**: the docs-site changelog is behind the published CLI release(s).
400-
- **What changed**: list synced version(s), note English source + Chinese translation, and mention verification (`pnpm --filter docs run build`).
400+
- **What changed**: list synced version(s), note English source + Chinese translation, and mention verification (`cd docs && bun run build`).
401401
- **Checklist**: check CONTRIBUTING; explain no issue, no tests, no changeset, and that `gen-docs` is not needed because this is the dedicated changelog sync flow.
402402

403403
Example body:
@@ -415,7 +415,7 @@ The docs-site changelog has not yet been synced for `<version range>` after the
415415

416416
- Synced `<version range>` from `apps/kimi-code/CHANGELOG.md` into `docs/en/release-notes/changelog.md`
417417
- Translated the new English increment into `docs/zh/release-notes/changelog.md`
418-
- Verified with `pnpm --filter docs run build`
418+
- Verified with `cd docs && bun run build`
419419

420420
## Checklist
421421

AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This is a TypeScript monorepo built for agent-assisted development. This file is
2121
- **Team** — Multi-agent discussion and collaboration tool; agents can debate, cross-review, and reach consensus before output.
2222
- **Rust Native Tools** — Performance-critical tools (grep, glob, edit, read, write, bash, token counting, output truncation) rewritten in Rust as a native Node addon, significantly faster than JS.
2323
- **Windows launchers**`start-native.bat` builds the native Rust tools if needed and launches the CLI in dev mode (`bun run dev:cli`, tsx running `src/main.ts`); `start-desktop.bat` builds and launches a locally vendored desktop shell when `apps/kimi-desktop` is present (the shell source is not tracked in this fork).
24+
- **Bun toolchain & packaging** — Bun is both the package manager (hoisted workspace, `bun.lock`) and the sole native-binary packaging engine (`bun build --compile` via `build-bun.mjs`); the former pnpm workspace setup and the Node SEA build chain were retired. Self-update remains engine-aware for legacy SEA installs.
2425
- **DeepSeek Harness capability fusion** — Selected capabilities ported from [deepseek-harness](https://github.com/deepseek-ai/deepseek-harness) (MIT): MCP auto-reconnect with bounded exponential backoff (`mcpCore/connection-manager.ts`). Ported modules carry a source note in their header; capability selection and comparison notes live in the session report.
2526

2627
> For a user-facing summary of these additions, see `README.md` → "What's Different in This Fork" (and its Chinese mirror `README.zh-CN.md` → "本 Fork 新增特性").
@@ -296,7 +297,7 @@ GitHub Actions (`ci.yml`) runs on every PR and push to `main`:
296297
3. **test-pi-tui**`pi-tui` suite (uses node:test, not vitest)
297298
4. **lint**`bun run lint` (oxlint --type-aware), `bun run sherif`, locale key parity (`check-locale-keys.mjs`), locale placeholder validity (`check-locale-placeholders.cjs`), and locale JSON freshness (regenerate via `generate-locale-json.cjs` and fail on any tracked diff)
298299
5. **typecheck** — TypeScript check across all packages (uses `tsgo` from `@typescript/native-preview`)
299-
6. **native bundle** — Built by `_native-build.yml` (a `workflow_call` workflow invoked from `release.yml` and `manual-native-bundle.yml`) on a 6-target matrix (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64): `(cd packages/kimi-native-tools && bun run build)` (napi-rs build; no cargo test), then SEA packaging and a native smoke test.
300+
6. **native bundle** — Built by `_native-build.yml` (a `workflow_call` workflow invoked from `release.yml` and `manual-native-bundle.yml`) on a 6-target matrix (linux-x64, linux-arm64, darwin-x64, darwin-arm64, win32-x64, win32-arm64): `(cd packages/kimi-native-tools && bun run build)` (napi-rs build; no cargo test), then Bun single-file packaging (`build:native:bun`) and a native smoke test.
300301
7. **codeql**`codeql.yml` scans js/ts on PRs, pushes to `main`, and weekly. A branch ruleset requires CodeQL results (plus blocks force pushes and branch deletion) for merges into `main`.
301302

302303
Additional workflows: `_native-build.yml`, `codeql.yml`, `docs-deploy.yml`, `manual-native-bundle.yml`, `nix-build.yml`, `pkg-pr-new.yml`, `pr-title-checker.yml`, `release.yml`.
@@ -442,7 +443,7 @@ Two dependencies are deliberately removed: `ssh2@1.17.0>cpu-features` and `ssh2@
442443

443444
## Monorepo Workspace Maintenance
444445

445-
- **The `workspaces` field in the root `package.json`** is the source of truth for workspace membership. Globs: `packages/*` (minus `!packages/kimi-build`), `apps/*` (minus `!apps/kimi-web`), `apps/vis/server`, `apps/vis/web`, and `docs`.
446+
- **The `workspaces` field in the root `package.json`** is the source of truth for workspace membership. Globs: `packages/*`, `apps/*` (minus `!apps/kimi-web`), `apps/vis/server`, `apps/vis/web`, and `docs`.
446447
- **`flake.nix`** also contains a hardcoded `workspacePaths` list that must be manually kept in sync.
447448
- **Whenever you add or remove a workspace package, you MUST update both the root `package.json` and `flake.nix`** — for every package, including leaf / test / e2e packages that nothing depends on.
448449
- Missing a path in `flake.nix`'s `workspacePaths` silently drops files from the Nix build's `src` fileset.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Compared to upstream, this fork adds:
1515
- **🤖 Team.** Multi-agent discussion and collaboration tool — agents can debate, cross-review, and reach consensus before output.
1616
- **⚡ Rust Native Tools.** Performance-critical tools (grep, glob, edit, read, write, bash, token counting, output truncation) rewritten in Rust as native Node addon, significantly faster than JS.
1717
- **🪟 Windows launchers.** `start-native.bat` launches the native CLI; `start-desktop.bat` builds/launches a locally vendored desktop shell when present.
18-
- **🥖 Bun migration (experimental).** Experimental single-file builds via `bun build --compile` now run in CI as a six-platform matrix (linux/darwin/win32 × x64/arm64) alongside the default Node.js SEA pipeline: node-pty and pi-tui helpers load from a unified packaged-asset cache, host terminal sessions support both runtimes, URL-fetch SSRF semantics stay identical across runtimes (bundled undici), self-update is engine-aware, and `/status` shows a Runtime row. Validated on linux-x64 only so far; the long-term goal is for Bun to replace SEA as the sole release engine.
18+
- **🥖 Bun as the sole packaging engine.** Release binaries are single-file builds via `bun build --compile`, produced by the CI six-platform matrix (linux/darwin/win32 × x64/arm64). The former default Node.js SEA pipeline has been retired: node-pty and pi-tui helpers load from a unified packaged-asset cache, URL-fetch SSRF semantics are identical across runtimes (bundled undici), self-update is engine-aware and still recognizes legacy SEA installs, and `/status` shows a Runtime row.
1919
- Various other fixes and QoL improvements.
2020

2121
For a deeper, contributor-facing breakdown of these additions and how they integrate with the rest of the project, see `AGENTS.md` → "Fork-specific additions vs upstream".

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
- **🤖 Team 多 Agent 讨论**:多 Agent 讨论协作工具,Agent 之间可辩论、交叉审查并达成共识后输出。
1818
- **⚡ Rust 原生工具加速**:性能关键工具(grep、glob、edit、read、write、bash、token 统计、输出截断)用 Rust 重写为原生 Node addon,显著快于 JS 实现。
1919
- **🪟 Windows 启动脚本**`start-native.bat` 一键启动原生 CLI;`start-desktop.bat` 用于构建并启动本地 vendored 桌面壳(仅当 `apps/kimi-desktop` 存在时可用)。
20-
- **🥖 Bun 迁移(实验性)**:通过 `bun build --compile` 的实验性单文件构建已接入 CI 六平台矩阵linux/darwin/win32 × x64/arm64),与默认的 Node.js SEA 流水线并行:node-pty 与 pi-tui helper 统一由打包资产缓存加载、宿主终端会话支持双运行时、URL-fetch SSRF 语义跨运行时一致统一捆绑 undici)、自更新感知引擎`/status` 显示 Runtime 行。目前仅在 linux-x64 上实测验证;长期目标是让 Bun 取代 SEA 成为唯一发布引擎
20+
- **🥖 Bun 唯一打包引擎**:发布二进制通过 `bun build --compile` 产出单文件构建,由 CI 六平台矩阵(linux/darwin/win32 × x64/arm64)生成。原默认的 Node.js SEA 流水线已退役:node-pty 与 pi-tui helper 统一由打包资产缓存加载、URL-fetch SSRF 语义跨运行时一致(统一捆绑 undici)、自更新感知引擎且仍识别旧 SEA 安装`/status` 显示 Runtime 行。
2121
- 其他多项修复和体验优化。
2222

2323
如需了解面向贡献者的更深入说明与集成细节,请参见根目录 `AGENTS.md` → "Fork-specific additions vs upstream"(中文语境参见对应章节)。

apps/kimi-web/CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# @moonshot-ai/kimi-web
22

3-
> **Note**: kimi-web is excluded from the pnpm workspace and does not maintain an independent changelog.
4-
> It ships as part of the Kimi Code CLI release (see `apps/kimi-code/CHANGELOG.md`); entries below only cover the period when it was published separately.
3+
> **Note**: kimi-web is excluded from the root Bun workspace (it keeps its own pnpm setup)
4+
> and does not maintain an independent changelog.
5+
> It ships as part of the Kimi Code CLI release (see `apps/kimi-code/CHANGELOG.md`); entries
6+
> below only cover the period when it was published separately.
57
68
## 0.1.2
79

docs/AGENTS.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Outline prompt:
173173

174174
```
175175
* Install and upgrade
176-
* System requirements: Node.js 24.15.0+, recommend pnpm
176+
* System requirements: Node.js 24.15.0+, recommend npm
177177
* Install, upgrade, uninstall steps
178178
```
179179

@@ -185,7 +185,7 @@ Outline prompt:
185185
### System requirements
186186

187187
- Node.js 24.15.0+
188-
- Recommend pnpm
188+
- Recommend npm
189189

190190
### Install
191191

@@ -201,9 +201,9 @@ Outline prompt:
201201
```markdown
202202
## Install and upgrade
203203

204-
Kimi Code CLI requires Node.js 24.15.0 or later. We recommend using pnpm for installation and management.
204+
Kimi Code CLI requires Node.js 24.15.0 or later. We recommend using npm for installation and management.
205205

206-
If you haven't installed pnpm yet, please refer to the pnpm installation docs first. Install Kimi Code CLI:
206+
If you haven't installed npm yet, please refer to the npm installation docs first. Install Kimi Code CLI:
207207

208208
(code block)
209209

@@ -318,11 +318,11 @@ Before shipping, verify these values match the rest of the docs:
318318
## Build and preview
319319

320320
- Docs are built with VitePress from `docs/`.
321-
- Common commands (run inside `docs/`):
322-
- `npm install`
323-
- `npm run dev`
324-
- `npm run build`
325-
- `npm run preview`
321+
- Common commands (run inside `docs/`, or from the repo root via `bun run dev:docs`):
322+
- `bun install`
323+
- `bun run dev`
324+
- `bun run build`
325+
- `bun run preview`
326326
- The build output is `docs/.vitepress/dist`.
327327

328328
## Changelog syncing

packages/kap-server/AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ The global search surface is `POST /api/v1/search` (`src/search/` + `src/routes/
4141
- Every query runs under explicit budgets (max terms, postings visits via `MiniDb.searchBoundedAsync`, candidate caps, confirmation text volume, a match deadline) with over-budget pages flagged `incomplete: 'candidate_cap' | 'postings_budget' | 'deadline'`. The budget VALUES are centralized: per-query work budgets in `src/search/searchService.ts` (mirrored as service test knobs), worker-host budgets in `src/search/worker/host.ts` (ready/close/request/sync watchdogs, heap cap, crash backoff), minidb's process-wide worker slots and slice budgets in `packages/minidb/src/maintenance.ts` / `recovery.ts`. Query concurrency is structural, not a semaphore: one worker thread per service serializes all index-route CPU work, each query is individually budgeted and watchdogged, and the worker heap cap turns a pathological burst into a degraded-restart rather than a main-process stall.
4242
- Pagination is keyset over `(time, key)` / `(score, time, key)` with versioned v2 tokens pinning the index generation (a rebuild/reopen/rescan invalidates old tokens with `invalid_page_token`; legacy v1 offset tokens are still accepted and upgraded), and per-session sync scans only that session's file-meta keys (`\0meta\file\<sessionId>\<hash>`, migrated from the pre-v2 hash-only keys by a one-time background pass).
4343
- When `container.session_id` is provided and that session is live in this process (`TranscriptService.forSessionLive` returns a store, wired via `setLiveTranscriptSource` in `start.ts`), BOTH modes instead scan the in-memory transcript store (turn prompts + assistant text frames, history established via `whenReady`/`ensureAgentHistory`) — no index involved; terms-mode live hits are scored Σ log(1+tf) (comparable only within a route, per the `GlobalSearchSource` contract), live-route errors never fall back to the index, and the response's `source: 'live' | 'index'` field (also mixed into the page-token fingerprint, so a mid-pagination route flip invalidates the old token) tells the caller which route served the page.
44-
- Dev/test worker runtime: the worker entry (`src/search/worker/entry.ts`) loads from TS source under Node's native type stripping plus a repo-local `.js``.ts` resolve hook (`src/search/worker/register-dev-hooks.mjs`); the npm bundle emits `dist/search-worker.mjs` (`apps/kimi-code/tsdown.dist-worker.config.ts`); the SEA binary embeds it as the `kap-search-worker` runtime asset (`apps/kimi-code/scripts/native/manifest.mjs`), installed at startup by `apps/kimi-code/src/native/search-worker.ts`.
44+
- Dev/test worker runtime: the worker entry (`src/search/worker/entry.ts`) loads from TS source under Node's native type stripping plus a repo-local `.js``.ts` resolve hook (`src/search/worker/register-dev-hooks.mjs`); the npm bundle emits `dist/search-worker.mjs` (`apps/kimi-code/tsdown.dist-worker.config.ts`); the Bun single-file binary embeds it as the `kap-search-worker` runtime asset (`apps/kimi-code/scripts/native/manifest.mjs`), installed at startup by `apps/kimi-code/src/native/search-worker.ts`.

scripts/generate-locale-json.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Generate JSON locale files from TypeScript locale sources.
33
*
4-
* Usage: pnpm run generate:locale-json
4+
* Usage: bun run generate:locale-json
55
*
66
* Reads each TS locale file and writes its JSON equivalent so the
77
* Rust i18n engine can load them directly without runtime serialization.

scripts/prompt-optimizer/knowledge-rs/standards.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ scope:
136136
tags: node, bun, environment
137137
scope:
138138

139-
需要 Node.js >= 24.15.0、Bun >= 1.4.0(`bunfig.toml` 钉了 hoisted linker)。Node 版本不满足会让 SEA 构建脚本直接报错
139+
需要 Node.js >= 24.15.0、Bun >= 1.4.0(`bunfig.toml` 钉了 hoisted linker)。Node 版本不满足会让原生打包脚本(`bun run build:native:bun`)直接报错
140140

141141
---
142142

0 commit comments

Comments
 (0)