You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
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.
-**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`).
401
401
-**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.
402
402
403
403
Example body:
@@ -415,7 +415,7 @@ The docs-site changelog has not yet been synced for `<version range>` after the
415
415
416
416
- Synced `<version range>` from `apps/kimi-code/CHANGELOG.md` into `docs/en/release-notes/changelog.md`
417
417
- Translated the new English increment into `docs/zh/release-notes/changelog.md`
Copy file name to clipboardExpand all lines: AGENTS.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@ This is a TypeScript monorepo built for agent-assisted development. This file is
21
21
-**Team** — Multi-agent discussion and collaboration tool; agents can debate, cross-review, and reach consensus before output.
22
22
-**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.
23
23
-**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.
24
25
-**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.
25
26
26
27
> 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`:
296
297
3.**test-pi-tui** — `pi-tui` suite (uses node:test, not vitest)
297
298
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)
298
299
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.
300
301
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`.
@@ -442,7 +443,7 @@ Two dependencies are deliberately removed: `ssh2@1.17.0>cpu-features` and `ssh2@
442
443
443
444
## Monorepo Workspace Maintenance
444
445
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`.
446
447
-**`flake.nix`** also contains a hardcoded `workspacePaths` list that must be manually kept in sync.
447
448
-**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.
448
449
- Missing a path in `flake.nix`'s `workspacePaths` silently drops files from the Nix build's `src` fileset.
Copy file name to clipboardExpand all lines: README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Compared to upstream, this fork adds:
15
15
-**🤖 Team.** Multi-agent discussion and collaboration tool — agents can debate, cross-review, and reach consensus before output.
16
16
-**⚡ 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.
17
17
-**🪟 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.
19
19
- Various other fixes and QoL improvements.
20
20
21
21
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".
Copy file name to clipboardExpand all lines: apps/kimi-web/CHANGELOG.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,9 @@
1
1
# @moonshot-ai/kimi-web
2
2
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.
Copy file name to clipboardExpand all lines: packages/kap-server/AGENTS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,4 +41,4 @@ The global search surface is `POST /api/v1/search` (`src/search/` + `src/routes/
41
41
- 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.
42
42
- 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).
43
43
- 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`.
0 commit comments