Skip to content

target: kimi-code — TUI corpus target after pi (tracker) #6565

Description

@proggeramlug

TUI corpus target after pi (see pi tracker). Kimi Code CLI (MoonshotAI/kimi-code, @moonshot-ai/kimi-code@0.27.0), TypeScript — not to be confused with the Python kimi-cli.

Artifact & shape

  • Ships exactly the input shape we want: a single self-contained dist/main.mjs — 15MB, ESM, stock Node ≥22.19, bundled by tsdown/rolldown but not name-mangled (~35 chars/line, readable identifiers). Zero install-time assembly. (dist-web/ 20MB is static web assets served over HTTP — data files, not code to compile.)
  • Their release flow also builds a Node SEA binary (postject) from that same JS — independent proof the whole app runs single-file under stock node.
  • TUI is a vendored copy of pi's pi-tui — the renderer/input work from the pi target transfers directly.
  • Own-code volume roughly 2.5× pi (agent-core-v2 ~81K + app ~52K + kap-server ~22K + pi-tui 12K + more).

The wall that makes this target #2 rather than #1

The bundle contains an in-process fastify-based server ("kap-server" architecture). fastify/find-my-way + ajv + fast-json-stringify perform mandatory new Function codegen with no fallback (13 sites verified in the shipped bundle) → blocked on #6559. Staging that respects this:

  1. TUI/REPL bring-up first — verify whether the default interactive path boots the fastify server in-process; if not, the TUI milestone may land before runtime: dynamic code evaluation (new Function) for schema-codegen libs (ajv / fast-json-stringify / find-my-way) — blocks kimi-code #6559 completes.
  2. kimi server run (and the v2 multi-server mode) as the second milestone — this is where runtime: dynamic code evaluation (new Function) for schema-codegen libs (ajv / fast-json-stringify / find-my-way) — blocks kimi-code #6559 is unavoidable.

Other pre-analyzed surfaces

Acceptance milestones: (1) --version/--help parity; (2) interactive TUI usable; (3) kimi server run boots and serves (needs #6559).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew capability or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions