Commit graph

344 commits

Author SHA1 Message Date
qer
c1ec37251e
feat(kap-server): add remote control device deletion (#4192) (#4195)
* feat(kap-server): add remote control device deletion

* fix(kap-server): coordinate with the local tunnel before deleting this machine's device

Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-10-13 20:55:09 +08:00
liruifengv
c69bd6c5a0
feat(kap-server): add remote control device management (#4169)
* feat(kap-server): add remote control device management

* feat(remote-control): tag share URLs with the caller's platform source

The share link's from query parameter was hardcoded to kimi_code_cli, so
links created by the desktop app were mislabeled as CLI traffic.

buildRemoteControlUrl now takes the source explicitly and
RemoteControlOptions carries it as urlSource; kap-server threads
hostIdentity.platform through, so desktop hosts produce
from=kimi_code_desktop while CLI hosts keep from=kimi_code_cli.

* fix(kap-server): stop the local tunnel when the current device is deactivated or deleted

The device management routes only called the cloud API. When the target
device is the machine itself, the local tunnel kept running: after the
relay drops it, the client reconnects and re-registers, so the device
came back online (or was recreated after a delete) and the local status
never returned to off.

After a successful cloud deactivate/delete of the current device, the
routes now also disable the local tunnel manager.

* feat(kap-server)!: drop the remote-control device delete route

Device removal is collapsed to a single deactivate verb: the desktop UI
deactivates devices instead of deleting them, so the DELETE
/remote-control/devices/{id} route and the device client's deleteDevice
go away before this API ever ships.

* feat(kap-server): carry the lock holder in the already-running error

The enable route now returns the RemoteControlAlreadyRunningError holder
(pid, local origin, device id, url, started_at) in the error envelope's
details, documented with a details schema, so desktop can render a
structured conflict state instead of the raw message.

* feat(kap-server): expose the lock conflict in the remote control status

The manager now surfaces the holder when its last enable error is an
already-running lock conflict, and GET /remote-control returns it as a
structured conflict field, so clients can present the conflict state
proactively instead of parsing the error message.

* feat(kap-server): resolve the remote control lock conflict live in status

GET /remote-control now re-inspects the machine lock whenever the
manager is off: a live holder is reported as the conflict even without
a prior enable attempt in this process, and a stored conflict plus its
error text are dropped once the holder's process is gone. Panel state
refreshes such as after device deactivation now reflect reality.

* feat(kap-server): wait for the lock holder to release on current-device deactivation

When the deactivated device is the machine's own and the lock is held
by another live process (e.g. a CLI instance whose tunnel the relay is
about to terminate with user_requested), the route now polls the lock
for up to two seconds before responding, so a client's immediately
following status read sees the settled conflict-free state.

* style(kap-server): silence promise-executor-return in lock release wait

* test(remote-control): pass urlSource in the close-reason cases

* feat(kap-server)!: register remote control devices with the host product name

* refactor(cli): source the remote control identity from app constants

* fix(remote-control): make starts cancellable and harden logout cleanup

* fix(remote-control): close the remaining cancellation and invalidation races

* fix(kap-server): sweep remote control cleanup once more after logout

* docs: note the lock-release failure of remote control deactivation

* fix(remote-control): key cloud sessions by credential and settle cancelled starts

* fix(kap-server): block remote control starts during logout and serialize tunnel toggles

* fix(kap-server): gate local starts during current-device deactivation

* fix(kap-server): match active tunnel ids on deactivation and re-clear sessions after logout

* fix(kap-server): serialize Kimi logouts, harden lock cleanup, and whitelist device fields

* fix(remote-control): abort pending handshakes on close and answer logout before tunnel teardown

* fix(remote-control): cancel enables that are still queued behind a pending disable

* fix(kap-server): recognize foreign logout gates and retry post-logout tunnel teardown

* fix(remote-control): verify the machine lock after disable and recheck deactivation

* feat(kap-server): export loadOrCreateServerToken for host token provisioning
2026-10-13 17:40:24 +08:00
grapedge
afd95f64a5
feat(tui): unify skill prompts and steering (#4165) 2026-10-13 12:17:14 +08:00
Kai
0a3a2fbafa
feat: add NotifyUser progress display to desktop and web (#4159)
* feat: show NotifyUser progress in desktop and web

Give NotifyUser a one-line title, report the latest update on the
session status, and forward subagent updates to the parent so GUI
clients can show them on subagent cards.

* feat: turn on NotifyUser progress updates by default

Flip the notify_user flag default to true; the flag stays as the opt-out
(`[experimental] notify_user = false` or KIMI_CODE_EXPERIMENTAL_NOTIFY_USER=0).
Register the new subagent.update wire record in the vis renderers and
record-type union so the manifest coverage test passes.

* refactor: trim NotifyUser surfaces to conversation progress rows

* feat: make NotifyUser title optional and enforce single-line titles

* feat: make NotifyUser opt-in via the settings lab

* docs: describe NotifyUser as off by default with the settings lab opt-in
2026-10-12 17:01:36 +08:00
Haozhe
c151d5a3d0
feat(agent-core-v2): add KIMI_CODE_LLM_HEADERS_TIMEOUT_MS for llm headers timeout (#4092)
* feat(agent-core-v2): add KIMI_CODE_LLM_HEADERS_TIMEOUT_MS for llm headers timeout

* fix(agent-core-v2): harden KIMI_CODE_LLM_HEADERS_TIMEOUT_MS proxy fallback and range
2026-10-12 13:51:39 +08:00
qer
242ac23000
feat(cli): launch desktop with kimi app (#4145)
* feat(cli): launch desktop with kimi app

* fix(cli): report desktop opener failures and complete command tests

* fix(cli): resolve system openers from filesystem roots
2026-10-09 15:08:24 +08:00
liruifengv
5b93669767
feat(kap-server): add allow_ignored_globs to fs:list for un-ignoring named paths (#4058)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (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
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
* feat(kap-server): add allow_ignored_globs to fs:list for un-ignoring named paths

The list filter keeps gitignored entries hidden unless they match the
new allow_ignored_globs request field, letting callers surface
specific ignored paths (e.g. .tmp) while the rest of gitignore still
applies.

* docs: document allow_ignored_globs in the fs:list API reference

* fix: traverse ignored ancestor directories of allow_ignored_globs matches

A nested allow glob such as ignored-dir/keep.txt or ignored-dir/** used
to be unreachable in recursive listings because the ignored parent was
skipped before any child could match. Keep an ignored entry when it is a
literal-prefix ancestor of an allowed glob (directories only), and
document that dot-path allowances additionally require show_hidden.

* fix: match ignored ancestor directories across wildcard glob segments

The literal-prefix check still dropped ancestors when a directory
segment of an allow glob contained a wildcard, e.g. ignored-*/keep.txt
or ignored-dir/**/keep.txt. Decide reachability by consuming the
candidate path segment-wise against a prefix of the glob instead.

* fix: correct and harden workspace fs glob matching

Compile **/ to (?:[^/]+/)* so recursive wildcards preserve path
segment boundaries; a/**/b no longer matches a/xxb. This affects
include_globs, exclude_globs, and allow_ignored_globs across
fs:list / fs:search / fs:suggest / fs:grep.

Match glob prefixes iteratively in globCanMatchBelow so deeply
segmented globs cannot exhaust the call stack.

* chore: add changesets for allow_ignored_globs and the glob boundary fix

* fix: satisfy noUncheckedIndexedAccess in the glob prefix grid

* fix: restrict globstar segment expansion to whole path segments

foo**/keep.txt regressed when **/ gained segment-boundary semantics:
the stars sat mid-segment but were expanded as a whole-segment
globstar. Only expand **/ when the stars open a path segment, treat
mid-segment stars as an ordinary within-segment wildcard, and keep a
trailing ** matching across segments as before.

* fix: match workspace fs globs with picomatch and probe speculative ancestors

Replace the hand-rolled glob compiler with picomatch, the standard
engine already used elsewhere in the package, which settles segment
boundary, mid-segment globstar, and deep-pattern complexity edge
cases for good. An ignored directory kept only as a possible ancestor
of an allow glob is now probed (depth and entry capped, fail-open) and
withheld when no descendant actually matches.

* fix: cast readonly glob list for picomatch isMatch

* fix: parse globs whole in the ancestor check and share the probe budget

Splitting allow globs on '/' corrupts brace and extglob constructs
that contain slashes; take path segments from picomatch.scan instead
and fall back to a conservative answer for opaque single-token globs,
letting the descendant probe decide visibility with whole-pattern
matching.

Probe budgets are now shared across one fs:list request instead of
resetting per candidate directory, so a tree full of speculative
ancestors cannot multiply filesystem operations.

* fix: tolerate empty globs and slash-bearing alternatives

picomatch throws on empty patterns where the old compiler simply
never matched, turning previously valid requests into server errors;
filter them out up front. Brace and extglob alternatives that embed
a slash inside one scanned part now fall back to the conservative
ancestor answer as well, leaving visibility to the whole-pattern
descendant probe.

* fix: disable picomatch negation in workspace fs globs

A leading exclamation mark was a literal character in the old
matcher, so exclude_globs like !foo only matched a path literally
named !foo; as a picomatch negation the same request would exclude
everything except foo. Pin the prior semantics with nonegate.

* fix: scan allowance globs with nonegate and skip empty segments

The scan call still used default negation, stripping a literal
leading bang from allowance prefixes like !foo/keep.txt. Consecutive
separators produced empty scanned segments that made picomatch throw
during prefix compilation; empty segments now simply match nothing.

---------

Co-authored-by: qer <wbxl2000@outlook.com>
2026-10-08 18:21:54 +08:00
Luyu Cheng
20a2cea72f
feat: cap WaitFor at 90s and let new input end the wait (#4061) 2026-09-29 18:52:09 +08:00
7Sageer
1f6f0b1fa2
feat: trust workspace via KIMI_CODE_TRUST_WORKSPACE env var (#4059)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (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
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
* feat: trust workspace via KIMI_CODE_TRUST_WORKSPACE env var

* fix: honor trust env override in MCP registry and untrust route

* test: add getEnv to mcpManagement bootstrap mock

* test: fold trust-env route case into existing workspaces suite

* fix(cli): mention KIMI_CODE_TRUST_WORKSPACE in the print-mode MCP trust warning

* docs: describe KIMI_CODE_TRUST_WORKSPACE by its semantics, not its MCP effect
2026-09-28 17:03:52 +08:00
liruifengv
be7d5f5fea
docs(changelog): sync 2.1.1 from apps/kimi-code/CHANGELOG.md (#4018)
Some checks failed
CI / build (push) Has been cancelled
CI / test (1) (push) Has been cancelled
CI / test (2) (push) Has been cancelled
CI / test (3) (push) Has been cancelled
CI / test (4) (push) Has been cancelled
CI / test (5) (push) Has been cancelled
CI / test-pi-tui (push) Has been cancelled
CI / test-vscode-legacy (push) Has been cancelled
CI / test-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
Nix Build / Check flake.nix workspace sync (push) Has been cancelled
Release / Release (push) Has been cancelled
Publish VS Code extension / Publish VSIX to marketplaces (push) Has been cancelled
Nix Build / nix build .#kimi-code (push) Has been cancelled
Release / Deploy docs (push) Has been cancelled
Release / Native release artifact (push) Has been cancelled
Release / Publish native release assets (push) Has been cancelled
2026-09-24 15:47:04 +08:00
Haozhe
c7dd84124a
feat: turn filesystem watch back on by default (#4015) 2026-09-24 14:50:10 +08:00
7Sageer
929403b6db
revert: roll back workspace trust-boundary hardening (#4013)
* revert: roll back workspace trust-boundary hardening

Roll back the hardening added in #3964 that guarded against malicious
content inside an already-trusted repository:

- background git invocations no longer override repo-local git config
  (fsmonitor, hooksPath, filters, drivers, gpg, editor)
- agent file tools no longer re-resolve paths through symlinks
- project-local local.toml applies without workspace-trust gating,
  additional_dir entries are no longer rejected for resolving to the
  home directory or filesystem root, and writing it is auto-approved
  again inside a git worktree

Kept, since they only affect the pre-trust window or the trust prompt
itself: the fail-closed trust prompt and lazy footer git detection.

* Update revert-trust-boundary-hardening.md

Signed-off-by: 7Sageer <sag77r@hotmail.com>

---------

Signed-off-by: 7Sageer <sag77r@hotmail.com>
2026-09-24 14:49:36 +08:00
liruifengv
a1e4c13d41
docs(changelog): sync 2.1.0 from apps/kimi-code/CHANGELOG.md (#4006)
Some checks are pending
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (push) Waiting to run
CI / lint (push) Waiting to run
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (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 / Native release artifact (push) Blocked by required conditions
Release / Release (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Publish native release assets (push) Blocked by required conditions
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
* docs(changelog): sync 2.1.0 from apps/kimi-code/CHANGELOG.md

* docs(changelog): shorten the fullscreen TUI entry to how to enable it

* docs(changelog): reword the fullscreen TUI entry
2026-09-23 21:08:50 +08:00
grapedge
e17ff67928
feat(kimi-code): add TUI mode setting for fullscreen layout (#4004) 2026-09-23 20:14:52 +08:00
Haozhe
b3212fd9ab
fix(remote-control): pick credential slot and relay from login region (#3969)
* fix(remote-control): pick credential slot and relay from login region

Global login stores tokens in kimi-code-env-*.json and should use
code-rc.kimi.ai; Remote Control always read kimi-code.json and
code-rc.kimi.com. Resolve both from the persisted oauth ref.

* fix(telemetry): skip the dead global collector and keep shutdown alive

The global collector host has no DNS. Drop it from the region profile and
skip the send instead of falling back to the mainland endpoint. Keep the
shutdown timeout timer referenced so a failed flush cannot exit before the
TUI hands the process to the foreground server.

* fix(remote-control): require explicit relay origin and drop hardcoded .com defaults
2026-09-23 18:10:47 +08:00
7Sageer
a54e6f6a9b
feat(agent-core-v2): add KIMI_CODE_REPEAT_BREAKER env switch (#3995)
* feat(agent-core-v2): add repeat_breaker config switch

Add a top-level repeat_breaker boolean (default true) to config.toml,
overridable with the KIMI_CODE_REPEAT_BREAKER env var. When disabled,
the agent skips repeat reminders and forced stops on consecutively
repeated identical tool calls; same-step dedupe is unaffected.

* Update repeat-breaker-config-switch.md

Signed-off-by: 7Sageer <sag77r@hotmail.com>

* feat(agent-core-v2): add tool_dedupe config switch

* refactor(agent-core-v2): drop the tool_dedupe config switch

Same-step dedupe stays always on. repeat_breaker remains the only public switch.

* refactor(agent-core-v2): read the repeat breaker from the environment only

KIMI_CODE_REPEAT_BREAKER is the only switch. Unset keeps reminders and forced stops on.

---------

Signed-off-by: 7Sageer <sag77r@hotmail.com>
2026-09-23 18:00:59 +08:00
7Sageer
6451f1e056
fix: harden workspace trust boundaries across git, file tools, and the local web server (#3964)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (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
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
* fix(kap-server): reject malformed and null Origins

isOriginAllowed conflated an unparseable Origin header with an absent
one and allowed both, so a sandboxed document (Origin: null) passed the
WebSocket upgrade check and had its Origin echoed by the CORS hook.
An absent Origin is still allowed for non-browser clients, but a
present Origin that fails to parse, is null, or uses a non-http(s)
scheme is now rejected: the WS upgrade responds 403 and the CORS hook
withholds Access-Control-Allow-Origin.

* fix(kimi-code): sync web bundle for kimi_origin query gating

* fix(agent-core-v2): gate workspace local.toml behind trust and tighten additional_dir

* fix(agent-core-v2): block symlink escapes in agent file tools

* fix: harden background git invocations against repo-local config

* fix(agent-core-v2): close trust-gate gaps in add-dir and additional_dir validation

* fix: neutralize repo-configured clean and process filters in hardened git calls

* fix(agent-core-v2): fail closed when a path is too deep to verify

* fix: probe worktree-scoped filter config in hardened git calls

* fix: fail closed when git filter discovery fails and cache probes for repo subdirectories

* fix(agent-core-v2): block symlink aliases of the project-local config in write tools

* fix: neutralize smudge, merge drivers, and repo-controlled commit signing in hardened git calls

* fix: expand included git configs when discovering repo-defined drivers

* Revert "fix(kimi-code): sync web bundle for kimi_origin query gating"

This reverts commit cd6af49cf1dfebe505f0e890453c3207a74d3e80.

* fix: keep git hardening fail-closed on includes and probe failures in scanners

* fix: fail closed on uncodable driver names and disable repo-controlled signature verification

* fix: neutralize repo-controlled editors and match include sections case-insensitively

* fix: probe config names only and reject dangling symlinks in file tools

* fix: fail closed when core.worktree escapes the repository

* fix(agent-core-v2): match project config paths across separators and case

* fix: arm footer git only after workspace trust persists

* fix(agent-core-v2): check resolved sensitive targets for absolute outside paths

* fix: only skip git config caching for actual include sections

* refactor: share git config hardening primitives between agent-core-v2 and the CLI

* fix(agent-core-v2): clear trusted additional dirs synchronously on trust revocation

* fix(agent-core-v2): compare resolved write targets with Windows path semantics

* fix: fail closed when the git directory disappears during hardening probes

* refactor: move shared git hardening primitives into @moonshot-ai/git-hardening

* fix: close symlinked-gitdir and submodule-recurse gaps in git hardening

* fix(agent-core-v2): reject home-directory ancestors as additional_dir roots

* fix: compare core.worktree with Windows path semantics

* fix: skip git config probes on renders after a negative repo detection

* fix: resolve gitfile pointers against the .git file directory and match includeIf sections

* test: drop duplicated symlink and plain-file cases covered elsewhere

* fix: only treat project-config writes as aliased when the lexical path misses the config pattern

* test: move the realpath guard matrix into a module test

* test: cover git-hardening primitives in the shared package

* refactor: inline git hardening helpers and drop the shared package

Keep the constants and parsers next to the async engine spawn path and
the sync CLI spawn path instead of a third workspace package.

* refactor: drop footer git trust gate and config probing

Workspace trust is a process-level decision, so the TUI never mounts
the footer until the user has trusted. Footer git status now uses
static hardening flags only.

* refactor: route git execution through IGitService.runGit

- Add runGit(cwd, args, options) to IGitService as the public door for
  running git with repo-local config hardening applied.
- GitService implements runGit using the existing hardenedGitConfigArgs
  helper; status/diff now delegate to it.
- collectGitContext drops its own spawn/probe logic and calls
  IGitService.runGit instead, receiving the service through the
  promptPrefix context.
- Tower keeps its own git() function (accepted gap).

* refactor: move git hardening helpers to app/git/hardening

* Revert "fix(kap-server): reject malformed and null Origins"

This reverts commit b799a21d0390ff0e4e66437f0d7b90c0b8171efe.
2026-09-22 21:30:34 +08:00
qer
7ad0c46682
feat(plugins): update kimi-webbridge plugin to the 2.0.11 skill (#3961)
* feat(plugins): update kimi-webbridge plugin to the 2.0.11 skill

Bring the official plugin in line with the Kimi Browser Extension 2.x
daemon: document the ok/data response envelope, self-serve daemon
recovery via start, the movable listen address (10086 is only the
default), file-body retries on macOS/Linux, and the rewritten
operations reference (CLI subcommands, disk layout, new status
fields). Sync the manifest and marketplace versions to 2.0.11 and
point the help links at the new product pages.

* fix(plugins): point the Browser Extension help links at the canonical product path

The site canonicalizes /products/kimi-webbridge to
/products/kimi-browser-extension; ship the final URL in the skill,
manifest, and docs instead of relying on the redirect.
2026-09-22 12:57:23 +08:00
liruifengv
6a52dd781b
feat(config): add auto_session_title config option (#3962)
* feat(config): add auto_session_title config option

* chore: drop changeset, changelog entry ships with kimi-code-app instead
2026-09-21 19:55:40 +08:00
liruifengv
99eaa993ba
docs(changelog): sync 2.0.2 from apps/kimi-code/CHANGELOG.md (#3936)
Some checks failed
CI / test (3) (push) Has been cancelled
CI / test (4) (push) Has been cancelled
CI / test (5) (push) Has been cancelled
CI / test-pi-tui (push) Has been cancelled
CI / test-vscode-legacy (push) Has been cancelled
CI / test-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
CI / typecheck (push) Has been cancelled
CI / test (2) (push) Has been cancelled
CI / build (push) Has been cancelled
CI / test (1) (push) Has been cancelled
Nix Build / Check flake.nix workspace sync (push) Has been cancelled
Release / Release (push) Has been cancelled
Publish VS Code extension / Publish VSIX to marketplaces (push) Has been cancelled
Nix Build / nix build .#kimi-code (push) Has been cancelled
Release / Deploy docs (push) Has been cancelled
Release / Native release artifact (push) Has been cancelled
Release / Publish native release assets (push) Has been cancelled
* docs(skill): list all entries for versions with 10 or fewer upstream entries in sync-changelog

* docs(changelog): sync 2.0.2 from apps/kimi-code/CHANGELOG.md
2026-09-19 20:54:09 +08:00
Haozhe
f17a22ebf4
feat: turn off filesystem watch by default (#3931)
* feat: turn off filesystem watch by default

* test: enable filesystem watch explicitly in watch-dependent suites
2026-09-19 20:17:47 +08:00
liruifengv
2cedfaf125
fix(kap-server): deliver session-level interaction events past agent filters (#3901) 2026-09-19 12:05:34 +08:00
liruifengv
1815096590
docs(changelog): sync 2.0.1 from apps/kimi-code/CHANGELOG.md (#3912) 2026-09-18 21:41:35 +08:00
liruifengv
92c3c59b22
feat: expose resolved base_url on models.dev catalog provider items (#3909)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (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 / Publish native release assets (push) Blocked by required conditions
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
Release / Deploy docs (push) Blocked by required conditions
Release / Native release artifact (push) Blocked by required conditions
2026-09-18 20:43:06 +08:00
Haozhe
a80fe31cff
fix(agent-core-v2): stop workspace watchers from listing a flooded project root (#3892)
* fix(agent-core-v2): avoid root watch inventory and add a kill switch

Watch concrete candidate paths so a flooded project root cannot fill the V8 heap. Allow disabling every watcher with [watch] enabled or KIMI_CODE_WATCH.

* fix(agent-core-v2): stop watching the whole .kimi-code directory

Watch missing config files on the file path itself so session writes do not reload.
2026-09-18 15:24:05 +08:00
7Sageer
c5ad17f06a
feat(agent-core-v2): support api_key_env for provider credentials (#3762)
* feat(agent-core-v2): support api_key_env for provider credentials

Providers can declare api_key_env = "VAR" in config.toml to read their
Bearer token from an environment variable instead of storing it inline.
The value is resolved per request (rotation-friendly); an unset or empty
variable fails with config.invalid naming the provider and variable.
apiKey+apiKeyEnv and apiKeyEnv+oauth are rejected as conflicts.

The /models refresh path resolves the same chain (inline apiKey ->
apiKeyEnv -> env sub-table); a provider whose variable is unset lands in
failed[] without affecting others, and open-platform providers keep the
env declaration instead of persisting the resolved secret.

Custom registries: applyCustomRegistryProvider consumes the api.json env
field — imported providers get apiKeyEnv, the legacy inline apiKey is
dropped, and a hand-edited apiKeyEnv survives refreshes (tracked via
source.envKey). kimi provider add --api-key and the TUI registry token
field are now optional so public registries import without a key.

* docs: document api_key_env provider credentials

* fix(oauth): preserve hand-edited apiKeyEnv on registry refresh and address review nits

* fix(oauth): validate apiKeyEnv conflicts during refresh and address review nits

* fix(oauth): mirror apiKeyEnv in the klient provider contract and harden refresh validation

* fix(oauth): stop auto-binding registry env names to provider credentials

* fix(oauth): preserve hand-edited apiKeyEnv across registry re-imports

* fix(oauth): scope apiKeyEnv preservation to the owning registry

* fix(agent-core-v2): preserve apiKeyEnv across models.dev catalog re-imports

* fix(kap-server): drop apiKeyEnv when the provider update route receives a replacement key

* fix(agent-core-v2): replace provider credential fields on TOML writeback

* fix(kap-server): normalize whitespace-only api_key in the provider update route

* refactor(oauth): unify provider credential rules into shared primitives

A new provider-credential module in the oauth package owns the credential
precedence chain, the mutual-exclusion conflicts, the user-facing messages,
and the write-side tri-state reconciliation; the refresh orchestrator,
agent-core-v2 (model-auth, catalog, auth readiness), and the kap-server
provider routes compose it instead of re-deriving the rules per layer.

applyOpenPlatformConfig now takes credential: {apiKey}|{apiKeyEnv} and
merges onto the existing record, so open-platform refreshes no longer drop
hand-written fields (customHeaders, the env sub-table) on the inline-key
path either, and the refresh's write-then-undo block is gone.

Registry imports converge on removeCustomRegistryEntries +
applyCustomRegistryEntries (prior-snapshot provenance): the exported
capture/restore helpers are gone, the CLI persists a re-import with a
single setConfig instead of per-id removeProvider RPCs, and
default_model/default_provider survive a re-import whenever they still
resolve. kap-server's importCustomRegistry keeps the purge-then-rewrite
two-phase replace the config service's raw-merging writeback requires.

kap-server create/replace routes accept api_key_env (tri-state, mutually
exclusive with api_key), and GET /config plus the provider catalog item
expose the binding. A declared-but-unset api_key_env now fails readiness
checks with config.invalid (was auth.token_missing), matching request-time
behavior. Registry 401/403 without a key prints an authentication hint.

* fix(cli): persist registry re-import removals on both harness generations

The v2 harness's setConfig deep-merges per domain (retaining omitted keys
and skipping undefined defaults), so a shrunk re-import left removed
providers and aliases in config.toml and kept a cleared default dangling.
The CLI and TUI registry flows now share persistRegistryImport: on v2 the
removal phase and the rebuilt records go out as two atomic
replaceConfigSections writes (the writeback merges alias fields from raw
TOML, so the purge must be persisted first); on v1 the removeProvider RPC
cascades the removals before one merge write. defaultModel/defaultProvider
snapshots are captured before any removal so the restore works on both
paths.

* fix(oauth): reject oauth before the legacy env fallback and persist cleared thinking on re-import

refreshProviderModels' env sub-table fallback now throws the same
apiKey+oauth conflict the chat path rejects, instead of authenticating
with the fallback key and rewriting the provider to drop oauth.

persistRegistryImport writes the cleared thinking section through the
replacement payload, and drops the v1 fallback branch — registry imports
always persist through replaceConfigSections, so the removal phase no
longer needs per-id removeProvider RPCs.

* chore: consolidate provider credential changesets into one entry

* chore: trim changeset to the api_key_env entry

* fix: harden provider credential status and registry imports

* fix(oauth): expose browser-safe provider credential rules

* fix(node-sdk): replace serialized provider credentials

* fix(oauth): reject credential conflicts during refresh

* fix: harden custom registry re-imports

Reject reserved provider collisions and credential endpoint drift before mutation. Replace registry-owned sections atomically with compare-and-set guards, and carry the replacement contract through klient and node-sdk.

* refactor(registry): centralize custom registry import ownership

Route CLI and TUI imports through the engine via the typed SDK and Klient operation. Keep registry replacement policy inside the engine and preserve credential edits made while fetching the registry.

Cover the shared entry point with real configuration storage and memory/IPC transport tests.

* test: trim redundant api_key_env and registry-import coverage

* fix(cli): reuse the stored registry key on keyless re-import

Both first-party clients encoded "no key given" as an empty string, but
the engine's fallback chain (options.apiKey ?? registryKeyFromExisting)
only reuses the key parked in the provider's source blob when the option
is undefined. A keyless re-import of a private registry therefore went
out without an Authorization header and failed with 401 from the CLI
and the TUI dialog, while the kap-server REST route (which passes
undefined) reused the stored key fine.

Pass undefined from the CLI handler and the TUI import dialog instead
of normalizing to ''. The dialog's result type now marks apiKey
optional, matching the engine contract.

* test: pin CAS rejection and credential-conflict behavior

The coverage trim went past redundancy in three places, leaving the
PR's headline guards untested. Restore the compare-and-set rejection
path (guarded value changed on disk -> retry error, no write) and the
absent-section guard normalization in config.test.ts, the
apiKey+apiKeyEnv / apiKeyEnv+oauth conflict rejections at runtime
resolution (modelAuth) and at the refresh orchestrator (discovery,
with per-provider failure isolation), and the open-platform refresh
through api_key_env proving the resolved secret never lands in the
provider record. Also add the first direct unit tests for the shared
declaredProviderCredential / reconcileProviderCredentialUpdate
primitives.

* refactor(oauth): share reserved provider id rules between import and refresh

* Delete .changeset/registry-import-concurrent-credentials.md

Signed-off-by: 7Sageer <sag77r@hotmail.com>

* test: trim cross-layer duplicate registry and credential coverage

---------

Signed-off-by: 7Sageer <sag77r@hotmail.com>
2026-09-17 22:02:53 +08:00
qer
25dd4ce973
feat(cli): rename the install-app subcommand to install-desktop (#3864)
install-app stays registered as a hidden alias so existing usage keeps working.
2026-09-17 14:42:11 +08:00
liruifengv
00bd3c2268
docs(changelog): sync 2.0.0 from apps/kimi-code/CHANGELOG.md (#3861)
* docs(changelog): sync 2.0.0 from apps/kimi-code/CHANGELOG.md

* docs(changelog): trim /desktop entry in English page
2026-09-17 14:08:43 +08:00
qer
34ec5d2a17
feat(cli): add /desktop slash command and kimi install-app subcommand (#3849)
* feat(cli): add /desktop slash command and kimi install-app subcommand

Both entry points print the Kimi Code desktop app page
(https://www.kimi.com/code) and open it in the default browser:
the kimi install-app subcommand from the shell, and /desktop
(alias /install-desktop) from the TUI.

* fix(cli): derive the desktop app page from the active region

Replace the hardcoded .com URL with the existing region-aware
kimiCodeOfficialInstallUrl() resolved at invocation time, so
global-region users land on the .ai site and region changes are
respected.

* docs(cli): describe the desktop app page URL as region-dependent
2026-09-16 20:53:35 +08:00
7Sageer
5653c739b9
feat(agent-core-v2): upload images as file references for Kimi models (#3784)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (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
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
* feat(agent-core-v2): upload images as file references for Kimi models

* fix(agent-core-v2): scope media upload cache by endpoint and recognize SDK auth error status

* fix(agent-core-v2): restore the stripped /v1 for kimi files uploads on the anthropic route

* feat(agent-core-v2): omit oldest media when accumulated inline media exceed the request budget

* fix(agent-core-v2): key the media upload cache by the stable JWT subject

* fix(agent-core-v2): harden media request recovery

* fix(agent-core-v2): correct image memo accounting

* feat(agent-core-v2): include saved paths in dropped media placeholders

* docs: drop the saved-path re-read guarantee from the media budget note

The guarantee does not hold for inline data-URL media (no persisted
path exists), and the runtime warning already conveys path availability
when it applies. Addresses the codex P2 review suggestion by removal.
2026-09-15 21:32:42 +08:00
HydrogenE7
7d174ac933
perf(agent-core-v2): evict completed subagent scopes behind an LRU cache (#3778)
* perf(tui): batch and cache agent swarm progress rendering

* perf(agent-core-v2): evict completed subagent scopes behind an LRU cache

* fix(agent-core-v2): stop the agent actor in the session machine when its scope is removed

* fix(agent-core-v2): emit a terminal event for the final rate-limited run and defer eviction while background tasks run

* fix(agent-core-v2): include in-flight retries when abandoning suspended agents

* fix(agent-core-v2): roll back the closing flag when scope removal fails and wait per the configured eviction timeout

* fix(agent-core-v2): terminalize subagents spawned after batch cancellation and report task timeouts as failures

* chore: restore upstream/main state of files mangled by lint-staged autofix in the merge commit

oxlint --fix rewrites (prefer-set-has, catch-error-name, prefer toSorted/.at(-1)/toReversed)
touched seven files the branch never modified; one of them (oauth managed-kimi-code.ts)
no longer typechecks. Restore all seven to their exact upstream/main state. Committed
with --no-verify so the same autofix does not re-mangle them.

* fix(agent-core-v2): retry deferred scope evictions without exhausting the attempt budget, dedupe terminal events for starting retries, and patch-level the changeset

* fix(agent-core-v2): finish scope teardown instead of reactivating a partially torn-down scope

* fix(agent-core-v2): terminalize subagent-start hook cancellations and re-acquire resume targets after metadata reads

* fix(tui): record cancelled background agents in the transcript

* fix(agent-core-v2): route mirror terminal events through the batch exactly-once guard

* fix(tui): guard terminal swarm members from re-cancellation and deliver terminal status to cancelled foreground subagent cards

* fix(agent-core-v2): classify eviction as removed when teardown already closed the scope

* Merge remote-tracking branch 'upstream/main' into perf/subagent-scope-eviction

Skip lint-staged for this merge: its oxlint --fix pass rewrites unrelated files
(prefer-set-has etc. mangled seven files in the previous merge commit), while the
merge content is upstream's lint-clean code plus conflict resolutions already
verified by oxlint.

* chore: restore upstream/main changes dropped by a stash roundtrip during the merge

A git stash/pop cycle used to isolate an unrelated flaky test reverted 82 files of the
merge result to the pre-merge branch state, so commit 375ff2a4a missed them. The
working tree already held the correct merged content; this commit restores it.

* fix(agent-core-v2): propagate the cancellation reason from turn abort to tool signals

Cancelling a turn aborted the turn's llm scope and every tool scope
without a reason, so tools and subagents only ever saw the default
AbortError and could not tell a user cancellation from a system abort.
With the swarm terminal-event classification this surfaced as
`subagent.failed` ("This operation was aborted") on Ctrl+C instead of
`subagent.cancelled`.

Carry the reason end to end: `MachineEngine.abort(reason)` sends it on
`input.abort`, the agent machine remembers it for the turn and forwards
it to `turn.abort` and to every tool scope it aborts, the turn machine
passes it to the llm scope, and the loop service hands its cancellation
(a `UserCancellationError` by default) to the engine.

* fix(agent-core-v2): stop rebuilding an evicted subagent after its caller aborts

`createAgentAwaitingClose` polled for the previous scope to finish
closing without ever looking at the caller's abort signal, so cancelling
an `Agent` or `AgentSwarm` resume during that wait still recreated the
scope afterwards. In the `Agent` path the run then rejected before any
terminal event was mirrored, leaving an idle scope that the scope cache
no longer tracked.

Thread the caller's signal into the helper and check it before every
attempt; the Agent tool passes its call controller and the swarm service
passes the attempt signal. Also trim the eviction changeset to the one
sentence the changeset rules ask for.

* fix(agent-core-v2): report task-manager aborts of a subagent as cancelled

When the task manager times out or stops a background subagent it aborts
the run with a plain reason ('Timed out', the TaskStop reason), and the
run rejects with that raw reason. The task manager therefore classifies
the task as timed_out or killed, but the mirror only recognised
`UserCancellationError` as a cancellation and emitted `subagent.failed`,
so the transcript recorded a failure before the authoritative
`background.task.terminated` event could land.

Classify a terminated run by the shape of its abort reason: a real
Error that is not an AbortError (the swarm's own per-item timeout) stays
a failure, everything else that aborted the run is a cancellation. The
swarm's start-failure path uses the same rule.

* fix(agent-core-v2): flush the wire before evicting a subagent scope and re-pick LRU candidates

Two gaps in the scope-cache eviction pass:

- `AgentLifecycleService.remove()` swallows a failed wire flush and still
  tears the scope down, so an eviction that hit a disk-full or transient
  I/O error would drop the in-memory scope and let a later resume rebuild
  from a stale wire. Flush the agent's wire explicitly before removing;
  if that fails, keep the scope resident and retry on a later pass. The
  idle and task checks are repeated after the flush so a resume that
  started meanwhile is not cancelled by the removal.
- The pass snapshotted its candidates up front and re-validated them by
  attempt count only, so a scope that was resumed and completed again
  while an earlier eviction was awaited kept matching with attempts 0 and
  was evicted despite now being the most recently used. Pick the oldest
  eligible entry from the live map on every step instead, skipping only
  the entries this pass already tried.

---------

Co-authored-by: Kaiyi <me@kaiyi.cool>
2026-09-15 20:33:24 +08:00
Kimi Agent
39a74556a6
fix(plugins): rename WebBridge display name to Kimi Browser Extension (#3803)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (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
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
* fix(plugins): rename WebBridge display name to Kimi Browser Extension

The product has renamed WebBridge to Kimi Browser Extension in work and
Chrome. Update the user-facing display name across the built-in
capability entry, TUI plugins selector, managed plugin manifest,
marketplace catalog, skill docs, and user docs to match. Internal ids,
binary names, CDN paths, and daemon references are unchanged.

* fix(plugins): bump webbridge to 1.11.4 and keep legacy docs anchor

Address review: point the changeset at the scoped CLI package, bump the
renamed plugin's manifest/catalog/docs version so installed users are
offered the renamed package as an update, and preserve the published
#kimi-webbridge documentation anchor beside the renamed heading.

* docs(plugins): match only the known extension-update error messages

Broadening the version-mismatch trigger to the generic prefix 'Please
update the' would misclassify unrelated tool errors as an outdated
browser extension; match the two known full messages instead.

---------

Co-authored-by: kimi-agent-bot <kimi-agent-bot@users.noreply.github.com>
2026-09-15 18:13:51 +08:00
liruifengv
3eaed4e7d5
docs(changelog): sync 0.43.1 from apps/kimi-code/CHANGELOG.md (#3805) 2026-09-15 17:28:15 +08:00
liruifengv
bb0c66a15b
feat(oauth): switch the managed usage payload to the quota model (#3787)
The platform /usages payload now serves per-window used ratios
(goods_version, a usages map of limit5h/limit7d/monthTotal/monthCode
entries with used_ratio/reset_time, and boosterWallet) instead of
absolute used/limit rows.

- oauth: parse and fetch the quota model; keep the platform helpers
- toolkit / agent-core-v2 / node-sdk: getManagedUsage returns the quota
- kap-server: /oauth/usage passes the camelCase quota shape through
  (the legacy snake_case wire is gone)
- TUI /usage: plan rows are presence-driven from the quota payload;
  the monthly row carries a kimi/code breakdown line
- docs: server-api reference updated for the new response shape
2026-09-15 13:33:20 +08:00
wenhua020201-arch
da7f7ed854
docs: add web slash commands table and fold goal mode guide into interaction page (#3772)
* docs(web): add common slash commands table and rename startup options section

* docs(interaction): fold the goal mode guide into the interaction page and remove the orphaned page
2026-09-15 12:40:45 +08:00
Kimi Agent
4f45efdbfe
docs(skills): clarify flat-form skill naming and its limits (#3774)
Some checks are pending
CI / typecheck (push) Waiting to run
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (push) Waiting to run
CI / lint (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
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
* docs(skills): clarify flat-form skill naming and its limits

The flat-form description "Skill name is taken from the filename (minus
.md)" read as if the on-disk file should drop the extension, which
repeatedly confused readers. Rewrite the Creating-a-Skill section with
a concrete directory layout, explicit name-derivation rules for both
forms, the directory-over-flat precedence, and the flat form's top-level
scanning and KIMI_SKILL_DIR limitations.

* docs(skills): attribute directory-form names to the required frontmatter

parseSkillText requires name in directory-form SKILL.md and always
registers under it, so the subdirectory name is only a convention, not
the source of the Skill name. Reword the derivation bullets accordingly
(flat form keeps its filename fallback).

---------

Co-authored-by: kimi-agent-bot <kimi-agent-bot@users.noreply.github.com>
2026-09-14 23:16:18 +08:00
liruifengv
f37cb3d18c
docs(changelog): sync 0.43.0 from apps/kimi-code/CHANGELOG.md (#3767) 2026-09-14 20:24:21 +08:00
Haozhe
9296e68770
feat: declare dynamically_loaded_tools for official models and add per-server MCP deferred disclosure (#3667)
* feat(oauth): add the dynamically_loaded_tools capability from the official models endpoint

* feat(agent-core-v2): support per-server deferred disclosure of MCP tools

* feat(klient): mirror per-server deferred in the MCP config contract

* fix(agent-core-v2): honor per-server deferred for the needs-auth MCP tool

* fix(agent-core-v2): register select_tools regardless of the profile tool allowlist

* feat(agent-core-v2): default MCP servers to inline tool disclosure unless deferred is enabled
2026-09-14 19:42:56 +08:00
7Sageer
775a6c35de
feat(agent-core-v2): make the compaction attempt limit configurable (#3750)
* feat(agent-core-v2): make the compaction attempt limit configurable

Add loop_control.compaction_max_attempts (default 5) to control the
maximum total attempts for a failing compaction request, replacing the
hardcoded MAX_COMPACTION_RETRY_ATTEMPTS constant. The value flows
through ProfileModelContext into the compaction retry loop, covering
both retryable generation errors and empty/truncated response shrinks.

* fix(agent-core-v2): bound compaction shrink attempts and compute retry delays lazily

Address codex review on #3750: the empty/truncated shrink path allowed
maxAttempts + 1 requests (throwing only when the shrink counter exceeded
the limit), and the backoff delay array was allocated eagerly with
maxAttempts - 1 entries before the first request. The shrink path now
stops at the configured limit, and each delay is computed lazily from
the retry index.

* fix(agent-core-v2): count every compaction request against the shared attempt limit

Address the second codex review round on #3750: the retryable-error and
empty/truncated recovery paths kept separate counters, and the retry
budget reset after each shrink, so alternating failure modes could issue
more requests than compaction_max_attempts. A single requestAttempts
counter now gates all recovery paths (the overflow shrink path keeps its
own tighter cap of 3), making the configured value a true maximum on
total requests per compaction round.
2026-09-14 14:44:03 +08:00
liruifengv
6126472c7a
feat(agent-core-v2): graduate AI session titles from experimental (#3749) 2026-09-14 11:53:19 +08:00
Luyu Cheng
5b3b5b6f7c
fix(goal): remove time budget cap and exclude offline time (#3657)
* fix(goal): remove time budget cap and exclude offline time

* test(goal): refresh time budget tool snapshots
2026-09-10 21:27:04 +08:00
Haozhe
42998cfc13
feat(updater): add -y/--yes to skip the upgrade confirmation prompt (#3702)
Some checks are pending
CI / build (push) Waiting to run
CI / test (1) (push) Waiting to run
CI / test (2) (push) Waiting to run
CI / test (3) (push) Waiting to run
CI / test (4) (push) Waiting to run
CI / test (5) (push) Waiting to run
CI / test-pi-tui (push) Waiting to run
CI / test-vscode-legacy (push) Waiting to run
CI / test-windows (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
Publish VS Code extension / Publish VSIX to marketplaces (push) Waiting to run
2026-09-10 17:22:28 +08:00
Kai
5e452fc2dd
fix(agent-core-v2): let steer interrupt background task waits (#3697) 2026-09-10 17:13:13 +08:00
Kai
9f7e68e8bd
fix(mcp): preserve original attachments omitted from model output (#3688)
* fix(mcp): preserve original attachments omitted from model output

* test: register session media storage in agent lifecycle fixture

* fix(mcp): retain media originals and bound attachment details

* fix(mcp): resolve session attachments and honor cancellation

* test: check concrete media references in provider requests

* fix(media): read session attachments from their owning storage

* fix(media): preserve attachment access across runtime and history changes

* fix(mime): recognize structured application text attachments
2026-09-10 10:37:31 +08:00
liruifengv
4954fabbaa
docs(changelog): sync 0.42.0 from apps/kimi-code/CHANGELOG.md (#3675)
* docs(changelog): sync 0.42.0 from apps/kimi-code/CHANGELOG.md

* docs(changelog): use absolute URL for the Remote Control guide link

* docs(changelog): use absolute URLs for the remaining doc links
2026-09-09 14:59:07 +08:00
Kai
ff7371b70a
fix(glob): allow retrieving matches beyond the default page (#3658)
* fix(glob): allow retrieving matches beyond the default page

* test: decouple compaction checks from Glob tool schema size

* test: refresh registered tool snapshots for Glob pagination

* fix(glob): preserve complete result pages and render pagination notices
2026-09-09 00:29:54 +08:00
Kai
6de0cec174
fix(mcp): preserve distinct structured tool results (#3654)
* fix(mcp): preserve distinct structured tool results

* test(agent-core-v2): use current streaming event in thinking test
2026-09-08 21:40:29 +08:00
Kai
5000f981c3
fix(agent-core-v2): make large file reads resumable (#3645)
* fix(agent-core-v2): avoid repeated truncation of file reads

* fix(agent-core-v2): resume reads within long lines

Add column offsets and forward recovery for bounded long-line reads. Reject malformed UTF-16 in Read instead of replacing invalid input.

* fix(agent-core-v2): warn on lossy UTF-16 reads

Return readable text after strict UTF-16 decoding fails, with a warning retained in budgeted read continuations.

* fix(agent-core-v2): avoid redundant tail scans and detect file changes
2026-09-08 19:47:27 +08:00
Kexin Liu
d4d20d21d7
feat(agent-core-v2): allow read-only tools in /btw side questions (#3613)
* feat(agent-core-v2): allow read-only tools in /btw side questions

The btw child agent previously vetoed every tool call. Allow the
read-only tools Read, Grep, and Glob so side questions about the
codebase can be answered from current file contents; write and
execute tools stay disabled.

* docs: address review — single-sentence changeset, inline-code tool names

* chore: drop the benefit clause from the btw changeset
2026-09-08 14:50:48 +08:00
Kai
f6a9c39e22
feat(kimi-code): NotifyUser tool and mid-turn update panel (#3524)
* feat(kimi-code): two-line collapsed tool cards with width-aware headers

Collapsed cards now show the call on line one and a single dim outcome
row on line two: a Bash command's last output line (the live tail while
running) with a line-count chip, a Grep/Glob path sample, or a generic
tool's first output line. Read groups stay header-only and honor the
global expand state; failed calls keep their preview. Headers split into
head / flexible / tail segments so a long command fills the terminal
width before the chip.

* feat(kimi-code): NotifyUser tool and mid-turn update panel

Add an experimental NotifyUser tool (flag notify_user, off by default)
that agent-core-v2 offers only when the host declares the update_panel
UI capability at bootstrap; the TUI declares it through the SDK harness
options. The system prompt's guidance to send updates is injected only
when the tool is active for the agent. The TUI renders the turn's
updates in a panel above the editor (stacked, 8-row window, Ctrl+N pages
back) that the next turn clears, and keeps a one-line card in the
transcript.

* feat: add subagent updates and bidirectional paging

* fix: preserve session tools and prompts when toggling updates

* fix: correct notification delivery and CI regressions
2026-09-08 13:47:23 +08:00