feat(adapters): add Kimi Code via native ACP - #2
Closed
delete-cloud wants to merge 5 commits into
Closed
delete-cloud wants to merge 5 commits into
delete-cloud wants to merge 5 commits into
Conversation
Add `kimi` as a seat agent and MCP host, alongside Claude Code, Codex, Cursor, Grok, Antigravity, and Copilot. Seats run `kimi -p <prompt> --output-format stream-json` over the CLI bridge; resume uses `-S <session-id>` and model selection uses `-m`. Kimi Code exposes no reasoning-effort flag, so effort is rejected explicitly. A successful run without an observed session id (session.resume_hint) is treated as an error. Readiness checks the Kimi Code data root ($KIMI_CODE_HOME, default ~/.kimi-code) for credentials/kimi-code.json or config.toml; Kimi Code does not consume API keys from the shell environment. Relative KIMI_CODE_HOME values anchor to the current directory and are pinned on the child process so confer and the seat resolve the same data root. `confer mcp install` writes $KIMI_CODE_HOME/mcp.json. The bundled Skill installs to kitup's `kimi-cli` host, whose user skill dir upstream 0.1.4 prefers ~/.config/agents/skills — a directory Kimi Code never scans (its user roots are $KIMI_CODE_HOME/skills and ~/.agents/skills). Until kitup fixes that host data, `skill install --agent kimi` may target a directory Kimi Code does not read.
Move Kimi seats from the CLI print-bridge to native ACP (`kimi acp`), matching Grok, Cursor, and Copilot. Resume uses `session/resume`. Model and unattended permission are applied through `session/set_config_option`: Kimi 0.41.0 maps ACP `mode=auto` to engine Never Ask (advertised `yolo` is Ask When Needed). `reasoning_effort` remains rejected. KIMI_CODE_HOME is pinned on the ACP child. Patch kitup to delete-cloud/kitup@716a744 so kimi-cli user skills install to ~/.agents/skills.
Send Confer reasoning_effort as session/set_config_option thinking after mode=auto and model. Kimi-only: accept on/low/high/max; reject none/off at seat config because current models cannot disable thinking (Copilot none stays valid). A picker that does not list the level still fails before the prompt and records no session.
Point the crates.io kitup override at lathe-cli/kitup main after #41 instead of delete-cloud/kitup. Note that Kimi Code seats use thinking levels on/low/high/max.
SPEC and nearby comments now match Copilot's sentence shape: no Kimi version, picker, or kitup host-path essays. Those details belong in the upstream PR, not the contract.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Kimi Code as a Confer seat agent and MCP host, using native ACP (
kimi acp), same transport class as Grok / Cursor / Copilot.This draft is on delete-cloud/confer for review. It is not the squash PR for
samzong/conferyet. History still contains the earlier CLI-bridge commit (5bef033) and the later ACP replacement; squash before offering upstream.What changed
New
kimiagent (src/types.rs)kimi,kimi-code,kimi-code-cli,kimi-cli; binarykimi; Skill host idkimi-cli(kitup’s adapter name for Kimi Code, not legacy kimi-cli).Execution (
src/adapters/native.rs,src/adapters/acp.rs)kimi acpover native ACP; pins absoluteKIMI_CODE_HOMEon the child.session/resume(Kimi advertises bothloadSessionand resume; Confer prefers resume so replayed history is not mixed into the current answer).session/set_config_optionmode=auto. Kimi 0.41.0 maps ACPauto→ engine Never Ask; advertisedyolois Ask When Needed and is not used.kimi --auto acpdoes not changesession/newoffmode=default.modelthenthinkingviaset_config_option. Conferreasoning_effortmaps to thinking. Locally accepted:on,low,high,max. Kimi-only:none/offfail at seat config (current models cannot disable thinking; Copilotnoneis unchanged). K2.7 picker is on-only; K3 is low/high/max (onaliases to high). A locally accepted level the current picker does not list fails before the prompt and records no native session.Readiness
$KIMI_CODE_HOME, default~/.kimi-code):credentials/*.jsonexcludingcredentials/mcp/, or a non-emptyapi_keyinconfig.toml. Does not readKIMI_API_KEY/MOONSHOT_API_KEY.MCP host
$KIMI_CODE_HOME/mcp.json(Cursor-style). Explicit--agent kimidoes not requirekimion PATH.Host detection
"host_agent": "kimi"when the host is Kimi Code.Skill install / kitup
~/.config/agents/skillsfor host idkimi-cli; Kimi Code scans~/.agents/skillsand$KIMI_CODE_HOME/skills. Fixed on kitup main (lathe-cli/kitup#41). This branch patches crates.io kitup tolathe-cli/kitupmainuntil the next crates.io release. Existing~/.config/agents/skillsinstalls are not migrated.Testing
cargo test— 62 passed (Kimi ACP wire order, resume vs load, unknown thinking fails before prompt, thinking allowlist, MCP file install, nativekimi acpargv).fmt/clippy.confer mcp: create_room → first messageCONFER_KIMI_ACP_OK→ resumeRECALL_OK→echotool output.thinking=highaccepted on k3;thinking=offnative error.Docs
README, SPEC, bundled Skill (host_agent + thinking levels), architecture SVG.