Commit graph

160 commits

Author SHA1 Message Date
_Kerman
72c4b0adaa
feat: agent swarm (#424) 2026-06-08 14:26:56 +08:00
7Sageer
3b62b123e6
fix: detect Scoop Git Bash on Windows (#529)
* fix: detect Scoop Git Bash on Windows

* fix: harden Git Bash shim detection

* fix(kaos): preserve Git Bash PATH priority
2026-06-08 14:00:11 +08:00
Kai
4d113949c8
feat: honor HTTP_PROXY/HTTPS_PROXY/NO_PROXY for all outbound traffic (#487)
* feat: honor HTTP_PROXY/HTTPS_PROXY/NO_PROXY for all outbound traffic

Install a global undici dispatcher at CLI startup so every in-process fetch
(LLM APIs, MCP HTTP, web tools, telemetry, sign-in, update checks) honors the
standard proxy variables, and propagate NODE_USE_ENV_PROXY to spawned stdio
MCP child processes. Loopback hosts always bypass the proxy; an invalid proxy
URL is reported and ignored rather than aborting startup.

* feat: support SOCKS proxies via ALL_PROXY

Recognize SOCKS proxies (socks5/socks5h/socks4/socks alias) from ALL_PROXY or a
socks-scheme HTTP(S)_PROXY, routing traffic through a custom undici connector
backed by the socks client (reusing undici's own TLS handling for https).
HTTP(S) proxies keep precedence; NO_PROXY and loopback are honored for the SOCKS
path too. Child stdio MCP node processes honor HTTP(S) proxies via
NODE_USE_ENV_PROXY; SOCKS applies to the main process only.

* fix: address proxy review comments (env masking, child NO_PROXY, nix hash)

- Resolve HTTP(S)_PROXY explicitly via the first non-blank casing so a blank
  lowercase var can no longer mask a populated uppercase one (the dispatcher
  installed but went direct), and coerce a SOCKS-scheme value sitting in an
  HTTP(S) var to '' so it is never handed to EnvHttpProxyAgent.
- Reconcile a child's NO_PROXY override across both casings using the first
  non-blank value run through resolveNoProxy, so a per-server config override
  is not shadowed by the injected lowercase value, keeps the loopback bypass,
  and passes '*' through verbatim.
- Update flake.nix pnpmDeps hash for the added socks/undici dependencies.

* fix(proxy): honor http ALL_PROXY, match port-qualified NO_PROXY, note child Node version

- Honor an http-scheme ALL_PROXY as the catch-all fallback for both http and
  https (scheme-specific HTTP(S)_PROXY still wins), so an ALL_PROXY-only setup
  no longer installs a no-op dispatcher and connects direct.
- Make the SOCKS-path NO_PROXY matcher port-aware: a `host:port` entry now
  matches only that port (with IPv6-safe parsing for `::1` / `[::1]:443`).
- Document that child stdio MCP proxying via NODE_USE_ENV_PROXY only applies on
  Node versions that support it (>= 22.21 / >= 24.5).

* fix(proxy): IPv6 + wildcard NO_PROXY and per-server child proxy edges

- Strip IPv6 brackets from a SOCKS proxy host (e.g. ALL_PROXY=socks5://[::1]:1080)
  so the socks client connects to the bare address.
- Add the bracketed [::1] to the loopback bypass: undici's EnvHttpProxyAgent
  only exempts IPv6 loopback when the NO_PROXY entry is bracketed (it mis-parses
  bare ::1). The SOCKS-path matcher normalizes brackets on both sides.
- Match *.domain wildcard (and host:port) NO_PROXY entries in the SOCKS matcher.
- Compute the child stdio proxy env from the MERGED env so a proxy declared only
  in a server's config.env also enables NODE_USE_ENV_PROXY.

* fix(proxy): synthesize HTTP(S)_PROXY from ALL_PROXY for child processes

proxyEnvForChild now hands spawned stdio MCP children the resolved
HTTP_PROXY/HTTPS_PROXY (in both casings), synthesizing them from an http-scheme
ALL_PROXY when no scheme-specific variable is set. Node's --use-env-proxy reads
HTTP_PROXY/HTTPS_PROXY (not ALL_PROXY), so an ALL_PROXY-only parent now proxies
the child consistently with the main process. Shared resolveHttpProxyUrls helper
is reused by createProxyDispatcher and proxyEnvForChild.

* chore(changeset): tighten proxy changeset wording
2026-06-06 01:44:54 +08:00
liruifengv
84afaf42fc
docs(changelog): sync 0.11.0 and 0.10.1 from apps/kimi-code/CHANGELOG.md (#488) 2026-06-05 18:51:16 +08:00
Luyu Cheng
658e4653fc
fix(tui): refine goal queue workflows (#474)
* fix(tui): harden goal startup flow

* fix(tui): refine upcoming goal handling

* fix(tui): accent upcoming goal confirmation

* docs: update goal queue guidance

* docs: address goal queue review comments

* fix(tui): avoid goal autocomplete before text

* fix(tui): highlight goal queue subcommands

* fix(tui): address goal queue review nits

* Remove useless docs

---------

Signed-off-by: Luyu Cheng <2239547+chengluyu@users.noreply.github.com>
2026-06-05 18:02:39 +08:00
liruifengv
f555c89de7
feat: prioritize built-in skill slash commands (#480) 2026-06-05 17:27:01 +08:00
wenhua020201-arch
c984cbcb30
docs: improve goals page and related cross-references (zh/en) (#475)
* docs: fix code fence language and add cross-references (zh/en)

- slash-commands: add 'sh' language tag to /goal example code block
- config-files: link experimental section to env-vars#runtime-switches
- env-vars: link KIMI_CODE_EXPERIMENTAL_* rows to config-files#experimental

* docs: improve goals.md formatting and clarity (zh/en)

- Merge redundant opening paragraphs into one with concrete examples
- Use colons before code examples (not periods)
- Bold state names in lifecycle list (complete/paused/blocked)
- Replace prose keyboard shortcut description with table
- Remove draft product-background text from EN queue section

* docs: move goals after sessions in sidebar (zh/en)

Goal mode builds on multi-turn sessions, so it reads more naturally
after the sessions page in the guides navigation.
2026-06-05 16:19:17 +08:00
_Kerman
aa610e247d
feat: use fixed 30-minute subagent timeout (#470) 2026-06-05 15:59:10 +08:00
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
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
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
liruifengv
8e5be975ec
docs(changelog): sync 0.10.0 from apps/kimi-code/CHANGELOG.md (#434) 2026-06-04 21:58:23 +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
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
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
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
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
qer
13e6a556f8
docs: remove FAQ page (#384) 2026-06-03 21:32:17 +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
e0d28b4941
feat: allow empty /btw command (#378) 2026-06-03 19:04:45 +08:00
_Kerman
ba7dd736a3
feat: add btw side-channel command (#338) 2026-06-03 15:54:31 +08:00
liruifengv
9143fdadf6
docs(changelog): sync 0.8.0 from apps/kimi-code/CHANGELOG.md (#342) 2026-06-02 23:07:56 +08:00
Luyu Cheng
ac37d74484
feat: pursue a goal autonomously (#270) 2026-06-02 22:52:23 +08:00
_Kerman
191059d400
feat: add background ask user questions (#315) 2026-06-02 22:12:25 +08:00
qer
3502d870fc
chore: scrub internal identifiers from public text (#340) 2026-06-02 21:54:42 +08:00
qer
7cda9c3866
feat: add permission approval hooks (#336) 2026-06-02 19:57:10 +08:00
liruifengv
eeefa98083
feat(cli): add automatic and manual upgrades (#334) 2026-06-02 18:39:50 +08:00
7Sageer
3c5dee8836
feat(cli): add kimi provider subcommand for non-interactive provider management (#313)
* feat(cli): add `kimi provider` subcommand

Add a non-interactive equivalent of the TUI `/provider` command:

- `kimi provider add <url> --api-key <key>` imports every provider in a
  custom api.json registry, persisting `source` so the next TUI launch
  refreshes the model list automatically.
- `kimi provider remove <id>` deletes a provider and its model aliases.
- `kimi provider list [--json]` prints configured providers with model
  counts and source labels.
- `kimi provider catalog list [providerId] [--filter] [--url] [--json]`
  browses the public models.dev catalog.
- `kimi provider catalog add <providerId> --api-key <key> [--default-model]`
  imports a known provider straight from the catalog.

All actions reuse `fetchCustomRegistry`, `applyCustomRegistryProvider`,
`fetchCatalog`, and `applyCatalogProvider` from the existing oauth/SDK
helpers.

* fix(cli): satisfy oxlint rules in provider subcommand

- Use `Array#toSorted()` instead of `Array#sort()` to avoid mutating
  arrays returned from `Object.keys()` / `Object.entries()`.
- Drop redundant boolean-literal comparisons on `model.capability.*`
  fields (already typed as `boolean | undefined`).
- Remove the unnecessary `source as Record<string, unknown>` assertion
  in `providerSourceLabel` — `ProviderConfig.source` is already typed
  that way in the schema.
- Drop the empty-object fallback in `{ ...(config.models ?? {}) }`
  inside the test harness.

* fix(cli): address review findings on provider subcommand

P1 — `provider add`: `harness.removeProvider` re-reads the config from
disk (see `agent-core/src/rpc/core-impl.ts removeKimiProvider`), so
calling it mid-loop discarded providers we had already applied in
memory but not yet persisted. Importing a registry that added a new
provider then replaced an existing one silently lost the new one.
Drop every stale id up front in a single batch, then apply each entry
against the resulting fresh config.

P2 — `catalog add`: `applyCatalogProvider` always writes
`defaultThinking`. Hardcoding `false` would silently disable thinking
for thinking-capable models when the user had it on. Thread the prior
`defaultThinking` through.

P2 — `catalog add`: `removeProvider` clears `defaultModel` when it
pointed at one of the provider's aliases, so capturing
`previousDefaultModel` AFTER the removal yielded `undefined`. Capture
both `defaultModel` and `defaultThinking` BEFORE the removal so
re-importing a configured provider (e.g. to rotate the api key)
preserves the user's chosen default.

Tests:

- `makeHarness` now models the on-disk semantics of `removeProvider`
  (clears `defaultModel` when an alias matches, returns fresh disk
  view), so behavior that depended on the buggy in-memory mock is
  exercised honestly.
- Three new regression tests, each verified to fail against the
  pre-fix handler.

* fix(cli): address follow-up review on catalog default semantics

Two more findings on `catalog add`:

P2 — `default_thinking` fallback to `false` was wrong even after the
previous fix. `resolveThinkingLevel` (agent-core/.../thinking.ts:23)
treats `defaultThinking === false` as an explicit "off" request and
silently disables thinking before per-model defaults kick in. A
first-time `kimi provider catalog add anthropic --default-model
claude-opus-4-7` was therefore still persisting `default_thinking =
false` for thinking-capable models. The handler now always restores
the previous `defaultThinking` (including `undefined`) — the only
way to let the runtime resolver pick the per-model default.

P2 — Restoring `default_model` was unconditional, even when the
refreshed catalog no longer ships that model. `applyCatalogProvider`
drops the old aliases and only populates the current catalog, so
restoring an alias the catalog no longer contains would point
`default_model` at a non-existent entry and break the next session.
The handler now checks whether the alias still resolves and clears
it otherwise.

Test harness:

- The fake `setConfig` now mirrors the real `mergeConfigPatch`
  semantics (deep-merge with `undefined` keys skipped), so tests can
  honestly assert that `setConfig({defaultModel: undefined})` does
  NOT wipe a key from disk — only `removeProvider` can.

Two new regression tests, each verified to fail against the pre-fix
handler.

---------

Co-authored-by: 7Sageer <158020838+7Sageer@users.noreply.github.com>
2026-06-02 14:58:47 +08:00
_Kerman
573c56e829
refactor: background task manager persistence (#285) 2026-06-02 12:48:31 +08:00
liruifengv
e2ce6b9687
docs(changelog): sync 0.7.0 from apps/kimi-code/CHANGELOG.md (#298) 2026-06-02 11:31:20 +08:00
Yifan Song
4c7b173c12
docs: add Ctrl-J as newline alternative in keyboard shortcuts (#288)
Co-authored-by: liruifengv <liruifeng1024@gmail.com>
2026-06-02 11:24:22 +08:00
Haozhe
42bb9141d8
feat(tui): add /provider command, custom registry import, and tabbed model selector (#264)
* feat(tui): add /provider command, custom registry import, and tabbed model selector

- add "/provider" slash command for managing AI providers with CRUD UI
- add custom registry import via api.json URL and Bearer token
- introduce tabbed model selector grouped by provider
- add fetchCustomRegistry and applyCustomRegistryProvider in oauth package
- replace deprecated "/connect" command with unified "/provider" flow
- update provider and slash-command documentation

* feat(tui): background provider model refresh at startup

- add `refreshAllProviderModels` utility supporting managed OAuth, open platforms and custom registries
- wire background refresh into `KimiTUI` startup via `AuthFlowController`
- add `providerSwitchHint` option to `ModelSelector` and enable it in `TabbedModelSelector`
- update `TabbedModelSelector` hint wording from "switch" to "provider"
2026-06-01 18:46:40 +08:00
qer
a1dfbfeb16
fix: clarify Kimi Platform login copy (#274) 2026-06-01 18:43:01 +08:00
Kai
a24bfb1df3
feat: force adaptive thinking via KIMI_MODEL_ADAPTIVE_THINKING (#232)
* feat: force adaptive thinking via KIMI_MODEL_ADAPTIVE_THINKING

Add the KIMI_MODEL_ADAPTIVE_THINKING env var and a matching
adaptive_thinking model-alias field that force adaptive thinking
(thinking: { type: 'adaptive' }) on or off, overriding the Anthropic
model-name version inference.

This lets custom-named staff endpoints that back an adaptive-capable
model opt in even when the model name does not encode a parseable Claude
version (which would otherwise fall back to budget-based thinking).

The kosong AnthropicChatProvider resolves the adaptive decision once in
withThinking() as `_adaptiveThinking ?? supportsAdaptiveThinking(model)`
and threads it through clampEffort/supportsEffortParam so forced adaptive
also unlocks the max effort level.

* fix: make adaptive_thinking imply the thinking capability

A model alias that sets adaptive_thinking=true (or env
KIMI_MODEL_ADAPTIVE_THINKING=true) without listing a thinking
capability previously resolved to thinking=false for custom-named
endpoints not in the capability catalog. The model picker then
classified the alias as "thinking unsupported" and forced thinking
off (persisting default_thinking=false).

Treat a forced adaptive flag as advertising the thinking capability
in resolveModelCapabilities, so the config.toml one-field opt-in
agrees with the KIMI_MODEL_* env path (which already defaults
capabilities to include thinking).

* fix: honor adaptiveThinking in the model picker, not the capability resolver

The earlier resolveModelCapabilities change had no observable effect:
modelCapabilities.thinking is consumed only for completion-budget and
media gating, never to decide whether thinking is dispatched or whether
the model picker offers a thinking toggle.

The mechanism that actually forced thinking off for an adaptive_thinking
alias is the TUI model picker, which reads ModelAlias.capabilities
directly (availableModels comes straight from config.models). Revert the
resolver change and instead make thinkingAvailability() treat
adaptiveThinking=true as a thinking toggle, so a custom-named config.toml
alias configured with only `adaptive_thinking = true` is no longer
classified "unsupported" (which forced thinking off and persisted
default_thinking=false on select). The KIMI_MODEL_* env path was already
covered by DEFAULT_CAPABILITIES.
2026-05-30 09:49:08 +08:00
liruifengv
2752bd9330
docs(changelog): sync 0.6.0 from apps/kimi-code/CHANGELOG.md (#227) 2026-05-29 22:58:42 +08:00
qer
bab2da7b1c
feat(plugin): install plugins from a GitHub repository URL (#221)
* feat(plugin): install plugins from a GitHub repository URL

Allow `/plugins install <github-url>` (and marketplace `source` entries) to
take a GitHub repo URL directly. A new `github` source kind joins the
existing `local-path` and `zip-url` kinds.

Recognized URL forms (parsing in source.ts):

- `https://github.com/<o>/<r>`                       — bare; resolves to latest
                                                       release tag, falling back
                                                       to default branch HEAD.
- `https://github.com/<o>/<r>/tree/<ref>`            — branch / tag / SHA;
                                                       value passed to codeload
                                                       in its short form so the
                                                       backend resolves either.
- `https://github.com/<o>/<r>/releases/tag/<tag>`    — explicit tag, uses
                                                       refs/tags/<tag> to avoid
                                                       same-named-branch ambiguity.
- `https://github.com/<o>/<r>/commit/<sha>`          — explicit commit SHA.

The resolver deliberately avoids `api.github.com`: its 60/hour anonymous
quota is shared with every other tool on the egress IP (browser, gh CLI,
IDE integrations) and a first-time install failing because some other tool
ate the budget is unacceptable UX. Instead we:

- GET `github.com/<o>/<r>/releases/latest` with manual redirect and parse
  the `Location` header (302 → tag URL; 404 → no own release).
- Fall back to `codeload.github.com/<o>/<r>/zip/HEAD` for repos with no
  releases (or for forks that inherit upstream tags but have no own release
  page, which redirect to bare `/releases`).
- Only treat the explicit 404 from `/releases/latest` as "no release" — 5xx,
  403, 429, and any other non-2xx status surface a hard error rather than
  silently installing the default branch, so the user knows when transient
  GitHub issues changed the install path.

UI changes in the TUI:

- `/plugins install` now shows a live Braille spinner while resolving and
  downloading, then flips to a final status that distinguishes Installed
  (fresh) vs Updated (same repo identity, new version) vs Migrated (source
  changed, e.g. CDN zip-url → GitHub).
- `/plugins list`, the `/plugins` overview, and `/plugins info` show the
  install provenance inline. `zip-url` installs now display the URL host
  (e.g. `via code.kimi.com`, `via 127.0.0.1:port`) instead of the opaque
  `zip-url` literal. GitHub installs show `github <owner>/<repo>@<ref>`.
- Three-tier trust badge driven by the marketplace context recorded at
  install time: `official` (green) for `tier: official`, `curated` (blue) for
  `tier: curated`, `third-party` (muted) for anything not installed through
  the marketplace selector. CLI `/plugins install <url>` always records as
  third-party; the marketplace selector passes the tier through. A
  re-install replaces the marketplace context: switching to a third-party
  source clears the badge, which matches the underlying trust change.

`installed.json` gains optional `github` and `marketplace` fields
(back-compatible). PluginSummary surfaces `source`, `originalSource`,
`github`, and `marketplace` so the TUI can label installs without an extra
round trip to PluginInfo. The SDK's `session.installPlugin(source)` gains
an optional `{ marketplace }` second argument so the marketplace selector
can forward `{ id, tier }` through RPC; the CLI install path omits it.

Tests: 112 plugin-suite tests (URL parser, resolver, store round-trip,
manager integration). The manager integration tests assert codeload URLs
shape (short form for `/tree/<ref>`, explicit `refs/tags/` for
`/releases/tag/`) and verify marketplace context is persisted across
reloads and cleared on a third-party re-install.

* chore(changeset): plugin install from GitHub

* docs(plugins): document GitHub install URLs and trust badges

* fix(plugin): preserve URL-encoded characters in GitHub ref names

Git permits ref characters that have special meaning in URLs — most
notably `#`, which is a valid tag character (e.g. `release#1`) but the URL
fragment delimiter. The resolver decoded the tag from GitHub's
`/releases/latest` 302 redirect Location header and then interpolated the
raw value into the codeload URL. The literal `#1` became a fragment and
the HTTP request reached the server as `…/refs/tags/release` — a wrong or
truncated ref, leading to install failure for a release whose URL was
otherwise valid.

Two symmetric changes:

- The codeload URL builder now splits the ref on `/` (so multi-segment
  refs like `feat/foo` keep their path separators) and percent-encodes
  each segment.
- The GitHub URL parser now percent-decodes each segment from the URL's
  pathname when extracting `/tree/<ref>`, `/releases/tag/<tag>`, and
  `/commit/<sha>`. Storage and display see the human-readable Git ref
  name; the resolver re-encodes on the way out.

Malformed `%xx` sequences in user-typed URLs are tolerated: we keep the
raw segment so the caller surfaces a normal "ref not found" error
downstream instead of crashing during parse.

* fix: restrict plugin trust badges

* chore: remove fetch when show plugin list

---------

Co-authored-by: qer <Anna_Knapprfr@mail.com>
2026-05-29 22:18:16 +08:00
Kai
2bbea75ee4
feat: define model via KIMI_MODEL_* environment variables (#212)
* feat: define model via KIMI_MODEL_* environment variables

Add a KIMI_MODEL_* environment-variable channel that synthesizes a
provider (__kimi_env__) and model alias (__kimi_env_model__) in memory
and selects it as the default model, without editing config.toml.
Supports provider type (kimi/anthropic/openai), base URL, API key,
context size, capabilities, anthropic max_output_size, openai
reasoning_key, and full thinking settings.

Runtime config reads go through a new loadRuntimeConfig wrapper; the
config.toml write-back paths keep using readConfigFile so the
synthesized model is never persisted back to disk.

* feat: env-model defaults and friendly welcome model name

- KIMI_MODEL_MAX_CONTEXT_SIZE defaults to 262144 (256K) when unset
- KIMI_MODEL_CAPABILITIES defaults to image_in,thinking when unset
- TUI welcome banner shows the model display name / id instead of the
  internal __kimi_env_model__ alias key

* fix: never persist env model to config.toml; validate default_thinking

- Strip the synthesized __kimi_env__ provider / __kimi_env_model__ model
  (and a default_model pointing at it) in writeConfigFile, so the env model
  and its shell API key cannot be persisted via a getConfig -> setConfig
  patch round-trip (e.g. running /login or /connect in env-model mode).
- Reject a non-empty but unparseable KIMI_MODEL_DEFAULT_THINKING value
  (fail-fast) instead of silently keeping config.toml's existing default.

* fix: preserve on-disk default_model when stripping env model; fix thinking docs

- stripEnvModelConfig restores config.toml's default_model from raw instead of
  erasing it when the runtime default points at the env alias, so a real
  default_model survives a getConfig -> setConfig round-trip.
- Correct KIMI_MODEL_DEFAULT_THINKING docs: unset follows the global default
  (Thinking on), not Off.

* fix: restore env-injected fields to on-disk values in stripEnvModelConfig; update tests for thinking behavior
2026-05-29 21:40:56 +08:00
_Kerman
3a0e06031a
fix: project persisted context messages (#195) 2026-05-29 14:43:17 +08:00
_Kerman
8de720434f
chore: add docs to pnpm-workspace (#196) 2026-05-29 14:34:05 +08:00
_Kerman
537cf20d18
feat: remove default per-turn step limit of 1000 (#186) 2026-05-29 13:11:45 +08:00
qer
68df4b8b84
docs: simplify plugins documentation (#169)
* docs: simplify plugins documentation

* docs: restore plugin caveats lost during simplification

Re-add three behaviors that were dropped from the simplified plugins
docs: the stdio MCP `cwd` must start with `./`, local-path installs run
from the managed copy (so editing the source after install requires a
reinstall), and `/plugins remove` only deletes the install record while
leaving files on disk. Mirror the changes in both en and zh.
2026-05-29 02:21:19 +08:00
liruifengv
681ccc5b85
chore(changelog): sync 0.5.0 and reword 'assistant' to 'agent' (#171) 2026-05-28 22:46:50 +08:00
liruifengv
850aad461b
docs: document scheduled task tools (#168) 2026-05-28 22:12:54 +08:00
liruifengv
07dd604c3c
feat: add /auto slash command and --auto CLI flag (#163)
* feat: add /auto slash command and --auto CLI flag

* feat: add /auto slash command and --auto CLI flag
2026-05-28 20:24:50 +08:00
liruifengv
16e881ed64
docs(changelog): sync 0.4.0 from apps/kimi-code/CHANGELOG.md (#125) 2026-05-27 23:31:03 +08:00