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
docs(migration): mark G-7 complete — web-only achieved
- AGENTS.md: migration progress to 2026-08-11 (stage F + G-7 done); TS
whitelist table now lists only generated wire types, web/vscode shells and
the distribution shell; apps/kimi-code section rewritten as the shell;
package commands, CI and test conventions updated
- CODEX_MIGRATION_PLAN.md: stage F ✅, G-7 ✅ (shell-ify, upgrade in Rust,
SEA chain removed, flake builds Rust), §5 apps/kimi-code rows retired
Copy file name to clipboardExpand all lines: AGENTS.md
+15-53Lines changed: 15 additions & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -69,7 +69,7 @@ This is a TypeScript monorepo built for agent-assisted development. This file is
69
69
70
70
> **Status (2026-08-03):** the JS agent engines (`agent-core`, `agent-core-v2`) are **retired**. The only engine is the Rust engine (`packages/kimi-agent`). `schema.ts``engine` enum is `'rust'` only — no JS fallback.
| Generated files |`packages/kimi-agent/src/rpc/wire.gen.ts`| regenerated via `pnpm gen:wire`, never hand-edited |
88
-
|CLI / TUI / Web / VS Code shells |`apps/*`UI + i18n | pure UI, no engine logic(目标迁入 crates/)|
89
-
|Test adaptation|TS tests asserting against the Rust engine | keep host behavior verified|
87
+
| Web / VS Code shells |`apps/kimi-web` / `kimi-inspect` / `vis/web` / `vscode`UI + i18n | pure UI, no engine logic |
88
+
|Distribution shell|`apps/kimi-code/bin/kimi.mjs`, `packages/kimi-code-rust-bin/`| pure Rust spawn + dist-web assets|
90
89
91
90
Before writing any TS change, ask: *is this engine functionality?* If yes → implement in Rust. If it is host/UI → TS is fine **for now, but prefer Rust** (see `CODEX_MIGRATION_PLAN.md`).
92
91
@@ -122,53 +121,19 @@ apps/
122
121
vis/ — Session replay & debugging visualizer
123
122
```
124
123
125
-
#### `apps/kimi-code` — CLI / TUI Application
124
+
#### `apps/kimi-code` — Distribution shell (G-7, 2026-08-11)
126
125
127
-
The main application. Consumes core capabilities through `@moonshot-ai/kimi-code-sdk` and must **not** depend directly on `@moonshot-ai/agent-core`. When writing or modifying its terminal UI, use the `write-tui` skill (`.agents/skills/write-tui/SKILL.md`).
The npm distribution shell for the Rust CLI (`@moonshot-ai/kimi-code`). It is **not** an application anymore: all TS source (CLI/TUI/i18n/native bridges) retired to `retired/kimi-code-src/`. The shell contains `bin/kimi.mjs` (pure Rust spawn; `KIMI_RUST_BIN` overrides the binary), `dist-web/` (kimi-web build output served by `kimi web --assets`), and `scripts/` (postinstall shim cleanup, web-asset copy, plugin-marketplace build). The Rust CLI itself lives in `crates/kimi-cli` (see "Engine Ownership").
160
127
161
128
**Build output:**
162
129
| Output | Path |
163
130
|--------|------|
164
-
|CLI entry (ESM)|`apps/kimi-code/dist/main.mjs`|
131
+
|npm bin wrapper|`apps/kimi-code/bin/kimi.mjs`|
165
132
| Web UI assets |`apps/kimi-code/dist-web/`|
166
-
| Native prebuilds |`apps/kimi-code/native/`|
167
-
| SEA binary |`apps/kimi-code/dist-native/bin/`|
168
133
169
134
#### `apps/kimi-web` — Browser Web UI
170
135
171
-
Peer to the TUI. Vue 3 + Vite + vue-i18n; talks to the server over REST + WebSocket under `/api/v1`. It must not depend on `@moonshot-ai/agent-core` (wire types are re-implemented locally). Debug against the Rust-backed server via the root `pnpm dev:v2` script. See`apps/kimi-web/AGENTS.md`.
136
+
Peer to the TUI. Vue 3 + Vite + vue-i18n; talks to the server over REST + WebSocket under `/api/v1`. It must not depend on `@moonshot-ai/agent-core` (wire types are re-implemented locally). Debug against the Rust-backed server; see`apps/kimi-web/AGENTS.md`.
172
137
173
138
#### `apps/vscode` — VS Code Extension
174
139
@@ -267,9 +232,8 @@ scripts/
267
232
pnpm install # Install all dependencies
268
233
pnpm build # Build all workspace packages
269
234
pnpm build:packages # Build only packages/*
270
-
pnpm dev:cli # Run CLI in dev mode
235
+
pnpm dev:cli # Run CLI in dev mode (Rust, cargo run -p kimi-cli)
271
236
pnpm dev:web # Run web UI in dev mode
272
-
pnpm dev:server # Run server in dev mode
273
237
pnpm test# Run all tests (vitest)
274
238
pnpm test:watch # Watch mode
275
239
pnpm test:coverage # With coverage
@@ -299,16 +263,14 @@ make rust-test # cargo test + kimi-agent --test
299
263
### Package-specific commands
300
264
301
265
```sh
302
-
# CLI app
303
-
pnpm --filter @moonshot-ai/kimi-code build
304
-
pnpm --filter @moonshot-ai/kimi-code run dev
305
-
pnpm --filter @moonshot-ai/kimi-code run test
306
-
pnpm --filter @moonshot-ai/kimi-code run e2e # E2E tests (sets KIMI_E2E=1)
266
+
# Distribution shell (Rust CLI lives in crates/kimi-cli)
-E2E tests live in `apps/kimi-code/test/e2e/` and require `KIMI_E2E=1` env.
395
+
-Rust CLI/TUI/server behavior is covered by `cargo test` (`crates/*`, `packages/kimi-agent`); the retired TS host suite lives with `retired/kimi-code-src/` (G-7, 2026-08-11).
0 commit comments