Commit graph

365 commits

Author SHA1 Message Date
Kai
93eb70a727
feat(env): migrate kimi-cli model request params and auto-update toggle (#458)
* feat(env): migrate kimi-cli model request params and auto-update toggle

Migrate still-relevant environment variables from kimi-cli:

- KIMI_MODEL_TEMPERATURE / KIMI_MODEL_TOP_P: sampling params applied
  globally to any kimi provider (not tied to KIMI_MODEL_NAME).
- KIMI_MODEL_THINKING_KEEP: Moonshot preserved-thinking passthrough
  (thinking.keep), injected only while Thinking is on.
- KIMI_CODE_NO_AUTO_UPDATE (legacy alias KIMI_CLI_NO_AUTO_UPDATE):
  fully disables the update preflight.

Wires env -> provider in Agent.get llm() via applyKimiEnvGenerationParams,
reusing kosong's existing GenerationKwargs / thinking.keep support.
KIMI_MODEL_MAX_TOKENS is intentionally untouched: it already flows through
the completion-budget path.

* fix(env): apply Kimi sampling params to compaction requests too

Sink KIMI_MODEL_TEMPERATURE / KIMI_MODEL_TOP_P into ConfigState.provider so
every request built from config.provider — main loop and full-history
compaction alike — carries them, matching kimi-cli where these live on the
shared create_llm provider. thinking.keep stays in Agent.llm because it
depends on the runtime thinking state (compaction runs thinking-off and
correctly skips it).

Splits applyKimiEnvGenerationParams into applyKimiEnvSamplingParams (applied
at provider construction) and applyKimiEnvThinkingKeep (applied in Agent.llm).

Addresses PR review feedback about compaction requests bypassing the wrapped
provider.
2026-06-05 14:54:24 +08:00
_Kerman
95dd0a1f3b
chore: clarify agent record resume contract (#465) 2026-06-05 14:51:58 +08:00
_Kerman
4f9977d4dc
fix: preserve thinking during compaction (#464) 2026-06-05 14:25:32 +08:00
7Sageer
1fe5d5549c
fix(kosong): clamp OpenAI chat xhigh effort by model (#457) 2026-06-05 14:01:50 +08:00
_Kerman
3a98713050
fix: show concise filtered response errors (#456) 2026-06-05 12:48:35 +08:00
Qkunio
f8940ebf26
docs(typo): fix zh changelog kimi acp link (#455)
Co-authored-by: qkunio <qkunio@163.com>
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-05 12:17:46 +08:00
Yifan Song
960a0e2885
fix(cli): show unknown command error for invalid subcommands (#442)
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-05 11:54:16 +08:00
Kai
52f75a42e5
docs(changelog): add release dates to version headings (#401)
Add the published release date to every version heading on the
user-facing changelog pages (English half-width, Chinese full-width),
covering 0.2.0 through 0.9.0. Dates come from each version's published
release tag. Also update the sync-changelog skill so future syncs carry
the date convention forward.
2026-06-05 11:37:11 +08:00
github-actions[bot]
b64f3b4bca
ci: release packages (#444)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-05 01:34:13 +08:00
Luyu Cheng
15a4c64e5c
fix: preserve TUI context when starting goals (#443) 2026-06-05 01:26:13 +08:00
bj456736
0bffadb4b4
ci: deploy docs only on release to keep docs in sync with published versions (#425)
* ci: deploy docs only on release to keep docs in sync with published versions

Previously docs were deployed on every push to main, which meant
unreleased features could appear in the public documentation.
This changes the trigger to release:published so that docs only
update when a new version is actually shipped, plus manual dispatch
for emergencies.

* ci: deploy docs from release workflow

---------

Co-authored-by: root <root@localhost.localdomain>
Co-authored-by: qer <wbxl2000@outlook.com>
2026-06-04 22:01:10 +08:00
liruifengv
8e5be975ec
docs(changelog): sync 0.10.0 from apps/kimi-code/CHANGELOG.md (#434) 2026-06-04 21:58:23 +08:00
github-actions[bot]
12d062d48e
ci: release packages (#390)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-04 21:45:01 +08:00
liruifengv
85338e9f7d
feat: add built-in update-config skill (#433)
Inline, model-invocable skill to inspect and safely edit kimi-code's own config.toml and tui.toml (copy to a candidate, Edit, validate with kimi doctor, timestamped backup, then overwrite). Also documents tui.toml on the config files page (en + zh).
2026-06-04 21:41:54 +08:00
liruifengv
6a4e4c75d4
feat(cli): add doctor command for config validation (#431)
* feat(cli): add doctor command for config validation

* fix(cli): format doctor validation errors

* fix(cli): validate doctor config through SDK RPC

* chore(changeset): simplify doctor release note
2026-06-04 21:15:18 +08:00
Luyu Cheng
beb12ac021
feat: add upcoming goal queue (#393) 2026-06-04 20:43:04 +08:00
7Sageer
7856c03176
fix: avoid runtime check rpc (#432) 2026-06-04 20:37:17 +08:00
7Sageer
be0da5ff39
fix: fail early when Git Bash is missing (#430)
* docs: mention Windows Git Bash requirement

* docs: add Windows Git Bash changeset

* fix: fail early when Git Bash is missing

* test: update goal prompt harness mock
2026-06-04 20:16:12 +08:00
Haozhe
853c5fc437
fix(nix): expose ripgrep and fd to wrapped kimi (#428)
* fix(nix): expose ripgrep and fd to wrapped kimi

- make wrapper available to the Nix build
- wrap kimi binary with ripgrep and fd on PATH
- include rg and fd in the dev shell packages

* chore(nix): add changeset for ripgrep and fd
2026-06-04 19:45:45 +08:00
liruifengv
86a42a26a1
feat: Add persistent experimental feature toggles and a TUI panel (#420)
* feat: Add persistent experimental feature toggles and a TUI panel

* test(agent-core): isolate experimental flag tests

* fix(tui): block experiments panel while busy

* refactor(experimental): merge feature query APIs
2026-06-04 18:35:41 +08:00
7Sageer
d0f8e24e9b
docs: mention Windows Git Bash requirement (#419)
* docs: mention Windows Git Bash requirement

* docs: add Windows Git Bash changeset
2026-06-04 17:04:02 +08:00
7Sageer
459826292f
fix: normalize malformed responses rate limit errors (#411) 2026-06-04 16:21:25 +08:00
_Kerman
b507beb49f
test: mock browser opener in login tests (#409) 2026-06-04 14:59:13 +08:00
liruifengv
6303bd2936
fix(tui): point error diagnostics to export debug zip (#408) 2026-06-04 14:44:41 +08:00
liruifengv
07609b41a3
fix(cli): set process title to kimi-code (#407) 2026-06-04 14:13:42 +08:00
liruifengv
15d71b5130
feat: add reload commands (#383)
* Create CONFIG_RELOAD_RESEARCH.md

* feat: add reload commands for session and tui

* Delete CONFIG_RELOAD_RESEARCH.md

* fix(tui): refresh terminal title on reload

---------

Co-authored-by: qer <wbxl2000@outlook.com>
2026-06-04 13:29:12 +08:00
7Sageer
232ed874d4
fix: scope managed OAuth credentials (#399)
* fix: scope managed OAuth credentials

* refactor: centralize managed OAuth auth resolution
2026-06-04 13:14:18 +08:00
liruifengv
07e2e0f094
fix(update): refresh target before foreground prompts (#405) 2026-06-04 13:10:20 +08:00
qer
7a4c80eae1
docs: fix docs dev and datasource navigation (#404)
* docs: fix docs dev and datasource navigation

* docs: retitle datasource plugin page
2026-06-04 12:48:42 +08:00
liruifengv
d645d7e443
fix(update): start automatic installs after fresh version checks (#403) 2026-06-04 12:29:20 +08:00
liruifengv
b2801c4dbf
fix(tui): set terminal title without renaming process (#398) 2026-06-04 11:39:46 +08:00
wenhua020201-arch
edc4aec403
docs(datasource): change guide 2026-06-04 11:35:31 +08:00
qer
d6febf1381
docs: fix documentation links (#389) 2026-06-03 23:23:28 +08:00
Nekof
6e74027fdc
fix: lowercase edit stale-content message (#387) 2026-06-03 23:20:27 +08:00
wenhua020201-arch
70ca7a9f8b
docs(zh): improve CLI section — env-vars, mcp, interaction, datasource, and more (#372)
* docs(zh+en): improve and translate CLI section — guides, config, customization, reference

zh improvements:
- interaction: add image/video paste, expand approval flow, Plan/YOLO/Auto modes
- slash-commands: add /btw, /reload, /reload-tui
- kimi-command: add kimi login, kimi acp subcommands
- environment-variables: restructure with KIMI_CODE_HOME, KIMI_DISABLE_TELEMETRY, KIMI_MODEL_* sections
- mcp: fix anchor link text
- datasource: rewrite as official plugin page (new)
- use-in-ides: ACP IDE integration for Zed/JetBrains (new)
- kimi-acp: ACP capability matrix and method coverage (new)

en: full zh→en translation of all 22 CLI pages, zh/en aligned

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: remove misplaced local-path file from upstream PR branch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: moonshot <moonshot@moonshotdeMacBook-Pro.local>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 22:56:26 +08:00
qer
aab4c6b6fc
docs: sync changelog 0.9.0 (#388)
* docs(changelog): sync 0.9.0 from apps/kimi-code/CHANGELOG.md

* docs(changelog): chore
2026-06-03 22:40:35 +08:00
github-actions[bot]
6c0afc4d9c
ci: release packages (#360)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-03 22:00:17 +08:00
Haozhe
d6473b2b37
chore(changeset): update docs URL in acp-adapter changeset (#385) 2026-06-03 21:51:16 +08:00
qer
13e6a556f8
docs: remove FAQ page (#384) 2026-06-03 21:32:17 +08:00
7Sageer
76441c21fb
fix: load root mcp json config (#382) 2026-06-03 21:13:46 +08:00
Haozhe
3eafa79f39
feat(acp): implement ACP server with session lifecycle, tool streaming, and IDE integration (#368)
This commit scaffolds the @moonshot-ai/acp-adapter package and introduces
the full ACP (Agent Communication Protocol) server implementation for
Kimi Code CLI, including:

- Scaffold @moonshot-ai/acp-adapter workspace package with build skeleton
- `kimi acp` CLI subcommand and stdout-safe logging
- ACP version negotiation and AgentSideConnection wrapper
- Auth gate for session creation
- Session lifecycle: new, list, load with history replay
- Prompt content conversion (text, image, embedded resources, resource links)
- Assistant streaming with thinking support and end-turn handling
- Tool call streaming (started, delta, progress) with result conversion (text / diff)
- Approval handling with diff/text display blocks mapped to ACP options
- Kaos read/write interface (AcpKaos) for unsaved buffer access
- Session mode (yolo/auto) and model management
- Config options builder with thinking toggle
- MCP server forwarding from ACP to harness
- Agent plan updates and available commands updates
- AskUserQuestion bridged to session/request_permission
- Plan review options surfaced through requestPermission
- Error mapping, ext_method stubs, and graceful shutdown
- IDE integration guide (Zed + JetBrains)
- End-to-end tests against ACP TS SDK client
2026-06-03 21:11:30 +08:00
_Kerman
8639105313
fix: resume subagents lazily (#380) 2026-06-03 20:16:43 +08:00
liruifengv
90879f37af
feat(cli): unify TUI dialog interaction and visuals (#363)
* feat(cli): unify TUI dialog interaction and visuals

Align every list dialog and selector to a single spec: shared selection
pointer and current-item marker, single-border header with a (type to
search) title suffix, consistent search line, and a uniform keyboard-hint
vocabulary. Replace ad-hoc exit wording (close/back/exit/dismiss) with
cancel, hardcoded pointers with the shared constant, and ▲▼ with ↑↓.

Also add fuzzy search to /provider, restyle the /model provider tabs, and
require a token with multi-field navigation in the custom-registry import.

Introduce the write-tui skill (carrying the DESIGN.md spec) and refresh
the apps/kimi-code development guide to match the current TUI architecture.

* feat(cli): drop arrow-key navigation in the plugins selector

The plugins overview and its marketplace/MCP sub-views used Left/Right to
enter and exit details. Remove that hierarchy navigation: Enter opens a
detail, Esc returns, and the arrow keys no longer jump between levels.
Update the sub-view hints from `←/Esc cancel` to `Esc cancel`.

* feat(cli): install marketplace plugins on Enter only

The marketplace install action also fired on Space, which collides with
the Space-toggle convention used elsewhere. Bind install to Enter only and
update the hint to `Enter install/update`.

* feat(cli): reword the plugin inline change hint

The inline badge shown on a changed plugin row read `pending /new`, which
was cryptic. Reword it to `require run /new to apply`. Also switch the
marketplace-install message-flow tests to Enter, matching the Enter-only
install binding.

* fix(cli): stop the editor flash when toggling a plugin

Each plugin picker's onSelect unconditionally restored the editor before
the handler re-mounted the refreshed picker, so an in-place action like
Space-toggling a plugin flashed: picker → editor → picker. Drop the
pre-restore from the overview/marketplace/MCP onSelect callbacks and let
each handler branch mount its next view; the two branches that close to the
editor (show-list, info) restore it themselves.

* feat(cli): drop /provider search and delete with D

Remove the fuzzy filter from the provider manager: no query state, search
line, or type-to-search title suffix, and Esc closes directly. With no
type-to-search to clash with, bind delete to the D key (matching /plugins)
instead of Del/Ctrl+D. Update the write-tui spec to specify D as the
delete shortcut.

* fix(cli): default thinking-capable models to thinking on

The model selector seeded a single thinking draft from the global thinking
flag, so highlighting a thinking-capable model showed Off whenever the
active model had thinking off (e.g. a non-thinking current model). Compute
the draft per model instead: the active model keeps its live state, any
other thinking-capable model defaults to On, and a ←/→ toggle is remembered
per model.
2026-06-03 19:31:07 +08:00
_Kerman
e0d28b4941
feat: allow empty /btw command (#378) 2026-06-03 19:04:45 +08:00
Luyu Cheng
6a2252343a
fix: simplify goal budget schema and fix output caps (#365) 2026-06-03 15:55:14 +08:00
_Kerman
ba7dd736a3
feat: add btw side-channel command (#338) 2026-06-03 15:54:31 +08:00
_Kerman
a6b16ce6b4
refactor: split SDK RPC client (#339) 2026-06-03 15:30:38 +08:00
jiang1997
7d1f889d3d
fix: remove hardcoded /bin/sh for external editor on Windows (#246)
Run the external editor through Node's platform shell instead of spawning
/bin/sh directly. Quote the appended temp file path per platform so Ctrl+G
works on Windows while preserving shell-style editor commands.

Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-03 15:02:25 +08:00
Haozhe
9e6972423e
feat(agent-core): detect and escalate repeated tool calls to prevent infinite loops (#364)
* feat(agent-core): add dead-end detection for repeated tool calls

- inject stronger dead-end reminder at streak 10 and force-stop turn at streak 15
- emit `tool_call_repeat` telemetry events for streak >= 2
- pass telemetry client from TurnFlow to ToolCallDeduplicator
- add comprehensive tests for dead-end stop and telemetry behavior

* fix(agent-core): tune tool-dedup thresholds and preserve isError state

- Lower repeat-reminder thresholds to 3, 5, 8 and force-stop to 12
- Force-stop no longer overrides successful tool results to isError
- Move stopTurn field into ExecutableToolSuccessResult for explicit loop-control without requiring isError
2026-06-03 14:16:14 +08:00
_Kerman
33496bd031
test: disable harness log writes by default (#362) 2026-06-03 12:55:54 +08:00