Commit graph

369 commits

Author SHA1 Message Date
_Kerman
9cef896563
fix: clarify compaction summary output target (#766) 2026-06-15 12:06:56 +08:00
oocz
18f299fd0b
mcp suport sse (#744)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Co-authored-by: yuchengzhen <yuchengzhen@moonshot.cn>
2026-06-14 18:04:26 +08:00
github-actions[bot]
93928066dc
ci: release packages (#717)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-14 09:12:54 +08:00
Haozhe
f874251288
feat(kimi-code): refresh OAuth provider models before opening model picker (#713)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
- call refreshOAuthProviderModels before /model picker opens
- add scoped refreshAllProviderModels with 'oauth' and 'all' scopes
- update tests for async picker rendering and OAuth-only refresh
2026-06-13 20:55:35 +08:00
liruifengv
1c65cbf6c3
docs(changelog): sync 0.14.2 from apps/kimi-code/CHANGELOG.md (#698)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
2026-06-12 21:42:51 +08:00
github-actions[bot]
1cb49dba5b
ci: release packages (#678)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-12 17:43:06 +08:00
liruifengv
7ca9bdfed5
fix(tui): skip re-entering plan mode on resume and scope startup flags to startup (#692)
Resuming a session that was already in plan mode with --plan crashed with
"Already in plan mode": the resume path called setPlanMode(true)
unconditionally while session replay had already restored the active plan
state. Check the session status first and only enable plan mode when it is
not active yet, in both the resume startup path and the startup session
picker.

The /sessions picker shared the same onSelect callback, so startup flags
were also re-applied on every mid-session switch, overriding the picked
session's own persisted modes. Gate the flag application behind an
applyStartupModes option that only the startup picker enables, and surface
post-switch setup errors instead of leaving them as unhandled rejections.
2026-06-12 17:41:25 +08:00
Haozhe
d1ba14562b
feat(providers): sync custom registry providers on startup refresh (#675)
* feat(providers): sync custom registry providers on startup refresh

- group registry providers by URL and retry available API keys\n- automatically add new providers and remove disappeared ones\n- coalesce duplicate source URLs to avoid false config-change reports\n- clear defaultThinking when default model is removed\n- update docs and add tests for registry sync scenarios

* fix(tui): only show provider refresh status for added models

 Skip removed / metadata-only provider updates when reporting model list changes.\n\n add: test to enforce the behavior.
2026-06-12 17:08:40 +08:00
liruifengv
7f0dde2ece
fix(tui): gate terminal progress sequences behind OSC 9;4 support (#690)
iTerm2 interprets any OSC 9 payload as a desktop notification, so the
ConEmu-style 9;4 progress sequence (re-sent every second by the progress
keepalive) flooded users with notifications. Only emit progress on
terminals known to implement OSC 9;4: Windows Terminal, ConEmu, Ghostty,
and WezTerm.
2026-06-12 16:49:00 +08:00
liruifengv
8d251f8ab4
feat(config): tolerate invalid config.toml sections instead of failing startup (#689)
* feat(config): tolerate invalid config.toml sections instead of failing startup

Schema errors now drop only the offending sections (single entries for
providers/models) with a warning, so a typo no longer prevents startup or
drops the login state. TOML syntax errors still fail fast with the parse
location. Mid-run reloads keep the last good config when the file breaks.

Warnings surface via the new getConfigDiagnostics API: as a startup notice
in the TUI, on stderr in print mode, and in the status bar after /new.

Write paths stay strict so a broken file is never silently rewritten, and
now fail with a short actionable message instead of raw validation JSON;
the /provider TUI flow and the kimi provider CLI report these errors
instead of crashing on an unhandled rejection.

* fix(config): keep entry-keyed sections when one entry has multiple issues

A providers/models entry with several validation issues was deleted by the
first issue, and the remaining issues from the same safeParse pass then
escalated to deleting the entire section — one badly-typed custom provider
could drop every provider, including the managed OAuth login. Issues on
entry-keyed sections now only ever target the entry itself; once it is
gone, later issues are no-ops.
2026-06-12 15:56:13 +08:00
7Sageer
c1191f5794
test: redact internal endpoint fixtures (#688) 2026-06-12 15:05:26 +08:00
Haozhe
1b55185f84
fix(changeset): downgrade agent-core and kimi-code bumps from minor to patch (#687)
Update .changeset/qualify-sub-skill-names.md to use patch instead of minor for both packages.
2026-06-12 15:02:49 +08:00
liruifengv
ad239cb1c0
fix(cli,tui): allow --auto, --yolo, and --plan with resumed sessions (#683)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
* fix(cli,tui): allow --auto, --yolo, and --plan with resumed sessions

* docs(cli): update flag conflict docs for resumed sessions

* fix(tui): apply startup permission/plan overrides after picker selection
2026-06-12 14:17:12 +08:00
_Kerman
dff9fd4e32
chore: use raw query imports for prompt sources (#682) 2026-06-12 11:47:44 +08:00
_Kerman
2f7218cba4
test: fix resume test assertions for compaction replay records (#681) 2026-06-12 11:32:30 +08:00
liruifengv
e900854be8
docs(changelog): sync 0.14.1 from apps/kimi-code/CHANGELOG.md (#680) 2026-06-12 11:27:49 +08:00
Haozhe
c39c62590d
feat(skill): qualify sub-skill names with parent prefix (#651)
* feat(skill): qualify sub-skill names with parent prefix

- qualify sub-skill names with parent prefix and set isSubSkill metadata\n- hide sub-skills from the model skill listing
- expose sub-skills as dotted slash commands in TUI
- update slash command docs for English and Chinese
- align built-in sub-skill local names with their directories
2026-06-12 11:12:52 +08:00
_Kerman
911e7c3fcf
fix: replay compaction records on resume (#617) 2026-06-12 11:10:52 +08:00
_Kerman
dcf30754d0
feat: stream shell tool output (#676) 2026-06-12 11:10:20 +08:00
github-actions[bot]
0a3e87f05a
ci: release packages (#629)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-12 10:54:44 +08:00
liruifengv
596cadd465
feat: support always-thinking models via supports_thinking_type (#662)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
Map the /models three-state supports_thinking_type field ('only' /
'no' / 'both', taking precedence over the legacy supports_reasoning
boolean) onto the existing always_thinking capability:

- oauth: parse the field in both /models parsers; 'only' emits
  always_thinking alongside thinking, 'no' suppresses thinking even
  when supports_reasoning is set, absent falls back to the legacy
  boolean. Default thinking selection is forced on for 'only' (and
  off for 'no') models during login and provider refresh
- TUI: render the thinking control with a fixed On/Off layout — locked
  models show a greyed-out "Off (Unsupported)" segment, and
  non-thinking models mirror the style with "On (Unsupported)"
- agent-core: clamp thinkingLevel at the getter so a stale
  thinking-off config can never reach the request builder, status
  events, or subagent inheritance
- acp-adapter: derive alwaysThinking from capabilities, collapse the
  thinking select to a single locked "on" entry, and ignore off
  requests for locked models while re-emitting the snapshot
2026-06-11 23:16:02 +08:00
liruifengv
1e2e679693
feat: add tips banner below welcome panel on startup (#655)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
* chore: ignore .worktrees directory

* feat: add tips banner below welcome panel on startup

- Fetch active/fallback tips from the configured CDN with a 3s timeout.

- Filter tips by semver, client version, and date range.

- Render the banner directly below the welcome panel on startup/resume.

- Support tag, multi-line text, subtext, automatic wrapping, and narrow-terminal safety.

* refactor(tui): use theme color methods in banner component

Replace raw chalk calls with currentTheme helpers: tag uses
boldFg('primary'), main text uses boldFg('textStrong'), and subtext
uses fg('textDim') without stacking the dim modifier on the already
dim shade. Strengthen tests to assert the exact themed ANSI output.
2026-06-11 22:20:31 +08:00
7Sageer
0927f79883
fix: cancel active turns during session shutdown (#661)
* fix: cancel active turns during session shutdown

* fix: preserve background agents during session close
2026-06-11 20:52:50 +08:00
7Sageer
0381329570
fix: send responses system prompts as instructions (#658) 2026-06-11 19:32:26 +08:00
_Kerman
588cdaa152
chore: remove pnpm catalog usage (#653) 2026-06-11 17:21:42 +08:00
_Kerman
ff80327344
fix: propagate kaos env overlays (#654) 2026-06-11 17:21:32 +08:00
_Kerman
a2c5e1be25
fix: add minor improvements for Mira (#649) 2026-06-11 15:50:33 +08:00
_Kerman
54302ad612
fix: scope interactive agent requests (#648) 2026-06-11 15:37:09 +08:00
liruifengv
a58b5b20bb
fix(skill): polish builtin skills KIMI_CODE_HOME resolution (#644)
- custom-theme.md, update-config.md, mcp-config.md now resolve KIMI_CODE_HOME first.

- custom-theme.md requires clarifying intent before creating or editing themes.

- custom-theme.md falls back to plain-text questions in auto mode.
2026-06-11 14:53:46 +08:00
_Kerman
1b58aa8cdf
fix: allow YOLO when starting swarm tasks (#645) 2026-06-11 14:34:35 +08:00
wenhua020201-arch
e37d7e5837
docs: note datasource latest version and manual update flow (#646)
* docs: note datasource latest version and manual update flow

* docs: align datasource version with marketplace manifest (3.2.0)

* docs: tighten datasource update wording
2026-06-11 14:31:40 +08:00
_Kerman
4e5043b03b
fix: require AgentSwarm to run alone (#643)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
2026-06-11 13:58:35 +08:00
7Sageer
30459af6ab
fix: clean up background tasks on session exit (#641)
* fix: clean up background tasks on session exit

* Stop background tasks on session close

Change versioning for agent-core and kimi-code to patch.

Signed-off-by: 7Sageer <12210216@mail.sustech.edu.cn>

---------

Signed-off-by: 7Sageer <12210216@mail.sustech.edu.cn>
2026-06-11 11:35:34 +08:00
qer
71f5926d0e
feat(datasource): add yuandian_law legal data source + request-id trace (#611)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
- Register the yuandian_law (元典法律数据库) data source for Chinese
  laws/regulations and judicial case search.
- Append a request-id / tool-call-id trace line to every tool result so
  failures can be correlated with backend logs.
- Fix the documented MCP tool names in SKILL.md (-data -> _data).
- Also includes the dev marketplace-server env isolation fix in dev.mjs.

Co-authored-by: qer <Anna_Knapprfr@mail.com>
2026-06-10 22:29:51 +08:00
7Sageer
d8cdebf3c0
fix: stop silently dropping unsupported multimodal content in kosong providers (#632)
Some checks are pending
CI / build (push) Waiting to run
CI / test (push) Waiting to run
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
Nix Build / Check flake.nix workspace sync (push) Waiting to run
Nix Build / nix build .#kimi-code (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
* fix: stop silently dropping unsupported media in provider conversions

* fix: keep non-standard audio/video parts off the chat completions wire
2026-06-10 21:39:03 +08:00
Cyning12
42a104a840
docs: align getting-started Node.js requirement with package engines (#622)
Fixes misleading npm install prerequisite (24.15.0) so docs match
apps/kimi-code package.json engines.node >=22.19.0.

Co-authored-by: cyning <cyning12@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-10 21:31:32 +08:00
liruifengv
296142544e
feat: alias search and two-line descriptions for slash command autocomplete (#631)
* feat: search slash command aliases in autocomplete

Slash-command name completion now matches aliases and shows them in the
label as `name (alias1, alias2)` when the match came from an alias.
Argument completion resolves aliases too. The intercepted completion
keeps the inner provider's conventions: argument hints stay in the
suggestion description, and primary-name matches outrank alias matches
on score ties.

* feat: wrap autocomplete descriptions onto up to two lines

Long slash command / skill descriptions used to be truncated to a single
line in the completion menu. CustomEditor now swaps the slash menu's list
for a WrappingSelectList that wraps descriptions to at most two lines,
ellipsizing past the second; non-slash completion keeps pi-tui's
single-line list.

Plain-text truncations also strip the trailing ANSI reset that pi-tui's
truncateToWidth appends — embedded inside the theme colouring it reset
the rest of the row, so a selected row with a truncated name rendered
its two description lines in different colours.

* chore: make changeset wording user-facing

* style: pass optional description directly instead of conditional spread

Follows the AGENTS.md convention for optional object properties.
2026-06-10 21:26:36 +08:00
liruifengv
fabc3b218f
docs: limit changelog TOC to version headings (#633) 2026-06-10 21:15:41 +08:00
liruifengv
89097aa02c
docs: sync changelog 0.13.1 & 0.14 (#620)
* docs(changelog): sync 0.13.1 from apps/kimi-code/CHANGELOG.md

* docs(changelog): sync 0.14.0 from apps/kimi-code/CHANGELOG.md
2026-06-10 20:54:26 +08:00
Haozhe
7ec738c4a1
fix(agent-core): suppress premature stream close on shell timeout or kill (#604)
- Add terminating-state guard to skip ERR_STREAM_PREMATURE_CLOSE when a process is killed or times out
- Ensure timeout/kill reason is reported instead of the internal stream error
- Add changeset for agent-core and kimi-code
2026-06-10 20:02:47 +08:00
Haozhe
0ee91066ea
fix(acp-adapter): convert Unix paths to Windows separators for ACP file RPC (#628)
- fix readTextFile and writeTextFile to use backslash separators on win32
- add changeset for acp-adapter and kimi-code
2026-06-10 20:00:54 +08:00
github-actions[bot]
ecc0496115
ci: release packages (#621)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-10 18:31:01 +08:00
7Sageer
856ec00290
fix: preserve tool result images in chat completions (#626) 2026-06-10 18:09:53 +08:00
qer
b253a82a7a
feat(agent-core): add Interrupt hook for user-interrupted turns (#607)
Fires an observation-only Interrupt event when a turn is aborted by the user (e.g. pressing Esc). Previously neither Stop nor StopFailure fired on interrupt, so external tooling that tracks status from hooks stayed stuck on a working state.
2026-06-10 15:35:25 +08:00
github-actions[bot]
3f9226f014
ci: release packages (#608)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-10 15:11:40 +08:00
liruifengv
1fbe0e4ee8
fix: truncate goal marker text to terminal width (#619) 2026-06-10 15:09:33 +08:00
_Kerman
b853823609
chore: undo selector as a patch (#618) 2026-06-10 14:44:51 +08:00
_Kerman
494554eac5
feat: add undo selector (#615) 2026-06-10 14:22:02 +08:00
Haozhe
4603d8ad6e
feat(protocol): extract shared protocol package from agent-core (#612)
* feat(protocol): extract shared protocol package from agent-core

- add `@moonshot-ai/protocol` package with REST/WS schemas, envelopes, error codes, event types, and display schemas\n- migrate agent-core `events.ts` and `display/schemas.ts` to re-export from protocol
- add centralized `onUnexpectedError` handler for safe emitter listener callbacks
- reject forkSession when source session has an active running turn
- add protocol schema tests and unexpectedError handler tests
2026-06-10 14:03:38 +08:00
7Sageer
95a124804e
chore: downgrade Fable 5 changeset to patch (#614) 2026-06-10 13:54:27 +08:00